cc-devflow 4.1.4 → 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +87 -1183
- package/.claude/commands/core/architecture.md +2 -2
- package/.claude/commands/core/guidelines.md +2 -2
- package/.claude/commands/core/roadmap.md +4 -4
- package/.claude/commands/core/style.md +40 -268
- package/.claude/commands/flow/CLAUDE.md +28 -0
- package/.claude/commands/flow/archive.md +2 -2
- package/.claude/commands/flow/checklist.md +9 -251
- package/.claude/commands/flow/clarify.md +9 -127
- package/.claude/commands/flow/constitution.md +1 -1
- package/.claude/commands/flow/context.md +1 -1
- package/.claude/commands/flow/dev.md +19 -395
- package/.claude/commands/flow/fix.md +1 -6
- package/.claude/commands/flow/ideate.md +13 -13
- package/.claude/commands/flow/init.md +19 -41
- package/.claude/commands/flow/new.md +12 -268
- package/.claude/commands/flow/quality.md +10 -153
- package/.claude/commands/flow/release.md +18 -131
- package/.claude/commands/flow/restart.md +15 -16
- package/.claude/commands/flow/spec.md +14 -164
- package/.claude/commands/flow/status.md +12 -12
- package/.claude/commands/flow/update.md +4 -4
- package/.claude/commands/flow/upgrade.md +6 -6
- package/.claude/commands/flow/verify.md +19 -78
- package/.claude/commands/flow/workspace.md +3 -20
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +7 -7
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +44 -96
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +1 -1
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +5 -5
- package/.claude/docs/guides/TEAM_MODE_GUIDE.md +0 -1
- package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +1 -1
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +3 -3
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +5 -5
- package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +2 -2
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +3 -3
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +33 -64
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +3 -3
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +2 -2
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +2 -2
- package/.claude/docs/templates/STYLE_TEMPLATE.md +3 -3
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +8 -9
- package/.claude/guides/workflow-guides/flow-orchestrator.md +31 -265
- package/.claude/hooks/CLAUDE.md +1 -1
- package/.claude/hooks/checklist-gate.js +4 -4
- package/.claude/hooks/inject-agent-context.ts +2 -2
- package/.claude/hooks/teammate-idle-hook.ts +1 -1
- package/.claude/rules/devflow-conventions.md +2 -93
- package/.claude/scripts/CLAUDE.md +1 -4
- package/.claude/scripts/calculate-checklist-completion.sh +2 -2
- package/.claude/scripts/check-prerequisites.sh +2 -2
- package/.claude/scripts/checklist-errors.sh +4 -4
- package/.claude/scripts/common.sh +12 -147
- package/.claude/scripts/flow-quality-full.sh +5 -5
- package/.claude/scripts/flow-quality-quick.sh +4 -4
- package/.claude/scripts/flow-workspace-init.sh +2 -2
- package/.claude/scripts/generate-clarification-report.sh +4 -4
- package/.claude/scripts/recover-workflow.sh +70 -73
- package/.claude/scripts/run-quality-gates.sh +1 -1
- package/.claude/scripts/setup-epic.sh +2 -2
- package/.claude/scripts/setup-ralph-loop.sh +2 -2
- package/.claude/scripts/validate-research.sh +1 -1
- package/.claude/scripts/verify-setup.sh +1 -1
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +88 -108
- package/.claude/skills/workflow/CLAUDE.md +24 -0
- package/.claude/skills/workflow/flow-dev/CLAUDE.md +14 -76
- package/.claude/skills/workflow/flow-dev/SKILL.md +29 -67
- package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
- package/.claude/skills/workflow/flow-init/SKILL.md +23 -186
- package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +1 -1
- package/.claude/skills/workflow/flow-init/context.jsonl +3 -3
- package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +1 -1
- package/.claude/skills/workflow/flow-init/scripts/create-requirement.sh +15 -134
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
- package/.claude/skills/workflow/flow-release/SKILL.md +20 -110
- package/.claude/skills/workflow/flow-release/context.jsonl +5 -7
- package/.claude/skills/workflow/flow-spec/CLAUDE.md +15 -101
- package/.claude/skills/workflow/flow-spec/SKILL.md +15 -518
- package/.claude/skills/workflow/flow-spec/context.jsonl +5 -7
- package/.claude/skills/workflow/flow-verify/CLAUDE.md +10 -0
- package/.claude/skills/workflow/flow-verify/SKILL.md +53 -0
- package/.claude/skills/workflow/flow-verify/context.jsonl +5 -0
- package/.claude/skills/workflow.yaml +72 -270
- package/CHANGELOG.md +72 -0
- package/README.md +91 -69
- package/README.zh-CN.md +90 -67
- package/bin/harness.js +22 -0
- package/docs/commands/README.md +34 -38
- package/docs/commands/README.zh-CN.md +34 -36
- package/docs/commands/core-roadmap.md +2 -2
- package/docs/commands/core-roadmap.zh-CN.md +2 -2
- package/docs/commands/core-style.md +29 -381
- package/docs/commands/core-style.zh-CN.md +29 -381
- package/docs/commands/flow-init.md +10 -10
- package/docs/commands/flow-init.zh-CN.md +11 -11
- package/docs/commands/flow-new.md +25 -260
- package/docs/commands/flow-new.zh-CN.md +26 -257
- package/docs/guides/getting-started.md +16 -15
- package/docs/guides/getting-started.zh-CN.md +10 -12
- package/lib/compiler/__tests__/manifest.test.js +156 -0
- package/lib/compiler/__tests__/parser.test.js +21 -0
- package/lib/compiler/index.js +17 -1
- package/lib/compiler/manifest.js +68 -6
- package/lib/compiler/parser.js +5 -0
- package/lib/harness/CLAUDE.md +21 -0
- package/lib/harness/cli.js +208 -0
- package/lib/harness/index.js +16 -0
- package/lib/harness/operations/dispatch.js +285 -0
- package/lib/harness/operations/init.js +48 -0
- package/lib/harness/operations/janitor.js +74 -0
- package/lib/harness/operations/pack.js +100 -0
- package/lib/harness/operations/plan.js +29 -0
- package/lib/harness/operations/release.js +83 -0
- package/lib/harness/operations/resume.js +44 -0
- package/lib/harness/operations/verify.js +163 -0
- package/lib/harness/planner.js +141 -0
- package/lib/harness/schemas.js +108 -0
- package/lib/harness/store.js +240 -0
- package/package.json +9 -1
- package/.claude/scripts/flow-workspace-start.sh +0 -217
- package/.claude/scripts/flow-workspace-switch.sh +0 -234
- package/.claude/skills/domain/using-git-worktrees/SKILL.md +0 -252
- package/.claude/skills/domain/using-git-worktrees/assets/SHELL_ALIASES.md +0 -133
- package/.claude/skills/domain/using-git-worktrees/context.jsonl +0 -4
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-cleanup.sh +0 -218
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-create.sh +0 -232
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-list.sh +0 -130
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-status.sh +0 -140
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-switch.sh +0 -70
|
@@ -6,159 +6,139 @@ description: CC-DevFlow workflow router and agent recommender. Use when starting
|
|
|
6
6
|
# CC-DevFlow Orchestrator
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
|
-
Guide users to the correct
|
|
9
|
+
Guide users to the correct command/skill without duplicating detailed implementation standards.
|
|
10
10
|
|
|
11
11
|
## Workflow Map
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Project-Level (run once per project)
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
/core:roadmap
|
|
17
|
-
/core:architecture → ARCHITECTURE.md
|
|
18
|
-
/core:guidelines
|
|
19
|
-
/core:style
|
|
15
|
+
```text
|
|
16
|
+
/core:roadmap → ROADMAP.md + BACKLOG.md
|
|
17
|
+
/core:architecture → ARCHITECTURE.md
|
|
18
|
+
/core:guidelines → frontend/backend guidelines
|
|
19
|
+
/core:style → STYLE.md
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
###
|
|
22
|
+
### Requirement-Level Canonical Mainline (v6)
|
|
23
23
|
|
|
24
|
-
```
|
|
25
|
-
/flow:init
|
|
26
|
-
|
|
27
|
-
/flow:clarify → clarifications/*.md (11 维度歧义扫描, 可选)
|
|
24
|
+
```text
|
|
25
|
+
/flow:init → harness:init + harness:pack
|
|
26
|
+
→ context-package.md + harness-state.json
|
|
28
27
|
↓
|
|
29
|
-
/flow:spec
|
|
30
|
-
|
|
31
|
-
- Full: PRD → Tech+UI (并行) → Epic
|
|
32
|
-
- Quick: PRD → Epic (--skip-tech --skip-ui)
|
|
33
|
-
- Backend: PRD → Tech → Epic (--skip-ui)
|
|
34
|
-
- Frontend: PRD → UI → Epic (--skip-tech)
|
|
28
|
+
/flow:spec → harness:plan
|
|
29
|
+
→ task-manifest.json
|
|
35
30
|
↓
|
|
36
|
-
/flow:dev
|
|
31
|
+
/flow:dev → harness:dispatch / harness:resume
|
|
32
|
+
→ runtime events + checkpoints + manifest status
|
|
37
33
|
↓
|
|
38
|
-
/flow:
|
|
34
|
+
/flow:verify → harness:verify
|
|
35
|
+
→ report-card.json (quick/strict gates)
|
|
39
36
|
↓
|
|
40
|
-
/flow:release →
|
|
41
|
-
|
|
42
|
-
/flow:verify → consistency check (任意阶段可调用)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### 🚀 简化流程
|
|
46
|
-
|
|
37
|
+
/flow:release → harness:release + harness:janitor
|
|
38
|
+
→ RELEASE_NOTE.md + released state
|
|
47
39
|
```
|
|
48
|
-
【精简流程】(适合小需求, 3 步)
|
|
49
|
-
/flow:init --quick → /flow:spec --skip-tech --skip-ui → /flow:dev → /flow:release
|
|
50
40
|
|
|
51
|
-
|
|
52
|
-
/flow:init → /flow:spec → /flow:dev → /flow:quality → /flow:release
|
|
41
|
+
### Bug Workflow
|
|
53
42
|
|
|
54
|
-
|
|
55
|
-
/flow:
|
|
43
|
+
```text
|
|
44
|
+
/flow:fix "BUG-123|描述" → 系统化调试与修复
|
|
56
45
|
```
|
|
57
46
|
|
|
58
|
-
###
|
|
47
|
+
### Deprecated Migrations (keep for compatibility)
|
|
59
48
|
|
|
49
|
+
```text
|
|
50
|
+
/flow:new → /flow:init → /flow:spec → /flow:dev → /flow:verify → /flow:release
|
|
51
|
+
/flow:clarify → merged into /flow:spec
|
|
52
|
+
/flow:checklist → merged into /flow:verify --strict
|
|
53
|
+
/flow:quality → merged into /flow:verify
|
|
60
54
|
```
|
|
61
|
-
/flow:fix "BUG-123|描述" → 系统化调试 (4阶段: Root Cause → Pattern → Hypothesis → TDD Fix)
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**说明**:
|
|
65
|
-
- `/flow:spec` 是统一规格命令,合并 PRD/Tech/UI/Epic 为单一命令
|
|
66
|
-
- `/flow:spec` 内部并行执行 Tech + UI,减少 ~35% 设计阶段时间
|
|
67
|
-
- `/flow:dev` 默认 Autonomous 模式(自动重试),使用 `--manual` 退出到 Manual 模式
|
|
68
55
|
|
|
69
|
-
##
|
|
56
|
+
## Routing Guide
|
|
70
57
|
|
|
71
|
-
###
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
- **Modes**: Full (default), Quick (--skip-tech --skip-ui), Backend (--skip-ui), Frontend (--skip-tech)
|
|
58
|
+
### Requirement kickoff
|
|
59
|
+
- Recommend: `/flow:init "REQ-123|Title|URLs?"`
|
|
60
|
+
- Then: `/flow:spec "REQ-123"`
|
|
75
61
|
|
|
76
|
-
###
|
|
77
|
-
-
|
|
78
|
-
-
|
|
62
|
+
### Planning/specification questions
|
|
63
|
+
- Recommend: `/flow:spec`
|
|
64
|
+
- Notes: this is the unified planning stage for executable task-manifest generation.
|
|
79
65
|
|
|
80
|
-
###
|
|
81
|
-
-
|
|
82
|
-
-
|
|
66
|
+
### Development execution / interrupted execution
|
|
67
|
+
- Recommend: `/flow:dev "REQ-123"`
|
|
68
|
+
- If interrupted/failed: `/flow:dev "REQ-123" --resume`
|
|
83
69
|
|
|
84
|
-
###
|
|
85
|
-
-
|
|
86
|
-
-
|
|
70
|
+
### QA/security/release readiness
|
|
71
|
+
- Recommend: `/flow:verify "REQ-123"`
|
|
72
|
+
- Strict gate: `/flow:verify "REQ-123" --strict`
|
|
87
73
|
|
|
88
|
-
###
|
|
89
|
-
-
|
|
90
|
-
-
|
|
74
|
+
### Release
|
|
75
|
+
- Recommend: `/flow:release "REQ-123"`
|
|
76
|
+
- Release is blocked when report-card overall is fail.
|
|
91
77
|
|
|
92
|
-
###
|
|
93
|
-
-
|
|
94
|
-
-
|
|
78
|
+
### Code review requests
|
|
79
|
+
- Recommend: `/flow:verify "REQ-123" --strict`
|
|
80
|
+
- Optional deep review: `/util:code-review "<diff>"`
|
|
95
81
|
|
|
96
82
|
## Phase Gates (Quick Reference)
|
|
97
83
|
|
|
98
84
|
### Entry Gates
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
- **flow:release Entry**: quality_complete == true
|
|
85
|
+
- `flow:init`: repository and requirement id are valid.
|
|
86
|
+
- `flow:spec`: `context-package.md` and `harness-state.json` exist.
|
|
87
|
+
- `flow:dev`: `task-manifest.json` exists and is schema-valid.
|
|
88
|
+
- `flow:verify`: task dispatch completed or at least one dispatch/resume run exists.
|
|
89
|
+
- `flow:release`: `report-card.json.overall == pass`.
|
|
105
90
|
|
|
106
91
|
### Exit Gates
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
92
|
+
- `flow:init`: requirement context packaged.
|
|
93
|
+
- `flow:spec`: task-manifest generated.
|
|
94
|
+
- `flow:dev`: task statuses updated with runtime checkpoints/events.
|
|
95
|
+
- `flow:verify`: report-card emitted (quick/strict/review sections).
|
|
96
|
+
- `flow:release`: release note generated and harness state marked released.
|
|
112
97
|
|
|
113
|
-
## State
|
|
98
|
+
## State → Recommended Command
|
|
114
99
|
|
|
115
100
|
```yaml
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
→ Alternative: /flow:clarify (optional)
|
|
101
|
+
no_requirement_context:
|
|
102
|
+
recommend: /flow:init
|
|
119
103
|
|
|
120
|
-
|
|
121
|
-
|
|
104
|
+
initialized_or_context_packed:
|
|
105
|
+
recommend: /flow:spec
|
|
122
106
|
|
|
123
|
-
|
|
124
|
-
|
|
107
|
+
manifest_exists_with_pending_or_failed:
|
|
108
|
+
recommend: /flow:dev
|
|
109
|
+
alternative: /flow:dev --resume
|
|
125
110
|
|
|
126
|
-
|
|
127
|
-
|
|
111
|
+
manifest_all_passed_without_report_card:
|
|
112
|
+
recommend: /flow:verify --strict
|
|
128
113
|
|
|
129
|
-
|
|
130
|
-
|
|
114
|
+
report_card_fail:
|
|
115
|
+
recommend: /flow:dev --resume
|
|
116
|
+
then: /flow:verify --strict
|
|
131
117
|
|
|
132
|
-
|
|
133
|
-
|
|
118
|
+
report_card_pass:
|
|
119
|
+
recommend: /flow:release
|
|
120
|
+
|
|
121
|
+
released:
|
|
122
|
+
recommend: /flow:archive (optional)
|
|
134
123
|
```
|
|
135
124
|
|
|
136
125
|
## Auxiliary Commands
|
|
137
126
|
|
|
138
|
-
###
|
|
139
|
-
- `/flow:status` -
|
|
140
|
-
- `/flow:update "REQ-123" "T012"` -
|
|
141
|
-
- `/flow:restart "REQ-123" --from=
|
|
142
|
-
|
|
143
|
-
### Upgrade and Analysis
|
|
144
|
-
- `/flow:upgrade "REQ-123" --analyze` - PRD version upgrade impact analysis
|
|
145
|
-
- `/flow:constitution` - Constitution management
|
|
146
|
-
- `/flow:verify "REQ-123"` - Comprehensive consistency verification
|
|
147
|
-
|
|
148
|
-
### Bug Fix
|
|
149
|
-
- `/flow:fix "BUG-123|描述"` - 系统化 BUG 修复
|
|
150
|
-
- `/util:problem-analyzer "<issue>"` - Problem diagnosis
|
|
127
|
+
### Progress and recovery
|
|
128
|
+
- `/flow:status` - query requirement progress
|
|
129
|
+
- `/flow:update "REQ-123" "T012"` - update task progress
|
|
130
|
+
- `/flow:restart "REQ-123" --from=dev` - recover interrupted workflow state
|
|
151
131
|
|
|
152
|
-
###
|
|
153
|
-
- `/flow:
|
|
154
|
-
- `/
|
|
132
|
+
### Upgrade and governance
|
|
133
|
+
- `/flow:upgrade "REQ-123" --analyze` - PRD version impact analysis
|
|
134
|
+
- `/flow:constitution` - constitution governance
|
|
135
|
+
- `/flow:verify "REQ-123"` - consistency and quality verification
|
|
155
136
|
|
|
156
137
|
## Design Principle
|
|
157
138
|
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
- ✅ Links to detailed documentation
|
|
139
|
+
This skill only does routing:
|
|
140
|
+
- Which command to run next
|
|
141
|
+
- Which gate blocks progress
|
|
142
|
+
- Which migration path applies for deprecated commands
|
|
163
143
|
|
|
164
|
-
|
|
144
|
+
Detailed quality standards stay in command files and workflow skills.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# workflow/
|
|
2
|
+
> L2 | 父级: /Users/dimon/001Area/80-CodeWorld/002-devflow/cc-devflow/.claude/CLAUDE.md
|
|
3
|
+
|
|
4
|
+
成员清单
|
|
5
|
+
flow-init/SKILL.md: 需求初始化入口,调用 harness:init + harness:pack。
|
|
6
|
+
flow-init/context.jsonl: flow-init 的上下文注入定义。
|
|
7
|
+
flow-spec/SKILL.md: 计划生成入口,调用 harness:plan 产出 task-manifest。
|
|
8
|
+
flow-spec/context.jsonl: flow-spec 的上下文注入定义。
|
|
9
|
+
flow-spec/team-config.json: 旧 Team 配置资产(兼容保留,当前主链不依赖)。
|
|
10
|
+
flow-dev/SKILL.md: 执行入口,调用 harness:dispatch/resume 并写 checkpoint/events。
|
|
11
|
+
flow-dev/context.jsonl: flow-dev 的上下文注入定义。
|
|
12
|
+
flow-dev/dev-implementer.jsonl: 旧 dev-implementer 上下文(兼容保留)。
|
|
13
|
+
flow-verify/SKILL.md: 质量门禁入口,调用 harness:verify 输出 report-card。
|
|
14
|
+
flow-verify/context.jsonl: flow-verify 的上下文注入定义。
|
|
15
|
+
flow-release/SKILL.md: 发布入口,调用 harness:release + harness:janitor。
|
|
16
|
+
flow-release/context.jsonl: flow-release 的上下文注入定义。
|
|
17
|
+
flow-quality/SKILL.md: 旧质量流程技能(迁移过渡保留)。
|
|
18
|
+
flow-quality/context.jsonl: 旧质量流程上下文(迁移过渡保留)。
|
|
19
|
+
flow-fix/SKILL.md: Bug 修复流程技能。
|
|
20
|
+
flow-fix/context.jsonl: flow-fix 的上下文注入定义。
|
|
21
|
+
|
|
22
|
+
法则: 成员完整·一行一文件·父级链接·技术词前置
|
|
23
|
+
|
|
24
|
+
[PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -1,78 +1,16 @@
|
|
|
1
|
-
# flow-dev/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
| `dev-implementer.jsonl` | dev-implementer Agent 专用上下文 [NEW: v4.4] | ~10 |
|
|
16
|
-
| `scripts/entry-gate.sh` | 入口检查:TASKS.md 存在、状态验证 | ~100 |
|
|
17
|
-
| `scripts/exit-gate.sh` | 出口检查:任务完成度、测试验证 | ~100 |
|
|
18
|
-
| `scripts/task-orchestrator.sh` | 任务调度:解析 TASKS.md、标记完成 | ~100 |
|
|
19
|
-
| `references/dev-implementer.md` | Agent 指令链接 | symlink |
|
|
20
|
-
| `assets/IMPLEMENTATION_PLAN_TEMPLATE.md` | 实现计划模板 | ~80 |
|
|
21
|
-
|
|
22
|
-
## Context Injection (v4.4)
|
|
23
|
-
|
|
24
|
-
Hook `inject-agent-context.ts` 在 Task 调用前自动注入上下文:
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
Task(subagent_type="dev-implementer", prompt="...")
|
|
28
|
-
↓
|
|
29
|
-
Hook 检测到 dev-implementer
|
|
30
|
-
↓
|
|
31
|
-
读取 dev-implementer.jsonl
|
|
32
|
-
↓
|
|
33
|
-
解析 JSONL,加载文件内容
|
|
34
|
-
↓
|
|
35
|
-
注入到 prompt 中
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
JSONL 格式 (Trellis 风格):
|
|
39
|
-
```jsonl
|
|
40
|
-
{"file": "devflow/requirements/{REQ}/TASKS.md", "reason": "Task list with DoD"}
|
|
41
|
-
{"file": "devflow/spec/frontend/index.md", "reason": "Frontend conventions", "optional": true}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## TDD Iron Law
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Execution Flow
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
Entry Gate → Task Loop (TDD) → Exit Gate
|
|
54
|
-
|
|
55
|
-
For each task:
|
|
56
|
-
1. Protocol 2: 读取任务 DoD
|
|
57
|
-
2. Write failing test (Phase 2)
|
|
58
|
-
3. Verify test fails
|
|
59
|
-
4. Write implementation (Phase 3)
|
|
60
|
-
5. Verify test passes
|
|
61
|
-
6. Mark task [x]
|
|
62
|
-
7. Protocol 3: 读取下一任务 + ERROR_LOG
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Mode Matrix
|
|
66
|
-
|
|
67
|
-
| Mode | Flag | Behavior |
|
|
68
|
-
|------|------|----------|
|
|
69
|
-
| Autonomous | (default) | 自动重试,迭代直到完成 |
|
|
70
|
-
| Manual | `--manual` | 遇错停止,等待用户 |
|
|
71
|
-
|
|
72
|
-
## Agent Reference
|
|
73
|
-
|
|
74
|
-
- `references/dev-implementer.md` → `.claude/agents/dev-implementer.md`
|
|
75
|
-
|
|
76
|
-
---
|
|
1
|
+
# flow-dev/
|
|
2
|
+
> L2 | 父级: /Users/dimon/001Area/80-CodeWorld/002-devflow/cc-devflow/.claude/skills/workflow/CLAUDE.md
|
|
3
|
+
|
|
4
|
+
成员清单
|
|
5
|
+
SKILL.md: flow:dev 的核心指令,定义 dispatch/resume 的参数与失败恢复策略。
|
|
6
|
+
context.jsonl: flow-dev 上下文注入定义(task-manifest/context-package/runtime)。
|
|
7
|
+
dev-implementer.jsonl: 旧 Agent 上下文(兼容保留,非主链关键路径)。
|
|
8
|
+
scripts/entry-gate.sh: 旧入口脚本资产(兼容保留)。
|
|
9
|
+
scripts/exit-gate.sh: 旧出口脚本资产(兼容保留)。
|
|
10
|
+
scripts/task-orchestrator.sh: 旧任务调度脚本资产(兼容保留)。
|
|
11
|
+
assets/IMPLEMENTATION_PLAN_TEMPLATE.md: 旧实现计划模板资产(兼容保留)。
|
|
12
|
+
references/dev-implementer.md: 旧 Agent 指令引用(兼容保留)。
|
|
13
|
+
|
|
14
|
+
法则: 成员完整·一行一文件·父级链接·技术词前置
|
|
77
15
|
|
|
78
16
|
[PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-dev
|
|
3
|
-
description: 'Execute
|
|
3
|
+
description: 'Execute task-manifest with dependency-aware parallel dispatch and checkpoint recovery. Use when implementing planned tasks for a requirement.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Flow-Dev Skill
|
|
@@ -9,88 +9,50 @@ description: 'Execute development tasks with TDD and Autonomous mode. Usage: /fl
|
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## TDD Iron Law
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### TDD Checkpoint
|
|
21
|
-
|
|
22
|
-
```yaml
|
|
23
|
-
⚠️ TEST VERIFICATION CHECKPOINT:
|
|
24
|
-
1. 运行所有 Phase 2 测试
|
|
25
|
-
2. 验证所有新测试 FAIL
|
|
26
|
-
3. 只有全部 FAIL 后才能进入 Phase 3
|
|
27
|
-
4. 如果已经写了实现代码 → DELETE 重来
|
|
28
|
-
```
|
|
12
|
+
执行 `task-manifest.json` 中的任务,默认并行调度并写入 checkpoint/events 供恢复。
|
|
29
13
|
|
|
30
14
|
## Input Format
|
|
31
15
|
|
|
16
|
+
```bash
|
|
17
|
+
/flow:dev "REQ_ID" [--parallel N] [--resume] [--max-retries N]
|
|
32
18
|
```
|
|
33
|
-
/flow-dev "REQ_ID" [--manual] [--max-iterations N] [--task T###]
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
- **默认**: Autonomous 模式 (自动重试)
|
|
37
|
-
- **--manual**: Manual 模式 (遇错停止)
|
|
38
|
-
- **--max-iterations**: 最大迭代次数 (默认 10)
|
|
39
|
-
- **--task**: 从指定任务开始
|
|
40
19
|
|
|
41
|
-
##
|
|
20
|
+
## Execution Steps
|
|
42
21
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Execution Flow
|
|
50
|
-
|
|
51
|
-
### Stage 1: Entry Gate
|
|
52
|
-
|
|
53
|
-
1. TASKS.md 存在
|
|
54
|
-
2. EPIC.md 存在
|
|
55
|
-
3. Status: `epic_complete`
|
|
56
|
-
|
|
57
|
-
### Stage 2: Task Execution (Ralph Loop)
|
|
22
|
+
1. 解析参数:
|
|
23
|
+
- 默认 `parallel = 3`
|
|
24
|
+
- 默认不 resume
|
|
25
|
+
2. 分支执行:
|
|
26
|
+
- 普通执行:
|
|
58
27
|
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
1. Protocol 2: 读取任务 DoD
|
|
62
|
-
2. 执行任务
|
|
63
|
-
3. 验证完成
|
|
64
|
-
4. 标记 [x]
|
|
65
|
-
5. Protocol 3: 读取下一任务 + ERROR_LOG
|
|
28
|
+
```bash
|
|
29
|
+
npm run harness:dispatch -- --change-id "${REQ_ID}" --parallel ${PARALLEL} [--max-retries ${MAX_RETRIES}]
|
|
66
30
|
```
|
|
67
31
|
|
|
68
|
-
|
|
32
|
+
- 恢复执行:
|
|
69
33
|
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
1. Protocol 4: 读取 ERROR_LOG.md
|
|
73
|
-
2. 记录错误到 ERROR_LOG.md
|
|
74
|
-
3. Autonomous: 自动重试
|
|
75
|
-
4. Manual: 停止等待
|
|
34
|
+
```bash
|
|
35
|
+
npm run harness:resume -- --change-id "${REQ_ID}" --parallel ${PARALLEL} [--max-retries ${MAX_RETRIES}]
|
|
76
36
|
```
|
|
77
37
|
|
|
78
|
-
|
|
38
|
+
3. 检查执行结果:
|
|
39
|
+
- `task-manifest.json` 状态更新
|
|
40
|
+
- `.harness/runtime/${REQ_ID}/<TASK_ID>/events.jsonl`
|
|
41
|
+
- `.harness/runtime/${REQ_ID}/<TASK_ID>/checkpoint.json`
|
|
79
42
|
|
|
80
|
-
|
|
81
|
-
2. 测试通过
|
|
82
|
-
3. Status: `development_complete`
|
|
43
|
+
## Exit Criteria
|
|
83
44
|
|
|
84
|
-
|
|
45
|
+
- 所有任务状态为 `passed` 或 `skipped`
|
|
46
|
+
- 没有 `running` 残留状态
|
|
85
47
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
48
|
+
## Failure Handling
|
|
49
|
+
|
|
50
|
+
- 若存在 `failed` 任务:
|
|
51
|
+
1. 修复失败原因
|
|
52
|
+
2. 重新运行 `--resume`
|
|
91
53
|
|
|
92
54
|
## Next Step
|
|
93
55
|
|
|
94
|
-
```
|
|
95
|
-
/flow
|
|
56
|
+
```bash
|
|
57
|
+
/flow:verify "${REQ_ID}"
|
|
96
58
|
```
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
{"file": "devflow/requirements/{REQ}/
|
|
2
|
-
{"file": "devflow/requirements/{REQ}/
|
|
3
|
-
{"file": "devflow/requirements/{REQ}/
|
|
4
|
-
{"file": "
|
|
5
|
-
{"file": "devflow/requirements/{REQ}/TECH_DESIGN.md", "reason": "Technical design", "optional": true}
|
|
6
|
-
{"file": "devflow/spec/frontend/index.md", "reason": "Frontend conventions", "optional": true}
|
|
7
|
-
{"file": "devflow/spec/backend/index.md", "reason": "Backend conventions", "optional": true}
|
|
8
|
-
{"file": ".claude/rules/project-constitution.md", "reason": "Quality rules"}
|
|
1
|
+
{"file": "devflow/requirements/{REQ}/task-manifest.json", "reason": "Executable task graph"}
|
|
2
|
+
{"file": "devflow/requirements/{REQ}/context-package.md", "reason": "Execution constraints", "optional": true}
|
|
3
|
+
{"file": "devflow/requirements/{REQ}/harness-state.json", "reason": "Lifecycle status", "optional": true}
|
|
4
|
+
{"file": ".claude/rules/project-constitution.md", "reason": "Quality rules and constraints"}
|