cc-codeconductor 1.6.1 → 1.7.0

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 (118) hide show
  1. package/README.md +22 -7
  2. package/dist/core/compilation/compile-checker.d.ts +3 -2
  3. package/dist/core/goal/goal-state.d.ts +1 -0
  4. package/dist/core/orchestrator/runtime-orchestrator.d.ts +1 -0
  5. package/dist/core/queue/lock.d.ts +3 -0
  6. package/dist/core/verification/rdd-receipt.d.ts +6 -0
  7. package/dist/core/verification/verification-runner.d.ts +11 -2
  8. package/dist/index.js +1217 -596
  9. package/dist/library.js +391 -140
  10. package/dist/validation/schemas.d.ts +65 -26
  11. package/docs/generated/cli.md +8 -0
  12. package/package.json +1 -1
  13. package/presets/agy/AGENTS.md +1 -1
  14. package/presets/agy/scripts/invoke-hook.cjs +43 -24
  15. package/presets/agy/skills/backlog/SKILL.md +1 -1
  16. package/presets/agy/skills/cc-spec-mutation/SKILL.md +1 -1
  17. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +1 -1
  18. package/presets/agy/skills/evaluation/SKILL.md +1 -1
  19. package/presets/agy/skills/openspec/SKILL.md +10 -6
  20. package/presets/agy/skills/testing-tdd/SKILL.md +3 -3
  21. package/presets/agy/workflows/cc-api-contract.md +1 -1
  22. package/presets/agy/workflows/cc-ask.md +2 -2
  23. package/presets/agy/workflows/cc-db-migration.md +1 -1
  24. package/presets/agy/workflows/cc-feature.md +1 -1
  25. package/presets/agy/workflows/cc-fix.md +1 -1
  26. package/presets/agy/workflows/cc-iterative.md +1 -1
  27. package/presets/agy/workflows/cc-odd.md +2 -2
  28. package/presets/agy/workflows/cc-openspec.md +1 -1
  29. package/presets/agy/workflows/cc-spec-mutation.md +2 -2
  30. package/presets/agy/workflows/cc-tdd-cycle.md +2 -2
  31. package/presets/claude/CLAUDE.md +1 -1
  32. package/presets/claude/commands/cc/api-contract.md +1 -1
  33. package/presets/claude/commands/cc/ask.md +2 -2
  34. package/presets/claude/commands/cc/db-migration.md +1 -1
  35. package/presets/claude/commands/cc/feature.md +1 -1
  36. package/presets/claude/commands/cc/fix.md +1 -1
  37. package/presets/claude/commands/cc/iterative.md +1 -1
  38. package/presets/claude/commands/cc/odd.md +2 -2
  39. package/presets/claude/commands/cc/openspec.md +5 -5
  40. package/presets/claude/commands/cc/spec-mutation.md +2 -2
  41. package/presets/claude/commands/cc/tdd-cycle.md +3 -3
  42. package/presets/claude/settings.json +6 -101
  43. package/presets/claude/skills/backlog/SKILL.md +1 -1
  44. package/presets/claude/skills/evaluation/SKILL.md +1 -1
  45. package/presets/claude/skills/openspec/SKILL.md +10 -6
  46. package/presets/claude/skills/testing-tdd/SKILL.md +3 -3
  47. package/presets/codex/AGENTS.md +1 -1
  48. package/presets/codex/commands/cc-ask.md +2 -2
  49. package/presets/codex/skills/backlog/SKILL.md +1 -1
  50. package/presets/codex/skills/cc-api-contract/SKILL.md +1 -1
  51. package/presets/codex/skills/cc-db-migration/SKILL.md +1 -1
  52. package/presets/codex/skills/cc-feature/SKILL.md +1 -1
  53. package/presets/codex/skills/cc-fix/SKILL.md +1 -1
  54. package/presets/codex/skills/cc-iterative/SKILL.md +1 -1
  55. package/presets/codex/skills/cc-odd/SKILL.md +2 -2
  56. package/presets/codex/skills/cc-openspec/SKILL.md +10 -8
  57. package/presets/codex/skills/cc-spec-mutation/SKILL.md +2 -2
  58. package/presets/codex/skills/cc-tdd-cycle/SKILL.md +2 -2
  59. package/presets/codex/skills/django-testing/SKILL.md +1 -1
  60. package/presets/codex/skills/evaluation/SKILL.md +1 -1
  61. package/presets/codex/skills/openspec/SKILL.md +10 -6
  62. package/presets/codex/skills/python-django-stack/SKILL.md +1 -1
  63. package/presets/codex/skills/testing-tdd/SKILL.md +3 -3
  64. package/presets/cursor/AGENTS.md +1 -1
  65. package/presets/cursor/commands/cc/api-contract.md +1 -1
  66. package/presets/cursor/commands/cc/ask.md +2 -2
  67. package/presets/cursor/commands/cc/db-migration.md +1 -1
  68. package/presets/cursor/commands/cc/feature.md +1 -1
  69. package/presets/cursor/commands/cc/fix.md +1 -1
  70. package/presets/cursor/commands/cc/iterative.md +1 -1
  71. package/presets/cursor/commands/cc/odd.md +2 -2
  72. package/presets/cursor/commands/cc/openspec.md +10 -8
  73. package/presets/cursor/commands/cc/spec-mutation.md +2 -2
  74. package/presets/cursor/commands/cc/tdd-cycle.md +2 -2
  75. package/presets/cursor/skills/backlog/SKILL.md +1 -1
  76. package/presets/cursor/skills/evaluation/SKILL.md +1 -1
  77. package/presets/cursor/skills/openspec/SKILL.md +10 -6
  78. package/presets/cursor/skills/testing-tdd/SKILL.md +3 -3
  79. package/presets/gemini/GEMINI.md +1 -1
  80. package/presets/gemini/commands/cc/api-contract.toml +1 -1
  81. package/presets/gemini/commands/cc/ask.toml +2 -2
  82. package/presets/gemini/commands/cc/db-migration.toml +1 -1
  83. package/presets/gemini/commands/cc/feature.toml +1 -1
  84. package/presets/gemini/commands/cc/fix.toml +1 -1
  85. package/presets/gemini/commands/cc/iterative.toml +1 -1
  86. package/presets/gemini/commands/cc/odd.toml +2 -2
  87. package/presets/gemini/commands/cc/openspec.toml +10 -8
  88. package/presets/gemini/commands/cc/spec-mutation.toml +2 -2
  89. package/presets/gemini/commands/cc/tdd-cycle.toml +2 -2
  90. package/presets/muse/AGENTS.md +1 -1
  91. package/presets/opencode/agents/implementer.md +1 -1
  92. package/presets/opencode/agents/tester.md +1 -1
  93. package/presets/opencode/commands/cc-api-contract.md +1 -1
  94. package/presets/opencode/commands/cc-ask.md +2 -2
  95. package/presets/opencode/commands/cc-db-migration.md +1 -1
  96. package/presets/opencode/commands/cc-feature.md +1 -1
  97. package/presets/opencode/commands/cc-fix.md +1 -1
  98. package/presets/opencode/commands/cc-iterative.md +1 -1
  99. package/presets/opencode/commands/cc-odd.md +2 -2
  100. package/presets/opencode/commands/cc-openspec.md +2 -2
  101. package/presets/opencode/commands/cc-spec-mutation.md +2 -2
  102. package/presets/opencode/commands/cc-tdd-cycle.md +2 -2
  103. package/presets/opencode/prompts/v1.0.0/implementer.md +1 -1
  104. package/presets/opencode/prompts/v1.0.0/tester.md +1 -1
  105. package/presets/opencode/skills/backlog/SKILL.md +1 -1
  106. package/presets/opencode/skills/django-testing/SKILL.md +1 -0
  107. package/presets/opencode/skills/evaluation/SKILL.md +1 -1
  108. package/presets/opencode/skills/openspec/SKILL.md +10 -6
  109. package/presets/opencode/skills/python-django-stack/SKILL.md +1 -0
  110. package/presets/opencode/skills/python-fastapi-stack/SKILL.md +1 -0
  111. package/presets/opencode/skills/spring-boot-kotlin/SKILL.md +1 -0
  112. package/presets/opencode/skills/sqlalchemy/SKILL.md +1 -0
  113. package/presets/opencode/skills/testing-tdd/SKILL.md +3 -3
  114. package/presets/pi/AGENTS.md +1 -1
  115. package/presets/shared/invoke-hook.cjs +43 -24
  116. package/src/presets/manifests/claude.yml +1 -1
  117. package/src/presets/shared-skills.yml +30 -0
  118. package/src/presets/targets/pi.yml +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Stop prompting. Start orchestrating.**
4
4
 
5
- [![Socket Badge](https://badge.socket.dev/npm/package/cc-codeconductor/1.6.1)](https://badge.socket.dev/npm/package/cc-codeconductor/1.6.1)
5
+ [![Socket Badge](https://badge.socket.dev/npm/package/cc-codeconductor/1.7.0)](https://badge.socket.dev/npm/package/cc-codeconductor/1.7.0)
6
6
 
7
7
  CodeConductor is an open-source framework for building structured, reproducible
8
8
  AI-assisted software engineering workflows.
@@ -15,12 +15,19 @@ contracts, task cards, and risk-based routing.
15
15
  >
16
16
  > ## Current Scope
17
17
  >
18
- > Published package is **1.6.1** (current stable line: **1.6.x**). Limitations
18
+ > Published package is **1.7.0** (current stable line: **1.7.x**). Limitations
19
19
  > matrix:
20
20
  > [docs/current-status.md](docs/current-status.md). This repository:
21
21
  > `bun run dev …` (not `npx`) while iterating.
22
22
  >
23
- > Shipped in the 1.6.x stable line:
23
+ > Changes after v1.6.1 are implemented, unreleased: runner-captured TDD,
24
+ > persistent RED validation, OpenSpec completion fixes, shared skills,
25
+ > safer hooks and Claude installation, atomic Goal DAG claims, native delta
26
+ > specs, and scorecards that preserve unmeasured signals. See the
27
+ > [post-v1.6.1 guide](docs/post-v1.6.1.md) for the exact commit range and
28
+ > upgrade steps.
29
+ >
30
+ > Shipped in the 1.7.x stable line:
24
31
  >
25
32
  > - `npx cc-codeconductor setup --target <target> --yes` — onboarding flow
26
33
  > - `npx cc-codeconductor init` — detects project stack, writes
@@ -188,6 +195,13 @@ Agent phases: validate-backlog → discover → design → **test** → implemen
188
195
  review. Test-before-implement is required whenever both phases apply.
189
196
  `/cc-tdd-cycle` enforces Red → Green → Refactor (`tester` then `implementer`).
190
197
 
198
+ In the unreleased checkout, `tdd capture` runs and records RED/GREEN suites.
199
+ When `BACKLOG.md` Global requires TDD, closing a test card validates and persists
200
+ RED before implementation changes the candidate; GREEN must still match the
201
+ current candidate. `done` preserves
202
+ agent edits in `tasks.md`, and `archive` gates unchecked boxes. See
203
+ [the delivery and evidence guide](docs/post-v1.6.1.md#entrega-openspec-y-evidencia-tdd).
204
+
191
205
  ### Receipt-Driven Development
192
206
 
193
207
  RDD binds local verification evidence to the exact code, tests, contracts,
@@ -325,14 +339,14 @@ Task Card → Risk Classification → Routing Policy → Conductor Agent → Del
325
339
 
326
340
  ## Supply chain
327
341
 
328
- Published **1.6.1** declares two production dependencies (`package.json`
342
+ Published **1.7.0** declares two production dependencies (`package.json`
329
343
  `dependencies`; same on
330
344
  [npm](https://www.npmjs.com/package/cc-codeconductor)). Neither has further
331
345
  npm transitive dependencies.
332
346
 
333
347
  ```mermaid
334
348
  graph LR
335
- cc["cc-codeconductor@1.6.1"]
349
+ cc["cc-codeconductor@1.7.0"]
336
350
  zod["zod@^3.23.8"]
337
351
  yaml["yaml@^2.4.5"]
338
352
  cc --> zod
@@ -692,7 +706,8 @@ npx cc-codeconductor odd handoff --id delivery-001 --output json
692
706
  ```
693
707
 
694
708
  Subcommands: `validate` / `scan` / `plan` / `analyze` / `status` / `next` /
695
- `start` / `done` / `block` / `archive`. `analyze` is read-only coverage
709
+ `start` / `done` / `block` / `unblock` / `archive`, plus implemented, unreleased
710
+ `sync` / `verify` gates. `analyze` is read-only coverage
696
711
  (FR/SC → tasks → tests). Planned changes use capability-scoped delta specs;
697
712
  archive synchronizes validated deltas into durable specs before filing the
698
713
  change. Illegal status transitions fail closed. See
@@ -860,7 +875,7 @@ codeconductor/
860
875
 
861
876
  ## Roadmap
862
877
 
863
- Published package: **1.6.x (current stable: 1.6.1)**. Remaining gaps (sandbox, policy compiler, full
878
+ Published package: **1.7.x (current stable: 1.7.0)**. Remaining gaps (sandbox, policy compiler, full
864
879
  stack-specific asset pruning): [docs/current-status.md](docs/current-status.md).
865
880
  Release history: [CHANGELOG.md](CHANGELOG.md).
866
881
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Compile Check — runs a build command via Bun.spawn, captures output,
2
+ * Compile Check — runs a build command via node:child_process, captures output,
3
3
  * parses errors, and returns structured results for re-injection.
4
4
  */
5
5
  export interface CompileError {
@@ -48,6 +48,7 @@ export declare function isAllowlistedTestCommand(command: string | string[]): bo
48
48
  */
49
49
  export declare function parseCompileErrors(stderr: string): CompileError[];
50
50
  /**
51
- * Run a compile check via Bun.spawn with configurable timeout.
51
+ * Run a compile check with configurable timeout. Uses `node:child_process`
52
+ * because the published bundle runs under Node (`npx cc-codeconductor`).
52
53
  */
53
54
  export declare function runCompileCheck(options?: CompileCheckOptions): Promise<CompileResult>;
@@ -1,5 +1,6 @@
1
1
  import { type GoalGraphInput } from '../../validation/schemas';
2
2
  import { type Result } from '../../utils/result';
3
+ export declare function propagateBlockedTasks(graph: GoalGraphInput): boolean;
3
4
  /**
4
5
  * Write a goal graph to .codeconductor/current-goal.yml
5
6
  */
@@ -20,6 +20,7 @@ export interface OrchestratorNextResult {
20
20
  readyCount: number;
21
21
  }
22
22
  export declare function getNextTask(projectRoot: string, projectName: string): Promise<Result<OrchestratorNextResult, Error>>;
23
+ export declare function claimNextTask(projectRoot: string, projectName: string): Promise<Result<OrchestratorNextResult, Error>>;
23
24
  export declare function startTask(projectRoot: string, taskId: string, agent?: string): Promise<Result<void, Error>>;
24
25
  export declare function completeTask(projectRoot: string, taskId: string, evidenceIds?: string[]): Promise<Result<void, Error>>;
25
26
  export declare function formatGoalStatus(graph: GoalGraphInput): string;
@@ -0,0 +1,3 @@
1
+ import { type Result } from '../../utils/result';
2
+ /** Serialize each full goal transition, including its operational state and rollback. */
3
+ export declare function withQueueLock<T>(projectRoot: string, action: () => Promise<Result<T, Error>>): Promise<Result<T, Error>>;
@@ -28,6 +28,12 @@ export interface ReceiptVerification {
28
28
  readonly actualHash: string;
29
29
  readonly changedPaths: readonly string[];
30
30
  }
31
+ /**
32
+ * True only when this receipt was minted by captureReceipt in this project:
33
+ * the nonce is well-formed, a registry entry exists for it, and the entry
34
+ * binds the nonce to this exact manifest. Anything else fails closed.
35
+ */
36
+ export declare function isRegisteredReceipt(projectRoot: string, receipt: RddReceipt): Promise<boolean>;
31
37
  export declare function isRddReceipt(value: unknown): value is RddReceipt;
32
38
  export declare function captureReceipt(projectRoot: string, input: {
33
39
  readonly taskId: string;
@@ -1,4 +1,5 @@
1
1
  import type { GoalGraphInput } from '../../validation/schemas';
2
+ import { type TddValidationRecordInput } from '../../validation/schemas';
2
3
  import type { TddSuiteEvidence } from '../../domain/loop/loop-state';
3
4
  import { type Result } from '../../utils/result';
4
5
  import { type RddReceipt } from './rdd-receipt';
@@ -74,13 +75,21 @@ export declare function captureTddSuiteEvidence(projectRoot: string, taskId: str
74
75
  }, Error>>;
75
76
  /**
76
77
  * Load TDD suite evidence written by `captureTddSuiteEvidence`. Hand-edited
77
- * files (wrong source/type/`capturedBy`) are rejected.
78
+ * files (wrong source/type/`capturedBy`) are rejected, and so is a receipt
79
+ * that no longer matches the current project.
78
80
  */
79
81
  export declare function loadTddSuiteEvidence(projectRoot: string, taskId: string, evidenceId: string): Promise<Result<TddSuiteEvidence & {
80
82
  receipt: RddReceipt;
81
83
  }, Error>>;
84
+ /**
85
+ * Validate the RED evidence of a task against the current project and persist
86
+ * a record so later project changes do not invalidate it. With several fresh
87
+ * REDs the latest `receipt.capturedAt` wins (tie: greater evidence id).
88
+ */
89
+ export declare function recordRedValidation(projectRoot: string, taskId: string): Promise<Result<TddValidationRecordInput, Error>>;
82
90
  /**
83
91
  * True when the verification runner stored TDD evidence for this task.
84
- * Handmade JSON (wrong source/type/capturedBy) does not count.
92
+ * Handmade JSON (wrong source/type/capturedBy) does not count. RED is also
93
+ * accepted from a matching validation record written by `recordRedValidation`.
85
94
  */
86
95
  export declare function hasTddRunnerEvidence(projectRoot: string, taskId: string, expectedPhase?: 'red' | 'green'): Promise<boolean>;