一键导入
feature-design
Design and plan a feature — move it to in progress and write its design and sub-task plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Design and plan a feature — move it to in progress and write its design and sub-task plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Sync all documentation and feature tracking to reflect the current state of the in-progress feature
Complete a feature — finalise documentation and move it to Completed
Initialises the feature model for this project. Run this once to enable feature workflows.
Create a new feature and write its specification
Code review scoped to files changed in the current feature branch — runs simplicity, general, and nitty agents over the diff, auto-applies code-level findings until convergence, and escalates architectural findings for user confirmation
Code review scoped to a described component or area — resolves the description to files, then runs simplicity, general, and nitty agents; auto-applies code-level findings until convergence; escalates architectural findings for user confirmation
| name | feature-design |
| description | Design and plan a feature — move it to in progress and write its design and sub-task plan |
| argument-hint | ["feature name or slug"] |
Design a specified feature: decide how it will be built and break the work
into sub-tasks, each with its own sign-off criteria. This is the second step
of the feature lifecycle (feature-spec → feature-design → implement →
feature-end). It assumes the feature has already been specified by
/feature-spec (which agreed the sign-off strategy); it produces the design and
plan, but does not begin implementation.
Before proceeding, check that CLAUDE.md contains a Feature Model section. If it doesn't, tell the user to run /feature-init first and stop.
The user has identified the feature as: $ARGUMENTS
Steps:
Read features/PENDING.md and identify the feature to design.
$ARGUMENTS against pending feature names and slugs.$ARGUMENTS is blank and there is exactly one entry in features/PENDING.md, use that.features/PENDING.md and ask them to run /feature-spec first. Do not proceed.Then gather the specification to inform the design:
a. Read the feature's plan file features/plans/<slug>.md. /feature-spec normally captures the full source-issue content in its ## Requirements section — prefer this over re-fetching the issue.
b. If the plan file is missing or has no usable ## Requirements, and the feature entry references a GitHub issue (e.g. contains #6 or Closes #6), fetch it: run git remote -v to parse owner/repo from the fetch URL (HTTPS https://github.com/owner/repo.git or SSH git@github.com:owner/repo.git), then gh issue view N --repo owner/repo --comments.
c. If a fetch is needed but the git/gh commands fail (not installed, auth error, repo not found, etc.), do not proceed. Tell the user what was attempted, what failed, and ask them how to continue — e.g. "This feature references issue #6 but I was unable to fetch it (gh returned: …). Please either fix the gh setup or paste the issue content here."
Move the feature entry from features/PENDING.md to features/CURRENT.md. Update the entry's detail link if needed so it points at features/plans/<slug>.md (the link is relative to features/CURRENT.md, so written [features/plans/<slug>.md](plans/<slug>.md)).
Decide whether to use deep planning mode:
/plan if: the feature is complex (multiple systems touched, significant unknowns, non-trivial architecture decisions), OR the user has asked for deeper thinking or planning (e.g. "use plan mode" or "this is a complex change")./plan for straightforward features where the sub-tasks are obvious from the specification./plan: invoke it now before proceeding. The plan output will inform the sub-task breakdown.Before writing the design, do enough research to produce a realistic sub-task breakdown:
Flesh out the plan file features/plans/<slug>.md. It normally already exists (created by /feature-spec) with a ## Requirements section, a ## Sign-off strategy section, and a ## Design placeholder. Preserve the ## Requirements and ## Sign-off strategy sections, prepend a ## Handoff section, replace the Design placeholder with the real design, and add a ## Sub-tasks section. If the file does not exist, create it with all sections. Target structure:
# <Feature title> — Feature Plan
## Handoff
**Last updated:** YYYY-MM-DD
**Session summary:** Design and plan created. Implementation not yet started.
**Sub-task in progress:** None
**First action next session:** Begin Sub-task 1
**Open questions / decisions pending:** None
**Dead ends to avoid:** None
## Requirements
<Preserved from /feature-spec. If absent and there are no requirements beyond
the features/PENDING.md summary, this section may be omitted.>
## Sign-off strategy
<Preserved from /feature-spec — the quality bar per sign-off category that the
per-sub-task criteria below are derived from.>
## Design
<The output of the planning process goes here. For a simple feature this may be
a short paragraph. For a complex feature it may be several pages covering
architectural decisions, data layouts, component interactions, and open
questions resolved during planning. This section is the written record of
what was decided and why — enough detail that the user can review it inline
and provide corrections before implementation begins.>
## Sub-tasks
1. **<Sub-task name>** — <brief description of what success looks like>
- [ ] <sign-off criterion> (see step 6)
2. **<Sub-task name>** — ...
...
**▶ NEXT:** Sub-task 1
> Run `/feature-checkpoint` after each sub-task completes.
Keep sub-task descriptions to one line. Implementation detail goes in NOTES.md as you discover it, not here. The Design section is the exception: it should capture the key decisions and rationale from the planning process.
Give each sub-task its sign-off criteria, derived from the ## Sign-off strategy agreed at /feature-spec. Under each sub-task, add a checkbox for every sign-off that applies to it:
CLAUDE.md (### Sign-off criteria): - [ ] is pending and - [x] is satisfied; a sub-task is complete only when all its boxes are [x]. If a sub-task deliberately omits a category the strategy generally requires, note why inline. Feature-level sign-offs (e.g. a single end-of-feature /review-branch) belong in ## Sign-off strategy, not duplicated onto every sub-task.Example:
3. **Add the config parser** — handle the new format
- [ ] Testing: unit tests for the parser, passing
- [ ] Code review: /review-component the parser
- [ ] User review: user confirms the config syntax
Summarise the design and sub-task plan to the user, and present each sub-task's sign-off criteria for them to agree or adjust — this is where the user signs off on what each sub-task must satisfy before it counts as done. Update the criteria to match what they settle on. Implementation is a separate step with no slash command of its own — do not start implementing without user confirmation.