بنقرة واحدة
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when you have a spec or requirements for a multi-step task, before touching code.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when a request needs product/design exploration, unclear requirements, multiple viable approaches, UI/UX choices, or new behavior whose intent is not yet bounded.
Use when 2+ independent tasks, failures, research lanes, exploration lanes, or path-scoped investigations can run without shared state, shared files, or sequential dependency.
Use when executing a written implementation plan inline in the current session with checkpoints and verification.
Use when adding or changing a capability surface such as a public function, API, command, prompt, workflow, schema/helper, policy, or reusable instruction.
Use when implementation is complete, verification passes, and the remaining decision is how to integrate, merge, PR, clean up, or finish the branch.
Use when creating or revising docs, plans, records, PR text, handoffs, or other prose that should be sparse, direct, and low-context.
| name | writing-plans |
| description | Use when you have a spec or requirements for a multi-step task, before touching code. |
Purpose: Decompose a spec or requirement into bite-sized, status-readable tasks with explicit proofs. Consumer: Implementer (subagent or human) who will execute the plan task-by-task. Failure consequence: Vague plan leads to wasted execution; missing proofs mean no completion signal; missing status fields make the plan un-reviewable. Falsifier: Fewer than 3 tasks, single-step work, or trivial change where decomposition adds overhead.
Redteam forwarder: Before dispatching implementers, run /redteam:plan (architect lane) on the plan file. Catches missing proofs, vague success criteria, and dependency conflicts that surface only when an implementer hits them.
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Context: If working in an isolated worktree, it should have been created via
using-git-worktrees at execution time.
Save plans to: docs/plans/YYYY-MM-DD-<feature-name>.md
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.
A task is the smallest unit that carries its own test cycle and is worth a fresh reviewer's gate. When drawing task boundaries: fold setup, configuration, scaffolding, and documentation steps into the task whose deliverable needs them; split only where a reviewer could meaningfully reject one task while approving its neighbor. Each task ends with an independently testable deliverable.
Each step is one action (2-5 minutes):
Every plan in docs/plans/ must be status-readable without interpreting prose.
Use a small metadata block after the worker note. Values are deliberately plain
text so markdownlint, grep, and simple scripts can validate them.
Allowed Status: values:
plannedactiveblockedimplementedsupersededRequired metadata keys:
Status:Owner:Last verified:Source:Canonical issue/ADR/spec:Use none when no canonical issue, ADR, or spec exists. Use not verified
only before any verification has run; update it with YYYY-MM-DD once evidence
exists.
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use `subagent-driven-development` for subagent execution or `executing-plans` for inline execution. Steps use checkbox (`- [ ]`) syntax for tracking.
Status: planned
Owner: agent | human | mixed
Last verified: not verified
Source: spec path, prompt, `.sf` record, or manual
Canonical issue/ADR/spec: path-or-none
## Goal
[One sentence describing what this builds.]
## PDD Contract
- Purpose:
- Consumer:
- Contract:
- Failure boundary:
- Evidence:
- Falsifier:
- Non-goals:
- Invariants:
- Assumptions:
## Architecture
[2-3 sentences about approach.]
## Tech Stack
[Key technologies/libraries.]
## Done When
- [ ] Observable acceptance criterion with command, trace, commit, or file path.
- [ ] Another acceptance criterion.
## Global Constraints
[The spec's project-wide requirements — version floors, dependency limits,
naming and copy rules, platform requirements — one line each, with exact
values copied verbatim from the spec. Every task's requirements implicitly
include this section.]
---
### Task N: [Component Name]
Status: planned
Proof: not verified
Blocker: none
**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 signatures]
- Produces: [what later tasks rely on — exact function names, parameter
and return types. A task's implementer sees only their own task; this
block is how they learn the names and types neighboring tasks use.]
- [ ] **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: `pytest tests/path/test.py::test_name -v`
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: `pytest tests/path/test.py::test_name -v`
Expected: PASS
- [ ] **Step 5: Commit**
```bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
```
When execution updates a task, change Status: and Proof: near that task.
Valid task status values are planned, active, blocked, and
implemented. Proof: must name the command, trace, commit, PR, or file path
that proves the task status. If blocked, Blocker: must name the concrete
missing input or failing command.
Every step must contain the actual content an engineer needs. These are plan failures - never write them:
Status: plus task-level Status: / Proof: fields.After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself, not a subagent dispatch.
1. Spec coverage: Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
2. Placeholder scan: Search your plan for red flags from the "No Placeholders" section above. Fix them.
3. Type consistency: Do the types, method signatures, and property names you
used in later tasks match what you defined in earlier tasks? A function called
clearLayers() in Task 3 but clearFullLayers() in Task 7 is a bug.
4. Status readability: Can rg "^Status:|^Proof:|^- \\[[ xX]\\]"
show the plan state? Does every task have Status:, Proof:, and Blocker:?
5. Markdown lint: Run the repo's markdownlint command, or a targeted
markdownlint-cli2 <plan-file> when no repo command exists. Fix warnings in the
plan instead of disabling rules.
If you find issues, fix them inline. No need to re-review; fix and move on. If you find a spec requirement with no task, add the task.
After saving the plan, offer execution choice:
Say:
Plan complete and saved to docs/plans/<filename>.md. Two execution options:
1. Subagent-Driven - Use one implementer and review gate per task
2. Inline Execution - Execute tasks in this session with checkpoints
Which approach?
If Subagent-Driven chosen:
subagent-driven-developmentIf Inline Execution chosen:
executing-plans