cc-devflow 4.5.10 → 4.5.12
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/skills/cc-act/CHANGELOG.md +23 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +17 -269
- package/.claude/skills/cc-act/SKILL.md +38 -418
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +2 -13
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +1 -9
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +21 -177
- package/.claude/skills/cc-act/references/closure-contract.md +12 -63
- package/.claude/skills/cc-act/references/git-commit-guidelines.md +5 -5
- package/.claude/skills/cc-act/scripts/cc-act-common.sh +5 -322
- package/.claude/skills/cc-act/scripts/detect-ship-target.sh +11 -2
- package/.claude/skills/cc-act/scripts/inspect-git-index.sh +58 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +40 -440
- package/.claude/skills/cc-act/scripts/verify-act-gate.sh +10 -50
- package/.claude/skills/cc-check/CHANGELOG.md +24 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +19 -273
- package/.claude/skills/cc-check/SKILL.md +33 -454
- package/.claude/skills/cc-check/references/review-contract.md +12 -147
- package/.claude/skills/cc-dev/CHANGELOG.md +20 -0
- package/.claude/skills/cc-dev/PLAYBOOK.md +1 -1
- package/.claude/skills/cc-dev/SKILL.md +52 -130
- package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +181 -0
- package/.claude/skills/cc-do/CHANGELOG.md +17 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +19 -113
- package/.claude/skills/cc-do/SKILL.md +39 -236
- package/.claude/skills/cc-do/references/execution-recovery.md +15 -109
- package/.claude/skills/cc-do/scripts/cc-do-common.sh +5 -57
- package/.claude/skills/cc-do/scripts/check-task-status.sh +35 -65
- package/.claude/skills/cc-do/scripts/mark-task-complete.sh +9 -46
- package/.claude/skills/cc-do/scripts/select-ready-tasks.sh +29 -97
- package/.claude/skills/cc-investigate/CHANGELOG.md +23 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +20 -180
- package/.claude/skills/cc-investigate/SKILL.md +65 -513
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +48 -95
- package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -217
- package/.claude/skills/cc-next/CHANGELOG.md +6 -0
- package/.claude/skills/cc-next/PLAYBOOK.md +12 -8
- package/.claude/skills/cc-next/SKILL.md +34 -140
- package/.claude/skills/cc-plan/CHANGELOG.md +29 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +22 -161
- package/.claude/skills/cc-plan/SKILL.md +47 -640
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +30 -225
- package/.claude/skills/cc-plan/references/planning-contract.md +24 -160
- package/.claude/skills/cc-plan/scripts/next-change-key.sh +8 -44
- package/.claude/skills/cc-plan/scripts/parse-task-dependencies.js +2 -2
- package/.claude/skills/cc-plan/scripts/validate-scope.sh +1 -1
- package/.claude/skills/cc-pr-land/SKILL.md +14 -114
- package/.claude/skills/cc-pr-review/CHANGELOG.md +4 -0
- package/.claude/skills/cc-pr-review/SKILL.md +20 -103
- package/.claude/skills/cc-review/CHANGELOG.md +17 -0
- package/.claude/skills/cc-review/PLAYBOOK.md +13 -86
- package/.claude/skills/cc-review/SKILL.md +53 -241
- package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +2 -2
- package/.claude/skills/cc-review/references/implementation-review-branch.md +7 -147
- package/.claude/skills/cc-review/references/plan-review-branch.md +5 -147
- package/.claude/skills/cc-review/references/review-methods.md +10 -218
- package/.claude/skills/cc-review/scripts/collect-review-context.sh +4 -63
- package/.claude/skills/cc-roadmap/PLAYBOOK.md +1 -1
- package/.claude/skills/cc-roadmap/SKILL.md +3 -3
- package/.claude/skills/cc-simplify/CHANGELOG.md +7 -0
- package/.claude/skills/cc-simplify/SKILL.md +26 -21
- package/.claude/skills/cc-spec-init/PLAYBOOK.md +12 -48
- package/.claude/skills/cc-spec-init/SKILL.md +29 -132
- package/.claude/skills/cc-spec-init/references/spec-contract.md +8 -17
- package/CHANGELOG.md +27 -0
- package/README.md +5 -3
- package/README.zh-CN.md +5 -3
- package/bin/cc-devflow-cli.js +20 -260
- package/bin/cc-devflow.js +44 -7
- package/docs/commands/README.md +1 -1
- package/docs/commands/README.zh-CN.md +1 -1
- package/docs/examples/README.md +1 -1
- package/docs/examples/START-HERE.md +14 -14
- package/docs/examples/example-bindings.json +11 -11
- package/docs/examples/full-design-blocked/README.md +4 -6
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/{planning/tasks.md → task.md} +20 -15
- package/docs/examples/local-handoff/README.md +8 -11
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/pr-brief.md +31 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/{planning/tasks.md → task.md} +18 -13
- package/docs/examples/pdca-loop/README.md +6 -9
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +9 -11
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/{planning/tasks.md → task.md} +18 -13
- package/docs/examples/scripts/check-example-bindings.sh +11 -62
- package/docs/guides/artifact-contract.md +10 -36
- package/docs/guides/getting-started.md +8 -7
- package/docs/guides/getting-started.zh-CN.md +8 -7
- package/docs/guides/minimize-artifacts.md +16 -116
- package/docs/guides/project-postmortem.md +14 -71
- package/lib/compiler/__tests__/skills-registry.test.js +9 -8
- package/lib/compiler/resource-copier.js +29 -0
- package/lib/skill-runtime/__tests__/archive-change.test.js +2 -2
- package/lib/skill-runtime/__tests__/benchmark-skills.test.js +109 -0
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +14 -4
- package/lib/skill-runtime/errors.js +3 -3
- package/lib/skill-runtime/index.js +5 -23
- package/lib/skill-runtime/paths.js +5 -52
- package/lib/skill-runtime/query-registry.js +4 -4
- package/lib/skill-runtime/query.js +89 -201
- package/lib/skill-runtime/store.js +4 -40
- package/lib/skill-runtime/trace.js +2 -2
- package/package.json +5 -7
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +0 -29
- package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +0 -54
- package/.claude/skills/cc-act/scripts/generate-status-report.sh +0 -92
- package/.claude/skills/cc-act/scripts/sync-act-docs.sh +0 -355
- package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +0 -234
- package/.claude/skills/cc-check/scripts/render-report-card.js +0 -438
- package/.claude/skills/cc-check/scripts/verify-gate.sh +0 -85
- package/.claude/skills/cc-do/scripts/build-task-context.sh +0 -175
- package/.claude/skills/cc-do/scripts/record-review-decision.sh +0 -88
- package/.claude/skills/cc-do/scripts/recover-workflow.sh +0 -82
- package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +0 -70
- package/.claude/skills/cc-do/scripts/verify-task-gates.sh +0 -109
- package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +0 -92
- package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +0 -225
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +0 -179
- package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +0 -28
- package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +0 -45
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +0 -234
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +0 -488
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +0 -189
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +0 -39
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +0 -29
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +0 -123
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +0 -292
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +0 -136
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +0 -29
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +0 -124
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +0 -292
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +0 -136
- package/docs/get-shit-done-strategy-audit.md +0 -518
- package/docs/skill-runtime-migration.md +0 -46
- package/lib/skill-runtime/__tests__/approve.test.js +0 -92
- package/lib/skill-runtime/__tests__/autopilot.test.js +0 -253
- package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +0 -165
- package/lib/skill-runtime/__tests__/delegation.test.js +0 -97
- package/lib/skill-runtime/__tests__/dispatch.test.js +0 -237
- package/lib/skill-runtime/__tests__/intent.test.js +0 -203
- package/lib/skill-runtime/__tests__/lifecycle.test.js +0 -169
- package/lib/skill-runtime/__tests__/planner.tdd.test.js +0 -331
- package/lib/skill-runtime/__tests__/prepare-pr.test.js +0 -126
- package/lib/skill-runtime/__tests__/query.test.js +0 -860
- package/lib/skill-runtime/__tests__/readiness.test.js +0 -53
- package/lib/skill-runtime/__tests__/release.test.js +0 -85
- package/lib/skill-runtime/__tests__/review-check-integration.test.js +0 -148
- package/lib/skill-runtime/__tests__/review-records.test.js +0 -619
- package/lib/skill-runtime/__tests__/runtime.integration.test.js +0 -351
- package/lib/skill-runtime/__tests__/schemas.test.js +0 -337
- package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +0 -137
- package/lib/skill-runtime/__tests__/task-contract.test.js +0 -783
- package/lib/skill-runtime/__tests__/team-state.test.js +0 -51
- package/lib/skill-runtime/__tests__/verify-artifacts.test.js +0 -203
- package/lib/skill-runtime/__tests__/worker-run.test.js +0 -275
- package/lib/skill-runtime/__tests__/worker.test.js +0 -56
- package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +0 -31
- package/lib/skill-runtime/__tests__/workflow-context.test.js +0 -98
- package/lib/skill-runtime/artifacts.js +0 -88
- package/lib/skill-runtime/context-index.js +0 -545
- package/lib/skill-runtime/delegation.js +0 -533
- package/lib/skill-runtime/intent.js +0 -309
- package/lib/skill-runtime/lifecycle.js +0 -294
- package/lib/skill-runtime/operations/CLAUDE.md +0 -19
- package/lib/skill-runtime/operations/approve.js +0 -81
- package/lib/skill-runtime/operations/autopilot-core.js +0 -337
- package/lib/skill-runtime/operations/autopilot-execution.js +0 -307
- package/lib/skill-runtime/operations/autopilot-shared.js +0 -48
- package/lib/skill-runtime/operations/autopilot.js +0 -163
- package/lib/skill-runtime/operations/dispatch.js +0 -416
- package/lib/skill-runtime/operations/init.js +0 -60
- package/lib/skill-runtime/operations/janitor.js +0 -61
- package/lib/skill-runtime/operations/plan.js +0 -59
- package/lib/skill-runtime/operations/prepare-pr.js +0 -25
- package/lib/skill-runtime/operations/release.js +0 -99
- package/lib/skill-runtime/operations/resume.js +0 -126
- package/lib/skill-runtime/operations/review-records.js +0 -265
- package/lib/skill-runtime/operations/snapshot.js +0 -45
- package/lib/skill-runtime/operations/task-contract.js +0 -524
- package/lib/skill-runtime/operations/verify.js +0 -170
- package/lib/skill-runtime/operations/worker-run.js +0 -531
- package/lib/skill-runtime/operations/worker.js +0 -33
- package/lib/skill-runtime/planner.js +0 -539
- package/lib/skill-runtime/readiness.js +0 -84
- package/lib/skill-runtime/review-records.js +0 -123
- package/lib/skill-runtime/review.js +0 -855
- package/lib/skill-runtime/schemas.js +0 -746
- package/lib/skill-runtime/task-contract.js +0 -187
- package/lib/skill-runtime/team-state.js +0 -122
- package/lib/skill-runtime/workflow-context.js +0 -748
|
@@ -1,518 +0,0 @@
|
|
|
1
|
-
# Get Shit Done Strategy Migration Blueprint
|
|
2
|
-
|
|
3
|
-
本蓝图覆盖 `/Users/dimon/001Area/80-CodeWorld/002-devflow/get-shit-done`
|
|
4
|
-
当前源码里的公开功能面。目标不是复制 GSD 的命令、agent、hook 和
|
|
5
|
-
workflow 表面积,而是把其中能增强 cc-devflow 的机制迁移为原生
|
|
6
|
-
`cc-*` SKILL contract、runtime typed reads、compiler/publish gate 和测试证据。
|
|
7
|
-
|
|
8
|
-
核心原则:**GSD 是输入,cc-devflow contract 才是输出。**
|
|
9
|
-
|
|
10
|
-
## Source Facts
|
|
11
|
-
|
|
12
|
-
- Package: `get-shit-done-cc@1.39.0-rc.4`
|
|
13
|
-
- Public command surface: `commands/gsd/*.md` 共 86 个命令
|
|
14
|
-
- Agent surface: `agents/gsd-*.md` 共 33 个专用 agent
|
|
15
|
-
- Workflow surface: `get-shit-done/workflows/*.md` 共 84 个顶层 workflow,另有
|
|
16
|
-
`discuss-phase/` 和 `execute-phase/steps/` 的拆分子文件
|
|
17
|
-
- Runtime helpers: `get-shit-done/bin/lib/*.cjs` 共 31 个 CLI module,SDK 查询层
|
|
18
|
-
位于 `sdk/src/query/`
|
|
19
|
-
- Safety hooks: `hooks/` 共 11 个
|
|
20
|
-
|
|
21
|
-
cc-devflow 当前公开表面保持不变:
|
|
22
|
-
|
|
23
|
-
```text
|
|
24
|
-
cc-roadmap
|
|
25
|
-
|
|
26
|
-
PDCA: cc-plan -> cc-do -> cc-check -> cc-act
|
|
27
|
-
IDCA: cc-investigate -> cc-do -> cc-check -> cc-act
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
维护型能力继续归入 `cc-spec-init`、`cc-simplify`、`docs-sync`、
|
|
31
|
-
`npm-release` 和 internal runtime/compiler。禁止新增一套平行命令森林。
|
|
32
|
-
|
|
33
|
-
## Target Architecture
|
|
34
|
-
|
|
35
|
-
```text
|
|
36
|
-
GSD source evidence
|
|
37
|
-
|
|
|
38
|
-
v
|
|
39
|
-
Strategy extraction
|
|
40
|
-
|
|
|
41
|
-
v
|
|
42
|
-
cc-devflow native contract map
|
|
43
|
-
|
|
|
44
|
-
+--> cc-plan ambiguity gate / trust boundary / bounded review
|
|
45
|
-
+--> cc-do wave scheduling / touched paths / quick lane
|
|
46
|
-
+--> cc-investigate debug session / forensics / diagnose-only
|
|
47
|
-
+--> cc-check UAT / named errors / review facets
|
|
48
|
-
+--> cc-act ship preflight / rollback / learning extraction
|
|
49
|
-
+--> runtime/compiler typed reads / inventory / drift gates
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Runtime 边界必须保持克制:
|
|
53
|
-
|
|
54
|
-
```text
|
|
55
|
-
Public SKILL contract
|
|
56
|
-
cc-plan / cc-do / cc-investigate / cc-check / cc-act
|
|
57
|
-
|
|
|
58
|
-
| declares required artifact fields / gates / reroutes
|
|
59
|
-
v
|
|
60
|
-
Skill-local scripts
|
|
61
|
-
|
|
|
62
|
-
| call shared helpers only for schema/query/io
|
|
63
|
-
v
|
|
64
|
-
lib/skill-runtime
|
|
65
|
-
query-registry.js read-only derived views
|
|
66
|
-
errors.js named runtime errors
|
|
67
|
-
trace.js event refs + next action shape
|
|
68
|
-
|
|
|
69
|
-
v
|
|
70
|
-
durable artifacts
|
|
71
|
-
planning/tasks.md / task-manifest.json / report-card.json / change-meta.json
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
SKILL/PLAYBOOK 拥有 workflow 语义。`lib/skill-runtime` 只拥有 typed reads、
|
|
75
|
-
schema validation、named errors、trace shape 和 IO helper。不要把 runtime 做成
|
|
76
|
-
隐藏 workflow engine。
|
|
77
|
-
|
|
78
|
-
## Core Diagnosis
|
|
79
|
-
|
|
80
|
-
GSD 的优势在三个地方:
|
|
81
|
-
|
|
82
|
-
1. 上下文工程:命令只是薄入口,重活交给 workflow、agent、SDK query 和文件状态。
|
|
83
|
-
2. 显式 lifecycle:project/phase/quick/debug/thread/workstream 到 PR ship 都有可恢复状态。
|
|
84
|
-
3. 防腐层:context budget、read guard、prompt-injection scan、inventory parity、SDK golden parity 防止长流程腐烂。
|
|
85
|
-
|
|
86
|
-
cc-devflow 的优势更克制:少入口、强文档、capability truth、report-card gate。
|
|
87
|
-
迁移策略是吸收机制,不吸收表面。
|
|
88
|
-
|
|
89
|
-
## Accepted Scope
|
|
90
|
-
|
|
91
|
-
### P0
|
|
92
|
-
|
|
93
|
-
- `cc-plan`: spec ambiguity gate、assumptions preview、bounded review loop、external doc conflict buckets、trust boundary。
|
|
94
|
-
- `cc-do`: wave scheduling、per-task touched-path conflict、submodule-aware worktree gate、quick-lane mini manifest。
|
|
95
|
-
- `cc-investigate`: persistent debug session、diagnose-only report、workflow forensics。
|
|
96
|
-
- `cc-check`: named error evidence、human UAT、security/ui/ai-eval facets、hostile fixture gates。
|
|
97
|
-
- `cc-act`: structured ship preflight、rollback guard、learning extraction、PR branch hygiene。
|
|
98
|
-
- Runtime/compiler: typed query registry、named errors、operational trace、inventory parity、drift gate、scale budget。
|
|
99
|
-
|
|
100
|
-
### P1
|
|
101
|
-
|
|
102
|
-
- `docs-sync`: spike/sketch/research wrap-up 变成 durable project learning。
|
|
103
|
-
- `cc-roadmap`: import backlog/roadmap cleanup guard、urgent insertion semantics、deferred triggers。
|
|
104
|
-
- Config/runtime: provider-neutral effort/profile hints,只作为 advisory preference。
|
|
105
|
-
- Adapter: prompt-injection/read-before-edit/context warnings 作为 opt-in capability。
|
|
106
|
-
|
|
107
|
-
### Optional Lane
|
|
108
|
-
|
|
109
|
-
Codebase Map 七件套只作为按需缓存:
|
|
110
|
-
|
|
111
|
-
- stack
|
|
112
|
-
- architecture
|
|
113
|
-
- structure
|
|
114
|
-
- conventions
|
|
115
|
-
- testing
|
|
116
|
-
- integrations
|
|
117
|
-
- concerns
|
|
118
|
-
|
|
119
|
-
触发条件:陌生仓库、大型 brownfield、跨模块/跨技术栈改造。它不能成为默认产物,
|
|
120
|
-
不能高于 `devflow/specs/`、roadmap/backlog、planning artifacts 和 machine truth。
|
|
121
|
-
|
|
122
|
-
## Contract-First Migration Plan
|
|
123
|
-
|
|
124
|
-
### `cc-plan`
|
|
125
|
-
|
|
126
|
-
| Contract | Artifact owner | Gate | Tests |
|
|
127
|
-
| --- | --- | --- | --- |
|
|
128
|
-
| WHAT/WHY ambiguity score | `task-manifest.json.planningMeta` + `planning/tasks.md#Contract Summary` | score above threshold blocks task manifest approval | unit fixture: ambiguous input blocks; clear input passes |
|
|
129
|
-
| Assumptions preview | `planning/tasks.md#Contract Summary` decision log | user-visible assumptions before approval | fixture: hidden assumption fails review |
|
|
130
|
-
| Bounded review loop | `planning/tasks.md#Contract Summary` | max attempts and stall detection reroute to `cc-roadmap` or user question | hostile fixture: repeated issue count blocks |
|
|
131
|
-
| External doc conflict buckets | `planning/tasks.md#Contract Summary` | imported docs classified as auto-resolved, competing, unresolved | fixture: conflicting ADR/PRD creates blocker |
|
|
132
|
-
| Trust boundary | `planning/tasks.md#Contract Summary` | external text is evidence/source only, never instruction | hostile fixture: prompt injection remains evidence-only |
|
|
133
|
-
|
|
134
|
-
`cc-plan` must keep design decisions readable in Markdown and machine truth in JSON.
|
|
135
|
-
No separate GSD-style `.planning/` tree.
|
|
136
|
-
|
|
137
|
-
### `cc-do`
|
|
138
|
-
|
|
139
|
-
| Contract | Artifact owner | Gate | Tests |
|
|
140
|
-
| --- | --- | --- | --- |
|
|
141
|
-
| Wave scheduling | `task-manifest.json.tasks[].phase/parallel/dependsOn/touches` | parallel only when dependencies and touches do not conflict | schema fixture: shared touches rejected |
|
|
142
|
-
| Submodule-aware worktree gate | `task-manifest.json.tasks[].touches` + runtime submodule scan | only tasks touching submodule paths lose isolation | hostile fixture: repo with `.gitmodules` but unrelated touches still parallel |
|
|
143
|
-
| Quick lane mini manifest | `task-manifest.json.metadata.lane=quick` | small work still has task-state truth, verification, handoff | fixture: quick lane without verification blocks |
|
|
144
|
-
| Thread/pause/resume | `change-meta.json`, manifest task state, optional CLI logs, and one final handoff file | resume query returns stable next action | integration: stale manifest state restores to pending |
|
|
145
|
-
|
|
146
|
-
`cc-do` should not invent new task state outside `task-manifest.json`.
|
|
147
|
-
|
|
148
|
-
### `cc-investigate`
|
|
149
|
-
|
|
150
|
-
| Contract | Artifact owner | Gate | Tests |
|
|
151
|
-
| --- | --- | --- | --- |
|
|
152
|
-
| Persistent debug session | `planning/tasks.md#Root Cause Contract`, optional machine summary in `task-manifest.json` | hypotheses, probes, symptom match, cleanup recorded | fixture: missing cleanup blocks freeze |
|
|
153
|
-
| Diagnose-only report | `planning/tasks.md#Root Cause Contract` | no code edits required; root cause and next action explicit | fixture: diagnose-only does not mark implementation complete |
|
|
154
|
-
| Workflow forensics | `planning/tasks.md#Root Cause Contract` + trace refs | git/artifact/state failures classified before fixes | hostile fixture: corrupt manifest produces named failure |
|
|
155
|
-
|
|
156
|
-
Prefer extending `planning/tasks.md#Root Cause Contract` over adding `planning/debug-session.md`.
|
|
157
|
-
Only add a new file if the debug transcript becomes too large and has a single owner.
|
|
158
|
-
|
|
159
|
-
### `cc-check`
|
|
160
|
-
|
|
161
|
-
| Contract | Artifact owner | Gate | Tests |
|
|
162
|
-
| --- | --- | --- | --- |
|
|
163
|
-
| Human UAT | `report-card.json.qa.humanUat` | failed UAT reroutes to `cc-investigate` or `cc-do` | fixture: UAT fail blocks pass |
|
|
164
|
-
| Named error evidence | `report-card.json.runtime.failureOwnership` | every runtime failure has error name, artifact refs, rescue action | hostile fixture: invalid JSON is not silent |
|
|
165
|
-
| Specialist facets | `report-card.json.review.specialistReviews[]` | security/ui/ai-eval facet either passes or has skip reason | fixture: missing required facet blocks |
|
|
166
|
-
| Review-fix loop | `report-card.json.review.findings[]` | finding fingerprint/action/status drives reroute | fixture: unresolved blocking finding prevents `cc-act` |
|
|
167
|
-
|
|
168
|
-
Prior learning applied: verification is a zero-trust pre-claim gate. A passing
|
|
169
|
-
statement needs fresh command output, exit status, and key observation.
|
|
170
|
-
|
|
171
|
-
### `cc-act`
|
|
172
|
-
|
|
173
|
-
| Contract | Artifact owner | Gate | Tests |
|
|
174
|
-
| --- | --- | --- | --- |
|
|
175
|
-
| Ship-ready preflight | structured output from `detect-ship-target.sh` or successor | branch/base/remote/auth/clean tree/review freshness explicit | shell fixture: missing auth produces `ShipPreflightError` |
|
|
176
|
-
| Rollback guard | `handoff/pr-brief.md` or release note | rollback command and safe state recorded before publish | fixture: release without rollback note blocks |
|
|
177
|
-
| Learning extraction | roadmap/backlog/spec follow-up | follow-up is behavior contract, not chat TODO | fixture: file-only TODO rejected |
|
|
178
|
-
| PR branch hygiene | `handoff/pr-brief.md` | planning-only commits and release commits classified | fixture: duplicate PR branch action blocked |
|
|
179
|
-
|
|
180
|
-
`cc-act` owns landing and closeout, not late feature development. Any new implementation
|
|
181
|
-
inside `cc-act` returns to `cc-check` after verification changes.
|
|
182
|
-
|
|
183
|
-
### Runtime And Compiler
|
|
184
|
-
|
|
185
|
-
| Contract | Artifact owner | Gate | Tests |
|
|
186
|
-
| --- | --- | --- | --- |
|
|
187
|
-
| Typed query registry | `lib/skill-runtime/query-registry.js` | query ids dispatch to typed read-only handlers | unit: unknown id returns named error |
|
|
188
|
-
| Named errors | `lib/skill-runtime/errors.js` | no `null`/`false` for failure states that need action | hostile fixtures: missing/invalid/stale artifacts |
|
|
189
|
-
| Operational trace | `lib/skill-runtime/trace.js` | every query/doctor/preflight result has eventId, artifact refs, next action | unit: trace shape required |
|
|
190
|
-
| Inventory parity | `lib/compiler/inventory.js` + publish gate | managed skills/scripts/templates/docs/mirrors match manifest | integration: drifted mirror fails |
|
|
191
|
-
| Scale budget | tests or smoke output | `adapt:check`, `verify:publish`, inventory and query stay within budget | smoke: record baseline and fail only on large regression |
|
|
192
|
-
|
|
193
|
-
Existing baseline on 2026-04-29:
|
|
194
|
-
|
|
195
|
-
- `.claude/skills`: 672K
|
|
196
|
-
- `.codex/skills`: 632K
|
|
197
|
-
- `docs`: 236K
|
|
198
|
-
- `lib`: 688K
|
|
199
|
-
- `config`: 20K
|
|
200
|
-
- Relevant files scanned: 313
|
|
201
|
-
- `npm run adapt:check`: 3.207s
|
|
202
|
-
- `npm run verify:publish`: 4.757s
|
|
203
|
-
|
|
204
|
-
Budgets should prevent avoidable full-repo scans. Optional codebase map never runs in the
|
|
205
|
-
default planning path.
|
|
206
|
-
|
|
207
|
-
## Artifact Ownership Table
|
|
208
|
-
|
|
209
|
-
| Data | Owner | Human view | Machine truth |
|
|
210
|
-
| --- | --- | --- | --- |
|
|
211
|
-
| Ambiguity and assumptions | `cc-plan` | `planning/tasks.md#Contract Summary` | `task-manifest.json.planningMeta` |
|
|
212
|
-
| Imported doc trust classification | `cc-plan` | `planning/tasks.md#Contract Summary` | `planning/tasks.md` |
|
|
213
|
-
| Task graph and waves | `cc-plan` / `cc-do` | `planning/tasks.md` | `task-manifest.json.tasks[]` |
|
|
214
|
-
| Quick lane state | `cc-do` | task-state summary | `task-manifest.json.metadata`, `planning/tasks.md` |
|
|
215
|
-
| Debug hypotheses and probes | `cc-investigate` | `planning/tasks.md#Root Cause Contract` | optional `task-manifest.json.investigation` |
|
|
216
|
-
| Verification/UAT/facets | `cc-check` | review summary | `report-card.json` |
|
|
217
|
-
| Runtime failures | `cc-check` | review summary | `report-card.json.runtime.failureOwnership[]` |
|
|
218
|
-
| Ship target and rollback | `cc-act` | `handoff/pr-brief.md` / `release-note.md` | structured preflight output |
|
|
219
|
-
| Inventory parity | compiler/docs-sync | publish report | compiler inventory manifest |
|
|
220
|
-
| Query state | runtime | CLI/doctor output | typed derived view from existing artifacts |
|
|
221
|
-
|
|
222
|
-
## Named Error And Rescue Contract
|
|
223
|
-
|
|
224
|
-
Every new query, gate, preflight, inventory check, and debug path must name failures.
|
|
225
|
-
|
|
226
|
-
| Error name | Trigger | Rescue action | User sees |
|
|
227
|
-
| --- | --- | --- | --- |
|
|
228
|
-
| `MissingArtifactError` | required artifact is absent | show artifact path and owner skill | blocked with next action |
|
|
229
|
-
| `InvalidJsonError` | JSON parse fails | show path and parse excerpt | blocked, repair artifact |
|
|
230
|
-
| `SchemaValidationError` | Zod/schema check fails | show schema path and failing field | blocked, reroute owner skill |
|
|
231
|
-
| `NoActiveChangeError` | no change selected | ask for change key or query list | clear prompt |
|
|
232
|
-
| `InvalidTaskGraphError` | missing dependency, cycle, invalid active phase | reroute `cc-plan` or `cc-do` | blocked graph summary |
|
|
233
|
-
| `InventoryDriftError` | managed file missing, extra, or hash drifted | run adapt or update inventory | publish blocked |
|
|
234
|
-
| `TrustBoundaryError` | external source tries to become instruction | classify as evidence-only and block if unresolved | planning blocked |
|
|
235
|
-
| `ShipPreflightError` | branch/base/auth/clean tree/review freshness fails | show failed preflight item | act blocked |
|
|
236
|
-
|
|
237
|
-
Catch-all logging is not sufficient. Every rescued error must provide an artifact ref,
|
|
238
|
-
owner skill, and next action.
|
|
239
|
-
|
|
240
|
-
## Shadow Path Matrix
|
|
241
|
-
|
|
242
|
-
| Flow | Nil/missing | Empty | Invalid | Conflict | Stale | Partial |
|
|
243
|
-
| --- | --- | --- | --- | --- | --- | --- |
|
|
244
|
-
| external docs -> `cc-plan` | block with missing source | skip with reason | `TrustBoundaryError` | conflict bucket | mark stale source | partial import warning |
|
|
245
|
-
| `tasks.md` -> `task-manifest.json` | block | block | schema error | dependency conflict | plan version mismatch | no manifest approval |
|
|
246
|
-
| manifest -> wave scheduling | block | no runnable task | `InvalidTaskGraphError` | serialize or block | stale manifest state rejected | reroute resume |
|
|
247
|
-
| debug session -> analysis | block freeze | require note | schema/narrative mismatch | competing hypotheses | stale symptom | diagnose-only |
|
|
248
|
-
| query registry -> next action | `MissingArtifactError` | no next action with reason | named parse/schema error | blocked graph | stale state warning | degraded output |
|
|
249
|
-
| inventory -> publish gate | missing inventory blocks | empty inventory blocks | schema error | drift blocks | stale hash blocks | publish blocked |
|
|
250
|
-
| ship preflight -> `cc-act` | missing remote/base handled | local handoff path | `ShipPreflightError` | branch/PR conflict | stale review blocks | handoff fallback |
|
|
251
|
-
|
|
252
|
-
## Trust Boundary Contract
|
|
253
|
-
|
|
254
|
-
External text includes imported PRDs, ADRs, specs, repo docs, web pages, compressed memory,
|
|
255
|
-
issues, and PR comments. These inputs can become evidence, constraints, or questions.
|
|
256
|
-
They cannot directly become workflow instructions.
|
|
257
|
-
|
|
258
|
-
Required classifications:
|
|
259
|
-
|
|
260
|
-
- `source`: where the text came from
|
|
261
|
-
- `trust`: `internal-contract` / `repo-evidence` / `external-evidence` / `untrusted-text`
|
|
262
|
-
- `allowedUse`: evidence, term proposal, constraint candidate, blocker, or follow-up
|
|
263
|
-
- `instructionUse`: always false unless the source is a cc-devflow SKILL/PLAYBOOK/config contract
|
|
264
|
-
- `finding`: optional prompt-injection/security note
|
|
265
|
-
|
|
266
|
-
Prompt-injection scanning is best placed at import and planning boundaries. Adapter hooks
|
|
267
|
-
remain opt-in safety aids, not default blockers.
|
|
268
|
-
|
|
269
|
-
## Migration Test Matrix
|
|
270
|
-
|
|
271
|
-
| Area | Unit | Integration | Publish/adapt gate | Hostile fixture |
|
|
272
|
-
| --- | --- | --- | --- | --- |
|
|
273
|
-
| `cc-plan` ambiguity/trust | score and bucket parser | plan artifact fixture | example binding if public docs change | injection doc stays evidence-only |
|
|
274
|
-
| `cc-do` waves/touches | schema conflict | dispatch/resume | none | stale plan version rejected |
|
|
275
|
-
| `cc-investigate` debug session | session block parser | diagnose-only fixture | example fixture if template changes | missing probe cleanup blocks freeze |
|
|
276
|
-
| `cc-check` UAT/errors/facets | report-card schema | verify gate fixture | `verify:examples` | invalid artifact blocks pass |
|
|
277
|
-
| `cc-act` preflight/rollback | preflight parser | shell fixture | `verify:publish` | missing auth/dirty tree explicit |
|
|
278
|
-
| Runtime query registry | dispatch and errors | full-state fixture | none | missing/invalid/stale artifacts |
|
|
279
|
-
| Compiler inventory | manifest schema | drift fixture | `adapt:check`, `verify:publish` | drifted mirror blocks |
|
|
280
|
-
|
|
281
|
-
Test framework: Jest. Existing tests already cover schema, query, dispatch, compiler drift,
|
|
282
|
-
config, adapter security, and publish validation. New work must add negative fixtures before
|
|
283
|
-
claiming the contract is migrated.
|
|
284
|
-
|
|
285
|
-
## Module Boundary Plan
|
|
286
|
-
|
|
287
|
-
Do not grow existing large files unless the change is a local extension of their current job.
|
|
288
|
-
|
|
289
|
-
| Module | Responsibility |
|
|
290
|
-
| --- | --- |
|
|
291
|
-
| `lib/skill-runtime/errors.js` | named runtime error classes and formatting |
|
|
292
|
-
| `lib/skill-runtime/query-registry.js` | typed read-only query dispatch |
|
|
293
|
-
| `lib/skill-runtime/trace.js` | eventId, artifact refs, next action shape |
|
|
294
|
-
| `lib/skill-runtime/query.js` | compatibility facade over query registry |
|
|
295
|
-
| `lib/compiler/inventory.js` | managed inventory, hashes, parity rules |
|
|
296
|
-
| `scripts/validate-publish.js` | invoke inventory validation, not own all logic |
|
|
297
|
-
| SKILL-local scripts | owner-specific gate logic and human output |
|
|
298
|
-
|
|
299
|
-
Large-file guardrails:
|
|
300
|
-
|
|
301
|
-
- Keep `schemas.js` for schemas only.
|
|
302
|
-
- Keep `query.js` as facade, not new business logic.
|
|
303
|
-
- Keep `validate-publish.js` as orchestrator, not inventory implementation.
|
|
304
|
-
- Split commits by module and SKILL owner.
|
|
305
|
-
|
|
306
|
-
## Phased Rollout Plan
|
|
307
|
-
|
|
308
|
-
### Phase 1: Contract-first document and first executable seam
|
|
309
|
-
|
|
310
|
-
- Rewrite this blueprint into SKILL-owned sections.
|
|
311
|
-
- Add artifact ownership, named errors, shadow paths, test matrix, module boundary, scale budget.
|
|
312
|
-
- First implementation targets `cc-plan` and `cc-do` only where existing schema/query tests already support validation.
|
|
313
|
-
- Required proof: hostile fixtures for missing/invalid/stale/conflict states.
|
|
314
|
-
|
|
315
|
-
### Phase 2: Runtime query and named error foundation
|
|
316
|
-
|
|
317
|
-
- Add `errors.js`, `query-registry.js`, `trace.js`.
|
|
318
|
-
- Keep SKILL semantics outside runtime.
|
|
319
|
-
- Required proof: typed query unit tests and missing/invalid/stale artifact fixtures.
|
|
320
|
-
|
|
321
|
-
### Phase 3: `cc-investigate` debug session and forensics
|
|
322
|
-
|
|
323
|
-
- Extend `planning/tasks.md#Root Cause Contract` and optional machine summary.
|
|
324
|
-
- Required proof: diagnose-only and missing cleanup fixtures.
|
|
325
|
-
|
|
326
|
-
### Phase 4: `cc-check` and `cc-act` consumers
|
|
327
|
-
|
|
328
|
-
- Add human UAT, named error ownership, ship preflight, rollback guard.
|
|
329
|
-
- Required proof: report-card and preflight fixtures.
|
|
330
|
-
|
|
331
|
-
### Phase 5: Compiler inventory and publish gate
|
|
332
|
-
|
|
333
|
-
- Add inventory parity and drift checks.
|
|
334
|
-
- Required proof: `adapt:check`, `verify:examples`, `verify:publish`, and drifted mirror fixture.
|
|
335
|
-
|
|
336
|
-
Rollback should be per phase: revert the SKILL version and the module/gate introduced in that phase.
|
|
337
|
-
Do not ship all phases as one undifferentiated release.
|
|
338
|
-
|
|
339
|
-
## Anti-GSD Drift Charter
|
|
340
|
-
|
|
341
|
-
These rules protect cc-devflow's identity:
|
|
342
|
-
|
|
343
|
-
1. Do not add GSD command aliases as public entry points.
|
|
344
|
-
2. Do not add manager UI or default runtime dashboard before typed query and artifacts are stable.
|
|
345
|
-
3. Do not default-enable hooks; adapter safety remains opt-in unless the platform requires it.
|
|
346
|
-
4. Do not create a competing `.planning/` tree.
|
|
347
|
-
5. Do not make codebase map a default artifact.
|
|
348
|
-
6. Do not hide workflow decisions inside runtime helpers.
|
|
349
|
-
7. Do not add a new durable truth source when an existing artifact can own the field.
|
|
350
|
-
8. Every migrated mechanism must name its SKILL owner, artifact owner, test gate, and rollback path.
|
|
351
|
-
|
|
352
|
-
## What Already Exists
|
|
353
|
-
|
|
354
|
-
| Existing cc-devflow asset | Reuse |
|
|
355
|
-
| --- | --- |
|
|
356
|
-
| `lib/skill-runtime/query.js` | current progress/next/full-state facade |
|
|
357
|
-
| `lib/skill-runtime/schemas.js` | manifest/report/runtime schema boundary |
|
|
358
|
-
| `lib/skill-runtime/config.js` | layered config and doctor pattern |
|
|
359
|
-
| `lib/compiler/manifest.js` | hash and drift detection foundation |
|
|
360
|
-
| `scripts/validate-publish.js` | publish validation orchestrator |
|
|
361
|
-
| `docs/examples/scripts/check-example-bindings.sh` | example/version drift gate |
|
|
362
|
-
| `npm run adapt:check` | platform mirror drift check |
|
|
363
|
-
| `npm run verify:publish` | package and public skill contract validation |
|
|
364
|
-
|
|
365
|
-
Reuse these before adding new systems.
|
|
366
|
-
|
|
367
|
-
## NOT In Scope
|
|
368
|
-
|
|
369
|
-
- Copying GSD's 86 command surface.
|
|
370
|
-
- Copying GSD's 33-agent surface as named cc-devflow agents.
|
|
371
|
-
- Copying Claude-specific `ultraplan-phase`.
|
|
372
|
-
- Adding community/marketing commands such as `join-discord`.
|
|
373
|
-
- Making `graphify` a default project capability.
|
|
374
|
-
- Building a manager/autonomous UI.
|
|
375
|
-
- Default-enabling safety hooks.
|
|
376
|
-
- Replacing `devflow/changes/<change-key>` with GSD `.planning/`.
|
|
377
|
-
- Treating model/provider profile as a required workflow contract.
|
|
378
|
-
|
|
379
|
-
## Appendix A: Command Coverage
|
|
380
|
-
|
|
381
|
-
The table below proves the GSD command surface was reviewed. It is coverage evidence,
|
|
382
|
-
not the cc-devflow implementation order.
|
|
383
|
-
|
|
384
|
-
### Core Workflow
|
|
385
|
-
|
|
386
|
-
| GSD command | Decision |
|
|
387
|
-
| --- | --- |
|
|
388
|
-
| `new-project` | migrate bootstrap checklist into `cc-roadmap` / `cc-spec-init` |
|
|
389
|
-
| `new-workspace` | partial: multi-repo/worktree execution isolation |
|
|
390
|
-
| `list-workspaces` | low priority runtime query |
|
|
391
|
-
| `remove-workspace` | `cc-act` cleanup guard |
|
|
392
|
-
| `discuss-phase` | migrate assumptions/batch/text mechanisms only |
|
|
393
|
-
| `spec-phase` | P0: WHAT/WHY ambiguity gate |
|
|
394
|
-
| `ui-phase` | conditional UI contract template |
|
|
395
|
-
| `ai-integration-phase` | conditional AI scope review/eval plan |
|
|
396
|
-
| `plan-phase` | P0 bounded review loop |
|
|
397
|
-
| `plan-review-convergence` | high-concern convergence only |
|
|
398
|
-
| `ultraplan-phase` | skip, Claude-specific |
|
|
399
|
-
| `spike` | prototype exception + evidence |
|
|
400
|
-
| `sketch` | design exploration evidence, no command |
|
|
401
|
-
| `research-phase` | source authority in Context Sweep |
|
|
402
|
-
| `execute-phase` | P0 wave scheduling |
|
|
403
|
-
| `verify-work` | UAT + auto reroute |
|
|
404
|
-
| `ship` | structured ship preflight |
|
|
405
|
-
| `next` | runtime query `route.next-action` |
|
|
406
|
-
| `fast` | TDD exception / quick lane rule |
|
|
407
|
-
| `quick` | mini manifest + task-state truth |
|
|
408
|
-
| `ui-review` | conditional frontend `cc-check` facet |
|
|
409
|
-
| `code-review` | finding schema |
|
|
410
|
-
| `code-review-fix` | fix loop and return to `cc-check` |
|
|
411
|
-
| `eval-review` | conditional AI eval facet |
|
|
412
|
-
|
|
413
|
-
### Phase And Milestone Management
|
|
414
|
-
|
|
415
|
-
| GSD command | Decision |
|
|
416
|
-
| --- | --- |
|
|
417
|
-
| `add-phase` | roadmap append helper |
|
|
418
|
-
| `edit-phase` | roadmap edit semantics |
|
|
419
|
-
| `insert-phase` | urgent insertion semantics, no decimal numbering |
|
|
420
|
-
| `remove-phase` | backlog/roadmap cleanup guard |
|
|
421
|
-
| `add-tests` | coverage gap task generation |
|
|
422
|
-
| `list-phase-assumptions` | assumptions preview |
|
|
423
|
-
| `analyze-dependencies` | roadmap graph and task deps |
|
|
424
|
-
| `validate-phase` | report-card gap closure |
|
|
425
|
-
| `secure-phase` | conditional security facet |
|
|
426
|
-
| `audit-milestone` | post-merge/closeout audit |
|
|
427
|
-
| `audit-uat` | human feedback debt audit |
|
|
428
|
-
| `audit-fix` | classification only, no auto big-rewrite |
|
|
429
|
-
| `plan-milestone-gaps` | roadmap/plan gap writeback |
|
|
430
|
-
| `complete-milestone` | partial: archive/version/tag via `cc-act` / `npm-release` |
|
|
431
|
-
| `new-milestone` | stage reset |
|
|
432
|
-
| `milestone-summary` | release/handoff summary |
|
|
433
|
-
| `cleanup` | low priority cleanup |
|
|
434
|
-
| `manager` | skip UI |
|
|
435
|
-
| `workstreams` | active pointer only |
|
|
436
|
-
| `autonomous` | smart-discuss/task-state guard only |
|
|
437
|
-
| `undo` | rollback guard |
|
|
438
|
-
|
|
439
|
-
### Session And Navigation
|
|
440
|
-
|
|
441
|
-
| GSD command | Decision |
|
|
442
|
-
| --- | --- |
|
|
443
|
-
| `progress` | runtime query |
|
|
444
|
-
| `stats` | low priority runtime query |
|
|
445
|
-
| `session-report` | partial `cc-act` summary |
|
|
446
|
-
| `pause-work` | lightweight pause |
|
|
447
|
-
| `resume-work` | query-backed resume |
|
|
448
|
-
| `explore` | pre-roadmap exploration mode |
|
|
449
|
-
| `do` | natural-language route query, no new public command |
|
|
450
|
-
| `note` | roadmap/backlog note |
|
|
451
|
-
| `add-todo` | durable follow-up |
|
|
452
|
-
| `check-todos` | backlog promotion |
|
|
453
|
-
| `add-backlog` | parking lot without 999.x numbering |
|
|
454
|
-
| `review-backlog` | backlog promotion |
|
|
455
|
-
| `plant-seed` | deferred trigger |
|
|
456
|
-
| `thread` | lightweight resume/thread entry |
|
|
457
|
-
|
|
458
|
-
### Codebase Intelligence
|
|
459
|
-
|
|
460
|
-
| GSD command | Decision |
|
|
461
|
-
| --- | --- |
|
|
462
|
-
| `map-codebase` | optional lane only |
|
|
463
|
-
| `scan` | lightweight Context Sweep |
|
|
464
|
-
| `intel` | medium-priority query/cache |
|
|
465
|
-
| `graphify` | skip default capability |
|
|
466
|
-
| `extract_learnings` | post-closeout learning extraction |
|
|
467
|
-
|
|
468
|
-
### Review, Debug, Recovery
|
|
469
|
-
|
|
470
|
-
| GSD command | Decision |
|
|
471
|
-
| --- | --- |
|
|
472
|
-
| `review` | optional reviewer command/config |
|
|
473
|
-
| `debug` | P0 persistent investigation session |
|
|
474
|
-
| `forensics` | workflow failure mode |
|
|
475
|
-
| `health` | `cc-devflow doctor` direction |
|
|
476
|
-
| `import` | external plan conflict detection |
|
|
477
|
-
| `from-gsd2` | skip migration-only command |
|
|
478
|
-
| `inbox` | optional remote lane |
|
|
479
|
-
|
|
480
|
-
### Docs, Profile, Utilities
|
|
481
|
-
|
|
482
|
-
| GSD command | Decision |
|
|
483
|
-
| --- | --- |
|
|
484
|
-
| `docs-update` | docs-sync fact check |
|
|
485
|
-
| `ingest-docs` | import conflict buckets |
|
|
486
|
-
| `spike-wrap-up` | project learning mechanism |
|
|
487
|
-
| `sketch-wrap-up` | project learning mechanism |
|
|
488
|
-
| `profile-user` | not a main workflow |
|
|
489
|
-
| `settings` | config profile support |
|
|
490
|
-
| `settings-advanced` | partial config support |
|
|
491
|
-
| `settings-integrations` | partial with secrets masking |
|
|
492
|
-
| `set-profile` | provider-neutral hints only |
|
|
493
|
-
| `pr-branch` | branch hygiene guard |
|
|
494
|
-
| `sync-skills` | adapt drift report |
|
|
495
|
-
| `update` | npm/update docs already cover |
|
|
496
|
-
| `reapply-patches` | low priority |
|
|
497
|
-
| `help` | existing docs/CLI |
|
|
498
|
-
| `join-discord` | skip |
|
|
499
|
-
|
|
500
|
-
## Appendix B: Agent And Hook Coverage
|
|
501
|
-
|
|
502
|
-
| GSD area | Migration decision |
|
|
503
|
-
| --- | --- |
|
|
504
|
-
| Research agents | optional evidence lanes; write artifacts, do not add agent surface |
|
|
505
|
-
| Planning agents | producer/checker separation; no new agent names |
|
|
506
|
-
| Execution agents | mechanism only; no agent count migration |
|
|
507
|
-
| Verification agents | facets with PASS/PARTIAL/ESCALATE |
|
|
508
|
-
| Knowledge/docs agents | docs-sync and query support |
|
|
509
|
-
| Profile agents | config advisory only |
|
|
510
|
-
| Context/status/update hooks | skip or existing npm/update docs |
|
|
511
|
-
| Prompt/read/workflow guards | opt-in adapter safety and trust boundary |
|
|
512
|
-
| Commit/phase hooks | migrate checks, not hooks |
|
|
513
|
-
|
|
514
|
-
## Taste Check
|
|
515
|
-
|
|
516
|
-
- Good strategy: make state, gates, context budget, trust boundaries, and parallelism machine-checkable.
|
|
517
|
-
- Bad strategy: turn every scenario into a command and make users learn the source system's shape.
|
|
518
|
-
- Correct cc-devflow path: few entry points, strong SKILL contracts, typed runtime reads, hostile fixtures, publish gates.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Skill Runtime Migration
|
|
2
|
-
|
|
3
|
-
## Result
|
|
4
|
-
|
|
5
|
-
`lib/harness/` has been removed from the repository.
|
|
6
|
-
|
|
7
|
-
The workflow now follows one clear ownership model:
|
|
8
|
-
|
|
9
|
-
- public workflow semantics live in `SKILL.md`, `PLAYBOOK.md`, templates, and skill-local scripts
|
|
10
|
-
- reusable internal helpers live in `lib/skill-runtime/`
|
|
11
|
-
- the public entry surface remains `cc-devflow init`, `cc-devflow adapt`, and the five shipped skills
|
|
12
|
-
|
|
13
|
-
## What Moved
|
|
14
|
-
|
|
15
|
-
The old internal runtime modules were moved from `lib/harness/` to `lib/skill-runtime/`.
|
|
16
|
-
|
|
17
|
-
That includes:
|
|
18
|
-
|
|
19
|
-
- artifact and IO helpers
|
|
20
|
-
- schema and planner helpers
|
|
21
|
-
- lifecycle and query helpers
|
|
22
|
-
- runtime operations used by internal tests
|
|
23
|
-
|
|
24
|
-
## What Changed
|
|
25
|
-
|
|
26
|
-
- `cc-check` gate execution and `report-card.json` assembly now run through skill-local scripts
|
|
27
|
-
- task/context recovery guidance lives with `cc-do`
|
|
28
|
-
- `cc-act` owns PR and release-side closure scripts
|
|
29
|
-
- the old `autopilot-stages.js` compatibility layer was removed
|
|
30
|
-
- tests and contributor docs now point at `lib/skill-runtime/` and `lib/skill-runtime/__tests__/`
|
|
31
|
-
|
|
32
|
-
## Current Boundary
|
|
33
|
-
|
|
34
|
-
`lib/skill-runtime/` is not the product story.
|
|
35
|
-
|
|
36
|
-
It exists only as shared support code for skill-local scripts and internal verification. When adding new behavior:
|
|
37
|
-
|
|
38
|
-
1. put workflow rules in the relevant public skill first
|
|
39
|
-
2. prefer skill-local scripts over new shared runtime logic
|
|
40
|
-
3. only add shared code when duplication would be fragile or noisy
|
|
41
|
-
|
|
42
|
-
## Follow-ups
|
|
43
|
-
|
|
44
|
-
- keep trimming duplicated narration from `intent.js`, `query.js`, and `autopilot` helpers
|
|
45
|
-
- continue replacing compatibility-only tests with skill-script-oriented coverage where practical
|
|
46
|
-
- avoid introducing any new `harness:*` language, paths, or mental model in docs or code
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const os = require('os');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
const { runApprove } = require('../operations/approve');
|
|
6
|
-
const {
|
|
7
|
-
getRuntimeStatePath,
|
|
8
|
-
getTaskManifestPath
|
|
9
|
-
} = require('../store');
|
|
10
|
-
|
|
11
|
-
function writeJson(filePath, value) {
|
|
12
|
-
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
13
|
-
fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
describe('runApprove', () => {
|
|
17
|
-
test('throws named error when change-state is missing', async () => {
|
|
18
|
-
const repoRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'cc-devflow-approve-missing-state-'));
|
|
19
|
-
|
|
20
|
-
await expect(runApprove({
|
|
21
|
-
repoRoot,
|
|
22
|
-
changeId: 'REQ-123',
|
|
23
|
-
executionMode: 'direct'
|
|
24
|
-
})).rejects.toMatchObject({
|
|
25
|
-
name: 'MissingChangeStateError',
|
|
26
|
-
artifactRefs: [
|
|
27
|
-
expect.stringContaining('change-state.json')
|
|
28
|
-
],
|
|
29
|
-
rescueAction: 'run cc-roadmap or cc-plan init before approving execution'
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
test('throws named error when task manifest is missing', async () => {
|
|
34
|
-
const repoRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'cc-devflow-approve-missing-manifest-'));
|
|
35
|
-
|
|
36
|
-
writeJson(getRuntimeStatePath(repoRoot, 'REQ-123'), {
|
|
37
|
-
changeId: 'REQ-123',
|
|
38
|
-
goal: 'Approve only concrete plans',
|
|
39
|
-
status: 'planned',
|
|
40
|
-
initializedAt: '2026-03-25T01:00:00.000Z',
|
|
41
|
-
updatedAt: '2026-03-25T01:00:00.000Z'
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
await expect(runApprove({
|
|
45
|
-
repoRoot,
|
|
46
|
-
changeId: 'REQ-123',
|
|
47
|
-
executionMode: 'direct'
|
|
48
|
-
})).rejects.toMatchObject({
|
|
49
|
-
name: 'MissingTaskManifestError',
|
|
50
|
-
artifactRefs: [
|
|
51
|
-
expect.stringContaining('task-manifest.json')
|
|
52
|
-
],
|
|
53
|
-
rescueAction: 'run cc-plan to create planning/task-manifest.json before approving execution'
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
test('approves the current manifest plan version', async () => {
|
|
58
|
-
const repoRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'cc-devflow-approve-pass-'));
|
|
59
|
-
|
|
60
|
-
writeJson(getRuntimeStatePath(repoRoot, 'REQ-123'), {
|
|
61
|
-
changeId: 'REQ-123',
|
|
62
|
-
goal: 'Approve current plan',
|
|
63
|
-
status: 'planned',
|
|
64
|
-
initializedAt: '2026-03-25T01:00:00.000Z',
|
|
65
|
-
updatedAt: '2026-03-25T01:00:00.000Z'
|
|
66
|
-
});
|
|
67
|
-
writeJson(getTaskManifestPath(repoRoot, 'REQ-123'), {
|
|
68
|
-
changeId: 'REQ-123',
|
|
69
|
-
goal: 'Approve current plan',
|
|
70
|
-
createdAt: '2026-03-25T01:00:00.000Z',
|
|
71
|
-
updatedAt: '2026-03-25T01:00:00.000Z',
|
|
72
|
-
tasks: [],
|
|
73
|
-
metadata: {
|
|
74
|
-
source: 'default',
|
|
75
|
-
generatedBy: 'test',
|
|
76
|
-
planVersion: 7
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const result = await runApprove({
|
|
81
|
-
repoRoot,
|
|
82
|
-
changeId: 'REQ-123',
|
|
83
|
-
executionMode: 'direct'
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
expect(result).toMatchObject({
|
|
87
|
-
status: 'approved',
|
|
88
|
-
executionMode: 'direct',
|
|
89
|
-
planVersion: 7
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
});
|