cc-devflow 4.5.14 → 4.5.16
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 +5 -0
- package/.claude/skills/cc-act/SKILL.md +2 -2
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +3 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +113 -33
- package/.claude/skills/cc-check/SKILL.md +0 -1
- package/.claude/skills/cc-dev/CHANGELOG.md +5 -0
- package/.claude/skills/cc-dev/PLAYBOOK.md +6 -3
- package/.claude/skills/cc-dev/SKILL.md +11 -8
- package/.claude/skills/cc-dev/scripts/ensure-work-branch.sh +117 -0
- package/.claude/skills/cc-dev/scripts/prepare-change-worktree.sh +135 -0
- package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +8 -26
- package/.claude/skills/cc-do/SKILL.md +1 -2
- package/.claude/skills/cc-investigate/CHANGELOG.md +15 -0
- package/.claude/skills/cc-investigate/SKILL.md +86 -9
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +57 -1
- package/.claude/skills/cc-investigate/references/investigation-contract.md +1 -0
- package/.claude/skills/cc-plan/CHANGELOG.md +23 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +8 -5
- package/.claude/skills/cc-plan/SKILL.md +91 -20
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +59 -8
- package/.claude/skills/cc-plan/references/planning-contract.md +15 -9
- package/.claude/skills/cc-pr-review/CHANGELOG.md +9 -0
- package/.claude/skills/cc-pr-review/PLAYBOOK.md +3 -0
- package/.claude/skills/cc-pr-review/SKILL.md +30 -1
- package/.claude/skills/cc-review/CHANGELOG.md +10 -0
- package/.claude/skills/cc-review/SKILL.md +53 -9
- package/.claude/skills/cc-review/references/implementation-review-branch.md +1 -0
- package/.claude/skills/cc-review/references/plan-review-branch.md +1 -0
- package/.claude/skills/cc-review/references/review-methods.md +30 -0
- package/.claude/skills/cc-roadmap/CHANGELOG.md +6 -0
- package/.claude/skills/cc-roadmap/SKILL.md +1 -1
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/markdown.js +274 -69
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/schema.js +69 -15
- package/CHANGELOG.md +18 -0
- package/README.md +3 -4
- package/README.zh-CN.md +3 -4
- package/bin/cc-devflow-cli.js +8 -94
- package/docs/examples/example-bindings.json +8 -8
- package/docs/examples/full-design-blocked/BACKLOG.md +12 -1
- package/docs/examples/full-design-blocked/README.md +1 -1
- package/docs/examples/full-design-blocked/ROADMAP.md +2 -2
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/task.md +39 -5
- package/docs/examples/full-design-blocked/roadmap.json +7 -2
- package/docs/examples/local-handoff/BACKLOG.md +12 -1
- package/docs/examples/local-handoff/README.md +1 -1
- package/docs/examples/local-handoff/ROADMAP.md +2 -2
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/task.md +39 -5
- package/docs/examples/local-handoff/roadmap.json +7 -2
- package/docs/examples/pdca-loop/BACKLOG.md +12 -1
- package/docs/examples/pdca-loop/README.md +1 -1
- package/docs/examples/pdca-loop/ROADMAP.md +2 -2
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md +39 -5
- package/docs/examples/pdca-loop/roadmap.json +7 -2
- package/lib/skill-runtime/CLAUDE.md +1 -1
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +2 -1
- package/lib/skill-runtime/__tests__/config.test.js +7 -2
- package/lib/skill-runtime/config.js +38 -6
- package/lib/skill-runtime/index.js +1 -9
- package/package.json +1 -1
- package/lib/skill-runtime/errors.js +0 -39
- package/lib/skill-runtime/query-registry.js +0 -101
- package/lib/skill-runtime/query.js +0 -126
- package/lib/skill-runtime/trace.js +0 -22
|
@@ -51,6 +51,9 @@ const DEFAULT_BACKLOG = {
|
|
|
51
51
|
|
|
52
52
|
const DEFAULT_TRACKING = {
|
|
53
53
|
version: 2,
|
|
54
|
+
outputPolicy: {
|
|
55
|
+
documentLanguage: 'en'
|
|
56
|
+
},
|
|
54
57
|
lastSyncedAt: '',
|
|
55
58
|
backlogMeta: {
|
|
56
59
|
roadmapVersion: '',
|
|
@@ -115,7 +118,7 @@ function normalizeHeader(value) {
|
|
|
115
118
|
return String(value || '')
|
|
116
119
|
.trim()
|
|
117
120
|
.toLowerCase()
|
|
118
|
-
.replace(/[
|
|
121
|
+
.replace(/[^\p{L}\p{N}]+/gu, ' ');
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
function normalizeCell(value) {
|
|
@@ -159,7 +162,7 @@ function formatInlineCode(value) {
|
|
|
159
162
|
|
|
160
163
|
function normalizeBoolean(value) {
|
|
161
164
|
const normalized = normalizeCell(value).toLowerCase();
|
|
162
|
-
return normalized === 'yes' || normalized === 'true';
|
|
165
|
+
return normalized === 'yes' || normalized === 'true' || normalized === '是';
|
|
163
166
|
}
|
|
164
167
|
|
|
165
168
|
function emptyBacklog() {
|
|
@@ -219,6 +222,10 @@ function normalizeTracking(raw) {
|
|
|
219
222
|
|
|
220
223
|
return {
|
|
221
224
|
version: 2,
|
|
225
|
+
outputPolicy: {
|
|
226
|
+
...DEFAULT_TRACKING.outputPolicy,
|
|
227
|
+
...(raw.outputPolicy || {})
|
|
228
|
+
},
|
|
222
229
|
lastSyncedAt: String(raw.lastSyncedAt || '').trim(),
|
|
223
230
|
backlogMeta: {
|
|
224
231
|
roadmapVersion: String(backlogMeta.roadmapVersion || '').trim(),
|
|
@@ -268,6 +275,14 @@ function normalizeRoadmapState(raw = {}) {
|
|
|
268
275
|
const context = raw.context || {};
|
|
269
276
|
const route = raw.route || {};
|
|
270
277
|
const architecture = raw.architecture || {};
|
|
278
|
+
const normalizedMeta = {
|
|
279
|
+
...DEFAULT_ROADMAP_STATE.meta,
|
|
280
|
+
roadmapVersion: String(meta.roadmapVersion || tracking.backlogMeta.roadmapVersion).trim(),
|
|
281
|
+
skillVersion: String(meta.skillVersion || tracking.backlogMeta.skillVersion).trim(),
|
|
282
|
+
status: String(meta.status || DEFAULT_ROADMAP_STATE.meta.status).trim(),
|
|
283
|
+
lastUpdated: String(meta.lastUpdated || tracking.lastSyncedAt).trim(),
|
|
284
|
+
currentFocusStage: String(meta.currentFocusStage || tracking.backlogMeta.currentFocusStage).trim()
|
|
285
|
+
};
|
|
271
286
|
|
|
272
287
|
return {
|
|
273
288
|
...DEFAULT_ROADMAP_STATE,
|
|
@@ -276,14 +291,7 @@ function normalizeRoadmapState(raw = {}) {
|
|
|
276
291
|
...DEFAULT_ROADMAP_STATE.outputPolicy,
|
|
277
292
|
...(raw.outputPolicy || {})
|
|
278
293
|
},
|
|
279
|
-
meta:
|
|
280
|
-
...DEFAULT_ROADMAP_STATE.meta,
|
|
281
|
-
roadmapVersion: String(meta.roadmapVersion || tracking.backlogMeta.roadmapVersion).trim(),
|
|
282
|
-
skillVersion: String(meta.skillVersion || tracking.backlogMeta.skillVersion).trim(),
|
|
283
|
-
status: String(meta.status || DEFAULT_ROADMAP_STATE.meta.status).trim(),
|
|
284
|
-
lastUpdated: String(meta.lastUpdated || tracking.lastSyncedAt).trim(),
|
|
285
|
-
currentFocusStage: String(meta.currentFocusStage || tracking.backlogMeta.currentFocusStage).trim()
|
|
286
|
-
},
|
|
294
|
+
meta: normalizedMeta,
|
|
287
295
|
context: {
|
|
288
296
|
...DEFAULT_ROADMAP_STATE.context,
|
|
289
297
|
...context,
|
|
@@ -301,7 +309,11 @@ function normalizeRoadmapState(raw = {}) {
|
|
|
301
309
|
},
|
|
302
310
|
stages: Array.isArray(raw.stages) ? raw.stages : [],
|
|
303
311
|
items: tracking.items,
|
|
304
|
-
backlogMeta:
|
|
312
|
+
backlogMeta: {
|
|
313
|
+
roadmapVersion: normalizedMeta.roadmapVersion,
|
|
314
|
+
skillVersion: normalizedMeta.skillVersion,
|
|
315
|
+
currentFocusStage: normalizedMeta.currentFocusStage
|
|
316
|
+
},
|
|
305
317
|
dependencyHandoff: tracking.dependencyHandoff,
|
|
306
318
|
lastSyncedAt: tracking.lastSyncedAt,
|
|
307
319
|
handoff: buildRoadmapHandoff(tracking, raw.handoff || {}),
|
|
@@ -315,36 +327,78 @@ function normalizeRoadmapState(raw = {}) {
|
|
|
315
327
|
}
|
|
316
328
|
|
|
317
329
|
const ROADMAP_HEADER_TO_KEY = new Map(
|
|
318
|
-
|
|
330
|
+
[
|
|
331
|
+
...ROADMAP_COLUMNS,
|
|
332
|
+
['事项', 'item'],
|
|
333
|
+
['阶段', 'stage'],
|
|
334
|
+
['优先级', 'priority'],
|
|
335
|
+
['主能力', 'primaryCapability'],
|
|
336
|
+
['次能力', 'secondaryCapabilities'],
|
|
337
|
+
['预期规格变化', 'expectedSpecDelta'],
|
|
338
|
+
['依赖', 'dependsOn'],
|
|
339
|
+
['状态', 'status'],
|
|
340
|
+
['进度', 'progress']
|
|
341
|
+
].map(([header, key]) => [normalizeHeader(header), key])
|
|
319
342
|
);
|
|
320
343
|
|
|
321
344
|
const BACKLOG_QUEUE_HEADER_TO_KEY = new Map(
|
|
322
|
-
|
|
345
|
+
[
|
|
346
|
+
...BACKLOG_QUEUE_COLUMNS,
|
|
347
|
+
['标题', 'item'],
|
|
348
|
+
['来源阶段', 'stage'],
|
|
349
|
+
['优先级', 'priority'],
|
|
350
|
+
['主能力', 'primaryCapability'],
|
|
351
|
+
['次能力', 'secondaryCapabilities'],
|
|
352
|
+
['能力缺口', 'capabilityGap'],
|
|
353
|
+
['预期规格变化', 'expectedSpecDelta'],
|
|
354
|
+
['证据', 'evidence'],
|
|
355
|
+
['依赖', 'dependsOn'],
|
|
356
|
+
['可并行', 'parallelWith'],
|
|
357
|
+
['未知项', 'unknowns'],
|
|
358
|
+
['下一决策', 'nextDecision'],
|
|
359
|
+
['就绪', 'ready']
|
|
360
|
+
].map(([header, key]) => [normalizeHeader(header), key])
|
|
323
361
|
);
|
|
324
362
|
|
|
325
363
|
const READY_FIELD_MAP = new Map(
|
|
326
364
|
[
|
|
327
365
|
['Primary Capability', 'primaryCapability'],
|
|
366
|
+
['主能力', 'primaryCapability'],
|
|
328
367
|
['Secondary Capabilities', 'secondaryCapabilities'],
|
|
368
|
+
['次能力', 'secondaryCapabilities'],
|
|
329
369
|
['Why now', 'whyNow'],
|
|
370
|
+
['为什么现在做', 'whyNow'],
|
|
330
371
|
['Success signal', 'successSignal'],
|
|
372
|
+
['成功信号', 'successSignal'],
|
|
331
373
|
['Entry constraints', 'entryConstraints'],
|
|
374
|
+
['进入约束', 'entryConstraints'],
|
|
332
375
|
['Capability gap', 'capabilityGap'],
|
|
376
|
+
['能力缺口', 'capabilityGap'],
|
|
333
377
|
['Expected spec delta', 'expectedSpecDelta'],
|
|
378
|
+
['预期规格变化', 'expectedSpecDelta'],
|
|
334
379
|
['Open risks', 'openRisks'],
|
|
380
|
+
['未决风险', 'openRisks'],
|
|
335
381
|
['First planning question', 'firstPlanningQuestion'],
|
|
382
|
+
['首个规划问题', 'firstPlanningQuestion'],
|
|
336
383
|
['Required context to load', 'requiredContextToLoad'],
|
|
384
|
+
['必须加载的上下文', 'requiredContextToLoad'],
|
|
337
385
|
['Depends On', 'dependsOn'],
|
|
386
|
+
['依赖', 'dependsOn'],
|
|
338
387
|
['Parallel With', 'parallelWith'],
|
|
339
|
-
['
|
|
388
|
+
['可并行', 'parallelWith'],
|
|
389
|
+
['Why this is ready now', 'whyReadyNow'],
|
|
390
|
+
['为什么现在已就绪', 'whyReadyNow']
|
|
340
391
|
].map(([label, key]) => [normalizeHeader(label), key])
|
|
341
392
|
);
|
|
342
393
|
|
|
343
394
|
const PARKED_FIELD_MAP = new Map(
|
|
344
395
|
[
|
|
345
396
|
['Reason parked', 'parkedReason'],
|
|
397
|
+
['暂存原因', 'parkedReason'],
|
|
346
398
|
['Trigger to reopen', 'triggerToReopen'],
|
|
347
|
-
['
|
|
399
|
+
['重新打开触发条件', 'triggerToReopen'],
|
|
400
|
+
['Missing evidence', 'missingEvidence'],
|
|
401
|
+
['缺失证据', 'missingEvidence']
|
|
348
402
|
].map(([label, key]) => [normalizeHeader(label), key])
|
|
349
403
|
);
|
|
350
404
|
|
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
_No unreleased changes._
|
|
13
|
+
|
|
14
|
+
## [4.5.16] - 2026-05-17
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Updated `cc-plan`, `cc-investigate`, `cc-review`, and `cc-pr-review` to require ASCII branch-chain analysis in their task or review outputs.
|
|
19
|
+
- Added plan and investigation task-template fields that trace upstream sources, deepest affected code or prompt/provider layers, downstream impact, and verification seams.
|
|
20
|
+
- Clarified that ASCII branch-chain connector tokens stay ASCII while labels, findings, evidence, and explanatory text follow the configured output language.
|
|
21
|
+
- Replaced hard-coded English branch-chain templates with shared semantic label tables for English and Chinese outputs.
|
|
22
|
+
- Updated runtime output-policy rendering so `zh-CN` configurations describe the policy in Chinese instead of English-only prose.
|
|
23
|
+
- Added `Output language` metadata to generated roadmap and backlog projections.
|
|
24
|
+
|
|
25
|
+
### Removed
|
|
26
|
+
|
|
27
|
+
- Removed the `cc-devflow query` runtime surface and the `workflow-context` query.
|
|
28
|
+
- Removed workflow-context stage-transition requirements from distributed skills; stages now start from `task.md`, Git, and PR or handoff reality.
|
|
29
|
+
|
|
12
30
|
## [4.5.14] - 2026-05-14
|
|
13
31
|
|
|
14
32
|
### Changed
|
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ Canonical language and durable decisions stay inside cc-devflow-native sources:
|
|
|
118
118
|
|
|
119
119
|
`cc-plan` freezes more implementation decisions before `cc-do` starts. Non-trivial plans compare minimal viable and ideal architecture options, full designs include decision horizon plus error/rescue mapping, and test-first plans record test framework evidence, public test seams, spec-style test names, public verification paths, behavior assertions, mock boundaries, coverage quality, mandatory regression tests, interface depth, Green minimality guards, refactor candidates, and vertical tracer-bullet slices when existing behavior changes. Before handoff, `cc-plan` and `cc-investigate` also reconcile the source roadmap item so RM status, REQ/FIX binding, progress, and spec diagnosis do not drift from the frozen change artifacts.
|
|
120
120
|
|
|
121
|
-
Every post-planning stage
|
|
121
|
+
Every post-planning stage starts from `task.md`, current Git history/status, and PR or handoff truth when present. There is no runtime context query layer; disputed facts must be re-read from source artifacts. Use `npm run benchmark:skills` to keep public skill entrypoints thin; deeper planning rules should live behind conditional references instead of default context.
|
|
122
122
|
|
|
123
123
|
`cc-review` is optional and deeper than `cc-check`. It can run immediately after `cc-plan` / `cc-investigate` to review the frozen plan or root-cause contract, or after `cc-do` to review the implementation. Plan and investigation review findings are written directly into `task.md`. Implementation review findings are returned in the response with repair options; the user chooses the repair path before code is edited. PR reviews stay in the response or GitHub review. No local review report, ledger, findings JSON, or other review output file is written.
|
|
124
124
|
|
|
@@ -181,7 +181,7 @@ CC-DevFlow reads layered YAML config before durable workflow documents are writt
|
|
|
181
181
|
<repo>/.cc-devflow/config.local.yml
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
Precedence is deterministic: defaults < user < project < local < environment < CLI. `output.document_language` is machine-enforced and currently supports `en` and `zh-CN`. Non-standard preferences belong under `agent_preferences`; they guide style but do not override workflow contracts.
|
|
184
|
+
Precedence is deterministic: defaults < user < project < local < environment < CLI. `output.document_language` is machine-enforced and currently supports `en` and `zh-CN`. It controls durable planning, review, and handoff Markdown headings, prose, placeholders, evidence summaries, and PR/body drafts; code, commands, paths, schema keys, API names, and commit type/scope literals stay unchanged. Non-standard preferences belong under `agent_preferences`; they guide style but do not override workflow contracts.
|
|
185
185
|
|
|
186
186
|
```yaml
|
|
187
187
|
version: 1
|
|
@@ -247,14 +247,13 @@ The currently distributed skill folders are:
|
|
|
247
247
|
- `devflow/changes/<change>/` stores durable change truth in `task.md`, optional `handoff/pr-brief.md`, and Git commits. Real recurring failures may also write incident postmortems under `devflow/postmortems/`.
|
|
248
248
|
- New changes default to one human-authored Markdown artifact: `task.md`. Feature plans put the frozen design in `## Contract Summary`; bug investigations put root-cause truth in `## Root Cause Contract`. Legacy planning and review artifacts are readable fallback inputs only.
|
|
249
249
|
- Workflow state is Git-owned: keep `task.md` current, commit each completed stage/environment, and do not create extra process files.
|
|
250
|
-
- Use `
|
|
250
|
+
- Use `npm run verify:examples` and `npm run benchmark:skills` to keep workflow truth and skill entrypoints small and measurable.
|
|
251
251
|
- `devflow/workspaces/<change>/` stores ephemeral runtime scratch such as worker assignment, journals, prompts, and session logs.
|
|
252
252
|
- Regenerable files should not be persisted under `devflow/changes/`.
|
|
253
253
|
|
|
254
254
|
Artifact contract quick checks:
|
|
255
255
|
|
|
256
256
|
```bash
|
|
257
|
-
npx cc-devflow query workflow-context --change REQ-001 --change-key REQ-001-copy-invite-link --data-only --no-trace --compact
|
|
258
257
|
npm run verify:examples
|
|
259
258
|
npm run benchmark:skills
|
|
260
259
|
```
|
package/README.zh-CN.md
CHANGED
|
@@ -118,7 +118,7 @@ Canonical language 和 durable decisions 只收敛到 cc-devflow 原生真相源
|
|
|
118
118
|
|
|
119
119
|
`cc-plan` 会在 `cc-do` 开始前冻结更多实现决策。非 trivial 计划需要比较 minimal viable 和 ideal architecture,full-design 需要包含 implementation decision horizon 和 error/rescue map;测试计划要记录测试框架证据、public test seam、spec-style test name、public verification path、behavior assertion、mock boundary、覆盖质量、强制 regression test、interface depth、Green minimality guard、refactor candidates 和 vertical tracer-bullet slices。交接前,`cc-plan` 和 `cc-investigate` 还会校准 source roadmap item,让 RM 状态、REQ/FIX 绑定、progress 和 spec diagnosis 不再漂移。
|
|
120
120
|
|
|
121
|
-
planning
|
|
121
|
+
planning 之后的每个阶段都从 `task.md`、当前 Git history/status,以及存在时的 PR 或 handoff truth 开始。系统不再提供 runtime context query 层;有争议的事实必须回到源 artifact 重新读取。用 `npm run benchmark:skills` 保持 public skill 入口足够薄;深层规划规则应该放在条件 reference 后面,而不是默认上下文里。
|
|
122
122
|
|
|
123
123
|
`cc-review` 是可选的深度 Review,不替代 `cc-check`。它可以接在 `cc-plan` / `cc-investigate` 后审冻结的计划或根因合同,也可以接在 `cc-do` 后审实现。计划 / 调查 Review 的 finding 直接写进 `task.md`。执行 Review 的 finding 在当前回复里组织成修复选项,用户选择后才改代码。PR Review 只留在对话或 GitHub review 中。不写本地 review report、ledger、findings JSON 或其它 Review 产物文件。
|
|
124
124
|
|
|
@@ -181,7 +181,7 @@ CC-DevFlow 会在写入 durable workflow 文档前读取分层 YAML 配置:
|
|
|
181
181
|
<repo>/.cc-devflow/config.local.yml
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
优先级固定为:默认值 < 用户 < 项目 < 本地 < 环境变量 < CLI 参数。`output.document_language` 是机器约束,目前支持 `en` 和 `zh-CN
|
|
184
|
+
优先级固定为:默认值 < 用户 < 项目 < 本地 < 环境变量 < CLI 参数。`output.document_language` 是机器约束,目前支持 `en` 和 `zh-CN`。它约束 durable planning、review、handoff Markdown 的标题、正文、占位符、证据说明和 PR/body 草稿;代码、命令、路径、schema key、API 名、commit type/scope 等机器字面量保持原文。非标偏好放在 `agent_preferences` 下,只影响表达风格,不覆盖 workflow 契约。
|
|
185
185
|
|
|
186
186
|
```yaml
|
|
187
187
|
version: 1
|
|
@@ -247,14 +247,13 @@ npx cc-devflow config doctor --cwd /path/to/your/project
|
|
|
247
247
|
- `devflow/changes/<change>/` 的 durable change truth 只保留 `task.md`、可选 `handoff/pr-brief.md` 和 Git commits。真实复发故障可以在 `devflow/postmortems/` 写 incident postmortem。
|
|
248
248
|
- 新 change 默认只有一个人工编写的 Markdown artifact:`task.md`。功能计划把冻结设计写进 `## Contract Summary`;Bug 调查把根因真相写进 `## Root Cause Contract`。历史 planning / review artifacts 只作为可读 fallback 输入。
|
|
249
249
|
- 流程状态归 Git:保持 `task.md` 当前,每个完成阶段 / 执行环境提交 commit,不创建额外过程文件。
|
|
250
|
-
- 用 `
|
|
250
|
+
- 用 `npm run verify:examples` 和 `npm run benchmark:skills` 保持 workflow truth 与 skill 入口小而可测。
|
|
251
251
|
- `devflow/workspaces/<change>/` 保存 ephemeral runtime scratch,例如 worker assignment、journal、prompt 和 session log。
|
|
252
252
|
- 能从 durable truth 再生成的文件,不应该持久化到 `devflow/changes/`。
|
|
253
253
|
|
|
254
254
|
Artifact contract 快速检查:
|
|
255
255
|
|
|
256
256
|
```bash
|
|
257
|
-
npx cc-devflow query workflow-context --change REQ-001 --change-key REQ-001-copy-invite-link --data-only --no-trace --compact
|
|
258
257
|
npm run verify:examples
|
|
259
258
|
npm run benchmark:skills
|
|
260
259
|
```
|
package/bin/cc-devflow-cli.js
CHANGED
|
@@ -14,10 +14,6 @@ const {
|
|
|
14
14
|
setConfigValue,
|
|
15
15
|
writeConfigTemplate
|
|
16
16
|
} = require(path.join(PACKAGE_ROOT, 'lib/skill-runtime/config.js'));
|
|
17
|
-
const {
|
|
18
|
-
listQueryIds,
|
|
19
|
-
runQuery
|
|
20
|
-
} = require(path.join(PACKAGE_ROOT, 'lib/skill-runtime/query.js'));
|
|
21
17
|
const ADAPT_BIN = path.join(PACKAGE_ROOT, 'bin', 'adapt.js');
|
|
22
18
|
const ADAPTER_BIN = path.join(PACKAGE_ROOT, 'bin', 'cc-devflow.js');
|
|
23
19
|
const TEMPLATE_IGNORES = new Set(['.DS_Store', 'tsc-cache']);
|
|
@@ -58,8 +54,6 @@ Commands:
|
|
|
58
54
|
config set Set one project/user/local config value
|
|
59
55
|
config resolve Print resolved YAML config with key-level trace
|
|
60
56
|
config doctor Validate config and local ignore safety
|
|
61
|
-
query list List typed runtime query ids
|
|
62
|
-
query <id> Run a typed runtime query as JSON
|
|
63
57
|
next-change-key Compute the next REQ/FIX change key
|
|
64
58
|
archive-change Archive a completed change to devflow/changes/archive/YYYY-MM/
|
|
65
59
|
restore-change Restore an archived change back to devflow/changes/
|
|
@@ -89,15 +83,6 @@ Config options:
|
|
|
89
83
|
--trace Include key-level source trace with policy output
|
|
90
84
|
--force Overwrite an existing config template
|
|
91
85
|
|
|
92
|
-
Query options:
|
|
93
|
-
--cwd <path> Project path used for devflow artifact lookup
|
|
94
|
-
--change <id> Change id, for example REQ-123
|
|
95
|
-
--change-id <id> Alias for --change
|
|
96
|
-
--change-key <key> Full change key, for example REQ-123-my-feature
|
|
97
|
-
--data-only Print only the query data payload when the query succeeds
|
|
98
|
-
--no-trace Omit trace metadata from the JSON output
|
|
99
|
-
--compact Print minified JSON instead of pretty JSON
|
|
100
|
-
|
|
101
86
|
Next-change-key options:
|
|
102
87
|
--prefix <REQ|FIX> Change type prefix (required)
|
|
103
88
|
--description <text> Short description, will be slugified (required)
|
|
@@ -112,8 +97,6 @@ Examples:
|
|
|
112
97
|
cc-devflow config set output.document_language zh-CN --cwd /path/to/project --project
|
|
113
98
|
cc-devflow config set output.document_language zh-CN --user
|
|
114
99
|
cc-devflow config resolve --cwd /path/to/project --format policy
|
|
115
|
-
cc-devflow query list
|
|
116
|
-
cc-devflow query workflow-context --cwd /path/to/project --change REQ-123 --change-key REQ-123-my-feature --data-only --no-trace --compact
|
|
117
100
|
`);
|
|
118
101
|
}
|
|
119
102
|
|
|
@@ -478,82 +461,6 @@ function runConfig(args) {
|
|
|
478
461
|
return 0;
|
|
479
462
|
}
|
|
480
463
|
|
|
481
|
-
function parseChangeScopedArgs(args, options = {}) {
|
|
482
|
-
const { allowQueryFlags = false } = options;
|
|
483
|
-
const parsed = {
|
|
484
|
-
cwd: null,
|
|
485
|
-
changeId: null,
|
|
486
|
-
changeKey: null,
|
|
487
|
-
compact: false,
|
|
488
|
-
dataOnly: false,
|
|
489
|
-
noTrace: false,
|
|
490
|
-
rest: []
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
for (let i = 0; i < args.length; i++) {
|
|
494
|
-
const arg = args[i];
|
|
495
|
-
|
|
496
|
-
if (arg === '--cwd') { parsed.cwd = args[++i]; continue; }
|
|
497
|
-
if (arg.startsWith('--cwd=')) { parsed.cwd = arg.slice('--cwd='.length); continue; }
|
|
498
|
-
if (arg === '--change' || arg === '--change-id') { parsed.changeId = args[++i]; continue; }
|
|
499
|
-
if (arg.startsWith('--change=')) { parsed.changeId = arg.slice('--change='.length); continue; }
|
|
500
|
-
if (arg.startsWith('--change-id=')) { parsed.changeId = arg.slice('--change-id='.length); continue; }
|
|
501
|
-
if (arg === '--change-key') { parsed.changeKey = args[++i]; continue; }
|
|
502
|
-
if (arg.startsWith('--change-key=')) { parsed.changeKey = arg.slice('--change-key='.length); continue; }
|
|
503
|
-
if (allowQueryFlags && arg === '--compact') { parsed.compact = true; continue; }
|
|
504
|
-
if (allowQueryFlags && arg === '--data-only') { parsed.dataOnly = true; continue; }
|
|
505
|
-
if (allowQueryFlags && arg === '--no-trace') { parsed.noTrace = true; continue; }
|
|
506
|
-
|
|
507
|
-
parsed.rest.push(arg);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
return parsed;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
function formatQueryResult(result, options) {
|
|
514
|
-
let output = result;
|
|
515
|
-
|
|
516
|
-
if (options.dataOnly && result.ok) {
|
|
517
|
-
output = result.data;
|
|
518
|
-
} else if (options.noTrace && output && typeof output === 'object') {
|
|
519
|
-
const { trace, ...withoutTrace } = output;
|
|
520
|
-
output = withoutTrace;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
return options.compact
|
|
524
|
-
? JSON.stringify(output)
|
|
525
|
-
: JSON.stringify(output, null, 2);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
async function runQueryCommand(args) {
|
|
529
|
-
const [subcommand, ...rest] = args;
|
|
530
|
-
|
|
531
|
-
if (!subcommand || subcommand === '--help' || subcommand === '-h') {
|
|
532
|
-
console.error('Use: cc-devflow query list OR cc-devflow query <id> --change <changeId> [--change-key <key>] [--cwd <path>]');
|
|
533
|
-
return 3;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
if (subcommand === 'list') {
|
|
537
|
-
process.stdout.write(`${listQueryIds().join('\n')}\n`);
|
|
538
|
-
return 0;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
const options = parseChangeScopedArgs(rest, { allowQueryFlags: true });
|
|
542
|
-
if (!options.changeId) {
|
|
543
|
-
console.error('Query --change is required.');
|
|
544
|
-
return 3;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
const result = await runQuery(subcommand, {
|
|
548
|
-
repoRoot: path.resolve(options.cwd || process.cwd()),
|
|
549
|
-
changeId: options.changeId,
|
|
550
|
-
changeKey: options.changeKey
|
|
551
|
-
});
|
|
552
|
-
|
|
553
|
-
process.stdout.write(`${formatQueryResult(result, options)}\n`);
|
|
554
|
-
return result.ok ? 0 : 2;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
464
|
function runNextChangeKey(args) {
|
|
558
465
|
const parsed = { prefix: null, description: null, cwd: null };
|
|
559
466
|
|
|
@@ -700,6 +607,12 @@ async function main() {
|
|
|
700
607
|
return 0;
|
|
701
608
|
}
|
|
702
609
|
|
|
610
|
+
if (command.startsWith('-')) {
|
|
611
|
+
console.error(`Unknown top-level option: ${command}`);
|
|
612
|
+
console.error('Use: cc-devflow <command> [options]');
|
|
613
|
+
return 3;
|
|
614
|
+
}
|
|
615
|
+
|
|
703
616
|
if (command === 'init') {
|
|
704
617
|
return runInit(rest);
|
|
705
618
|
}
|
|
@@ -713,7 +626,8 @@ async function main() {
|
|
|
713
626
|
}
|
|
714
627
|
|
|
715
628
|
if (command === 'query') {
|
|
716
|
-
|
|
629
|
+
console.error('cc-devflow query has been removed. Read task.md, Git history/status, and PR or handoff truth directly.');
|
|
630
|
+
return 3;
|
|
717
631
|
}
|
|
718
632
|
|
|
719
633
|
if (command === 'next-change-key') {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"updatedAt": "2026-05-
|
|
2
|
+
"updatedAt": "2026-05-17",
|
|
3
3
|
"skills": {
|
|
4
|
-
"cc-roadmap": "5.3.
|
|
4
|
+
"cc-roadmap": "5.3.1",
|
|
5
5
|
"cc-next": "1.1.1",
|
|
6
|
-
"cc-dev": "1.1.
|
|
7
|
-
"cc-plan": "3.10.
|
|
8
|
-
"cc-investigate": "1.6.
|
|
6
|
+
"cc-dev": "1.1.3",
|
|
7
|
+
"cc-plan": "3.10.7",
|
|
8
|
+
"cc-investigate": "1.6.5",
|
|
9
9
|
"cc-do": "1.7.2",
|
|
10
|
-
"cc-review": "2.2.
|
|
11
|
-
"cc-pr-review": "1.1.
|
|
10
|
+
"cc-review": "2.2.3",
|
|
11
|
+
"cc-pr-review": "1.1.3",
|
|
12
12
|
"cc-pr-land": "1.1.0",
|
|
13
13
|
"cc-check": "1.12.2",
|
|
14
|
-
"cc-act": "1.9.
|
|
14
|
+
"cc-act": "1.9.2",
|
|
15
15
|
"cc-spec-init": "1.2.0"
|
|
16
16
|
},
|
|
17
17
|
"examples": [
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
## Backlog Meta
|
|
6
6
|
|
|
7
7
|
- Roadmap version: `roadmap.v2`
|
|
8
|
-
- Skill version: `5.3.
|
|
8
|
+
- Skill version: `5.3.1`
|
|
9
9
|
- Last synced: `2026-04-19`
|
|
10
10
|
- Current focus stage: `Stage 2`
|
|
11
11
|
- Roadmap state source: `roadmap.json`
|
|
12
|
+
- Output language: en
|
|
12
13
|
|
|
13
14
|
## Queue
|
|
14
15
|
|
|
@@ -22,6 +23,16 @@
|
|
|
22
23
|
- Parallel-ready next wave: -
|
|
23
24
|
- Notes on blockers: verification is blocked until the import contract covers limits, duplicates, billing, and audit consistency
|
|
24
25
|
|
|
26
|
+
## Project Direction Handoff
|
|
27
|
+
|
|
28
|
+
- Project direction mode: -
|
|
29
|
+
- Direction mode rationale: -
|
|
30
|
+
- Direction-specific questions selected: -
|
|
31
|
+
- Direction-specific questions skipped: -
|
|
32
|
+
- Direction guardrails applied: -
|
|
33
|
+
- Planning posture: -
|
|
34
|
+
- Evidence maturity: -
|
|
35
|
+
|
|
25
36
|
## Ready For Req-Plan
|
|
26
37
|
|
|
27
38
|
- RM-010:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Example version: `1.0.0`
|
|
6
6
|
- Last reviewed: `2026-04-17`
|
|
7
|
-
- Bound skills: `cc-roadmap@5.3.
|
|
7
|
+
- Bound skills: `cc-roadmap@5.3.1`, `cc-plan@3.10.7`, `cc-do@1.7.2`, `cc-check@1.12.2`
|
|
8
8
|
|
|
9
9
|
This example shows a requirement that **looked executable**, but `cc-check` correctly stopped it and sent it back to `cc-plan`.
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Roadmap Meta
|
|
4
4
|
|
|
5
5
|
- Roadmap version: `roadmap.v2`
|
|
6
|
-
- Skill version: `5.3.
|
|
6
|
+
- Skill version: `5.3.1`
|
|
7
7
|
- Status: `active`
|
|
8
8
|
- Last updated: `2026-04-16`
|
|
9
9
|
- Owner / decider: `product-owner`
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
## Implementation Tracking
|
|
62
62
|
- Roadmap state source: `roadmap.json`
|
|
63
|
+
- Output language: en
|
|
63
64
|
|
|
64
65
|
<!-- roadmap-tracking:start -->
|
|
65
66
|
| RM-ID | Item | Stage | Priority | Primary Capability | Secondary Capabilities | Expected Spec Delta | Depends On | Status | REQ | Progress |
|
|
@@ -67,7 +68,6 @@
|
|
|
67
68
|
| RM-010 | Add CSV bulk invite import for admins | Stage 2 | P1 | cap-bulk-invite-import | cap-workspace-membership | define import semantics before widening current truth | - | Verification blocked | REQ-002 | 80% |
|
|
68
69
|
<!-- roadmap-tracking:end -->
|
|
69
70
|
|
|
70
|
-
|
|
71
71
|
## Technical Architecture
|
|
72
72
|
|
|
73
73
|
```mermaid
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
- Requirement version: `REQ-002.v2`
|
|
6
6
|
- Design version: `design.v2`
|
|
7
|
-
- CC-Plan skill version: `3.10.
|
|
7
|
+
- CC-Plan skill version: `3.10.7`
|
|
8
8
|
- Work branch: `REQ/002-bulk-invite-import`
|
|
9
|
+
- Output language: en
|
|
9
10
|
- Source roadmap item: `RM-010`
|
|
10
11
|
- Source roadmap version: `roadmap.v2`
|
|
11
12
|
|
|
@@ -24,6 +25,39 @@
|
|
|
24
25
|
- Testing decisions: test bulk-import rules, admin upload flow, and audit mapping
|
|
25
26
|
- Out of scope: SCIM provisioning, background jobs, rollback wizard
|
|
26
27
|
- AI Leverage Decision Lens: sharp-wedge; AI can implement this bounded import path fast, but cc-check may still block final proof if row semantics drift
|
|
28
|
+
- Product / Creative Discovery:
|
|
29
|
+
- Worth doing: admins cannot trust bulk invite outcomes when duplicates, invalid rows, and seat limits mix together.
|
|
30
|
+
- Desired product shape: every uploaded row gets a predictable visible result before downstream audit behavior matters.
|
|
31
|
+
- Narrowest wedge: deterministic row classification for the known CSV invite path.
|
|
32
|
+
- 10x / better version: full provisioning workflow with retry, rollback, and background processing, deferred outside this requirement.
|
|
33
|
+
- Do-nothing consequence: admins keep reconciling failed imports manually and audit logs remain hard to trust.
|
|
34
|
+
- Second-Move Review:
|
|
35
|
+
- First good move: implement mixed CSV result rendering directly in the admin panel.
|
|
36
|
+
- Simpler move: freeze the row-outcome matrix first and reuse the existing invite engine.
|
|
37
|
+
- Better architecture: later move bulk provisioning into a job-backed import workflow.
|
|
38
|
+
- Selected move: row classification first, then admin surface and audit mapping.
|
|
39
|
+
- Rejected tradeoff: no SCIM, background jobs, or rollback wizard in this requirement.
|
|
40
|
+
- ASCII Branch Chain Analysis:
|
|
41
|
+
Language rule: connector tokens stay ASCII; node text follows `Output language: en`.
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
Requirement Impact Chain
|
|
45
|
+
REQ: deterministic bulk invite row outcomes
|
|
46
|
+
|-- Upstream source: RM-010 + admin import failure cases
|
|
47
|
+
|-- Current code path: src/invite/bulk-import.ts
|
|
48
|
+
| |-- caller: src/admin/BulkInvitePanel.tsx
|
|
49
|
+
| |-- data or state: CSV rows, duplicate state, seat-limit state, audit rows
|
|
50
|
+
| `-- deepest affected layer: row-outcome matrix shared by invite and audit behavior
|
|
51
|
+
|-- Required change: classify each row before executing visible bulk results
|
|
52
|
+
`-- Verification seam: bulk-import and admin panel tests
|
|
53
|
+
|
|
54
|
+
Business Impact Chain
|
|
55
|
+
OUTCOME: admins can trust mixed CSV import results
|
|
56
|
+
|-- Direct behavior impact: duplicate, invalid, and over-limit rows get stable results
|
|
57
|
+
|-- Downstream impact: audit mapping and visible admin result rendering
|
|
58
|
+
|-- Risk branch: row semantics drift between UI and audit log
|
|
59
|
+
`-- Non-goal branch: SCIM, background jobs, and rollback wizard stay out
|
|
60
|
+
```
|
|
27
61
|
- Read first:
|
|
28
62
|
- `design.md`
|
|
29
63
|
- `src/admin/BulkInvitePanel.tsx`
|
|
@@ -43,8 +77,8 @@
|
|
|
43
77
|
ClaudeCode / Codex 执行本计划时,必须把本文件当成任务模板合同,而不是普通 TODO 列表。
|
|
44
78
|
|
|
45
79
|
- Template source: `assets/TASKS_TEMPLATE.md`
|
|
46
|
-
- CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `
|
|
47
|
-
- Context first:
|
|
80
|
+
- CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `next-change-key`, stop blocked.
|
|
81
|
+
- Context first: read this `task.md`, current Git status/history, and PR or handoff truth when present before opening deep sections.
|
|
48
82
|
- Task selection: use `scripts/select-ready-tasks.sh --tasks devflow/changes/<change-key>/task.md`.
|
|
49
83
|
- Task block rule: read the full task block before coding; title-only execution is invalid.
|
|
50
84
|
- Completion rule: after verification and review gates pass, run `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
|
|
@@ -55,8 +89,8 @@ DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
|
|
|
55
89
|
if [[ ! -f "$DEVFLOW" && -f ".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh" ]]; then
|
|
56
90
|
DEVFLOW=".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh"
|
|
57
91
|
fi
|
|
58
|
-
bash "$DEVFLOW" require
|
|
59
|
-
|
|
92
|
+
bash "$DEVFLOW" require next-change-key
|
|
93
|
+
SCRIPT_ROOT=".claude/skills/cc-do/scripts"
|
|
60
94
|
if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
|
|
61
95
|
SCRIPT_ROOT=".codex/skills/cc-do/scripts"
|
|
62
96
|
fi
|
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
},
|
|
6
6
|
"meta": {
|
|
7
7
|
"roadmapVersion": "roadmap.v2",
|
|
8
|
-
"skillVersion": "5.3.
|
|
8
|
+
"skillVersion": "5.3.1",
|
|
9
9
|
"status": "active",
|
|
10
10
|
"lastUpdated": "2026-04-19",
|
|
11
11
|
"currentFocusStage": "Stage 2"
|
|
12
12
|
},
|
|
13
13
|
"context": {
|
|
14
|
+
"projectDirectionMode": "",
|
|
15
|
+
"projectDirectionRationale": "",
|
|
16
|
+
"directionQuestionsSelected": [],
|
|
17
|
+
"directionQuestionsSkipped": [],
|
|
18
|
+
"directionGuardrailsApplied": [],
|
|
14
19
|
"planningPosture": "",
|
|
15
20
|
"evidenceMaturity": "",
|
|
16
21
|
"canonicalTerms": [],
|
|
@@ -127,7 +132,7 @@
|
|
|
127
132
|
},
|
|
128
133
|
"backlogMeta": {
|
|
129
134
|
"roadmapVersion": "roadmap.v2",
|
|
130
|
-
"skillVersion": "
|
|
135
|
+
"skillVersion": "5.3.1",
|
|
131
136
|
"currentFocusStage": "Stage 2"
|
|
132
137
|
},
|
|
133
138
|
"dependencyHandoff": {
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
## Backlog Meta
|
|
6
6
|
|
|
7
7
|
- Roadmap version: `roadmap.v2`
|
|
8
|
-
- Skill version: `5.3.
|
|
8
|
+
- Skill version: `5.3.1`
|
|
9
9
|
- Last synced: `2026-04-19`
|
|
10
10
|
- Current focus stage: `Stage 2`
|
|
11
11
|
- Roadmap state source: `roadmap.json`
|
|
12
|
+
- Output language: en
|
|
12
13
|
|
|
13
14
|
## Queue
|
|
14
15
|
|
|
@@ -22,6 +23,16 @@
|
|
|
22
23
|
- Parallel-ready next wave: -
|
|
23
24
|
- Notes on blockers: export work stays local-only until the next maintainer has remote access
|
|
24
25
|
|
|
26
|
+
## Project Direction Handoff
|
|
27
|
+
|
|
28
|
+
- Project direction mode: -
|
|
29
|
+
- Direction mode rationale: -
|
|
30
|
+
- Direction-specific questions selected: -
|
|
31
|
+
- Direction-specific questions skipped: -
|
|
32
|
+
- Direction guardrails applied: -
|
|
33
|
+
- Planning posture: -
|
|
34
|
+
- Evidence maturity: -
|
|
35
|
+
|
|
25
36
|
## Ready For Req-Plan
|
|
26
37
|
|
|
27
38
|
- RM-020:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Example version: `1.0.0`
|
|
6
6
|
- Last reviewed: `2026-04-17`
|
|
7
|
-
- Bound skills: `cc-roadmap@5.3.
|
|
7
|
+
- Bound skills: `cc-roadmap@5.3.1`, `cc-plan@3.10.7`, `cc-do@1.7.2`, `cc-check@1.12.2`, `cc-act@1.9.2`
|
|
8
8
|
|
|
9
9
|
This example shows verified work that is **ready to move forward**, but `cc-act` still chooses `local-handoff`.
|
|
10
10
|
|