cc-codeconductor 1.6.0 → 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 (126) 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 +25 -0
  7. package/dist/core/verification/verification-runner.d.ts +27 -2
  8. package/dist/index.js +1501 -782
  9. package/dist/library.js +420 -142
  10. package/dist/validation/schemas.d.ts +65 -26
  11. package/docs/generated/cli.md +8 -0
  12. package/package.json +2 -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-feature/SKILL.md +17 -16
  17. package/presets/agy/skills/cc-fix/SKILL.md +28 -34
  18. package/presets/agy/skills/cc-spec-mutation/SKILL.md +1 -1
  19. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +1 -1
  20. package/presets/agy/skills/evaluation/SKILL.md +1 -1
  21. package/presets/agy/skills/openspec/SKILL.md +10 -6
  22. package/presets/agy/skills/testing-tdd/SKILL.md +3 -3
  23. package/presets/agy/workflows/cc-api-contract.md +1 -1
  24. package/presets/agy/workflows/cc-ask.md +2 -2
  25. package/presets/agy/workflows/cc-council.md +2 -0
  26. package/presets/agy/workflows/cc-db-migration.md +1 -1
  27. package/presets/agy/workflows/cc-feature.md +1 -1
  28. package/presets/agy/workflows/cc-fix.md +1 -1
  29. package/presets/agy/workflows/cc-iterative.md +1 -1
  30. package/presets/agy/workflows/cc-odd.md +2 -2
  31. package/presets/agy/workflows/cc-openspec.md +1 -1
  32. package/presets/agy/workflows/cc-spec-mutation.md +2 -2
  33. package/presets/agy/workflows/cc-tdd-cycle.md +2 -2
  34. package/presets/claude/CLAUDE.md +1 -1
  35. package/presets/claude/commands/cc/api-contract.md +1 -1
  36. package/presets/claude/commands/cc/ask.md +2 -2
  37. package/presets/claude/commands/cc/council.md +2 -83
  38. package/presets/claude/commands/cc/db-migration.md +1 -1
  39. package/presets/claude/commands/cc/feature.md +1 -1
  40. package/presets/claude/commands/cc/fix.md +1 -1
  41. package/presets/claude/commands/cc/iterative.md +1 -1
  42. package/presets/claude/commands/cc/odd.md +2 -2
  43. package/presets/claude/commands/cc/openspec.md +5 -5
  44. package/presets/claude/commands/cc/spec-mutation.md +2 -2
  45. package/presets/claude/commands/cc/tdd-cycle.md +3 -3
  46. package/presets/claude/settings.json +6 -101
  47. package/presets/claude/skills/backlog/SKILL.md +1 -1
  48. package/presets/claude/skills/evaluation/SKILL.md +1 -1
  49. package/presets/claude/skills/openspec/SKILL.md +10 -6
  50. package/presets/claude/skills/testing-tdd/SKILL.md +3 -3
  51. package/presets/codex/AGENTS.md +1 -1
  52. package/presets/codex/commands/cc-ask.md +2 -2
  53. package/presets/codex/skills/backlog/SKILL.md +1 -1
  54. package/presets/codex/skills/cc-api-contract/SKILL.md +1 -1
  55. package/presets/codex/skills/cc-council/SKILL.md +2 -93
  56. package/presets/codex/skills/cc-db-migration/SKILL.md +1 -1
  57. package/presets/codex/skills/cc-feature/SKILL.md +1 -1
  58. package/presets/codex/skills/cc-fix/SKILL.md +1 -1
  59. package/presets/codex/skills/cc-iterative/SKILL.md +1 -1
  60. package/presets/codex/skills/cc-odd/SKILL.md +2 -2
  61. package/presets/codex/skills/cc-openspec/SKILL.md +10 -8
  62. package/presets/codex/skills/cc-spec-mutation/SKILL.md +2 -2
  63. package/presets/codex/skills/cc-tdd-cycle/SKILL.md +2 -2
  64. package/presets/codex/skills/django-testing/SKILL.md +1 -1
  65. package/presets/codex/skills/evaluation/SKILL.md +1 -1
  66. package/presets/codex/skills/openspec/SKILL.md +10 -6
  67. package/presets/codex/skills/python-django-stack/SKILL.md +1 -1
  68. package/presets/codex/skills/testing-tdd/SKILL.md +3 -3
  69. package/presets/cursor/AGENTS.md +1 -1
  70. package/presets/cursor/commands/cc/api-contract.md +1 -1
  71. package/presets/cursor/commands/cc/ask.md +2 -2
  72. package/presets/cursor/commands/cc/council.md +2 -83
  73. package/presets/cursor/commands/cc/db-migration.md +1 -1
  74. package/presets/cursor/commands/cc/feature.md +1 -1
  75. package/presets/cursor/commands/cc/fix.md +1 -1
  76. package/presets/cursor/commands/cc/iterative.md +1 -1
  77. package/presets/cursor/commands/cc/odd.md +2 -2
  78. package/presets/cursor/commands/cc/openspec.md +10 -8
  79. package/presets/cursor/commands/cc/spec-mutation.md +2 -2
  80. package/presets/cursor/commands/cc/tdd-cycle.md +2 -2
  81. package/presets/cursor/skills/backlog/SKILL.md +1 -1
  82. package/presets/cursor/skills/evaluation/SKILL.md +1 -1
  83. package/presets/cursor/skills/openspec/SKILL.md +10 -6
  84. package/presets/cursor/skills/testing-tdd/SKILL.md +3 -3
  85. package/presets/gemini/GEMINI.md +1 -1
  86. package/presets/gemini/commands/cc/api-contract.toml +1 -1
  87. package/presets/gemini/commands/cc/ask.toml +2 -2
  88. package/presets/gemini/commands/cc/council.toml +2 -83
  89. package/presets/gemini/commands/cc/db-migration.toml +1 -1
  90. package/presets/gemini/commands/cc/feature.toml +1 -1
  91. package/presets/gemini/commands/cc/fix.toml +1 -1
  92. package/presets/gemini/commands/cc/iterative.toml +1 -1
  93. package/presets/gemini/commands/cc/odd.toml +2 -2
  94. package/presets/gemini/commands/cc/openspec.toml +10 -8
  95. package/presets/gemini/commands/cc/spec-mutation.toml +2 -2
  96. package/presets/gemini/commands/cc/tdd-cycle.toml +2 -2
  97. package/presets/muse/AGENTS.md +1 -1
  98. package/presets/opencode/agents/implementer.md +1 -1
  99. package/presets/opencode/agents/tester.md +1 -1
  100. package/presets/opencode/commands/cc-api-contract.md +1 -1
  101. package/presets/opencode/commands/cc-ask.md +2 -2
  102. package/presets/opencode/commands/cc-council.md +2 -83
  103. package/presets/opencode/commands/cc-db-migration.md +1 -1
  104. package/presets/opencode/commands/cc-feature.md +1 -1
  105. package/presets/opencode/commands/cc-fix.md +1 -1
  106. package/presets/opencode/commands/cc-iterative.md +1 -1
  107. package/presets/opencode/commands/cc-odd.md +2 -2
  108. package/presets/opencode/commands/cc-openspec.md +2 -2
  109. package/presets/opencode/commands/cc-spec-mutation.md +2 -2
  110. package/presets/opencode/commands/cc-tdd-cycle.md +2 -2
  111. package/presets/opencode/prompts/v1.0.0/implementer.md +1 -1
  112. package/presets/opencode/prompts/v1.0.0/tester.md +1 -1
  113. package/presets/opencode/skills/backlog/SKILL.md +1 -1
  114. package/presets/opencode/skills/django-testing/SKILL.md +1 -0
  115. package/presets/opencode/skills/evaluation/SKILL.md +1 -1
  116. package/presets/opencode/skills/openspec/SKILL.md +10 -6
  117. package/presets/opencode/skills/python-django-stack/SKILL.md +1 -0
  118. package/presets/opencode/skills/python-fastapi-stack/SKILL.md +1 -0
  119. package/presets/opencode/skills/spring-boot-kotlin/SKILL.md +1 -0
  120. package/presets/opencode/skills/sqlalchemy/SKILL.md +1 -0
  121. package/presets/opencode/skills/testing-tdd/SKILL.md +3 -3
  122. package/presets/pi/AGENTS.md +1 -1
  123. package/presets/shared/invoke-hook.cjs +43 -24
  124. package/src/presets/manifests/claude.yml +1 -1
  125. package/src/presets/shared-skills.yml +30 -0
  126. package/src/presets/targets/pi.yml +1 -1
@@ -1275,6 +1275,7 @@ export declare const GoalTaskSchema: z.ZodObject<{
1275
1275
  title: z.ZodString;
1276
1276
  type: z.ZodEnum<["feature", "fix", "refactor", "test", "docs"]>;
1277
1277
  risk: z.ZodEnum<["low", "medium", "high"]>;
1278
+ priority: z.ZodOptional<z.ZodEnum<["P0", "P1", "P2", "P3"]>>;
1278
1279
  status: z.ZodEnum<["pending", "in-progress", "done", "blocked"]>;
1279
1280
  depends_on: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1280
1281
  acceptance_criteria: z.ZodArray<z.ZodString, "many">;
@@ -1289,6 +1290,7 @@ export declare const GoalTaskSchema: z.ZodObject<{
1289
1290
  depends_on: string[];
1290
1291
  acceptance_criteria: string[];
1291
1292
  context_scope: "isolated" | "continuation" | "full";
1293
+ priority?: "P0" | "P1" | "P2" | "P3" | undefined;
1292
1294
  blocked_reason?: string | undefined;
1293
1295
  }, {
1294
1296
  id: string;
@@ -1297,6 +1299,7 @@ export declare const GoalTaskSchema: z.ZodObject<{
1297
1299
  title: string;
1298
1300
  risk: "low" | "medium" | "high";
1299
1301
  acceptance_criteria: string[];
1302
+ priority?: "P0" | "P1" | "P2" | "P3" | undefined;
1300
1303
  depends_on?: string[] | undefined;
1301
1304
  blocked_reason?: string | undefined;
1302
1305
  context_scope?: "isolated" | "continuation" | "full" | undefined;
@@ -1311,6 +1314,7 @@ export declare const GoalGraphSchema: z.ZodObject<{
1311
1314
  title: z.ZodString;
1312
1315
  type: z.ZodEnum<["feature", "fix", "refactor", "test", "docs"]>;
1313
1316
  risk: z.ZodEnum<["low", "medium", "high"]>;
1317
+ priority: z.ZodOptional<z.ZodEnum<["P0", "P1", "P2", "P3"]>>;
1314
1318
  status: z.ZodEnum<["pending", "in-progress", "done", "blocked"]>;
1315
1319
  depends_on: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1316
1320
  acceptance_criteria: z.ZodArray<z.ZodString, "many">;
@@ -1325,6 +1329,7 @@ export declare const GoalGraphSchema: z.ZodObject<{
1325
1329
  depends_on: string[];
1326
1330
  acceptance_criteria: string[];
1327
1331
  context_scope: "isolated" | "continuation" | "full";
1332
+ priority?: "P0" | "P1" | "P2" | "P3" | undefined;
1328
1333
  blocked_reason?: string | undefined;
1329
1334
  }, {
1330
1335
  id: string;
@@ -1333,6 +1338,7 @@ export declare const GoalGraphSchema: z.ZodObject<{
1333
1338
  title: string;
1334
1339
  risk: "low" | "medium" | "high";
1335
1340
  acceptance_criteria: string[];
1341
+ priority?: "P0" | "P1" | "P2" | "P3" | undefined;
1336
1342
  depends_on?: string[] | undefined;
1337
1343
  blocked_reason?: string | undefined;
1338
1344
  context_scope?: "isolated" | "continuation" | "full" | undefined;
@@ -1349,6 +1355,7 @@ export declare const GoalGraphSchema: z.ZodObject<{
1349
1355
  depends_on: string[];
1350
1356
  acceptance_criteria: string[];
1351
1357
  context_scope: "isolated" | "continuation" | "full";
1358
+ priority?: "P0" | "P1" | "P2" | "P3" | undefined;
1352
1359
  blocked_reason?: string | undefined;
1353
1360
  }[];
1354
1361
  created_at: string;
@@ -1361,6 +1368,7 @@ export declare const GoalGraphSchema: z.ZodObject<{
1361
1368
  title: string;
1362
1369
  risk: "low" | "medium" | "high";
1363
1370
  acceptance_criteria: string[];
1371
+ priority?: "P0" | "P1" | "P2" | "P3" | undefined;
1364
1372
  depends_on?: string[] | undefined;
1365
1373
  blocked_reason?: string | undefined;
1366
1374
  context_scope?: "isolated" | "continuation" | "full" | undefined;
@@ -1481,6 +1489,25 @@ export declare const EvidenceSchema: z.ZodObject<{
1481
1489
  relatedDecision?: string | undefined;
1482
1490
  checksum?: string | undefined;
1483
1491
  }>;
1492
+ export declare const TddValidationRecordSchema: z.ZodObject<{
1493
+ taskId: z.ZodString;
1494
+ evidenceId: z.ZodString;
1495
+ receiptNonce: z.ZodString;
1496
+ manifestHash: z.ZodString;
1497
+ validatedAt: z.ZodString;
1498
+ }, "strict", z.ZodTypeAny, {
1499
+ taskId: string;
1500
+ evidenceId: string;
1501
+ receiptNonce: string;
1502
+ manifestHash: string;
1503
+ validatedAt: string;
1504
+ }, {
1505
+ taskId: string;
1506
+ evidenceId: string;
1507
+ receiptNonce: string;
1508
+ manifestHash: string;
1509
+ validatedAt: string;
1510
+ }>;
1484
1511
  export declare const CanonicalTaskCardStatusSchema: z.ZodEnum<["draft", "ready", "in-progress", "review", "done", "blocked"]>;
1485
1512
  export declare const CanonicalTaskCardSchema: z.ZodObject<{
1486
1513
  id: z.ZodString;
@@ -1691,20 +1718,20 @@ export declare const ProductMetaSchema: z.ZodObject<{
1691
1718
  lastIngestAt?: string | undefined;
1692
1719
  sourceHashes?: Record<string, string> | undefined;
1693
1720
  }>;
1694
- export declare const ProductEventTypeSchema: z.ZodEnum<["task.started", "task.completed", "decision.recorded", "evidence.added", "ingest.completed", "goal.updated", "blocker.detected", "verification.completed", "feedback.processed", "context.compiled"]>;
1721
+ export declare const ProductEventTypeSchema: z.ZodEnum<["task.started", "task.completed", "lock.recovered", "decision.recorded", "evidence.added", "ingest.completed", "goal.updated", "blocker.detected", "verification.completed", "feedback.processed", "context.compiled"]>;
1695
1722
  export declare const ProductEventSchema: z.ZodObject<{
1696
1723
  id: z.ZodString;
1697
- type: z.ZodEnum<["task.started", "task.completed", "decision.recorded", "evidence.added", "ingest.completed", "goal.updated", "blocker.detected", "verification.completed", "feedback.processed", "context.compiled"]>;
1724
+ type: z.ZodEnum<["task.started", "task.completed", "lock.recovered", "decision.recorded", "evidence.added", "ingest.completed", "goal.updated", "blocker.detected", "verification.completed", "feedback.processed", "context.compiled"]>;
1698
1725
  timestamp: z.ZodString;
1699
1726
  payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1700
1727
  }, "strip", z.ZodTypeAny, {
1701
1728
  id: string;
1702
- type: "task.started" | "task.completed" | "decision.recorded" | "evidence.added" | "ingest.completed" | "goal.updated" | "blocker.detected" | "verification.completed" | "feedback.processed" | "context.compiled";
1729
+ type: "task.started" | "task.completed" | "lock.recovered" | "decision.recorded" | "evidence.added" | "ingest.completed" | "goal.updated" | "blocker.detected" | "verification.completed" | "feedback.processed" | "context.compiled";
1703
1730
  timestamp: string;
1704
1731
  payload: Record<string, unknown>;
1705
1732
  }, {
1706
1733
  id: string;
1707
- type: "task.started" | "task.completed" | "decision.recorded" | "evidence.added" | "ingest.completed" | "goal.updated" | "blocker.detected" | "verification.completed" | "feedback.processed" | "context.compiled";
1734
+ type: "task.started" | "task.completed" | "lock.recovered" | "decision.recorded" | "evidence.added" | "ingest.completed" | "goal.updated" | "blocker.detected" | "verification.completed" | "feedback.processed" | "context.compiled";
1708
1735
  timestamp: string;
1709
1736
  payload?: Record<string, unknown> | undefined;
1710
1737
  }>;
@@ -1921,9 +1948,9 @@ export declare const BacklogItemSchema: z.ZodObject<{
1921
1948
  type: "feature" | "refactor" | "bug" | "tech-debt";
1922
1949
  description: string;
1923
1950
  title: string;
1951
+ priority: "P0" | "P1" | "P2" | "P3";
1924
1952
  acceptanceCriteria: string[];
1925
1953
  dependencies: string[];
1926
- priority: "P0" | "P1" | "P2" | "P3";
1927
1954
  scope: string;
1928
1955
  outOfScope: string;
1929
1956
  progress: number;
@@ -1939,8 +1966,8 @@ export declare const BacklogItemSchema: z.ZodObject<{
1939
1966
  type: "feature" | "refactor" | "bug" | "tech-debt";
1940
1967
  description: string;
1941
1968
  title: string;
1942
- acceptanceCriteria: string[];
1943
1969
  priority: "P0" | "P1" | "P2" | "P3";
1970
+ acceptanceCriteria: string[];
1944
1971
  scope: string;
1945
1972
  progress: number;
1946
1973
  dependencies?: string[] | undefined;
@@ -1996,9 +2023,9 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
1996
2023
  type: "feature" | "refactor" | "bug" | "tech-debt";
1997
2024
  description: string;
1998
2025
  title: string;
2026
+ priority: "P0" | "P1" | "P2" | "P3";
1999
2027
  acceptanceCriteria: string[];
2000
2028
  dependencies: string[];
2001
- priority: "P0" | "P1" | "P2" | "P3";
2002
2029
  scope: string;
2003
2030
  outOfScope: string;
2004
2031
  progress: number;
@@ -2014,8 +2041,8 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
2014
2041
  type: "feature" | "refactor" | "bug" | "tech-debt";
2015
2042
  description: string;
2016
2043
  title: string;
2017
- acceptanceCriteria: string[];
2018
2044
  priority: "P0" | "P1" | "P2" | "P3";
2045
+ acceptanceCriteria: string[];
2019
2046
  scope: string;
2020
2047
  progress: number;
2021
2048
  dependencies?: string[] | undefined;
@@ -2051,9 +2078,9 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
2051
2078
  type: "feature" | "refactor" | "bug" | "tech-debt";
2052
2079
  description: string;
2053
2080
  title: string;
2081
+ priority: "P0" | "P1" | "P2" | "P3";
2054
2082
  acceptanceCriteria: string[];
2055
2083
  dependencies: string[];
2056
- priority: "P0" | "P1" | "P2" | "P3";
2057
2084
  scope: string;
2058
2085
  outOfScope: string;
2059
2086
  progress: number;
@@ -2069,8 +2096,8 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
2069
2096
  type: "feature" | "refactor" | "bug" | "tech-debt";
2070
2097
  description: string;
2071
2098
  title: string;
2072
- acceptanceCriteria: string[];
2073
2099
  priority: "P0" | "P1" | "P2" | "P3";
2100
+ acceptanceCriteria: string[];
2074
2101
  scope: string;
2075
2102
  progress: number;
2076
2103
  dependencies?: string[] | undefined;
@@ -2096,9 +2123,9 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
2096
2123
  type: "feature" | "refactor" | "bug" | "tech-debt";
2097
2124
  description: string;
2098
2125
  title: string;
2126
+ priority: "P0" | "P1" | "P2" | "P3";
2099
2127
  acceptanceCriteria: string[];
2100
2128
  dependencies: string[];
2101
- priority: "P0" | "P1" | "P2" | "P3";
2102
2129
  scope: string;
2103
2130
  outOfScope: string;
2104
2131
  progress: number;
@@ -2115,9 +2142,9 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
2115
2142
  type: "feature" | "refactor" | "bug" | "tech-debt";
2116
2143
  description: string;
2117
2144
  title: string;
2145
+ priority: "P0" | "P1" | "P2" | "P3";
2118
2146
  acceptanceCriteria: string[];
2119
2147
  dependencies: string[];
2120
- priority: "P0" | "P1" | "P2" | "P3";
2121
2148
  scope: string;
2122
2149
  outOfScope: string;
2123
2150
  progress: number;
@@ -2142,8 +2169,8 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
2142
2169
  type: "feature" | "refactor" | "bug" | "tech-debt";
2143
2170
  description: string;
2144
2171
  title: string;
2145
- acceptanceCriteria: string[];
2146
2172
  priority: "P0" | "P1" | "P2" | "P3";
2173
+ acceptanceCriteria: string[];
2147
2174
  scope: string;
2148
2175
  progress: number;
2149
2176
  dependencies?: string[] | undefined;
@@ -2161,8 +2188,8 @@ export declare const BacklogDocumentSchema: z.ZodObject<{
2161
2188
  type: "feature" | "refactor" | "bug" | "tech-debt";
2162
2189
  description: string;
2163
2190
  title: string;
2164
- acceptanceCriteria: string[];
2165
2191
  priority: "P0" | "P1" | "P2" | "P3";
2192
+ acceptanceCriteria: string[];
2166
2193
  scope: string;
2167
2194
  progress: number;
2168
2195
  dependencies?: string[] | undefined;
@@ -2258,6 +2285,7 @@ export declare const OpenspecStateSchema: z.ZodObject<{
2258
2285
  lastScanAt: z.ZodOptional<z.ZodString>;
2259
2286
  changePaths: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
2260
2287
  itemSnapshots: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
2288
+ itemBaseCommits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2261
2289
  }, "strip", z.ZodTypeAny, {
2262
2290
  version: 1;
2263
2291
  taskCards: {
@@ -2278,6 +2306,7 @@ export declare const OpenspecStateSchema: z.ZodObject<{
2278
2306
  activeItemId?: string | undefined;
2279
2307
  lastScanHash?: string | undefined;
2280
2308
  lastScanAt?: string | undefined;
2309
+ itemBaseCommits?: Record<string, string> | undefined;
2281
2310
  }, {
2282
2311
  version: 1;
2283
2312
  activeItemId?: string | undefined;
@@ -2298,6 +2327,7 @@ export declare const OpenspecStateSchema: z.ZodObject<{
2298
2327
  lastScanAt?: string | undefined;
2299
2328
  changePaths?: Record<string, string> | undefined;
2300
2329
  itemSnapshots?: Record<string, string> | undefined;
2330
+ itemBaseCommits?: Record<string, string> | undefined;
2301
2331
  }>;
2302
2332
  export declare const SpecAnalyzeFindingSchema: z.ZodObject<{
2303
2333
  severity: z.ZodEnum<["CRITICAL", "HIGH", "MEDIUM", "LOW"]>;
@@ -3345,14 +3375,14 @@ export declare const PlannerOutputSchema: z.ZodObject<{
3345
3375
  }, "strip", z.ZodTypeAny, {
3346
3376
  id: string;
3347
3377
  title: string;
3348
- dependencies: string[];
3349
3378
  priority: string;
3379
+ dependencies: string[];
3350
3380
  estimate: string;
3351
3381
  }, {
3352
3382
  id: string;
3353
3383
  title: string;
3354
- dependencies: string[];
3355
3384
  priority: string;
3385
+ dependencies: string[];
3356
3386
  estimate: string;
3357
3387
  }>, "many">;
3358
3388
  questionsForUser: z.ZodArray<z.ZodString, "many">;
@@ -3363,8 +3393,8 @@ export declare const PlannerOutputSchema: z.ZodObject<{
3363
3393
  tasks: {
3364
3394
  id: string;
3365
3395
  title: string;
3366
- dependencies: string[];
3367
3396
  priority: string;
3397
+ dependencies: string[];
3368
3398
  estimate: string;
3369
3399
  }[];
3370
3400
  risks: {
@@ -3382,8 +3412,8 @@ export declare const PlannerOutputSchema: z.ZodObject<{
3382
3412
  tasks: {
3383
3413
  id: string;
3384
3414
  title: string;
3385
- dependencies: string[];
3386
3415
  priority: string;
3416
+ dependencies: string[];
3387
3417
  estimate: string;
3388
3418
  }[];
3389
3419
  risks: {
@@ -3672,21 +3702,24 @@ export declare const ScorecardCriterionSchema: z.ZodObject<{
3672
3702
  id: z.ZodEnum<["acceptance", "minimal_diff", "tests", "regressions", "conventions", "documentation", "context_discipline", "cc_gain"]>;
3673
3703
  label: z.ZodString;
3674
3704
  weight: z.ZodNumber;
3675
- score: z.ZodNumber;
3705
+ score: z.ZodNullable<z.ZodNumber>;
3706
+ unmeasured: z.ZodOptional<z.ZodBoolean>;
3676
3707
  notes: z.ZodOptional<z.ZodString>;
3677
3708
  autoSuggested: z.ZodOptional<z.ZodBoolean>;
3678
3709
  }, "strip", z.ZodTypeAny, {
3679
3710
  id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3680
3711
  label: string;
3681
3712
  weight: number;
3682
- score: number;
3713
+ score: number | null;
3714
+ unmeasured?: boolean | undefined;
3683
3715
  notes?: string | undefined;
3684
3716
  autoSuggested?: boolean | undefined;
3685
3717
  }, {
3686
3718
  id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3687
3719
  label: string;
3688
3720
  weight: number;
3689
- score: number;
3721
+ score: number | null;
3722
+ unmeasured?: boolean | undefined;
3690
3723
  notes?: string | undefined;
3691
3724
  autoSuggested?: boolean | undefined;
3692
3725
  }>;
@@ -3701,21 +3734,24 @@ export declare const ScorecardRecordSchema: z.ZodObject<{
3701
3734
  id: z.ZodEnum<["acceptance", "minimal_diff", "tests", "regressions", "conventions", "documentation", "context_discipline", "cc_gain"]>;
3702
3735
  label: z.ZodString;
3703
3736
  weight: z.ZodNumber;
3704
- score: z.ZodNumber;
3737
+ score: z.ZodNullable<z.ZodNumber>;
3738
+ unmeasured: z.ZodOptional<z.ZodBoolean>;
3705
3739
  notes: z.ZodOptional<z.ZodString>;
3706
3740
  autoSuggested: z.ZodOptional<z.ZodBoolean>;
3707
3741
  }, "strip", z.ZodTypeAny, {
3708
3742
  id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3709
3743
  label: string;
3710
3744
  weight: number;
3711
- score: number;
3745
+ score: number | null;
3746
+ unmeasured?: boolean | undefined;
3712
3747
  notes?: string | undefined;
3713
3748
  autoSuggested?: boolean | undefined;
3714
3749
  }, {
3715
3750
  id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3716
3751
  label: string;
3717
3752
  weight: number;
3718
- score: number;
3753
+ score: number | null;
3754
+ unmeasured?: boolean | undefined;
3719
3755
  notes?: string | undefined;
3720
3756
  autoSuggested?: boolean | undefined;
3721
3757
  }>, "many">;
@@ -3736,7 +3772,8 @@ export declare const ScorecardRecordSchema: z.ZodObject<{
3736
3772
  id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3737
3773
  label: string;
3738
3774
  weight: number;
3739
- score: number;
3775
+ score: number | null;
3776
+ unmeasured?: boolean | undefined;
3740
3777
  notes?: string | undefined;
3741
3778
  autoSuggested?: boolean | undefined;
3742
3779
  }[];
@@ -3756,7 +3793,8 @@ export declare const ScorecardRecordSchema: z.ZodObject<{
3756
3793
  id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3757
3794
  label: string;
3758
3795
  weight: number;
3759
- score: number;
3796
+ score: number | null;
3797
+ unmeasured?: boolean | undefined;
3760
3798
  notes?: string | undefined;
3761
3799
  autoSuggested?: boolean | undefined;
3762
3800
  }[];
@@ -4760,6 +4798,7 @@ export type GoalGraphInput = z.infer<typeof GoalGraphSchema>;
4760
4798
  export type KnowledgeEntityInput = z.infer<typeof KnowledgeEntitySchema>;
4761
4799
  export type DecisionInput = z.infer<typeof DecisionSchema>;
4762
4800
  export type EvidenceInput = z.infer<typeof EvidenceSchema>;
4801
+ export type TddValidationRecordInput = z.infer<typeof TddValidationRecordSchema>;
4763
4802
  export type CanonicalTaskCardInput = z.infer<typeof CanonicalTaskCardSchema>;
4764
4803
  export type ProductGraphInput = z.infer<typeof ProductGraphSchema>;
4765
4804
  export type ProductGraphNodeInput = z.infer<typeof ProductGraphNodeSchema>;
@@ -200,6 +200,14 @@ Verify task completion with evidence.
200
200
  cc-codeconductor verify --task <id>
201
201
  ```
202
202
 
203
+ ## tdd
204
+
205
+ Capture runner-verified RED/GREEN TDD evidence.
206
+
207
+ ```text
208
+ cc-codeconductor tdd capture --task <cardId> --phase red|green --command "<test command>"
209
+ ```
210
+
203
211
  ## rdd
204
212
 
205
213
  Capture and validate Receipt-Driven Development evidence.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-codeconductor",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "A multi-agent orchestration framework for AI-assisted software engineering workflows.",
5
5
  "keywords": [
6
6
  "ai",
@@ -54,6 +54,7 @@
54
54
  "test:fast": "bun run scripts/test-fast.ts",
55
55
  "typecheck": "tsc --noEmit",
56
56
  "lint": "bun run scripts/lint.ts",
57
+ "check:council-redirect": "bun run scripts/check-council-redirect.ts",
57
58
  "check:coverage": "bun run scripts/check-coverage.ts",
58
59
  "check:prompt-changelog": "bun run scripts/check-prompt-changelog.ts",
59
60
  "check:drift": "bun run scripts/check-drift.ts",
@@ -474,7 +474,7 @@ When the orchestrator receives a GoalGraph, it delegates tasks in dependency ord
474
474
 
475
475
  ## Receipt integrity
476
476
 
477
- - For any implementation, test, review, handoff, or delivery decision, capture or verify the current RDD receipt with `bun run dev rdd`.
477
+ - For any implementation, test, review, handoff, or delivery decision, capture or verify the current RDD receipt with `npx cc-codeconductor rdd`.
478
478
  - A receipt is valid only for its exact candidate. If code, tests, contracts, or runner configuration changed, repeat the affected verification.
479
479
  - TDD and Mutation Testing retain their existing gates; RDD verifies that their observed evidence still belongs to the current candidate.
480
480
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  const { spawnSync } = require('node:child_process');
5
5
  const { existsSync, readFileSync, realpathSync } = require('node:fs');
6
- const { delimiter, join, resolve } = require('node:path');
6
+ const { delimiter, dirname, join, resolve } = require('node:path');
7
7
 
8
8
  const VALID_EVENTS = ['pre-tool', 'post-tool', 'session-start'];
9
9
  const SPAWN_TIMEOUT = 10000;
@@ -17,17 +17,15 @@ const args = rawArgs.filter((arg) => {
17
17
  const event = args.find((a) => VALID_EVENTS.includes(a)) || 'pre-tool';
18
18
  const extra = args.filter((a) => a !== event);
19
19
  const isAgy = process.argv.some((a) => a === '--format=agy') || extra.includes('--format=agy');
20
+ const failClosed = process.env.CC_HOOK_FAIL_CLOSED === '1' || extra.includes('--fail-closed');
21
+ const checkOnly = extra.includes('--check');
22
+ const runnerExtra = extra.filter(arg => arg !== '--fail-closed' && arg !== '--check');
20
23
 
21
24
  function findProjectRoot() {
22
- const candidates = [
23
- process.env.PROJECT_ROOT,
24
- process.env.CLAUDE_PROJECT_DIR,
25
- process.env.WORKSPACE_DIR,
26
- process.cwd(),
27
- resolve(__dirname, '..', '..'),
28
- ].filter(Boolean);
29
-
30
- for (const dir of candidates) {
25
+ const explicit = process.env.PROJECT_ROOT || process.env.CLAUDE_PROJECT_DIR || process.env.WORKSPACE_DIR;
26
+ if (explicit) return resolve(explicit);
27
+ let dir = process.cwd();
28
+ while (true) {
31
29
  if (
32
30
  existsSync(join(dir, 'package.json')) ||
33
31
  existsSync(join(dir, '.git')) ||
@@ -36,8 +34,11 @@ function findProjectRoot() {
36
34
  ) {
37
35
  return dir;
38
36
  }
37
+ const parent = dirname(dir);
38
+ if (parent === dir) break;
39
+ dir = parent;
39
40
  }
40
- return resolve(__dirname, '..', '..');
41
+ return process.cwd();
41
42
  }
42
43
 
43
44
  const projectRoot = findProjectRoot();
@@ -55,7 +56,7 @@ const input = process.stdin.isTTY ? '' : readFileSync(0, 'utf8');
55
56
  */
56
57
  function tryRun(bin, runArgs) {
57
58
  try {
58
- const result = spawnSync(bin, runArgs, {
59
+ const result = spawnSync(bin, checkOnly ? [...runArgs.slice(0, runArgs.indexOf('hook')), '--help'] : runArgs, {
59
60
  cwd: projectRoot,
60
61
  stdio: ['pipe', 'pipe', 'pipe'],
61
62
  input,
@@ -71,27 +72,40 @@ function tryRun(bin, runArgs) {
71
72
  process.stderr.write(result.stderr);
72
73
  }
73
74
  if (result.status === 0) {
75
+ if (checkOnly) {
76
+ process.stdout.write(JSON.stringify({ operational: true, failClosed }) + '\n');
77
+ process.exit(0);
78
+ }
74
79
  if (result.stdout) process.stdout.write(result.stdout);
75
80
  process.exit(0);
76
81
  }
77
- if (!isAgy && result.status === 2) {
78
- process.exit(2);
82
+ if (!checkOnly && result.status === 2) {
83
+ if (isAgy) process.stdout.write(JSON.stringify({ decision: 'deny', reason: 'CodeConductor runner denied the tool.' }) + '\n');
84
+ process.exit(isAgy ? 0 : 2);
79
85
  }
80
- return false;
86
+ fallback();
81
87
  } catch {
82
88
  return false;
83
89
  }
84
90
  }
85
91
 
86
92
  function fallback() {
93
+ if (checkOnly) {
94
+ process.stdout.write(JSON.stringify({ operational: false, failClosed }) + '\n');
95
+ process.exit(1);
96
+ }
97
+ const denied = event === 'pre-tool' && failClosed;
98
+ if (denied || event === 'session-start') {
99
+ process.stderr.write('CodeConductor guard unavailable: install cc-codeconductor locally or enable CC_DEV=1 for trusted development.\n');
100
+ }
87
101
  if (isAgy) {
88
102
  if (event === 'post-tool' || event === 'session-start') {
89
103
  process.stdout.write('{}\n');
90
104
  } else {
91
- process.stdout.write('{"decision":"allow"}\n');
105
+ process.stdout.write(JSON.stringify(denied ? { decision: 'deny', reason: 'CodeConductor guard unavailable' } : { decision: 'allow' }) + '\n');
92
106
  }
93
107
  }
94
- process.exit(0);
108
+ process.exit(denied && !isAgy ? 2 : 0);
95
109
  }
96
110
 
97
111
  try {
@@ -101,18 +115,20 @@ try {
101
115
  // tryRun(), so the pre-check is redundant — dropping it halves the spawn
102
116
  // count (and the worst-case latency) for the common case where bun exists.
103
117
  const srcMain = join(projectRoot, 'src', 'cli', 'main.ts');
104
- if (existsSync(srcMain)) {
105
- tryRun('bun', ['run', srcMain, 'hook', event, ...extra]);
118
+ if (process.env.CC_DEV === '1' && existsSync(srcMain)) {
119
+ const metadata = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf8'));
120
+ if (metadata.name === 'cc-codeconductor') tryRun('bun', ['run', srcMain, 'hook', event, ...runnerExtra]);
106
121
  }
107
122
 
108
123
  const packaged = join(projectRoot, 'node_modules', 'cc-codeconductor', 'dist', 'index.js');
109
124
  if (existsSync(packaged)) {
110
- tryRun(process.execPath, [packaged, 'hook', event, ...extra]);
125
+ tryRun(process.execPath, [packaged, 'hook', event, ...runnerExtra]);
111
126
  }
112
127
 
113
128
  const localDist = join(projectRoot, 'dist', 'index.js');
114
- if (existsSync(localDist)) {
115
- tryRun(process.execPath, [localDist, 'hook', event, ...extra]);
129
+ if (process.env.CC_DEV === '1' && existsSync(localDist)) {
130
+ const metadata = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf8'));
131
+ if (metadata.name === 'cc-codeconductor') tryRun(process.execPath, [localDist, 'hook', event, ...runnerExtra]);
116
132
  }
117
133
 
118
134
  // Locate global npm installs without invoking npx or Windows .cmd shims.
@@ -122,9 +138,12 @@ try {
122
138
  join(binDir, '..', 'lib', 'node_modules', 'cc-codeconductor', 'dist', 'index.js'),
123
139
  ];
124
140
  const executable = join(binDir, 'cc-codeconductor');
125
- if (existsSync(executable)) candidates.push(realpathSync(executable));
141
+ if (existsSync(executable)) {
142
+ const resolved = realpathSync(executable);
143
+ if (resolved.endsWith(join('cc-codeconductor', 'dist', 'index.js'))) candidates.push(resolved);
144
+ }
126
145
  for (const candidate of candidates) {
127
- if (existsSync(candidate)) tryRun(process.execPath, [candidate, 'hook', event, ...extra]);
146
+ if (existsSync(candidate)) tryRun(process.execPath, [candidate, 'hook', event, ...runnerExtra]);
128
147
  }
129
148
  }
130
149
  } catch {
@@ -29,7 +29,7 @@ the item here.
29
29
  4. Create `BACKLOG.md` from `presets/templates/BACKLOG.md` or append under
30
30
  `## Items`. Do not rewrite `## Global` or `## Archive`.
31
31
  5. Next ID = max numeric suffix in Items + Archive + 1, zero-padded (`BC-013`).
32
- 6. `bun run dev openspec validate` (or `npx cc-codeconductor`). Fix until valid.
32
+ 6. `npx cc-codeconductor openspec validate`. Fix until valid.
33
33
  7. `openspec plan BC-xxx` for each **new** item this run. Then tell the user
34
34
  to run `/cc-openspec`.
35
35
 
@@ -66,31 +66,32 @@ not invoke implementer until the plan is approved.**
66
66
 
67
67
  ---
68
68
 
69
- ## Step 3 — Implementation (implementer)
69
+ ## Step 3 — Test coverage (tester)
70
70
 
71
- Invoke `implementer` with the approved Technical Plan and the Task Card.
72
- Implementer creates a Git Worktree before touching any file; all edits happen inside it.
71
+ Invoke `tester` with the approved Technical Plan and the Task Card.
73
72
 
74
- implementer must:
73
+ tester must:
75
74
 
76
- 1. Read the Technical Plan before touching any file
77
- 2. Apply the minimal diff — only what the plan specifies
78
- 3. Run the project test suite after implementation
79
- 4. Produce an Implementation Summary: what changed, which files, how to verify
80
- locally
75
+ 1. Write failing tests to cover the new behavior (RED)
76
+ 2. Ensure all acceptance criteria from the Task Card have at least one test
77
+ 3. Confirm the new tests fail for the right reason before implementation
78
+ 4. Produce a Coverage Summary: test files added or modified, cases covered
81
79
 
82
80
  ---
83
81
 
84
- ## Step 4 — Test coverage (tester)
82
+ ## Step 4 — Implementation (implementer)
85
83
 
86
- Invoke `tester` with the Implementation Summary and the Task Card.
84
+ Invoke `implementer` with the approved Technical Plan, the Task Card, and the
85
+ failing tests from Step 3.
86
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
87
87
 
88
- tester must:
88
+ implementer must:
89
89
 
90
- 1. Write or extend tests to cover the new behavior
91
- 2. Ensure all acceptance criteria from the Task Card have at least one test
92
- 3. Run the full test suite and confirm it passes
93
- 4. Produce a Coverage Summary: test files added or modified, cases covered
90
+ 1. Read the Technical Plan before touching any file
91
+ 2. Apply the minimal diff to make the failing tests pass — only what the plan specifies
92
+ 3. Run the project test suite after implementation
93
+ 4. Produce an Implementation Summary: what changed, which files, how to verify
94
+ locally
94
95
 
95
96
  ---
96
97