cc-devflow 4.5.13 → 4.5.15

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.
Files changed (52) hide show
  1. package/.claude/skills/cc-act/SKILL.md +2 -2
  2. package/.claude/skills/cc-check/CHANGELOG.md +6 -0
  3. package/.claude/skills/cc-check/PLAYBOOK.md +18 -1
  4. package/.claude/skills/cc-check/SKILL.md +59 -3
  5. package/.claude/skills/cc-check/references/gate-contract.md +34 -0
  6. package/.claude/skills/cc-check/references/review-contract.md +11 -0
  7. package/.claude/skills/cc-dev/SKILL.md +1 -1
  8. package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +8 -26
  9. package/.claude/skills/cc-do/CHANGELOG.md +6 -0
  10. package/.claude/skills/cc-do/PLAYBOOK.md +23 -6
  11. package/.claude/skills/cc-do/SKILL.md +20 -4
  12. package/.claude/skills/cc-do/references/execution-recovery.md +15 -3
  13. package/.claude/skills/cc-investigate/CHANGELOG.md +6 -0
  14. package/.claude/skills/cc-investigate/PLAYBOOK.md +24 -0
  15. package/.claude/skills/cc-investigate/SKILL.md +39 -3
  16. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +68 -1
  17. package/.claude/skills/cc-investigate/references/investigation-contract.md +32 -0
  18. package/.claude/skills/cc-plan/CHANGELOG.md +14 -0
  19. package/.claude/skills/cc-plan/PLAYBOOK.md +21 -1
  20. package/.claude/skills/cc-plan/SKILL.md +77 -10
  21. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +61 -3
  22. package/.claude/skills/cc-plan/references/planning-contract.md +28 -4
  23. package/.claude/skills/cc-review/CHANGELOG.md +6 -0
  24. package/.claude/skills/cc-review/PLAYBOOK.md +9 -3
  25. package/.claude/skills/cc-review/SKILL.md +52 -1
  26. package/.claude/skills/cc-review/references/implementation-review-branch.md +106 -6
  27. package/.claude/skills/cc-review/references/plan-review-branch.md +109 -4
  28. package/.claude/skills/cc-review/references/review-methods.md +162 -9
  29. package/.claude/skills/cc-spec-init/PLAYBOOK.md +1 -1
  30. package/.claude/skills/cc-spec-init/SKILL.md +1 -1
  31. package/CHANGELOG.md +22 -0
  32. package/README.md +16 -18
  33. package/README.zh-CN.md +15 -17
  34. package/bin/cc-devflow-cli.js +8 -94
  35. package/docs/examples/example-bindings.json +5 -5
  36. package/docs/examples/full-design-blocked/README.md +1 -1
  37. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/task.md +17 -5
  38. package/docs/examples/local-handoff/README.md +1 -1
  39. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/task.md +17 -5
  40. package/docs/examples/pdca-loop/README.md +1 -1
  41. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md +17 -5
  42. package/docs/guides/artifact-contract.md +1 -1
  43. package/docs/guides/getting-started.md +3 -3
  44. package/docs/guides/getting-started.zh-CN.md +3 -3
  45. package/docs/guides/minimize-artifacts.md +1 -7
  46. package/lib/skill-runtime/CLAUDE.md +1 -1
  47. package/lib/skill-runtime/index.js +1 -9
  48. package/package.json +1 -1
  49. package/lib/skill-runtime/errors.js +0 -39
  50. package/lib/skill-runtime/query-registry.js +0 -101
  51. package/lib/skill-runtime/query.js +0 -126
  52. package/lib/skill-runtime/trace.js +0 -22
@@ -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
- return runQueryCommand(rest);
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') {
@@ -4,13 +4,13 @@
4
4
  "cc-roadmap": "5.3.0",
5
5
  "cc-next": "1.1.1",
6
6
  "cc-dev": "1.1.2",
7
- "cc-plan": "3.10.1",
8
- "cc-investigate": "1.6.1",
9
- "cc-do": "1.7.1",
10
- "cc-review": "2.2.0",
7
+ "cc-plan": "3.10.4",
8
+ "cc-investigate": "1.6.2",
9
+ "cc-do": "1.7.2",
10
+ "cc-review": "2.2.1",
11
11
  "cc-pr-review": "1.1.1",
12
12
  "cc-pr-land": "1.1.0",
13
- "cc-check": "1.12.1",
13
+ "cc-check": "1.12.2",
14
14
  "cc-act": "1.9.1",
15
15
  "cc-spec-init": "1.2.0"
16
16
  },
@@ -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.0`, `cc-plan@3.10.1`, `cc-do@1.7.1`, `cc-check@1.12.1`
7
+ - Bound skills: `cc-roadmap@5.3.0`, `cc-plan@3.10.4`, `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
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  - Requirement version: `REQ-002.v2`
6
6
  - Design version: `design.v2`
7
- - CC-Plan skill version: `3.10.1`
7
+ - CC-Plan skill version: `3.10.4`
8
8
  - Work branch: `REQ/002-bulk-invite-import`
9
9
  - Source roadmap item: `RM-010`
10
10
  - Source roadmap version: `roadmap.v2`
@@ -24,6 +24,18 @@
24
24
  - Testing decisions: test bulk-import rules, admin upload flow, and audit mapping
25
25
  - Out of scope: SCIM provisioning, background jobs, rollback wizard
26
26
  - 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
27
+ - Product / Creative Discovery:
28
+ - Worth doing: admins cannot trust bulk invite outcomes when duplicates, invalid rows, and seat limits mix together.
29
+ - Desired product shape: every uploaded row gets a predictable visible result before downstream audit behavior matters.
30
+ - Narrowest wedge: deterministic row classification for the known CSV invite path.
31
+ - 10x / better version: full provisioning workflow with retry, rollback, and background processing, deferred outside this requirement.
32
+ - Do-nothing consequence: admins keep reconciling failed imports manually and audit logs remain hard to trust.
33
+ - Second-Move Review:
34
+ - First good move: implement mixed CSV result rendering directly in the admin panel.
35
+ - Simpler move: freeze the row-outcome matrix first and reuse the existing invite engine.
36
+ - Better architecture: later move bulk provisioning into a job-backed import workflow.
37
+ - Selected move: row classification first, then admin surface and audit mapping.
38
+ - Rejected tradeoff: no SCIM, background jobs, or rollback wizard in this requirement.
27
39
  - Read first:
28
40
  - `design.md`
29
41
  - `src/admin/BulkInvitePanel.tsx`
@@ -43,8 +55,8 @@
43
55
  ClaudeCode / Codex 执行本计划时,必须把本文件当成任务模板合同,而不是普通 TODO 列表。
44
56
 
45
57
  - 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 `query workflow-context` and `next-change-key`, stop blocked.
47
- - Context first: run resolved CLI `query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact` before opening deep sections.
58
+ - 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.
59
+ - Context first: read this `task.md`, current Git status/history, and PR or handoff truth when present before opening deep sections.
48
60
  - Task selection: use `scripts/select-ready-tasks.sh --tasks devflow/changes/<change-key>/task.md`.
49
61
  - Task block rule: read the full task block before coding; title-only execution is invalid.
50
62
  - 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 +67,8 @@ DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
55
67
  if [[ ! -f "$DEVFLOW" && -f ".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh" ]]; then
56
68
  DEVFLOW=".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh"
57
69
  fi
58
- bash "$DEVFLOW" require query workflow-context next-change-key
59
- bash "$DEVFLOW" query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compactSCRIPT_ROOT=".claude/skills/cc-do/scripts"
70
+ bash "$DEVFLOW" require next-change-key
71
+ SCRIPT_ROOT=".claude/skills/cc-do/scripts"
60
72
  if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
61
73
  SCRIPT_ROOT=".codex/skills/cc-do/scripts"
62
74
  fi
@@ -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.0`, `cc-plan@3.10.1`, `cc-do@1.7.1`, `cc-check@1.12.1`, `cc-act@1.9.1`
7
+ - Bound skills: `cc-roadmap@5.3.0`, `cc-plan@3.10.4`, `cc-do@1.7.2`, `cc-check@1.12.2`, `cc-act@1.9.1`
8
8
 
9
9
  This example shows verified work that is **ready to move forward**, but `cc-act` still chooses `local-handoff`.
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  - Requirement version: `REQ-003.v1`
6
6
  - Design version: `design.v1`
7
- - CC-Plan skill version: `3.10.1`
7
+ - CC-Plan skill version: `3.10.4`
8
8
  - Work branch: `REQ/003-audit-log-export`
9
9
  - Source roadmap item: `RM-020`
10
10
  - Source roadmap version: `roadmap.v3`
@@ -24,6 +24,18 @@
24
24
  - Testing decisions: test through admin panel action and visible row data
25
25
  - Out of scope: JSON export, scheduled reporting, shared reporting backend
26
26
  - AI Leverage Decision Lens: boil-lake; complete visible-row CSV export while keeping reporting-platform work outside the lake
27
+ - Product / Creative Discovery:
28
+ - Worth doing: admins already copy audit summaries into weekly reports by hand.
29
+ - Desired product shape: download the same visible rows they are reviewing, without a reporting setup flow.
30
+ - Narrowest wedge: CSV export for currently visible summary rows.
31
+ - 10x / better version: scheduled reporting and shared report history, deferred outside this requirement.
32
+ - Do-nothing consequence: weekly reporting stays manual and easy to miscopy.
33
+ - Second-Move Review:
34
+ - First good move: add a download action to the audit summary panel.
35
+ - Simpler move: export only visible rows in CSV and avoid backend report storage.
36
+ - Better architecture: later introduce a reporting backend for scheduled exports.
37
+ - Selected move: visible-row CSV download from the existing panel.
38
+ - Rejected tradeoff: no JSON export, scheduling, or shared reporting backend here.
27
39
  - Read first:
28
40
  - `design.md`
29
41
  - `src/admin/AuditSummaryPanel.tsx`
@@ -42,8 +54,8 @@
42
54
  ClaudeCode / Codex 执行本计划时,必须把本文件当成任务模板合同,而不是普通 TODO 列表。
43
55
 
44
56
  - Template source: `assets/TASKS_TEMPLATE.md`
45
- - 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 `query workflow-context` and `next-change-key`, stop blocked.
46
- - Context first: run resolved CLI `query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact` before opening deep sections.
57
+ - 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.
58
+ - Context first: read this `task.md`, current Git status/history, and PR or handoff truth when present before opening deep sections.
47
59
  - Task selection: use `scripts/select-ready-tasks.sh --tasks devflow/changes/<change-key>/task.md`.
48
60
  - Task block rule: read the full task block before coding; title-only execution is invalid.
49
61
  - Completion rule: after verification and review gates pass, run `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
@@ -54,8 +66,8 @@ DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
54
66
  if [[ ! -f "$DEVFLOW" && -f ".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh" ]]; then
55
67
  DEVFLOW=".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh"
56
68
  fi
57
- bash "$DEVFLOW" require query workflow-context next-change-key
58
- bash "$DEVFLOW" query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compactSCRIPT_ROOT=".claude/skills/cc-do/scripts"
69
+ bash "$DEVFLOW" require next-change-key
70
+ SCRIPT_ROOT=".claude/skills/cc-do/scripts"
59
71
  if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
60
72
  SCRIPT_ROOT=".codex/skills/cc-do/scripts"
61
73
  fi
@@ -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.0`, `cc-plan@3.10.1`, `cc-do@1.7.1`, `cc-check@1.12.1`, `cc-act@1.9.1`
7
+ - Bound skills: `cc-roadmap@5.3.0`, `cc-plan@3.10.4`, `cc-do@1.7.2`, `cc-check@1.12.2`, `cc-act@1.9.1`
8
8
 
9
9
  This folder shows one minimal but complete `cc-roadmap -> cc-plan -> cc-do -> cc-check -> cc-act` loop.
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  - Requirement version: `REQ-001.v1`
6
6
  - Design version: `design.v1`
7
- - CC-Plan skill version: `3.10.1`
7
+ - CC-Plan skill version: `3.10.4`
8
8
  - Work branch: `REQ/001-copy-invite-link`
9
9
  - Source roadmap item: `RM-001`
10
10
  - Source roadmap version: `roadmap.v1`
@@ -25,6 +25,18 @@
25
25
  - Testing decisions: test through share dialog behavior
26
26
  - Out of scope: invite generation, role controls, analytics, clipboard fallback redesign
27
27
  - AI Leverage Decision Lens: boil-lake; complete the bounded same-dialog copy lake instead of stopping at a happy-path button
28
+ - Product / Creative Discovery:
29
+ - Worth doing: users already have an invite URL but must manually select and copy it.
30
+ - Desired product shape: one click in the existing dialog, then visible copied confirmation.
31
+ - Narrowest wedge: copy the currently visible invite URL only.
32
+ - 10x / better version: richer share workflow with fallback feedback and analytics, deferred outside this requirement.
33
+ - Do-nothing consequence: users keep making copy mistakes in the most common sharing path.
34
+ - Second-Move Review:
35
+ - First good move: add a copy button beside the invite URL.
36
+ - Simpler move: expose only a browser copy action and keep all share-service contracts unchanged.
37
+ - Better architecture: centralize all share actions behind a richer share command model later.
38
+ - Selected move: same-dialog copy action with minimal copied-state confirmation.
39
+ - Rejected tradeoff: no broader share-service redesign in this bounded requirement.
28
40
  - Read first:
29
41
  - `design.md`
30
42
  - `src/features/share/ShareDialog.tsx`
@@ -45,8 +57,8 @@
45
57
  ClaudeCode / Codex 执行本计划时,必须把本文件当成任务模板合同,而不是普通 TODO 列表。
46
58
 
47
59
  - Template source: `assets/TASKS_TEMPLATE.md`
48
- - 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 `query workflow-context` and `next-change-key`, stop blocked.
49
- - Context first: run resolved CLI `query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact` before opening deep sections.
60
+ - 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.
61
+ - Context first: read this `task.md`, current Git status/history, and PR or handoff truth when present before opening deep sections.
50
62
  - Task selection: use `scripts/select-ready-tasks.sh --tasks devflow/changes/<change-key>/task.md`.
51
63
  - Task block rule: read the full task block before coding; title-only execution is invalid.
52
64
  - Completion rule: after verification and review gates pass, run `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
@@ -57,8 +69,8 @@ DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
57
69
  if [[ ! -f "$DEVFLOW" && -f ".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh" ]]; then
58
70
  DEVFLOW=".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh"
59
71
  fi
60
- bash "$DEVFLOW" require query workflow-context next-change-key
61
- bash "$DEVFLOW" query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compactSCRIPT_ROOT=".claude/skills/cc-do/scripts"
72
+ bash "$DEVFLOW" require next-change-key
73
+ SCRIPT_ROOT=".claude/skills/cc-do/scripts"
62
74
  if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
63
75
  SCRIPT_ROOT=".codex/skills/cc-do/scripts"
64
76
  fi
@@ -15,4 +15,4 @@ Git records process history. Commit after each completed PDCA or IDCA environmen
15
15
 
16
16
  ## Retired Surface
17
17
 
18
- Do not create process JSON, review ledgers, report cards, status files, resume files, release notes, or principle files.
18
+ Do not create process files beyond the durable files above.
@@ -89,7 +89,7 @@ Typical outputs:
89
89
  - `cc-spec-init` writes `devflow/specs/INDEX.md` and capability specs
90
90
  - `cc-plan` writes `task.md#Contract Summary`
91
91
  - `cc-investigate` writes `task.md#Root Cause Contract`
92
- - `cc-review` reports concrete findings in the response; it does not write review process files
92
+ - `cc-review` writes plan/investigation findings into `task.md`; implementation findings stay in the response until the user chooses a repair option
93
93
  - `cc-check` reports verification facts in the response, PR brief, or Git commit
94
94
  - `cc-act` writes exactly one final PR file, `handoff/pr-brief.md`, or incident postmortem files when a real incident needs a corpse report
95
95
 
@@ -98,8 +98,8 @@ Change truth lives in `devflow/changes/<change>/`.
98
98
 
99
99
  - Keep `INDEX.md` plus capability markdown under `devflow/specs/`.
100
100
  - Name new change directories as `REQ-<number>-<description>` for requirements or `FIX-<number>-<description>` for bug fixes. `REQ` and `FIX` advance as separate local sequences, so cross-prefix duplicates are valid. Parallel worktrees may still repeat numbers; the full change key, especially the description, distinguishes the work. Old lowercase directories are compatibility reads only.
101
- - Keep `task.md`, optional `handoff/pr-brief.md`, and incident postmortem files under each `devflow/changes/<change>/`. Do not generate task `context.md`, `checkpoint.json`, review ledgers, status/resume files, release notes, principle files, or AI-written process files.
102
- - Workflow state is Git-owned: keep `task.md`, commit each completed stage, and do not create process JSON.
101
+ - Keep `task.md`, optional `handoff/pr-brief.md`, and Git commits as change truth. Real recurring failures may also write incident postmortems under `devflow/postmortems/`. Do not generate extra process files.
102
+ - Workflow state is Git-owned: keep `task.md`, commit each completed stage, and do not create extra process files.
103
103
  - Legacy `planning/design.md`, `planning/analysis.md`, and `cc-review-*.md` are readable fallback inputs for older changes, not new default writes.
104
104
  - Worker prompts, journals, assignments, and session logs belong under `devflow/workspaces/<change>/` as ephemeral scratch.
105
105
 
@@ -89,7 +89,7 @@ find .codex/skills -mindepth 2 -maxdepth 2 -name SKILL.md | sort
89
89
  - `cc-spec-init` 产出 `devflow/specs/INDEX.md` 和 capability spec
90
90
  - `cc-plan` 产出 `task.md#Contract Summary`
91
91
  - `cc-investigate` 产出 `task.md#Root Cause Contract`
92
- - `cc-review` 在当前回复里报告具体问题,不写 review 过程文件
92
+ - `cc-review` 把计划 / 调查 finding 写入 `task.md`;执行 finding 留在回复里,等用户选择修复方案后再改代码
93
93
  - `cc-check` 在当前回复、PR 文件或 Git commit 里记录验证事实
94
94
  - `cc-act` 只产出最终 PR 文件 `handoff/pr-brief.md`;真实事故需要尸检时才产出 incident postmortem 文件
95
95
 
@@ -97,8 +97,8 @@ durable truth 分两层:
97
97
 
98
98
  - `devflow/specs/`:capability 真相,保留 `INDEX.md` 与 `capabilities/*.md`
99
99
  - 新 change 目录必须命名为 `REQ-<number>-<description>`(需求)或 `FIX-<number>-<description>`(修复);`REQ` 和 `FIX` 分别维护自己的递增编号,跨前缀同号不是冲突;并行工作树造成重复编号时,完整 change key 的描述负责区分业务内容,旧小写目录只作为历史兼容读取。
100
- - `devflow/changes/<change>/`:变更真相,只保留 `task.md`、可选 `handoff/pr-brief.md`,以及真实事故需要的尸检文件。不要生成任务级 `context.md`、`checkpoint.json`、review ledger、status/resume 文件、release note、principles AI 手写过程文件。
101
- - 流程状态归 Git:保留 `task.md`,每个完成阶段提交 commit,不创建过程 JSON。
100
+ - `devflow/changes/<change>/`:变更真相,只保留 `task.md`、可选 `handoff/pr-brief.md` Git commit;真实复发事故可在 `devflow/postmortems/` 写尸检文件。不要生成额外过程文件。
101
+ - 流程状态归 Git:保留 `task.md`,每个完成阶段提交 commit,不创建额外过程文件。
102
102
  - 历史 `planning/design.md`、`planning/analysis.md` 和 `cc-review-*.md` 是旧 change 的可读 fallback,不再是新默认写入。
103
103
  - worker prompt、journal、assignment、session log 统一放到 `devflow/workspaces/<change>/`,作为 ephemeral scratch。
104
104
 
@@ -10,13 +10,7 @@ The workflow is intentionally Git-first.
10
10
 
11
11
  ## Do Not Keep
12
12
 
13
- - process JSON
14
- - review ledgers or finding files
15
- - report cards
16
- - status or resume files
17
- - release notes
18
- - principles files
19
- - task context or checkpoint files
13
+ Do not generate process files beyond the durable files above.
20
14
 
21
15
  ## Commit Rule
22
16
 
@@ -4,7 +4,7 @@
4
4
  职责分组
5
5
  入口层: `cli.js` 负责命令分发,`index.js` 提供给测试和内部脚本的稳定聚合入口。
6
6
  基础层: `schemas.js`、`store.js`、`paths.js` 管住契约、持久化与路径规则,避免执行层重复造轮子。
7
- 状态层: `artifacts.js`、`lifecycle.js`、`query.js`、`workflow-context.js`、`review.js`、`team-state.js` 维护运行时真相源与只读查询。
7
+ 状态层: `artifacts.js`、`lifecycle.js`、`review.js`、`team-state.js` 维护运行时真相源。
8
8
  规划与交接: `planner.js`、`intent.js`、`delegation.js` 把任务解析、handoff 生成和 team/workspace 委派收口成统一语义。
9
9
  阶段操作: `operations/` 是唯一 stage 入口目录;具体阶段边界见 `operations/CLAUDE.md`。
10
10
  测试布局: `__tests__/` 紧贴模块放置单元、回归与集成测试;顶层 `test/` 不再承载 `skill-runtime` 私有测试。
@@ -1,25 +1,17 @@
1
1
  /**
2
2
  * [INPUT]: 依赖 skill runtime 基础模块。
3
- * [OUTPUT]: 统一导出 config/path/store/query helpers。
3
+ * [OUTPUT]: 统一导出 config/path/store helpers。
4
4
  * [POS]: skill runtime 模块聚合出口,只保留 CLI 仍需的轻量能力。
5
5
  * [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
6
6
  */
7
7
 
8
8
  const store = require('./store');
9
- const query = require('./query');
10
- const queryRegistry = require('./query-registry');
11
- const errors = require('./errors');
12
- const trace = require('./trace');
13
9
  const paths = require('./paths');
14
10
  const config = require('./config');
15
11
  const archiveChange = require('./archive-change');
16
12
 
17
13
  module.exports = {
18
14
  ...store,
19
- ...query,
20
- ...queryRegistry,
21
- ...errors,
22
- ...trace,
23
15
  ...paths,
24
16
  ...config,
25
17
  ...archiveChange
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-devflow",
3
- "version": "4.5.13",
3
+ "version": "4.5.15",
4
4
  "description": "Multi-platform CLI and skill pack for agent coding",
5
5
  "main": "bin/cc-devflow.js",
6
6
  "bin": {
@@ -1,39 +0,0 @@
1
- /**
2
- * [INPUT]: 接收 runtime/query/compiler 边界抛出的错误或失败字段。
3
- * [OUTPUT]: 生成可序列化 named error,保留 refs 与 rescue action。
4
- * [POS]: skill runtime 的失败语义层,避免用 null/false/string 表达可恢复失败。
5
- * [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
6
- */
7
-
8
- class SkillRuntimeError extends Error {
9
- constructor(name, message, options = {}) {
10
- super(message);
11
- this.name = name;
12
- this.artifactRefs = options.artifactRefs || [];
13
- this.rescueAction = options.rescueAction || 'inspect-task-md-and-git-history';
14
- this.details = options.details || {};
15
- }
16
- }
17
-
18
- function namedError(name, message, options = {}) {
19
- return new SkillRuntimeError(name, message, options);
20
- }
21
-
22
- function serializeError(error, fallbackName = 'SkillRuntimeError') {
23
- const name = error?.name || fallbackName;
24
- const message = error?.message || String(error || 'Unknown runtime error');
25
-
26
- return {
27
- name,
28
- message,
29
- artifactRefs: error?.artifactRefs || [],
30
- rescueAction: error?.rescueAction || 'inspect-task-md-and-git-history',
31
- details: error?.details || {}
32
- };
33
- }
34
-
35
- module.exports = {
36
- SkillRuntimeError,
37
- namedError,
38
- serializeError
39
- };
@@ -1,101 +0,0 @@
1
- /**
2
- * [INPUT]: 接收 query id、repoRoot/changeId 与只读 handler registry。
3
- * [OUTPUT]: 返回 typed query result:ok/data 或 named error,并附 trace。
4
- * [POS]: skill runtime 的查询分发表,只读派生 task.md 与 Git 语义。
5
- * [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
6
- */
7
-
8
- const fs = require('fs');
9
-
10
- const { namedError, serializeError } = require('./errors');
11
- const { createTrace } = require('./trace');
12
-
13
- function resolveArtifactRefs(entry, context, key) {
14
- const refs = entry[key];
15
- return typeof refs === 'function' ? refs(context) : refs || [];
16
- }
17
-
18
- function createQueryRegistry(entries) {
19
- const registry = new Map(entries.map((entry) => [entry.id, entry]));
20
-
21
- function listQueryIds() {
22
- return [...registry.keys()].sort();
23
- }
24
-
25
- async function runQuery(queryId, context = {}) {
26
- const entry = registry.get(queryId);
27
-
28
- if (!entry) {
29
- const supported = listQueryIds();
30
- const error = namedError(
31
- 'UnknownQueryError',
32
- `Unknown query id: ${queryId}`,
33
- {
34
- rescueAction: `use one of: ${supported.join(', ')}`,
35
- details: { supported }
36
- }
37
- );
38
-
39
- return {
40
- ok: false,
41
- queryId,
42
- error: serializeError(error),
43
- trace: createTrace({
44
- event: 'query.unknown',
45
- changeId: context.changeId,
46
- nextAction: 'choose-supported-query'
47
- })
48
- };
49
- }
50
-
51
- let artifactRefs = [];
52
- try {
53
- artifactRefs = resolveArtifactRefs(entry, context, 'artifactRefs');
54
- const requiredArtifactRefs = resolveArtifactRefs(entry, context, 'requiredArtifactRefs');
55
- const missingRefs = requiredArtifactRefs.filter((ref) => !fs.existsSync(ref));
56
- if (missingRefs.length > 0) {
57
- throw namedError(
58
- 'MissingQueryArtifactError',
59
- `Missing required query artifact: ${missingRefs.join(', ')}`,
60
- {
61
- artifactRefs: missingRefs,
62
- rescueAction: 'create task.md before running this query'
63
- }
64
- );
65
- }
66
-
67
- return {
68
- ok: true,
69
- queryId,
70
- data: await entry.handler(context),
71
- trace: createTrace({
72
- event: `query.${queryId}`,
73
- changeId: context.changeId,
74
- artifactRefs,
75
- nextAction: entry.nextAction || 'read-query-result'
76
- })
77
- };
78
- } catch (error) {
79
- return {
80
- ok: false,
81
- queryId,
82
- error: serializeError(error),
83
- trace: createTrace({
84
- event: `query.${queryId}.failed`,
85
- changeId: context.changeId,
86
- artifactRefs,
87
- nextAction: error.rescueAction || 'inspect-task-md-and-git-history'
88
- })
89
- };
90
- }
91
- }
92
-
93
- return {
94
- listQueryIds,
95
- runQuery
96
- };
97
- }
98
-
99
- module.exports = {
100
- createQueryRegistry
101
- };