cc-devflow 2.5.0 → 4.1.1
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 +1065 -53
- package/.claude/agents/dev-implementer.md +195 -0
- package/.claude/commands/{flow-archive.md → flow/archive.md} +46 -11
- package/.claude/commands/flow/context.md +150 -0
- package/.claude/commands/flow/delta.md +245 -0
- package/.claude/commands/{flow-dev.md → flow/dev.md} +112 -11
- package/.claude/commands/flow/init.md +45 -0
- package/.claude/commands/flow/new.md +279 -0
- package/.claude/commands/flow/quality.md +159 -0
- package/.claude/commands/flow/spec.md +186 -0
- package/.claude/commands/flow/workspace.md +146 -0
- package/.claude/commands/{cancel-ralph.md → util/cancel-ralph.md} +1 -0
- package/.claude/config/quality-gates.yml +305 -0
- package/.claude/docs/guides/TEAM_MODE_GUIDE.md +313 -0
- package/.claude/docs/templates/DELTA_SPEC_TEMPLATE.md +91 -0
- package/.claude/docs/templates/DESIGN_DECISIONS_TEMPLATE.md +151 -0
- package/.claude/docs/templates/JOURNAL_TEMPLATE.md +75 -0
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +51 -91
- package/.claude/docs/templates/_shared/CLAUDE.md +36 -0
- package/.claude/docs/templates/_shared/CONSTITUTION_CHECK.md +125 -0
- package/.claude/docs/templates/_shared/VALIDATION_CHECKLIST.md +187 -0
- package/.claude/docs/templates/_shared/YAML_FRONTMATTER.md +164 -0
- package/.claude/docs/templates/context/dev.jsonl.template +6 -0
- package/.claude/docs/templates/context/epic.jsonl.template +5 -0
- package/.claude/docs/templates/context/prd.jsonl.template +4 -0
- package/.claude/docs/templates/context/research.jsonl.template +4 -0
- package/.claude/docs/templates/context/review.jsonl.template +5 -0
- package/.claude/docs/templates/context/tech.jsonl.template +5 -0
- package/.claude/hooks/CLAUDE.md +342 -0
- package/.claude/hooks/inject-agent-context.ts +480 -0
- package/.claude/hooks/inject-skill-context.ts +359 -0
- package/.claude/hooks/ralph-loop.ts +931 -0
- package/.claude/hooks/task-completed-hook.ts +593 -0
- package/.claude/hooks/teammate-idle-hook.ts +690 -0
- package/.claude/hooks/types/team-types.d.ts +238 -0
- package/.claude/rules/devflow-conventions.md +82 -9
- package/.claude/scripts/archive-requirement.sh +44 -1
- package/.claude/scripts/common.sh +670 -3
- package/.claude/scripts/delta-parser.ts +527 -0
- package/.claude/scripts/detect-file-conflicts.sh +151 -0
- package/.claude/scripts/flow-context-add.sh +134 -0
- package/.claude/scripts/flow-context-init.sh +133 -0
- package/.claude/scripts/flow-context-validate.sh +144 -0
- package/.claude/scripts/flow-delta-apply.sh +297 -0
- package/.claude/scripts/flow-delta-archive.sh +71 -0
- package/.claude/scripts/flow-delta-create.sh +202 -0
- package/.claude/scripts/flow-delta-list.sh +142 -0
- package/.claude/scripts/flow-delta-status.sh +235 -0
- package/.claude/scripts/flow-quality-full.sh +184 -0
- package/.claude/scripts/flow-quality-quick.sh +64 -0
- package/.claude/scripts/flow-workspace-init.sh +117 -0
- package/.claude/scripts/flow-workspace-record.sh +164 -0
- package/.claude/scripts/flow-workspace-start.sh +88 -0
- package/.claude/scripts/get-workflow-status.sh +415 -0
- package/.claude/scripts/parse-task-dependencies.js +334 -0
- package/.claude/scripts/record-quality-error.sh +165 -0
- package/.claude/scripts/run-quality-gates.sh +242 -0
- package/.claude/scripts/team-dev-init.sh +319 -0
- package/.claude/scripts/team-state-recovery.sh +229 -0
- package/.claude/scripts/workflow-status.ts +433 -0
- package/.claude/settings.json +19 -0
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +85 -200
- package/.claude/skills/domain/using-git-worktrees/SKILL.md +252 -0
- package/.claude/skills/domain/using-git-worktrees/assets/SHELL_ALIASES.md +133 -0
- package/.claude/skills/domain/using-git-worktrees/context.jsonl +4 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-cleanup.sh +218 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-create.sh +232 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-list.sh +130 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-status.sh +140 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-switch.sh +70 -0
- package/.claude/skills/utility/skill-creator/LICENSE.txt +202 -0
- package/.claude/skills/utility/skill-creator/SKILL.md +356 -0
- package/.claude/skills/utility/skill-creator/references/output-patterns.md +82 -0
- package/.claude/skills/utility/skill-creator/references/workflows.md +28 -0
- package/.claude/skills/utility/skill-creator/scripts/init_skill.py +303 -0
- package/.claude/skills/utility/skill-creator/scripts/package_skill.py +110 -0
- package/.claude/skills/utility/skill-creator/scripts/quick_validate.py +95 -0
- package/.claude/skills/workflow/flow-dev/CLAUDE.md +78 -0
- package/.claude/skills/workflow/flow-dev/SKILL.md +96 -0
- package/.claude/skills/workflow/flow-dev/assets/IMPLEMENTATION_PLAN_TEMPLATE.md +71 -0
- package/.claude/skills/workflow/flow-dev/context.jsonl +8 -0
- package/.claude/skills/workflow/flow-dev/dev-implementer.jsonl +8 -0
- package/.claude/skills/workflow/flow-dev/scripts/entry-gate.sh +116 -0
- package/.claude/skills/workflow/flow-dev/scripts/exit-gate.sh +101 -0
- package/.claude/skills/workflow/flow-dev/scripts/task-orchestrator.sh +106 -0
- package/.claude/skills/workflow/flow-fix/SKILL.md +105 -0
- package/.claude/skills/workflow/flow-fix/context.jsonl +6 -0
- package/.claude/skills/workflow/flow-fix/references/bug-analyzer.md +381 -0
- package/.claude/skills/workflow/flow-init/SKILL.md +211 -0
- package/.claude/skills/workflow/flow-init/assets/BRAINSTORM_TEMPLATE.md +148 -0
- package/.claude/skills/workflow/flow-init/assets/INIT_FLOW_TEMPLATE.md +198 -0
- package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +276 -0
- package/.claude/skills/workflow/flow-init/context.jsonl +5 -0
- package/.claude/skills/workflow/flow-init/references/flow-researcher.md +132 -0
- package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +240 -0
- package/.claude/skills/workflow/flow-init/scripts/consolidate-research.sh +182 -0
- package/.claude/skills/workflow/flow-init/scripts/create-requirement.sh +523 -0
- package/.claude/skills/workflow/flow-init/scripts/generate-research-tasks.sh +157 -0
- package/.claude/skills/workflow/flow-init/scripts/populate-research-tasks.sh +284 -0
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +340 -0
- package/.claude/skills/workflow/flow-quality/SKILL.md +94 -0
- package/.claude/skills/workflow/flow-quality/context.jsonl +6 -0
- package/.claude/skills/workflow/flow-quality/references/code-quality-reviewer.md +205 -0
- package/.claude/skills/workflow/flow-quality/references/qa-tester.md +313 -0
- package/.claude/skills/workflow/flow-quality/references/security-reviewer.md +314 -0
- package/.claude/skills/workflow/flow-quality/references/spec-reviewer.md +221 -0
- package/.claude/skills/workflow/flow-release/SKILL.md +126 -0
- package/.claude/skills/workflow/flow-release/context.jsonl +7 -0
- package/.claude/skills/workflow/flow-release/references/release-manager.md +295 -0
- package/.claude/skills/workflow/flow-spec/CLAUDE.md +103 -0
- package/.claude/skills/workflow/flow-spec/SKILL.md +545 -0
- package/.claude/skills/workflow/flow-spec/context.jsonl +7 -0
- package/.claude/skills/workflow/flow-spec/scripts/entry-gate.sh +194 -0
- package/.claude/skills/workflow/flow-spec/scripts/exit-gate.sh +244 -0
- package/.claude/skills/workflow/flow-spec/scripts/parallel-orchestrator.sh +205 -0
- package/.claude/skills/workflow/flow-spec/scripts/team-communication.sh +353 -0
- package/.claude/skills/workflow/flow-spec/scripts/team-init.sh +195 -0
- package/.claude/skills/workflow/flow-spec/scripts/test-team-mode.sh +496 -0
- package/.claude/skills/workflow/flow-spec/team-config.json +165 -0
- package/.claude/skills/workflow.yaml +417 -0
- package/CHANGELOG.md +268 -0
- package/README.md +206 -50
- package/README.zh-CN.md +219 -57
- package/lib/compiler/CLAUDE.md +77 -46
- package/lib/compiler/__tests__/multi-module-emitters.test.js +508 -0
- package/lib/compiler/context-expander.js +179 -0
- package/lib/compiler/emitters/antigravity-emitter.js +195 -5
- package/lib/compiler/emitters/base-emitter.js +217 -2
- package/lib/compiler/emitters/codex-emitter.js +200 -4
- package/lib/compiler/emitters/cursor-emitter.js +307 -3
- package/lib/compiler/emitters/qwen-emitter.js +196 -4
- package/lib/compiler/index.js +197 -2
- package/lib/compiler/platforms.js +270 -21
- package/package.json +2 -2
- package/.claude/commands/flow-epic.md +0 -183
- package/.claude/commands/flow-init.md +0 -370
- package/.claude/commands/flow-new.md +0 -442
- package/.claude/commands/flow-prd.md +0 -144
- package/.claude/commands/flow-qa.md +0 -93
- package/.claude/commands/flow-review.md +0 -257
- package/.claude/commands/flow-tech.md +0 -142
- package/.claude/commands/flow-ui.md +0 -189
- package/.claude/skills/file-header-guardian/SKILL.md +0 -56
- package/.claude/skills/skill-developer/ADVANCED.md +0 -197
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
- package/.claude/skills/skill-developer/SKILL.md +0 -426
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
- package/.claude/skills/writing-skills/SKILL.md +0 -655
- package/.claude/skills/writing-skills/anthropic-best-practices.md +0 -1150
- package/.claude/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
- package/.claude/skills/writing-skills/graphviz-conventions.dot +0 -172
- package/.claude/skills/writing-skills/persuasion-principles.md +0 -187
- package/.claude/skills/writing-skills/render-graphs.js +0 -168
- package/.claude/skills/writing-skills/testing-skills-with-subagents.md +0 -384
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/affected-repos.txt +0 -1
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/affected-repos.txt +0 -1
- /package/.claude/commands/{core-architecture.md → core/architecture.md} +0 -0
- /package/.claude/commands/{core-guidelines.md → core/guidelines.md} +0 -0
- /package/.claude/commands/{core-roadmap.md → core/roadmap.md} +0 -0
- /package/.claude/commands/{core-style.md → core/style.md} +0 -0
- /package/.claude/commands/{flow-checklist.md → flow/checklist.md} +0 -0
- /package/.claude/commands/{flow-clarify.md → flow/clarify.md} +0 -0
- /package/.claude/commands/{flow-constitution.md → flow/constitution.md} +0 -0
- /package/.claude/commands/{flow-fix.md → flow/fix.md} +0 -0
- /package/.claude/commands/{flow-ideate.md → flow/ideate.md} +0 -0
- /package/.claude/commands/{flow-release.md → flow/release.md} +0 -0
- /package/.claude/commands/{flow-restart.md → flow/restart.md} +0 -0
- /package/.claude/commands/{flow-status.md → flow/status.md} +0 -0
- /package/.claude/commands/{flow-update.md → flow/update.md} +0 -0
- /package/.claude/commands/{flow-upgrade.md → flow/upgrade.md} +0 -0
- /package/.claude/commands/{flow-verify.md → flow/verify.md} +0 -0
- /package/.claude/commands/{code-review-high.md → util/code-review.md} +0 -0
- /package/.claude/commands/{git-commit.md → util/git-commit.md} +0 -0
- /package/.claude/commands/{problem-analyzer.md → util/problem-analyzer.md} +0 -0
- /package/.claude/skills/{flow-attention-refresh → domain/attention-refresh}/SKILL.md +0 -0
- /package/.claude/skills/{flow-brainstorming → domain/brainstorming}/SKILL.md +0 -0
- /package/.claude/skills/{flow-debugging → domain/debugging}/SKILL.md +0 -0
- /package/.claude/skills/{flow-finishing-branch → domain/finishing-branch}/SKILL.md +0 -0
- /package/.claude/skills/{flow-receiving-review → domain/receiving-review}/SKILL.md +0 -0
- /package/.claude/skills/{flow-tdd → domain/tdd}/SKILL.md +0 -0
- /package/.claude/skills/{verification-before-completion → domain/verification}/SKILL.md +0 -0
- /package/.claude/skills/{constitution-guardian → guardrail/constitution-guardian}/SKILL.md +0 -0
- /package/.claude/skills/{devflow-tdd-enforcer → guardrail/tdd-enforcer}/SKILL.md +0 -0
- /package/.claude/skills/{devflow-constitution-quick-ref → utility/constitution-quick-ref}/SKILL.md +0 -0
- /package/.claude/skills/{devflow-file-standards → utility/file-standards}/SKILL.md +0 -0
- /package/.claude/skills/{fractal-docs-generator → utility/fractal-docs}/SKILL.md +0 -0
- /package/.claude/skills/{journey-coherence-checker → utility/journey-checker}/SKILL.md +0 -0
- /package/.claude/skills/{journey-coherence-checker → utility/journey-checker}/pressure-scenarios.md +0 -0
- /package/.claude/skills/{npm-release → utility/npm-release}/SKILL.md +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-spec
|
|
3
|
+
description: 'Unified specification phase: PRD → Tech+UI (parallel) → Epic/Tasks. Usage: /flow-spec "REQ-123" [--skip-tech] [--skip-ui]'
|
|
4
|
+
scripts:
|
|
5
|
+
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
|
+
validate_research: .claude/scripts/validate-research.sh
|
|
7
|
+
validate_constitution: .claude/scripts/validate-constitution.sh
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Flow-Spec - 统一规格阶段命令
|
|
11
|
+
|
|
12
|
+
> **v4.1 新增**: 合并 flow-prd/flow-tech/flow-ui/flow-epic 为单一命令
|
|
13
|
+
|
|
14
|
+
## User Input
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
$ARGUMENTS = "REQ_ID [--skip-tech] [--skip-ui]"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
若未提供 REQ_ID 则根据当前分支或 `DEVFLOW_REQ_ID` 自动解析。
|
|
21
|
+
|
|
22
|
+
## 命令格式
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Full Mode (默认) - PRD + Tech + UI + Epic
|
|
26
|
+
/flow-spec "REQ-123"
|
|
27
|
+
|
|
28
|
+
# Quick Mode (小需求) - PRD + Epic only
|
|
29
|
+
/flow-spec "REQ-123" --skip-tech --skip-ui
|
|
30
|
+
|
|
31
|
+
# Backend Only - PRD + Tech + Epic
|
|
32
|
+
/flow-spec "REQ-123" --skip-ui
|
|
33
|
+
|
|
34
|
+
# Frontend Only - PRD + UI + Epic
|
|
35
|
+
/flow-spec "REQ-123" --skip-tech
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Mode Matrix
|
|
39
|
+
|
|
40
|
+
| Mode | Flags | Agents | Output |
|
|
41
|
+
|------|-------|--------|--------|
|
|
42
|
+
| Full | (default) | PRD + Tech + UI + Epic | PRD.md, TECH_DESIGN.md, UI_PROTOTYPE.html, EPIC.md, TASKS.md |
|
|
43
|
+
| Quick | `--skip-tech --skip-ui` | PRD + Epic | PRD.md, EPIC.md, TASKS.md |
|
|
44
|
+
| Backend | `--skip-ui` | PRD + Tech + Epic | PRD.md, TECH_DESIGN.md, EPIC.md, TASKS.md |
|
|
45
|
+
| Frontend | `--skip-tech` | PRD + UI + Epic | PRD.md, UI_PROTOTYPE.html, EPIC.md, TASKS.md |
|
|
46
|
+
|
|
47
|
+
## 执行流程
|
|
48
|
+
|
|
49
|
+
**加载 Skill 指令**:
|
|
50
|
+
```
|
|
51
|
+
→ 读取 .claude/skills/workflow/flow-spec/SKILL.md
|
|
52
|
+
→ 按 SKILL.md 中定义的 Execution Flow 执行
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 阶段 1: Entry Gate
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
Prerequisites:
|
|
59
|
+
1. REQ_ID 解析:
|
|
60
|
+
- 从参数获取
|
|
61
|
+
- 或从当前分支推断 (feature/REQ-XXX-*)
|
|
62
|
+
- 或从 orchestration_status.json 获取
|
|
63
|
+
|
|
64
|
+
2. BRAINSTORM.md 存在:
|
|
65
|
+
- 路径: devflow/requirements/${REQ_ID}/BRAINSTORM.md
|
|
66
|
+
- 必须包含: 需求描述、目标用户、核心功能
|
|
67
|
+
|
|
68
|
+
3. Research 完成:
|
|
69
|
+
- 路径: devflow/requirements/${REQ_ID}/research/research.md
|
|
70
|
+
- 无 TODO/PLACEHOLDER
|
|
71
|
+
|
|
72
|
+
4. Status Check:
|
|
73
|
+
- orchestration_status.status ∈ {"initialized", "spec_failed"}
|
|
74
|
+
|
|
75
|
+
5. Constitution Gate:
|
|
76
|
+
- 读取 BRAINSTORM.md 验证需求边界
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 阶段 2: PRD Generation (Sequential)
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
Agent: prd-writer (research-type)
|
|
83
|
+
Input:
|
|
84
|
+
- BRAINSTORM.md
|
|
85
|
+
- research/research.md
|
|
86
|
+
- research/internal/codebase-overview.md
|
|
87
|
+
|
|
88
|
+
Output:
|
|
89
|
+
- PRD.md
|
|
90
|
+
|
|
91
|
+
Rules:
|
|
92
|
+
- ANTI-EXPANSION: 未提及 → [NEEDS CLARIFICATION]
|
|
93
|
+
- NO TECH DETAILS: 只关注 WHAT/WHY
|
|
94
|
+
- STORY INDEPENDENCE: 每个故事有独立测试
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 阶段 3: Tech + UI (Parallel)
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
Parallel Execution:
|
|
101
|
+
tech-architect (if !--skip-tech):
|
|
102
|
+
Input: PRD.md, research/codebase-overview.md
|
|
103
|
+
Output: TECH_DESIGN.md, data-model.md, contracts/
|
|
104
|
+
|
|
105
|
+
ui-designer (if !--skip-ui AND UI detected):
|
|
106
|
+
Input: PRD.md, STYLE.md (optional)
|
|
107
|
+
Output: UI_PROTOTYPE.html, ui_design_strategy.md
|
|
108
|
+
|
|
109
|
+
Method:
|
|
110
|
+
- 使用 Task tool 并行调用两个 agent
|
|
111
|
+
- 等待两者完成后进入 Stage 4
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 阶段 4: Epic Generation (Sequential)
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
Agent: planner (research-type)
|
|
118
|
+
Input:
|
|
119
|
+
- PRD.md
|
|
120
|
+
- TECH_DESIGN.md (if exists)
|
|
121
|
+
- UI_PROTOTYPE.html (if exists)
|
|
122
|
+
|
|
123
|
+
Output:
|
|
124
|
+
- EPIC.md
|
|
125
|
+
- TASKS.md
|
|
126
|
+
|
|
127
|
+
Rules:
|
|
128
|
+
- TDD Order: Phase 2 (Tests) → Phase 3 (Implementation)
|
|
129
|
+
- Bite-Sized Tasks: 每个 step 2-5 分钟
|
|
130
|
+
- Phase -1 Gates: Simplicity, Anti-Abstraction, Integration-First
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 阶段 5: Exit Gate
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
File Checks:
|
|
137
|
+
- [ ] PRD.md exists, no {{PLACEHOLDER}}
|
|
138
|
+
- [ ] TECH_DESIGN.md exists (if !--skip-tech)
|
|
139
|
+
- [ ] UI_PROTOTYPE.html exists (if !--skip-ui AND UI detected)
|
|
140
|
+
- [ ] EPIC.md exists, no {{PLACEHOLDER}}
|
|
141
|
+
- [ ] TASKS.md exists, TDD order correct
|
|
142
|
+
|
|
143
|
+
Status Update:
|
|
144
|
+
- orchestration_status.status = "spec_complete"
|
|
145
|
+
- orchestration_status.phase = "spec"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## 输出
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
devflow/requirements/${REQ_ID}/
|
|
152
|
+
├── PRD.md # Always
|
|
153
|
+
├── TECH_DESIGN.md # If !--skip-tech
|
|
154
|
+
├── data-model.md # If !--skip-tech
|
|
155
|
+
├── contracts/openapi.yaml # If !--skip-tech
|
|
156
|
+
├── UI_PROTOTYPE.html # If !--skip-ui AND UI detected
|
|
157
|
+
├── EPIC.md # Always
|
|
158
|
+
├── TASKS.md # Always
|
|
159
|
+
└── orchestration_status.json # Updated
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## 错误处理
|
|
163
|
+
|
|
164
|
+
- **Entry Gate 失败**: 返回具体缺失项,指导用户运行 `/flow-init`
|
|
165
|
+
- **PRD 生成失败**: status = "spec_failed",可重试
|
|
166
|
+
- **Tech/UI 失败**: 继续执行,标记为 skipped
|
|
167
|
+
- **Epic 失败**: status = "spec_failed",可用 `--from=epic` 重试
|
|
168
|
+
|
|
169
|
+
## 下一步
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
/flow-dev "${REQ_ID}"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Agent References
|
|
176
|
+
|
|
177
|
+
| Agent | Purpose | Location |
|
|
178
|
+
|-------|---------|----------|
|
|
179
|
+
| prd-writer | PRD 生成 | `.claude/agents/prd-writer.md` |
|
|
180
|
+
| tech-architect | 技术设计 | `.claude/agents/tech-architect.md` |
|
|
181
|
+
| ui-designer | UI 原型 | `.claude/agents/ui-designer.md` |
|
|
182
|
+
| planner | Epic/Tasks | `.claude/agents/planner.md` |
|
|
183
|
+
|
|
184
|
+
## 详细指令
|
|
185
|
+
|
|
186
|
+
完整执行逻辑见: `.claude/skills/workflow/flow-spec/SKILL.md`
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-workspace
|
|
3
|
+
description: Manage developer workspace and session persistence (RM-018)
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /flow-workspace
|
|
8
|
+
|
|
9
|
+
> **[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Manage developer workspaces for session persistence.
|
|
14
|
+
Enables context recovery across sessions and tracks development progress.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Initialize workspace for a developer
|
|
20
|
+
/flow-workspace init [developer]
|
|
21
|
+
|
|
22
|
+
# Start session (recover context)
|
|
23
|
+
/flow-workspace start
|
|
24
|
+
|
|
25
|
+
# Record progress to journal
|
|
26
|
+
/flow-workspace record "message"
|
|
27
|
+
|
|
28
|
+
# Switch to different requirement
|
|
29
|
+
/flow-workspace switch REQ-XXX
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Subcommands
|
|
33
|
+
|
|
34
|
+
### init
|
|
35
|
+
|
|
36
|
+
Initialize a workspace for a developer.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
/flow-workspace init dimon
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Creates:
|
|
43
|
+
```
|
|
44
|
+
devflow/workspace/dimon/
|
|
45
|
+
├── .current-req # Current requirement ID
|
|
46
|
+
├── journal-1.md # Session journal
|
|
47
|
+
└── ...
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### start
|
|
51
|
+
|
|
52
|
+
Start a new session, recovering context from previous session.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
/flow-workspace start
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Process:
|
|
59
|
+
1. Read `.current-req` to get current requirement
|
|
60
|
+
2. Read latest journal entries
|
|
61
|
+
3. Display context summary
|
|
62
|
+
4. Ready to continue work
|
|
63
|
+
|
|
64
|
+
### record
|
|
65
|
+
|
|
66
|
+
Record progress to the journal.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
/flow-workspace record "Completed T015, starting T016"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Appends to current journal file. Creates new journal file when approaching 2000 lines.
|
|
73
|
+
|
|
74
|
+
### switch
|
|
75
|
+
|
|
76
|
+
Switch to a different requirement.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
/flow-workspace switch REQ-008
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Updates `.current-req` and creates a new journal entry.
|
|
83
|
+
|
|
84
|
+
## Workspace Structure
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
devflow/workspace/
|
|
88
|
+
├── index.md # Active developers list
|
|
89
|
+
└── {developer}/
|
|
90
|
+
├── .current-req # Current REQ-ID (e.g., "REQ-007")
|
|
91
|
+
├── journal-1.md # Session journal (max 2000 lines)
|
|
92
|
+
├── journal-2.md # Overflow journal
|
|
93
|
+
└── ...
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Journal Format
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
## [2026-02-06 10:30] Session Start
|
|
100
|
+
|
|
101
|
+
**REQ**: REQ-007
|
|
102
|
+
**Phase**: flow-dev
|
|
103
|
+
**Task**: T015
|
|
104
|
+
|
|
105
|
+
### Progress
|
|
106
|
+
- Completed: T014 (auth middleware)
|
|
107
|
+
- Current: T015 (rate limiting)
|
|
108
|
+
- Blocked: None
|
|
109
|
+
|
|
110
|
+
### Notes
|
|
111
|
+
- Discovered edge case in token refresh
|
|
112
|
+
- Need to revisit error handling in T016
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Integration
|
|
116
|
+
|
|
117
|
+
### With flow-init
|
|
118
|
+
|
|
119
|
+
When `/flow-init` creates a new requirement:
|
|
120
|
+
```bash
|
|
121
|
+
# Auto-update workspace
|
|
122
|
+
echo "REQ-XXX" > devflow/workspace/{developer}/.current-req
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### With flow-dev
|
|
126
|
+
|
|
127
|
+
During development, progress is automatically recorded:
|
|
128
|
+
```bash
|
|
129
|
+
/flow-workspace record "Completed T015"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### With Attention Refresh
|
|
133
|
+
|
|
134
|
+
Journal is read at Protocol 3 (Ralph iteration start) to maintain context.
|
|
135
|
+
|
|
136
|
+
## Scripts
|
|
137
|
+
|
|
138
|
+
- `.claude/scripts/flow-workspace-init.sh` - Initialize workspace
|
|
139
|
+
- `.claude/scripts/flow-workspace-start.sh` - Start session
|
|
140
|
+
- `.claude/scripts/flow-workspace-record.sh` - Record progress
|
|
141
|
+
|
|
142
|
+
## Related
|
|
143
|
+
|
|
144
|
+
- **Template**: `.claude/docs/templates/JOURNAL_TEMPLATE.md`
|
|
145
|
+
- **Index**: `devflow/workspace/index.md`
|
|
146
|
+
- **Attention Refresh**: `.claude/skills/flow-attention-refresh/SKILL.md`
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# ============================================================================
|
|
2
|
+
# Quality Gates Configuration for CC-DevFlow v3.0
|
|
3
|
+
# ============================================================================
|
|
4
|
+
# Version: 3.0.0
|
|
5
|
+
# Purpose: Define programmatic quality verification rules for each flow phase.
|
|
6
|
+
# Replaces completion marker checking with code-verifies-code approach.
|
|
7
|
+
# Reference: RM-016 Quality Gate Enhancement
|
|
8
|
+
# ============================================================================
|
|
9
|
+
|
|
10
|
+
# ============================================================================
|
|
11
|
+
# Global Settings
|
|
12
|
+
# ============================================================================
|
|
13
|
+
global:
|
|
14
|
+
# Maximum iterations before forced stop (Ralph loop safety)
|
|
15
|
+
max_iterations: 10
|
|
16
|
+
|
|
17
|
+
# Timeout per phase in minutes
|
|
18
|
+
timeout_minutes: 30
|
|
19
|
+
|
|
20
|
+
# Enable verbose logging
|
|
21
|
+
verbose: false
|
|
22
|
+
|
|
23
|
+
# ============================================================================
|
|
24
|
+
# Ralph Loop Configuration (SubagentStop Hook)
|
|
25
|
+
# ============================================================================
|
|
26
|
+
# Top-level verify commands for ralph-loop.ts hook
|
|
27
|
+
# These run when any subagent attempts to stop
|
|
28
|
+
verify:
|
|
29
|
+
- npm run lint --if-present
|
|
30
|
+
- npm run typecheck --if-present
|
|
31
|
+
- npm test -- --passWithNoTests
|
|
32
|
+
|
|
33
|
+
ralph_loop:
|
|
34
|
+
# Maximum iterations before forced stop
|
|
35
|
+
max_iterations: 5
|
|
36
|
+
|
|
37
|
+
# Timeout in minutes before forced stop
|
|
38
|
+
timeout_minutes: 30
|
|
39
|
+
|
|
40
|
+
# ============================================================================
|
|
41
|
+
# Claude Team Hooks Configuration (v4.7)
|
|
42
|
+
# ============================================================================
|
|
43
|
+
|
|
44
|
+
# ----------------------------------------------------------------------------
|
|
45
|
+
# TaskCompleted Hook: Verify task completion quality
|
|
46
|
+
# ----------------------------------------------------------------------------
|
|
47
|
+
task_completed:
|
|
48
|
+
# Verification commands (uses top-level verify if not specified)
|
|
49
|
+
verify:
|
|
50
|
+
- npm run lint --if-present
|
|
51
|
+
- npm run typecheck --if-present
|
|
52
|
+
- npm test -- --passWithNoTests
|
|
53
|
+
|
|
54
|
+
# Block task completion if verification fails
|
|
55
|
+
block_on_failure: true
|
|
56
|
+
|
|
57
|
+
# Maximum retry attempts before allowing completion
|
|
58
|
+
max_retries: 3
|
|
59
|
+
|
|
60
|
+
# ----------------------------------------------------------------------------
|
|
61
|
+
# TeammateIdle Hook: Task assignment strategy
|
|
62
|
+
# ----------------------------------------------------------------------------
|
|
63
|
+
teammate_idle:
|
|
64
|
+
# Checks to run before assigning new task
|
|
65
|
+
idle_checks:
|
|
66
|
+
- npm run lint --if-present
|
|
67
|
+
- npm run typecheck --if-present
|
|
68
|
+
|
|
69
|
+
# Task assignment strategy: priority_first | round_robin | skill_match
|
|
70
|
+
assignment_strategy: priority_first
|
|
71
|
+
|
|
72
|
+
# Idle timeout in seconds before triggering shutdown
|
|
73
|
+
idle_timeout: 300
|
|
74
|
+
|
|
75
|
+
# ============================================================================
|
|
76
|
+
# Phase-Specific Quality Gates
|
|
77
|
+
# ============================================================================
|
|
78
|
+
|
|
79
|
+
# ----------------------------------------------------------------------------
|
|
80
|
+
# flow-dev: Development Phase
|
|
81
|
+
# ----------------------------------------------------------------------------
|
|
82
|
+
flow-dev:
|
|
83
|
+
# Programmatic verification commands (must all pass to exit)
|
|
84
|
+
verify:
|
|
85
|
+
- name: "Lint Check"
|
|
86
|
+
command: "npm run lint --if-present || true"
|
|
87
|
+
required: true
|
|
88
|
+
|
|
89
|
+
- name: "Type Check"
|
|
90
|
+
command: "npm run typecheck --if-present || true"
|
|
91
|
+
required: true
|
|
92
|
+
|
|
93
|
+
- name: "Unit Tests"
|
|
94
|
+
command: "npm test -- --passWithNoTests"
|
|
95
|
+
required: true
|
|
96
|
+
|
|
97
|
+
# Fallback to completion markers if verify commands not available
|
|
98
|
+
completion_markers:
|
|
99
|
+
- "ALL_TASKS_COMPLETE"
|
|
100
|
+
- "TDD_CHECKPOINT_PASS"
|
|
101
|
+
|
|
102
|
+
# Phase-specific settings
|
|
103
|
+
max_iterations: 15
|
|
104
|
+
timeout_minutes: 45
|
|
105
|
+
|
|
106
|
+
# ----------------------------------------------------------------------------
|
|
107
|
+
# flow-review: Code Review Phase
|
|
108
|
+
# ----------------------------------------------------------------------------
|
|
109
|
+
flow-review:
|
|
110
|
+
verify:
|
|
111
|
+
- name: "Lint Check"
|
|
112
|
+
command: "npm run lint --if-present || true"
|
|
113
|
+
required: true
|
|
114
|
+
|
|
115
|
+
- name: "Type Check"
|
|
116
|
+
command: "npm run typecheck --if-present || true"
|
|
117
|
+
required: true
|
|
118
|
+
|
|
119
|
+
completion_markers:
|
|
120
|
+
- "SPEC_REVIEW_PASS"
|
|
121
|
+
- "CODE_QUALITY_PASS"
|
|
122
|
+
|
|
123
|
+
max_iterations: 5
|
|
124
|
+
timeout_minutes: 20
|
|
125
|
+
|
|
126
|
+
# ----------------------------------------------------------------------------
|
|
127
|
+
# flow-quality: Combined Quality Phase (v3.0 NEW)
|
|
128
|
+
# ----------------------------------------------------------------------------
|
|
129
|
+
flow-quality:
|
|
130
|
+
# Quick mode (default)
|
|
131
|
+
quick:
|
|
132
|
+
verify:
|
|
133
|
+
- name: "Lint Check"
|
|
134
|
+
command: "npm run lint --if-present || true"
|
|
135
|
+
required: true
|
|
136
|
+
|
|
137
|
+
- name: "Type Check"
|
|
138
|
+
command: "npm run typecheck --if-present || true"
|
|
139
|
+
required: true
|
|
140
|
+
|
|
141
|
+
- name: "Unit Tests"
|
|
142
|
+
command: "npm test -- --passWithNoTests"
|
|
143
|
+
required: true
|
|
144
|
+
|
|
145
|
+
# Full mode (--full flag)
|
|
146
|
+
full:
|
|
147
|
+
verify:
|
|
148
|
+
- name: "Lint Check"
|
|
149
|
+
command: "npm run lint --if-present || true"
|
|
150
|
+
required: true
|
|
151
|
+
|
|
152
|
+
- name: "Type Check"
|
|
153
|
+
command: "npm run typecheck --if-present || true"
|
|
154
|
+
required: true
|
|
155
|
+
|
|
156
|
+
- name: "Unit Tests"
|
|
157
|
+
command: "npm test -- --passWithNoTests"
|
|
158
|
+
required: true
|
|
159
|
+
|
|
160
|
+
- name: "Integration Tests"
|
|
161
|
+
command: "npm run test:integration --if-present || true"
|
|
162
|
+
required: false
|
|
163
|
+
|
|
164
|
+
- name: "Security Scan"
|
|
165
|
+
command: "npm audit --audit-level=high || true"
|
|
166
|
+
required: false
|
|
167
|
+
|
|
168
|
+
completion_markers:
|
|
169
|
+
- "SPEC_REVIEW_PASS"
|
|
170
|
+
- "CODE_QUALITY_PASS"
|
|
171
|
+
- "QA_PASS"
|
|
172
|
+
- "SECURITY_PASS"
|
|
173
|
+
|
|
174
|
+
max_iterations: 10
|
|
175
|
+
timeout_minutes: 30
|
|
176
|
+
|
|
177
|
+
# ----------------------------------------------------------------------------
|
|
178
|
+
# flow-qa: QA Phase (deprecated in v3.0, use flow-quality)
|
|
179
|
+
# ----------------------------------------------------------------------------
|
|
180
|
+
flow-qa:
|
|
181
|
+
verify:
|
|
182
|
+
- name: "Unit Tests"
|
|
183
|
+
command: "npm test -- --passWithNoTests"
|
|
184
|
+
required: true
|
|
185
|
+
|
|
186
|
+
- name: "Security Audit"
|
|
187
|
+
command: "npm audit --audit-level=high || true"
|
|
188
|
+
required: false
|
|
189
|
+
|
|
190
|
+
completion_markers:
|
|
191
|
+
- "QA_PASS"
|
|
192
|
+
- "SECURITY_PASS"
|
|
193
|
+
|
|
194
|
+
max_iterations: 5
|
|
195
|
+
timeout_minutes: 20
|
|
196
|
+
|
|
197
|
+
# ----------------------------------------------------------------------------
|
|
198
|
+
# flow-release: Release Phase
|
|
199
|
+
# ----------------------------------------------------------------------------
|
|
200
|
+
flow-release:
|
|
201
|
+
verify:
|
|
202
|
+
- name: "All Tests Pass"
|
|
203
|
+
command: "npm test -- --passWithNoTests"
|
|
204
|
+
required: true
|
|
205
|
+
|
|
206
|
+
- name: "Build Success"
|
|
207
|
+
command: "npm run build --if-present || true"
|
|
208
|
+
required: true
|
|
209
|
+
|
|
210
|
+
completion_markers:
|
|
211
|
+
- "PR_CREATED"
|
|
212
|
+
- "RELEASE_READY"
|
|
213
|
+
|
|
214
|
+
max_iterations: 3
|
|
215
|
+
timeout_minutes: 15
|
|
216
|
+
|
|
217
|
+
# ============================================================================
|
|
218
|
+
# Error Recording Configuration
|
|
219
|
+
# ============================================================================
|
|
220
|
+
error_recording:
|
|
221
|
+
# Path to ERROR_LOG.md (relative to requirement directory)
|
|
222
|
+
log_file: "ERROR_LOG.md"
|
|
223
|
+
|
|
224
|
+
# Error entry format
|
|
225
|
+
format: |
|
|
226
|
+
## [{timestamp}] E{error_number}: {title}
|
|
227
|
+
|
|
228
|
+
**Phase**: {phase}
|
|
229
|
+
**Error Type**: {error_type}
|
|
230
|
+
**Error Message**:
|
|
231
|
+
```
|
|
232
|
+
{error_message}
|
|
233
|
+
```
|
|
234
|
+
**Root Cause**: {root_cause}
|
|
235
|
+
**Resolution**: {resolution}
|
|
236
|
+
**Prevention**: {prevention}
|
|
237
|
+
|
|
238
|
+
# Error types
|
|
239
|
+
types:
|
|
240
|
+
- "Test Failure"
|
|
241
|
+
- "Build Error"
|
|
242
|
+
- "Lint Error"
|
|
243
|
+
- "Type Error"
|
|
244
|
+
- "Runtime Error"
|
|
245
|
+
- "Security Issue"
|
|
246
|
+
|
|
247
|
+
# ============================================================================
|
|
248
|
+
# Integration with Ralph Loop
|
|
249
|
+
# ============================================================================
|
|
250
|
+
ralph_loop:
|
|
251
|
+
# State file location
|
|
252
|
+
state_file: "ralph-loop.local.json"
|
|
253
|
+
|
|
254
|
+
# Fields to track
|
|
255
|
+
state_fields:
|
|
256
|
+
- phase
|
|
257
|
+
- iteration
|
|
258
|
+
- errors
|
|
259
|
+
- lastVerifyResult
|
|
260
|
+
- lastVerifyTimestamp
|
|
261
|
+
|
|
262
|
+
# Exit conditions
|
|
263
|
+
exit_conditions:
|
|
264
|
+
- "all_verify_pass"
|
|
265
|
+
- "max_iterations_reached"
|
|
266
|
+
- "timeout_reached"
|
|
267
|
+
- "manual_stop"
|
|
268
|
+
|
|
269
|
+
# ----------------------------------------------------------------------------
|
|
270
|
+
# Team Mode Configuration (v4.7)
|
|
271
|
+
# ----------------------------------------------------------------------------
|
|
272
|
+
team_mode:
|
|
273
|
+
# Enable Team mode Ralph Loop
|
|
274
|
+
enabled: true
|
|
275
|
+
|
|
276
|
+
# Verification scope: teammate (per-teammate) or global (all at once)
|
|
277
|
+
scope: teammate
|
|
278
|
+
|
|
279
|
+
# Teammate-specific verification commands
|
|
280
|
+
# Each teammate can have custom verify commands based on their role
|
|
281
|
+
teammate_verify:
|
|
282
|
+
dev-frontend:
|
|
283
|
+
- npm run lint -- --files-changed
|
|
284
|
+
- npm run typecheck --if-present
|
|
285
|
+
- npm test -- --changed
|
|
286
|
+
dev-backend:
|
|
287
|
+
- npm run lint -- --files-changed
|
|
288
|
+
- npm run typecheck --if-present
|
|
289
|
+
- npm test -- --changed
|
|
290
|
+
dev-database:
|
|
291
|
+
- npm run lint -- --files-changed
|
|
292
|
+
- npm run typecheck --if-present
|
|
293
|
+
|
|
294
|
+
# Global verification (runs when last teammate stops)
|
|
295
|
+
global_verify:
|
|
296
|
+
- npm run lint
|
|
297
|
+
- npm run typecheck --if-present
|
|
298
|
+
- npm test -- --passWithNoTests
|
|
299
|
+
|
|
300
|
+
# Maximum iterations per teammate before forced stop
|
|
301
|
+
max_iterations_per_teammate: 3
|
|
302
|
+
|
|
303
|
+
# Maximum global iterations before forced stop
|
|
304
|
+
max_global_iterations: 10
|
|
305
|
+
|