recursive-spec
recursive-spec
Use this skill to co-author a repo-aware 00-requirements.md for a new recursive-mode run.
This skill is for requirements/spec authoring before implementation starts. It does not replace /.recursive/RECURSIVE.md, and it should not skip ahead to Phase 2 planning or Phase 3 implementation.
Primary Use Case
Use recursive-spec when the user wants help shaping work before a run exists, especially with prompts like:
create a planhelp me plancreate a specwrite requirementsspec this outscope this
The important signal is plan/spec language for a new run, not implementation of an existing run.
Conversation Contract
When the trigger is detected:
- First ask whether the user wants help creating a spec for a recursive run.
- If the user replies positively, ask:
What do you want to do? - Then gather context, read the repo, and co-author the requirements.
Do not jump straight into writing 00-requirements.md before the user confirms they want spec help.
Draft Handling Before Approval
Until the user explicitly approves the spec:
- keep the draft outside the repository worktree
- prefer a temporary session artifact or scratch file
- do not create
/.recursive/run/<run-id>/ - do not write
00-requirements.md
If the user rejects the draft, revise it or discard the temporary draft artifact. Do not leave behind a half-approved run folder.
Required Read Behavior
Before drafting requirements, read:
/.recursive/STATE.md/.recursive/DECISIONS.md/.recursive/memory/MEMORY.md- relevant memory shards only when they actually matter
- the most relevant code and tests for the requested area
The skill should be repo-aware, not a blind questionnaire. Use the control-plane docs to understand current truth and the codebase to understand actual surfaces, coupled modules, existing tests, and likely boundaries.
Authoring Flow
Use a guided interview. Ask one focused question at a time when the answer is not already grounded by repo docs or code.
Recommended sequence:
- Goal and user outcome
- Task type: feature, bugfix, refactor, migration, investigation
- Affected subsystem or files
- In-scope requirements (
R#) - Observable acceptance criteria for each requirement
- Edge cases, failure paths, and exclusions
- Constraints, fixed decisions, and boundaries
- Open unknowns that must be resolved before Phase 0 is locked
Prefer proposing draft wording and asking the user to confirm or correct it rather than asking the user to author the whole document from scratch.
Quality Rules
Borrow the strongest authoring ideas from contract-first workflows, but keep the output native to recursive-mode:
- start with user intent and desired outcome
- separate fixed decisions from open questions
- define deterministic, observable acceptance criteria
- include exception and failure-path thinking instead of only the happy path
- make boundaries concrete enough to guide later AS-IS analysis and planning
- keep out-of-scope items explicit
Do not introduce a separate .spec DSL or a second workflow format.
Output Contract
The finished output should become:
/.recursive/run/<run-id>/00-requirements.md
Use the repository's native Phase 0 requirements structure:
- keep the scaffolded header from
recursive-init, including Workflow version:recursive-mode-audit-v2 - keep the required
## TODOsection and replace placeholder checklist items rather than deleting the heading ## Requirements## Out of Scope## Constraints
Within ## Requirements, each R# should include:
- a short title
- a clear description
- observable acceptance criteria bullets
Run Creation Rule
Do not create the run folder immediately.
- Draft and refine the requirements with the user first.
- Keep the draft in a temporary non-repo artifact until approval.
- Confirm the user approves the spec and that it is complete enough to proceed.
- Create the run with
scripts/recursive-init.pyorscripts/recursive-init.ps1. - Replace the scaffolded
00-requirements.mdwith the approved requirements content.
This keeps the run artifact grounded in user-approved requirements instead of half-formed notes.
Routing Awareness
If spec authoring uses delegated critique, delegated review, or any other external model help to shape the draft, re-read:
/.recursive/config/recursive-router.json/.recursive/config/recursive-router-discovered.json
immediately before choosing that CLI/model, and route through recursive-router instead of inventing an ad hoc model choice.
Boundaries
- Stay focused on
00-requirements.mdauthoring for a new run. - Do not silently convert this into Phase 2 planning.
- Do not start implementation just because the requirements became clear.
- Do not skip code reading when repository structure matters to scope or constraints.
- Do not create a run until the user-approved spec is ready to write.
- Do not write repository requirements artifacts from an unapproved draft.
References
/.recursive/RECURSIVE.md/.recursive/STATE.md/.recursive/DECISIONS.md/.recursive/memory/MEMORY.md../../references/artifact-template.md./references/patterns.md
More from try-works/recursive-mode
recursive-mode
Repository workflow orchestration skill for staged implementation, locked artifacts, late-phase receipts, and durable memory maintenance. Use when executing recursive-mode runs, resuming a run, locking a phase, or verifying locks.
62recursive-tdd
Use when implementing any code in recursive-mode Phase 3. Enforces strict RED-GREEN-REFACTOR discipline with The Iron Law - no production code without a failing test first. Trigger phrases: "implement this", "add feature", "fix bug", "write a failing test", "TDD".
36recursive-subagent
Use when recursive-mode work may benefit from delegated audit, review, or bounded implementation support. This skill prioritizes analyst, planner, code-reviewer, memory-auditor, tester, and implementer roles, with mandatory self-audit fallback when subagents are unavailable.
35recursive-worktree
Use when starting any recursive-mode requirement to set up an isolated git worktree. Required before implementation phases: create an isolated workspace, verify a clean baseline, and keep main/master clean.
35recursive-review-bundle
Use when recursive-mode work needs a canonical delegated-review or audit handoff. Generates reproducible review bundles for Phase 3.5 code review, test review, or other delegated checks using the repo review-bundle scripts.
35recursive-debugging
Use when a recursive-mode requirement involves debugging a bug, test failure, or unexpected behavior. Insert Phase 1.5 between Phase 1 and Phase 2 to perform systematic root cause analysis before attempting any fixes. Trigger phrases: "debug", "investigate", "failing tests", "crash", "root cause".
35