cc-devflow 4.2.0 → 4.3.0
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/commands/flow/CLAUDE.md +0 -4
- package/.claude/docs/examples/design-inspiration-pool.md +59 -0
- package/.claude/docs/examples/ui-prototype-constitution-checklist.md +75 -0
- package/.claude/docs/implementation-summary-v7.md +449 -0
- package/.claude/docs/spec-format-guide.md +349 -0
- package/.claude/docs/state-consolidation-design.md +323 -0
- package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +85 -386
- package/.claude/docs/templates/DESIGN_TEMPLATE.md +157 -0
- package/.claude/docs/templates/PROPOSAL_TEMPLATE.md +91 -0
- package/.claude/docs/templates/SPEC_TEMPLATE_DELTA.md +139 -0
- package/.claude/docs/templates/SPEC_TEMPLATE_PROJECT.md +93 -0
- package/.claude/docs/templates/STYLE_TEMPLATE.md +114 -901
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +143 -1205
- package/.claude/hooks/inject-agent-context.ts +9 -9
- package/.claude/scripts/.claude/commands/flow/export-openspec.md +221 -0
- package/.claude/scripts/.claude/commands/flow/import-openspec.md +171 -0
- package/.claude/scripts/__tests__/openspec.test.js +212 -0
- package/.claude/scripts/delta-parser.ts +112 -2
- package/.claude/scripts/export-openspec.js +222 -0
- package/.claude/scripts/import-openspec.js +272 -0
- package/.claude/scripts/validate-scope.sh +200 -0
- package/.claude/skills/{workflow/flow-init → flow-init}/SKILL.md +25 -4
- package/.claude/skills/{workflow/flow-release → flow-release}/SKILL.md +14 -3
- package/.claude/skills/{workflow/flow-spec → flow-spec}/SKILL.md +30 -2
- package/.claude/skills/utility/npm-release/CLAUDE.md +55 -0
- package/.claude/skills/utility/npm-release/SKILL.md +111 -46
- package/.claude/skills/utility/npm-release/references/version-decision-guide.md +134 -0
- package/.claude/skills/utility/npm-release/scripts/atomic-version-bump.sh +95 -0
- package/.claude/skills/utility/npm-release/scripts/validate-version-sync.sh +82 -0
- package/.claude/skills/utility/npm-release/scripts/version-decision-tree.sh +44 -0
- package/.claude/tsc-cache/70d2fc6d-2936-429b-b529-429f1aae8c88/affected-repos.txt +1 -0
- package/.claude/tsc-cache/70d2fc6d-2936-429b-b529-429f1aae8c88/edited-files.log +2 -0
- package/CHANGELOG.md +40 -0
- package/README.md +2 -1
- package/README.zh-CN.md +2 -1
- package/docs/v4.3.0-migration-guide.md +276 -0
- package/lib/harness/CLAUDE.md +5 -4
- package/lib/harness/__tests__/planner.tdd.test.js +125 -0
- package/lib/harness/index.js +4 -2
- package/lib/harness/operations/dispatch.js +13 -0
- package/lib/harness/operations/plan.js +55 -1
- package/lib/harness/operations/release.js +87 -0
- package/lib/harness/operations/verify.js +14 -0
- package/lib/harness/planner.js +131 -0
- package/lib/harness/query.js +126 -0
- package/lib/harness/schemas.js +22 -1
- package/package.json +1 -1
- package/.claude/commands/flow/checklist.md +0 -18
- package/.claude/commands/flow/clarify.md +0 -18
- package/.claude/commands/flow/new.md +0 -23
- package/.claude/commands/flow/quality.md +0 -21
- package/.claude/docs/templates/EPIC_TEMPLATE.md +0 -805
- package/.claude/docs/templates/PRD_TEMPLATE.md +0 -562
- package/.claude/docs/templates/TASKS_TEMPLATE.md +0 -523
- package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +0 -1019
- package/.claude/skills/workflow/CLAUDE.md +0 -24
- /package/.claude/skills/{domain/attention-refresh → attention-refresh}/SKILL.md +0 -0
- /package/.claude/skills/{domain/brainstorming → brainstorming}/SKILL.md +0 -0
- /package/.claude/skills/{guardrail/constitution-guardian → constitution-guardian}/SKILL.md +0 -0
- /package/.claude/skills/{utility/constitution-quick-ref → constitution-quick-ref}/SKILL.md +0 -0
- /package/.claude/skills/{domain/debugging → debugging}/SKILL.md +0 -0
- /package/.claude/skills/{utility/file-standards → file-standards}/SKILL.md +0 -0
- /package/.claude/skills/{domain/finishing-branch → finishing-branch}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/CLAUDE.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/assets/IMPLEMENTATION_PLAN_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/dev-implementer.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/scripts/entry-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/scripts/exit-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-dev → flow-dev}/scripts/task-orchestrator.sh +0 -0
- /package/.claude/skills/{workflow/flow-fix → flow-fix}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-fix → flow-fix}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-fix → flow-fix}/references/bug-analyzer.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/assets/BRAINSTORM_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/assets/INIT_FLOW_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/assets/RESEARCH_TEMPLATE.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/references/flow-researcher.md +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/check-prerequisites.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/consolidate-research.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/create-requirement.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/generate-research-tasks.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/populate-research-tasks.sh +0 -0
- /package/.claude/skills/{workflow/flow-init → flow-init}/scripts/validate-research.sh +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/code-quality-reviewer.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/qa-tester.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/security-reviewer.md +0 -0
- /package/.claude/skills/{workflow/flow-quality → flow-quality}/references/spec-reviewer.md +0 -0
- /package/.claude/skills/{workflow/flow-release → flow-release}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-release → flow-release}/references/release-manager.md +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/CLAUDE.md +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/context.jsonl +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/entry-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/exit-gate.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/parallel-orchestrator.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/team-communication.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/team-init.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/scripts/test-team-mode.sh +0 -0
- /package/.claude/skills/{workflow/flow-spec → flow-spec}/team-config.json +0 -0
- /package/.claude/skills/{workflow/flow-verify → flow-verify}/CLAUDE.md +0 -0
- /package/.claude/skills/{workflow/flow-verify → flow-verify}/SKILL.md +0 -0
- /package/.claude/skills/{workflow/flow-verify → flow-verify}/context.jsonl +0 -0
- /package/.claude/skills/{utility/fractal-docs → fractal-docs}/SKILL.md +0 -0
- /package/.claude/skills/{utility/journey-checker → journey-checker}/SKILL.md +0 -0
- /package/.claude/skills/{utility/journey-checker → journey-checker}/pressure-scenarios.md +0 -0
- /package/.claude/skills/{domain/receiving-review → receiving-review}/SKILL.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/LICENSE.txt +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/SKILL.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/references/output-patterns.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/references/workflows.md +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/scripts/init_skill.py +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/scripts/package_skill.py +0 -0
- /package/.claude/skills/{utility/skill-creator → skill-creator}/scripts/quick_validate.py +0 -0
- /package/.claude/skills/{domain/tdd → tdd}/SKILL.md +0 -0
- /package/.claude/skills/{guardrail/tdd-enforcer → tdd-enforcer}/SKILL.md +0 -0
- /package/.claude/skills/{domain/verification → verification}/SKILL.md +0 -0
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
成员清单
|
|
5
5
|
archive.md: 归档需求命令。
|
|
6
|
-
checklist.md: 已废弃命令,统一迁移到 /flow:verify。
|
|
7
|
-
clarify.md: 已废弃命令,默认主链移除独立澄清阶段。
|
|
8
6
|
constitution.md: 宪法规则管理命令。
|
|
9
7
|
context.md: 上下文资产管理命令。
|
|
10
8
|
delta.md: 需求增量变更命令。
|
|
@@ -12,8 +10,6 @@ dev.md: 主链开发阶段命令,触发 harness dispatch/resume。
|
|
|
12
10
|
fix.md: Bug 修复命令。
|
|
13
11
|
ideate.md: 想法到需求命令。
|
|
14
12
|
init.md: 主链初始化命令,触发 harness init/pack。
|
|
15
|
-
new.md: 已废弃命令,迁移到 /flow:init -> /flow:spec -> /flow:dev -> /flow:verify -> /flow:release。
|
|
16
|
-
quality.md: 已废弃命令,统一迁移到 /flow:verify。
|
|
17
13
|
release.md: 主链发布命令,触发 harness release/janitor。
|
|
18
14
|
restart.md: 旧中断恢复命令(迁移过渡保留)。
|
|
19
15
|
spec.md: 主链规格命令,触发 harness plan。
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Design Inspiration Pool
|
|
2
|
+
|
|
3
|
+
> 80+ 位艺术家/设计师/建筑师灵感来源池
|
|
4
|
+
> 用于 UI_PROTOTYPE_TEMPLATE.md Phase 2: Design Inspiration Sampling
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 使用方法
|
|
9
|
+
|
|
10
|
+
从不同类别中随机采样 2 位大师,生成风格转译说明。
|
|
11
|
+
|
|
12
|
+
**采样策略**:
|
|
13
|
+
- 从不同类别中选择(避免风格过于相似)
|
|
14
|
+
- 优先组合:现代主义 + 生成艺术,建筑 + 平面设计
|
|
15
|
+
- 避免组合:同类别内的大师(如两位都是建筑师)
|
|
16
|
+
|
|
17
|
+
**转译模板**:
|
|
18
|
+
```
|
|
19
|
+
**灵感来源X**: {艺术家姓名} ({类别})
|
|
20
|
+
**核心特质**: {艺术家代表性特点,1-2句话}
|
|
21
|
+
**网页转译**:
|
|
22
|
+
- 色彩: {具体色值} → {应用场景}
|
|
23
|
+
- 版式: {布局策略} → {CSS实现方式}
|
|
24
|
+
- 形态: {视觉元素} → {HTML/CSS实现}
|
|
25
|
+
- 动效: {动态特征} → {CSS/JS实现}
|
|
26
|
+
**禁止模仿**: 不复刻{具体作品名称}的{具体元素}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 灵感来源池 (8 类别, 80+ 位大师)
|
|
32
|
+
|
|
33
|
+
### 类别1: 影视片头 / 动态叙事
|
|
34
|
+
Saul Bass, Maurice Binder, Pablo Ferro, Dan Perri, Kyle Cooper
|
|
35
|
+
|
|
36
|
+
### 类别2: 平面 / 字体 / 后现代图形
|
|
37
|
+
Paula Scher, Neville Brody, April Greiman, David Carson, Jamie Reid, Push Pin Studios (Seymour Chwast)
|
|
38
|
+
|
|
39
|
+
### 类别3: 现代主义信息设计 / 网格系统
|
|
40
|
+
Massimo Vignelli, Josef Müller-Brockmann, Otl Aicher, Armin Hofmann, Karl Gerstner, Muriel Cooper
|
|
41
|
+
|
|
42
|
+
### 类别4: 几何与抽象艺术 / 光学艺术
|
|
43
|
+
Piet Mondrian, Sonia Delaunay, Josef Albers, Victor Vasarely, Bridget Riley, M. C. Escher, Paul Klee, Kazimir Malevich, Joan Miró, Henri Matisse, Mark Rothko, René Magritte, Salvador Dalí
|
|
44
|
+
|
|
45
|
+
### 类别5: 亚洲与当代艺术
|
|
46
|
+
Yayoi Kusama, Takashi Murakami, Katsushika Hokusai(葛饰北斋), Xu Bing(徐冰), Zao Wou-Ki(赵无极)
|
|
47
|
+
|
|
48
|
+
### 类别6: 建筑 / 空间设计
|
|
49
|
+
Zaha Hadid, Frank Gehry, Le Corbusier, Mies van der Rohe, Tadao Ando(安藤忠雄), Oscar Niemeyer, Santiago Calatrava, Norman Foster, Rem Koolhaas
|
|
50
|
+
|
|
51
|
+
### 类别7: 生成艺术 / 算法设计 / 数据可视化
|
|
52
|
+
Casey Reas, Ben Fry (Processing), Joshua Davis, Jared Tarbell, Robert Hodgin, Jer Thorp, Nadieh Bremer, Shirley Wu, Stefanie Posavec, Giorgia Lupi
|
|
53
|
+
|
|
54
|
+
### 类别8: 工业设计 / 产品设计
|
|
55
|
+
Dieter Rams, Charles & Ray Eames, Naoto Fukasawa(深泽直人), Jasper Morrison, Marc Newson, Philippe Starck, Karim Rashid, Jonathan Ive
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# UI Prototype Constitution Checklist
|
|
2
|
+
|
|
3
|
+
> UI 原型宪法合规检查清单
|
|
4
|
+
> 用于 UI_PROTOTYPE_TEMPLATE.md Phase 10: Constitution & Quality Check
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Constitution 检查
|
|
9
|
+
|
|
10
|
+
### Article I - Quality First (质量至上)
|
|
11
|
+
- [ ] I.1 Complete Implementation: HTML 无占位符,所有页面完整
|
|
12
|
+
- [ ] I.2 No Simplification: 交互逻辑完整,非简化版本
|
|
13
|
+
- [ ] I.4 Quality Gates: 通过 HTML 验证,无 console 错误
|
|
14
|
+
|
|
15
|
+
### Article III - Security First (安全优先)
|
|
16
|
+
- [ ] III.1 No Hardcoded Secrets: 无 API 密钥硬编码
|
|
17
|
+
- [ ] III.2 Input Validation: 表单有验证逻辑
|
|
18
|
+
- [ ] III.4 Secure by Default: 使用 HTTPS CDN 资源
|
|
19
|
+
|
|
20
|
+
### Article V - Maintainability (可维护性)
|
|
21
|
+
- [ ] V.3 Documentation: HTML 注释包含设计文档
|
|
22
|
+
- [ ] V.4 File Size Limits: 单文件 HTML ≤ 2000 行(可接受)
|
|
23
|
+
|
|
24
|
+
### Article X - Requirement Boundary (需求边界)
|
|
25
|
+
- [ ] X.1 No Speculation: 仅实现 PRD 明确的功能
|
|
26
|
+
- [ ] X.2 No Speculative Features: 无"未来可能需要"的功能
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 质量检查清单
|
|
31
|
+
|
|
32
|
+
### HTML 质量
|
|
33
|
+
- [ ] 使用 HTML5 语义化标签
|
|
34
|
+
- [ ] 无未闭合标签
|
|
35
|
+
- [ ] ARIA 标签完整
|
|
36
|
+
- [ ] 无重复 ID
|
|
37
|
+
|
|
38
|
+
### CSS 质量
|
|
39
|
+
- [ ] 使用 CSS 变量(Design System)
|
|
40
|
+
- [ ] 响应式媒体查询正常
|
|
41
|
+
- [ ] 无 !important 滥用
|
|
42
|
+
- [ ] 命名规范(BEM 或一致的命名)
|
|
43
|
+
|
|
44
|
+
### JavaScript 质量
|
|
45
|
+
- [ ] 无全局变量污染
|
|
46
|
+
- [ ] 事件监听器正确绑定
|
|
47
|
+
- [ ] 无内存泄漏(事件监听器移除)
|
|
48
|
+
- [ ] Console 无错误
|
|
49
|
+
|
|
50
|
+
### 可访问性
|
|
51
|
+
- [ ] 色彩对比度 ≥ 4.5:1
|
|
52
|
+
- [ ] 键盘导航可用
|
|
53
|
+
- [ ] 屏幕阅读器友好
|
|
54
|
+
- [ ] focus 状态可见
|
|
55
|
+
|
|
56
|
+
### 性能
|
|
57
|
+
- [ ] CDN 资源加载 <1s
|
|
58
|
+
- [ ] 首屏渲染 <2s
|
|
59
|
+
- [ ] 交互响应 <100ms
|
|
60
|
+
- [ ] 无不必要的重绘/回流
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Anti-Generic-Design 验证
|
|
65
|
+
- [ ] 无占位图片(Picsum 图片正常加载)
|
|
66
|
+
- [ ] 无常见 AI 紫/蓝配色
|
|
67
|
+
- [ ] 无 Emoji 图标(使用 SVG/图标库)
|
|
68
|
+
- [ ] 无 Lorem Ipsum 文本
|
|
69
|
+
- [ ] 所有交互元素有完整状态(hover/active/disabled/error)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
**完整 Constitution 文档**: `.claude/rules/project-constitution.md`
|
|
74
|
+
|
|
75
|
+
**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
# CC-DevFlow v4.3 Implementation Summary
|
|
2
|
+
|
|
3
|
+
> **Last Updated**: 2026-03-12
|
|
4
|
+
> **Status**: Phase 1 Complete (100%), Phase 2 Complete (100%), Phase 3 Complete (100%), Overall 75%
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
实施 OpenSpec 单一真相源架构,解决需求偏移问题。核心机制:
|
|
11
|
+
|
|
12
|
+
1. **项目级 specs/** - 不可变源代码真相(描述当前系统状态)
|
|
13
|
+
2. **需求级 specs/** - 只包含 Delta(ADDED/MODIFIED/REMOVED/RENAMED)
|
|
14
|
+
3. **自动反扩散检查** - 阻止需求偏移
|
|
15
|
+
4. **归档时自动合并** - Delta 合并到项目级 specs/
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Completed Tasks (12/16)
|
|
20
|
+
|
|
21
|
+
### ✅ Task #1: Phase 1.1 - 建立项目级 specs/ 目录
|
|
22
|
+
**Status**: Complete
|
|
23
|
+
**Files Modified**:
|
|
24
|
+
- Created `devflow/specs/README.md` - 项目级 specs 说明文档
|
|
25
|
+
- Created `devflow/specs/auth/spec.md` - 认证模块示例
|
|
26
|
+
- Created `devflow/specs/payments/spec.md` - 支付模块示例
|
|
27
|
+
- Created `devflow/specs/ui/spec.md` - UI 组件模块示例
|
|
28
|
+
- Created `devflow/specs/CLAUDE.md` - L2 文档
|
|
29
|
+
|
|
30
|
+
**Key Changes**:
|
|
31
|
+
- 建立了项目级 specs/ 作为单一真相源
|
|
32
|
+
- 使用 YAML frontmatter 管理元数据(module, version, created_at, updated_at)
|
|
33
|
+
- 采用 RFC 2119 关键字(SHALL, MUST, SHOULD, MAY)
|
|
34
|
+
- 使用 BDD Given-When-Then 场景格式
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### ✅ Task #2: Phase 1.2 - 创建 spec.md 格式规范文档
|
|
39
|
+
**Status**: Complete
|
|
40
|
+
**Files Modified**:
|
|
41
|
+
- Created `.claude/docs/spec-format-guide.md` - 完整格式指南(200+ 行)
|
|
42
|
+
|
|
43
|
+
**Key Changes**:
|
|
44
|
+
- 定义了项目级 vs 需求级 spec.md 的区别
|
|
45
|
+
- 文档化 RFC 2119 关键字语义
|
|
46
|
+
- 说明 BDD 场景格式
|
|
47
|
+
- 提供完整示例和合并逻辑
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### ✅ Task #3: Phase 1.3 - 创建 spec.md 模板
|
|
52
|
+
**Status**: Complete
|
|
53
|
+
**Files Modified**:
|
|
54
|
+
- Created `.claude/docs/templates/SPEC_TEMPLATE_PROJECT.md` - 项目级模板
|
|
55
|
+
- Created `.claude/docs/templates/SPEC_TEMPLATE_DELTA.md` - Delta 模板
|
|
56
|
+
|
|
57
|
+
**Key Changes**:
|
|
58
|
+
- 项目级模板:Purpose + Requirements + Implementation
|
|
59
|
+
- Delta 模板:ADDED/MODIFIED/REMOVED/RENAMED 四种操作
|
|
60
|
+
- 包含 Constitutional Constraints 引用
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### ✅ Task #4: Phase 1.4 - 增强 delta-parser.ts
|
|
65
|
+
**Status**: Complete
|
|
66
|
+
**Files Modified**:
|
|
67
|
+
- Modified `.claude/scripts/delta-parser.ts` (527 → 638 lines)
|
|
68
|
+
|
|
69
|
+
**Key Changes**:
|
|
70
|
+
- 添加 `bumpVersion()` 函数实现语义化版本管理
|
|
71
|
+
- REMOVED → MAJOR +1(破坏性变更)
|
|
72
|
+
- ADDED → MINOR +1(新功能)
|
|
73
|
+
- MODIFIED/RENAMED → PATCH +1(修复/改进)
|
|
74
|
+
- 添加 `mergeDeltaToMainSpec()` 函数实现 Delta 合并
|
|
75
|
+
- 读取项目级和 Delta spec.md
|
|
76
|
+
- 验证模块匹配
|
|
77
|
+
- 应用 ADDED/MODIFIED/REMOVED/RENAMED 操作
|
|
78
|
+
- 自动更新版本号和时间戳
|
|
79
|
+
- 添加 CLI `merge` 命令:`delta-parser.ts merge <main-spec> <delta-spec>`
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### ✅ Task #5: Phase 1.5 - 创建 validate-scope.sh
|
|
84
|
+
**Status**: Complete
|
|
85
|
+
**Files Modified**:
|
|
86
|
+
- Created `.claude/scripts/validate-scope.sh` (200 lines)
|
|
87
|
+
|
|
88
|
+
**Key Changes**:
|
|
89
|
+
- 提取 proposal.md 的 What 章节作为原始意图
|
|
90
|
+
- 提取 Delta specs 的 ADDED Requirements
|
|
91
|
+
- 使用关键词匹配检测范围扩散
|
|
92
|
+
- 生成 scope-creep-report.md 报告
|
|
93
|
+
- ✅ 标记符合原始意图的需求
|
|
94
|
+
- ⚠️ 标记超出范围的需求
|
|
95
|
+
- 检测到范围扩散时返回错误码(exit 1)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### ✅ Task #6: Phase 1.6 - 修改 harness:init 生成 proposal.md
|
|
100
|
+
**Status**: Complete
|
|
101
|
+
**Files Modified**:
|
|
102
|
+
- Modified `.claude/skills/flow-init/SKILL.md`
|
|
103
|
+
- Created `.claude/docs/templates/PROPOSAL_TEMPLATE.md`
|
|
104
|
+
|
|
105
|
+
**Key Changes**:
|
|
106
|
+
- 更新 Execution Steps:
|
|
107
|
+
- Step 2: 读取项目级 specs/ 了解当前系统状态
|
|
108
|
+
- Step 6: 生成 proposal.md(Why + What 格式)替代 PRD.md
|
|
109
|
+
- Step 7: 创建 specs/ 目录准备存放 Delta
|
|
110
|
+
- 创建 PROPOSAL_TEMPLATE.md:
|
|
111
|
+
- Why 章节:Background, Problem Statement, Business Value
|
|
112
|
+
- What 章节:Core Features, Scope, Success Criteria
|
|
113
|
+
- 包含 [NEEDS CLARIFICATION] 标记机制
|
|
114
|
+
- 更新 Exit Criteria 要求 proposal.md 和 specs/ 目录存在
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### ✅ Task #7: Phase 1.7 - 修改 harness:plan 生成 Delta specs
|
|
119
|
+
**Status**: Complete
|
|
120
|
+
**Files Modified**:
|
|
121
|
+
- Modified `.claude/skills/flow-spec/SKILL.md`
|
|
122
|
+
- Created `.claude/docs/templates/DESIGN_TEMPLATE.md`
|
|
123
|
+
- Modified `lib/harness/operations/plan.js`
|
|
124
|
+
|
|
125
|
+
**Key Changes**:
|
|
126
|
+
- 更新 flow-spec SKILL.md Execution Steps:
|
|
127
|
+
- Step 2: 读取项目级 specs/ 了解当前系统状态
|
|
128
|
+
- Step 3: 生成 design.md(How + Implementation)
|
|
129
|
+
- Step 4: 生成 Delta specs/(ADDED/MODIFIED/REMOVED/RENAMED)
|
|
130
|
+
- Step 5: 自动运行 validate-scope.sh 反扩散检查
|
|
131
|
+
- 创建 DESIGN_TEMPLATE.md:
|
|
132
|
+
- How 章节:Architecture, Technology Stack, Module Changes
|
|
133
|
+
- Implementation 章节:API Design, Data Model, File Structure, Testing Strategy
|
|
134
|
+
- 更新 Exit Criteria:
|
|
135
|
+
- 要求 design.md 存在
|
|
136
|
+
- 要求 specs/ 目录至少有一个 Delta spec.md
|
|
137
|
+
- 要求 scope-creep-report.md 无阻塞性警告
|
|
138
|
+
- 修改 plan.js:
|
|
139
|
+
- 检测 proposal.md 存在(v4.3 架构)
|
|
140
|
+
- 验证 design.md, specs/, scope-creep-report.md 产物
|
|
141
|
+
- 警告缺失的必需文件
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### ✅ Task #8: Phase 1.8 - 修改 harness:release 合并 Delta
|
|
146
|
+
**Status**: Complete
|
|
147
|
+
**Files Modified**:
|
|
148
|
+
- Modified `lib/harness/operations/release.js`
|
|
149
|
+
- Modified `.claude/skills/flow-release/SKILL.md`
|
|
150
|
+
|
|
151
|
+
**Key Changes**:
|
|
152
|
+
- 修改 release.js:
|
|
153
|
+
- 检测 `devflow/requirements/${REQ_ID}/specs/` 目录
|
|
154
|
+
- 遍历所有模块的 Delta spec.md 文件
|
|
155
|
+
- 调用 `delta-parser.ts merge` 合并到项目级 `devflow/specs/{module}/spec.md`
|
|
156
|
+
- 自动更新项目级 spec.md 的版本号和时间戳
|
|
157
|
+
- 处理新模块创建(如果项目级 spec 不存在)
|
|
158
|
+
- 记录合并结果到 manifest.metadata.deltaMergeResults
|
|
159
|
+
- 生成合并报告(✅ merged, 🆕 created, ❌ failed)
|
|
160
|
+
- 更新 flow-release SKILL.md:
|
|
161
|
+
- 添加 Step 2: 合并 Delta specs 到项目级 specs/
|
|
162
|
+
- 更新 Exit Criteria 要求 Delta 已成功合并
|
|
163
|
+
- 要求项目级 spec.md 版本号已更新
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### ✅ Task #9: Phase 3.1 - 清理废弃命令和模板
|
|
168
|
+
**Status**: Complete
|
|
169
|
+
**Files Modified**:
|
|
170
|
+
- Deleted `.claude/commands/flow/new.md`
|
|
171
|
+
- Deleted `.claude/commands/flow/clarify.md`
|
|
172
|
+
- Deleted `.claude/commands/flow/checklist.md`
|
|
173
|
+
- Deleted `.claude/commands/flow/quality.md`
|
|
174
|
+
- Deleted `.claude/docs/templates/PRD_TEMPLATE.md`
|
|
175
|
+
- Deleted `.claude/docs/templates/TECH_DESIGN_TEMPLATE.md`
|
|
176
|
+
- Deleted `.claude/docs/templates/EPIC_TEMPLATE.md`
|
|
177
|
+
- Deleted `.claude/docs/templates/TASKS_TEMPLATE.md`
|
|
178
|
+
- Modified `.claude/commands/flow/CLAUDE.md` (removed references to deleted files)
|
|
179
|
+
|
|
180
|
+
**Key Changes**:
|
|
181
|
+
- 删除了 4 个废弃命令文件 (new.md, clarify.md, checklist.md, quality.md)
|
|
182
|
+
- 删除了 4 个废弃模板文件 (PRD_TEMPLATE.md, TECH_DESIGN_TEMPLATE.md, EPIC_TEMPLATE.md, TASKS_TEMPLATE.md)
|
|
183
|
+
- 更新了 flow/CLAUDE.md 移除废弃文件引用
|
|
184
|
+
- workflow.yaml 已包含 deprecated 章节,无需额外修改
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
### ✅ Task #10: Phase 3.2 - 状态文件增强与查询工具
|
|
189
|
+
**Status**: Complete
|
|
190
|
+
**Files Modified**:
|
|
191
|
+
- Created `.claude/docs/state-consolidation-design.md` - 架构设计文档
|
|
192
|
+
- Modified `lib/harness/schemas.js` - 添加 HarnessStateSchema 和 HarnessStatusSchema
|
|
193
|
+
- Modified `lib/harness/operations/plan.js` - 写入 plannedAt 时间戳
|
|
194
|
+
- Modified `lib/harness/operations/dispatch.js` - 写入 status: 'in_progress'
|
|
195
|
+
- Modified `lib/harness/operations/verify.js` - 写入 verifiedAt 时间戳
|
|
196
|
+
- Created `lib/harness/query.js` - 查询工具函数
|
|
197
|
+
- Modified `lib/harness/index.js` - 导出 query 模块
|
|
198
|
+
- Modified `lib/harness/CLAUDE.md` - 更新成员清单
|
|
199
|
+
|
|
200
|
+
**Key Changes**:
|
|
201
|
+
- 重新定义 Task #10:不创建统一 state.json,而是增强现有架构
|
|
202
|
+
- 添加 HarnessStateSchema 支持 plannedAt/verifiedAt 字段
|
|
203
|
+
- 扩展 status 枚举:initialized → planned → in_progress → verified → released
|
|
204
|
+
- 创建 query.js 提供 getProgress/getNextTask/getFullState 聚合查询
|
|
205
|
+
- 保持 v6.0 关注点分离原则:harness-state.json (生命周期) + task-manifest.json (进度) + checkpoint.json (恢复) + report-card.json (质量)
|
|
206
|
+
- 设计文档说明:单一真相源 = 职责分离 + 查询聚合,而非单一文件
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### ✅ Task #11: Phase 2.1 - 实现分阶段上下文注入
|
|
211
|
+
**Status**: Complete
|
|
212
|
+
**Files Modified**:
|
|
213
|
+
- Created `devflow/requirements/REQ-011/context/brainstorm.jsonl` - 初始化阶段上下文
|
|
214
|
+
- Created `devflow/requirements/REQ-011/context/spec.jsonl` - 规格阶段上下文
|
|
215
|
+
- Created `devflow/requirements/REQ-011/context/dev.jsonl` - 开发阶段上下文
|
|
216
|
+
- Created `devflow/requirements/REQ-011/context/README.md` - 上下文目录说明
|
|
217
|
+
- Modified `.claude/hooks/inject-agent-context.ts` - 更新 AGENT_JSONL_MAP 映射
|
|
218
|
+
|
|
219
|
+
**Key Changes**:
|
|
220
|
+
- 创建分阶段 JSONL 文件结构:
|
|
221
|
+
- brainstorm.jsonl: proposal.md + Constitution Article X
|
|
222
|
+
- spec.jsonl: proposal.md + devflow/specs/ + Constitution Article I, X + spec-format-guide.md
|
|
223
|
+
- dev.jsonl: design.md + Delta specs/ + 相关代码 + Constitution Article I, VI
|
|
224
|
+
- 更新 inject-agent-context.ts 的 agent 到 JSONL 映射:
|
|
225
|
+
- flow-researcher → brainstorm.jsonl
|
|
226
|
+
- prd-writer/tech-architect/ui-designer/planner → spec.jsonl
|
|
227
|
+
- dev-implementer/qa-tester/security-reviewer/release-manager → dev.jsonl
|
|
228
|
+
- Hook 已支持从 `devflow/requirements/${REQ_ID}/context/` 读取 JSONL
|
|
229
|
+
- 实现分阶段隔离:每个阶段只加载必要的上下文,避免注意力分散
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Pending Tasks (4/16)
|
|
234
|
+
|
|
235
|
+
### ⏳ Task #12: Phase 4 - 模板和 Agent 指令瘦身
|
|
236
|
+
**Status**: Not Started
|
|
237
|
+
**Target Files**:
|
|
238
|
+
- All `.claude/docs/templates/*.md`
|
|
239
|
+
- All `.claude/agents/*.md`
|
|
240
|
+
|
|
241
|
+
**Required Changes**:
|
|
242
|
+
1. 每个模板 ≤200 行
|
|
243
|
+
2. 删除重复的 Constitution 内容(只保留引用)
|
|
244
|
+
3. 删除示例(移到 `.claude/docs/examples/`)
|
|
245
|
+
4. 删除冗长说明(保留核心约束)
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### ⏳ Task #13: Phase 5.1 - 增强项目级规划命令
|
|
250
|
+
**Status**: Not Started
|
|
251
|
+
**Target Files**:
|
|
252
|
+
- Create `.claude/commands/core/roadmap.md`
|
|
253
|
+
- Create `.claude/commands/core/milestone.md`
|
|
254
|
+
- Create `.claude/commands/core/epic.md`
|
|
255
|
+
- Delete `.claude/commands/flow/checklist.md`
|
|
256
|
+
- Delete `.claude/commands/flow/quality.md`
|
|
257
|
+
- Update `.claude/skills/workflow.yaml`
|
|
258
|
+
|
|
259
|
+
**Required Changes**:
|
|
260
|
+
1. 删除 7 个废弃命令文件
|
|
261
|
+
2. 删除 4 个废弃模板文件
|
|
262
|
+
3. 更新 workflow.yaml 移除废弃节点和边
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
### ⏳ Task #10: Phase 3.2 - 合并状态文件到 .harness/state.json
|
|
267
|
+
**Status**: Not Started
|
|
268
|
+
**Target Files**:
|
|
269
|
+
- Modify `lib/harness/store.js`
|
|
270
|
+
- Create unified `.harness/state.json` schema
|
|
271
|
+
- Deprecate `orchestration_status.json`, `session-checklist.json`, `session-progress.md`, `session-handoff.md`
|
|
272
|
+
|
|
273
|
+
**Required Changes**:
|
|
274
|
+
1. 设计统一状态文件 schema:
|
|
275
|
+
```json
|
|
276
|
+
{
|
|
277
|
+
"changeId": "REQ-123",
|
|
278
|
+
"lifecycle": { "stage": "dev", "status": "in_progress" },
|
|
279
|
+
"session": { "currentSessionId": "...", "checkpoints": [...] },
|
|
280
|
+
"progress": { "totalTasks": 6, "completedTasks": 2 },
|
|
281
|
+
"deltas": [...]
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
2. 迁移现有状态读写逻辑到统一文件
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
### ⏳ Task #11: Phase 4 - 模板和 Agent 指令瘦身
|
|
289
|
+
**Status**: Not Started
|
|
290
|
+
**Target Files**:
|
|
291
|
+
- All `.claude/docs/templates/*.md`
|
|
292
|
+
- All `.claude/agents/*.md`
|
|
293
|
+
|
|
294
|
+
**Required Changes**:
|
|
295
|
+
1. 每个模板 ≤200 行
|
|
296
|
+
2. 删除重复的 Constitution 内容(只保留引用)
|
|
297
|
+
3. 删除示例(移到 `.claude/docs/examples/`)
|
|
298
|
+
4. 删除冗长说明(保留核心约束)
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
### ⏳ Task #12: Phase 5.1 - 增强项目级规划命令
|
|
303
|
+
**Status**: Not Started
|
|
304
|
+
**Target Files**:
|
|
305
|
+
- Create `.claude/commands/core/roadmap.md`
|
|
306
|
+
- Create `.claude/commands/core/milestone.md`
|
|
307
|
+
- Create `.claude/commands/core/epic.md`
|
|
308
|
+
- Create `devflow/ROADMAP.md`
|
|
309
|
+
- Create `devflow/milestones/`
|
|
310
|
+
- Create `devflow/epics/`
|
|
311
|
+
|
|
312
|
+
**Required Changes**:
|
|
313
|
+
1. 实现 `/core:roadmap` 生成季度级规划
|
|
314
|
+
2. 实现 `/core:milestone create` 创建月度里程碑
|
|
315
|
+
3. 实现 `/core:epic create` 分解周级 Epic
|
|
316
|
+
4. 实现 `/flow:init` 关联 REQ 到 Epic
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
### ⏳ Task #13: Phase 5.2 - 强制 TDD/BDD 验证
|
|
321
|
+
**Status**: Not Started
|
|
322
|
+
**Target Files**:
|
|
323
|
+
- Modify `lib/harness/planner.js`
|
|
324
|
+
- Modify `.claude/skills/guardrail/tdd-enforcer/SKILL.md`
|
|
325
|
+
|
|
326
|
+
**Required Changes**:
|
|
327
|
+
1. 在 planner.js 添加 `validateTDDOrder()` 函数:
|
|
328
|
+
- 检查每个 IMPL 任务是否有对应的 TEST 任务
|
|
329
|
+
- 检查 IMPL 任务是否依赖 TEST 任务
|
|
330
|
+
- TDD 违规时抛出错误
|
|
331
|
+
2. 增强 tdd-enforcer 实时阻断能力
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
### ⏳ Task #14: Phase 5.3 - OpenSpec 互操作
|
|
336
|
+
**Status**: Not Started
|
|
337
|
+
**Target Files**:
|
|
338
|
+
- Create `.claude/scripts/import-openspec.ts`
|
|
339
|
+
- Create `.claude/scripts/export-openspec.ts`
|
|
340
|
+
- Create `.claude/commands/flow/import-openspec.md`
|
|
341
|
+
- Create `.claude/commands/flow/export-openspec.md`
|
|
342
|
+
|
|
343
|
+
**Required Changes**:
|
|
344
|
+
1. 实现 `/flow:import-openspec` 导入 OpenSpec spec.md
|
|
345
|
+
2. 实现 `/flow:export-openspec` 导出为 OpenSpec 格式
|
|
346
|
+
3. 双向转换保持语义一致性
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
### ⏳ Task #15: 集成测试和文档更新
|
|
351
|
+
**Status**: Not Started
|
|
352
|
+
**Target Files**:
|
|
353
|
+
- Create `tests/integration/v7-workflow.test.js`
|
|
354
|
+
- Update `README.md`
|
|
355
|
+
- Update `README.zh-CN.md`
|
|
356
|
+
- Update `.claude/CLAUDE.md`
|
|
357
|
+
|
|
358
|
+
**Required Changes**:
|
|
359
|
+
1. 编写完整工作流集成测试:
|
|
360
|
+
- `/flow:init` → `/flow:spec` → `/flow:dev` → `/flow:verify` → `/flow:release`
|
|
361
|
+
- 验证 proposal.md, design.md, Delta specs, scope-creep-report.md 生成
|
|
362
|
+
- 验证 Delta 合并到项目级 specs/
|
|
363
|
+
2. 更新所有文档反映 v4.3 架构变更
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## Progress Summary
|
|
368
|
+
|
|
369
|
+
| Phase | Tasks | Complete | Pending | Progress |
|
|
370
|
+
|-------|-------|----------|---------|----------|
|
|
371
|
+
| Phase 1 | 8 | 8 | 0 | 100% ✅ |
|
|
372
|
+
| Phase 2 | 1 | 1 | 0 | 100% ✅ |
|
|
373
|
+
| Phase 3 | 2 | 2 | 0 | 100% ✅ |
|
|
374
|
+
| Phase 4 | 1 | 0 | 1 | 0% |
|
|
375
|
+
| Phase 5 | 3 | 0 | 3 | 0% |
|
|
376
|
+
| Testing | 1 | 0 | 1 | 0% |
|
|
377
|
+
| **Total** | **16** | **12** | **4** | **75%** |
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## Next Steps
|
|
382
|
+
|
|
383
|
+
**Phase 1 Complete! 🎉**
|
|
384
|
+
**Phase 2 Complete! 🎉**
|
|
385
|
+
**Phase 3 Complete! 🎉**
|
|
386
|
+
|
|
387
|
+
**Next Priority** (Phase 4 + Phase 5):
|
|
388
|
+
1. ⏳ Task #12: 模板和 Agent 指令瘦身
|
|
389
|
+
2. ⏳ Task #13: 增强项目级规划命令
|
|
390
|
+
3. ⏳ Task #14: 强制 TDD/BDD 验证
|
|
391
|
+
4. ⏳ Task #15: OpenSpec 互操作
|
|
392
|
+
|
|
393
|
+
**Final Step**:
|
|
394
|
+
5. Task #16: 集成测试和文档更新
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Key Architectural Decisions
|
|
399
|
+
|
|
400
|
+
### 1. 项目级 vs 需求级 specs/
|
|
401
|
+
- **项目级** (`devflow/specs/`): 描述当前系统完整状态,不可变真相
|
|
402
|
+
- **需求级** (`devflow/requirements/${REQ_ID}/specs/`): 只包含 Delta 变更
|
|
403
|
+
|
|
404
|
+
### 2. Delta 操作类型
|
|
405
|
+
- **ADDED**: 新增需求(MINOR +1)
|
|
406
|
+
- **MODIFIED**: 修改需求(PATCH +1)
|
|
407
|
+
- **REMOVED**: 删除需求(MAJOR +1,破坏性变更)
|
|
408
|
+
- **RENAMED**: 重命名需求(PATCH +1)
|
|
409
|
+
|
|
410
|
+
### 3. 反扩散检查机制
|
|
411
|
+
- 对比 proposal.md 原始意图与 Delta specs 的 ADDED 需求
|
|
412
|
+
- 使用关键词匹配检测超出范围的功能
|
|
413
|
+
- 生成 scope-creep-report.md 报告
|
|
414
|
+
- 检测到范围扩散时阻塞流程,要求人工确认
|
|
415
|
+
|
|
416
|
+
### 4. 归档时自动合并
|
|
417
|
+
- `/flow:release` 触发 Delta 合并
|
|
418
|
+
- 调用 `delta-parser.ts merge` 执行合并
|
|
419
|
+
- 自动更新项目级 spec.md 的版本号和时间戳
|
|
420
|
+
- 归档需求到 `devflow/requirements/archive/${REQ_ID}/`
|
|
421
|
+
|
|
422
|
+
### 5. 状态文件架构(v6.0 Harness-First)
|
|
423
|
+
- **harness-state.json**: 生命周期状态(initialized → planned → in_progress → verified → released)
|
|
424
|
+
- **task-manifest.json**: 任务定义与进度(tasks[].status)
|
|
425
|
+
- **checkpoint.json**: 会话恢复点(per task)
|
|
426
|
+
- **report-card.json**: 质量验证结果
|
|
427
|
+
- **query.js**: 聚合查询工具(getProgress/getNextTask/getFullState)
|
|
428
|
+
- **设计哲学**: 单一真相源 = 职责分离 + 查询聚合,而非单一文件
|
|
429
|
+
|
|
430
|
+
### 6. 分阶段上下文注入(v4.3)
|
|
431
|
+
- **brainstorm.jsonl**: 初始化阶段(proposal.md + Constitution Article X)
|
|
432
|
+
- **spec.jsonl**: 规格阶段(proposal.md + devflow/specs/ + Constitution Article I, X)
|
|
433
|
+
- **dev.jsonl**: 开发阶段(design.md + Delta specs/ + 相关代码 + Constitution Article I, VI)
|
|
434
|
+
- **设计原则**: 每个阶段只加载必要的上下文,避免注意力分散
|
|
435
|
+
- **排除策略**: spec 阶段不包含现有代码,dev 阶段不包含 proposal.md
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## Constitutional Compliance
|
|
440
|
+
|
|
441
|
+
所有实现遵循 CC-DevFlow Constitution v2.1.0:
|
|
442
|
+
|
|
443
|
+
- **Article I: Quality First** - 完整实现,无部分实现
|
|
444
|
+
- **Article VI: Test-First Development** - TDD 顺序强制验证
|
|
445
|
+
- **Article X: Requirement Boundary** - 反扩散检查阻止范围蔓延
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|