cc-devflow 4.5.11 → 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.
Files changed (185) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +18 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +17 -269
  3. package/.claude/skills/cc-act/SKILL.md +38 -425
  4. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +2 -13
  5. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +1 -9
  6. package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +21 -177
  7. package/.claude/skills/cc-act/references/closure-contract.md +12 -63
  8. package/.claude/skills/cc-act/references/git-commit-guidelines.md +5 -5
  9. package/.claude/skills/cc-act/scripts/cc-act-common.sh +5 -322
  10. package/.claude/skills/cc-act/scripts/detect-ship-target.sh +11 -2
  11. package/.claude/skills/cc-act/scripts/inspect-git-index.sh +58 -0
  12. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +40 -440
  13. package/.claude/skills/cc-act/scripts/verify-act-gate.sh +10 -50
  14. package/.claude/skills/cc-check/CHANGELOG.md +18 -0
  15. package/.claude/skills/cc-check/PLAYBOOK.md +19 -273
  16. package/.claude/skills/cc-check/SKILL.md +33 -456
  17. package/.claude/skills/cc-check/references/review-contract.md +12 -147
  18. package/.claude/skills/cc-dev/CHANGELOG.md +15 -0
  19. package/.claude/skills/cc-dev/PLAYBOOK.md +1 -1
  20. package/.claude/skills/cc-dev/SKILL.md +52 -137
  21. package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +181 -0
  22. package/.claude/skills/cc-do/CHANGELOG.md +11 -0
  23. package/.claude/skills/cc-do/PLAYBOOK.md +19 -113
  24. package/.claude/skills/cc-do/SKILL.md +39 -245
  25. package/.claude/skills/cc-do/references/execution-recovery.md +15 -109
  26. package/.claude/skills/cc-do/scripts/cc-do-common.sh +5 -57
  27. package/.claude/skills/cc-do/scripts/check-task-status.sh +35 -65
  28. package/.claude/skills/cc-do/scripts/mark-task-complete.sh +9 -46
  29. package/.claude/skills/cc-do/scripts/select-ready-tasks.sh +29 -97
  30. package/.claude/skills/cc-investigate/CHANGELOG.md +16 -0
  31. package/.claude/skills/cc-investigate/PLAYBOOK.md +20 -180
  32. package/.claude/skills/cc-investigate/SKILL.md +64 -246
  33. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +48 -98
  34. package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -218
  35. package/.claude/skills/cc-next/CHANGELOG.md +6 -0
  36. package/.claude/skills/cc-next/PLAYBOOK.md +12 -8
  37. package/.claude/skills/cc-next/SKILL.md +34 -140
  38. package/.claude/skills/cc-plan/CHANGELOG.md +16 -0
  39. package/.claude/skills/cc-plan/PLAYBOOK.md +22 -161
  40. package/.claude/skills/cc-plan/SKILL.md +45 -295
  41. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +30 -228
  42. package/.claude/skills/cc-plan/references/planning-contract.md +24 -161
  43. package/.claude/skills/cc-plan/scripts/next-change-key.sh +8 -44
  44. package/.claude/skills/cc-plan/scripts/parse-task-dependencies.js +2 -2
  45. package/.claude/skills/cc-plan/scripts/validate-scope.sh +1 -1
  46. package/.claude/skills/cc-pr-land/SKILL.md +14 -114
  47. package/.claude/skills/cc-pr-review/CHANGELOG.md +4 -0
  48. package/.claude/skills/cc-pr-review/SKILL.md +20 -103
  49. package/.claude/skills/cc-review/CHANGELOG.md +17 -0
  50. package/.claude/skills/cc-review/PLAYBOOK.md +13 -86
  51. package/.claude/skills/cc-review/SKILL.md +53 -241
  52. package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +2 -2
  53. package/.claude/skills/cc-review/references/implementation-review-branch.md +7 -147
  54. package/.claude/skills/cc-review/references/plan-review-branch.md +5 -147
  55. package/.claude/skills/cc-review/references/review-methods.md +10 -218
  56. package/.claude/skills/cc-review/scripts/collect-review-context.sh +4 -63
  57. package/.claude/skills/cc-roadmap/PLAYBOOK.md +1 -1
  58. package/.claude/skills/cc-roadmap/SKILL.md +3 -3
  59. package/.claude/skills/cc-simplify/CHANGELOG.md +7 -0
  60. package/.claude/skills/cc-simplify/SKILL.md +26 -21
  61. package/.claude/skills/cc-spec-init/PLAYBOOK.md +12 -48
  62. package/.claude/skills/cc-spec-init/SKILL.md +29 -132
  63. package/.claude/skills/cc-spec-init/references/spec-contract.md +8 -17
  64. package/CHANGELOG.md +13 -0
  65. package/bin/cc-devflow-cli.js +20 -260
  66. package/bin/cc-devflow.js +44 -7
  67. package/docs/commands/README.md +1 -1
  68. package/docs/commands/README.zh-CN.md +1 -1
  69. package/docs/examples/README.md +1 -1
  70. package/docs/examples/START-HERE.md +14 -15
  71. package/docs/examples/example-bindings.json +11 -11
  72. package/docs/examples/full-design-blocked/README.md +4 -6
  73. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/{planning/tasks.md → task.md} +20 -15
  74. package/docs/examples/local-handoff/README.md +8 -11
  75. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/pr-brief.md +31 -0
  76. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/{planning/tasks.md → task.md} +18 -13
  77. package/docs/examples/pdca-loop/README.md +6 -9
  78. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +9 -11
  79. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/{planning/tasks.md → task.md} +18 -13
  80. package/docs/examples/scripts/check-example-bindings.sh +11 -62
  81. package/docs/guides/artifact-contract.md +10 -40
  82. package/docs/guides/getting-started.md +8 -8
  83. package/docs/guides/getting-started.zh-CN.md +8 -8
  84. package/docs/guides/minimize-artifacts.md +16 -130
  85. package/docs/guides/project-postmortem.md +14 -71
  86. package/lib/compiler/__tests__/skills-registry.test.js +9 -8
  87. package/lib/compiler/resource-copier.js +29 -0
  88. package/lib/skill-runtime/__tests__/archive-change.test.js +2 -2
  89. package/lib/skill-runtime/__tests__/benchmark-skills.test.js +3 -3
  90. package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +14 -4
  91. package/lib/skill-runtime/errors.js +3 -3
  92. package/lib/skill-runtime/index.js +5 -23
  93. package/lib/skill-runtime/paths.js +5 -52
  94. package/lib/skill-runtime/query-registry.js +4 -4
  95. package/lib/skill-runtime/query.js +89 -201
  96. package/lib/skill-runtime/store.js +4 -40
  97. package/lib/skill-runtime/trace.js +2 -2
  98. package/package.json +2 -5
  99. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +0 -29
  100. package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +0 -54
  101. package/.claude/skills/cc-act/scripts/generate-status-report.sh +0 -92
  102. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +0 -355
  103. package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +0 -234
  104. package/.claude/skills/cc-check/scripts/render-report-card.js +0 -438
  105. package/.claude/skills/cc-check/scripts/verify-gate.sh +0 -85
  106. package/.claude/skills/cc-do/scripts/build-task-context.sh +0 -175
  107. package/.claude/skills/cc-do/scripts/record-review-decision.sh +0 -88
  108. package/.claude/skills/cc-do/scripts/recover-workflow.sh +0 -82
  109. package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +0 -70
  110. package/.claude/skills/cc-do/scripts/verify-task-gates.sh +0 -109
  111. package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +0 -92
  112. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +0 -224
  113. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +0 -178
  114. package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +0 -28
  115. package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +0 -45
  116. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +0 -234
  117. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +0 -488
  118. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +0 -189
  119. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +0 -39
  120. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +0 -29
  121. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +0 -123
  122. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +0 -292
  123. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +0 -136
  124. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +0 -29
  125. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +0 -124
  126. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +0 -292
  127. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +0 -136
  128. package/docs/get-shit-done-strategy-audit.md +0 -518
  129. package/docs/skill-runtime-migration.md +0 -46
  130. package/lib/skill-runtime/__tests__/approve.test.js +0 -92
  131. package/lib/skill-runtime/__tests__/autopilot.test.js +0 -253
  132. package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +0 -165
  133. package/lib/skill-runtime/__tests__/delegation.test.js +0 -97
  134. package/lib/skill-runtime/__tests__/dispatch.test.js +0 -237
  135. package/lib/skill-runtime/__tests__/intent.test.js +0 -203
  136. package/lib/skill-runtime/__tests__/lifecycle.test.js +0 -169
  137. package/lib/skill-runtime/__tests__/planner.tdd.test.js +0 -331
  138. package/lib/skill-runtime/__tests__/prepare-pr.test.js +0 -126
  139. package/lib/skill-runtime/__tests__/query.test.js +0 -860
  140. package/lib/skill-runtime/__tests__/readiness.test.js +0 -53
  141. package/lib/skill-runtime/__tests__/release.test.js +0 -85
  142. package/lib/skill-runtime/__tests__/review-check-integration.test.js +0 -148
  143. package/lib/skill-runtime/__tests__/review-records.test.js +0 -619
  144. package/lib/skill-runtime/__tests__/runtime.integration.test.js +0 -351
  145. package/lib/skill-runtime/__tests__/schemas.test.js +0 -337
  146. package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +0 -137
  147. package/lib/skill-runtime/__tests__/task-contract.test.js +0 -874
  148. package/lib/skill-runtime/__tests__/team-state.test.js +0 -51
  149. package/lib/skill-runtime/__tests__/verify-artifacts.test.js +0 -203
  150. package/lib/skill-runtime/__tests__/worker-run.test.js +0 -275
  151. package/lib/skill-runtime/__tests__/worker.test.js +0 -56
  152. package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +0 -31
  153. package/lib/skill-runtime/__tests__/workflow-context.test.js +0 -98
  154. package/lib/skill-runtime/artifacts.js +0 -88
  155. package/lib/skill-runtime/context-index.js +0 -545
  156. package/lib/skill-runtime/delegation.js +0 -533
  157. package/lib/skill-runtime/intent.js +0 -309
  158. package/lib/skill-runtime/lifecycle.js +0 -294
  159. package/lib/skill-runtime/operations/CLAUDE.md +0 -19
  160. package/lib/skill-runtime/operations/approve.js +0 -81
  161. package/lib/skill-runtime/operations/autopilot-core.js +0 -337
  162. package/lib/skill-runtime/operations/autopilot-execution.js +0 -307
  163. package/lib/skill-runtime/operations/autopilot-shared.js +0 -48
  164. package/lib/skill-runtime/operations/autopilot.js +0 -163
  165. package/lib/skill-runtime/operations/dispatch.js +0 -416
  166. package/lib/skill-runtime/operations/init.js +0 -60
  167. package/lib/skill-runtime/operations/janitor.js +0 -61
  168. package/lib/skill-runtime/operations/plan.js +0 -59
  169. package/lib/skill-runtime/operations/prepare-pr.js +0 -25
  170. package/lib/skill-runtime/operations/release.js +0 -99
  171. package/lib/skill-runtime/operations/resume.js +0 -126
  172. package/lib/skill-runtime/operations/review-records.js +0 -265
  173. package/lib/skill-runtime/operations/snapshot.js +0 -45
  174. package/lib/skill-runtime/operations/task-contract.js +0 -593
  175. package/lib/skill-runtime/operations/verify.js +0 -170
  176. package/lib/skill-runtime/operations/worker-run.js +0 -531
  177. package/lib/skill-runtime/operations/worker.js +0 -33
  178. package/lib/skill-runtime/planner.js +0 -539
  179. package/lib/skill-runtime/readiness.js +0 -84
  180. package/lib/skill-runtime/review-records.js +0 -123
  181. package/lib/skill-runtime/review.js +0 -855
  182. package/lib/skill-runtime/schemas.js +0 -746
  183. package/lib/skill-runtime/task-contract.js +0 -188
  184. package/lib/skill-runtime/team-state.js +0 -122
  185. package/lib/skill-runtime/workflow-context.js +0 -748
@@ -1,98 +0,0 @@
1
- /**
2
- * [INPUT]: 依赖 getWorkflowContext 查询 seam、真实临时 workflow artifacts。
3
- * [OUTPUT]: 验证 workflow-context 对新 tasks.md contract refs 的默认打开顺序。
4
- * [POS]: REQ-003-minimize-workflow-artifacts T009 的 Red/Green 证据。
5
- * [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
6
- */
7
-
8
- const fs = require('fs');
9
- const os = require('os');
10
- const path = require('path');
11
-
12
- const { getWorkflowContext } = require('../query');
13
- const { getTaskManifestPath } = require('../store');
14
-
15
- function writeJson(filePath, value) {
16
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
17
- fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`);
18
- }
19
-
20
- describe('workflow-context contract refs', () => {
21
- test.each([
22
- ['REQ-130', '## Contract Summary', 'contract-summary', 'PDCA'],
23
- ['FIX-130', '## Root Cause Contract', 'root-cause-contract', 'IDCA']
24
- ])('primary ref is tasks.md#%s for a new change', async (
25
- changeId,
26
- contractHeading,
27
- fragment,
28
- route
29
- ) => {
30
- const repoRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'cc-devflow-workflow-context-'));
31
- const manifestPath = getTaskManifestPath(repoRoot, changeId);
32
- const planningDir = path.dirname(manifestPath);
33
- const relativeTasksPath = path.relative(repoRoot, path.join(planningDir, 'tasks.md'));
34
-
35
- fs.mkdirSync(planningDir, { recursive: true });
36
- fs.writeFileSync(
37
- path.join(planningDir, 'tasks.md'),
38
- [
39
- '# TASKS',
40
- '',
41
- contractHeading,
42
- '',
43
- `Change: ${changeId}`,
44
- 'Mode: plan',
45
- 'Profile: standard',
46
- contractHeading.includes('Root Cause') ? 'Diagnosis: Keep root-cause truth in tasks.md.' : 'Approval: approved',
47
- '',
48
- '## Phase 1: Execute',
49
- '',
50
- '- [ ] T001 Execute new contract'
51
- ].join('\n')
52
- );
53
- writeJson(manifestPath, {
54
- changeId,
55
- goal: 'Expose new contract refs',
56
- createdAt: '2026-05-12T01:00:00.000Z',
57
- updatedAt: '2026-05-12T01:05:00.000Z',
58
- currentTaskId: 'T001',
59
- tasks: [
60
- {
61
- id: 'T001',
62
- title: 'Execute new contract',
63
- type: 'OTHER',
64
- phase: 1,
65
- dependsOn: [],
66
- run: ['npm test -- lib/skill-runtime/__tests__/workflow-context.test.js'],
67
- verification: ['npm test -- lib/skill-runtime/__tests__/workflow-context.test.js'],
68
- context: {
69
- readFiles: ['tasks.md'],
70
- commands: ['npm test -- lib/skill-runtime/__tests__/workflow-context.test.js'],
71
- notes: []
72
- },
73
- status: 'pending',
74
- attempts: 0,
75
- maxRetries: 1
76
- }
77
- ],
78
- metadata: {
79
- source: 'tasks.md',
80
- generatedBy: 'test',
81
- planVersion: 1
82
- }
83
- });
84
-
85
- const context = await getWorkflowContext(repoRoot, changeId);
86
-
87
- expect(context.route).toBe(route);
88
- expect(context.legacyFallback).toBe(false);
89
- expect(context.source.contract.path).toBe(relativeTasksPath);
90
- expect(context.progressiveDisclosure.defaultOpen[0]).toEqual(expect.objectContaining({
91
- ref: `${relativeTasksPath}#${fragment}`,
92
- exists: true,
93
- reason: 'primary task contract'
94
- }));
95
-
96
- fs.rmSync(repoRoot, { recursive: true, force: true });
97
- });
98
- });
@@ -1,88 +0,0 @@
1
- /**
2
- * [INPUT]: 依赖 store 的目录创建能力,接收 repoRoot/goalId/taskId 等工件定位参数。
3
- * [OUTPUT]: 对外提供 intent artifact 的路径约定与脚手架创建能力,不夹带阶段语义或下一步建议。
4
- * [POS]: skill runtime 的纯 artifact 定位层,把路径世界与流程叙事从 intent.js 中拆开。
5
- * [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
6
- */
7
-
8
- const { ensureDir, getReleaseNotePath } = require('./store');
9
- const { getChangePaths, getTaskPaths } = require('./paths');
10
-
11
- function getIntentDir(repoRoot, goalId, options = {}) {
12
- return getChangePaths(repoRoot, goalId, options).changeDir;
13
- }
14
-
15
- function getIntentArtifactsDir(repoRoot, goalId, options = {}) {
16
- return getChangePaths(repoRoot, goalId, options).executionDir;
17
- }
18
-
19
- function getIntentResumeIndexPath(repoRoot, goalId, options = {}) {
20
- return `${getChangePaths(repoRoot, goalId, options).handoffDir}/resume-index.md`;
21
- }
22
-
23
- function getIntentPrBriefPath(repoRoot, goalId, options = {}) {
24
- return `${getChangePaths(repoRoot, goalId, options).handoffDir}/pr-brief.md`;
25
- }
26
-
27
- function getIntentStatusPath(repoRoot, goalId, options = {}) {
28
- return `${getChangePaths(repoRoot, goalId, options).handoffDir}/status.md`;
29
- }
30
-
31
- function getIntentHandoffArtifactPaths(repoRoot, goalId, options = {}) {
32
- return [
33
- getIntentPrBriefPath(repoRoot, goalId, options),
34
- getIntentResumeIndexPath(repoRoot, goalId, options),
35
- getReleaseNotePath(repoRoot, goalId, options),
36
- getIntentStatusPath(repoRoot, goalId, options)
37
- ];
38
- }
39
-
40
- function getLegacyIntentProjectionPaths(repoRoot, goalId, taskIds = [], options = {}) {
41
- const change = getChangePaths(repoRoot, goalId, options);
42
- const taskFiles = taskIds.flatMap((taskId) => {
43
- const task = getTaskPaths(repoRoot, goalId, taskId, options);
44
- return [
45
- `${task.taskDir}/brief.md`,
46
- `${task.taskDir}/checkpoint.md`,
47
- `${task.taskDir}/result.md`,
48
- `${task.taskDir}/review-spec.md`,
49
- `${task.taskDir}/review-code.md`
50
- ];
51
- });
52
-
53
- return [
54
- `${change.metaDir}/index.json`,
55
- `${change.planningDir}/planning-snapshot.md`,
56
- `${change.planningDir}/facts.md`,
57
- `${change.planningDir}/decision-log.md`,
58
- `${change.planningDir}/plan.md`,
59
- `${change.executionDir}/team-memory.md`,
60
- `${change.executionDir}/message-bus.md`,
61
- `${change.executionDir}/delegation-map.md`,
62
- getIntentStatusPath(repoRoot, goalId, options),
63
- ...taskFiles
64
- ];
65
- }
66
-
67
- async function ensureIntentScaffold(repoRoot, goalId, options = {}) {
68
- const change = getChangePaths(repoRoot, goalId, options);
69
-
70
- await ensureDir(change.changeDir);
71
- await ensureDir(change.metaDir);
72
- await ensureDir(change.planningDir);
73
- await ensureDir(change.executionDir);
74
- await ensureDir(change.tasksDir);
75
- await ensureDir(change.reviewDir);
76
- await ensureDir(change.handoffDir);
77
- }
78
-
79
- module.exports = {
80
- getIntentDir,
81
- getIntentArtifactsDir,
82
- getIntentResumeIndexPath,
83
- getIntentPrBriefPath,
84
- getIntentStatusPath,
85
- getIntentHandoffArtifactPaths,
86
- getLegacyIntentProjectionPaths,
87
- ensureIntentScaffold
88
- };