Agent skill
writing-plans
Use when design is complete and you need detailed implementation tasks - creates comprehensive implementation plans with exact file paths, complete code examples, and verification steps assuming minimal codebase familiarity
Install this agent skill to your Project
npx add-skill https://github.com/timbuchinger/loadout/tree/main/skills/writing-plans
SKILL.md
Writing Plans
Overview
Write comprehensive implementation plans assuming limited codebase context. Document everything needed: which files to touch for each task, code examples, testing approach, verification steps. Break work into bite-sized tasks following DRY, YAGNI, and TDD principles with frequent commits.
Assume the implementer is skilled but unfamiliar with the specific codebase and tooling.
When to Use
- Design is complete and ready for implementation
- Need to break down work into concrete tasks
- Preparing work for delegation or future execution
- Want clear verification steps for each task
Plan Location
Save plans to: docs/plans/YYYY-MM-DD-<feature-name>.md
Bite-Sized Task Granularity
Each step is one action (2-5 minutes):
- "Write the failing test" - step
- "Run it to make sure it fails" - step
- "Implement the minimal code to make the test pass" - step
- "Run the tests and make sure they pass" - step
- "Commit" - step
Break larger tasks into these atomic steps. Each step should be independently verifiable.
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
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
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
Essential Elements
Exact File Paths
Always specify complete paths:
- Good:
src/auth/validators.py - Bad: "the validators file"
For modifications, include line ranges if known: config.json:45-52
Complete Code Examples
Include full, working code in the plan:
- Good: Show the complete function/test
- Bad: "Add validation for email field"
The implementer should be able to copy-paste code from the plan.
Exact Commands
Specify complete commands with expected output:
# Run specific test
pytest tests/auth/test_login.py::test_invalid_email -v
# Expected output
FAIL: AssertionError: Expected validation error
Verification Steps
Each task should explain how to verify it worked:
- What command to run
- What output to expect
- What to check manually if needed
Commit Guidelines
Encourage frequent, atomic commits:
- One logical change per commit
- Meaningful commit messages
- Follow conventional commits format:
feat:for new featuresfix:for bug fixesrefactor:for code changes without behavior changetest:for test-only changesdocs:for documentation
Example Task
### Task 1: Email Validation
**Files:**
- Create: `src/validators/email.py`
- Test: `tests/validators/test_email.py`
**Step 1: Write the failing test**
```python
# tests/validators/test_email.py
from src.validators.email import validate_email
def test_rejects_invalid_email():
result = validate_email("notanemail")
assert result == {"valid": False, "error": "Invalid format"}
def test_accepts_valid_email():
result = validate_email("user@example.com")
assert result == {"valid": True}
Step 2: Run test to verify it fails
Run: pytest tests/validators/test_email.py -v
Expected: FAIL with "ModuleNotFoundError: No module named 'src.validators.email'"
Step 3: Write minimal implementation
# src/validators/email.py
import re
def validate_email(email):
pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
if re.match(pattern, email):
return {"valid": True}
return {"valid": False, "error": "Invalid format"}
Step 4: Run test to verify it passes
Run: pytest tests/validators/test_email.py -v
Expected: PASS (2 tests)
Step 5: Commit
git add tests/validators/test_email.py src/validators/email.py
git commit -m "feat: add email validation"
Best Practices
Be specific:
- Use exact file paths and line numbers
- Show complete code, not pseudocode
- Specify exact commands to run
Be minimal:
- Follow YAGNI - don't add features not in requirements
- Keep implementations simple
- Add complexity only when tests demand it
Be testable:
- Every feature has tests
- Tests written before implementation (TDD)
- Clear verification steps
Be incremental:
- Small commits after each working change
- Each task independently deliverable
- Build progressively
Common Mistakes to Avoid
- Don't write "add validation" - show the exact validation code
- Don't write "update config" - show exact config changes
- Don't skip test commands - always show how to verify
- Don't make tasks too large - break down into 2-5 minute steps
- Don't assume knowledge of project structure - specify full paths
Quick Reference
| Element | Required | Example |
|---|---|---|
| File paths | Always exact | src/auth/login.py |
| Code examples | Complete & working | Full function/test |
| Commands | With expected output | pytest path/test.py -v → PASS |
| Commits | After each task | git commit -m "feat: add feature" |
| Granularity | 2-5 min per step | One action per step |
Final Rule
Plans should be executable by someone skilled but unfamiliar.
Every step: exact paths, complete code, clear verification.
Clear plans enable confident execution.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
brainstorming
Use when creating or developing, before writing code or implementation plans - refines rough ideas into fully-formed designs through collaborative questioning, alternative exploration, and incremental validation. Don't use during clear 'mechanical' processes
add-note
Use this skill whenever important information is learned during a task or when the user explicitly asks to store something. Use when users ask to remember. Triggers on "remember this", "update memory", "share" or any persistent storage request.
user-story
Creates well-structured user stories for software development and project management. Use when the user asks to write, create, or format a user story, or needs to document requirements, features, or tasks in user story format.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first
kubernetes-troubleshoot
Troubleshoot and manage Kubernetes clusters, including resource inspection, debugging, pod logs, events, and cluster operations. Use when the user needs to diagnose issues, inspect workloads, analyze pod failures, or perform Kubernetes cluster operations.
1password
Manage personal secrets and passwords using 1Password CLI (op). Use when the user asks to query, retrieve, create, or manage secrets in 1Password, 1p, or op. This is for personal secrets only - not for cloud provider secret managers like Azure Key Vault, AWS Secrets Manager, or GCP Secret Manager.
Didn't find tool you were looking for?