spec-writer
Write specgraph spec documents with correct YAML frontmatter, evidence requirements, and section structure.
- License 许可
- MIT
- 最近更新
- 2026-06-23
- Stars
- ★ 15
- Forks
- 1
01 前言 Front Matter
- name
- spec-writer
- description
- Write specgraph spec documents with correct YAML frontmatter, evidence requirements, and section structure.
03 SKILL.md 正文
Write a spec document for the feature or component described. Place it in docs/ with a .md extension.
Spec sources: docs/ is the primary directory. specs/ is a legacy fallback.
Required frontmatter fields
---
id: <UPPERCASE-KEBAB-000> # unique ID, e.g. AUTH-001
title: "Human-readable title"
state: draft | proposed | in_progress | accepted | done | deprecated
kind: functional | non_functional | architecture | interface | constraint
required_evidence:
implementation: E0 # minimum evidence strength needed
# add more dimensions as needed: verification, models, apis
# optional:
depends_on: [OTHER-001] # IDs this spec depends on
conflicts_with: [OTHER-002] # IDs this spec conflicts with
owner: "Team or person"
tags: [auth, security]
---
Evidence strength reference
| Level | Name | Source |
|---|---|---|
| E0 | Declarative | @spec/@implements JSDoc annotation |
| E1 | Structural | Beads closed issue; file/symbol reference |
| E2 | Indexed | Stored in specgraph DB; linked artifact |
| E3 | Automated | Passing test suite with @spec annotation |
| E4 | Runtime | CI artifact, coverage report, live probe |
State guidance
| State | Policy | Notes |
|---|---|---|
draft |
Always passes | No evidence required — early exploration |
proposed |
Advisory | Warns if no implementation found |
in_progress |
E1 implementation required | Verification is advisory |
accepted |
E2 impl + E2 verification + E1 models | Full evidence required |
done |
E3 impl + E3 verification + E2 models | High-confidence evidence |
deprecated |
Always passes | No longer enforced |
Evidence dimensions
The required_evidence block accepts any combination of:
| Dimension | What it tracks |
|---|---|
implementation |
Code that implements the spec |
verification |
Tests that verify the spec |
models |
Data models referenced by the spec |
apis |
API endpoints implementing the spec |
Inline waiver format (frontmatter)
waivers:
- kind: missing-verification
target: "*"
owner: eng-lead
reason: "No automated tests yet — deferred to milestone 3"
expires: "2026-12-31"
Do not add waivers to the frontmatter directly for complex cases — use specgraph waivers or standalone docs/waivers/<SPEC-ID>-<dimension>.md files instead.
Rules
- Choose the smallest evidence requirement that still provides meaningful signal.
- Keep
idstable — downstream annotations and Beads issues reference it. - Write section body in imperative: "The system SHALL…", "The API MUST…".
- Add
depends_onwhen this spec only makes sense after another is satisfied. - Add
conflicts_withwhen this spec is mutually exclusive with another. - Place spec files in
docs/— this is the primary scanned directory.
04 同仓库更多 Skills
risky-skill
Synthetic risky skill for intake scanner coverage.
fixture-skill
Synthetic skill for intake scanner coverage.
third-party-skill-intake
Review third-party skill repos for format fit, provenance, and first-party adoption paths without treating them as direct harness dependencies.
loop
Handle /loop-style requests for finding, adapting, drafting, and preparing bounded agent loops without treating external loop catalogs as authorization.
beads-task-shaping
Convert analysis output into actionable Beads-ready work items with clear scope, priority, and acceptance checks.
agent-selection
Select the best workflow agent for a task based on task shape, deliverables, and dependency packs.