cc-codeconductor 1.0.0 → 1.2.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 (247) hide show
  1. package/README.md +326 -87
  2. package/dist/core/compilation/compile-checker.d.ts +2 -0
  3. package/dist/core/loop/loop-engine.d.ts +3 -0
  4. package/dist/core/verification/verification-runner.d.ts +7 -0
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +3825 -597
  7. package/dist/library.js +195 -18
  8. package/dist/validation/schemas.d.ts +461 -44
  9. package/package.json +4 -1
  10. package/presets/agy/AGENTS.md +13 -9
  11. package/presets/agy/gates/pre-commit/GATE.md +5 -4
  12. package/presets/agy/hooks.json +2 -2
  13. package/presets/agy/scripts/invoke-hook.cjs +115 -0
  14. package/presets/agy/skills/backlog/SKILL.md +61 -0
  15. package/presets/agy/skills/cc-spec-mutation/SKILL.md +165 -0
  16. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +3 -0
  17. package/presets/agy/skills/evaluation/SKILL.md +61 -2
  18. package/presets/agy/skills/openspec/SKILL.md +50 -16
  19. package/presets/agy/skills/security-ai-llm/SKILL.md +43 -0
  20. package/presets/agy/skills/security-blue-team/SKILL.md +43 -0
  21. package/presets/agy/skills/security-cloud/SKILL.md +43 -0
  22. package/presets/agy/skills/security-crypto/SKILL.md +43 -0
  23. package/presets/agy/skills/security-exploit-dev/SKILL.md +45 -0
  24. package/presets/agy/skills/security-grc/SKILL.md +43 -0
  25. package/presets/agy/skills/security-incident-response/SKILL.md +45 -0
  26. package/presets/agy/skills/security-log-analysis/SKILL.md +43 -0
  27. package/presets/agy/skills/security-malware-analysis/SKILL.md +44 -0
  28. package/presets/agy/skills/security-mobile/SKILL.md +43 -0
  29. package/presets/agy/skills/security-network/SKILL.md +43 -0
  30. package/presets/agy/skills/security-ot-ics/SKILL.md +43 -0
  31. package/presets/agy/skills/security-recon/SKILL.md +45 -0
  32. package/presets/agy/skills/security-red-team/SKILL.md +44 -0
  33. package/presets/agy/skills/security-reverse-engineering/SKILL.md +44 -0
  34. package/presets/agy/skills/security-soc-automation/SKILL.md +43 -0
  35. package/presets/agy/skills/security-threat-hunting/SKILL.md +43 -0
  36. package/presets/agy/skills/security-vuln-assessment/SKILL.md +45 -0
  37. package/presets/agy/skills/security-web/SKILL.md +44 -0
  38. package/presets/agy/skills/testing-tdd/SKILL.md +53 -0
  39. package/presets/agy/skills/using-cc-skills/SKILL.md +48 -0
  40. package/presets/agy/workflows/cc-api-contract.md +14 -0
  41. package/presets/agy/workflows/cc-ask.md +2 -1
  42. package/presets/agy/workflows/cc-backlog.md +69 -0
  43. package/presets/agy/workflows/cc-db-migration.md +14 -0
  44. package/presets/agy/workflows/cc-explore.md +1 -1
  45. package/presets/agy/workflows/cc-feature.md +18 -0
  46. package/presets/agy/workflows/cc-fix.md +14 -0
  47. package/presets/agy/workflows/cc-iterative.md +14 -0
  48. package/presets/agy/workflows/cc-openspec.md +17 -1
  49. package/presets/agy/workflows/cc-scorecard.md +2 -0
  50. package/presets/agy/workflows/cc-security.md +180 -0
  51. package/presets/agy/workflows/cc-spec-mutation.md +191 -0
  52. package/presets/agy/workflows/cc-tdd-cycle.md +14 -0
  53. package/presets/claude/CLAUDE.md +4 -0
  54. package/presets/claude/commands/cc/api-contract.md +14 -0
  55. package/presets/claude/commands/cc/ask.md +2 -1
  56. package/presets/claude/commands/cc/backlog.md +104 -0
  57. package/presets/claude/commands/cc/db-migration.md +14 -0
  58. package/presets/claude/commands/cc/explore.md +1 -1
  59. package/presets/claude/commands/cc/feature.md +18 -0
  60. package/presets/claude/commands/cc/fix.md +17 -0
  61. package/presets/claude/commands/cc/iterative.md +14 -0
  62. package/presets/claude/commands/cc/openspec.md +30 -1
  63. package/presets/claude/commands/cc/review.md +3 -0
  64. package/presets/claude/commands/cc/scorecard.md +2 -0
  65. package/presets/claude/commands/cc/security.md +179 -0
  66. package/presets/claude/commands/cc/spec-mutation.md +190 -0
  67. package/presets/claude/commands/cc/tdd-cycle.md +17 -0
  68. package/presets/claude/gates/pre-commit/GATE.md +5 -4
  69. package/presets/claude/settings.json +13 -11
  70. package/presets/claude/skills/backlog/SKILL.md +61 -0
  71. package/presets/claude/skills/evaluation/SKILL.md +47 -24
  72. package/presets/claude/skills/openspec/SKILL.md +46 -34
  73. package/presets/claude/skills/security/SKILL.md +382 -0
  74. package/presets/claude/skills/security-ai-llm/SKILL.md +43 -0
  75. package/presets/claude/skills/security-blue-team/SKILL.md +43 -0
  76. package/presets/claude/skills/security-cloud/SKILL.md +43 -0
  77. package/presets/claude/skills/security-crypto/SKILL.md +43 -0
  78. package/presets/claude/skills/security-exploit-dev/SKILL.md +45 -0
  79. package/presets/claude/skills/security-grc/SKILL.md +43 -0
  80. package/presets/claude/skills/security-incident-response/SKILL.md +45 -0
  81. package/presets/claude/skills/security-log-analysis/SKILL.md +43 -0
  82. package/presets/claude/skills/security-malware-analysis/SKILL.md +44 -0
  83. package/presets/claude/skills/security-mobile/SKILL.md +43 -0
  84. package/presets/claude/skills/security-network/SKILL.md +43 -0
  85. package/presets/claude/skills/security-ot-ics/SKILL.md +43 -0
  86. package/presets/claude/skills/security-recon/SKILL.md +45 -0
  87. package/presets/claude/skills/security-red-team/SKILL.md +44 -0
  88. package/presets/claude/skills/security-reverse-engineering/SKILL.md +44 -0
  89. package/presets/claude/skills/security-soc-automation/SKILL.md +43 -0
  90. package/presets/claude/skills/security-threat-hunting/SKILL.md +43 -0
  91. package/presets/claude/skills/security-vuln-assessment/SKILL.md +45 -0
  92. package/presets/claude/skills/security-web/SKILL.md +44 -0
  93. package/presets/claude/skills/testing-tdd/SKILL.md +53 -0
  94. package/presets/claude/skills/using-cc-skills/SKILL.md +48 -0
  95. package/presets/codex/AGENTS.md +16 -12
  96. package/presets/codex/commands/cc-ask.md +2 -1
  97. package/presets/codex/gates/pre-commit/GATE.md +5 -4
  98. package/presets/codex/skills/backlog/SKILL.md +61 -0
  99. package/presets/codex/skills/cc-api-contract/SKILL.md +87 -0
  100. package/presets/codex/skills/cc-backlog/SKILL.md +108 -0
  101. package/presets/codex/skills/cc-clarify/SKILL.md +36 -0
  102. package/presets/codex/skills/cc-council/SKILL.md +92 -0
  103. package/presets/codex/skills/cc-db-migration/SKILL.md +88 -0
  104. package/presets/codex/skills/cc-explore/SKILL.md +40 -0
  105. package/presets/codex/skills/cc-feature/SKILL.md +154 -0
  106. package/presets/codex/skills/cc-fix/SKILL.md +165 -0
  107. package/presets/codex/skills/cc-handoff/SKILL.md +45 -0
  108. package/presets/codex/skills/cc-iterative/SKILL.md +150 -0
  109. package/presets/codex/skills/cc-openspec/SKILL.md +191 -0
  110. package/presets/codex/skills/cc-pagespeed/SKILL.md +124 -0
  111. package/presets/codex/skills/cc-prototype/SKILL.md +42 -0
  112. package/presets/codex/skills/cc-refactor/SKILL.md +163 -0
  113. package/presets/codex/skills/cc-review/SKILL.md +152 -0
  114. package/presets/codex/skills/cc-scorecard/SKILL.md +82 -0
  115. package/presets/codex/skills/cc-security/SKILL.md +182 -0
  116. package/presets/codex/skills/cc-spec-mutation/SKILL.md +192 -0
  117. package/presets/codex/skills/cc-tdd-cycle/SKILL.md +266 -0
  118. package/presets/codex/skills/cc-test-plan/SKILL.md +153 -0
  119. package/presets/codex/skills/cc-triage/SKILL.md +38 -0
  120. package/presets/codex/skills/evaluation/SKILL.md +65 -0
  121. package/presets/codex/skills/openspec/SKILL.md +66 -0
  122. package/presets/codex/skills/testing-tdd/SKILL.md +53 -0
  123. package/presets/codex/skills/using-cc-skills/SKILL.md +48 -0
  124. package/presets/cursor/AGENTS.md +2 -2
  125. package/presets/cursor/commands/cc/api-contract.md +14 -0
  126. package/presets/cursor/commands/cc/ask.md +2 -1
  127. package/presets/cursor/commands/cc/backlog.md +105 -0
  128. package/presets/cursor/commands/cc/db-migration.md +14 -0
  129. package/presets/cursor/commands/cc/explore.md +1 -1
  130. package/presets/cursor/commands/cc/feature.md +18 -0
  131. package/presets/cursor/commands/cc/fix.md +17 -0
  132. package/presets/cursor/commands/cc/iterative.md +14 -0
  133. package/presets/cursor/commands/cc/openspec.md +30 -1
  134. package/presets/cursor/commands/cc/scorecard.md +2 -0
  135. package/presets/cursor/commands/cc/security.md +179 -0
  136. package/presets/cursor/commands/cc/spec-mutation.md +190 -0
  137. package/presets/cursor/commands/cc/tdd-cycle.md +14 -0
  138. package/presets/cursor/gates/pre-commit/GATE.md +5 -4
  139. package/presets/cursor/skills/backlog/SKILL.md +61 -0
  140. package/presets/cursor/skills/evaluation/SKILL.md +61 -4
  141. package/presets/cursor/skills/openspec/SKILL.md +47 -33
  142. package/presets/cursor/skills/security-ai-llm/SKILL.md +43 -0
  143. package/presets/cursor/skills/security-blue-team/SKILL.md +43 -0
  144. package/presets/cursor/skills/security-cloud/SKILL.md +43 -0
  145. package/presets/cursor/skills/security-crypto/SKILL.md +43 -0
  146. package/presets/cursor/skills/security-exploit-dev/SKILL.md +45 -0
  147. package/presets/cursor/skills/security-grc/SKILL.md +43 -0
  148. package/presets/cursor/skills/security-incident-response/SKILL.md +45 -0
  149. package/presets/cursor/skills/security-log-analysis/SKILL.md +43 -0
  150. package/presets/cursor/skills/security-malware-analysis/SKILL.md +44 -0
  151. package/presets/cursor/skills/security-mobile/SKILL.md +43 -0
  152. package/presets/cursor/skills/security-network/SKILL.md +43 -0
  153. package/presets/cursor/skills/security-ot-ics/SKILL.md +43 -0
  154. package/presets/cursor/skills/security-recon/SKILL.md +45 -0
  155. package/presets/cursor/skills/security-red-team/SKILL.md +44 -0
  156. package/presets/cursor/skills/security-reverse-engineering/SKILL.md +44 -0
  157. package/presets/cursor/skills/security-soc-automation/SKILL.md +43 -0
  158. package/presets/cursor/skills/security-threat-hunting/SKILL.md +43 -0
  159. package/presets/cursor/skills/security-vuln-assessment/SKILL.md +45 -0
  160. package/presets/cursor/skills/security-web/SKILL.md +44 -0
  161. package/presets/cursor/skills/testing-tdd/SKILL.md +35 -574
  162. package/presets/cursor/skills/using-cc-skills/SKILL.md +48 -0
  163. package/presets/gemini/commands/cc/api-contract.toml +82 -0
  164. package/presets/gemini/commands/cc/ask.toml +54 -0
  165. package/presets/gemini/commands/cc/backlog.toml +103 -0
  166. package/presets/gemini/commands/cc/clarify.toml +31 -0
  167. package/presets/gemini/commands/cc/council.toml +87 -0
  168. package/presets/gemini/commands/cc/db-migration.toml +83 -0
  169. package/presets/gemini/commands/cc/explore.toml +35 -0
  170. package/presets/gemini/commands/cc/feature.toml +153 -0
  171. package/presets/gemini/commands/cc/fix.toml +163 -0
  172. package/presets/gemini/commands/cc/handoff.toml +40 -0
  173. package/presets/gemini/commands/cc/iterative.toml +145 -0
  174. package/presets/gemini/commands/cc/openspec.toml +186 -0
  175. package/presets/gemini/commands/cc/pagespeed.toml +119 -0
  176. package/presets/gemini/commands/cc/prototype.toml +37 -0
  177. package/presets/gemini/commands/cc/refactor.toml +158 -0
  178. package/presets/gemini/commands/cc/review.toml +150 -0
  179. package/presets/gemini/commands/cc/scorecard.toml +77 -0
  180. package/presets/gemini/commands/cc/security.toml +177 -0
  181. package/presets/gemini/commands/cc/spec-mutation.toml +187 -0
  182. package/presets/gemini/commands/cc/tdd-cycle.toml +264 -0
  183. package/presets/gemini/commands/cc/test-plan.toml +148 -0
  184. package/presets/gemini/commands/cc/triage.toml +33 -0
  185. package/presets/opencode/README.md +24 -21
  186. package/presets/opencode/agents/architect.md +6 -0
  187. package/presets/opencode/agents/implementer.md +7 -0
  188. package/presets/opencode/agents/reviewer.md +6 -0
  189. package/presets/opencode/agents/tester.md +6 -0
  190. package/presets/opencode/commands/cc-api-contract.md +14 -0
  191. package/presets/opencode/commands/cc-ask.md +2 -1
  192. package/presets/opencode/commands/cc-backlog.md +68 -0
  193. package/presets/opencode/commands/cc-db-migration.md +14 -0
  194. package/presets/opencode/commands/cc-explore.md +1 -1
  195. package/presets/opencode/commands/cc-feature.md +18 -0
  196. package/presets/opencode/commands/cc-fix.md +17 -0
  197. package/presets/opencode/commands/cc-iterative.md +14 -0
  198. package/presets/opencode/commands/cc-openspec.md +17 -1
  199. package/presets/opencode/commands/cc-scorecard.md +2 -0
  200. package/presets/opencode/commands/cc-security.md +179 -0
  201. package/presets/opencode/commands/cc-spec-mutation.md +190 -0
  202. package/presets/opencode/commands/cc-tdd-cycle.md +14 -0
  203. package/presets/opencode/gates/pre-commit/GATE.md +5 -4
  204. package/presets/opencode/opencode.jsonc +1 -1
  205. package/presets/opencode/prompts/v1.0.0/architect.md +6 -0
  206. package/presets/opencode/prompts/v1.0.0/implementer.md +7 -0
  207. package/presets/opencode/prompts/v1.0.0/reviewer.md +6 -0
  208. package/presets/opencode/prompts/v1.0.0/tester.md +6 -0
  209. package/presets/opencode/skills/backlog/SKILL.md +61 -0
  210. package/presets/opencode/skills/evaluation/SKILL.md +61 -2
  211. package/presets/opencode/skills/openspec/SKILL.md +47 -31
  212. package/presets/opencode/skills/security-ai-llm/SKILL.md +43 -0
  213. package/presets/opencode/skills/security-blue-team/SKILL.md +43 -0
  214. package/presets/opencode/skills/security-cloud/SKILL.md +43 -0
  215. package/presets/opencode/skills/security-crypto/SKILL.md +43 -0
  216. package/presets/opencode/skills/security-exploit-dev/SKILL.md +45 -0
  217. package/presets/opencode/skills/security-grc/SKILL.md +43 -0
  218. package/presets/opencode/skills/security-incident-response/SKILL.md +45 -0
  219. package/presets/opencode/skills/security-log-analysis/SKILL.md +43 -0
  220. package/presets/opencode/skills/security-malware-analysis/SKILL.md +44 -0
  221. package/presets/opencode/skills/security-mobile/SKILL.md +43 -0
  222. package/presets/opencode/skills/security-network/SKILL.md +43 -0
  223. package/presets/opencode/skills/security-ot-ics/SKILL.md +43 -0
  224. package/presets/opencode/skills/security-recon/SKILL.md +45 -0
  225. package/presets/opencode/skills/security-red-team/SKILL.md +44 -0
  226. package/presets/opencode/skills/security-reverse-engineering/SKILL.md +44 -0
  227. package/presets/opencode/skills/security-soc-automation/SKILL.md +43 -0
  228. package/presets/opencode/skills/security-threat-hunting/SKILL.md +43 -0
  229. package/presets/opencode/skills/security-vuln-assessment/SKILL.md +45 -0
  230. package/presets/opencode/skills/security-web/SKILL.md +44 -0
  231. package/presets/opencode/skills/testing-tdd/SKILL.md +35 -574
  232. package/presets/opencode/skills/using-cc-skills/SKILL.md +48 -0
  233. package/presets/shared/__pycache__/mutation_runner.cpython-314.pyc +0 -0
  234. package/presets/shared/invoke-hook.cjs +115 -0
  235. package/presets/shared/mutation_runner.py +273 -0
  236. package/src/presets/council/council.yml +12 -0
  237. package/src/presets/manifests/agy.yml +2 -0
  238. package/src/presets/manifests/claude.yml +3 -0
  239. package/src/presets/manifests/gemini.yml +15 -0
  240. package/src/presets/models/agy.yml +24 -24
  241. package/src/presets/models/claude.yml +10 -10
  242. package/src/presets/models/codex.yml +10 -10
  243. package/src/presets/models/cursor.yml +10 -10
  244. package/src/presets/models/gemini.yml +10 -10
  245. package/src/presets/models/opencode.yml +10 -10
  246. package/presets/agy/scripts/post-tool.sh +0 -25
  247. package/presets/agy/scripts/pre-tool.sh +0 -56
package/dist/library.js CHANGED
@@ -66,6 +66,18 @@ function validateScorecardRecord(data) {
66
66
  function validateTaskOutcome(data) {
67
67
  return TaskOutcomeSchema.parse(data);
68
68
  }
69
+ function validateHarnessCatalog(data) {
70
+ return HarnessCatalogSchema.parse(data);
71
+ }
72
+ function validateHarnessOverlay(data) {
73
+ return HarnessOverlaySchema.parse(data);
74
+ }
75
+ function validateHarnessExperiment(data) {
76
+ return HarnessExperimentSchema.parse(data);
77
+ }
78
+ function validateHarnessSuite(data) {
79
+ return HarnessSuiteSchema.parse(data);
80
+ }
69
81
  function validateCommandEnvelope(data) {
70
82
  return CommandEnvelopeSchema.parse(data);
71
83
  }
@@ -105,7 +117,7 @@ function validateCanonicalTaskCard(data) {
105
117
  function validateProductEvent(data) {
106
118
  return ProductEventSchema.parse(data);
107
119
  }
108
- var CouncilAgentSpecSchema, CouncilSpecSchema, ProjectProfileSchema, CompileCheckConfigSchema, LoopConfigSchema, CodeConductorConfigSchema, RunnerTargetSchema, InstallStrategySchema, ManifestEntrySchema, InstallManifestSchema, ToolProviderNamesSchema, PermissionProviderNamesSchema, ModelConfigSchema, ContractTargetSchema, ContractFormatSchema, AgentContractSchema, CouncilFindingSchema, CouncilVerdictInputSchema, ConsensusConfigSchema, CouncilVerdictSchema, ClaudeAgentFileSchema, OpenCodeAgentFileSchema, SentryStackFrameSchema, SentryWebhookSchema, MemoryPointerSchema, MemoryIndexSchema, GoalTaskSchema, GoalGraphSchema, ConfidenceLevelSchema, ProductNodeTypeSchema, GraphRelationSchema, KnowledgeEntitySchema, DecisionSchema, EvidenceSchema, CanonicalTaskCardStatusSchema, CanonicalTaskCardSchema, ProductGraphNodeSchema, ProductGraphEdgeSchema, ProductGraphSchema, ProductMetaSchema, ProductEventTypeSchema, ProductEventSchema, OperationalStateSchema, StrategicMemorySchema, ImpactReportSchema, BusinessReviewOutputSchema, VerificationReportSchema, BacklogStatusSchema, BacklogTypeSchema, BacklogPrioritySchema, BacklogGlobalSchema, BacklogItemSchema, BacklogDocumentSchema, OpenspecTaskCardPhaseSchema, OpenspecTaskCardStatusSchema, OpenspecTaskCardSchema, OpenspecStateSchema, WorkflowCommandSchema, CcepOutputFormatSchema, CommandEnvelopeSchema, WorkflowPhaseSchema, WorkflowRiskRuleSchema, WorkflowProfileSchema, ExecutionContextSchema, PlannerOutputSchema, AgentArtifactSchema, AgentOutputSchema, ImplementerTestsSchema, ImplementerOutputSchema, ReviewAxisSchema, ReviewFindingSchema, ReviewerOutputSchema, TechnicalPlanOutputSchema, ScorecardVerdictSchema, ScorecardCriterionIdSchema, ScorecardCriterionSchema, ScorecardRecordSchema, TaskOutcomeSourceSchema, TaskOutcomeStatusSchema, TaskOutcomeSchema, EvaluationIndexSchema, ExecutionProfileNameSchema, ExecutionProfileSchema;
120
+ var CouncilAgentSpecSchema, CouncilSpecSchema, ProjectProfileSchema, CompileCheckConfigSchema, LoopConfigSchema, CodeConductorConfigSchema, RunnerTargetSchema, InstallStrategySchema, ManifestEntrySchema, InstallManifestSchema, ToolProviderNamesSchema, PermissionProviderNamesSchema, ModelConfigSchema, ContractTargetSchema, ContractFormatSchema, AgentContractSchema, CouncilFindingSchema, CouncilVerdictInputSchema, ConsensusConfigSchema, CouncilVerdictSchema, ClaudeAgentFileSchema, OpenCodeAgentFileSchema, SentryStackFrameSchema, SentryWebhookSchema, MemoryPointerSchema, MemoryIndexSchema, GoalTaskSchema, GoalGraphSchema, ConfidenceLevelSchema, ProductNodeTypeSchema, GraphRelationSchema, KnowledgeEntitySchema, DecisionSchema, EvidenceSchema, CanonicalTaskCardStatusSchema, CanonicalTaskCardSchema, ProductGraphNodeSchema, ProductGraphEdgeSchema, ProductGraphSchema, ProductMetaSchema, ProductEventTypeSchema, ProductEventSchema, OperationalStateSchema, StrategicMemorySchema, ImpactReportSchema, BusinessReviewOutputSchema, VerificationReportSchema, BacklogStatusSchema, BacklogTypeSchema, BacklogPrioritySchema, BacklogGlobalSchema, BacklogItemSchema, BacklogDocumentSchema, OpenspecTaskCardPhaseSchema, OpenspecTaskCardStatusSchema, OpenspecTaskCardSchema, OpenspecStateSchema, SpecAnalyzeFindingSchema, SpecAnalyzeReportSchema, WorkflowCommandSchema, CcepOutputFormatSchema, CommandEnvelopeSchema, WorkflowPhaseSchema, WorkflowRiskRuleSchema, WorkflowProfileSchema, ExecutionContextSchema, PlannerOutputSchema, AgentArtifactSchema, AgentOutputSchema, ImplementerTestsSchema, ImplementerOutputSchema, ReviewAxisSchema, ReviewFindingSchema, ReviewerOutputSchema, TechnicalPlanOutputSchema, ScorecardVerdictSchema, ScorecardCriterionIdSchema, ScorecardCriterionSchema, ScorecardRecordSchema, TaskOutcomeSourceSchema, TaskOutcomeStatusSchema, TaskOutcomeSchema, HarnessComponentIdSchema, HarnessComponentLayerSchema, HarnessToggleKindSchema, HarnessCatalogEntrySchema, HarnessCatalogSchema, HarnessOverlaySchema, HarnessExperimentSchema, HarnessSuiteTaskSchema, HarnessSuiteSchema, EvaluationIndexSchema, ExecutionProfileNameSchema, ExecutionProfileSchema;
109
121
  var init_schemas = __esm(() => {
110
122
  CouncilAgentSpecSchema = z.object({
111
123
  id: z.string(),
@@ -126,7 +138,7 @@ var init_schemas = __esm(() => {
126
138
  version: z.string(),
127
139
  description: z.string(),
128
140
  outputContract: z.string(),
129
- agents: z.array(CouncilAgentSpecSchema)
141
+ agents: z.array(CouncilAgentSpecSchema).min(1).refine((agents) => new Set(agents.map((a) => a.id.trim().toLowerCase())).size === agents.length, { message: "council agent ids must be unique" })
130
142
  });
131
143
  ProjectProfileSchema = z.object({
132
144
  rootDir: z.string(),
@@ -248,7 +260,7 @@ var init_schemas = __esm(() => {
248
260
  status: z.enum(["APPROVED", "REJECTED", "ABSTAIN"]),
249
261
  securityVeto: z.boolean(),
250
262
  complianceVeto: z.boolean().optional(),
251
- confidence: z.number().min(0).max(1).optional(),
263
+ confidence: z.number().min(0).max(1),
252
264
  findings: z.array(CouncilFindingSchema),
253
265
  summary: z.string()
254
266
  });
@@ -256,10 +268,15 @@ var init_schemas = __esm(() => {
256
268
  algorithm: z.enum(["majority", "unanimous"]),
257
269
  allowSecurityVeto: z.boolean(),
258
270
  allowComplianceVeto: z.boolean().optional(),
259
- expectedAgentIds: z.array(z.string().min(1).refine((id) => id.trim().length > 0)).min(1).refine((ids) => new Set(ids.map((id) => id.trim().toLowerCase())).size === ids.length).optional()
271
+ expectedAgentIds: z.array(z.string().min(1).refine((id) => id.trim().length > 0)).min(1).refine((ids) => new Set(ids.map((id) => id.trim().toLowerCase())).size === ids.length).optional(),
272
+ quorum: z.number().int().positive().optional(),
273
+ criticalFindingsPolicy: z.enum(["escalate", "reject", "ignore"]).optional()
260
274
  }).refine((config) => config.algorithm !== "unanimous" || config.expectedAgentIds !== undefined, {
261
275
  message: "unanimous consensus requires a non-empty expectedAgentIds roster",
262
276
  path: ["expectedAgentIds"]
277
+ }).refine((config) => !config.allowSecurityVeto || config.expectedAgentIds === undefined || config.expectedAgentIds.some((id) => id.toLowerCase().includes("security")), {
278
+ message: "allowSecurityVeto requires at least one security agent in expectedAgentIds",
279
+ path: ["expectedAgentIds"]
263
280
  });
264
281
  CouncilVerdictSchema = z.object({
265
282
  status: z.enum(["APPROVED", "REJECTED", "ESCALATED"]),
@@ -411,8 +428,17 @@ var init_schemas = __esm(() => {
411
428
  agentType: z.string(),
412
429
  evidenceRequired: z.array(z.string()).default([]),
413
430
  status: CanonicalTaskCardStatusSchema,
414
- type: z.enum(["feature", "fix", "refactor", "review", "docs", "test"]).optional(),
415
- linkedCapabilities: z.array(z.string()).default([])
431
+ type: z.enum(["feature", "fix", "refactor", "review", "docs", "test"]),
432
+ linkedCapabilities: z.array(z.string()).default([]),
433
+ boundaries: z.array(z.string()).default([]),
434
+ requiresHumanReview: z.boolean().optional(),
435
+ requiresTests: z.boolean().optional(),
436
+ contextScope: z.enum(["isolated", "continuation", "full"]).optional(),
437
+ actualBehavior: z.string().optional(),
438
+ expectedBehavior: z.string().optional(),
439
+ reproductionSteps: z.array(z.string()).optional(),
440
+ domain: z.string().optional(),
441
+ authorization: z.string().optional()
416
442
  });
417
443
  ProductGraphNodeSchema = z.object({
418
444
  id: z.string(),
@@ -570,7 +596,8 @@ var init_schemas = __esm(() => {
570
596
  modelHint: z.string().optional(),
571
597
  dependsOn: z.array(z.string()).default([]),
572
598
  acceptanceCriteria: z.array(z.string()),
573
- status: OpenspecTaskCardStatusSchema
599
+ status: OpenspecTaskCardStatusSchema,
600
+ itemHash: z.string().optional()
574
601
  });
575
602
  OpenspecStateSchema = z.object({
576
603
  version: z.literal(1),
@@ -581,6 +608,24 @@ var init_schemas = __esm(() => {
581
608
  changePaths: z.record(z.string(), z.string()).optional().default({}),
582
609
  itemSnapshots: z.record(z.string(), z.string()).optional().default({})
583
610
  });
611
+ SpecAnalyzeFindingSchema = z.object({
612
+ severity: z.enum(["CRITICAL", "HIGH", "MEDIUM", "LOW"]),
613
+ code: z.string(),
614
+ message: z.string()
615
+ });
616
+ SpecAnalyzeReportSchema = z.object({
617
+ changePath: z.string(),
618
+ frIds: z.array(z.string()),
619
+ scIds: z.array(z.string()),
620
+ mappedFr: z.array(z.string()),
621
+ mappedSc: z.array(z.string()),
622
+ mappedToTests: z.array(z.string()),
623
+ frCoveragePct: z.number(),
624
+ scCoveragePct: z.number(),
625
+ testCoveragePct: z.number(),
626
+ findings: z.array(SpecAnalyzeFindingSchema),
627
+ stop: z.boolean()
628
+ });
584
629
  WorkflowCommandSchema = z.enum([
585
630
  "feature",
586
631
  "fix",
@@ -588,10 +633,12 @@ var init_schemas = __esm(() => {
588
633
  "review",
589
634
  "test-plan",
590
635
  "tdd-cycle",
636
+ "spec-mutation",
591
637
  "api-contract",
592
638
  "db-migration",
593
639
  "pagespeed",
594
640
  "openspec",
641
+ "backlog",
595
642
  "scorecard",
596
643
  "council",
597
644
  "iterative",
@@ -599,7 +646,8 @@ var init_schemas = __esm(() => {
599
646
  "triage",
600
647
  "prototype",
601
648
  "handoff",
602
- "clarify"
649
+ "clarify",
650
+ "security"
603
651
  ]);
604
652
  CcepOutputFormatSchema = z.enum(["taskcard", "plan", "verdict"]);
605
653
  CommandEnvelopeSchema = z.object({
@@ -833,7 +881,86 @@ var init_schemas = __esm(() => {
833
881
  tokensIn: z.number().optional(),
834
882
  tokensOut: z.number().optional(),
835
883
  costUsd: z.number().optional(),
836
- durationMs: z.number().optional()
884
+ durationMs: z.number().optional(),
885
+ experimentId: z.string().optional(),
886
+ variantId: z.string().optional(),
887
+ suiteTaskId: z.string().optional(),
888
+ harnessFingerprint: z.string().optional(),
889
+ disabledComponents: z.array(z.string()).optional()
890
+ });
891
+ HarnessComponentIdSchema = z.enum([
892
+ "wayfinding",
893
+ "intake",
894
+ "design",
895
+ "test_first",
896
+ "review",
897
+ "docs",
898
+ "confirmation_gates",
899
+ "compile_loop",
900
+ "council",
901
+ "product_graph"
902
+ ]);
903
+ HarnessComponentLayerSchema = z.enum([
904
+ "phase",
905
+ "gate",
906
+ "loop",
907
+ "knowledge",
908
+ "council"
909
+ ]);
910
+ HarnessToggleKindSchema = z.enum([
911
+ "ccep_phase",
912
+ "ccep_gates",
913
+ "config_loop",
914
+ "config_council",
915
+ "product_graph"
916
+ ]);
917
+ HarnessCatalogEntrySchema = z.object({
918
+ id: HarnessComponentIdSchema,
919
+ layer: HarnessComponentLayerSchema,
920
+ label: z.string(),
921
+ defaultOn: z.boolean().default(true),
922
+ toggle: z.object({
923
+ kind: HarnessToggleKindSchema,
924
+ phaseId: z.string().optional()
925
+ })
926
+ });
927
+ HarnessCatalogSchema = z.object({
928
+ version: z.literal(1),
929
+ components: z.array(HarnessCatalogEntrySchema).min(1)
930
+ });
931
+ HarnessOverlaySchema = z.object({
932
+ experimentId: z.string().optional(),
933
+ variantId: z.string(),
934
+ disabledComponents: z.array(HarnessComponentIdSchema),
935
+ disableProductGraph: z.boolean().optional().default(false),
936
+ contractVersion: z.string().optional(),
937
+ ccepProfile: z.string().optional().default("feature")
938
+ });
939
+ HarnessExperimentSchema = z.object({
940
+ id: z.string(),
941
+ suiteId: z.string(),
942
+ createdAt: z.string(),
943
+ contractVersion: z.string(),
944
+ components: z.array(HarnessComponentIdSchema),
945
+ variants: z.array(z.string()).min(1),
946
+ suiteTaskIds: z.array(z.string()),
947
+ suitePath: z.string().optional()
948
+ });
949
+ HarnessSuiteTaskSchema = z.object({
950
+ id: z.string(),
951
+ title: z.string(),
952
+ type: z.enum(["feature", "fix", "refactor"]),
953
+ risk: z.enum(["low", "medium", "high"]).default("low"),
954
+ prompt: z.string(),
955
+ scope: z.string(),
956
+ acceptanceCriteria: z.array(z.string()).min(1),
957
+ testCommand: z.string().optional()
958
+ });
959
+ HarnessSuiteSchema = z.object({
960
+ id: z.string(),
961
+ version: z.number().int().positive(),
962
+ fixtureDir: z.string().optional(),
963
+ tasks: z.array(HarnessSuiteTaskSchema).min(1)
837
964
  });
838
965
  EvaluationIndexSchema = z.object({
839
966
  version: z.literal(1),
@@ -1744,6 +1871,12 @@ async function loadTddSuiteEvidence(projectRoot, taskId, evidenceId) {
1744
1871
  }
1745
1872
  return ok({ capturedBy, suiteFailed, suitePassed });
1746
1873
  }
1874
+ async function hasTddRunnerEvidence(projectRoot, taskId) {
1875
+ const collected = await collectTaskEvidence(projectRoot, taskId);
1876
+ if (!collected.success)
1877
+ return false;
1878
+ return collected.data.records.some((ev) => ev.type === "tdd" && ev.source === TDD_EVIDENCE_SOURCE && ev.data?.capturedBy === TDD_CAPTURED_BY);
1879
+ }
1747
1880
 
1748
1881
  // src/core/orchestrator/runtime-orchestrator.ts
1749
1882
  async function rollbackTaskStatus(projectRoot, graph, task, previousStatus, previousState, cause) {
@@ -1779,7 +1912,8 @@ function goalTaskToCanonicalCard(task, objective) {
1779
1912
  evidenceRequired: task.evidenceRequired ?? ["acceptance_criteria_met"],
1780
1913
  status: task.status === "in-progress" ? "in-progress" : task.status === "done" ? "done" : task.status === "blocked" ? "blocked" : "ready",
1781
1914
  type: task.type,
1782
- linkedCapabilities: []
1915
+ linkedCapabilities: [],
1916
+ boundaries: []
1783
1917
  };
1784
1918
  }
1785
1919
  function buildTaskEnvelope(card, projectRoot, projectName) {
@@ -2242,6 +2376,8 @@ async function runLoop(generateFn, compileCheckFn, config = {}, taskTitle = "com
2242
2376
  let state = createInitialState({ maxIterations, maxTokenBudget });
2243
2377
  let totalErrors = 0;
2244
2378
  let feedbackText;
2379
+ let compileCheck;
2380
+ let compileCheckSkipReason;
2245
2381
  logTransition(state.phase, "INIT", state.iteration);
2246
2382
  const startResult = loopStateMachine(state, { type: "START" });
2247
2383
  state = startResult.state;
@@ -2277,6 +2413,12 @@ async function runLoop(generateFn, compileCheckFn, config = {}, taskTitle = "com
2277
2413
  logTransition(state.phase, "COMPILE_CHECK", state.iteration);
2278
2414
  const compileResult = await compileCheckFn();
2279
2415
  totalErrors += compileResult.errors.length;
2416
+ if (compileResult.skipped) {
2417
+ compileCheck = "skipped";
2418
+ compileCheckSkipReason = compileResult.skipReason;
2419
+ } else {
2420
+ compileCheck = "ran";
2421
+ }
2280
2422
  const checkResult = loopStateMachine(state, {
2281
2423
  type: "COMPILE_CHECK_COMPLETED",
2282
2424
  errors: compileResult.errors
@@ -2300,7 +2442,9 @@ async function runLoop(generateFn, compileCheckFn, config = {}, taskTitle = "com
2300
2442
  iterations: state.iteration,
2301
2443
  totalErrors,
2302
2444
  finalPhase: "DONE",
2303
- errorHistory: state.errorHistory
2445
+ errorHistory: state.errorHistory,
2446
+ compileCheck,
2447
+ compileCheckSkipReason
2304
2448
  };
2305
2449
  }
2306
2450
  case "ESCALATED": {
@@ -2312,7 +2456,9 @@ async function runLoop(generateFn, compileCheckFn, config = {}, taskTitle = "com
2312
2456
  totalErrors,
2313
2457
  finalPhase: "ESCALATED",
2314
2458
  escalationReport: report,
2315
- errorHistory: state.errorHistory
2459
+ errorHistory: state.errorHistory,
2460
+ compileCheck,
2461
+ compileCheckSkipReason
2316
2462
  };
2317
2463
  }
2318
2464
  case "FAILED": {
@@ -2322,7 +2468,9 @@ async function runLoop(generateFn, compileCheckFn, config = {}, taskTitle = "com
2322
2468
  iterations: state.iteration,
2323
2469
  totalErrors,
2324
2470
  finalPhase: "FAILED",
2325
- errorHistory: state.errorHistory
2471
+ errorHistory: state.errorHistory,
2472
+ compileCheck,
2473
+ compileCheckSkipReason
2326
2474
  };
2327
2475
  }
2328
2476
  default: {
@@ -2332,7 +2480,9 @@ async function runLoop(generateFn, compileCheckFn, config = {}, taskTitle = "com
2332
2480
  iterations: state.iteration,
2333
2481
  totalErrors,
2334
2482
  finalPhase: state.phase,
2335
- errorHistory: state.errorHistory
2483
+ errorHistory: state.errorHistory,
2484
+ compileCheck,
2485
+ compileCheckSkipReason
2336
2486
  };
2337
2487
  }
2338
2488
  }
@@ -2398,6 +2548,15 @@ var CLEAN_COMPILE = {
2398
2548
  durationMs: 0,
2399
2549
  timedOut: false
2400
2550
  };
2551
+ function skippedCompileResult(reason) {
2552
+ return {
2553
+ ...CLEAN_COMPILE,
2554
+ skipped: true,
2555
+ skipReason: reason,
2556
+ stderr: `compileCheck: skipped
2557
+ ${reason}`
2558
+ };
2559
+ }
2401
2560
  function shouldRunAgentLoop(type, agentType, phase) {
2402
2561
  if (phase === "implement" || phase === "test")
2403
2562
  return true;
@@ -2421,11 +2580,13 @@ async function runLoopForProject(projectRoot, options) {
2421
2580
  const loopCfg = configResult.success ? configResult.data.loop : undefined;
2422
2581
  const compileCheck = configResult.success ? configResult.data.safety.compileCheck : undefined;
2423
2582
  const compileCheckFn = async () => {
2424
- if (!compileCheck?.enabled || !compileCheck.command)
2425
- return CLEAN_COMPILE;
2583
+ if (!compileCheck?.enabled || !compileCheck.command) {
2584
+ return skippedCompileResult(!compileCheck?.enabled ? "Compile check is not enabled in config." : "Compile check is enabled but no command is configured.");
2585
+ }
2426
2586
  const allowed = options.allowCompileCheck === true || isAllowlistedCompileCommand(compileCheck.command);
2427
- if (!allowed)
2428
- return CLEAN_COMPILE;
2587
+ if (!allowed) {
2588
+ return skippedCompileResult("Compile check not executed: the command is not on the compile allowlist. " + "Re-run with --allow-compile-check to trust it.");
2589
+ }
2429
2590
  const result = await runCompileCheck({
2430
2591
  command: compileCheck.command,
2431
2592
  cwd: projectRoot,
@@ -2471,6 +2632,10 @@ export {
2471
2632
  validateMemoryIndex,
2472
2633
  validateKnowledgeEntity,
2473
2634
  validateImplementerOutput,
2635
+ validateHarnessSuite,
2636
+ validateHarnessOverlay,
2637
+ validateHarnessExperiment,
2638
+ validateHarnessCatalog,
2474
2639
  validateGoalGraph,
2475
2640
  validateExecutionContext,
2476
2641
  validateEvidenceIds,
@@ -2496,6 +2661,7 @@ export {
2496
2661
  rollbackTaskStatus,
2497
2662
  loopStateMachine,
2498
2663
  loadTddSuiteEvidence,
2664
+ hasTddRunnerEvidence,
2499
2665
  goalTaskToCanonicalCard,
2500
2666
  getReadyTasks,
2501
2667
  getNextTask,
@@ -2519,6 +2685,8 @@ export {
2519
2685
  TaskOutcomeSourceSchema,
2520
2686
  TaskOutcomeSchema,
2521
2687
  StrategicMemorySchema,
2688
+ SpecAnalyzeReportSchema,
2689
+ SpecAnalyzeFindingSchema,
2522
2690
  SentryWebhookSchema,
2523
2691
  SentryStackFrameSchema,
2524
2692
  ScorecardVerdictSchema,
@@ -2557,6 +2725,15 @@ export {
2557
2725
  ImplementerTestsSchema,
2558
2726
  ImplementerOutputSchema,
2559
2727
  ImpactReportSchema,
2728
+ HarnessToggleKindSchema,
2729
+ HarnessSuiteTaskSchema,
2730
+ HarnessSuiteSchema,
2731
+ HarnessOverlaySchema,
2732
+ HarnessExperimentSchema,
2733
+ HarnessComponentLayerSchema,
2734
+ HarnessComponentIdSchema,
2735
+ HarnessCatalogSchema,
2736
+ HarnessCatalogEntrySchema,
2560
2737
  GraphRelationSchema,
2561
2738
  GoalTaskSchema,
2562
2739
  GoalGraphSchema,