writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Use when you have a spec or requirements for a multi-step task, before touching code
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Use when the user says "ask grok", "get grok's take", "grok review", "have grok look at this", "delegate to grok", or any variation naming Grok/xAI as the perspective they want.
Use when starting any creative work - creating a feature, building a component, adding functionality, or changing designed behavior - before writing code or invoking any implementation skill. Small defect repairs and tweaks triage through razorback:fixing-small-issues first.
Use when a design question resists discussion — a state model with more edge cases than fit in your head, a UI the user keeps flip-flopping on because nobody can picture it, or behavior only knowable by running it — before writing a design doc or implementation plan for that question.
Use when the user says "ask claude", "fresh claude review", "second opinion from another claude", "have another claude look at this", "delegate to a fresh claude", or any variation naming Claude as the second perspective they want.
Use when the user says "ask codex", "get codex's take", "codex review", "have codex look at this", "delegate to codex", or any variation naming Codex/OpenAI as the perspective they want. Also use for a generic "second opinion from a different model" when no other model is named.
Use when planning or reviewing non-trivial code changes, refactoring architecture, evaluating module boundaries, repeated findings reveal coupling, tests are hard to write because interfaces are unclear, or the user asks for codebase design improvements, complexity reduction, deduplication, or cleanup of existing code.
Basado en la clasificación ocupacional SOC
| name | writing-plans |
| description | Use when you have a spec or requirements for a multi-step task, before touching code |
Write implementation plans scaled to the situation. The right level of detail depends on who's executing and when.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Context: This should be run in a dedicated worktree — razorback:brainstorming sets one up (via razorback:using-git-worktrees) after spec approval. If you are not in one, run razorback:using-git-worktrees before writing the plan.
Save plans to: docs/plans/YYYY-MM-DD-<feature-name>.md
Once the plan is approved, razorback runs to completion; it stops only for real blockers (see ../using-razorback/references/blocker-taxonomy.md (in the razorback plugin)). A blocker is real only when the agent cannot resolve it through reasonable plan-consistent judgment.
Full plan — for async handoffs, complex multi-session work, or unfamiliar domains:
Light plan — for same-session execution where implementers execute immediately:
How to choose: If the plan will be executed in this session by dispatched subagents via subagent-driven-development, use light. If it's a handoff to another session, a no-delegation run, or work for another developer, use full. When in doubt, ask.
If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans, one per subsystem. Each plan should produce working, testable software on its own.
Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
Default to vertical slices. Each task should cut through the stack to deliver one thin, observable behavior end to end — query + endpoint + UI affordance + test in one task — rather than one horizontal layer per task (all queries, then all endpoints, then all UI). Vertical slices are independently verifiable, reviewable, and revertible; horizontal layers ship nothing until the last one lands.
Horizontal decomposition is justified only when a layer is genuinely shared by several later slices, or an interface contract must be locked before parallel work can fan out (contract-first). When one task carries most of the technical risk, schedule it first (risk-first) so a wrong bet is discovered at minimum sunk cost.
Keep it compilable. Every task ends with the repo building and worker-scope verification green, then either committed by the worker (serial-worker-commit) or handed to the lead for staging and commit after inline review (parallel-lead-commit). No accepted task state may be broken; broader gates still run at the batch/branch scopes defined in the Verification Strategy.
Rollback-friendly ordering. Order tasks so a partially executed plan leaves the branch shippable or cleanly revertible: no half-wired user-facing behavior between tasks, and the slice that completes a user-visible behavior is the one that exposes it.
Slice boundaries are not stop points. Slices exist for verifiability and rollback, not for pausing. Completing a slice means checkpoint and continue immediately to the next task — the autonomous execution model stops only for the blocker taxonomy and the final PR, never because a slice finished.
Every step must contain the actual content an engineer needs. These are plan failures, never write them:
You cannot write accurate file paths, line ranges, or implementation steps without understanding the code. Before writing any task:
context — returns token-budgeted context with pivots and neighborsinspect(target, depth=overview) — bounded callers, callees, body preview; escalate to depth=full for symbols the plan will modifyinspect — get file structure with line numbers for Modify: referencesimpact(target) — impacted symbols plus the likely tests, so the plan's Verification Strategy names real commandstrace(target) — every caller before planning a change to a public APIDo NOT guess file paths, line numbers, symbol names, function signatures, config shapes, route names, CLI flags, or public contracts. Use Miller to discover them. Plans with wrong paths or invented API shapes waste implementer time on dead ends.
External API staleness check: For each task that codes against an external framework, library, or API where training knowledge could be stale (new-in-version features, unfamiliar dependencies, changed defaults), apply razorback:grounding-in-current-docs while planning: verify the exact surface and record it — or the doc URL — in the task itself so implementers don't code external APIs from memory.
Each step is one action (2-5 minutes):
Light plans use task-level granularity instead: each task is a coherent unit of work (add a function, modify an API, write tests for a component). Steps within a task are left to the implementer's judgment.
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use razorback:subagent-driven-development when subagent delegation is available. Fall back to razorback:executing-plans for single-task, tightly-sequential, or no-delegation runs.
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
**Architecture Quality:** [Approved module/interface shape, architecture risk, or `No Architecture Impact` for mechanical plans]
## Global Constraints
[One line per project-wide requirement, exact values verbatim from the spec — see the `## Global Constraints` rule below]
---
Every plan MUST include ## Global Constraints before the task list. Use it for requirements that bind every task: version floors, dependency limits, naming and copy rules, platform support, exact strings, exact formats, and relationships such as "same layout as X" or "matches Y".
Copy exact values verbatim from the spec. Do not make each task repeat them, and do not leave implementers or reviewers to infer them from prose.
Non-mechanical plans MUST include an Architecture Quality section that records the approved module/interface shape and the main architecture risk. Mechanical plans may use a No Architecture Impact note instead.
If code reality contradicts the approved shape, the worker reports a plan mismatch rather than redesigning locally.
Every plan MUST include a language-agnostic verification strategy. Razorback owns the scope boundaries; the target repo owns the commands.
## Verification Strategy
**Project source of truth:** [AGENTS.md / CLAUDE.md / docs path / CI config / manifest metadata that defines verification tiers]
**Worker red/green scope:** [Lowest-cost verification that proves the new or changed behavior. Use the repo's documented command.]
**Worker ceiling:** [Maximum scope workers may run on their own. Workers do not own broader regression gates. If the lead asks for broad diagnostic output, the lead still owns acceptance for that scope.]
**Worker gate invariant:** [For each assigned worker gate, state the behavior or evidence invariant the gate proves.]
**Lead affected-change scope:** [Project-defined affected-area or changed-files gate. Run after a coherent batch, not after every edit.]
**Branch gate:** [Project-defined broad confidence gate before handoff, push, or PR.]
**Replay/metric evidence:** [For replay, metric, or acceptance evidence, state which assertions or metrics are hard gates and which are report-only.]
**Escalation triggers:** [Changed areas or failure modes that require broader tiers.]
**Assigned verification failure:** Workers stop and report when assigned verification fails, unless this plan explicitly says to update that gate.
**Verification ledger:** Record invariant, command, scope label, commit SHA, result, and timestamp. For replay or metric evidence, also record hard-gate metrics and report-only metrics. If the same HEAD already has a passing ledger entry for the required scope, reuse that evidence instead of rerunning the same expensive gate.
If the repo has no documented hierarchy, define one in the plan using these neutral scope labels: worker (narrowest behavior proof), affected-change (changed files or touched subsystem), branch (broad pre-handoff confidence), and expensive (slow specialist gates, run only when touched areas require them).
Do not bake language, framework, or test-runner commands into razorback skills. Put concrete commands in the plan from the target repo's docs.
Every plan MUST include ## Parallel Execution Contract between
## Verification Strategy and the task list. This is the lead's dispatch contract: it says which tasks form
safe parallel batches, which ones must serialize, and why.
Use this exact structure:
## Parallel Execution Contract
| Task | Parallel batch | File ownership | Serialization required | Dependency reason |
|---|---|---|---|---|
| Task 1: [name] | [Batch A / Batch B / None - serial] | [Exact create/modify/test ownership for this task] | [No / Yes / Not applicable - single task.] | [Why serialization is required, or `None - safe parallel batch.` / `Not applicable - single task.`] |
Rules:
Parallel batch names the safe batch this task belongs to. Use a shared label
such as Batch A only when the tasks can dispatch together without file or
ordering conflicts.File ownership is exact. Do not rely on "same area" or "related files" as a
proxy.Serialization required is No for safe parallel tasks, Yes only for a real
dependency or tool limitation, and Not applicable - single task. only when the
whole plan has one task.Dependency reason is mandatory. If serialization is Yes, record the blocking
dependency or tool limitation. If serialization is No, write
None - safe parallel batch.. If the plan has one task, write
Not applicable - single task..Completion follows commit mode:
serial-worker-commit: after assigned verification passes, the worker may make
the owned-file commit and record the commit SHA.parallel-lead-commit: after assigned verification passes, the worker does not
commit. The worker hands the verified diff to the lead for staging and commit
after inline review.### Task N: [Slice or component name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Interfaces:**
- Consumes: [what this task uses from earlier tasks — exact symbols, signatures, data shape, or user-facing contract]
- Produces: [what later tasks rely on — exact function names, parameter and return types, file formats, CLI flags, routes, or events. A task's implementer sees only their own task; this block is how they learn neighboring contracts.]
**Contract inputs:** [Exact shared constraints, prior-task outputs, fixtures, tool contracts, or public strings this task may rely on]
**File ownership:** [Copy the ownership entry from `## Parallel Execution Contract` verbatim]
**Serialization required:** [No / Yes / Not applicable - single task.]
**Dependency reason:** [Required reason from `## Parallel Execution Contract`]
**Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
```
**Step 2: Run test to verify it fails**
Run: `<project-defined worker red/green command for this behavior>`
Expected: FAIL with "function not defined"
**Step 3: Write minimal implementation**
```python
def function(input):
return expected
```
**Step 4: Run test to verify it passes**
Run: `<project-defined worker red/green command for this behavior>`
Expected: PASS
**Step 5: Apply commit mode**
- `serial-worker-commit`: after assigned verification passes, create the owned-file
worker commit and record the resulting SHA.
- `parallel-lead-commit`: do not commit from the worker lane. Hand the verified
change to the lead for staging and commit after inline review.
**Acceptance criteria:**
- [ ] [Specific, testable requirement for this task]
- [ ] Tests pass and the change is either committed by the worker or handed to the lead per commit mode
The execution skills tick these [ ] → [x] as each task completes, so every task carries a tickable progress marker regardless of plan type.
When a full plan has exactly one task, use ## Task Structure above unchanged — full TDD steps and all. Only two things differ, so do not re-template the task:
## Parallel Execution Contract to a single row: Parallel batch is None - serial, File ownership carries the task's exact ownership, and both Serialization required and Dependency reason read Not applicable - single task.Not applicable - single task.### Task N: [Slice or component name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Interfaces:**
- Consumes: [exact contract this task depends on]
- Produces: [exact contract future tasks depend on. A task's implementer sees only their own task, so include names and shapes here.]
**Contract inputs:** [Exact shared constraints, prior-task outputs, fixtures, tool contracts, or public strings this task may rely on]
**File ownership:** [Copy the ownership entry from `## Parallel Execution Contract` verbatim]
**Serialization required:** [No / Yes / Not applicable - single task.]
**Dependency reason:** [Required reason from `## Parallel Execution Contract`]
**What to build:** [2-3 sentences describing the feature/change and why]
**Approach:** [Key decisions — which pattern to follow, what to call things, edge cases to handle]
**Acceptance criteria:**
- [ ] [Specific, testable requirement]
- [ ] [Another requirement]
- [ ] Worker-scope verification passes and the change is either committed by the worker or handed to the lead per commit mode
Always (both plan types):
razorback: prefix (never @ file links — those force-load content and burn context)- [ ] acceptance criteria per task — execution flips these to [x] as a durable, in-document progress recordFull plans only:
Step 1, announce plan save and request approval. After saving, announce:
"Plan saved to <path>. Please review it and reply approved (with optional reviewer choice, e.g. 'approved, codex review'; omit reviewer choice for no external review) or request changes."
Step 2, wait for explicit approval. Do NOT proceed on silence, hedged responses ("looks ok", "maybe", "I guess"), questions, or partial feedback. Only an explicit "approved", "yes, go", "run it", or equivalent unblocks execution. The approval message can fold in the reviewer choice (e.g. "approved, codex review", "approved, no external review").
If the user requests changes, revise the plan, re-run the self-review, re-save, and re-ask for approval. Brainstorming gates the spec; writing-plans gates the plan. This is the last human stop before autonomous execution.
Step 3, capture the reviewer choice without prompting. The default reviewer choice is none. If the approval message already named a choice (e.g. "approved, run it, pre-merge codex review", "approved, no external review") or the saved spec explicitly requested a reviewer, set reviewer_choice to codex or claude as requested. Do not ask a separate reviewer-choice question after approval.
Step 4, invoke the execution skill immediately. After approval, announce which execution skill will run and invoke it, passing the plan path, the reviewer choice (none / codex / claude), and verification strategy:
razorback:subagent-driven-developmentrazorback:executing-plansStarting execution after approval is the default. If the user requested a separate-session handoff before approval, guide them to open a new session in the worktree and use razorback:executing-plans there.