Lean SDD
Build new applications through lightweight specifications followed by focused AI implementation.
Do not design or implement the entire application at once.
Modes
Interpret the first argument as one of:
shape: define the product and MVP slices without changing codestart: define the product, record initial decisions, create the first spec, and implement the first vertical sliceslice: specify and implement one new vertical slicechange: update an implemented feature by changing its spec before its codecheck: compare product documents, specs, code, and tests without making broad changes
When no mode is supplied, infer the safest mode. Prefer shape when the directory is empty and the request is exploratory. Prefer check when intent is unclear in a non-empty repository.
Use project-maintenance instead when the project is already substantially implemented and the main task is documenting or maintaining existing behavior.
Principles
- Write only enough specification to implement and verify the next slice.
- Prefer observable acceptance criteria over lengthy prose.
- Build vertical user-value slices, not isolated technical layers.
- Keep the MVP scope and non-goals explicit.
- Record durable technical choices and their reasons.
- Implement only after the relevant spec is defined.
- Prefer the smallest end-to-end implementation that provides user value.
- Avoid speculative abstraction and unused infrastructure.
- Do not add features that were not requested.
- Keep documentation, code, and tests aligned.
- Clearly distinguish confirmed requirements, assumptions, and open questions.
Commit Rule
When this skill creates or modifies repository files, commit only files changed as part of this skill execution before completing the task.
- Inspect the working tree and identify only the files changed by this skill; do not stage, modify, or commit pre-existing or unrelated changes.
- Stage those identified files explicitly by path. Never use
git add .,git add -A, or a blanket commit of the working tree. - Create a Conventional Commits-format commit message that accurately reflects the change.
- Do not create a commit for read-only modes or when this skill made no repository changes.
- Report the commit hash and message with the completion summary.
Project documents
Use these documents when relevant:
AGENTS.md: repository-specific commands and constraintsdocs/product.md: problem, users, value, MVP scope, and non-goalsdocs/roadmap.md: ordered vertical slices and their statesdocs/decisions.md: currently active technical decisionsdocs/specs/*.md: intended behavior for individual slicesdocs/adr/*.md: durable, significant, difficult-to-reverse decisions
Do not create every document automatically. Use only what the project needs.
Lightweight specification standard
A feature spec should normally contain:
- status
- purpose
- user story
- scope
- non-goals
- user flow
- acceptance criteria
- constraints
- important errors or edge cases
- data, API, and UI impact when applicable
- test approach
- assumptions or open questions
Omit irrelevant sections.
Acceptance criteria must be observable and verifiable.
Prefer:
- Given a signed-in user with no existing records
- When the user submits a valid maintenance record
- Then the record appears in the vehicle history
- And the persisted record contains the submitted date and mileage
Avoid:
- The feature should work correctly
- The UI should be user-friendly
- The system should be robust
Vertical-slice rule
Divide work by user-visible capability.
Prefer:
- User can create an account
- User can register a vehicle
- User can save a maintenance record
- User can view maintenance history
Avoid roadmap items that only describe technical layers:
- Create database
- Create API
- Create frontend
- Add state management
A slice may include UI, API, persistence, and tests when all are required to deliver the behavior.
Shape mode
- Identify the problem, target users, and desired outcome.
- Separate confirmed requirements from assumptions.
- Define the smallest useful MVP.
- Explicitly list non-goals.
- Identify the primary user journeys.
- Divide the MVP into approximately three to seven vertical slices.
- Identify dependencies and major risks.
- Produce or update
docs/product.mdanddocs/roadmap.md. - Do not modify application code.
Do not block on minor ambiguity. Use a reasonable assumption and record it.
Start mode
Understand
- Read applicable repository instructions.
- Inspect the working directory and existing files.
- Determine whether the directory is empty, partially scaffolded, or already an established application.
- If it is already substantially implemented, recommend
project-maintenancerather than silently applying a greenfield process.
Shape
Define the product problem and target user.
Define MVP scope and non-goals.
Define the main user flow.
Divide the MVP into vertical slices.
Create or update:
docs/product.mddocs/roadmap.md
Decide
- Respect user-specified technologies and constraints.
- Choose only technologies needed for the first slices.
- Prefer simple, conventional project structures.
- Record choices and short reasons in
docs/decisions.md. - Mark inferred choices as assumptions.
- Create an ADR only for a significant, durable, or difficult-to-reverse decision.
Specify
- Select the smallest first slice that proves the application can work end to end.
- Create
docs/specs/<number>-<feature>.md. - Define observable acceptance criteria.
- Include meaningful failure and boundary cases.
- Describe only the interfaces and data required for this slice.
Plan
Before changing application code, report:
- product and MVP summary
- first vertical slice
- acceptance criteria
- proposed technology choices
- documents to create or update
- files expected to change
- test strategy
- assumptions
- risks
Implement
- Scaffold the minimum viable project.
- Implement only the selected slice.
- Do not create empty modules for future features.
- Do not add generic infrastructure without a current use.
- Do not leave demo code or irrelevant placeholders.
- Keep secrets outside source control.
- Follow established repository and package-manager conventions.
- Make changes small enough to review.
Verify
Run applicable:
- focused automated tests
- lint
- formatting checks
- type checks
- build checks
- application startup or smoke checks
Do not claim a check passed unless it was executed successfully.
Map each acceptance criterion to an automated test or an explicit manual verification.
Complete
Update the slice and roadmap status only after verification.
Report:
- documents created or updated
- implementation completed
- acceptance-criterion-to-code mapping
- acceptance-criterion-to-test mapping
- commands executed and results
- assumptions made
- unresolved questions
- remaining risks
- recommended next slice
Slice mode
- Read
AGENTS.md, product documents, roadmap, decisions, relevant specs, implementation, and tests. - Confirm that the requested work belongs to the current MVP.
- Decide whether to create a new spec or update an existing one.
- Define or update acceptance criteria before editing code.
- Report the plan, affected files, risks, and tests.
- Implement the smallest complete vertical slice.
- Add or update focused tests.
- Run applicable verification.
- Update the spec and roadmap state.
- Report documentation, code, and test alignment.
Create a new spec when the capability can be independently explained, tested, released, permissioned, or removed.
Update an existing spec when extending or changing the same user capability.
Change mode
- Read the current spec and implementation.
- Identify the behavioral difference between the existing and requested states.
- Update the spec before implementation.
- Check compatibility, migration, and data implications.
- Implement the smallest necessary code change.
- Update existing tests and add regression coverage.
- Avoid unrelated refactoring.
- Report the spec, implementation, and test differences.
Check mode
Compare:
- product against roadmap
- roadmap against specs
- specs against implementation
- acceptance criteria against tests
- decisions against actual configuration and dependencies
Classify discrepancies as:
- product or roadmap stale
- spec stale
- implementation incomplete or incorrect
- tests incomplete or stale
- technical decision unrecorded
- intended behavior unclear
Recommend the smallest corrective action. Do not automatically rewrite the whole project.
ADR rule
Create an ADR only when a decision:
- is expensive to reverse
- has multiple credible alternatives
- affects security, privacy, or data integrity
- affects the architecture across multiple slices
- is likely to be questioned later
Do not create an ADR for routine implementation details.
Prohibited behavior
- Do not implement the entire MVP in one pass.
- Do not produce a comprehensive detailed design for every future feature.
- Do not implement without acceptance criteria.
- Do not add hypothetical extensibility.
- Do not introduce microservices without a current requirement.
- Do not add dependencies merely for convenience.
- Do not switch the user’s chosen stack without explaining the conflict.
- Do not perform unrelated refactoring.
- Do not hide uncertainty behind confident language.
- Do not mark a slice complete without verification.
Definition of done for a slice
A slice is complete only when:
- a current spec exists
- acceptance criteria are observable
- implementation satisfies the acceptance criteria
- each acceptance criterion has a test or explicit manual check
- applicable verification has passed
- documentation matches implementation
- assumptions and remaining risks are recorded
References
Use:
references/product-template.mdreferences/spec-template.mdreferences/decision-template.mdreferences/workflow.md