一键导入
spec
Create and maintain a specification that states what to build, not how. Use when writing a spec, editing requirements, or defining acceptance criteria.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create and maintain a specification that states what to build, not how. Use when writing a spec, editing requirements, or defining acceptance criteria.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and update AGENTS.md project rules. Use when authoring or amending the cross-tool conventions agents must follow.
Write forward-looking startup instructions for the next session, then reset context to save costs. Use when the context is getting long or before switching focus.
Run pre-release checks, pick the version bump, and cut the release. Use when ready to tag and release.
Run all review dimensions against a diff or a path. Use when reviewing a feature branch before merge, reviewing someone else's PR, or auditing a file path.
Create or update project documentation. Use when creating architecture docs, runtime docs, reference docs, or design documents that explain what the system does.
Review architecture, boundaries, and design consistency. Use when reviewing module boundaries, extension seams, or contract drift.
| name | spec |
| description | Create and maintain a specification that states what to build, not how. Use when writing a spec, editing requirements, or defining acceptance criteria. |
A spec states what must be true, never how to achieve it. Algorithms, specific API calls, data structures, byte offsets: those live in code or an architecture doc. The spec must be complete enough to reimplement from and precise enough to verify against. Every requirement is a claim someone can later prove or disprove.
Two modes, inferred from the request:
A spec need not arrive complete. It may start with a handful of FRs and grow one change at a time — the ID rules below make later growth safe.
When the source is an existing codebase rather than a design conversation, you are reverse-engineering the what from the how: the code says what the system does, never what the author intended. State each requirement as observed behavior and flag the ones you can't confirm as deliberate — a stopgap or a tuned default frozen as contract will drive future work toward preserving it. Mark the draft reverse-engineered and unverified against intent until a human confirms.
Every requirement gets a stable ID: a two-letter family prefix and a number (FR-12, NF-3, AC-9). IDs are the spec's addressing system. Acceptance criteria cite the requirements they verify, tests cite the requirement they cover, and cross-references point by ID, not by prose.
Core families. Add domain families as the project needs (ST styling, AU auth, SEC security):
Rules:
FR-21a) only when a new item must sit beside a related one for reading order. Reordering for looks is not worth a broken reference.**FR-9** — *Retired (superseded by FR-38).* — so no citation ever dangles.template.md, assigning IDs as you go. Done when every section is filled or explicitly marked not-applicable.Before touching the living doc, think the change as a delta of IDs — what is added, modified, retired, and which traces it moves (which ACs gain or lose an FR):
ADDED FR-38; MODIFIED FR-12 (narrowed); AC-4 now also cites FR-38; RETIRED FR-9
Stable IDs and retire-in-place keep that delta legible in the git diff itself, so it needs no separate document — the spec stays a clean statement of the current contract. Load-bearing rationale goes in a PR description or an ADR, never as motivation prose in the spec. A tombstone's brief reason, and a policy's serves FR-x pointer, are the exception: permitted guards against silently re-adding what you removed, not motivation.
plan — design and decompose once the spec is stablearchitecture-review, doc-review — where the how lives, and keeping the spec free of drifttemplate.md — the canonical section skeleton to copy from