Spec authoring

From attilaszasz/sdd-pilot · View interactive version

Spec authoring is an AI agent skill from the GitHub repository attilaszasz/sdd-pilot. Reference material for writing product, technical, and operational specifications (work-item priorities, requirement families, success criteria). Loaded on demand by `specify-feature`; not directly invokable.

How to use this skill

Skill file

Spec Authoring Guide

Spec Writing Process

1. Parse the Feature Description

2. Fill the Template

Use assets/spec-template.md. Replace all placeholders; remove sections that don't apply to the chosen spec_type.

3. Product Specs (`spec_type: product`)

4. Technical Specs (`spec_type: technical`)

5. Operational Specs (`spec_type: operational`)

6. Handle Unclear Aspects

7. Generate Requirements

8. Define Success Criteria

All success criteria: measurable and verifiable. Each SC-### must reference its parent work item: SC-001 [US1]: ... (product) or SC-001 [OBJ1]: ... (technical/operational). Every P1 story or objective must have at least one SC.

9. Write Problem Statement

Mandatory for all spec types. 2-4 sentences covering: current pain point or opportunity, trigger/motivation, who is affected, consequences of inaction. Place at the top of the spec, before work items.

10. Define Scope

Mandatory for all spec types.

11. Document Assumptions & Risks

Mandatory for all spec types.

12. Tag Implementation Signals

Mandatory for all spec types. Lightweight tags that tell the plan phase what to architect without prescribing how. Valid tags: NEW-ENTITY, NEW-API, NEW-UI, MIGRATION, EXTERNAL-SERVICE, BREAKING-CHANGE, NEW-WORKER, NEW-CONFIG. Each tag gets a brief description.

13. Add Glossary (Conditional)

Include when the spec introduces 2+ domain-specific terms. Table format: | Term | Definition |. Keep definitions precise and consistent with usage throughout the spec.

Epic-Type-Aware Authoring

Adapt writing process based on spec_type frontmatter:

Product specs (`spec_type: product`)

Technical specs (`spec_type: technical`)

Operational specs (`spec_type: operational`)

Section Requirements

| Section | Product | Technical | Operational |

|---|---|---|---|

| Problem Statement | Mandatory | Mandatory | Mandatory |

| Scope | Mandatory | Mandatory | Mandatory |

| User Scenarios & Testing | Mandatory | N/A | N/A |

| Technical Objectives | N/A | Mandatory | N/A |

| Operational Objectives | N/A | N/A | Mandatory |

| Integration Points | N/A | Mandatory | Mandatory |

| Requirements | Mandatory (FR-) | Mandatory (TR-) | Mandatory (OR-) |

| Runbook Requirements | N/A | N/A | If applicable (RR-) |

| Key Entities | If applicable | If applicable | N/A |

| Assumptions & Risks | Mandatory | Mandatory | Mandatory |

| Implementation Signals | Mandatory | Mandatory | Mandatory |

| Success Criteria | Mandatory | Mandatory | Mandatory |

| Glossary | If applicable | If applicable | If applicable |

| Stress-Test Findings | Optional | Optional | Optional |

Size Budget

Keep spec.md ≤ 10KB. If exceeded: consolidate overlapping requirements, tighten prose, defer low-impact detail to clarification. For specs approaching the limit, consider whether the feature should be decomposed into multiple epics first.

Artifact Conventions

Preservation rules: see AGENTS.md §Artifact Conventions. Consult the expanded reference only for exceptions or remediation details not covered by the primer.

Spec-specific rule: Do NOT add top-level sections outside the allowed set for the active spec_type.

Quick Rules

Reasonable Defaults (don't ask about these)

Ambiguity Scan Categories

Full taxonomy in references/ambiguity-categories.md — read only when scanning for ambiguities (during /sddp-clarify or /sddp-analyze), not during initial spec generation. Interpret categories relative to spec_type: user journeys (product), system/developer flows (technical), operator/environment flows (operational).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.