Back to library

AI Feature Spec Writer

This skill turns a rough feature idea into a structured AI feature spec using natural language requirements — written in terms of observable system behaviour, not implementation detail.

---

Context

AI feature specs fail for one of three reasons:

  • Requirements are written for a human engineer, not an AI system
  • Outputs are described as features ("summarise tickets") not behaviours ("given X, return Y with Z constraints")
  • Edge cases and failure modes are treated as engineering concerns, not product decisions
  • ---

    Step 1 — Extract the raw intent

    Ask: what is the feature, who uses it, what triggers it, what should it produce, what must it never do, how will you know it worked.

    Step 2 — Write the core requirement set

    GIVEN/WHEN/THEN/WITH CONSTRAINTS format. Rules: every requirement must be falsifiable, describe behaviour not implementation, no vague words ("intelligently", "appropriately"), use confidence thresholds instead of "sometimes", one requirement per capability.

    Step 3 — Define inputs and outputs explicitly

    Structured I/O table: input type/source/format/edge cases, output type/format/destination/latency expectation.

    Step 4 — Write failure mode definitions

    For each requirement: hallucination, omission, tone violation, over-refusal, latency failure — with specific handling for each.

    Step 5 — Write the full spec document

    Template: Problem statement, Feature description, Users and context, Functional requirements (GIVEN/WHEN/THEN), Non-functional requirements (latency, accuracy threshold, availability, privacy), Input/Output specification, Failure modes and handling, Acceptance criteria, Out of scope, Open questions.

    Quality check before delivering

    Every requirement uses GIVEN/WHEN/THEN/WITH CONSTRAINTS format
    No requirement contains "intelligently", "appropriately", or "as needed"
    Every output has a defined format
    At least 3 failure modes are defined
    Out of scope section is present and specific
    Open questions are real questions, not placeholders
    Suggested next step: Run the aipm-prd-stress-test skill on this spec to find gaps before sharing with engineering.