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.
Files changed (187) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +23 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +17 -269
  3. package/.claude/skills/cc-act/SKILL.md +38 -418
  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 +24 -0
  15. package/.claude/skills/cc-check/PLAYBOOK.md +19 -273
  16. package/.claude/skills/cc-check/SKILL.md +33 -454
  17. package/.claude/skills/cc-check/references/review-contract.md +12 -147
  18. package/.claude/skills/cc-dev/CHANGELOG.md +20 -0
  19. package/.claude/skills/cc-dev/PLAYBOOK.md +1 -1
  20. package/.claude/skills/cc-dev/SKILL.md +52 -130
  21. package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +181 -0
  22. package/.claude/skills/cc-do/CHANGELOG.md +17 -0
  23. package/.claude/skills/cc-do/PLAYBOOK.md +19 -113
  24. package/.claude/skills/cc-do/SKILL.md +39 -236
  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 +23 -0
  31. package/.claude/skills/cc-investigate/PLAYBOOK.md +20 -180
  32. package/.claude/skills/cc-investigate/SKILL.md +65 -513
  33. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +48 -95
  34. package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -217
  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 +29 -0
  39. package/.claude/skills/cc-plan/PLAYBOOK.md +22 -161
  40. package/.claude/skills/cc-plan/SKILL.md +47 -640
  41. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +30 -225
  42. package/.claude/skills/cc-plan/references/planning-contract.md +24 -160
  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 +27 -0
  65. package/README.md +5 -3
  66. package/README.zh-CN.md +5 -3
  67. package/bin/cc-devflow-cli.js +20 -260
  68. package/bin/cc-devflow.js +44 -7
  69. package/docs/commands/README.md +1 -1
  70. package/docs/commands/README.zh-CN.md +1 -1
  71. package/docs/examples/README.md +1 -1
  72. package/docs/examples/START-HERE.md +14 -14
  73. package/docs/examples/example-bindings.json +11 -11
  74. package/docs/examples/full-design-blocked/README.md +4 -6
  75. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/{planning/tasks.md → task.md} +20 -15
  76. package/docs/examples/local-handoff/README.md +8 -11
  77. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/pr-brief.md +31 -0
  78. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/{planning/tasks.md → task.md} +18 -13
  79. package/docs/examples/pdca-loop/README.md +6 -9
  80. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +9 -11
  81. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/{planning/tasks.md → task.md} +18 -13
  82. package/docs/examples/scripts/check-example-bindings.sh +11 -62
  83. package/docs/guides/artifact-contract.md +10 -36
  84. package/docs/guides/getting-started.md +8 -7
  85. package/docs/guides/getting-started.zh-CN.md +8 -7
  86. package/docs/guides/minimize-artifacts.md +16 -116
  87. package/docs/guides/project-postmortem.md +14 -71
  88. package/lib/compiler/__tests__/skills-registry.test.js +9 -8
  89. package/lib/compiler/resource-copier.js +29 -0
  90. package/lib/skill-runtime/__tests__/archive-change.test.js +2 -2
  91. package/lib/skill-runtime/__tests__/benchmark-skills.test.js +109 -0
  92. package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +14 -4
  93. package/lib/skill-runtime/errors.js +3 -3
  94. package/lib/skill-runtime/index.js +5 -23
  95. package/lib/skill-runtime/paths.js +5 -52
  96. package/lib/skill-runtime/query-registry.js +4 -4
  97. package/lib/skill-runtime/query.js +89 -201
  98. package/lib/skill-runtime/store.js +4 -40
  99. package/lib/skill-runtime/trace.js +2 -2
  100. package/package.json +5 -7
  101. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +0 -29
  102. package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +0 -54
  103. package/.claude/skills/cc-act/scripts/generate-status-report.sh +0 -92
  104. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +0 -355
  105. package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +0 -234
  106. package/.claude/skills/cc-check/scripts/render-report-card.js +0 -438
  107. package/.claude/skills/cc-check/scripts/verify-gate.sh +0 -85
  108. package/.claude/skills/cc-do/scripts/build-task-context.sh +0 -175
  109. package/.claude/skills/cc-do/scripts/record-review-decision.sh +0 -88
  110. package/.claude/skills/cc-do/scripts/recover-workflow.sh +0 -82
  111. package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +0 -70
  112. package/.claude/skills/cc-do/scripts/verify-task-gates.sh +0 -109
  113. package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +0 -92
  114. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +0 -225
  115. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +0 -179
  116. package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +0 -28
  117. package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +0 -45
  118. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +0 -234
  119. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +0 -488
  120. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +0 -189
  121. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +0 -39
  122. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +0 -29
  123. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +0 -123
  124. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +0 -292
  125. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +0 -136
  126. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +0 -29
  127. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +0 -124
  128. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +0 -292
  129. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +0 -136
  130. package/docs/get-shit-done-strategy-audit.md +0 -518
  131. package/docs/skill-runtime-migration.md +0 -46
  132. package/lib/skill-runtime/__tests__/approve.test.js +0 -92
  133. package/lib/skill-runtime/__tests__/autopilot.test.js +0 -253
  134. package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +0 -165
  135. package/lib/skill-runtime/__tests__/delegation.test.js +0 -97
  136. package/lib/skill-runtime/__tests__/dispatch.test.js +0 -237
  137. package/lib/skill-runtime/__tests__/intent.test.js +0 -203
  138. package/lib/skill-runtime/__tests__/lifecycle.test.js +0 -169
  139. package/lib/skill-runtime/__tests__/planner.tdd.test.js +0 -331
  140. package/lib/skill-runtime/__tests__/prepare-pr.test.js +0 -126
  141. package/lib/skill-runtime/__tests__/query.test.js +0 -860
  142. package/lib/skill-runtime/__tests__/readiness.test.js +0 -53
  143. package/lib/skill-runtime/__tests__/release.test.js +0 -85
  144. package/lib/skill-runtime/__tests__/review-check-integration.test.js +0 -148
  145. package/lib/skill-runtime/__tests__/review-records.test.js +0 -619
  146. package/lib/skill-runtime/__tests__/runtime.integration.test.js +0 -351
  147. package/lib/skill-runtime/__tests__/schemas.test.js +0 -337
  148. package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +0 -137
  149. package/lib/skill-runtime/__tests__/task-contract.test.js +0 -783
  150. package/lib/skill-runtime/__tests__/team-state.test.js +0 -51
  151. package/lib/skill-runtime/__tests__/verify-artifacts.test.js +0 -203
  152. package/lib/skill-runtime/__tests__/worker-run.test.js +0 -275
  153. package/lib/skill-runtime/__tests__/worker.test.js +0 -56
  154. package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +0 -31
  155. package/lib/skill-runtime/__tests__/workflow-context.test.js +0 -98
  156. package/lib/skill-runtime/artifacts.js +0 -88
  157. package/lib/skill-runtime/context-index.js +0 -545
  158. package/lib/skill-runtime/delegation.js +0 -533
  159. package/lib/skill-runtime/intent.js +0 -309
  160. package/lib/skill-runtime/lifecycle.js +0 -294
  161. package/lib/skill-runtime/operations/CLAUDE.md +0 -19
  162. package/lib/skill-runtime/operations/approve.js +0 -81
  163. package/lib/skill-runtime/operations/autopilot-core.js +0 -337
  164. package/lib/skill-runtime/operations/autopilot-execution.js +0 -307
  165. package/lib/skill-runtime/operations/autopilot-shared.js +0 -48
  166. package/lib/skill-runtime/operations/autopilot.js +0 -163
  167. package/lib/skill-runtime/operations/dispatch.js +0 -416
  168. package/lib/skill-runtime/operations/init.js +0 -60
  169. package/lib/skill-runtime/operations/janitor.js +0 -61
  170. package/lib/skill-runtime/operations/plan.js +0 -59
  171. package/lib/skill-runtime/operations/prepare-pr.js +0 -25
  172. package/lib/skill-runtime/operations/release.js +0 -99
  173. package/lib/skill-runtime/operations/resume.js +0 -126
  174. package/lib/skill-runtime/operations/review-records.js +0 -265
  175. package/lib/skill-runtime/operations/snapshot.js +0 -45
  176. package/lib/skill-runtime/operations/task-contract.js +0 -524
  177. package/lib/skill-runtime/operations/verify.js +0 -170
  178. package/lib/skill-runtime/operations/worker-run.js +0 -531
  179. package/lib/skill-runtime/operations/worker.js +0 -33
  180. package/lib/skill-runtime/planner.js +0 -539
  181. package/lib/skill-runtime/readiness.js +0 -84
  182. package/lib/skill-runtime/review-records.js +0 -123
  183. package/lib/skill-runtime/review.js +0 -855
  184. package/lib/skill-runtime/schemas.js +0 -746
  185. package/lib/skill-runtime/task-contract.js +0 -187
  186. package/lib/skill-runtime/team-state.js +0 -122
  187. 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
- };