.claude/skills/planning/SKILL.md
Planning work in small, known-good increments. Use when starting significant work or breaking down complex tasks.
npx skillsauth add jscriptcoder/jshack.me planningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
All work must be done in small, known-good increments. Each increment leaves the codebase in a working state where all tests pass.
Use the /plan command to create plans. Use the /continue command to resume work after a merged PR.
Plans live in plans/ at the project root. Each plan is a self-contained file named descriptively (e.g., plans/wifi-cracking.md, plans/mission-generation.md).
To discover active plans: ls plans/
Multiple plans can coexist — each is independent and won't conflict across branches or worktrees because they have unique filenames.
When a plan is complete: delete the plan file. If plans/ is empty, delete the directory.
Break work into the smallest independently mergeable units. Each PR should be reviewable in isolation and deliver a coherent slice of value.
Why this matters: Small PRs are easier to review, easier to revert, and easier to reason about. When something breaks, the cause is obvious. When a PR sits in review, it doesn't block unrelated work. The goal is to stay as close to main as possible at all times.
A PR is too big when the reviewer needs to hold multiple unrelated concepts in their head to understand it, or when you'd struggle to write a clear 1-3 sentence summary of what it does.
There will be exceptions — some changes are inherently coupled and splitting them would create broken intermediate states. Use judgement. But the default should always be to ask "can this be split?"
Each step MUST:
If you can't describe a step in one sentence, break it down further.
Too big if:
Right size if:
Every step follows RED-GREEN-MUTATE-KILL MUTANTS-REFACTOR. See tdd skill for the workflow, testing skill for factory patterns.
FOR EACH STEP:
│
├─► CONFIRM: Present acceptance criteria for this step
│ - Human must approve criteria before any code is written
│ - Criteria must be specific and observable
│ - Do NOT proceed until human confirms
│
├─► RED: Write failing test FIRST
│ - Test describes expected behavior
│ - Test fails for the right reason
│
├─► GREEN: Write MINIMUM code to pass
│ - No extra features
│ - No premature optimization
│ - Just make the test pass
│
├─► MUTATE: Verify test effectiveness
│ - Run `mutation-testing` skill
│ - Produces a mutation testing report
│
├─► KILL MUTANTS: Address surviving mutants
│ - Add or strengthen tests for surviving mutants
│ - Ask the human when a surviving mutant's value is ambiguous
│ - All tests pass after fixes
│
├─► REFACTOR: Assess improvements
│ - See `refactoring` skill
│ - Only if it adds value
│ - All tests still pass
│
└─► STOP: Present the work and wait for commit approval
- Show what was implemented and the mutation testing report
- Human reviews and approves before commit
No exceptions. No "I'll add tests later."
NEVER commit without user approval.
After completing a step (RED-GREEN-MUTATE-KILL MUTANTS-REFACTOR):
Only proceed with commit after explicit approval.
Each plan file in plans/ follows this structure:
# Plan: [Feature Name]
**Branch**: feat/feature-name
**Status**: Active
## Goal
[One sentence describing the outcome]
## Acceptance Criteria
[Behaviour-driven criteria — describe observable business outcomes, not implementation details.
Test at the lowest level that gives confidence: prefer unit tests (vitest) for logic and domain behaviour, browser tests (vitest browser mode) for UI interaction, Playwright integration tests only for end-to-end flows. Avoid defaulting to Playwright for everything.]
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
## Steps
Every step follows RED-GREEN-MUTATE-KILL MUTANTS-REFACTOR. No production code without a failing test.
Read the project's CLAUDE.md and testing rules before writing steps.
### Step 1: [One sentence description]
**Acceptance criteria**: [What observable behaviour proves this step is done? Be specific — "user sees X", "API returns Y", "test covers Z". Vague criteria like "it works" are not acceptable. **Present to human and get confirmation before writing any code.**]
**RED**: What failing test will we write? (Describes expected behaviour, not implementation.)
**GREEN**: What minimum code makes the test pass?
**MUTATE**: Run `mutation-testing` skill — produce a report.
**KILL MUTANTS**: Address surviving mutants (ask human when value is ambiguous).
**REFACTOR**: Assess improvements (only if they add value).
**Done when**: All acceptance criteria met, mutation report reviewed, human approves commit.
### Step 2: [One sentence description]
**Acceptance criteria**: ...
**RED**: ...
**GREEN**: ...
**MUTATE**: ...
**KILL MUTANTS**: ...
**REFACTOR**: ...
**Done when**: ...
## Pre-PR Quality Gate
Before each PR:
1. Mutation testing — run `mutation-testing` skill
2. Refactoring assessment — run `refactoring` skill
3. Typecheck and lint pass
4. DDD glossary check — if the project uses DDD, verify all domain terms match the canonical glossary
---
_Delete this file when the plan is complete. If `plans/` is empty, delete the directory._
If the plan needs to change:
Plans are not immutable, but changes must be explicit and approved.
When all steps are complete:
learn agent for CLAUDE.md updates or adr agent for architectural decisionsplans/, delete plans/ if empty❌ Committing without approval
❌ Steps that span multiple commits
❌ Writing code before tests
❌ Plans that change silently
❌ Keeping plan files after feature complete
START FEATURE
│
├─► Create plan in plans/ (get approval)
│
│ FOR EACH STEP:
│ │
│ ├─► CONFIRM: Present acceptance criteria, **wait for human approval**
│ ├─► RED: Failing test
│ ├─► GREEN: Make it pass
│ ├─► MUTATE: Run mutations, produce report
│ ├─► KILL MUTANTS: Address survivors (ask human when ambiguous)
│ ├─► REFACTOR: If valuable
│ └─► **PRESENT WORK + REPORT, WAIT FOR COMMIT APPROVAL**
│
END FEATURE
│
├─► Verify all criteria met
├─► Merge learnings if significant (learn agent, adr agent)
└─► Delete plan file from plans/
development
TypeScript strict mode patterns including schema-first development, branded types, type vs interface guidance, and tsconfig strict flags. Use when writing TypeScript code, defining types or schemas, or reviewing type safety. For immutability and pure function patterns, see the functional skill.
development
Testing patterns for behavior-driven tests. Use when writing tests, creating test factories, structuring test files, or deciding what to test. Do NOT use for UI-specific testing (see front-end-testing or react-testing skills).
testing
Evaluates test quality using Dave Farley's 8 properties. Use when reviewing tests, assessing test suite quality, or analyzing test effectiveness against TDD best practices.
development
Test-Driven Development workflow. Use for ALL code changes - features, bug fixes, refactoring. TDD is non-negotiable.