write-plan
Turns approved product/design/architecture artifacts or a clear request into plan.md: small ordered tasks, each with exact files, a test written first and a verification command. Use before implementing anything larger than a one-file change.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- write-plan
- description
- Turns approved product/design/architecture artifacts or a clear request into plan.md: small ordered tasks, each with exact files, a test written first and a verification command. Use before implementing anything larger than a one-file change.
03 SKILL.md 正文
Write plan
Artifact contract (paths, Status: line, sections): ${CLAUDE_SKILL_DIR}/../workflow/references/artifacts.md.
Inputs
Read whatever exists in .dev-docs/features/<slug>/: product.md (acceptance criteria),
design.md (screens, states), arch.md (components, interfaces). Use only artifacts with
Status: approved; if one is draft, show it and ask the user to approve first. With no
artifacts, plan from the request and read the code it touches.
Rules
- Each task touches ≤1 component and ≤3 files. Bigger → split it.
- Task size: a reviewer can reject it while approving its neighbours; one sitting of work.
- When
.dev-docs/system.mdexists, each task'sFiles:lie inside oneprojects/<name>/(setProject: <name>). A contract change is one task touchingcontracts/<c>.md+ the producer, followed by one task per consumer. Outsideprojects/,Project: —. - Test first: every task names the test to write before the code, and what it asserts.
- No placeholders: no "TBD", "handle errors appropriately", "add tests", "etc.". Name the exact function, file, input and expected output.
- Every task has a
Verify:command whose output proves the task works (a test selection, a CLI invocation with expected output,dl-sizeon the files). ForProject: <name>it ismake -C projects/<name> test, plus${CLAUDE_SKILL_DIR}/../suckless-code/scripts/dl-budget projects/<name>when SLOC grows. "Looks right" is not a check. - Order tasks so the tree builds and existing tests pass after each one. Interfaces and data types before their callers; deletions of obsolete code in the same task that replaces it.
- Each acceptance criterion from
product.mdmaps to at least one task'sTest:. - Prefer deleting or reusing code over adding it; say so in
Change:.
Format
Write .dev-docs/features/<slug>/plan.md:
# <Feature> plan
Status: draft
### T1: <title>
Files: path/a.py, tests/test_a.py
Project: —
Change: <what changes, concretely>
Test: <test name> — asserts <behaviour>
Verify: pytest tests/test_a.py -q
Depends: —
- [ ] done
Depends: lists task ids or —. build flips - [ ] done to - [x] done.
Finish
Show the task list (one line per task) and ask the user to approve. On approval set
Status: approved. For a one-file change the plan may stay inline in the conversation.
04 同仓库更多 Skills
workflow
Runs the deadlion pipeline (product → design → decompose → architecture → plan → build → review → verify) through plain-text artifacts in .dev-docs/. Use when the user starts a new product, system, feature or multi-step change, or asks what to do next.
verify
Evidence before claims: before saying work is done, fixed or passing, run the proving command fresh, read its output and the git diff, and report VERIFIED and NOT VERIFIED items separately. Use before declaring any task complete and after any subagent reports success.
ux-design
Designs the user interface of a program at the lowest rung that serves the job — CLI, filter (dmenu/fzf style), terminal UI, native GUI or web — with flows, states, a key map, design tokens kept in config.def and numeric gates per rung, so every UI works alone and embeds; avoids generic AI-looking UI. Includes the dl-contrast checker. Writes design.md. Use when building or changing any user interface, screen, TUI, GUI, component or visual style.
unix-design
Designs the internals of one program or sub-project as small single-purpose modules with plain-text interfaces, separated mechanism and policy, and one build/run command each, following the Unix philosophy. Writes arch.md. Use when designing a new feature's architecture inside a program, a CLI, module or data flow; for splitting a system into several programs use decompose.
ui-verify
Verifies a running UI against the gates in design.md — web pages in a real browser via the Playwright MCP (screenshots at 375/768/1280 px, console errors, axe scan, touch targets), terminal programs through dl-tui in a headless tmux (screens at 80×24, 40×12 and 20×5, NO_COLOR, key scripts per state, terminal restore, stdout purity), and token contrast with dl-contrast. Use after implementing or changing any UI, or when the user asks to check how a screen looks or works.
testing
Test strategy and execution: test-first, isolated unit tests, then integration, then regression; tests assert behaviour, boundaries and errors, never wiring or mock echoes; make test and test.sh for programs, fixture tests for contracts; memory-safe fixtures for large suites. Use when writing tests, choosing what to test, or when a test suite is slow, flaky or runs out of memory.