microsoft/spec-driven
Use when the user invokes spec-driven with an approved design path, asks to update SPEC.md files from a confirmed design, or wants Python SDD implementation run from confirmed specs.
npx skills add https://github.com/microsoft/FSQ --skill spec-driven
Translate approved design intent into root/module SPEC.md files, get confirmation, then carry the work through implementation, verification, synchronization, and audit. This is the main execution skill after requirements-to-design.
SPEC.md files are the source of truth for implementation and must describe current project or module facts.
SPEC.md owns current repository-wide architecture, module navigation, dependency diagrams, global development rules, and the SDD contract needed to run the project workflow.SPEC.md files own current module contracts, public interfaces, internal structure, dependencies, error handling, architecture level, and current invariants.CLAUDE.md and AGENTS.md are thin agent entry points only. They point agents to root SPEC.md; they are not specifications.Implementation must not start until relevant SPEC.md changes are reviewed and confirmed.
Before writing or updating any SPEC.md, apply this filter:
target, planned, future, after this change, this SPEC cycle, first batch, transitional, removed, previously, and during migration unless the sentence is documenting a current compatibility fact or current rejection behavior.Do not stop after updating SPEC.md. Once the user confirms the SPEC changes, continue in the same turn whenever feasible:
approved design document
-> update root/module SPEC.md
-> user confirms SPEC.md changes
-> implement against confirmed SPEC.md
-> run verification
-> run SPEC/code synchronization check
-> run spec-implementation-audit
-> fix blocking gaps or ask for decision
-> final report
If the user invokes this with a task instead of a design path, identify whether an approved design already exists. If not and the change is non-trivial, stop and tell the user to invoke requirements-to-design first.
When a confirmed design document exists, read it before editing specs:
docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
The design document is input to SPEC updates, not implementation authority. Once SPEC.md is confirmed, code must be implemented against SPEC.md.
When translating a design document into SPEC updates, copy only the resulting current contract. Do not copy the design process, rejected options, implementation sequence, temporary target state, or historical narrative into SPEC.
For Python projects or Python modules, apply the sibling python-architecture rules layer before:
SPEC.md files.When this bundle is installed under .github/skills/, the references are expected at:
.github/skills/python-architecture/SKILL.md
.github/skills/python-architecture/references/architecture-levels.md
.github/skills/python-architecture/references/module-spec-template.md
.github/skills/python-architecture/references/implementation-rules.md
.github/skills/python-architecture/references/audit-checklist.md
Load only the reference needed for the current phase:
architecture-levels.md and module-spec-template.md.implementation-rules.md.audit-checklist.md.If the sibling files are unavailable, apply the local Python rules below and continue.
__init__.py._name.py, and must not be imported across module boundaries.SPEC.md and relevant module SPEC.md files.SPEC.md files.SPEC.md module table and architecture diagram.SPEC.md and current module specs for every touched module.Bug fixes that do not change public interfaces or intended behavior may skip design-doc creation. Still read relevant specs, fix code, verify specs remain accurate, and update specs only if the bug reveals inaccurate or incomplete specification.
Every module has exactly one SPEC.md. Use this structure unless root SPEC.md defines a compatible local convention:
# Module: {name}
## Purpose
## Dependencies
## Public Interface
## Internal Structure
## Python Architecture (for Python modules)
## Error Handling (if applicable)
## Verification Scope (optional; current externally visible verification obligations only)
## Current Invariants (optional; present-tense constraints that keep implementation aligned)
Root SPEC.md should contain repository-wide sections such as:
# {project} Project Specification
## SPEC Ownership And SDD Contract
## Module Table
## Architecture Diagram
## Development Rules
## Python Architecture Rules (for Python repositories)
Do not add Testing Contract or Design Decisions as default sections for new module specs. Existing sections with those names should be narrowed during touched updates: test matrices move to tests/docs, while decision rationale becomes current invariants only when it still constrains code.
After SPEC confirmation:
After implementation, verify relevant specs still match code:
SPEC.md module table matches actual modules.SPEC.md architecture diagram matches actual project dependencies.SPEC.md Public Interface matches exported public symbols.SPEC.md Dependencies match actual imports from other project modules.SPEC.md Internal Structure lists actual module files.SPEC.md.If anything is out of sync, fix the spec or code before completion.
Before claiming completion, run the sibling spec-implementation-audit procedure or apply it directly. If available, read:
.github/skills/spec-implementation-audit/SKILL.md
Audit against:
root SPEC.md + relevant module SPEC.md files + actual diff
Tests, lint, and summaries are supporting evidence only. They do not replace diff-based SPEC audit.
If blocking gaps exist:
End with:
Take microsoft/spec-driven from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.