writing-plans
Writing Plans
Overview
Create implementation plans for an engineer with zero codebase context.
Each plan includes:
- Exact file paths for every operation
- Complete code (not "add validation here")
- Test-first approach with verification commands
- Bite-sized steps (2-5 min each)
Principles: DRY, YAGNI, TDD, frequent commits.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Context: Run in dedicated worktree. If none exists, use using-git-worktrees skill first.
Save plans to: docs/plans/YYYY-MM-DD-<feature-name>.md
Before Writing
- Read spec/requirements completely
- Explore project structure (
view .) - Identify tech stack (package.json, pyproject.toml, etc.)
- Note existing patterns in similar files
- Check docs/ for existing conventions
Bite-Sized Task Granularity
Each step is one action (2-5 minutes), independently verifiable:
- "Write the failing test" — step
- "Run it to confirm failure" — step
- "Implement minimal code to pass" — step
- "Run tests to confirm pass" — step
- "Commit" — step
Plan Document Header
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
---
Task Structure
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**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"
```
Before Handoff
Verify plan completeness:
- Every file path exists or will be created
- Every command can be run exactly as written
- No TODO/placeholder text remains
- Tests cover all acceptance criteria from spec
- Include exact test code, not descriptions
Execution Handoff
After saving plan, present:
"Plan saved to docs/plans/<filename>.md. Choose execution mode:
- Subagent-Driven — same session, fresh subagent per task, fast iteration
- Parallel Session — new session, batched execution with checkpoints
Which approach?"
If Subagent-Driven chosen
- Stay in this session
- REQUIRED SUB-SKILL:
subagent-driven-development - Fresh subagent per task + two-stage review
If Parallel Session chosen
- Guide user to open new session in worktree
- REQUIRED SUB-SKILL: New session uses
executing-plans
More from codingcossack/agent-skills-library
subagent-driven-development
Sequential subagent execution with two-stage review gates for implementation plans. Use when executing multi-task plans in current session, when tasks need fresh subagent context to avoid pollution, when formal review cycles (spec compliance then code quality) are required between tasks, or when you need diff-based validation of each task before proceeding.
9test-driven-development
Red-green-refactor development methodology requiring verified test coverage. Use for feature implementation, bugfixes, refactoring, or any behavior changes where tests must prove correctness.
7finishing-a-development-branch
Git branch completion workflow. Use when implementation is complete, tests pass, and a feature branch needs to be integrated via merge, pull request, or cleanup.
7using-git-worktrees
Git worktree–based workspace isolation for parallel or non-disruptive development. Use when work must occur without modifying or interfering with the current working tree.
5systematic-debugging
Root cause analysis for debugging. Use when bugs, test failures, or unexpected behavior have non-obvious causes, or after multiple fix attempts have failed.
5brainstorming
Collaborative design exploration that refines ideas into validated specs through iterative questioning. Use before any creative work including creating features, building components, adding functionality, or modifying behavior.
4