to-spec
Turn a settled design into a written spec, saved in the state directory or the repo's tracker. Use after grilling, when the user asks for a spec or requirements doc, or before slicing work into tickets.
- License 许可
- MIT
- 最近更新
- 2026-11-04
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- to-spec
- metadata
- { "layer": "L3", "source": "mattpocock/skills@49dd158:skills/engineering/to-spec/SKILL.md", "license": "MIT" }
- description
- Turn a settled design into a written spec, saved in the state directory or the repo's tracker. Use after grilling, when the user asks for a spec or requirements doc, or before slicing work into tickets.
03 SKILL.md 正文
To spec
Synthesize what has already been decided into a spec. Don't interview the user. If a decision the spec needs is still open, stop and run grilling on that branch only.
Process
- Read the area. The conversation, the code the change touches,
$(ven-profile path)/GLOSSARY.mdand the ADRs in$(ven-profile path)/adr/. When$(ven-profile path)/roadmaps/holds a roadmap for this effort (list it and match the destination, or use the one the user names), read the roadmap and its closed decision tickets; their decisions count as settled. In tracker mode, follow the pointer file. Use glossary terms throughout; respect the ADRs. - Sketch the test seams. Prefer seams that already exist, as high as possible, and as few as possible; one is ideal. Name the public interface each seam sits on (apply deep-modules for the vocabulary). Confirm the seams with the user before writing.
- Map proof. Name the change types the feature touches and the key that proves each:
ven-profile get verify. A change type with no key goes under Further notes as an open proof gap. - Write the spec with the template below. Pick a short kebab-case
<slug>from the title; tickets reuse it. - Publish. Read
ven-profile get repo.tracker.repo.tracker.howisnoneor missing: write$(ven-profile path)/specs/<slug>.md.- A tracker is configured: show the user the spec and ask before creating anything there. On yes, publish it following
repo.tracker.how, then write$(ven-profile path)/specs/<slug>.mdcontaining only the tracker reference, so later steps find it.
- Record:
ven-decisions add --step to-spec --decision "spec written" --evidence "<path or tracker reference>".
Template
# <Title>
## Problem
The problem from the user's point of view.
## Solution
The solution from the user's point of view.
## User stories
1. As a <actor>, I want <capability>, so that <benefit>.
(A long, numbered list that covers every aspect of the feature, edge cases included.)
## Implementation decisions
- Modules built or changed, and the interfaces that change.
- Data shape changes, contracts between modules, notable interactions.
- Architectural choices and the reason for each.
## Testing decisions
- The seams, and what each one catches.
- Which modules get tests; prior tests in the repo to follow.
- A good test checks external behavior only.
## Proof
- <change type>: `ven-profile verify <command key>`; read-back: <what verify.md says to check>.
## Out of scope
What this spec deliberately leaves out.
## Further notes
Open proof gaps, risks, anything else a reader needs.
Rules
- No file paths or code in the spec; they go stale. The exception is a snippet from a prototype that pins a decision more precisely than prose (a state machine, a data shape). Inline only the decision-rich part and say it came from a prototype.
- Example stories use neutral nouns: "As a report owner, I want to schedule a report, so that it arrives without a manual step."
- The spec states decisions; it doesn't make new ones. Anything you had to decide while writing goes back to the user.
04 同仓库更多 Skills
yeet
Take every local change green through the repo's own checks, slice it into conventional commits, push, and with --pr open a pull request on the code host. Use only when the user explicitly asks to yeet, or to commit and push everything; never on your own initiative.
write-docs
Write or update documentation from the code: gather facts, pick the shape for the reader, write it plain, and prove every command and path in it. Use when asked to document a repo, module or feature, or to bring stale docs up to date.
why
Find why code is shaped the way it is (design rationale, trade-offs, regressions, odd thresholds) from history, tickets, docs and chat, citing every claim and stating its confidence. Use for 'why does X work this way', 'why did we pick Y', or before changing code whose purpose is unclear.
verify
Prove a change works with the check that matches its type, do the read-back, and log the pass against the exact tree. Use when a change is ready to call done, before review, commit or stopping, and whenever ven-decisions end refuses an unverified tree.
unslop
Cut AI writing tells (filler, model vocabulary, metaphor nouns, hedging, formatting tics) from text while keeping every fact. Use when editing or checking any prose before it ships: docs, PR bodies, reports, skill text.
type-discipline
Apply when designing types or data shapes, reviewing a signature, or handling outside data, in any language. Make wrong states fail early: in the compiler for typed languages, in validated runtime contracts for untyped ones.