agentleFS
zpower426zpower426/pmpowers/skills/spec-driven-design/SKILL.md

spec-driven-design

Skill0 starsChanged 7 months agoMITView on GitHub

Write Product Specifications (Specs) that are highly logically rigorous, testable, and business-relevant.

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a feature involves multiple subsystems, define the interaction protocols in an overall Spec first, then detail internal logic in …

    line 27
  2. Distinctive:

    Every Acceptance Criterion should be directly translatable into a test case.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spec-Driven Design: Advanced Product Logic Definition Guide

Documentation is the product logic contract. It is not a description of features, but a rigorous definition of the system's behavioral boundaries.

Checklist

  1. Context, Metrics & Evidence — Clearly link to Opportunity Map nodes, research evidence sources, and the North Star Metric this Spec is expected to impact.
  2. User Stories & Value — Use the standard format: "As a [Role], I want to [Do Something], so that [Value is Gained]."
  3. Acceptance Criteria (AC) — Every User Story must have clear, verifiable "Done" criteria; strictly forbid vague language.
  4. Functional Logic & State Machines — Describe core business processes. For complex interactions, use State Transition Diagrams or Sequence Diagrams.
  5. Exception & Edge Case Handling — Exhaustively define behavior logic for non-happy paths (e.g., network interruption, illegal input, missing permissions).
  6. Logic Self-Review & Provenance — Reference validation-guard for consistency scans.

Core Mandates: Clarity and Rigor

1. Eliminate Ambiguity

  • Anti-Pattern: "The system should be responsive" or "Provide a smooth experience." (❌)
  • Best Practice: "The system must respond to requests within 200ms" or "When the user clicks A, the system must display B on the current page and disable button C." (✅)

2. Modular Definition

  • A Spec should describe a logically complete unit.
  • If a feature involves multiple subsystems, define the interaction protocols in an overall Spec first, then detail internal logic in sub-Specs.

3. Testability

  • Every Acceptance Criterion should be directly translatable into a test case. If it cannot be tested, the definition is not clear.

Specification Document Structure Template

# Spec: [Feature Name]
- **Date**: YYYY-MM-DD
- **Related Metric**: [Metric Name]
- **Evidence Source**: [Link to Discovery/Experiment]

## 1. Goal & Scope
[Briefly describe what problem is being solved]

## 2. User Stories & Acceptance Criteria (AC)
### [Story 1]
- **As a** ... **I want to** ... **So that** ...
- **AC 1**: ...
- **AC 2**: ...

## 3. Business Logic
[Flowcharts, state machines, detailed rules]

## 4. Edge Cases
[List possible exceptions and their handling methods]

Delivery Standards

Save to docs/pmpowers/specs/YYYY-MM-DD-<feature-name>.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.