Help us improve
Share bugs, ideas, or general feedback.
From aidoc-flow
Creates a Technical Specification (SPEC) at Layer 6 of the SDD flow — defines component interfaces, data models, and behavior contracts. Use when ADR decisions are settled and you need an implementation-ready spec before TDD.
npx claudepluginhub vladm3105/aidoc-flow-framework --plugin aidoc-flowHow this skill is triggered — by the user, by Claude, or both
Slash command
/aidoc-flow:doc-specThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a **Technical Specification (SPEC)** — Layer 6 of the SDD flow. A SPEC is
Generates SPEC documents end-to-end from BDD/ADR, prompts, or IPLANs. Detects input type, generates component spec, validates, and runs audit/fix cycle. Supports batch creation.
Creates, reviews, and manages specification documents for Spec-Driven Development. Supports the full spec lifecycle: discuss, create, review, approve, implement, verify, archive.
Writes technical specifications for post-decision implementation details including API contracts, database schemas, system architecture, and developer guides.
Share bugs, ideas, or general feedback.
Create a Technical Specification (SPEC) — Layer 6 of the SDD flow. A SPEC is the implementation-ready, C4-L3 (Component) contract for a single software component: its interfaces, data models, and behavior — written before any downstream test or code.
Layer: 6 — the unified specification. A SPEC subsumes what older revisions split into component/data/ux/risk/process specs; there is now one SPEC artifact per component. Upstream: BRD → PRD → EARS → BDD → ADR (ADR is the primary source). Downstream: TDD → IPLAN → Code.
Use doc-spec when:
For end-to-end generation from BDD/ADR, a prompt, or an IPLAN, use
../doc-spec-autopilot/SKILL.md.
SPEC sits at Layer 6, so verify the upstream chain exists before writing.
Reference only documents that already exist; never invent placeholders like
SPEC-XXX or ADR-XXX. Before writing, read:
framework/layers/06_SPEC/SPEC-TEMPLATE.yamlframework/layers/06_SPEC/README.mdframework/governance/ID_NAMING_STANDARDS.mdConfirm existing upstream artifacts and no ID collision:
ls docs/05_ADR/ docs/06_SPEC/ 2>/dev/null.
SPEC is the Component level. Describe component interfaces and contracts, not architecture decisions (ADR) or source code (Code).
| Stay here (PASS) | Out of scope (FAIL) |
|---|---|
AuthService, UserRepository, NotificationQueue | auth_service.py, async def validate_token() |
| interface signatures, typed data models | concrete SQL tables, Redis key formats |
| behavior rules, state transitions, error contracts | Kubernetes pod configs, deployment manifests |
Required diagram tags: @diagram: c4-l3, @diagram: dfd-l3 (use
../charts-flow/SKILL.md). Sequence diagrams must include alt/else for error
paths; never embed C4-L4 code/class diagrams.
document_control comes first (status, version, date, author, component,
tdd_ready_score). Then:
@adr decision,
language, dependencies) · 3. Interfaces (exports: signatures, types, errors) ·@ears/@bdd) ·@tdd: TDD-NN, test-file map) · 8. Traceability.See SPEC-TEMPLATE.yaml for per-section content. Format is YAML.
SPEC-NN
(two digits, no extra leading zero: SPEC-01, SPEC-99, SPEC-102).
Downstream artifacts tag it @spec: SPEC-12. There is no dotted
SPEC.NN.SS.xxxx element form for SPEC itself.@brd: BRD.NN.SS.xxxx, @prd: PRD.NN.SS.xxxx,
@ears: EARS.NN.SS.xxxx, @bdd: BDD.NN.SS.xxxx; document-level @adr: ADR-NN.@threshold: registry references.STEP-XXX, IF-XXX, INT-XXX, DM-XXX,
MODEL-XXX, VR-XXX, 3-digit SPEC-NNN, numeric element-type-code tables,
and the deleted SYS/REQ/CTR upstream layers.SPEC-NN under docs/06_SPEC/.docs/06_SPEC/SPEC-NN_{slug}/SPEC-NN_{slug}.yaml, regardless of size. Never
place a SPEC file directly in docs/06_SPEC/.@ears/@bdd.@brd @prd @ears @bdd @adr) and the
downstream @tdd: TDD-NN contract.docs/06_SPEC/SPEC-00_index.md in the same change.The framework ships no runtime code — this skill is the validator. Apply the
checklist against framework/layers/06_SPEC/README.md and
framework/governance/ID_NAMING_STANDARDS.md.
SPEC-NN; no dotted SPEC element IDs; no removed
patterns.@brd @prd @ears @bdd @adr); downstream
@tdd: TDD-NN contract present.@threshold: references (no magic numbers).@diagram: c4-l3 and @diagram: dfd-l3 present (use
../charts-flow/SKILL.md).| Code | Meaning | Severity |
|---|---|---|
| XDOC-006 | Tag format invalid | error |
| XDOC-007 | Gap in cumulative tag chain | error |
| XDOC-008 | Broken internal link | error |
| XDOC-009 | Missing traceability section | error |
Quality gate (blocking): TDD-Ready score ≥ 90/100 before moving on. If issues are found, fix and re-check; if unfixable, log for manual review.
../doc-tdd/SKILL.md — the TDD references this SPEC (@spec: SPEC-NN), inherits
the cumulative tags (@brd through @spec), and defines test cases, inputs,
expected outputs, and thresholds for the SPEC contracts.
Before applying defaults, read the project adaptation profile
(.aidoc/profile.yaml). Honor only this skill's declared knobs:
section_toggles (include or omit template-declared optional sections)
and glossary (substitute preferred terms in generated prose). Ignore any
unknown or out-of-surface key; absent a profile, use framework defaults.
Authority: framework/governance/ADAPTATION.md.
framework/layers/06_SPEC/SPEC-TEMPLATE.yamlframework/layers/06_SPEC/README.mdframework/layers/06_SPEC/SPEC-00_index.TEMPLATE.mdframework/governance/ID_NAMING_STANDARDS.md../doc-adr/SKILL.md · Downstream tests: ../doc-tdd/SKILL.md../doc-spec-audit/SKILL.md · Fixes: ../doc-spec-fixer/SKILL.md../doc-spec-autopilot/SKILL.md| Purpose | Specify a component: interfaces, data models, behavior |
| Layer | 6 (C4-L3 Component) |
| Upstream tags | @brd @prd @ears @bdd @adr |
| Document ID | Dash form SPEC-NN (document-level; no dotted element IDs) |
| Must include | Document Control (first), 8 sections, @threshold for numbers |
| Format | YAML |
| Next | doc-tdd |