Sdd authoring

From magnus919/hermes-profiles · View interactive version

Sdd authoring is an AI agent skill from the GitHub repository magnus919/hermes-profiles. Specification authoring for AI-native SDD — writes formal specifications in structured formats (Gherkin, user stories, acceptance criteria), enforces spec quality gates, and produces artifact-pyramid-compliant SPEC.md outputs. Trigger when specifications or requirements documents need to be authored

How to use this skill

Skill file

SDD Specification Authoring

Writing formal, machine-readable specifications that drive AI-assisted implementation. This skill owns the Specify phase of the SDD pipeline and its output is the prerequisite for all downstream SDD work.

SDD Pipeline Position

INCEPTION → [SPECIFY] → PLAN → TASKS → IMPLEMENT → VERIFY
                ↑
          You are here

The specification is the single source of truth. Every downstream artifact — task plan, architecture, implementation, tests — derives from and traces back to this document. Ambiguity in the spec propagates as defects in every subsequent phase.

Artifact-Pyramid Output: SPEC.md

The specification documents produced by this skill follow the artifact-pyramid structure:

| Layer | Content | File |

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

| L1 | Executive Summary — one-paragraph scope statement, key stakeholders, overall success criteria | 00-index.md (entry point) |

| L2 | Per-dimension specification — user stories, Gherkin scenarios, edge cases, NFRs, out-of-scope, data contracts | Individual *.spec.md files |

| L3 | Detailed per-story dossiers — full acceptance criteria, interface definitions, data schemas, examples | dossiers/ directory |

| SOURCES | Navigation index linking each L2 dimension to its L3 sources | Footer of each file |

Loading Guidance

| Reference | When to load | File |

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

| Spec Quality Gates | Before delivering any SPEC.md — validates completeness against 7 quality dimensions | references/spec-quality-gates.md |

| Gherkin Patterns | Writing executable scenarios — Given/When/Then structure for specific patterns | references/gherkin-patterns.md |

| Acceptance Criteria Design | Crafting ACs that pass the "no-surprises" test — edge case enumeration, boundary conditions | references/acceptance-criteria-design.md |

| Template | When to use | File |

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

| SPEC.md | Producing a specification document from scratch | templates/SPEC.md |

| Script | When to run | File |

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

| spec-quality-check.sh | After authoring a SPEC.md — validates all required sections exist | scripts/spec-quality-check.sh |

Trigger Conditions

Invoke this skill when:

Output Contract

Every SPEC.md MUST include:

  1. Problem statement — what problem this solves and why it matters
  2. Scope boundary — explicit in-scope and out-of-scope
  3. User stories — prioritized, with links to acceptance criteria
  4. Acceptance criteria — per-story, framed as Given/When/Then or bulleted pass/fail conditions
  5. Edge cases — explicit enumeration of boundary conditions, error states, invalid inputs
  6. Non-functional requirements — performance, security, observability, compliance, accessibility
  7. Data contracts / interfaces — schemas, APIs, events (can be stubs that get refined in later phases)

The spec is NOT complete until a automated quality check passes (run spec-quality-check.sh).

SDD Philosophy

Specifications in SDD serve a different purpose than traditional requirements documents. They are not communication artifacts for humans that happen to be read by an AI. They are executable inputs to a code generation pipeline that happen to be readable by humans.

This distinction drives everything about how specs are written:

Framework Awareness

This skill is methodology-agnostic at the framework level but follows SDD principles common to all major frameworks:

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.