2026-10-13 16:45:12 +08:00
|
|
|
---
|
|
|
|
|
name: spec
|
|
|
|
|
description: >
|
2026-10-30 12:40:16 +08:00
|
|
|
Create, distill, or amend SPEC.md when explicitly requested or when continuing an already-selected spec workflow.
|
|
|
|
|
scope: global
|
2026-10-13 16:45:12 +08:00
|
|
|
---
|
|
|
|
|
|
2026-10-30 12:40:16 +08:00
|
|
|
# Specification
|
2026-10-13 16:45:12 +08:00
|
|
|
|
2026-10-30 12:40:16 +08:00
|
|
|
Use a repository's specification convention first, otherwise
|
|
|
|
|
[the canonical format](references/format.md). Keep statements concise and precise;
|
|
|
|
|
[caveman](../caveman/SKILL.md) is an optional compact notation, not a requirement.
|
2026-10-13 16:45:12 +08:00
|
|
|
|
2026-10-30 12:40:16 +08:00
|
|
|
1. Infer the requested operation from the conversation and project state. Ask only
|
|
|
|
|
if several materially different operations remain plausible.
|
|
|
|
|
2. For a new spec, record the goal, constraints, external interfaces, testable
|
|
|
|
|
invariants, and tasks. Include sourced research only when it was actually done.
|
|
|
|
|
3. For a distillation, derive behavior from code and tests. Mark inferred intent
|
|
|
|
|
and uncertainties; do not turn every TODO into an authorized implementation task.
|
|
|
|
|
4. For amendments, edit the relevant sections and preserve unrelated content and
|
|
|
|
|
stable IDs. Show the resulting diff; no extra approval step for an authorized edit.
|
|
|
|
|
5. Check section shape and references. Report the result; suggest another workflow
|
|
|
|
|
only when it helps the user's next requested action.
|
2026-10-13 16:45:12 +08:00
|
|
|
|
2026-10-30 12:40:16 +08:00
|
|
|
Ownership: `spec` owns goals, constraints, interfaces, research, task definitions,
|
|
|
|
|
and general invariants. `build` may update task statuses; `backprop` may append bug
|
|
|
|
|
records and amend bug-related invariants. Neither requires invoking `spec` merely
|
|
|
|
|
to write its own section. Saving a spec does not start implementation without user
|
|
|
|
|
intent. Follow [shared workflow](../../protocols/workflow.md).
|