Loading...
Loading...
Compare original and translation side by side
python3 ~/.claude/scripts/feature-state.py.feature/state/design/adr/{feature-name}.mdpython3 ~/.claude/scripts/adr-query.py register --adr adr/{name}.mdpython3 ~/.claude/scripts/feature-state.py.feature/state/design/adr/{feature-name}.mdpython3 ~/.claude/scripts/adr-query.py register --adr adr/{name}.mdpython3 ~/.claude/scripts/feature-state.py init "FEATURE_NAME"python3 ~/.claude/scripts/feature-state.py context-read "" L0python3 ~/.claude/scripts/feature-state.py context-read "" L1 --phase designpython3 ~/.claude/scripts/feature-state.py context-read "" L2 --phase design.seeds/index.jsontrigger## Relevant Seeds (N matched)
### seed-YYYY-MM-DD-slug [Scope]
Trigger: "trigger condition"
Rationale: Why this matters...
Action: What to do when triggered
Breadcrumbs: file1.go, file2.py
> Incorporate into current design? [yes/no/defer]active.seeds/archived/dismissed.seeds/python3 ~/.claude/scripts/feature-state.py init "FEATURE_NAME"python3 ~/.claude/scripts/feature-state.py context-read "" L0python3 ~/.claude/scripts/feature-state.py context-read "" L1 --phase designpython3 ~/.claude/scripts/feature-state.py context-read "" L2 --phase design.seeds/index.jsontrigger## 相关种子(共N个匹配)
### seed-YYYY-MM-DD-slug [范围]
触发条件: "触发条件内容"
理由: 为何此种子相关...
操作: 触发时需执行的动作
关联文件: file1.go, file2.py
> 是否将其纳入当前设计?[是/否/延后]active.seeds/archived/dismissed.seeds/python3 ~/.claude/scripts/feature-state.py gate FEATURE design.intent-discussionhumanautopython3 ~/.claude/scripts/feature-state.py gate FEATURE design.approach-selectionundefinedpython3 ~/.claude/scripts/feature-state.py gate FEATURE design.intent-discussionhumanautopython3 ~/.claude/scripts/feature-state.py gate FEATURE design.approach-selectionundefined
If gate is `human`: present approaches and ask user to select.
If gate is `auto`: select the approach that best balances simplicity and completeness.
**Step 3: Draft Design Document**
Create the design document:
```markdown
若关卡模式为`human`:展示方案并请用户选择。
若关卡模式为`auto`:选择平衡简洁性与完整性的最佳方案。
**步骤3:起草设计文档**
创建设计文档:
```markdown
**Gate**: Design document drafted. Proceed to Validate.
**关卡**:设计文档已起草。进入验证阶段。python3 ~/.claude/scripts/feature-state.py gate FEATURE design.design-approvalhumanautopython3 ~/.claude/scripts/feature-state.py gate FEATURE design.design-approvalhumanautoecho "DESIGN_CONTENT" | python3 ~/.claude/scripts/feature-state.py checkpoint FEATURE designpython3 ~/.claude/scripts/learning-db.py record TOPIC KEY "VALUE" --category designpython3 ~/.claude/scripts/feature-state.py advance FEATUREDesign complete. Run /feature-plan to break this into implementation tasks.echo "DESIGN_CONTENT" | python3 ~/.claude/scripts/feature-state.py checkpoint FEATURE designpython3 ~/.claude/scripts/learning-db.py record TOPIC KEY "VALUE" --category designpython3 ~/.claude/scripts/feature-state.py advance FEATURE设计已完成。运行 /feature-plan 将其拆解为实现任务。| Error | Cause | Solution |
|---|---|---|
| Feature already exists | | Use |
| Gate returns exit 2 | Human input required | Present decision to user, wait for response |
| No design doc produced | Skipped design dialogue | Return to Phase 1, complete all steps |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| 功能已存在 | 重复调用 | 使用 |
| 关卡返回退出码2 | 需要人工输入 | 将决策提交给用户,等待响应 |
| 未生成设计文档 | 跳过了设计对话 | 返回至阶段1,完成所有步骤 |
| Anti-Pattern | Why Wrong | Do Instead |
|---|---|---|
| Skip design, go straight to code | Undesigned features require rework | Complete design dialogue first |
| Design everything at once | Over-engineering | Design only what's needed for this feature |
| Ignore existing context | Loses previous learnings | Load L0/L1 at prime |
| 反模式 | 问题所在 | 正确做法 |
|---|---|---|
| 跳过设计直接编码 | 未经设计的功能需要返工 | 先完成设计对话 |
| 一次性设计所有内容 | 过度设计 | 仅设计当前功能所需的内容 |
| 忽略现有上下文 | 丢失之前的经验 | 在准备阶段加载L0/L1上下文 |