- Add grill: calibrated plan stress-testing before speccing - Add spec: sole mutator of SPEC.md with format specification - Add caveman: token-compression dialect for invariants and tasks - Add review: adversarial pre-implementation refutation of spec - Add build: single-threaded plan-to-execute loop with external oracles - Add check: read-only drift detector comparing code vs invariants - Add backprop: bug-to-spec feedback loop binding regression tests - Add deepen: complexity reduction and interface shrinking pass - Format all skills to 5-phase Skill Architect anatomy with System One balance - Synchronize symlinks across OpenCode, Codex, and Claude Code
3.7 KiB
3.7 KiB
name, description, concerns
| name | description | concerns | |
|---|---|---|---|
| spec | Sole mutator of SPEC.md at project root. Creates new specs, distills specs from existing code, amends sections (§G, §C, §I, §R, §V, §T, §B), and records bugs via backprop in Caveman dialect. Use when asked to "write spec", "new spec", "amend spec", "distill spec", or "spec this". |
|
Spec — SPEC.md Mutator
The sole mutator of SPEC.md. Other skills produce material (grill → §G/§C, research → §R, review → §V, deepen → §I/§T); spec writes it. All sections follow Caveman encoding.
Phase 0: Setup and Protocols
- Review specification format:
- Check repo root for
FORMAT.md, or consult references/format.md. - Apply caveman encoding rules across all section writes.
- Check repo root for
- Section Invariants:
- §G (Goal): 1 line, Caveman dialect.
- §C (Constraints): Tech stack, out-of-scope declarations.
- §I (Interfaces): External membranes (api, cmd, env).
- §R (Research): External sourced findings (optional).
- §V (Invariants): Monotonically numbered
V1,V2, ... - §T (Tasks): Pipe table (
id|status|task|cites), status.,~,x. - §B (Bug Log): Pipe table (
id|date|cause|fix).
Phase 1: Ingest and Check
Inspect project state and user intent to dispatch the mode:
- No
SPEC.mdexists AND idea provided → NEW - No
SPEC.mdexists ANDfrom-coderequested → DISTILL SPEC.mdexists AND request starts withbug:→ BACKPROPSPEC.mdexists AND request starts withamend→ AMENDSPEC.mdexists with no args → Prompt user for desired mode.
Phase 2: Processing (Core Logic)
Mode 1: NEW (Idea → Spec)
- Extract single-line goal → §G.
- List user stated and implied constraints → §C.
- List external boundaries and surfaces → §I.
- Include §R only if external research ran; otherwise omit.
- Propose initial testable invariants → §V (
V1,V2, ...). - Break goal into ordered sequential tasks → §T pipe table with status
.. - Initialize empty §B table header (
id|date|cause|fix).
Mode 2: DISTILL (Codebase → Spec)
- Walk repository: infer §G from README/entrypoint, §C from stack/lockfiles.
- Enumerate exported APIs, CLI commands, and env vars → §I.
- Derive behavioral invariants from existing tests → §V.
- Create tasks for known TODOs or untested edge cases → §T.
- Flag uncertainties with
?for user confirmation.
Mode 3: BACKPROP (Bug → §B + §V)
- Parse bug description and identify root cause in code.
- Formulate a testable invariant preventing recurrence → draft
V<next>. - Append row to §B table:
B<next>|<date>|<cause>|V<N>. - Append new invariant to §V.
- Update or add tasks in §T if behavior changes.
Mode 4: AMEND (Targeted Edit)
- Read the specified section (§G, §C, §I, §V, §T, or §B).
- Show current content and propose the exact modification.
- Never rewrite sections the user did not specify.
Phase 3: The System One Balance Pass
- Augment, Don't Handcuff:
- Show a clear diff before applying changes.
- Do NOT trigger automatic build loops upon saving; require explicit user intent to proceed to
/build. - Avoid ceremony for minor amendments: apply targeted updates swiftly.
Phase 4: Output Execution & Verification
- Write or update
SPEC.mdat project root. - Verify:
- Section identifiers (§G, §C, §I, §V, §T, §B) match canonical format.
- Numbering in §V and §B is monotonic with no reused IDs.
- All §T rows cite their respective dependencies in the
citescolumn.
- Present the diff/file and suggest next action:
/reviewfor high-blast-radius specs, or/buildfor execution.