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
package/README.zh-CN.md
CHANGED
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
- 📜 **Constitution** - 10条宪法条款管控质量、安全和架构
|
|
32
32
|
- 🔄 **自主开发** - Ralph × Manus 集成实现有记忆的持续迭代
|
|
33
33
|
- 🔌 **多平台支持** - 通过 `npm run adapt` 编译工作流到 Codex、Cursor、Qwen、Antigravity
|
|
34
|
+
- 🔄 **多模块编译器** - 完整模块编译:skills、commands、agents、rules、hooks
|
|
35
|
+
- 🌿 **Git Worktree 集成** - 支持 3-5 个并行 Claude 会话的隔离 worktree 开发
|
|
36
|
+
- 🤝 **Claude Team 集成** - 多 Agent 并行协作,自动任务调度和冲突检测
|
|
34
37
|
|
|
35
38
|
---
|
|
36
39
|
|
|
@@ -73,28 +76,37 @@ export SKIP_TDD_ENFORCER=1
|
|
|
73
76
|
📚 [完整 Hooks 文档](docs/guides/hooks-system.zh-CN.md)
|
|
74
77
|
</details>
|
|
75
78
|
|
|
76
|
-
### Skills 系统
|
|
79
|
+
### Skills 系统 (v4.0 Skills-First 架构)
|
|
77
80
|
|
|
78
|
-
|
|
81
|
+
智能知识库激活,分组 Skills 与自动上下文注入。
|
|
79
82
|
|
|
80
83
|
<details>
|
|
81
84
|
<summary>📖 Skills 详解(点击展开)</summary>
|
|
82
85
|
|
|
83
|
-
|
|
86
|
+
**Skills-First 架构** (v4.0):
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
```
|
|
89
|
+
.claude/skills/
|
|
90
|
+
├── workflow.yaml # Skill 依赖图 (借鉴 OpenSpec)
|
|
91
|
+
├── workflow/ # 9 个工作流 Skills (flow-init, flow-spec, flow-dev 等)
|
|
92
|
+
├── domain/ # 7 个领域 Skills (tdd, debugging, brainstorming)
|
|
93
|
+
├── guardrail/ # 3 个守护 Skills (constitution-guardian, tdd-enforcer)
|
|
94
|
+
└── utility/ # 8 个工具 Skills (npm-release, skill-creator)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**按分类的关键 Skills**:
|
|
92
98
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
| 分类 | Skills | 用途 |
|
|
100
|
+
|------|--------|------|
|
|
101
|
+
| **Workflow** | flow-init, flow-spec, flow-dev, flow-quality, flow-release | 核心开发工作流 |
|
|
102
|
+
| **Domain** | tdd, debugging, brainstorming, verification | 领域专业知识 |
|
|
103
|
+
| **Guardrail** | constitution-guardian, tdd-enforcer | 实时合规检查 |
|
|
104
|
+
| **Utility** | npm-release, skill-creator, writing-skills | 开发工具 |
|
|
105
|
+
|
|
106
|
+
**上下文注入** (借鉴 Trellis):
|
|
107
|
+
- 每个 Skill 有 `context.jsonl` 定义所需上下文文件
|
|
108
|
+
- `inject-skill-context.ts` 钩子在 Skill 执行前自动加载上下文
|
|
109
|
+
- 变量替换: `{REQ}` → 实际需求 ID
|
|
98
110
|
|
|
99
111
|
📚 [完整 Skills 文档](docs/guides/skills-system.zh-CN.md)
|
|
100
112
|
</details>
|
|
@@ -244,11 +256,13 @@ bash .claude/tests/constitution/run_all_constitution_tests.sh
|
|
|
244
256
|
|------|------|----------|----------|
|
|
245
257
|
| `/flow-new` | 🎯 启动新需求 | `/flow-new "REQ-123\|功能"` | [→](docs/commands/flow-new.zh-CN.md) |
|
|
246
258
|
| `/flow-init` | 📦 初始化需求 | `/flow-init "REQ-123\|功能"` | [→](docs/commands/flow-init.zh-CN.md) |
|
|
247
|
-
| `/flow-clarify` | 🔎 澄清歧义 | `/flow-clarify "REQ-123"` | [→](.claude/commands/flow
|
|
248
|
-
| `/flow-
|
|
249
|
-
| `/flow-
|
|
250
|
-
| `/flow-
|
|
251
|
-
| `/flow-
|
|
259
|
+
| `/flow-clarify` | 🔎 澄清歧义 | `/flow-clarify "REQ-123"` | [→](.claude/commands/flow/clarify.md) |
|
|
260
|
+
| `/flow-spec` | 📋 统一规格阶段 (v4.1) | `/flow-spec "REQ-123"` | [→](.claude/commands/flow/spec.md) |
|
|
261
|
+
| `/flow-checklist` | ✅ 需求质量检查 | `/flow-checklist --type ux` | [→](.claude/commands/flow/checklist.md) |
|
|
262
|
+
| `/flow-quality` | ✅ 统一质量验证 | `/flow-quality "REQ-123" --full` | [→](.claude/commands/flow/quality.md) |
|
|
263
|
+
| `/flow-fix` | 🐛 系统化缺陷修复 | `/flow-fix "BUG-123\|描述"` | [→](.claude/commands/flow/fix.md) |
|
|
264
|
+
| `/flow-verify` | 🔍 验证一致性 | `/flow-verify "REQ-123"` | [→](.claude/commands/flow/verify.md) |
|
|
265
|
+
| `/flow-release` | 🚢 创建发布 | `/flow-release "REQ-123"` | [→](.claude/commands/flow/release.md) |
|
|
252
266
|
|
|
253
267
|
📚 [完整命令参考](docs/commands/README.zh-CN.md)
|
|
254
268
|
|
|
@@ -268,7 +282,7 @@ bash .claude/tests/constitution/run_all_constitution_tests.sh
|
|
|
268
282
|
├─ 开发中断需要继续? → /flow-restart "REQ-123"
|
|
269
283
|
├─ 检查开发进度? → /flow-status REQ-123
|
|
270
284
|
├─ 发现文档不一致? → /flow-verify "REQ-123"
|
|
271
|
-
├─
|
|
285
|
+
├─ 开发完成需要验证? → /flow-quality "REQ-123" --full
|
|
272
286
|
├─ 修复生产 Bug? → /flow-fix "BUG-001|描述"
|
|
273
287
|
└─ 准备发布? → /flow-release "REQ-123"
|
|
274
288
|
```
|
|
@@ -283,53 +297,42 @@ bash .claude/tests/constitution/run_all_constitution_tests.sh
|
|
|
283
297
|
```mermaid
|
|
284
298
|
graph TB
|
|
285
299
|
Start([项目启动]) --> ProjectLevel{项目级初始化}
|
|
286
|
-
|
|
300
|
+
|
|
287
301
|
ProjectLevel --> CoreRoadmap["/core-roadmap<br/>ROADMAP.md & BACKLOG.md"]
|
|
288
302
|
ProjectLevel --> CoreArch["/core-architecture<br/>ARCHITECTURE.md"]
|
|
289
303
|
ProjectLevel --> CoreGuidelines["/core-guidelines<br/>前端/后端规范"]
|
|
290
304
|
ProjectLevel --> CoreStyle["/core-style<br/>STYLE.md"]
|
|
291
|
-
|
|
305
|
+
|
|
292
306
|
CoreRoadmap --> ReqLevel
|
|
293
307
|
CoreArch --> ReqLevel
|
|
294
308
|
CoreGuidelines --> ReqLevel
|
|
295
309
|
CoreStyle --> ReqLevel
|
|
296
|
-
|
|
297
|
-
ReqLevel([需求级开发流程]) --> FlowInit["/flow-init<br/>research.md &
|
|
298
|
-
|
|
310
|
+
|
|
311
|
+
ReqLevel([需求级开发流程]) --> FlowInit["/flow-init<br/>research.md & BRAINSTORM.md"]
|
|
312
|
+
|
|
299
313
|
FlowInit --> FlowClarify["/flow-clarify<br/>clarifications/*.md<br/>可选"]
|
|
300
|
-
FlowClarify -->
|
|
301
|
-
FlowInit -.->|跳过澄清|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
FlowEpic --> FlowDev["/flow-dev<br/>TASKS.md 执行<br/>TDD 强制"]
|
|
311
|
-
|
|
312
|
-
FlowDev --> FlowQA["/flow-qa<br/>QA 报告 & 安全审查"]
|
|
313
|
-
|
|
314
|
-
FlowQA --> FlowRelease["/flow-release<br/>PR 创建 & 部署"]
|
|
315
|
-
|
|
314
|
+
FlowClarify --> FlowSpec["/flow-spec (v4.1)<br/>PRD → Tech+UI (并行) → Epic<br/>统一规格阶段"]
|
|
315
|
+
FlowInit -.->|跳过澄清| FlowSpec
|
|
316
|
+
|
|
317
|
+
FlowSpec --> FlowDev["/flow-dev<br/>TASKS.md 执行<br/>TDD 强制"]
|
|
318
|
+
|
|
319
|
+
FlowDev --> FlowQuality["/flow-quality<br/>快速/完整验证<br/>规格 + 质量 + 安全"]
|
|
320
|
+
|
|
321
|
+
FlowQuality --> FlowRelease["/flow-release<br/>PR 创建 & 部署"]
|
|
322
|
+
|
|
316
323
|
FlowRelease --> FlowVerify["/flow-verify<br/>一致性检查"]
|
|
317
|
-
|
|
324
|
+
|
|
318
325
|
FlowVerify --> End([发布完成])
|
|
319
|
-
|
|
326
|
+
|
|
320
327
|
FlowVerify -.->|可在任意阶段调用| ReqLevel
|
|
321
|
-
|
|
328
|
+
|
|
322
329
|
style ProjectLevel fill:#e1f5ff
|
|
323
330
|
style ReqLevel fill:#fff4e1
|
|
324
331
|
style FlowInit fill:#e8f5e9
|
|
325
332
|
style FlowClarify fill:#fff9c4
|
|
326
|
-
style
|
|
327
|
-
style FlowChecklist fill:#ffe0b2
|
|
328
|
-
style FlowTech fill:#e8f5e9
|
|
329
|
-
style FlowUI fill:#fff9c4
|
|
330
|
-
style FlowEpic fill:#e8f5e9
|
|
333
|
+
style FlowSpec fill:#e8f5e9
|
|
331
334
|
style FlowDev fill:#f3e5f5
|
|
332
|
-
style
|
|
335
|
+
style FlowQuality fill:#fce4ec
|
|
333
336
|
style FlowRelease fill:#e0f2f1
|
|
334
337
|
style FlowVerify fill:#e3f2fd
|
|
335
338
|
```
|
|
@@ -337,8 +340,9 @@ graph TB
|
|
|
337
340
|
**流程说明**:
|
|
338
341
|
- **项目级命令**(浅蓝色):项目初始化时执行一次,建立全局标准(SSOT)
|
|
339
342
|
- **需求级命令**(浅橙色):每个需求(REQ-XXX)执行一次
|
|
340
|
-
-
|
|
341
|
-
-
|
|
343
|
+
- **统一 /flow-spec** (v4.1):替代 flow-prd/flow-tech/flow-ui/flow-epic,支持并行执行
|
|
344
|
+
- **统一质量验证** (v3.0.0):`/flow-quality --full` 合并规格合规、代码质量与安全检查
|
|
345
|
+
- **可选步骤**(黄色):`/flow-clarify` 为可选步骤,需求清晰时可跳过
|
|
342
346
|
- **质量闸门**:每个阶段都有入口/出口闸门,确保文档质量和 Constitution 合规性
|
|
343
347
|
- **TDD 强制执行**:`/flow-dev` 严格强制执行测试驱动开发顺序
|
|
344
348
|
- **一致性检查**:`/flow-verify` 可在任意阶段调用,确保文档一致性
|
|
@@ -420,7 +424,7 @@ devflow/
|
|
|
420
424
|
```
|
|
421
425
|
|
|
422
426
|
<details>
|
|
423
|
-
<
|
|
427
|
+
<summary>🔧 完整配置选项(点击展开)</summary>
|
|
424
428
|
|
|
425
429
|
### Hooks 配置
|
|
426
430
|
|
|
@@ -484,7 +488,165 @@ bash .claude/tests/run-all-tests.sh --scripts
|
|
|
484
488
|
|
|
485
489
|
## 📝 版本历史
|
|
486
490
|
|
|
487
|
-
###
|
|
491
|
+
### v4.7.0 (2026-02-07) - 最新版本
|
|
492
|
+
|
|
493
|
+
**🤝 Claude Team 集成:多 Agent 并行协作**
|
|
494
|
+
|
|
495
|
+
v4.7.0 引入 Claude Team 集成,支持多 Agent 并行开发:
|
|
496
|
+
|
|
497
|
+
- **flow-dev Team 模式** - 多 Agent 并行任务执行
|
|
498
|
+
- `--team` 标志启用 Team 模式(默认 3 个 Agent)
|
|
499
|
+
- `--agents N` 指定 Agent 数量(2-5)
|
|
500
|
+
- 自动任务依赖分析和冲突检测
|
|
501
|
+
- 文件冲突任务分配给同一 Agent 串行执行
|
|
502
|
+
|
|
503
|
+
- **新增 Hooks** - Team 生命周期管理
|
|
504
|
+
- `TeammateIdle Hook` - 任务分配和调度
|
|
505
|
+
- `TaskCompleted Hook` - 完成时质量验证
|
|
506
|
+
- 超时检测和告警
|
|
507
|
+
|
|
508
|
+
- **任务依赖解析器** - 智能任务分析
|
|
509
|
+
- `parse-task-dependencies.js` - 解析 TASKS.md 格式
|
|
510
|
+
- 识别 `[P]` 并行标记、`[US*]` 用户故事分组
|
|
511
|
+
- 基于 Phase 的依赖解析
|
|
512
|
+
|
|
513
|
+
- **状态恢复** - 断点续传
|
|
514
|
+
- `team-state-recovery.sh` - 快照和恢复 Team 状态
|
|
515
|
+
- 支持中断会话恢复
|
|
516
|
+
|
|
517
|
+
- **新增文件**
|
|
518
|
+
- `.claude/scripts/parse-task-dependencies.js` - 任务解析器
|
|
519
|
+
- `.claude/scripts/detect-file-conflicts.sh` - 冲突检测
|
|
520
|
+
- `.claude/scripts/team-dev-init.sh` - Dev Team 初始化
|
|
521
|
+
- `.claude/scripts/team-state-recovery.sh` - 状态恢复
|
|
522
|
+
- `.claude/docs/guides/TEAM_MODE_GUIDE.md` - 完整使用指南
|
|
523
|
+
|
|
524
|
+
**📊 v4.7 改进指标**:
|
|
525
|
+
| 指标 | 之前 | 之后 | 改善 |
|
|
526
|
+
|------|------|------|------|
|
|
527
|
+
| 并行 Agent 数 | 1 | 3-5 | +400% |
|
|
528
|
+
| 需求完成时间 | 90 分钟 | 50 分钟 | -45% |
|
|
529
|
+
| 任务调度 | 手动 | 自动 | 100% |
|
|
530
|
+
| 质量验证 | 单点 | 分布式 | 100% |
|
|
531
|
+
|
|
532
|
+
### v4.3.0 (2026-02-07)
|
|
533
|
+
|
|
534
|
+
**🌿 Git Worktree 集成:并行开发支持**
|
|
535
|
+
|
|
536
|
+
v4.3.0 引入 Git Worktree 集成,支持多个隔离的 Claude Code 会话并行开发:
|
|
537
|
+
|
|
538
|
+
- **Git Worktree 模式(默认)** - 隔离的开发环境
|
|
539
|
+
- 创建 `../repo-name-REQ-xxx/` worktree 目录
|
|
540
|
+
- 每个 worktree 有独立的 Claude Code 会话
|
|
541
|
+
- 用 `cd` 切换需求,而非 `git checkout`
|
|
542
|
+
- `--branch-only` 标志支持传统分支模式
|
|
543
|
+
|
|
544
|
+
- **新增 Skill: using-git-worktrees** - 完整的 worktree 管理
|
|
545
|
+
- `worktree-create.sh` - 创建新 worktree
|
|
546
|
+
- `worktree-list.sh` - 列出所有 worktree
|
|
547
|
+
- `worktree-switch.sh` - 切换 worktree
|
|
548
|
+
- `worktree-cleanup.sh` - 清理已合并的 worktree
|
|
549
|
+
- Shell 别名模板 (za/zl/zm/zw)
|
|
550
|
+
|
|
551
|
+
- **修改的命令**
|
|
552
|
+
- `/flow-init` - 默认 worktree 模式,`--branch-only` 兼容旧模式
|
|
553
|
+
- `/flow-release` - 自动清理 worktree
|
|
554
|
+
|
|
555
|
+
**📊 v4.3 改进指标**:
|
|
556
|
+
| 指标 | 之前 | 之后 | 改善 |
|
|
557
|
+
|------|------|------|------|
|
|
558
|
+
| 并行需求数 | 1 | 3-5 | +400% |
|
|
559
|
+
| 上下文切换时间 | 30s | 1s | -97% |
|
|
560
|
+
| 会话隔离 | 无 | 完全 | 100% |
|
|
561
|
+
|
|
562
|
+
### v4.1.0 (2026-02-07)
|
|
563
|
+
|
|
564
|
+
**🎯 统一规格阶段:/flow-spec 命令**
|
|
565
|
+
|
|
566
|
+
v4.1.0 将 flow-prd/flow-tech/flow-ui/flow-epic 合并为单一 `/flow-spec` 命令,支持并行执行:
|
|
567
|
+
|
|
568
|
+
- **统一 /flow-spec 命令** - 一个命令完成整个规格阶段
|
|
569
|
+
- 完整模式:PRD → Tech + UI(并行)→ Epic/Tasks
|
|
570
|
+
- 快速模式:`--skip-tech --skip-ui` 适用于小需求
|
|
571
|
+
- 仅后端:`--skip-ui`
|
|
572
|
+
- 仅前端:`--skip-tech`
|
|
573
|
+
|
|
574
|
+
- **并行 Agent 执行** - Tech + UI 代理并发运行
|
|
575
|
+
- 设计阶段时间减少约 35%
|
|
576
|
+
- 共享模板组件位于 `_shared/` 目录
|
|
577
|
+
|
|
578
|
+
- **简化工作流** (v4.1)
|
|
579
|
+
```
|
|
580
|
+
精简 (3 步): /flow-init --quick → /flow-spec --skip-tech --skip-ui → /flow-dev → /flow-release
|
|
581
|
+
标准 (4 步): /flow-init → /flow-spec → /flow-dev → /flow-quality → /flow-release
|
|
582
|
+
完整 (5 步): /flow-init → /flow-clarify → /flow-spec → /flow-dev → /flow-quality --full → /flow-release
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
- **废弃命令**:`/flow-prd`、`/flow-tech`、`/flow-ui`、`/flow-epic` 已废弃(请使用 `/flow-spec`)
|
|
586
|
+
|
|
587
|
+
**📊 v4.1 改进指标**:
|
|
588
|
+
| 指标 | 之前 (v4.0) | 之后 (v4.1) | 改善 |
|
|
589
|
+
|------|-------------|-------------|------|
|
|
590
|
+
| 命令调用次数 | 4 | 1 | -75% |
|
|
591
|
+
| 设计阶段时间 | 8-12 分钟 | 5-8 分钟 | -35% |
|
|
592
|
+
| Entry/Exit Gate 代码 | ~280 行 | ~100 行 | -64% |
|
|
593
|
+
|
|
594
|
+
### v4.0.0 (2026-02-07)
|
|
595
|
+
|
|
596
|
+
**🏗️ Skills-First 架构:统一 Skills 与上下文注入**
|
|
597
|
+
|
|
598
|
+
v4.0.0 引入重大架构重构,将 135 个文件重组为统一的 Skills-First 架构,借鉴 Trellis 和 OpenSpec:
|
|
599
|
+
|
|
600
|
+
- **Skills-First 架构** - 所有 Skills 组织为 4 个分组
|
|
601
|
+
- `workflow/`: 9 个核心工作流 Skills (flow-init, flow-spec, flow-dev 等)
|
|
602
|
+
- `domain/`: 7 个领域专业 Skills (tdd, debugging, brainstorming, verification)
|
|
603
|
+
- `guardrail/`: 3 个实时合规 Skills (constitution-guardian, tdd-enforcer)
|
|
604
|
+
- `utility/`: 8 个开发工具 Skills (npm-release, skill-creator, writing-skills)
|
|
605
|
+
|
|
606
|
+
- **JSONL 上下文注入** (借鉴 Trellis)
|
|
607
|
+
- 每个 Skill 有 `context.jsonl` 定义所需上下文文件
|
|
608
|
+
- `inject-skill-context.ts` 钩子在 Skill 执行前自动加载上下文
|
|
609
|
+
- 变量替换: `{REQ}` 替换为实际需求 ID
|
|
610
|
+
- 支持可选文件 `"optional": true`
|
|
611
|
+
|
|
612
|
+
- **workflow.yaml 依赖图** (借鉴 OpenSpec)
|
|
613
|
+
- 通过 `requires` 和 `generates` 定义 Skill 依赖
|
|
614
|
+
- 文件存在性状态检测
|
|
615
|
+
- 清晰可视化 Skill 执行顺序
|
|
616
|
+
|
|
617
|
+
- **自包含 Skills**
|
|
618
|
+
- 每个 Skill 目录包含: SKILL.md + context.jsonl + scripts/ + references/ + assets/
|
|
619
|
+
- SKILL.md 限制 <500 行,聚焦核心指令
|
|
620
|
+
- Agent 指令移至 `references/` 子目录
|
|
621
|
+
- 模板移至 `assets/` 子目录
|
|
622
|
+
|
|
623
|
+
- **多模块跨平台编译器** (v3.0)
|
|
624
|
+
- 完整模块编译:skills、commands、agents、rules、hooks
|
|
625
|
+
- 平台专用输出格式:
|
|
626
|
+
- **Codex**: `.codex/skills/`, `.codex/prompts/`, `AGENTS.md`
|
|
627
|
+
- **Cursor**: `.cursor/rules/*.mdc`, `.cursor/subagents/`, `hooks.json`
|
|
628
|
+
- **Qwen**: `.qwen/commands/*.toml`, `.qwen/agents/`, `CONTEXT.md`
|
|
629
|
+
- **Antigravity**: `.agent/skills/`, `.agent/workflows/`, `.agent/rules/`
|
|
630
|
+
- `context.jsonl` 编译时展开,支持平台专用格式
|
|
631
|
+
- 197 个测试通过(24 个新增多模块测试)
|
|
632
|
+
|
|
633
|
+
**📊 v4.0 改进指标**:
|
|
634
|
+
| 指标 | 之前 | 之后 | 改善 |
|
|
635
|
+
|------|------|------|------|
|
|
636
|
+
| 维护点 | 4 个目录 | 1 个目录 | -75% |
|
|
637
|
+
| 上下文加载 | 手动全量 | 按需自动 | -70% token |
|
|
638
|
+
| 依赖可见性 | 隐式 | 显式 (workflow.yaml) | +100% |
|
|
639
|
+
| 平台模块支持 | 仅命令 | 全部模块 | +400% |
|
|
640
|
+
|
|
641
|
+
**📁 新增文件**:
|
|
642
|
+
- `.claude/skills/workflow.yaml` - Skill 依赖图
|
|
643
|
+
- `.claude/hooks/inject-skill-context.ts` - 上下文注入钩子
|
|
644
|
+
- `.claude/skills/workflow/*/context.jsonl` - 每个 Skill 的上下文定义
|
|
645
|
+
- `devflow/spec/{frontend,backend,shared}/index.md` - 规范索引
|
|
646
|
+
- `lib/compiler/context-expander.js` - Context.jsonl 展开模块
|
|
647
|
+
- `lib/compiler/__tests__/multi-module-emitters.test.js` - 多模块测试
|
|
648
|
+
|
|
649
|
+
### v2.3.0 (2026-01-08)
|
|
488
650
|
|
|
489
651
|
**🛡️ 纪律系统:铁律 + 合理化防御 + 压力测试**
|
|
490
652
|
|
|
@@ -541,7 +703,7 @@ v2.3.0 将 Constitution 从"文档"升级为"可执行纪律系统",借鉴 sup
|
|
|
541
703
|
- 交叉引用到 `rationalization-library.md`
|
|
542
704
|
|
|
543
705
|
**📁 新增文件**:
|
|
544
|
-
- `.claude/commands/cancel-ralph.md` - 取消 Ralph 循环命令
|
|
706
|
+
- `.claude/commands/util/cancel-ralph.md` - 取消 Ralph 循环命令
|
|
545
707
|
- `.claude/skills/flow-attention-refresh/SKILL.md` - 4 个注意力刷新协议
|
|
546
708
|
- `.claude/hooks/ralph-stop-hook.sh` - 自引用循环 Stop Hook
|
|
547
709
|
- `.claude/hooks/hooks.json` - Hook 注册配置
|
|
@@ -550,7 +712,7 @@ v2.3.0 将 Constitution 从"文档"升级为"可执行纪律系统",借鉴 sup
|
|
|
550
712
|
- `.claude/docs/templates/ATTEMPT_TEMPLATE.md` - 研究尝试日志格式
|
|
551
713
|
- `.claude/agents/spec-reviewer.md` - 阶段 1 规格合规性审查员
|
|
552
714
|
- `.claude/agents/code-quality-reviewer.md` - 阶段 2 代码质量审查员
|
|
553
|
-
- `.claude/commands/flow-review.md` -
|
|
715
|
+
- `.claude/commands/flow-review.md` - 两阶段审查命令(legacy,已由 `.claude/commands/flow/quality.md` 取代)
|
|
554
716
|
- `.claude/rules/rationalization-library.md` - 集中式合理化防御
|
|
555
717
|
- `.claude/scripts/verify-gate.sh` - 出口闸门验证脚本
|
|
556
718
|
- `.claude/skills/flow-brainstorming/` - 头脑风暴技能
|
package/lib/compiler/CLAUDE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Command Emitter - Compiler Module Architecture
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
|
-
Multi-platform
|
|
4
|
+
Multi-platform compiler that transforms `.claude/` modules (commands, skills, agents, rules, hooks) into native formats for Codex, Cursor, Qwen, and Antigravity platforms.
|
|
5
5
|
|
|
6
|
-
## Architecture
|
|
6
|
+
## Architecture (v3.0)
|
|
7
7
|
|
|
8
8
|
```
|
|
9
9
|
lib/compiler/
|
|
@@ -13,63 +13,90 @@ lib/compiler/
|
|
|
13
13
|
├── schemas.js # Zod validation schemas (CommandIR, Manifest)
|
|
14
14
|
├── errors.js # Custom error types (MissingFrontmatter, UnknownAlias, etc.)
|
|
15
15
|
├── skills-registry.js # Generate skills registry from .claude/skills/
|
|
16
|
+
├── platforms.js # Platform configuration registry (v2.0)
|
|
17
|
+
├── context-expander.js # context.jsonl expansion (v3.0)
|
|
16
18
|
├── index.js # Compiler entry point, orchestrates pipeline
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
├── emitters/
|
|
20
|
+
│ ├── base-emitter.js # Abstract base class (v2.0: multi-module support)
|
|
21
|
+
│ ├── codex-emitter.js # .codex/prompts/*.md, .codex/skills/*, AGENTS.md
|
|
22
|
+
│ ├── cursor-emitter.js # .cursor/commands/*.md, .cursor/rules/*.mdc, subagents/
|
|
23
|
+
│ ├── qwen-emitter.js # .qwen/commands/*.toml, .qwen/agents/*, CONTEXT.md
|
|
24
|
+
│ ├── antigravity-emitter.js # .agent/workflows/*.md, .agent/skills/*, rules/
|
|
25
|
+
│ └── index.js # Emitter factory
|
|
26
|
+
└── rules-emitters/ # Legacy rules emitters (deprecated)
|
|
27
|
+
└── ...
|
|
24
28
|
```
|
|
25
29
|
|
|
26
|
-
##
|
|
30
|
+
## Multi-Module Compilation (v3.0)
|
|
31
|
+
|
|
32
|
+
### Supported Modules
|
|
33
|
+
|
|
34
|
+
| Module | Source | Codex | Cursor | Qwen | Antigravity |
|
|
35
|
+
|--------|--------|-------|--------|------|-------------|
|
|
36
|
+
| skills | `.claude/skills/` | `.codex/skills/` | `.cursor/rules/*.mdc` | `.qwen/commands/*.toml` | `.agent/skills/` |
|
|
37
|
+
| commands | `.claude/commands/` | `.codex/prompts/` | `.cursor/commands/` | `.qwen/commands/` | `.agent/workflows/` |
|
|
38
|
+
| agents | `.claude/agents/` | `AGENTS.md` | `.cursor/subagents/` | `.qwen/agents/` | `AGENTS.md` |
|
|
39
|
+
| rules | `.claude/rules/` | `AGENTS.md` | `.cursor/rules/*.mdc` | `CONTEXT.md` | `.agent/rules/` |
|
|
40
|
+
| hooks | `.claude/hooks/` | ❌ | `hooks.json` + `hooks/` | ❌ | ❌ |
|
|
41
|
+
|
|
42
|
+
### Data Flow (v3.0)
|
|
27
43
|
|
|
28
44
|
```
|
|
29
|
-
.claude/
|
|
45
|
+
.claude/
|
|
46
|
+
├── skills/*/SKILL.md
|
|
47
|
+
├── commands/*.md
|
|
48
|
+
├── agents/*.md
|
|
49
|
+
├── rules/*.md
|
|
50
|
+
└── hooks/*.ts
|
|
30
51
|
│
|
|
31
52
|
▼
|
|
32
|
-
|
|
33
|
-
│
|
|
34
|
-
│
|
|
35
|
-
|
|
36
|
-
│ │ - Compute SHA-256 hash
|
|
37
|
-
└────────┬────────┘
|
|
38
|
-
│ CommandIR[]
|
|
39
|
-
▼
|
|
40
|
-
┌─────────────────┐
|
|
41
|
-
│ Transformer │ Platform-specific transforms
|
|
42
|
-
│(transformer.js) │ - {SCRIPT:alias} → "bash <path>"
|
|
43
|
-
│ │ - $ARGUMENTS → {{args}} / [arguments]
|
|
44
|
-
│ │ - {AGENT_SCRIPT} + __AGENT__ substitution
|
|
45
|
-
└────────┬────────┘
|
|
46
|
-
│ TransformedContent
|
|
47
|
-
▼
|
|
48
|
-
┌─────────────────┐
|
|
49
|
-
│ Emitters │ Platform format + file write
|
|
50
|
-
│ (emitters/*.js) │ - Codex: MD + YAML frontmatter
|
|
51
|
-
│ │ - Cursor: pure MD
|
|
52
|
-
│ │ - Qwen: TOML
|
|
53
|
-
│ │ - Antigravity: MD + YAML (12K limit)
|
|
54
|
-
└────────┬────────┘
|
|
53
|
+
┌─────────────────────┐
|
|
54
|
+
│ compileMultiModule │ Orchestrates all modules
|
|
55
|
+
│ (index.js) │
|
|
56
|
+
└────────┬────────────┘
|
|
55
57
|
│
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
│
|
|
60
|
-
│
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
┌────┴────┬────────┬────────┬────────┐
|
|
59
|
+
▼ ▼ ▼ ▼ ▼
|
|
60
|
+
┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐
|
|
61
|
+
│Skills │ │Commands│ │Agents │ │Rules │ │Hooks │
|
|
62
|
+
│Emitter│ │Emitter │ │Emitter│ │Emitter│ │Emitter│
|
|
63
|
+
└───┬───┘ └───┬───┘ └───┬───┘ └───┬───┘ └───┬───┘
|
|
64
|
+
│ │ │ │ │
|
|
65
|
+
▼ ▼ ▼ ▼ ▼
|
|
66
|
+
Platform-specific output directories
|
|
63
67
|
```
|
|
64
68
|
|
|
65
69
|
## CLI Usage
|
|
66
70
|
|
|
67
71
|
```bash
|
|
72
|
+
# Legacy: Compile commands only
|
|
68
73
|
npm run adapt # Compile all platforms
|
|
69
74
|
npm run adapt -- --platform codex # Compile single platform
|
|
70
75
|
npm run adapt -- --check # Drift detection only
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
|
|
77
|
+
# v3.0: Multi-module compilation
|
|
78
|
+
npm run adapt -- --modules skills,commands,agents,rules
|
|
79
|
+
npm run adapt -- --modules skills --platform cursor
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Key APIs
|
|
83
|
+
|
|
84
|
+
### compile(options) - Legacy
|
|
85
|
+
Compiles commands only (backward compatible).
|
|
86
|
+
|
|
87
|
+
### compileMultiModule(options) - v3.0
|
|
88
|
+
Compiles all specified modules.
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
const { compileMultiModule } = require('./lib/compiler');
|
|
92
|
+
|
|
93
|
+
await compileMultiModule({
|
|
94
|
+
sourceBaseDir: '.claude/',
|
|
95
|
+
outputBaseDir: '.',
|
|
96
|
+
platforms: ['codex', 'cursor', 'qwen', 'antigravity'],
|
|
97
|
+
modules: ['skills', 'commands', 'agents', 'rules'],
|
|
98
|
+
verbose: true
|
|
99
|
+
});
|
|
73
100
|
```
|
|
74
101
|
|
|
75
102
|
## Key Schemas
|
|
@@ -77,16 +104,20 @@ npm run adapt -- --verbose # Detailed output
|
|
|
77
104
|
- **CommandIR**: Intermediate representation after parsing
|
|
78
105
|
- **ManifestEntry**: Single compilation record (source, target, hash, platform)
|
|
79
106
|
- **Manifest**: Complete compilation history
|
|
107
|
+
- **PlatformConfig**: Platform-specific configuration (v2.0)
|
|
80
108
|
|
|
81
109
|
## Dependencies
|
|
82
110
|
|
|
83
111
|
- `gray-matter`: Frontmatter parsing
|
|
84
112
|
- `@iarna/toml`: TOML serialization (Qwen)
|
|
85
|
-
- `js-yaml`: YAML serialization (Codex, Antigravity)
|
|
113
|
+
- `js-yaml`: YAML serialization (Codex, Antigravity, Cursor)
|
|
86
114
|
- `zod`: Schema validation
|
|
87
115
|
|
|
88
116
|
---
|
|
89
117
|
|
|
90
118
|
**Created**: 2025-12-18
|
|
91
|
-
**
|
|
92
|
-
**
|
|
119
|
+
**Updated**: 2026-02-07
|
|
120
|
+
**REQ**: REQ-005 (RM-007), Multi-Platform Adaptation
|
|
121
|
+
**Version**: 3.0.0
|
|
122
|
+
|
|
123
|
+
[PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
|