skills/plan-code/SKILL.md
C4 Level 4 (Code) planning phase: define classes, functions, algorithms as SudoLang pseudocode with constraints and invariants.
npx skillsauth add popoffvg/dotfiles plan-codeInstall 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.
Design the implementation details — every L4 TODO must include a SudoLang algorithm description.
All L1, L2, and L3 decisions must be fixed.
Update _notes/plan.md with:
| Question | Decision | |---|---| | What data structures? | ... | | What algorithms? | ... | | What error handling strategy? | ... | | What patterns? (factory, strategy, observer) | ... |
Format:
- D30 [L4, fixed]: <decision statement>
rationale: <why>
Final review — every domain noun in all TODOs and Criteria must have an entry. No implementation jargon.
Every L4 TODO must include a algorithm: block in SudoLang — declarative pseudocode specifying logic, constraints, and invariants:
- [ ] T30: Implement order total calculation
- level: L4
- files: `pkg/checkout/total.go`
- criteria: AC1
- decisions: D30
- algorithm:
```sudo
CalcTotal(order) {
Constraints {
discount <= order.subtotal
total >= 0
}
subtotal = sum(order.items.map(i => i.price * i.qty))
discount = apply(order.coupon, subtotal)
total = subtotal - discount + tax(subtotal, order.region)
}
```
apply, tax) rather than inline logic.All L4 decisions are fixed. Every L4 TODO has a SudoLang algorithm block. No contradiction with L1–L3 decisions. Plan is ready for /plan-verify.
tools
Improve a whole CLAUDE.local.md — the private, per-project rules captured from user corrections. Wraps each conditional rule in a <task-relevant> block so it only surfaces for matching work, merges duplicates, generalizes one-off facts, drops stale entries, and routes raw project facts to engram. Use when the user says "improve claude.local", "clean up the local rules", "claude.local is bloated", or after the Stop hook has appended many rules.
testing
WM pipeline and conventions shared across all phases. Agents must read this before spec, impl, or verify work.
development
One entry point for spec writing, implementation, and bug fixing. Default is new (write spec → grill loop → produce notes → author TODO bodies). Other subcommands: verify (audit), revise (sync to shipped), prototype (settle a decision), code-map (diagram), impl (execute one TODO), fix (analyze cause, correct thoughts, fix behavior), help (this page). Invoke as /code <subcommand>.
development
Red-Green-Refactor cycle for bug fixes. Before fixing a bug, first write a failing test that reproduces it (Red), then make the minimal change to pass (Green), then clean up the code (Refactor). Use on any bug fix, error correction, failing test repair, or when user says "fix this bug".