cc-codeconductor 0.5.0 → 1.0.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 (174) hide show
  1. package/README.md +95 -95
  2. package/dist/cli/errors.d.ts +65 -0
  3. package/dist/core/compilation/compile-checker.d.ts +51 -0
  4. package/dist/core/config/codeconductor-config.d.ts +42 -0
  5. package/dist/core/config/config-loader.d.ts +11 -0
  6. package/dist/core/filesystem/credential-guard.d.ts +18 -0
  7. package/dist/core/goal/goal-planner.d.ts +8 -0
  8. package/dist/core/goal/goal-state.d.ts +15 -0
  9. package/dist/core/loop/git-stats.d.ts +13 -0
  10. package/dist/core/loop/loop-engine.d.ts +79 -0
  11. package/dist/core/memory/episodic-store.d.ts +6 -0
  12. package/dist/core/memory/operational-state.d.ts +6 -0
  13. package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
  14. package/dist/core/planner/product-planner.d.ts +18 -0
  15. package/dist/core/presets/package-paths.d.ts +4 -0
  16. package/dist/core/product-graph/graph-store.d.ts +11 -0
  17. package/dist/core/product-graph/paths.d.ts +18 -0
  18. package/dist/core/verification/verification-runner.d.ts +57 -0
  19. package/dist/domain/loop/loop-state.d.ts +74 -0
  20. package/dist/domain/product/entities.d.ts +11 -0
  21. package/dist/index.d.ts +15 -0
  22. package/dist/index.js +21820 -15579
  23. package/dist/library.js +2595 -0
  24. package/dist/utils/result.d.ts +36 -0
  25. package/dist/validation/schemas.d.ts +3660 -0
  26. package/package.json +15 -2
  27. package/policy.yml +12 -11
  28. package/presets/agy/AGENTS.md +11 -5
  29. package/presets/agy/gates/pre-commit/GATE.md +136 -0
  30. package/presets/agy/skills/cc-fix/SKILL.md +2 -2
  31. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
  32. package/presets/agy/workflows/cc-api-contract.md +12 -0
  33. package/presets/agy/workflows/cc-ask.md +55 -0
  34. package/presets/agy/workflows/cc-clarify.md +33 -0
  35. package/presets/agy/workflows/cc-council.md +31 -7
  36. package/presets/agy/workflows/cc-db-migration.md +22 -9
  37. package/presets/agy/workflows/cc-explore.md +37 -0
  38. package/presets/agy/workflows/cc-feature.md +41 -19
  39. package/presets/agy/workflows/cc-fix.md +50 -23
  40. package/presets/agy/workflows/cc-handoff.md +42 -0
  41. package/presets/agy/workflows/cc-iterative.md +128 -0
  42. package/presets/agy/workflows/cc-openspec.md +13 -0
  43. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  44. package/presets/agy/workflows/cc-prototype.md +39 -0
  45. package/presets/agy/workflows/cc-refactor.md +12 -0
  46. package/presets/agy/workflows/cc-review.md +12 -0
  47. package/presets/agy/workflows/cc-scorecard.md +12 -0
  48. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  49. package/presets/agy/workflows/cc-test-plan.md +12 -0
  50. package/presets/agy/workflows/cc-triage.md +35 -0
  51. package/presets/claude/CLAUDE.md +64 -0
  52. package/presets/claude/commands/cc/api-contract.md +12 -0
  53. package/presets/claude/commands/cc/ask.md +55 -0
  54. package/presets/claude/commands/cc/clarify.md +32 -0
  55. package/presets/claude/commands/cc/council.md +87 -0
  56. package/presets/claude/commands/cc/db-migration.md +22 -9
  57. package/presets/claude/commands/cc/explore.md +36 -0
  58. package/presets/claude/commands/cc/feature.md +49 -22
  59. package/presets/claude/commands/cc/fix.md +74 -20
  60. package/presets/claude/commands/cc/handoff.md +44 -0
  61. package/presets/claude/commands/cc/iterative.md +132 -0
  62. package/presets/claude/commands/cc/openspec.md +25 -0
  63. package/presets/claude/commands/cc/pagespeed.md +12 -0
  64. package/presets/claude/commands/cc/prototype.md +38 -0
  65. package/presets/claude/commands/cc/refactor.md +152 -1
  66. package/presets/claude/commands/cc/review.md +78 -16
  67. package/presets/claude/commands/cc/scorecard.md +12 -0
  68. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  69. package/presets/claude/commands/cc/test-plan.md +12 -0
  70. package/presets/claude/commands/cc/triage.md +34 -0
  71. package/presets/claude/gates/pre-commit/GATE.md +136 -0
  72. package/presets/claude/settings.json +8 -46
  73. package/presets/codex/AGENTS.md +6 -6
  74. package/presets/codex/commands/cc-ask.md +55 -0
  75. package/presets/codex/gates/pre-commit/GATE.md +136 -0
  76. package/presets/cursor/AGENTS.md +6 -6
  77. package/presets/cursor/agents/business-agent.md +44 -0
  78. package/presets/cursor/agents/continuous-architect.md +37 -0
  79. package/presets/cursor/agents/docs.md +1 -0
  80. package/presets/cursor/agents/goal-planner.md +1 -1
  81. package/presets/cursor/agents/impact-analyst.md +43 -0
  82. package/presets/cursor/agents/orchestrator.md +6 -6
  83. package/presets/cursor/commands/cc/api-contract.md +12 -0
  84. package/presets/cursor/commands/cc/ask.md +55 -0
  85. package/presets/cursor/commands/cc/clarify.md +32 -0
  86. package/presets/cursor/commands/cc/council.md +87 -0
  87. package/presets/cursor/commands/cc/db-migration.md +22 -9
  88. package/presets/cursor/commands/cc/explore.md +36 -0
  89. package/presets/cursor/commands/cc/feature.md +41 -19
  90. package/presets/cursor/commands/cc/fix.md +47 -20
  91. package/presets/cursor/commands/cc/handoff.md +41 -0
  92. package/presets/cursor/commands/cc/iterative.md +133 -0
  93. package/presets/cursor/commands/cc/openspec.md +22 -7
  94. package/presets/cursor/commands/cc/pagespeed.md +12 -0
  95. package/presets/cursor/commands/cc/prototype.md +38 -0
  96. package/presets/cursor/commands/cc/refactor.md +12 -0
  97. package/presets/cursor/commands/cc/review.md +12 -0
  98. package/presets/cursor/commands/cc/scorecard.md +12 -0
  99. package/presets/cursor/commands/cc/tdd-cycle.md +24 -0
  100. package/presets/cursor/commands/cc/test-plan.md +12 -0
  101. package/presets/cursor/commands/cc/triage.md +34 -0
  102. package/presets/cursor/gates/pre-commit/GATE.md +136 -0
  103. package/presets/cursor/rules/orchestration.mdc +1 -1
  104. package/presets/opencode/agents/architect.md +22 -1
  105. package/presets/opencode/agents/complexity-auditor.md +16 -1
  106. package/presets/opencode/agents/contract-builder.md +17 -1
  107. package/presets/opencode/agents/devil.md +158 -0
  108. package/presets/opencode/agents/docs.md +19 -1
  109. package/presets/opencode/agents/goal-planner.md +32 -2
  110. package/presets/opencode/agents/implementer.md +32 -2
  111. package/presets/opencode/agents/orchestrator.md +79 -12
  112. package/presets/opencode/agents/planner.md +61 -0
  113. package/presets/opencode/agents/repo-explorer.md +16 -0
  114. package/presets/opencode/agents/reviewer.md +33 -3
  115. package/presets/opencode/agents/security-reviewer.md +31 -1
  116. package/presets/opencode/agents/task-coach.md +69 -1
  117. package/presets/opencode/agents/tester.md +18 -1
  118. package/presets/opencode/commands/cc-api-contract.md +12 -0
  119. package/presets/opencode/commands/cc-ask.md +55 -0
  120. package/presets/opencode/commands/cc-clarify.md +31 -0
  121. package/presets/opencode/commands/cc-council.md +87 -0
  122. package/presets/opencode/commands/cc-db-migration.md +22 -9
  123. package/presets/opencode/commands/cc-explore.md +35 -0
  124. package/presets/opencode/commands/cc-feature.md +41 -19
  125. package/presets/opencode/commands/cc-fix.md +50 -23
  126. package/presets/opencode/commands/cc-handoff.md +40 -0
  127. package/presets/opencode/commands/cc-iterative.md +127 -0
  128. package/presets/opencode/commands/cc-openspec.md +13 -0
  129. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  130. package/presets/opencode/commands/cc-prototype.md +37 -0
  131. package/presets/opencode/commands/cc-refactor.md +12 -0
  132. package/presets/opencode/commands/cc-review.md +12 -0
  133. package/presets/opencode/commands/cc-scorecard.md +12 -0
  134. package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
  135. package/presets/opencode/commands/cc-test-plan.md +12 -0
  136. package/presets/opencode/commands/cc-triage.md +33 -0
  137. package/presets/opencode/gates/pre-commit/GATE.md +136 -0
  138. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
  139. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
  140. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
  141. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
  142. package/presets/opencode/prompts/v0.5.0/goal-planner.md +1 -1
  143. package/presets/opencode/prompts/v0.5.0/orchestrator.md +6 -6
  144. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  145. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  146. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  147. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  148. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  149. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  150. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  151. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  152. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  153. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  154. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  155. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  156. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  157. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  158. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  159. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  160. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  161. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  162. package/presets/seo-hotel/settings.json +0 -17
  163. package/src/presets/manifests/agy.yml +2 -2
  164. package/src/presets/manifests/claude.yml +2 -2
  165. package/src/presets/manifests/codex.yml +2 -2
  166. package/src/presets/manifests/cursor.yml +2 -2
  167. package/src/presets/manifests/gemini.yml +2 -2
  168. package/src/presets/manifests/opencode.yml +2 -2
  169. package/src/presets/models/agy.yml +93 -66
  170. package/src/presets/models/claude.yml +79 -53
  171. package/src/presets/models/codex.yml +79 -54
  172. package/src/presets/models/cursor.yml +72 -58
  173. package/src/presets/models/gemini.yml +79 -53
  174. package/src/presets/models/opencode.yml +72 -46
@@ -0,0 +1,3660 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Council agent spec schema
4
+ */
5
+ export declare const CouncilAgentSpecSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ role: z.ZodString;
8
+ context: z.ZodEnum<["repo-readonly", "prompt-only"]>;
9
+ modelHint: z.ZodEnum<["strong-reasoning", "security-reasoning", "balanced", "practical-coding", "analytical", "adversarial"]>;
10
+ focus: z.ZodArray<z.ZodString, "many">;
11
+ }, "strip", z.ZodTypeAny, {
12
+ id: string;
13
+ role: string;
14
+ context: "repo-readonly" | "prompt-only";
15
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
16
+ focus: string[];
17
+ }, {
18
+ id: string;
19
+ role: string;
20
+ context: "repo-readonly" | "prompt-only";
21
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
22
+ focus: string[];
23
+ }>;
24
+ /**
25
+ * Council spec schema
26
+ */
27
+ export declare const CouncilSpecSchema: z.ZodObject<{
28
+ name: z.ZodString;
29
+ version: z.ZodString;
30
+ description: z.ZodString;
31
+ outputContract: z.ZodString;
32
+ agents: z.ZodArray<z.ZodObject<{
33
+ id: z.ZodString;
34
+ role: z.ZodString;
35
+ context: z.ZodEnum<["repo-readonly", "prompt-only"]>;
36
+ modelHint: z.ZodEnum<["strong-reasoning", "security-reasoning", "balanced", "practical-coding", "analytical", "adversarial"]>;
37
+ focus: z.ZodArray<z.ZodString, "many">;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id: string;
40
+ role: string;
41
+ context: "repo-readonly" | "prompt-only";
42
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
43
+ focus: string[];
44
+ }, {
45
+ id: string;
46
+ role: string;
47
+ context: "repo-readonly" | "prompt-only";
48
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
49
+ focus: string[];
50
+ }>, "many">;
51
+ }, "strip", z.ZodTypeAny, {
52
+ name: string;
53
+ version: string;
54
+ description: string;
55
+ outputContract: string;
56
+ agents: {
57
+ id: string;
58
+ role: string;
59
+ context: "repo-readonly" | "prompt-only";
60
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
61
+ focus: string[];
62
+ }[];
63
+ }, {
64
+ name: string;
65
+ version: string;
66
+ description: string;
67
+ outputContract: string;
68
+ agents: {
69
+ id: string;
70
+ role: string;
71
+ context: "repo-readonly" | "prompt-only";
72
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
73
+ focus: string[];
74
+ }[];
75
+ }>;
76
+ /**
77
+ * Project profile schema
78
+ */
79
+ export declare const ProjectProfileSchema: z.ZodObject<{
80
+ rootDir: z.ZodString;
81
+ languages: z.ZodArray<z.ZodString, "many">;
82
+ runtimes: z.ZodArray<z.ZodString, "many">;
83
+ packageManagers: z.ZodArray<z.ZodString, "many">;
84
+ frameworks: z.ZodArray<z.ZodString, "many">;
85
+ signals: z.ZodArray<z.ZodString, "many">;
86
+ confidence: z.ZodEnum<["low", "medium", "high"]>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ rootDir: string;
89
+ languages: string[];
90
+ runtimes: string[];
91
+ packageManagers: string[];
92
+ frameworks: string[];
93
+ signals: string[];
94
+ confidence: "low" | "medium" | "high";
95
+ }, {
96
+ rootDir: string;
97
+ languages: string[];
98
+ runtimes: string[];
99
+ packageManagers: string[];
100
+ frameworks: string[];
101
+ signals: string[];
102
+ confidence: "low" | "medium" | "high";
103
+ }>;
104
+ /**
105
+ * Compile check config schema — validates the compileCheck section.
106
+ *
107
+ * `command` is a string from the analyzed repo. Verification only executes it
108
+ * when `--allow-compile-check` is set or the argv matches the compile allowlist.
109
+ */
110
+ export declare const CompileCheckConfigSchema: z.ZodObject<{
111
+ enabled: z.ZodBoolean;
112
+ command: z.ZodOptional<z.ZodString>;
113
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ enabled: boolean;
116
+ command?: string | undefined;
117
+ timeoutMs?: number | undefined;
118
+ }, {
119
+ enabled: boolean;
120
+ command?: string | undefined;
121
+ timeoutMs?: number | undefined;
122
+ }>;
123
+ /**
124
+ * Loop config schema — validates the loop section for compile-fix iteration
125
+ */
126
+ export declare const LoopConfigSchema: z.ZodObject<{
127
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
128
+ maxIterations: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
129
+ maxTokenBudget: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
130
+ compaction: z.ZodOptional<z.ZodObject<{
131
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
132
+ historyFile: z.ZodOptional<z.ZodString>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ enabled: boolean;
135
+ historyFile?: string | undefined;
136
+ }, {
137
+ enabled?: boolean | undefined;
138
+ historyFile?: string | undefined;
139
+ }>>;
140
+ }, "strip", z.ZodTypeAny, {
141
+ enabled: boolean;
142
+ maxIterations: number;
143
+ maxTokenBudget: number;
144
+ compaction?: {
145
+ enabled: boolean;
146
+ historyFile?: string | undefined;
147
+ } | undefined;
148
+ }, {
149
+ enabled?: boolean | undefined;
150
+ maxIterations?: number | undefined;
151
+ maxTokenBudget?: number | undefined;
152
+ compaction?: {
153
+ enabled?: boolean | undefined;
154
+ historyFile?: string | undefined;
155
+ } | undefined;
156
+ }>;
157
+ /**
158
+ * CodeConductor config schema
159
+ */
160
+ export declare const CodeConductorConfigSchema: z.ZodObject<{
161
+ version: z.ZodString;
162
+ project: z.ZodObject<{
163
+ name: z.ZodString;
164
+ profile: z.ZodOptional<z.ZodString>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ name: string;
167
+ profile?: string | undefined;
168
+ }, {
169
+ name: string;
170
+ profile?: string | undefined;
171
+ }>;
172
+ defaults: z.ZodObject<{
173
+ target: z.ZodEnum<["opencode", "claude", "codex", "gemini", "cursor", "agy"]>;
174
+ overwrite: z.ZodBoolean;
175
+ locale: z.ZodDefault<z.ZodOptional<z.ZodEnum<["en", "es"]>>>;
176
+ }, "strip", z.ZodTypeAny, {
177
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
178
+ overwrite: boolean;
179
+ locale: "en" | "es";
180
+ }, {
181
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
182
+ overwrite: boolean;
183
+ locale?: "en" | "es" | undefined;
184
+ }>;
185
+ presets: z.ZodObject<{
186
+ council: z.ZodObject<{
187
+ enabled: z.ZodBoolean;
188
+ version: z.ZodString;
189
+ }, "strip", z.ZodTypeAny, {
190
+ version: string;
191
+ enabled: boolean;
192
+ }, {
193
+ version: string;
194
+ enabled: boolean;
195
+ }>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ council: {
198
+ version: string;
199
+ enabled: boolean;
200
+ };
201
+ }, {
202
+ council: {
203
+ version: string;
204
+ enabled: boolean;
205
+ };
206
+ }>;
207
+ safety: z.ZodObject<{
208
+ destructiveCommands: z.ZodArray<z.ZodString, "many">;
209
+ secretPatterns: z.ZodArray<z.ZodString, "many">;
210
+ compileCheck: z.ZodOptional<z.ZodObject<{
211
+ enabled: z.ZodBoolean;
212
+ command: z.ZodOptional<z.ZodString>;
213
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
214
+ }, "strip", z.ZodTypeAny, {
215
+ enabled: boolean;
216
+ command?: string | undefined;
217
+ timeoutMs?: number | undefined;
218
+ }, {
219
+ enabled: boolean;
220
+ command?: string | undefined;
221
+ timeoutMs?: number | undefined;
222
+ }>>;
223
+ }, "strip", z.ZodTypeAny, {
224
+ destructiveCommands: string[];
225
+ secretPatterns: string[];
226
+ compileCheck?: {
227
+ enabled: boolean;
228
+ command?: string | undefined;
229
+ timeoutMs?: number | undefined;
230
+ } | undefined;
231
+ }, {
232
+ destructiveCommands: string[];
233
+ secretPatterns: string[];
234
+ compileCheck?: {
235
+ enabled: boolean;
236
+ command?: string | undefined;
237
+ timeoutMs?: number | undefined;
238
+ } | undefined;
239
+ }>;
240
+ loop: z.ZodOptional<z.ZodObject<{
241
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
242
+ maxIterations: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
243
+ maxTokenBudget: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
244
+ compaction: z.ZodOptional<z.ZodObject<{
245
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
246
+ historyFile: z.ZodOptional<z.ZodString>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ enabled: boolean;
249
+ historyFile?: string | undefined;
250
+ }, {
251
+ enabled?: boolean | undefined;
252
+ historyFile?: string | undefined;
253
+ }>>;
254
+ }, "strip", z.ZodTypeAny, {
255
+ enabled: boolean;
256
+ maxIterations: number;
257
+ maxTokenBudget: number;
258
+ compaction?: {
259
+ enabled: boolean;
260
+ historyFile?: string | undefined;
261
+ } | undefined;
262
+ }, {
263
+ enabled?: boolean | undefined;
264
+ maxIterations?: number | undefined;
265
+ maxTokenBudget?: number | undefined;
266
+ compaction?: {
267
+ enabled?: boolean | undefined;
268
+ historyFile?: string | undefined;
269
+ } | undefined;
270
+ }>>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ version: string;
273
+ project: {
274
+ name: string;
275
+ profile?: string | undefined;
276
+ };
277
+ defaults: {
278
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
279
+ overwrite: boolean;
280
+ locale: "en" | "es";
281
+ };
282
+ presets: {
283
+ council: {
284
+ version: string;
285
+ enabled: boolean;
286
+ };
287
+ };
288
+ safety: {
289
+ destructiveCommands: string[];
290
+ secretPatterns: string[];
291
+ compileCheck?: {
292
+ enabled: boolean;
293
+ command?: string | undefined;
294
+ timeoutMs?: number | undefined;
295
+ } | undefined;
296
+ };
297
+ loop?: {
298
+ enabled: boolean;
299
+ maxIterations: number;
300
+ maxTokenBudget: number;
301
+ compaction?: {
302
+ enabled: boolean;
303
+ historyFile?: string | undefined;
304
+ } | undefined;
305
+ } | undefined;
306
+ }, {
307
+ version: string;
308
+ project: {
309
+ name: string;
310
+ profile?: string | undefined;
311
+ };
312
+ defaults: {
313
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
314
+ overwrite: boolean;
315
+ locale?: "en" | "es" | undefined;
316
+ };
317
+ presets: {
318
+ council: {
319
+ version: string;
320
+ enabled: boolean;
321
+ };
322
+ };
323
+ safety: {
324
+ destructiveCommands: string[];
325
+ secretPatterns: string[];
326
+ compileCheck?: {
327
+ enabled: boolean;
328
+ command?: string | undefined;
329
+ timeoutMs?: number | undefined;
330
+ } | undefined;
331
+ };
332
+ loop?: {
333
+ enabled?: boolean | undefined;
334
+ maxIterations?: number | undefined;
335
+ maxTokenBudget?: number | undefined;
336
+ compaction?: {
337
+ enabled?: boolean | undefined;
338
+ historyFile?: string | undefined;
339
+ } | undefined;
340
+ } | undefined;
341
+ }>;
342
+ /**
343
+ * Runner target schema
344
+ */
345
+ export declare const RunnerTargetSchema: z.ZodEnum<["opencode", "claude", "codex", "gemini", "cursor", "agy", "all"]>;
346
+ /**
347
+ * Install manifest schemas
348
+ */
349
+ export declare const InstallStrategySchema: z.ZodEnum<["overwrite", "append", "merge-json", "merge-managed", "skip"]>;
350
+ export declare const ManifestEntrySchema: z.ZodObject<{
351
+ src: z.ZodString;
352
+ dest: z.ZodString;
353
+ strategy: z.ZodEnum<["overwrite", "append", "merge-json", "merge-managed", "skip"]>;
354
+ globalStrategy: z.ZodOptional<z.ZodEnum<["overwrite", "append", "merge-json", "merge-managed", "skip"]>>;
355
+ template: z.ZodOptional<z.ZodBoolean>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ src: string;
358
+ dest: string;
359
+ strategy: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip";
360
+ globalStrategy?: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip" | undefined;
361
+ template?: boolean | undefined;
362
+ }, {
363
+ src: string;
364
+ dest: string;
365
+ strategy: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip";
366
+ globalStrategy?: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip" | undefined;
367
+ template?: boolean | undefined;
368
+ }>;
369
+ export declare const InstallManifestSchema: z.ZodObject<{
370
+ target: z.ZodEnum<["opencode", "claude", "codex", "gemini", "cursor", "agy"]>;
371
+ entries: z.ZodArray<z.ZodObject<{
372
+ src: z.ZodString;
373
+ dest: z.ZodString;
374
+ strategy: z.ZodEnum<["overwrite", "append", "merge-json", "merge-managed", "skip"]>;
375
+ globalStrategy: z.ZodOptional<z.ZodEnum<["overwrite", "append", "merge-json", "merge-managed", "skip"]>>;
376
+ template: z.ZodOptional<z.ZodBoolean>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ src: string;
379
+ dest: string;
380
+ strategy: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip";
381
+ globalStrategy?: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip" | undefined;
382
+ template?: boolean | undefined;
383
+ }, {
384
+ src: string;
385
+ dest: string;
386
+ strategy: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip";
387
+ globalStrategy?: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip" | undefined;
388
+ template?: boolean | undefined;
389
+ }>, "many">;
390
+ }, "strip", z.ZodTypeAny, {
391
+ entries: {
392
+ src: string;
393
+ dest: string;
394
+ strategy: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip";
395
+ globalStrategy?: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip" | undefined;
396
+ template?: boolean | undefined;
397
+ }[];
398
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
399
+ }, {
400
+ entries: {
401
+ src: string;
402
+ dest: string;
403
+ strategy: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip";
404
+ globalStrategy?: "overwrite" | "append" | "merge-json" | "merge-managed" | "skip" | undefined;
405
+ template?: boolean | undefined;
406
+ }[];
407
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
408
+ }>;
409
+ /**
410
+ * Tool provider names schema — maps base tool names to provider-specific names
411
+ */
412
+ export declare const ToolProviderNamesSchema: z.ZodRecord<z.ZodString, z.ZodString>;
413
+ export declare const PermissionProviderNamesSchema: z.ZodRecord<z.ZodString, z.ZodString>;
414
+ /**
415
+ * Model config schema — defines model names per provider per agent role
416
+ */
417
+ export declare const ModelConfigSchema: z.ZodObject<{
418
+ target: z.ZodEnum<["opencode", "claude", "codex", "gemini", "cursor", "agy"]>;
419
+ agents: z.ZodRecord<z.ZodString, z.ZodObject<{
420
+ claude: z.ZodOptional<z.ZodString>;
421
+ opencode: z.ZodOptional<z.ZodString>;
422
+ codex: z.ZodOptional<z.ZodString>;
423
+ gemini: z.ZodOptional<z.ZodString>;
424
+ cursor: z.ZodOptional<z.ZodString>;
425
+ agy: z.ZodOptional<z.ZodString>;
426
+ grok: z.ZodOptional<z.ZodString>;
427
+ }, "strip", z.ZodTypeAny, {
428
+ opencode?: string | undefined;
429
+ claude?: string | undefined;
430
+ codex?: string | undefined;
431
+ gemini?: string | undefined;
432
+ cursor?: string | undefined;
433
+ agy?: string | undefined;
434
+ grok?: string | undefined;
435
+ }, {
436
+ opencode?: string | undefined;
437
+ claude?: string | undefined;
438
+ codex?: string | undefined;
439
+ gemini?: string | undefined;
440
+ cursor?: string | undefined;
441
+ agy?: string | undefined;
442
+ grok?: string | undefined;
443
+ }>>;
444
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
445
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
446
+ }, "strip", z.ZodTypeAny, {
447
+ agents: Record<string, {
448
+ opencode?: string | undefined;
449
+ claude?: string | undefined;
450
+ codex?: string | undefined;
451
+ gemini?: string | undefined;
452
+ cursor?: string | undefined;
453
+ agy?: string | undefined;
454
+ grok?: string | undefined;
455
+ }>;
456
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
457
+ tools?: Record<string, Record<string, string>> | undefined;
458
+ permissions?: Record<string, string> | undefined;
459
+ }, {
460
+ agents: Record<string, {
461
+ opencode?: string | undefined;
462
+ claude?: string | undefined;
463
+ codex?: string | undefined;
464
+ gemini?: string | undefined;
465
+ cursor?: string | undefined;
466
+ agy?: string | undefined;
467
+ grok?: string | undefined;
468
+ }>;
469
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
470
+ tools?: Record<string, Record<string, string>> | undefined;
471
+ permissions?: Record<string, string> | undefined;
472
+ }>;
473
+ export type ModelConfig = z.infer<typeof ModelConfigSchema>;
474
+ /**
475
+ * Type exports
476
+ */
477
+ export type InstallStrategy = z.infer<typeof InstallStrategySchema>;
478
+ export type ManifestEntry = z.infer<typeof ManifestEntrySchema>;
479
+ export type InstallManifest = z.infer<typeof InstallManifestSchema>;
480
+ export type CouncilAgentSpecInput = z.infer<typeof CouncilAgentSpecSchema>;
481
+ export type CouncilSpecInput = z.infer<typeof CouncilSpecSchema>;
482
+ export type ProjectProfileInput = z.infer<typeof ProjectProfileSchema>;
483
+ export type CodeConductorConfigInput = z.infer<typeof CodeConductorConfigSchema>;
484
+ export type CompileCheckConfigInput = z.infer<typeof CompileCheckConfigSchema>;
485
+ export type LoopConfigInput = z.infer<typeof LoopConfigSchema>;
486
+ export type RunnerTargetInput = z.infer<typeof RunnerTargetSchema>;
487
+ /**
488
+ * Validate council spec
489
+ */
490
+ export declare function validateCouncilSpec(data: unknown): CouncilSpecInput;
491
+ /**
492
+ * Validate project profile
493
+ */
494
+ export declare function validateProjectProfile(data: unknown): ProjectProfileInput;
495
+ /**
496
+ * Validate config
497
+ */
498
+ export declare function validateConfig(data: unknown): CodeConductorConfigInput;
499
+ /**
500
+ * Validate runner target
501
+ */
502
+ export declare function validateRunnerTarget(data: unknown): RunnerTargetInput;
503
+ /**
504
+ * Validate model configuration
505
+ */
506
+ export declare function validateModelConfig(data: unknown): ModelConfig;
507
+ /**
508
+ * Contract target enum
509
+ */
510
+ export declare const ContractTargetSchema: z.ZodEnum<["claude", "opencode", "codex", "gemini", "cursor", "agy"]>;
511
+ /**
512
+ * Contract format schema — a target with optional render options
513
+ */
514
+ export declare const ContractFormatSchema: z.ZodObject<{
515
+ target: z.ZodEnum<["claude", "opencode", "codex", "gemini", "cursor", "agy"]>;
516
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
519
+ options?: Record<string, unknown> | undefined;
520
+ }, {
521
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
522
+ options?: Record<string, unknown> | undefined;
523
+ }>;
524
+ /**
525
+ * Agent contract schema — provider-agnostic contract definition
526
+ */
527
+ export declare const AgentContractSchema: z.ZodObject<{
528
+ council: z.ZodObject<{
529
+ name: z.ZodString;
530
+ version: z.ZodString;
531
+ description: z.ZodString;
532
+ outputContract: z.ZodString;
533
+ agents: z.ZodArray<z.ZodObject<{
534
+ id: z.ZodString;
535
+ role: z.ZodString;
536
+ context: z.ZodEnum<["repo-readonly", "prompt-only"]>;
537
+ modelHint: z.ZodEnum<["strong-reasoning", "security-reasoning", "balanced", "practical-coding", "analytical", "adversarial"]>;
538
+ focus: z.ZodArray<z.ZodString, "many">;
539
+ }, "strip", z.ZodTypeAny, {
540
+ id: string;
541
+ role: string;
542
+ context: "repo-readonly" | "prompt-only";
543
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
544
+ focus: string[];
545
+ }, {
546
+ id: string;
547
+ role: string;
548
+ context: "repo-readonly" | "prompt-only";
549
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
550
+ focus: string[];
551
+ }>, "many">;
552
+ }, "strip", z.ZodTypeAny, {
553
+ name: string;
554
+ version: string;
555
+ description: string;
556
+ outputContract: string;
557
+ agents: {
558
+ id: string;
559
+ role: string;
560
+ context: "repo-readonly" | "prompt-only";
561
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
562
+ focus: string[];
563
+ }[];
564
+ }, {
565
+ name: string;
566
+ version: string;
567
+ description: string;
568
+ outputContract: string;
569
+ agents: {
570
+ id: string;
571
+ role: string;
572
+ context: "repo-readonly" | "prompt-only";
573
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
574
+ focus: string[];
575
+ }[];
576
+ }>;
577
+ targets: z.ZodArray<z.ZodObject<{
578
+ target: z.ZodEnum<["claude", "opencode", "codex", "gemini", "cursor", "agy"]>;
579
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
580
+ }, "strip", z.ZodTypeAny, {
581
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
582
+ options?: Record<string, unknown> | undefined;
583
+ }, {
584
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
585
+ options?: Record<string, unknown> | undefined;
586
+ }>, "many">;
587
+ contractVersion: z.ZodString;
588
+ renderHints: z.ZodOptional<z.ZodRecord<z.ZodEnum<["claude", "opencode", "codex", "gemini", "cursor", "agy"]>, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
589
+ }, "strip", z.ZodTypeAny, {
590
+ council: {
591
+ name: string;
592
+ version: string;
593
+ description: string;
594
+ outputContract: string;
595
+ agents: {
596
+ id: string;
597
+ role: string;
598
+ context: "repo-readonly" | "prompt-only";
599
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
600
+ focus: string[];
601
+ }[];
602
+ };
603
+ targets: {
604
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
605
+ options?: Record<string, unknown> | undefined;
606
+ }[];
607
+ contractVersion: string;
608
+ renderHints?: Partial<Record<"opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy", Record<string, unknown>>> | undefined;
609
+ }, {
610
+ council: {
611
+ name: string;
612
+ version: string;
613
+ description: string;
614
+ outputContract: string;
615
+ agents: {
616
+ id: string;
617
+ role: string;
618
+ context: "repo-readonly" | "prompt-only";
619
+ modelHint: "strong-reasoning" | "security-reasoning" | "balanced" | "practical-coding" | "analytical" | "adversarial";
620
+ focus: string[];
621
+ }[];
622
+ };
623
+ targets: {
624
+ target: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy";
625
+ options?: Record<string, unknown> | undefined;
626
+ }[];
627
+ contractVersion: string;
628
+ renderHints?: Partial<Record<"opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy", Record<string, unknown>>> | undefined;
629
+ }>;
630
+ /**
631
+ * Council finding schema — a single review observation
632
+ */
633
+ export declare const CouncilFindingSchema: z.ZodObject<{
634
+ category: z.ZodString;
635
+ severity: z.ZodEnum<["info", "warning", "critical"]>;
636
+ message: z.ZodString;
637
+ agentId: z.ZodString;
638
+ }, "strip", z.ZodTypeAny, {
639
+ message: string;
640
+ category: string;
641
+ severity: "info" | "warning" | "critical";
642
+ agentId: string;
643
+ }, {
644
+ message: string;
645
+ category: string;
646
+ severity: "info" | "warning" | "critical";
647
+ agentId: string;
648
+ }>;
649
+ /**
650
+ * Council verdict input schema — verdict from a single reviewer
651
+ */
652
+ export declare const CouncilVerdictInputSchema: z.ZodObject<{
653
+ agentId: z.ZodEffects<z.ZodString, string, string>;
654
+ agentRole: z.ZodString;
655
+ status: z.ZodEnum<["APPROVED", "REJECTED", "ABSTAIN"]>;
656
+ securityVeto: z.ZodBoolean;
657
+ complianceVeto: z.ZodOptional<z.ZodBoolean>;
658
+ confidence: z.ZodOptional<z.ZodNumber>;
659
+ findings: z.ZodArray<z.ZodObject<{
660
+ category: z.ZodString;
661
+ severity: z.ZodEnum<["info", "warning", "critical"]>;
662
+ message: z.ZodString;
663
+ agentId: z.ZodString;
664
+ }, "strip", z.ZodTypeAny, {
665
+ message: string;
666
+ category: string;
667
+ severity: "info" | "warning" | "critical";
668
+ agentId: string;
669
+ }, {
670
+ message: string;
671
+ category: string;
672
+ severity: "info" | "warning" | "critical";
673
+ agentId: string;
674
+ }>, "many">;
675
+ summary: z.ZodString;
676
+ }, "strip", z.ZodTypeAny, {
677
+ status: "APPROVED" | "REJECTED" | "ABSTAIN";
678
+ agentId: string;
679
+ agentRole: string;
680
+ securityVeto: boolean;
681
+ findings: {
682
+ message: string;
683
+ category: string;
684
+ severity: "info" | "warning" | "critical";
685
+ agentId: string;
686
+ }[];
687
+ summary: string;
688
+ confidence?: number | undefined;
689
+ complianceVeto?: boolean | undefined;
690
+ }, {
691
+ status: "APPROVED" | "REJECTED" | "ABSTAIN";
692
+ agentId: string;
693
+ agentRole: string;
694
+ securityVeto: boolean;
695
+ findings: {
696
+ message: string;
697
+ category: string;
698
+ severity: "info" | "warning" | "critical";
699
+ agentId: string;
700
+ }[];
701
+ summary: string;
702
+ confidence?: number | undefined;
703
+ complianceVeto?: boolean | undefined;
704
+ }>;
705
+ /**
706
+ * Consensus config schema
707
+ */
708
+ export declare const ConsensusConfigSchema: z.ZodEffects<z.ZodObject<{
709
+ algorithm: z.ZodEnum<["majority", "unanimous"]>;
710
+ allowSecurityVeto: z.ZodBoolean;
711
+ allowComplianceVeto: z.ZodOptional<z.ZodBoolean>;
712
+ expectedAgentIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ algorithm: "majority" | "unanimous";
715
+ allowSecurityVeto: boolean;
716
+ allowComplianceVeto?: boolean | undefined;
717
+ expectedAgentIds?: string[] | undefined;
718
+ }, {
719
+ algorithm: "majority" | "unanimous";
720
+ allowSecurityVeto: boolean;
721
+ allowComplianceVeto?: boolean | undefined;
722
+ expectedAgentIds?: string[] | undefined;
723
+ }>, {
724
+ algorithm: "majority" | "unanimous";
725
+ allowSecurityVeto: boolean;
726
+ allowComplianceVeto?: boolean | undefined;
727
+ expectedAgentIds?: string[] | undefined;
728
+ }, {
729
+ algorithm: "majority" | "unanimous";
730
+ allowSecurityVeto: boolean;
731
+ allowComplianceVeto?: boolean | undefined;
732
+ expectedAgentIds?: string[] | undefined;
733
+ }>;
734
+ /**
735
+ * Council verdict schema — the final output of the consensus engine
736
+ */
737
+ export declare const CouncilVerdictSchema: z.ZodObject<{
738
+ status: z.ZodEnum<["APPROVED", "REJECTED", "ESCALATED"]>;
739
+ totalAgents: z.ZodNumber;
740
+ approvedCount: z.ZodNumber;
741
+ rejectedCount: z.ZodNumber;
742
+ abstainedCount: z.ZodNumber;
743
+ vetoApplied: z.ZodBoolean;
744
+ complianceVetoApplied: z.ZodOptional<z.ZodBoolean>;
745
+ vetoByAgentId: z.ZodOptional<z.ZodString>;
746
+ averageConfidence: z.ZodOptional<z.ZodNumber>;
747
+ findings: z.ZodArray<z.ZodObject<{
748
+ category: z.ZodString;
749
+ severity: z.ZodEnum<["info", "warning", "critical"]>;
750
+ message: z.ZodString;
751
+ agentId: z.ZodString;
752
+ }, "strip", z.ZodTypeAny, {
753
+ message: string;
754
+ category: string;
755
+ severity: "info" | "warning" | "critical";
756
+ agentId: string;
757
+ }, {
758
+ message: string;
759
+ category: string;
760
+ severity: "info" | "warning" | "critical";
761
+ agentId: string;
762
+ }>, "many">;
763
+ summary: z.ZodString;
764
+ individualVerdicts: z.ZodArray<z.ZodObject<{
765
+ agentId: z.ZodEffects<z.ZodString, string, string>;
766
+ agentRole: z.ZodString;
767
+ status: z.ZodEnum<["APPROVED", "REJECTED", "ABSTAIN"]>;
768
+ securityVeto: z.ZodBoolean;
769
+ complianceVeto: z.ZodOptional<z.ZodBoolean>;
770
+ confidence: z.ZodOptional<z.ZodNumber>;
771
+ findings: z.ZodArray<z.ZodObject<{
772
+ category: z.ZodString;
773
+ severity: z.ZodEnum<["info", "warning", "critical"]>;
774
+ message: z.ZodString;
775
+ agentId: z.ZodString;
776
+ }, "strip", z.ZodTypeAny, {
777
+ message: string;
778
+ category: string;
779
+ severity: "info" | "warning" | "critical";
780
+ agentId: string;
781
+ }, {
782
+ message: string;
783
+ category: string;
784
+ severity: "info" | "warning" | "critical";
785
+ agentId: string;
786
+ }>, "many">;
787
+ summary: z.ZodString;
788
+ }, "strip", z.ZodTypeAny, {
789
+ status: "APPROVED" | "REJECTED" | "ABSTAIN";
790
+ agentId: string;
791
+ agentRole: string;
792
+ securityVeto: boolean;
793
+ findings: {
794
+ message: string;
795
+ category: string;
796
+ severity: "info" | "warning" | "critical";
797
+ agentId: string;
798
+ }[];
799
+ summary: string;
800
+ confidence?: number | undefined;
801
+ complianceVeto?: boolean | undefined;
802
+ }, {
803
+ status: "APPROVED" | "REJECTED" | "ABSTAIN";
804
+ agentId: string;
805
+ agentRole: string;
806
+ securityVeto: boolean;
807
+ findings: {
808
+ message: string;
809
+ category: string;
810
+ severity: "info" | "warning" | "critical";
811
+ agentId: string;
812
+ }[];
813
+ summary: string;
814
+ confidence?: number | undefined;
815
+ complianceVeto?: boolean | undefined;
816
+ }>, "many">;
817
+ }, "strip", z.ZodTypeAny, {
818
+ status: "APPROVED" | "REJECTED" | "ESCALATED";
819
+ findings: {
820
+ message: string;
821
+ category: string;
822
+ severity: "info" | "warning" | "critical";
823
+ agentId: string;
824
+ }[];
825
+ summary: string;
826
+ totalAgents: number;
827
+ approvedCount: number;
828
+ rejectedCount: number;
829
+ abstainedCount: number;
830
+ vetoApplied: boolean;
831
+ individualVerdicts: {
832
+ status: "APPROVED" | "REJECTED" | "ABSTAIN";
833
+ agentId: string;
834
+ agentRole: string;
835
+ securityVeto: boolean;
836
+ findings: {
837
+ message: string;
838
+ category: string;
839
+ severity: "info" | "warning" | "critical";
840
+ agentId: string;
841
+ }[];
842
+ summary: string;
843
+ confidence?: number | undefined;
844
+ complianceVeto?: boolean | undefined;
845
+ }[];
846
+ complianceVetoApplied?: boolean | undefined;
847
+ vetoByAgentId?: string | undefined;
848
+ averageConfidence?: number | undefined;
849
+ }, {
850
+ status: "APPROVED" | "REJECTED" | "ESCALATED";
851
+ findings: {
852
+ message: string;
853
+ category: string;
854
+ severity: "info" | "warning" | "critical";
855
+ agentId: string;
856
+ }[];
857
+ summary: string;
858
+ totalAgents: number;
859
+ approvedCount: number;
860
+ rejectedCount: number;
861
+ abstainedCount: number;
862
+ vetoApplied: boolean;
863
+ individualVerdicts: {
864
+ status: "APPROVED" | "REJECTED" | "ABSTAIN";
865
+ agentId: string;
866
+ agentRole: string;
867
+ securityVeto: boolean;
868
+ findings: {
869
+ message: string;
870
+ category: string;
871
+ severity: "info" | "warning" | "critical";
872
+ agentId: string;
873
+ }[];
874
+ summary: string;
875
+ confidence?: number | undefined;
876
+ complianceVeto?: boolean | undefined;
877
+ }[];
878
+ complianceVetoApplied?: boolean | undefined;
879
+ vetoByAgentId?: string | undefined;
880
+ averageConfidence?: number | undefined;
881
+ }>;
882
+ /**
883
+ * Claude agent file schema — validates a single Claude-generated agent markdown file
884
+ */
885
+ export declare const ClaudeAgentFileSchema: z.ZodObject<{
886
+ path: z.ZodString;
887
+ content: z.ZodString;
888
+ overwrite: z.ZodBoolean;
889
+ }, "strip", z.ZodTypeAny, {
890
+ path: string;
891
+ overwrite: boolean;
892
+ content: string;
893
+ }, {
894
+ path: string;
895
+ overwrite: boolean;
896
+ content: string;
897
+ }>;
898
+ /**
899
+ * OpenCode agent file schema — validates a single OpenCode-generated agent markdown file
900
+ */
901
+ export declare const OpenCodeAgentFileSchema: z.ZodObject<{
902
+ path: z.ZodString;
903
+ content: z.ZodString;
904
+ overwrite: z.ZodBoolean;
905
+ }, "strip", z.ZodTypeAny, {
906
+ path: string;
907
+ overwrite: boolean;
908
+ content: string;
909
+ }, {
910
+ path: string;
911
+ overwrite: boolean;
912
+ content: string;
913
+ }>;
914
+ /**
915
+ * Stack frame schema — a single frame from a Sentry stack trace
916
+ */
917
+ export declare const SentryStackFrameSchema: z.ZodObject<{
918
+ filename: z.ZodString;
919
+ function: z.ZodString;
920
+ lineNo: z.ZodNumber;
921
+ colNo: z.ZodOptional<z.ZodNumber>;
922
+ context: z.ZodArray<z.ZodString, "many">;
923
+ }, "strip", z.ZodTypeAny, {
924
+ function: string;
925
+ context: string[];
926
+ filename: string;
927
+ lineNo: number;
928
+ colNo?: number | undefined;
929
+ }, {
930
+ function: string;
931
+ context: string[];
932
+ filename: string;
933
+ lineNo: number;
934
+ colNo?: number | undefined;
935
+ }>;
936
+ /**
937
+ * Sentry webhook payload schema — validates the issue context from Sentry webhooks
938
+ */
939
+ export declare const SentryWebhookSchema: z.ZodObject<{
940
+ issueId: z.ZodString;
941
+ title: z.ZodString;
942
+ culprit: z.ZodString;
943
+ filename: z.ZodOptional<z.ZodString>;
944
+ stackTrace: z.ZodArray<z.ZodObject<{
945
+ filename: z.ZodString;
946
+ function: z.ZodString;
947
+ lineNo: z.ZodNumber;
948
+ colNo: z.ZodOptional<z.ZodNumber>;
949
+ context: z.ZodArray<z.ZodString, "many">;
950
+ }, "strip", z.ZodTypeAny, {
951
+ function: string;
952
+ context: string[];
953
+ filename: string;
954
+ lineNo: number;
955
+ colNo?: number | undefined;
956
+ }, {
957
+ function: string;
958
+ context: string[];
959
+ filename: string;
960
+ lineNo: number;
961
+ colNo?: number | undefined;
962
+ }>, "many">;
963
+ environment: z.ZodOptional<z.ZodString>;
964
+ release: z.ZodOptional<z.ZodString>;
965
+ }, "strip", z.ZodTypeAny, {
966
+ issueId: string;
967
+ title: string;
968
+ culprit: string;
969
+ stackTrace: {
970
+ function: string;
971
+ context: string[];
972
+ filename: string;
973
+ lineNo: number;
974
+ colNo?: number | undefined;
975
+ }[];
976
+ filename?: string | undefined;
977
+ environment?: string | undefined;
978
+ release?: string | undefined;
979
+ }, {
980
+ issueId: string;
981
+ title: string;
982
+ culprit: string;
983
+ stackTrace: {
984
+ function: string;
985
+ context: string[];
986
+ filename: string;
987
+ lineNo: number;
988
+ colNo?: number | undefined;
989
+ }[];
990
+ filename?: string | undefined;
991
+ environment?: string | undefined;
992
+ release?: string | undefined;
993
+ }>;
994
+ export type SentryWebhookInput = z.infer<typeof SentryWebhookSchema>;
995
+ /**
996
+ * Memory pointer schema — a lightweight reference to an Engram observation
997
+ */
998
+ export declare const MemoryPointerSchema: z.ZodObject<{
999
+ topic_key: z.ZodString;
1000
+ id: z.ZodNumber;
1001
+ file: z.ZodString;
1002
+ summary: z.ZodString;
1003
+ timestamp: z.ZodString;
1004
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ id: number;
1007
+ summary: string;
1008
+ topic_key: string;
1009
+ file: string;
1010
+ timestamp: string;
1011
+ tags: string[];
1012
+ }, {
1013
+ id: number;
1014
+ summary: string;
1015
+ topic_key: string;
1016
+ file: string;
1017
+ timestamp: string;
1018
+ tags?: string[] | undefined;
1019
+ }>;
1020
+ /**
1021
+ * Memory index schema — the persistent pointer layer of the 3-layer memory arch
1022
+ */
1023
+ export declare const MemoryIndexSchema: z.ZodObject<{
1024
+ version: z.ZodLiteral<1>;
1025
+ pointers: z.ZodArray<z.ZodObject<{
1026
+ topic_key: z.ZodString;
1027
+ id: z.ZodNumber;
1028
+ file: z.ZodString;
1029
+ summary: z.ZodString;
1030
+ timestamp: z.ZodString;
1031
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1032
+ }, "strip", z.ZodTypeAny, {
1033
+ id: number;
1034
+ summary: string;
1035
+ topic_key: string;
1036
+ file: string;
1037
+ timestamp: string;
1038
+ tags: string[];
1039
+ }, {
1040
+ id: number;
1041
+ summary: string;
1042
+ topic_key: string;
1043
+ file: string;
1044
+ timestamp: string;
1045
+ tags?: string[] | undefined;
1046
+ }>, "many">;
1047
+ }, "strip", z.ZodTypeAny, {
1048
+ version: 1;
1049
+ pointers: {
1050
+ id: number;
1051
+ summary: string;
1052
+ topic_key: string;
1053
+ file: string;
1054
+ timestamp: string;
1055
+ tags: string[];
1056
+ }[];
1057
+ }, {
1058
+ version: 1;
1059
+ pointers: {
1060
+ id: number;
1061
+ summary: string;
1062
+ topic_key: string;
1063
+ file: string;
1064
+ timestamp: string;
1065
+ tags?: string[] | undefined;
1066
+ }[];
1067
+ }>;
1068
+ /**
1069
+ * Goal task schema — a single task in a goal graph
1070
+ */
1071
+ export declare const GoalTaskSchema: z.ZodObject<{
1072
+ id: z.ZodString;
1073
+ title: z.ZodString;
1074
+ type: z.ZodEnum<["feature", "fix", "refactor", "test", "docs"]>;
1075
+ risk: z.ZodEnum<["low", "medium", "high"]>;
1076
+ status: z.ZodEnum<["pending", "in-progress", "done", "blocked"]>;
1077
+ depends_on: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1078
+ acceptance_criteria: z.ZodArray<z.ZodString, "many">;
1079
+ blocked_reason: z.ZodOptional<z.ZodString>;
1080
+ context_scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["isolated", "continuation", "full"]>>>;
1081
+ }, "strip", z.ZodTypeAny, {
1082
+ id: string;
1083
+ status: "pending" | "in-progress" | "done" | "blocked";
1084
+ type: "feature" | "fix" | "refactor" | "test" | "docs";
1085
+ title: string;
1086
+ risk: "low" | "medium" | "high";
1087
+ depends_on: string[];
1088
+ acceptance_criteria: string[];
1089
+ context_scope: "isolated" | "continuation" | "full";
1090
+ blocked_reason?: string | undefined;
1091
+ }, {
1092
+ id: string;
1093
+ status: "pending" | "in-progress" | "done" | "blocked";
1094
+ type: "feature" | "fix" | "refactor" | "test" | "docs";
1095
+ title: string;
1096
+ risk: "low" | "medium" | "high";
1097
+ acceptance_criteria: string[];
1098
+ depends_on?: string[] | undefined;
1099
+ blocked_reason?: string | undefined;
1100
+ context_scope?: "isolated" | "continuation" | "full" | undefined;
1101
+ }>;
1102
+ /**
1103
+ * Goal graph schema — a complete goal with task dependencies
1104
+ */
1105
+ export declare const GoalGraphSchema: z.ZodObject<{
1106
+ objective: z.ZodString;
1107
+ tasks: z.ZodArray<z.ZodObject<{
1108
+ id: z.ZodString;
1109
+ title: z.ZodString;
1110
+ type: z.ZodEnum<["feature", "fix", "refactor", "test", "docs"]>;
1111
+ risk: z.ZodEnum<["low", "medium", "high"]>;
1112
+ status: z.ZodEnum<["pending", "in-progress", "done", "blocked"]>;
1113
+ depends_on: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1114
+ acceptance_criteria: z.ZodArray<z.ZodString, "many">;
1115
+ blocked_reason: z.ZodOptional<z.ZodString>;
1116
+ context_scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["isolated", "continuation", "full"]>>>;
1117
+ }, "strip", z.ZodTypeAny, {
1118
+ id: string;
1119
+ status: "pending" | "in-progress" | "done" | "blocked";
1120
+ type: "feature" | "fix" | "refactor" | "test" | "docs";
1121
+ title: string;
1122
+ risk: "low" | "medium" | "high";
1123
+ depends_on: string[];
1124
+ acceptance_criteria: string[];
1125
+ context_scope: "isolated" | "continuation" | "full";
1126
+ blocked_reason?: string | undefined;
1127
+ }, {
1128
+ id: string;
1129
+ status: "pending" | "in-progress" | "done" | "blocked";
1130
+ type: "feature" | "fix" | "refactor" | "test" | "docs";
1131
+ title: string;
1132
+ risk: "low" | "medium" | "high";
1133
+ acceptance_criteria: string[];
1134
+ depends_on?: string[] | undefined;
1135
+ blocked_reason?: string | undefined;
1136
+ context_scope?: "isolated" | "continuation" | "full" | undefined;
1137
+ }>, "many">;
1138
+ created_at: z.ZodString;
1139
+ }, "strip", z.ZodTypeAny, {
1140
+ objective: string;
1141
+ tasks: {
1142
+ id: string;
1143
+ status: "pending" | "in-progress" | "done" | "blocked";
1144
+ type: "feature" | "fix" | "refactor" | "test" | "docs";
1145
+ title: string;
1146
+ risk: "low" | "medium" | "high";
1147
+ depends_on: string[];
1148
+ acceptance_criteria: string[];
1149
+ context_scope: "isolated" | "continuation" | "full";
1150
+ blocked_reason?: string | undefined;
1151
+ }[];
1152
+ created_at: string;
1153
+ }, {
1154
+ objective: string;
1155
+ tasks: {
1156
+ id: string;
1157
+ status: "pending" | "in-progress" | "done" | "blocked";
1158
+ type: "feature" | "fix" | "refactor" | "test" | "docs";
1159
+ title: string;
1160
+ risk: "low" | "medium" | "high";
1161
+ acceptance_criteria: string[];
1162
+ depends_on?: string[] | undefined;
1163
+ blocked_reason?: string | undefined;
1164
+ context_scope?: "isolated" | "continuation" | "full" | undefined;
1165
+ }[];
1166
+ created_at: string;
1167
+ }>;
1168
+ export declare const ConfidenceLevelSchema: z.ZodEnum<["low", "medium", "high"]>;
1169
+ export declare const ProductNodeTypeSchema: z.ZodEnum<["product", "domain", "capability", "requirement", "decision", "component", "flow", "contract", "metric", "risk", "task", "evidence"]>;
1170
+ export declare const GraphRelationSchema: z.ZodEnum<["implements", "depends_on", "documents", "affects", "evidences", "blocks", "contains"]>;
1171
+ export declare const KnowledgeEntitySchema: z.ZodObject<{
1172
+ type: z.ZodEnum<["product", "domain", "capability", "requirement", "decision", "component", "flow", "contract", "metric", "risk", "task", "evidence"]>;
1173
+ id: z.ZodString;
1174
+ name: z.ZodString;
1175
+ source: z.ZodString;
1176
+ version: z.ZodOptional<z.ZodString>;
1177
+ confidence: z.ZodEnum<["low", "medium", "high"]>;
1178
+ relations: z.ZodDefault<z.ZodArray<z.ZodObject<{
1179
+ targetId: z.ZodString;
1180
+ relation: z.ZodEnum<["implements", "depends_on", "documents", "affects", "evidences", "blocks", "contains"]>;
1181
+ }, "strip", z.ZodTypeAny, {
1182
+ targetId: string;
1183
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1184
+ }, {
1185
+ targetId: string;
1186
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1187
+ }>, "many">>;
1188
+ data: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1189
+ }, "strip", z.ZodTypeAny, {
1190
+ id: string;
1191
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1192
+ name: string;
1193
+ confidence: "low" | "medium" | "high";
1194
+ source: string;
1195
+ relations: {
1196
+ targetId: string;
1197
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1198
+ }[];
1199
+ data: Record<string, unknown>;
1200
+ version?: string | undefined;
1201
+ }, {
1202
+ id: string;
1203
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1204
+ name: string;
1205
+ confidence: "low" | "medium" | "high";
1206
+ source: string;
1207
+ version?: string | undefined;
1208
+ relations?: {
1209
+ targetId: string;
1210
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1211
+ }[] | undefined;
1212
+ data?: Record<string, unknown> | undefined;
1213
+ }>;
1214
+ export declare const DecisionSchema: z.ZodObject<{
1215
+ id: z.ZodString;
1216
+ context: z.ZodString;
1217
+ alternatives: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1218
+ chosenOption: z.ZodString;
1219
+ rationale: z.ZodString;
1220
+ consequences: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1221
+ date: z.ZodString;
1222
+ linkedTasks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1223
+ linkedComponents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1224
+ source: z.ZodOptional<z.ZodString>;
1225
+ }, "strip", z.ZodTypeAny, {
1226
+ id: string;
1227
+ context: string;
1228
+ date: string;
1229
+ alternatives: string[];
1230
+ chosenOption: string;
1231
+ rationale: string;
1232
+ consequences: string[];
1233
+ linkedTasks: string[];
1234
+ linkedComponents: string[];
1235
+ source?: string | undefined;
1236
+ }, {
1237
+ id: string;
1238
+ context: string;
1239
+ date: string;
1240
+ chosenOption: string;
1241
+ rationale: string;
1242
+ source?: string | undefined;
1243
+ alternatives?: string[] | undefined;
1244
+ consequences?: string[] | undefined;
1245
+ linkedTasks?: string[] | undefined;
1246
+ linkedComponents?: string[] | undefined;
1247
+ }>;
1248
+ export declare const EvidenceSchema: z.ZodObject<{
1249
+ id: z.ZodString;
1250
+ source: z.ZodString;
1251
+ type: z.ZodString;
1252
+ timestamp: z.ZodString;
1253
+ relatedTask: z.ZodOptional<z.ZodString>;
1254
+ relatedDecision: z.ZodOptional<z.ZodString>;
1255
+ confidence: z.ZodNumber;
1256
+ checksum: z.ZodOptional<z.ZodString>;
1257
+ summary: z.ZodOptional<z.ZodString>;
1258
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1259
+ }, "strip", z.ZodTypeAny, {
1260
+ id: string;
1261
+ type: string;
1262
+ confidence: number;
1263
+ timestamp: string;
1264
+ source: string;
1265
+ summary?: string | undefined;
1266
+ data?: Record<string, unknown> | undefined;
1267
+ relatedTask?: string | undefined;
1268
+ relatedDecision?: string | undefined;
1269
+ checksum?: string | undefined;
1270
+ }, {
1271
+ id: string;
1272
+ type: string;
1273
+ confidence: number;
1274
+ timestamp: string;
1275
+ source: string;
1276
+ summary?: string | undefined;
1277
+ data?: Record<string, unknown> | undefined;
1278
+ relatedTask?: string | undefined;
1279
+ relatedDecision?: string | undefined;
1280
+ checksum?: string | undefined;
1281
+ }>;
1282
+ export declare const CanonicalTaskCardStatusSchema: z.ZodEnum<["draft", "ready", "in-progress", "review", "done", "blocked"]>;
1283
+ export declare const CanonicalTaskCardSchema: z.ZodObject<{
1284
+ id: z.ZodString;
1285
+ title: z.ZodString;
1286
+ objective: z.ZodString;
1287
+ context: z.ZodString;
1288
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
1289
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1290
+ constraints: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1291
+ risk: z.ZodEnum<["low", "medium", "high"]>;
1292
+ targetFiles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1293
+ agentType: z.ZodString;
1294
+ evidenceRequired: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1295
+ status: z.ZodEnum<["draft", "ready", "in-progress", "review", "done", "blocked"]>;
1296
+ type: z.ZodOptional<z.ZodEnum<["feature", "fix", "refactor", "review", "docs", "test"]>>;
1297
+ linkedCapabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1298
+ }, "strip", z.ZodTypeAny, {
1299
+ id: string;
1300
+ context: string;
1301
+ status: "in-progress" | "done" | "blocked" | "draft" | "ready" | "review";
1302
+ title: string;
1303
+ risk: "low" | "medium" | "high";
1304
+ objective: string;
1305
+ acceptanceCriteria: string[];
1306
+ dependencies: string[];
1307
+ constraints: string[];
1308
+ targetFiles: string[];
1309
+ agentType: string;
1310
+ evidenceRequired: string[];
1311
+ linkedCapabilities: string[];
1312
+ type?: "feature" | "fix" | "refactor" | "test" | "docs" | "review" | undefined;
1313
+ }, {
1314
+ id: string;
1315
+ context: string;
1316
+ status: "in-progress" | "done" | "blocked" | "draft" | "ready" | "review";
1317
+ title: string;
1318
+ risk: "low" | "medium" | "high";
1319
+ objective: string;
1320
+ acceptanceCriteria: string[];
1321
+ agentType: string;
1322
+ type?: "feature" | "fix" | "refactor" | "test" | "docs" | "review" | undefined;
1323
+ dependencies?: string[] | undefined;
1324
+ constraints?: string[] | undefined;
1325
+ targetFiles?: string[] | undefined;
1326
+ evidenceRequired?: string[] | undefined;
1327
+ linkedCapabilities?: string[] | undefined;
1328
+ }>;
1329
+ export declare const ProductGraphNodeSchema: z.ZodObject<{
1330
+ id: z.ZodString;
1331
+ type: z.ZodEnum<["product", "domain", "capability", "requirement", "decision", "component", "flow", "contract", "metric", "risk", "task", "evidence"]>;
1332
+ name: z.ZodString;
1333
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1334
+ source: z.ZodOptional<z.ZodString>;
1335
+ confidence: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1336
+ version: z.ZodOptional<z.ZodString>;
1337
+ }, "strip", z.ZodTypeAny, {
1338
+ id: string;
1339
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1340
+ name: string;
1341
+ data: Record<string, unknown>;
1342
+ version?: string | undefined;
1343
+ confidence?: "low" | "medium" | "high" | undefined;
1344
+ source?: string | undefined;
1345
+ }, {
1346
+ id: string;
1347
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1348
+ name: string;
1349
+ version?: string | undefined;
1350
+ confidence?: "low" | "medium" | "high" | undefined;
1351
+ source?: string | undefined;
1352
+ data?: Record<string, unknown> | undefined;
1353
+ }>;
1354
+ export declare const ProductGraphEdgeSchema: z.ZodObject<{
1355
+ from: z.ZodString;
1356
+ to: z.ZodString;
1357
+ relation: z.ZodEnum<["implements", "depends_on", "documents", "affects", "evidences", "blocks", "contains"]>;
1358
+ }, "strip", z.ZodTypeAny, {
1359
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1360
+ from: string;
1361
+ to: string;
1362
+ }, {
1363
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1364
+ from: string;
1365
+ to: string;
1366
+ }>;
1367
+ export declare const ProductGraphSchema: z.ZodObject<{
1368
+ version: z.ZodLiteral<1>;
1369
+ productId: z.ZodString;
1370
+ productName: z.ZodString;
1371
+ nodes: z.ZodArray<z.ZodObject<{
1372
+ id: z.ZodString;
1373
+ type: z.ZodEnum<["product", "domain", "capability", "requirement", "decision", "component", "flow", "contract", "metric", "risk", "task", "evidence"]>;
1374
+ name: z.ZodString;
1375
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1376
+ source: z.ZodOptional<z.ZodString>;
1377
+ confidence: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1378
+ version: z.ZodOptional<z.ZodString>;
1379
+ }, "strip", z.ZodTypeAny, {
1380
+ id: string;
1381
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1382
+ name: string;
1383
+ data: Record<string, unknown>;
1384
+ version?: string | undefined;
1385
+ confidence?: "low" | "medium" | "high" | undefined;
1386
+ source?: string | undefined;
1387
+ }, {
1388
+ id: string;
1389
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1390
+ name: string;
1391
+ version?: string | undefined;
1392
+ confidence?: "low" | "medium" | "high" | undefined;
1393
+ source?: string | undefined;
1394
+ data?: Record<string, unknown> | undefined;
1395
+ }>, "many">;
1396
+ edges: z.ZodArray<z.ZodObject<{
1397
+ from: z.ZodString;
1398
+ to: z.ZodString;
1399
+ relation: z.ZodEnum<["implements", "depends_on", "documents", "affects", "evidences", "blocks", "contains"]>;
1400
+ }, "strip", z.ZodTypeAny, {
1401
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1402
+ from: string;
1403
+ to: string;
1404
+ }, {
1405
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1406
+ from: string;
1407
+ to: string;
1408
+ }>, "many">;
1409
+ updatedAt: z.ZodString;
1410
+ }, "strip", z.ZodTypeAny, {
1411
+ version: 1;
1412
+ productId: string;
1413
+ productName: string;
1414
+ nodes: {
1415
+ id: string;
1416
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1417
+ name: string;
1418
+ data: Record<string, unknown>;
1419
+ version?: string | undefined;
1420
+ confidence?: "low" | "medium" | "high" | undefined;
1421
+ source?: string | undefined;
1422
+ }[];
1423
+ edges: {
1424
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1425
+ from: string;
1426
+ to: string;
1427
+ }[];
1428
+ updatedAt: string;
1429
+ }, {
1430
+ version: 1;
1431
+ productId: string;
1432
+ productName: string;
1433
+ nodes: {
1434
+ id: string;
1435
+ type: "risk" | "product" | "domain" | "capability" | "requirement" | "decision" | "component" | "flow" | "contract" | "metric" | "task" | "evidence";
1436
+ name: string;
1437
+ version?: string | undefined;
1438
+ confidence?: "low" | "medium" | "high" | undefined;
1439
+ source?: string | undefined;
1440
+ data?: Record<string, unknown> | undefined;
1441
+ }[];
1442
+ edges: {
1443
+ relation: "depends_on" | "implements" | "documents" | "affects" | "evidences" | "blocks" | "contains";
1444
+ from: string;
1445
+ to: string;
1446
+ }[];
1447
+ updatedAt: string;
1448
+ }>;
1449
+ export declare const ProductMetaSchema: z.ZodObject<{
1450
+ version: z.ZodLiteral<1>;
1451
+ graphVersion: z.ZodString;
1452
+ lastIngestAt: z.ZodOptional<z.ZodString>;
1453
+ sourceHashes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1454
+ }, "strip", z.ZodTypeAny, {
1455
+ version: 1;
1456
+ graphVersion: string;
1457
+ sourceHashes: Record<string, string>;
1458
+ lastIngestAt?: string | undefined;
1459
+ }, {
1460
+ version: 1;
1461
+ graphVersion: string;
1462
+ lastIngestAt?: string | undefined;
1463
+ sourceHashes?: Record<string, string> | undefined;
1464
+ }>;
1465
+ export declare const ProductEventTypeSchema: z.ZodEnum<["task.started", "task.completed", "decision.recorded", "evidence.added", "ingest.completed", "goal.updated", "blocker.detected", "verification.completed", "feedback.processed"]>;
1466
+ export declare const ProductEventSchema: z.ZodObject<{
1467
+ id: z.ZodString;
1468
+ type: z.ZodEnum<["task.started", "task.completed", "decision.recorded", "evidence.added", "ingest.completed", "goal.updated", "blocker.detected", "verification.completed", "feedback.processed"]>;
1469
+ timestamp: z.ZodString;
1470
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1471
+ }, "strip", z.ZodTypeAny, {
1472
+ id: string;
1473
+ type: "task.started" | "task.completed" | "decision.recorded" | "evidence.added" | "ingest.completed" | "goal.updated" | "blocker.detected" | "verification.completed" | "feedback.processed";
1474
+ timestamp: string;
1475
+ payload: Record<string, unknown>;
1476
+ }, {
1477
+ id: string;
1478
+ type: "task.started" | "task.completed" | "decision.recorded" | "evidence.added" | "ingest.completed" | "goal.updated" | "blocker.detected" | "verification.completed" | "feedback.processed";
1479
+ timestamp: string;
1480
+ payload?: Record<string, unknown> | undefined;
1481
+ }>;
1482
+ export declare const OperationalStateSchema: z.ZodObject<{
1483
+ version: z.ZodLiteral<1>;
1484
+ activeAgents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1485
+ activeTaskIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1486
+ blockers: z.ZodDefault<z.ZodArray<z.ZodObject<{
1487
+ taskId: z.ZodString;
1488
+ reason: z.ZodString;
1489
+ since: z.ZodString;
1490
+ }, "strip", z.ZodTypeAny, {
1491
+ taskId: string;
1492
+ reason: string;
1493
+ since: string;
1494
+ }, {
1495
+ taskId: string;
1496
+ reason: string;
1497
+ since: string;
1498
+ }>, "many">>;
1499
+ sprintFocus: z.ZodOptional<z.ZodString>;
1500
+ updatedAt: z.ZodString;
1501
+ }, "strip", z.ZodTypeAny, {
1502
+ version: 1;
1503
+ updatedAt: string;
1504
+ activeAgents: string[];
1505
+ activeTaskIds: string[];
1506
+ blockers: {
1507
+ taskId: string;
1508
+ reason: string;
1509
+ since: string;
1510
+ }[];
1511
+ sprintFocus?: string | undefined;
1512
+ }, {
1513
+ version: 1;
1514
+ updatedAt: string;
1515
+ activeAgents?: string[] | undefined;
1516
+ activeTaskIds?: string[] | undefined;
1517
+ blockers?: {
1518
+ taskId: string;
1519
+ reason: string;
1520
+ since: string;
1521
+ }[] | undefined;
1522
+ sprintFocus?: string | undefined;
1523
+ }>;
1524
+ export declare const StrategicMemorySchema: z.ZodObject<{
1525
+ version: z.ZodLiteral<1>;
1526
+ kpis: z.ZodDefault<z.ZodArray<z.ZodObject<{
1527
+ name: z.ZodString;
1528
+ target: z.ZodString;
1529
+ current: z.ZodOptional<z.ZodString>;
1530
+ }, "strip", z.ZodTypeAny, {
1531
+ name: string;
1532
+ target: string;
1533
+ current?: string | undefined;
1534
+ }, {
1535
+ name: string;
1536
+ target: string;
1537
+ current?: string | undefined;
1538
+ }>, "many">>;
1539
+ quarterlyFocus: z.ZodOptional<z.ZodString>;
1540
+ tradeoffs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1541
+ updatedAt: z.ZodString;
1542
+ }, "strip", z.ZodTypeAny, {
1543
+ version: 1;
1544
+ updatedAt: string;
1545
+ kpis: {
1546
+ name: string;
1547
+ target: string;
1548
+ current?: string | undefined;
1549
+ }[];
1550
+ tradeoffs: string[];
1551
+ quarterlyFocus?: string | undefined;
1552
+ }, {
1553
+ version: 1;
1554
+ updatedAt: string;
1555
+ kpis?: {
1556
+ name: string;
1557
+ target: string;
1558
+ current?: string | undefined;
1559
+ }[] | undefined;
1560
+ quarterlyFocus?: string | undefined;
1561
+ tradeoffs?: string[] | undefined;
1562
+ }>;
1563
+ export declare const ImpactReportSchema: z.ZodObject<{
1564
+ target: z.ZodString;
1565
+ brokenEndpoints: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1566
+ brokenContracts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1567
+ affectedTests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1568
+ affectedFlows: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1569
+ affectedComponents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1570
+ summary: z.ZodString;
1571
+ }, "strip", z.ZodTypeAny, {
1572
+ target: string;
1573
+ summary: string;
1574
+ brokenEndpoints: string[];
1575
+ brokenContracts: string[];
1576
+ affectedTests: string[];
1577
+ affectedFlows: string[];
1578
+ affectedComponents: string[];
1579
+ }, {
1580
+ target: string;
1581
+ summary: string;
1582
+ brokenEndpoints?: string[] | undefined;
1583
+ brokenContracts?: string[] | undefined;
1584
+ affectedTests?: string[] | undefined;
1585
+ affectedFlows?: string[] | undefined;
1586
+ affectedComponents?: string[] | undefined;
1587
+ }>;
1588
+ export declare const BusinessReviewOutputSchema: z.ZodObject<{
1589
+ status: z.ZodEnum<["proceed", "defer", "reject"]>;
1590
+ roiEstimate: z.ZodOptional<z.ZodString>;
1591
+ userImpact: z.ZodOptional<z.ZodString>;
1592
+ eliminationRisk: z.ZodOptional<z.ZodString>;
1593
+ questions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1594
+ confidence: z.ZodNumber;
1595
+ }, "strip", z.ZodTypeAny, {
1596
+ status: "proceed" | "defer" | "reject";
1597
+ confidence: number;
1598
+ questions: string[];
1599
+ roiEstimate?: string | undefined;
1600
+ userImpact?: string | undefined;
1601
+ eliminationRisk?: string | undefined;
1602
+ }, {
1603
+ status: "proceed" | "defer" | "reject";
1604
+ confidence: number;
1605
+ roiEstimate?: string | undefined;
1606
+ userImpact?: string | undefined;
1607
+ eliminationRisk?: string | undefined;
1608
+ questions?: string[] | undefined;
1609
+ }>;
1610
+ export declare const VerificationReportSchema: z.ZodObject<{
1611
+ taskId: z.ZodString;
1612
+ passed: z.ZodBoolean;
1613
+ checks: z.ZodArray<z.ZodObject<{
1614
+ name: z.ZodString;
1615
+ passed: z.ZodBoolean;
1616
+ message: z.ZodString;
1617
+ }, "strip", z.ZodTypeAny, {
1618
+ message: string;
1619
+ name: string;
1620
+ passed: boolean;
1621
+ }, {
1622
+ message: string;
1623
+ name: string;
1624
+ passed: boolean;
1625
+ }>, "many">;
1626
+ evidenceIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1627
+ confidence: z.ZodNumber;
1628
+ }, "strip", z.ZodTypeAny, {
1629
+ confidence: number;
1630
+ taskId: string;
1631
+ passed: boolean;
1632
+ checks: {
1633
+ message: string;
1634
+ name: string;
1635
+ passed: boolean;
1636
+ }[];
1637
+ evidenceIds: string[];
1638
+ }, {
1639
+ confidence: number;
1640
+ taskId: string;
1641
+ passed: boolean;
1642
+ checks: {
1643
+ message: string;
1644
+ name: string;
1645
+ passed: boolean;
1646
+ }[];
1647
+ evidenceIds?: string[] | undefined;
1648
+ }>;
1649
+ export declare const BacklogStatusSchema: z.ZodEnum<["TODO", "READY", "PLANNED", "IN_PROGRESS", "BLOCKED", "REVIEW", "DONE"]>;
1650
+ export declare const BacklogTypeSchema: z.ZodEnum<["feature", "bug", "refactor", "tech-debt"]>;
1651
+ export declare const BacklogPrioritySchema: z.ZodEnum<["P0", "P1", "P2", "P3"]>;
1652
+ export declare const BacklogGlobalSchema: z.ZodObject<{
1653
+ product: z.ZodString;
1654
+ strategy: z.ZodString;
1655
+ policy: z.ZodString;
1656
+ reviewRequired: z.ZodBoolean;
1657
+ tddRequired: z.ZodBoolean;
1658
+ }, "strip", z.ZodTypeAny, {
1659
+ strategy: string;
1660
+ product: string;
1661
+ policy: string;
1662
+ reviewRequired: boolean;
1663
+ tddRequired: boolean;
1664
+ }, {
1665
+ strategy: string;
1666
+ product: string;
1667
+ policy: string;
1668
+ reviewRequired: boolean;
1669
+ tddRequired: boolean;
1670
+ }>;
1671
+ export declare const BacklogItemSchema: z.ZodObject<{
1672
+ id: z.ZodString;
1673
+ title: z.ZodString;
1674
+ priority: z.ZodEnum<["P0", "P1", "P2", "P3"]>;
1675
+ status: z.ZodEnum<["TODO", "READY", "PLANNED", "IN_PROGRESS", "BLOCKED", "REVIEW", "DONE"]>;
1676
+ type: z.ZodEnum<["feature", "bug", "refactor", "tech-debt"]>;
1677
+ owner: z.ZodOptional<z.ZodString>;
1678
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1679
+ description: z.ZodString;
1680
+ scope: z.ZodString;
1681
+ outOfScope: z.ZodDefault<z.ZodString>;
1682
+ businessValue: z.ZodOptional<z.ZodString>;
1683
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
1684
+ risks: z.ZodOptional<z.ZodString>;
1685
+ progress: z.ZodNumber;
1686
+ branch: z.ZodOptional<z.ZodString>;
1687
+ reviewer: z.ZodOptional<z.ZodString>;
1688
+ lastUpdate: z.ZodOptional<z.ZodString>;
1689
+ }, "strip", z.ZodTypeAny, {
1690
+ id: string;
1691
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1692
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1693
+ description: string;
1694
+ title: string;
1695
+ acceptanceCriteria: string[];
1696
+ dependencies: string[];
1697
+ priority: "P0" | "P1" | "P2" | "P3";
1698
+ scope: string;
1699
+ outOfScope: string;
1700
+ progress: number;
1701
+ owner?: string | undefined;
1702
+ businessValue?: string | undefined;
1703
+ risks?: string | undefined;
1704
+ branch?: string | undefined;
1705
+ reviewer?: string | undefined;
1706
+ lastUpdate?: string | undefined;
1707
+ }, {
1708
+ id: string;
1709
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1710
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1711
+ description: string;
1712
+ title: string;
1713
+ acceptanceCriteria: string[];
1714
+ priority: "P0" | "P1" | "P2" | "P3";
1715
+ scope: string;
1716
+ progress: number;
1717
+ dependencies?: string[] | undefined;
1718
+ owner?: string | undefined;
1719
+ outOfScope?: string | undefined;
1720
+ businessValue?: string | undefined;
1721
+ risks?: string | undefined;
1722
+ branch?: string | undefined;
1723
+ reviewer?: string | undefined;
1724
+ lastUpdate?: string | undefined;
1725
+ }>;
1726
+ export declare const BacklogDocumentSchema: z.ZodObject<{
1727
+ global: z.ZodObject<{
1728
+ product: z.ZodString;
1729
+ strategy: z.ZodString;
1730
+ policy: z.ZodString;
1731
+ reviewRequired: z.ZodBoolean;
1732
+ tddRequired: z.ZodBoolean;
1733
+ }, "strip", z.ZodTypeAny, {
1734
+ strategy: string;
1735
+ product: string;
1736
+ policy: string;
1737
+ reviewRequired: boolean;
1738
+ tddRequired: boolean;
1739
+ }, {
1740
+ strategy: string;
1741
+ product: string;
1742
+ policy: string;
1743
+ reviewRequired: boolean;
1744
+ tddRequired: boolean;
1745
+ }>;
1746
+ items: z.ZodArray<z.ZodObject<{
1747
+ id: z.ZodString;
1748
+ title: z.ZodString;
1749
+ priority: z.ZodEnum<["P0", "P1", "P2", "P3"]>;
1750
+ status: z.ZodEnum<["TODO", "READY", "PLANNED", "IN_PROGRESS", "BLOCKED", "REVIEW", "DONE"]>;
1751
+ type: z.ZodEnum<["feature", "bug", "refactor", "tech-debt"]>;
1752
+ owner: z.ZodOptional<z.ZodString>;
1753
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1754
+ description: z.ZodString;
1755
+ scope: z.ZodString;
1756
+ outOfScope: z.ZodDefault<z.ZodString>;
1757
+ businessValue: z.ZodOptional<z.ZodString>;
1758
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
1759
+ risks: z.ZodOptional<z.ZodString>;
1760
+ progress: z.ZodNumber;
1761
+ branch: z.ZodOptional<z.ZodString>;
1762
+ reviewer: z.ZodOptional<z.ZodString>;
1763
+ lastUpdate: z.ZodOptional<z.ZodString>;
1764
+ }, "strip", z.ZodTypeAny, {
1765
+ id: string;
1766
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1767
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1768
+ description: string;
1769
+ title: string;
1770
+ acceptanceCriteria: string[];
1771
+ dependencies: string[];
1772
+ priority: "P0" | "P1" | "P2" | "P3";
1773
+ scope: string;
1774
+ outOfScope: string;
1775
+ progress: number;
1776
+ owner?: string | undefined;
1777
+ businessValue?: string | undefined;
1778
+ risks?: string | undefined;
1779
+ branch?: string | undefined;
1780
+ reviewer?: string | undefined;
1781
+ lastUpdate?: string | undefined;
1782
+ }, {
1783
+ id: string;
1784
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1785
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1786
+ description: string;
1787
+ title: string;
1788
+ acceptanceCriteria: string[];
1789
+ priority: "P0" | "P1" | "P2" | "P3";
1790
+ scope: string;
1791
+ progress: number;
1792
+ dependencies?: string[] | undefined;
1793
+ owner?: string | undefined;
1794
+ outOfScope?: string | undefined;
1795
+ businessValue?: string | undefined;
1796
+ risks?: string | undefined;
1797
+ branch?: string | undefined;
1798
+ reviewer?: string | undefined;
1799
+ lastUpdate?: string | undefined;
1800
+ }>, "many">;
1801
+ archive: z.ZodDefault<z.ZodArray<z.ZodObject<{
1802
+ id: z.ZodString;
1803
+ title: z.ZodString;
1804
+ priority: z.ZodEnum<["P0", "P1", "P2", "P3"]>;
1805
+ status: z.ZodEnum<["TODO", "READY", "PLANNED", "IN_PROGRESS", "BLOCKED", "REVIEW", "DONE"]>;
1806
+ type: z.ZodEnum<["feature", "bug", "refactor", "tech-debt"]>;
1807
+ owner: z.ZodOptional<z.ZodString>;
1808
+ dependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1809
+ description: z.ZodString;
1810
+ scope: z.ZodString;
1811
+ outOfScope: z.ZodDefault<z.ZodString>;
1812
+ businessValue: z.ZodOptional<z.ZodString>;
1813
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
1814
+ risks: z.ZodOptional<z.ZodString>;
1815
+ progress: z.ZodNumber;
1816
+ branch: z.ZodOptional<z.ZodString>;
1817
+ reviewer: z.ZodOptional<z.ZodString>;
1818
+ lastUpdate: z.ZodOptional<z.ZodString>;
1819
+ }, "strip", z.ZodTypeAny, {
1820
+ id: string;
1821
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1822
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1823
+ description: string;
1824
+ title: string;
1825
+ acceptanceCriteria: string[];
1826
+ dependencies: string[];
1827
+ priority: "P0" | "P1" | "P2" | "P3";
1828
+ scope: string;
1829
+ outOfScope: string;
1830
+ progress: number;
1831
+ owner?: string | undefined;
1832
+ businessValue?: string | undefined;
1833
+ risks?: string | undefined;
1834
+ branch?: string | undefined;
1835
+ reviewer?: string | undefined;
1836
+ lastUpdate?: string | undefined;
1837
+ }, {
1838
+ id: string;
1839
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1840
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1841
+ description: string;
1842
+ title: string;
1843
+ acceptanceCriteria: string[];
1844
+ priority: "P0" | "P1" | "P2" | "P3";
1845
+ scope: string;
1846
+ progress: number;
1847
+ dependencies?: string[] | undefined;
1848
+ owner?: string | undefined;
1849
+ outOfScope?: string | undefined;
1850
+ businessValue?: string | undefined;
1851
+ risks?: string | undefined;
1852
+ branch?: string | undefined;
1853
+ reviewer?: string | undefined;
1854
+ lastUpdate?: string | undefined;
1855
+ }>, "many">>;
1856
+ }, "strip", z.ZodTypeAny, {
1857
+ global: {
1858
+ strategy: string;
1859
+ product: string;
1860
+ policy: string;
1861
+ reviewRequired: boolean;
1862
+ tddRequired: boolean;
1863
+ };
1864
+ items: {
1865
+ id: string;
1866
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1867
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1868
+ description: string;
1869
+ title: string;
1870
+ acceptanceCriteria: string[];
1871
+ dependencies: string[];
1872
+ priority: "P0" | "P1" | "P2" | "P3";
1873
+ scope: string;
1874
+ outOfScope: string;
1875
+ progress: number;
1876
+ owner?: string | undefined;
1877
+ businessValue?: string | undefined;
1878
+ risks?: string | undefined;
1879
+ branch?: string | undefined;
1880
+ reviewer?: string | undefined;
1881
+ lastUpdate?: string | undefined;
1882
+ }[];
1883
+ archive: {
1884
+ id: string;
1885
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1886
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1887
+ description: string;
1888
+ title: string;
1889
+ acceptanceCriteria: string[];
1890
+ dependencies: string[];
1891
+ priority: "P0" | "P1" | "P2" | "P3";
1892
+ scope: string;
1893
+ outOfScope: string;
1894
+ progress: number;
1895
+ owner?: string | undefined;
1896
+ businessValue?: string | undefined;
1897
+ risks?: string | undefined;
1898
+ branch?: string | undefined;
1899
+ reviewer?: string | undefined;
1900
+ lastUpdate?: string | undefined;
1901
+ }[];
1902
+ }, {
1903
+ global: {
1904
+ strategy: string;
1905
+ product: string;
1906
+ policy: string;
1907
+ reviewRequired: boolean;
1908
+ tddRequired: boolean;
1909
+ };
1910
+ items: {
1911
+ id: string;
1912
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1913
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1914
+ description: string;
1915
+ title: string;
1916
+ acceptanceCriteria: string[];
1917
+ priority: "P0" | "P1" | "P2" | "P3";
1918
+ scope: string;
1919
+ progress: number;
1920
+ dependencies?: string[] | undefined;
1921
+ owner?: string | undefined;
1922
+ outOfScope?: string | undefined;
1923
+ businessValue?: string | undefined;
1924
+ risks?: string | undefined;
1925
+ branch?: string | undefined;
1926
+ reviewer?: string | undefined;
1927
+ lastUpdate?: string | undefined;
1928
+ }[];
1929
+ archive?: {
1930
+ id: string;
1931
+ status: "TODO" | "READY" | "PLANNED" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
1932
+ type: "feature" | "refactor" | "bug" | "tech-debt";
1933
+ description: string;
1934
+ title: string;
1935
+ acceptanceCriteria: string[];
1936
+ priority: "P0" | "P1" | "P2" | "P3";
1937
+ scope: string;
1938
+ progress: number;
1939
+ dependencies?: string[] | undefined;
1940
+ owner?: string | undefined;
1941
+ outOfScope?: string | undefined;
1942
+ businessValue?: string | undefined;
1943
+ risks?: string | undefined;
1944
+ branch?: string | undefined;
1945
+ reviewer?: string | undefined;
1946
+ lastUpdate?: string | undefined;
1947
+ }[] | undefined;
1948
+ }>;
1949
+ export declare const OpenspecTaskCardPhaseSchema: z.ZodEnum<["discover", "design", "implement", "test", "review"]>;
1950
+ export declare const OpenspecTaskCardStatusSchema: z.ZodEnum<["pending", "doing", "blocked", "done"]>;
1951
+ export declare const OpenspecTaskCardSchema: z.ZodObject<{
1952
+ id: z.ZodString;
1953
+ backlogId: z.ZodString;
1954
+ phase: z.ZodEnum<["discover", "design", "implement", "test", "review"]>;
1955
+ title: z.ZodString;
1956
+ prompt: z.ZodString;
1957
+ agent: z.ZodString;
1958
+ modelHint: z.ZodOptional<z.ZodString>;
1959
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1960
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
1961
+ status: z.ZodEnum<["pending", "doing", "blocked", "done"]>;
1962
+ }, "strip", z.ZodTypeAny, {
1963
+ id: string;
1964
+ status: "pending" | "done" | "blocked" | "doing";
1965
+ title: string;
1966
+ acceptanceCriteria: string[];
1967
+ backlogId: string;
1968
+ phase: "test" | "review" | "discover" | "design" | "implement";
1969
+ prompt: string;
1970
+ agent: string;
1971
+ dependsOn: string[];
1972
+ modelHint?: string | undefined;
1973
+ }, {
1974
+ id: string;
1975
+ status: "pending" | "done" | "blocked" | "doing";
1976
+ title: string;
1977
+ acceptanceCriteria: string[];
1978
+ backlogId: string;
1979
+ phase: "test" | "review" | "discover" | "design" | "implement";
1980
+ prompt: string;
1981
+ agent: string;
1982
+ modelHint?: string | undefined;
1983
+ dependsOn?: string[] | undefined;
1984
+ }>;
1985
+ export declare const OpenspecStateSchema: z.ZodObject<{
1986
+ version: z.ZodLiteral<1>;
1987
+ activeItemId: z.ZodOptional<z.ZodString>;
1988
+ taskCards: z.ZodDefault<z.ZodArray<z.ZodObject<{
1989
+ id: z.ZodString;
1990
+ backlogId: z.ZodString;
1991
+ phase: z.ZodEnum<["discover", "design", "implement", "test", "review"]>;
1992
+ title: z.ZodString;
1993
+ prompt: z.ZodString;
1994
+ agent: z.ZodString;
1995
+ modelHint: z.ZodOptional<z.ZodString>;
1996
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1997
+ acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
1998
+ status: z.ZodEnum<["pending", "doing", "blocked", "done"]>;
1999
+ }, "strip", z.ZodTypeAny, {
2000
+ id: string;
2001
+ status: "pending" | "done" | "blocked" | "doing";
2002
+ title: string;
2003
+ acceptanceCriteria: string[];
2004
+ backlogId: string;
2005
+ phase: "test" | "review" | "discover" | "design" | "implement";
2006
+ prompt: string;
2007
+ agent: string;
2008
+ dependsOn: string[];
2009
+ modelHint?: string | undefined;
2010
+ }, {
2011
+ id: string;
2012
+ status: "pending" | "done" | "blocked" | "doing";
2013
+ title: string;
2014
+ acceptanceCriteria: string[];
2015
+ backlogId: string;
2016
+ phase: "test" | "review" | "discover" | "design" | "implement";
2017
+ prompt: string;
2018
+ agent: string;
2019
+ modelHint?: string | undefined;
2020
+ dependsOn?: string[] | undefined;
2021
+ }>, "many">>;
2022
+ lastScanHash: z.ZodOptional<z.ZodString>;
2023
+ lastScanAt: z.ZodOptional<z.ZodString>;
2024
+ changePaths: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
2025
+ itemSnapshots: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
2026
+ }, "strip", z.ZodTypeAny, {
2027
+ version: 1;
2028
+ taskCards: {
2029
+ id: string;
2030
+ status: "pending" | "done" | "blocked" | "doing";
2031
+ title: string;
2032
+ acceptanceCriteria: string[];
2033
+ backlogId: string;
2034
+ phase: "test" | "review" | "discover" | "design" | "implement";
2035
+ prompt: string;
2036
+ agent: string;
2037
+ dependsOn: string[];
2038
+ modelHint?: string | undefined;
2039
+ }[];
2040
+ changePaths: Record<string, string>;
2041
+ itemSnapshots: Record<string, string>;
2042
+ activeItemId?: string | undefined;
2043
+ lastScanHash?: string | undefined;
2044
+ lastScanAt?: string | undefined;
2045
+ }, {
2046
+ version: 1;
2047
+ activeItemId?: string | undefined;
2048
+ taskCards?: {
2049
+ id: string;
2050
+ status: "pending" | "done" | "blocked" | "doing";
2051
+ title: string;
2052
+ acceptanceCriteria: string[];
2053
+ backlogId: string;
2054
+ phase: "test" | "review" | "discover" | "design" | "implement";
2055
+ prompt: string;
2056
+ agent: string;
2057
+ modelHint?: string | undefined;
2058
+ dependsOn?: string[] | undefined;
2059
+ }[] | undefined;
2060
+ lastScanHash?: string | undefined;
2061
+ lastScanAt?: string | undefined;
2062
+ changePaths?: Record<string, string> | undefined;
2063
+ itemSnapshots?: Record<string, string> | undefined;
2064
+ }>;
2065
+ export declare const WorkflowCommandSchema: z.ZodEnum<["feature", "fix", "refactor", "review", "test-plan", "tdd-cycle", "api-contract", "db-migration", "pagespeed", "openspec", "scorecard", "council", "iterative", "explore", "triage", "prototype", "handoff", "clarify"]>;
2066
+ export declare const CcepOutputFormatSchema: z.ZodEnum<["taskcard", "plan", "verdict"]>;
2067
+ export declare const CommandEnvelopeSchema: z.ZodObject<{
2068
+ protocolVersion: z.ZodLiteral<"ccep-1">;
2069
+ command: z.ZodEnum<["feature", "fix", "refactor", "review", "test-plan", "tdd-cycle", "api-contract", "db-migration", "pagespeed", "openspec", "scorecard", "council", "iterative", "explore", "triage", "prototype", "handoff", "clarify"]>;
2070
+ userRequest: z.ZodString;
2071
+ projectId: z.ZodString;
2072
+ repoContext: z.ZodObject<{
2073
+ domain: z.ZodOptional<z.ZodString>;
2074
+ stack: z.ZodArray<z.ZodString, "many">;
2075
+ existingModules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2076
+ architecture: z.ZodOptional<z.ZodString>;
2077
+ }, "strip", z.ZodTypeAny, {
2078
+ stack: string[];
2079
+ existingModules: string[];
2080
+ domain?: string | undefined;
2081
+ architecture?: string | undefined;
2082
+ }, {
2083
+ stack: string[];
2084
+ domain?: string | undefined;
2085
+ existingModules?: string[] | undefined;
2086
+ architecture?: string | undefined;
2087
+ }>;
2088
+ constraints: z.ZodObject<{
2089
+ outputFormat: z.ZodEnum<["taskcard", "plan", "verdict"]>;
2090
+ needConfirmation: z.ZodBoolean;
2091
+ riskThreshold: z.ZodEnum<["low", "medium", "high"]>;
2092
+ }, "strip", z.ZodTypeAny, {
2093
+ outputFormat: "taskcard" | "plan" | "verdict";
2094
+ needConfirmation: boolean;
2095
+ riskThreshold: "low" | "medium" | "high";
2096
+ }, {
2097
+ outputFormat: "taskcard" | "plan" | "verdict";
2098
+ needConfirmation: boolean;
2099
+ riskThreshold: "low" | "medium" | "high";
2100
+ }>;
2101
+ executionPolicy: z.ZodObject<{
2102
+ modelMode: z.ZodLiteral<"structured">;
2103
+ maxVariance: z.ZodLiteral<"low">;
2104
+ }, "strip", z.ZodTypeAny, {
2105
+ modelMode: "structured";
2106
+ maxVariance: "low";
2107
+ }, {
2108
+ modelMode: "structured";
2109
+ maxVariance: "low";
2110
+ }>;
2111
+ }, "strip", z.ZodTypeAny, {
2112
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2113
+ constraints: {
2114
+ outputFormat: "taskcard" | "plan" | "verdict";
2115
+ needConfirmation: boolean;
2116
+ riskThreshold: "low" | "medium" | "high";
2117
+ };
2118
+ protocolVersion: "ccep-1";
2119
+ userRequest: string;
2120
+ projectId: string;
2121
+ repoContext: {
2122
+ stack: string[];
2123
+ existingModules: string[];
2124
+ domain?: string | undefined;
2125
+ architecture?: string | undefined;
2126
+ };
2127
+ executionPolicy: {
2128
+ modelMode: "structured";
2129
+ maxVariance: "low";
2130
+ };
2131
+ }, {
2132
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2133
+ constraints: {
2134
+ outputFormat: "taskcard" | "plan" | "verdict";
2135
+ needConfirmation: boolean;
2136
+ riskThreshold: "low" | "medium" | "high";
2137
+ };
2138
+ protocolVersion: "ccep-1";
2139
+ userRequest: string;
2140
+ projectId: string;
2141
+ repoContext: {
2142
+ stack: string[];
2143
+ domain?: string | undefined;
2144
+ existingModules?: string[] | undefined;
2145
+ architecture?: string | undefined;
2146
+ };
2147
+ executionPolicy: {
2148
+ modelMode: "structured";
2149
+ maxVariance: "low";
2150
+ };
2151
+ }>;
2152
+ export declare const WorkflowPhaseSchema: z.ZodObject<{
2153
+ id: z.ZodString;
2154
+ agent: z.ZodOptional<z.ZodString>;
2155
+ agents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2156
+ skill: z.ZodOptional<z.ZodString>;
2157
+ type: z.ZodOptional<z.ZodString>;
2158
+ outputSchema: z.ZodOptional<z.ZodString>;
2159
+ stopGate: z.ZodOptional<z.ZodString>;
2160
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2161
+ requires: z.ZodOptional<z.ZodString>;
2162
+ parallelWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2163
+ }, "strip", z.ZodTypeAny, {
2164
+ id: string;
2165
+ type?: string | undefined;
2166
+ agents?: string[] | undefined;
2167
+ agent?: string | undefined;
2168
+ dependsOn?: string[] | undefined;
2169
+ skill?: string | undefined;
2170
+ outputSchema?: string | undefined;
2171
+ stopGate?: string | undefined;
2172
+ requires?: string | undefined;
2173
+ parallelWith?: string[] | undefined;
2174
+ }, {
2175
+ id: string;
2176
+ type?: string | undefined;
2177
+ agents?: string[] | undefined;
2178
+ agent?: string | undefined;
2179
+ dependsOn?: string[] | undefined;
2180
+ skill?: string | undefined;
2181
+ outputSchema?: string | undefined;
2182
+ stopGate?: string | undefined;
2183
+ requires?: string | undefined;
2184
+ parallelWith?: string[] | undefined;
2185
+ }>;
2186
+ export declare const WorkflowRiskRuleSchema: z.ZodObject<{
2187
+ when: z.ZodObject<{
2188
+ risk: z.ZodUnion<[z.ZodEnum<["low", "medium", "high"]>, z.ZodArray<z.ZodEnum<["low", "medium", "high"]>, "many">]>;
2189
+ }, "strip", z.ZodTypeAny, {
2190
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2191
+ }, {
2192
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2193
+ }>;
2194
+ then: z.ZodArray<z.ZodString, "many">;
2195
+ }, "strip", z.ZodTypeAny, {
2196
+ when: {
2197
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2198
+ };
2199
+ then: string[];
2200
+ }, {
2201
+ when: {
2202
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2203
+ };
2204
+ then: string[];
2205
+ }>;
2206
+ export declare const WorkflowProfileSchema: z.ZodEffects<z.ZodObject<{
2207
+ id: z.ZodString;
2208
+ version: z.ZodNumber;
2209
+ command: z.ZodEnum<["feature", "fix", "refactor", "review", "test-plan", "tdd-cycle", "api-contract", "db-migration", "pagespeed", "openspec", "scorecard", "council", "iterative", "explore", "triage", "prototype", "handoff", "clarify"]>;
2210
+ taskCard: z.ZodOptional<z.ZodObject<{
2211
+ type: z.ZodString;
2212
+ requiredFields: z.ZodArray<z.ZodString, "many">;
2213
+ optionalFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2214
+ }, "strip", z.ZodTypeAny, {
2215
+ type: string;
2216
+ requiredFields: string[];
2217
+ optionalFields?: string[] | undefined;
2218
+ }, {
2219
+ type: string;
2220
+ requiredFields: string[];
2221
+ optionalFields?: string[] | undefined;
2222
+ }>>;
2223
+ intakeSchema: z.ZodOptional<z.ZodString>;
2224
+ phases: z.ZodArray<z.ZodObject<{
2225
+ id: z.ZodString;
2226
+ agent: z.ZodOptional<z.ZodString>;
2227
+ agents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2228
+ skill: z.ZodOptional<z.ZodString>;
2229
+ type: z.ZodOptional<z.ZodString>;
2230
+ outputSchema: z.ZodOptional<z.ZodString>;
2231
+ stopGate: z.ZodOptional<z.ZodString>;
2232
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2233
+ requires: z.ZodOptional<z.ZodString>;
2234
+ parallelWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2235
+ }, "strip", z.ZodTypeAny, {
2236
+ id: string;
2237
+ type?: string | undefined;
2238
+ agents?: string[] | undefined;
2239
+ agent?: string | undefined;
2240
+ dependsOn?: string[] | undefined;
2241
+ skill?: string | undefined;
2242
+ outputSchema?: string | undefined;
2243
+ stopGate?: string | undefined;
2244
+ requires?: string | undefined;
2245
+ parallelWith?: string[] | undefined;
2246
+ }, {
2247
+ id: string;
2248
+ type?: string | undefined;
2249
+ agents?: string[] | undefined;
2250
+ agent?: string | undefined;
2251
+ dependsOn?: string[] | undefined;
2252
+ skill?: string | undefined;
2253
+ outputSchema?: string | undefined;
2254
+ stopGate?: string | undefined;
2255
+ requires?: string | undefined;
2256
+ parallelWith?: string[] | undefined;
2257
+ }>, "many">;
2258
+ routing: z.ZodObject<{
2259
+ default: z.ZodArray<z.ZodString, "many">;
2260
+ riskRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2261
+ when: z.ZodObject<{
2262
+ risk: z.ZodUnion<[z.ZodEnum<["low", "medium", "high"]>, z.ZodArray<z.ZodEnum<["low", "medium", "high"]>, "many">]>;
2263
+ }, "strip", z.ZodTypeAny, {
2264
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2265
+ }, {
2266
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2267
+ }>;
2268
+ then: z.ZodArray<z.ZodString, "many">;
2269
+ }, "strip", z.ZodTypeAny, {
2270
+ when: {
2271
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2272
+ };
2273
+ then: string[];
2274
+ }, {
2275
+ when: {
2276
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2277
+ };
2278
+ then: string[];
2279
+ }>, "many">>;
2280
+ }, "strip", z.ZodTypeAny, {
2281
+ default: string[];
2282
+ riskRules?: {
2283
+ when: {
2284
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2285
+ };
2286
+ then: string[];
2287
+ }[] | undefined;
2288
+ }, {
2289
+ default: string[];
2290
+ riskRules?: {
2291
+ when: {
2292
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2293
+ };
2294
+ then: string[];
2295
+ }[] | undefined;
2296
+ }>;
2297
+ confirmationGate: z.ZodObject<{
2298
+ stopOnHighRisk: z.ZodBoolean;
2299
+ stopOnQuestions: z.ZodBoolean;
2300
+ }, "strip", z.ZodTypeAny, {
2301
+ stopOnHighRisk: boolean;
2302
+ stopOnQuestions: boolean;
2303
+ }, {
2304
+ stopOnHighRisk: boolean;
2305
+ stopOnQuestions: boolean;
2306
+ }>;
2307
+ }, "strip", z.ZodTypeAny, {
2308
+ id: string;
2309
+ version: number;
2310
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2311
+ phases: {
2312
+ id: string;
2313
+ type?: string | undefined;
2314
+ agents?: string[] | undefined;
2315
+ agent?: string | undefined;
2316
+ dependsOn?: string[] | undefined;
2317
+ skill?: string | undefined;
2318
+ outputSchema?: string | undefined;
2319
+ stopGate?: string | undefined;
2320
+ requires?: string | undefined;
2321
+ parallelWith?: string[] | undefined;
2322
+ }[];
2323
+ routing: {
2324
+ default: string[];
2325
+ riskRules?: {
2326
+ when: {
2327
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2328
+ };
2329
+ then: string[];
2330
+ }[] | undefined;
2331
+ };
2332
+ confirmationGate: {
2333
+ stopOnHighRisk: boolean;
2334
+ stopOnQuestions: boolean;
2335
+ };
2336
+ taskCard?: {
2337
+ type: string;
2338
+ requiredFields: string[];
2339
+ optionalFields?: string[] | undefined;
2340
+ } | undefined;
2341
+ intakeSchema?: string | undefined;
2342
+ }, {
2343
+ id: string;
2344
+ version: number;
2345
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2346
+ phases: {
2347
+ id: string;
2348
+ type?: string | undefined;
2349
+ agents?: string[] | undefined;
2350
+ agent?: string | undefined;
2351
+ dependsOn?: string[] | undefined;
2352
+ skill?: string | undefined;
2353
+ outputSchema?: string | undefined;
2354
+ stopGate?: string | undefined;
2355
+ requires?: string | undefined;
2356
+ parallelWith?: string[] | undefined;
2357
+ }[];
2358
+ routing: {
2359
+ default: string[];
2360
+ riskRules?: {
2361
+ when: {
2362
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2363
+ };
2364
+ then: string[];
2365
+ }[] | undefined;
2366
+ };
2367
+ confirmationGate: {
2368
+ stopOnHighRisk: boolean;
2369
+ stopOnQuestions: boolean;
2370
+ };
2371
+ taskCard?: {
2372
+ type: string;
2373
+ requiredFields: string[];
2374
+ optionalFields?: string[] | undefined;
2375
+ } | undefined;
2376
+ intakeSchema?: string | undefined;
2377
+ }>, {
2378
+ id: string;
2379
+ version: number;
2380
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2381
+ phases: {
2382
+ id: string;
2383
+ type?: string | undefined;
2384
+ agents?: string[] | undefined;
2385
+ agent?: string | undefined;
2386
+ dependsOn?: string[] | undefined;
2387
+ skill?: string | undefined;
2388
+ outputSchema?: string | undefined;
2389
+ stopGate?: string | undefined;
2390
+ requires?: string | undefined;
2391
+ parallelWith?: string[] | undefined;
2392
+ }[];
2393
+ routing: {
2394
+ default: string[];
2395
+ riskRules?: {
2396
+ when: {
2397
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2398
+ };
2399
+ then: string[];
2400
+ }[] | undefined;
2401
+ };
2402
+ confirmationGate: {
2403
+ stopOnHighRisk: boolean;
2404
+ stopOnQuestions: boolean;
2405
+ };
2406
+ taskCard?: {
2407
+ type: string;
2408
+ requiredFields: string[];
2409
+ optionalFields?: string[] | undefined;
2410
+ } | undefined;
2411
+ intakeSchema?: string | undefined;
2412
+ }, {
2413
+ id: string;
2414
+ version: number;
2415
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2416
+ phases: {
2417
+ id: string;
2418
+ type?: string | undefined;
2419
+ agents?: string[] | undefined;
2420
+ agent?: string | undefined;
2421
+ dependsOn?: string[] | undefined;
2422
+ skill?: string | undefined;
2423
+ outputSchema?: string | undefined;
2424
+ stopGate?: string | undefined;
2425
+ requires?: string | undefined;
2426
+ parallelWith?: string[] | undefined;
2427
+ }[];
2428
+ routing: {
2429
+ default: string[];
2430
+ riskRules?: {
2431
+ when: {
2432
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2433
+ };
2434
+ then: string[];
2435
+ }[] | undefined;
2436
+ };
2437
+ confirmationGate: {
2438
+ stopOnHighRisk: boolean;
2439
+ stopOnQuestions: boolean;
2440
+ };
2441
+ taskCard?: {
2442
+ type: string;
2443
+ requiredFields: string[];
2444
+ optionalFields?: string[] | undefined;
2445
+ } | undefined;
2446
+ intakeSchema?: string | undefined;
2447
+ }>;
2448
+ export declare const ExecutionContextSchema: z.ZodObject<{
2449
+ envelope: z.ZodObject<{
2450
+ protocolVersion: z.ZodLiteral<"ccep-1">;
2451
+ command: z.ZodEnum<["feature", "fix", "refactor", "review", "test-plan", "tdd-cycle", "api-contract", "db-migration", "pagespeed", "openspec", "scorecard", "council", "iterative", "explore", "triage", "prototype", "handoff", "clarify"]>;
2452
+ userRequest: z.ZodString;
2453
+ projectId: z.ZodString;
2454
+ repoContext: z.ZodObject<{
2455
+ domain: z.ZodOptional<z.ZodString>;
2456
+ stack: z.ZodArray<z.ZodString, "many">;
2457
+ existingModules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2458
+ architecture: z.ZodOptional<z.ZodString>;
2459
+ }, "strip", z.ZodTypeAny, {
2460
+ stack: string[];
2461
+ existingModules: string[];
2462
+ domain?: string | undefined;
2463
+ architecture?: string | undefined;
2464
+ }, {
2465
+ stack: string[];
2466
+ domain?: string | undefined;
2467
+ existingModules?: string[] | undefined;
2468
+ architecture?: string | undefined;
2469
+ }>;
2470
+ constraints: z.ZodObject<{
2471
+ outputFormat: z.ZodEnum<["taskcard", "plan", "verdict"]>;
2472
+ needConfirmation: z.ZodBoolean;
2473
+ riskThreshold: z.ZodEnum<["low", "medium", "high"]>;
2474
+ }, "strip", z.ZodTypeAny, {
2475
+ outputFormat: "taskcard" | "plan" | "verdict";
2476
+ needConfirmation: boolean;
2477
+ riskThreshold: "low" | "medium" | "high";
2478
+ }, {
2479
+ outputFormat: "taskcard" | "plan" | "verdict";
2480
+ needConfirmation: boolean;
2481
+ riskThreshold: "low" | "medium" | "high";
2482
+ }>;
2483
+ executionPolicy: z.ZodObject<{
2484
+ modelMode: z.ZodLiteral<"structured">;
2485
+ maxVariance: z.ZodLiteral<"low">;
2486
+ }, "strip", z.ZodTypeAny, {
2487
+ modelMode: "structured";
2488
+ maxVariance: "low";
2489
+ }, {
2490
+ modelMode: "structured";
2491
+ maxVariance: "low";
2492
+ }>;
2493
+ }, "strip", z.ZodTypeAny, {
2494
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2495
+ constraints: {
2496
+ outputFormat: "taskcard" | "plan" | "verdict";
2497
+ needConfirmation: boolean;
2498
+ riskThreshold: "low" | "medium" | "high";
2499
+ };
2500
+ protocolVersion: "ccep-1";
2501
+ userRequest: string;
2502
+ projectId: string;
2503
+ repoContext: {
2504
+ stack: string[];
2505
+ existingModules: string[];
2506
+ domain?: string | undefined;
2507
+ architecture?: string | undefined;
2508
+ };
2509
+ executionPolicy: {
2510
+ modelMode: "structured";
2511
+ maxVariance: "low";
2512
+ };
2513
+ }, {
2514
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2515
+ constraints: {
2516
+ outputFormat: "taskcard" | "plan" | "verdict";
2517
+ needConfirmation: boolean;
2518
+ riskThreshold: "low" | "medium" | "high";
2519
+ };
2520
+ protocolVersion: "ccep-1";
2521
+ userRequest: string;
2522
+ projectId: string;
2523
+ repoContext: {
2524
+ stack: string[];
2525
+ domain?: string | undefined;
2526
+ existingModules?: string[] | undefined;
2527
+ architecture?: string | undefined;
2528
+ };
2529
+ executionPolicy: {
2530
+ modelMode: "structured";
2531
+ maxVariance: "low";
2532
+ };
2533
+ }>;
2534
+ profile: z.ZodEffects<z.ZodObject<{
2535
+ id: z.ZodString;
2536
+ version: z.ZodNumber;
2537
+ command: z.ZodEnum<["feature", "fix", "refactor", "review", "test-plan", "tdd-cycle", "api-contract", "db-migration", "pagespeed", "openspec", "scorecard", "council", "iterative", "explore", "triage", "prototype", "handoff", "clarify"]>;
2538
+ taskCard: z.ZodOptional<z.ZodObject<{
2539
+ type: z.ZodString;
2540
+ requiredFields: z.ZodArray<z.ZodString, "many">;
2541
+ optionalFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2542
+ }, "strip", z.ZodTypeAny, {
2543
+ type: string;
2544
+ requiredFields: string[];
2545
+ optionalFields?: string[] | undefined;
2546
+ }, {
2547
+ type: string;
2548
+ requiredFields: string[];
2549
+ optionalFields?: string[] | undefined;
2550
+ }>>;
2551
+ intakeSchema: z.ZodOptional<z.ZodString>;
2552
+ phases: z.ZodArray<z.ZodObject<{
2553
+ id: z.ZodString;
2554
+ agent: z.ZodOptional<z.ZodString>;
2555
+ agents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2556
+ skill: z.ZodOptional<z.ZodString>;
2557
+ type: z.ZodOptional<z.ZodString>;
2558
+ outputSchema: z.ZodOptional<z.ZodString>;
2559
+ stopGate: z.ZodOptional<z.ZodString>;
2560
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2561
+ requires: z.ZodOptional<z.ZodString>;
2562
+ parallelWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2563
+ }, "strip", z.ZodTypeAny, {
2564
+ id: string;
2565
+ type?: string | undefined;
2566
+ agents?: string[] | undefined;
2567
+ agent?: string | undefined;
2568
+ dependsOn?: string[] | undefined;
2569
+ skill?: string | undefined;
2570
+ outputSchema?: string | undefined;
2571
+ stopGate?: string | undefined;
2572
+ requires?: string | undefined;
2573
+ parallelWith?: string[] | undefined;
2574
+ }, {
2575
+ id: string;
2576
+ type?: string | undefined;
2577
+ agents?: string[] | undefined;
2578
+ agent?: string | undefined;
2579
+ dependsOn?: string[] | undefined;
2580
+ skill?: string | undefined;
2581
+ outputSchema?: string | undefined;
2582
+ stopGate?: string | undefined;
2583
+ requires?: string | undefined;
2584
+ parallelWith?: string[] | undefined;
2585
+ }>, "many">;
2586
+ routing: z.ZodObject<{
2587
+ default: z.ZodArray<z.ZodString, "many">;
2588
+ riskRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
2589
+ when: z.ZodObject<{
2590
+ risk: z.ZodUnion<[z.ZodEnum<["low", "medium", "high"]>, z.ZodArray<z.ZodEnum<["low", "medium", "high"]>, "many">]>;
2591
+ }, "strip", z.ZodTypeAny, {
2592
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2593
+ }, {
2594
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2595
+ }>;
2596
+ then: z.ZodArray<z.ZodString, "many">;
2597
+ }, "strip", z.ZodTypeAny, {
2598
+ when: {
2599
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2600
+ };
2601
+ then: string[];
2602
+ }, {
2603
+ when: {
2604
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2605
+ };
2606
+ then: string[];
2607
+ }>, "many">>;
2608
+ }, "strip", z.ZodTypeAny, {
2609
+ default: string[];
2610
+ riskRules?: {
2611
+ when: {
2612
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2613
+ };
2614
+ then: string[];
2615
+ }[] | undefined;
2616
+ }, {
2617
+ default: string[];
2618
+ riskRules?: {
2619
+ when: {
2620
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2621
+ };
2622
+ then: string[];
2623
+ }[] | undefined;
2624
+ }>;
2625
+ confirmationGate: z.ZodObject<{
2626
+ stopOnHighRisk: z.ZodBoolean;
2627
+ stopOnQuestions: z.ZodBoolean;
2628
+ }, "strip", z.ZodTypeAny, {
2629
+ stopOnHighRisk: boolean;
2630
+ stopOnQuestions: boolean;
2631
+ }, {
2632
+ stopOnHighRisk: boolean;
2633
+ stopOnQuestions: boolean;
2634
+ }>;
2635
+ }, "strip", z.ZodTypeAny, {
2636
+ id: string;
2637
+ version: number;
2638
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2639
+ phases: {
2640
+ id: string;
2641
+ type?: string | undefined;
2642
+ agents?: string[] | undefined;
2643
+ agent?: string | undefined;
2644
+ dependsOn?: string[] | undefined;
2645
+ skill?: string | undefined;
2646
+ outputSchema?: string | undefined;
2647
+ stopGate?: string | undefined;
2648
+ requires?: string | undefined;
2649
+ parallelWith?: string[] | undefined;
2650
+ }[];
2651
+ routing: {
2652
+ default: string[];
2653
+ riskRules?: {
2654
+ when: {
2655
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2656
+ };
2657
+ then: string[];
2658
+ }[] | undefined;
2659
+ };
2660
+ confirmationGate: {
2661
+ stopOnHighRisk: boolean;
2662
+ stopOnQuestions: boolean;
2663
+ };
2664
+ taskCard?: {
2665
+ type: string;
2666
+ requiredFields: string[];
2667
+ optionalFields?: string[] | undefined;
2668
+ } | undefined;
2669
+ intakeSchema?: string | undefined;
2670
+ }, {
2671
+ id: string;
2672
+ version: number;
2673
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2674
+ phases: {
2675
+ id: string;
2676
+ type?: string | undefined;
2677
+ agents?: string[] | undefined;
2678
+ agent?: string | undefined;
2679
+ dependsOn?: string[] | undefined;
2680
+ skill?: string | undefined;
2681
+ outputSchema?: string | undefined;
2682
+ stopGate?: string | undefined;
2683
+ requires?: string | undefined;
2684
+ parallelWith?: string[] | undefined;
2685
+ }[];
2686
+ routing: {
2687
+ default: string[];
2688
+ riskRules?: {
2689
+ when: {
2690
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2691
+ };
2692
+ then: string[];
2693
+ }[] | undefined;
2694
+ };
2695
+ confirmationGate: {
2696
+ stopOnHighRisk: boolean;
2697
+ stopOnQuestions: boolean;
2698
+ };
2699
+ taskCard?: {
2700
+ type: string;
2701
+ requiredFields: string[];
2702
+ optionalFields?: string[] | undefined;
2703
+ } | undefined;
2704
+ intakeSchema?: string | undefined;
2705
+ }>, {
2706
+ id: string;
2707
+ version: number;
2708
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2709
+ phases: {
2710
+ id: string;
2711
+ type?: string | undefined;
2712
+ agents?: string[] | undefined;
2713
+ agent?: string | undefined;
2714
+ dependsOn?: string[] | undefined;
2715
+ skill?: string | undefined;
2716
+ outputSchema?: string | undefined;
2717
+ stopGate?: string | undefined;
2718
+ requires?: string | undefined;
2719
+ parallelWith?: string[] | undefined;
2720
+ }[];
2721
+ routing: {
2722
+ default: string[];
2723
+ riskRules?: {
2724
+ when: {
2725
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2726
+ };
2727
+ then: string[];
2728
+ }[] | undefined;
2729
+ };
2730
+ confirmationGate: {
2731
+ stopOnHighRisk: boolean;
2732
+ stopOnQuestions: boolean;
2733
+ };
2734
+ taskCard?: {
2735
+ type: string;
2736
+ requiredFields: string[];
2737
+ optionalFields?: string[] | undefined;
2738
+ } | undefined;
2739
+ intakeSchema?: string | undefined;
2740
+ }, {
2741
+ id: string;
2742
+ version: number;
2743
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2744
+ phases: {
2745
+ id: string;
2746
+ type?: string | undefined;
2747
+ agents?: string[] | undefined;
2748
+ agent?: string | undefined;
2749
+ dependsOn?: string[] | undefined;
2750
+ skill?: string | undefined;
2751
+ outputSchema?: string | undefined;
2752
+ stopGate?: string | undefined;
2753
+ requires?: string | undefined;
2754
+ parallelWith?: string[] | undefined;
2755
+ }[];
2756
+ routing: {
2757
+ default: string[];
2758
+ riskRules?: {
2759
+ when: {
2760
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2761
+ };
2762
+ then: string[];
2763
+ }[] | undefined;
2764
+ };
2765
+ confirmationGate: {
2766
+ stopOnHighRisk: boolean;
2767
+ stopOnQuestions: boolean;
2768
+ };
2769
+ taskCard?: {
2770
+ type: string;
2771
+ requiredFields: string[];
2772
+ optionalFields?: string[] | undefined;
2773
+ } | undefined;
2774
+ intakeSchema?: string | undefined;
2775
+ }>;
2776
+ intent: z.ZodObject<{
2777
+ type: z.ZodEnum<["feature", "fix", "refactor", "review", "test-plan", "tdd-cycle", "api-contract", "db-migration", "pagespeed", "openspec", "scorecard", "council", "iterative", "explore", "triage", "prototype", "handoff", "clarify"]>;
2778
+ goal: z.ZodString;
2779
+ domain: z.ZodOptional<z.ZodString>;
2780
+ entity: z.ZodOptional<z.ZodString>;
2781
+ operation: z.ZodOptional<z.ZodString>;
2782
+ }, "strip", z.ZodTypeAny, {
2783
+ type: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2784
+ goal: string;
2785
+ domain?: string | undefined;
2786
+ entity?: string | undefined;
2787
+ operation?: string | undefined;
2788
+ }, {
2789
+ type: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2790
+ goal: string;
2791
+ domain?: string | undefined;
2792
+ entity?: string | undefined;
2793
+ operation?: string | undefined;
2794
+ }>;
2795
+ project: z.ZodObject<{
2796
+ name: z.ZodString;
2797
+ rootDir: z.ZodString;
2798
+ stack: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2799
+ }, "strip", z.ZodTypeAny, {
2800
+ name: string;
2801
+ rootDir: string;
2802
+ stack?: string[] | undefined;
2803
+ }, {
2804
+ name: string;
2805
+ rootDir: string;
2806
+ stack?: string[] | undefined;
2807
+ }>;
2808
+ knowledge: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2809
+ ast: z.ZodObject<{
2810
+ source: z.ZodEnum<["detect", "graphify", "manual", "product-graph"]>;
2811
+ confidence: z.ZodEnum<["low", "medium", "high"]>;
2812
+ domains: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
2813
+ rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2814
+ }, "strip", z.ZodTypeAny, {
2815
+ confidence: "low" | "medium" | "high";
2816
+ source: "detect" | "graphify" | "manual" | "product-graph";
2817
+ domains?: unknown[] | undefined;
2818
+ rules?: string[] | undefined;
2819
+ }, {
2820
+ confidence: "low" | "medium" | "high";
2821
+ source: "detect" | "graphify" | "manual" | "product-graph";
2822
+ domains?: unknown[] | undefined;
2823
+ rules?: string[] | undefined;
2824
+ }>;
2825
+ policies: z.ZodObject<{
2826
+ architecture: z.ZodString;
2827
+ testing: z.ZodString;
2828
+ documentation: z.ZodString;
2829
+ breakingChanges: z.ZodString;
2830
+ }, "strip", z.ZodTypeAny, {
2831
+ architecture: string;
2832
+ testing: string;
2833
+ documentation: string;
2834
+ breakingChanges: string;
2835
+ }, {
2836
+ architecture: string;
2837
+ testing: string;
2838
+ documentation: string;
2839
+ breakingChanges: string;
2840
+ }>;
2841
+ currentPhase: z.ZodOptional<z.ZodString>;
2842
+ outputSchema: z.ZodString;
2843
+ }, "strip", z.ZodTypeAny, {
2844
+ project: {
2845
+ name: string;
2846
+ rootDir: string;
2847
+ stack?: string[] | undefined;
2848
+ };
2849
+ profile: {
2850
+ id: string;
2851
+ version: number;
2852
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2853
+ phases: {
2854
+ id: string;
2855
+ type?: string | undefined;
2856
+ agents?: string[] | undefined;
2857
+ agent?: string | undefined;
2858
+ dependsOn?: string[] | undefined;
2859
+ skill?: string | undefined;
2860
+ outputSchema?: string | undefined;
2861
+ stopGate?: string | undefined;
2862
+ requires?: string | undefined;
2863
+ parallelWith?: string[] | undefined;
2864
+ }[];
2865
+ routing: {
2866
+ default: string[];
2867
+ riskRules?: {
2868
+ when: {
2869
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2870
+ };
2871
+ then: string[];
2872
+ }[] | undefined;
2873
+ };
2874
+ confirmationGate: {
2875
+ stopOnHighRisk: boolean;
2876
+ stopOnQuestions: boolean;
2877
+ };
2878
+ taskCard?: {
2879
+ type: string;
2880
+ requiredFields: string[];
2881
+ optionalFields?: string[] | undefined;
2882
+ } | undefined;
2883
+ intakeSchema?: string | undefined;
2884
+ };
2885
+ outputSchema: string;
2886
+ envelope: {
2887
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2888
+ constraints: {
2889
+ outputFormat: "taskcard" | "plan" | "verdict";
2890
+ needConfirmation: boolean;
2891
+ riskThreshold: "low" | "medium" | "high";
2892
+ };
2893
+ protocolVersion: "ccep-1";
2894
+ userRequest: string;
2895
+ projectId: string;
2896
+ repoContext: {
2897
+ stack: string[];
2898
+ existingModules: string[];
2899
+ domain?: string | undefined;
2900
+ architecture?: string | undefined;
2901
+ };
2902
+ executionPolicy: {
2903
+ modelMode: "structured";
2904
+ maxVariance: "low";
2905
+ };
2906
+ };
2907
+ intent: {
2908
+ type: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2909
+ goal: string;
2910
+ domain?: string | undefined;
2911
+ entity?: string | undefined;
2912
+ operation?: string | undefined;
2913
+ };
2914
+ knowledge: Record<string, unknown>;
2915
+ ast: {
2916
+ confidence: "low" | "medium" | "high";
2917
+ source: "detect" | "graphify" | "manual" | "product-graph";
2918
+ domains?: unknown[] | undefined;
2919
+ rules?: string[] | undefined;
2920
+ };
2921
+ policies: {
2922
+ architecture: string;
2923
+ testing: string;
2924
+ documentation: string;
2925
+ breakingChanges: string;
2926
+ };
2927
+ currentPhase?: string | undefined;
2928
+ }, {
2929
+ project: {
2930
+ name: string;
2931
+ rootDir: string;
2932
+ stack?: string[] | undefined;
2933
+ };
2934
+ profile: {
2935
+ id: string;
2936
+ version: number;
2937
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2938
+ phases: {
2939
+ id: string;
2940
+ type?: string | undefined;
2941
+ agents?: string[] | undefined;
2942
+ agent?: string | undefined;
2943
+ dependsOn?: string[] | undefined;
2944
+ skill?: string | undefined;
2945
+ outputSchema?: string | undefined;
2946
+ stopGate?: string | undefined;
2947
+ requires?: string | undefined;
2948
+ parallelWith?: string[] | undefined;
2949
+ }[];
2950
+ routing: {
2951
+ default: string[];
2952
+ riskRules?: {
2953
+ when: {
2954
+ risk: "low" | "medium" | "high" | ("low" | "medium" | "high")[];
2955
+ };
2956
+ then: string[];
2957
+ }[] | undefined;
2958
+ };
2959
+ confirmationGate: {
2960
+ stopOnHighRisk: boolean;
2961
+ stopOnQuestions: boolean;
2962
+ };
2963
+ taskCard?: {
2964
+ type: string;
2965
+ requiredFields: string[];
2966
+ optionalFields?: string[] | undefined;
2967
+ } | undefined;
2968
+ intakeSchema?: string | undefined;
2969
+ };
2970
+ outputSchema: string;
2971
+ envelope: {
2972
+ command: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2973
+ constraints: {
2974
+ outputFormat: "taskcard" | "plan" | "verdict";
2975
+ needConfirmation: boolean;
2976
+ riskThreshold: "low" | "medium" | "high";
2977
+ };
2978
+ protocolVersion: "ccep-1";
2979
+ userRequest: string;
2980
+ projectId: string;
2981
+ repoContext: {
2982
+ stack: string[];
2983
+ domain?: string | undefined;
2984
+ existingModules?: string[] | undefined;
2985
+ architecture?: string | undefined;
2986
+ };
2987
+ executionPolicy: {
2988
+ modelMode: "structured";
2989
+ maxVariance: "low";
2990
+ };
2991
+ };
2992
+ intent: {
2993
+ type: "council" | "feature" | "fix" | "refactor" | "review" | "test-plan" | "tdd-cycle" | "api-contract" | "db-migration" | "pagespeed" | "openspec" | "scorecard" | "iterative" | "explore" | "triage" | "prototype" | "handoff" | "clarify";
2994
+ goal: string;
2995
+ domain?: string | undefined;
2996
+ entity?: string | undefined;
2997
+ operation?: string | undefined;
2998
+ };
2999
+ ast: {
3000
+ confidence: "low" | "medium" | "high";
3001
+ source: "detect" | "graphify" | "manual" | "product-graph";
3002
+ domains?: unknown[] | undefined;
3003
+ rules?: string[] | undefined;
3004
+ };
3005
+ policies: {
3006
+ architecture: string;
3007
+ testing: string;
3008
+ documentation: string;
3009
+ breakingChanges: string;
3010
+ };
3011
+ knowledge?: Record<string, unknown> | undefined;
3012
+ currentPhase?: string | undefined;
3013
+ }>;
3014
+ export declare const PlannerOutputSchema: z.ZodObject<{
3015
+ status: z.ZodEnum<["success", "needs_clarification"]>;
3016
+ confidence: z.ZodNumber;
3017
+ goal: z.ZodString;
3018
+ assumptions: z.ZodArray<z.ZodString, "many">;
3019
+ risks: z.ZodArray<z.ZodObject<{
3020
+ type: z.ZodString;
3021
+ description: z.ZodString;
3022
+ severity: z.ZodEnum<["low", "medium", "high"]>;
3023
+ }, "strip", z.ZodTypeAny, {
3024
+ type: string;
3025
+ description: string;
3026
+ severity: "low" | "medium" | "high";
3027
+ }, {
3028
+ type: string;
3029
+ description: string;
3030
+ severity: "low" | "medium" | "high";
3031
+ }>, "many">;
3032
+ tasks: z.ZodArray<z.ZodObject<{
3033
+ id: z.ZodString;
3034
+ title: z.ZodString;
3035
+ priority: z.ZodString;
3036
+ estimate: z.ZodString;
3037
+ dependencies: z.ZodArray<z.ZodString, "many">;
3038
+ }, "strip", z.ZodTypeAny, {
3039
+ id: string;
3040
+ title: string;
3041
+ dependencies: string[];
3042
+ priority: string;
3043
+ estimate: string;
3044
+ }, {
3045
+ id: string;
3046
+ title: string;
3047
+ dependencies: string[];
3048
+ priority: string;
3049
+ estimate: string;
3050
+ }>, "many">;
3051
+ questionsForUser: z.ZodArray<z.ZodString, "many">;
3052
+ needsConfirmation: z.ZodBoolean;
3053
+ }, "strip", z.ZodTypeAny, {
3054
+ status: "success" | "needs_clarification";
3055
+ confidence: number;
3056
+ tasks: {
3057
+ id: string;
3058
+ title: string;
3059
+ dependencies: string[];
3060
+ priority: string;
3061
+ estimate: string;
3062
+ }[];
3063
+ risks: {
3064
+ type: string;
3065
+ description: string;
3066
+ severity: "low" | "medium" | "high";
3067
+ }[];
3068
+ goal: string;
3069
+ assumptions: string[];
3070
+ questionsForUser: string[];
3071
+ needsConfirmation: boolean;
3072
+ }, {
3073
+ status: "success" | "needs_clarification";
3074
+ confidence: number;
3075
+ tasks: {
3076
+ id: string;
3077
+ title: string;
3078
+ dependencies: string[];
3079
+ priority: string;
3080
+ estimate: string;
3081
+ }[];
3082
+ risks: {
3083
+ type: string;
3084
+ description: string;
3085
+ severity: "low" | "medium" | "high";
3086
+ }[];
3087
+ goal: string;
3088
+ assumptions: string[];
3089
+ questionsForUser: string[];
3090
+ needsConfirmation: boolean;
3091
+ }>;
3092
+ export declare const AgentArtifactSchema: z.ZodObject<{
3093
+ type: z.ZodString;
3094
+ path: z.ZodOptional<z.ZodString>;
3095
+ content: z.ZodOptional<z.ZodString>;
3096
+ }, "strip", z.ZodTypeAny, {
3097
+ type: string;
3098
+ path?: string | undefined;
3099
+ content?: string | undefined;
3100
+ }, {
3101
+ type: string;
3102
+ path?: string | undefined;
3103
+ content?: string | undefined;
3104
+ }>;
3105
+ export declare const AgentOutputSchema: z.ZodObject<{
3106
+ status: z.ZodEnum<["success", "failure", "blocked", "needs_clarification"]>;
3107
+ confidence: z.ZodNumber;
3108
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3109
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
3110
+ type: z.ZodString;
3111
+ path: z.ZodOptional<z.ZodString>;
3112
+ content: z.ZodOptional<z.ZodString>;
3113
+ }, "strip", z.ZodTypeAny, {
3114
+ type: string;
3115
+ path?: string | undefined;
3116
+ content?: string | undefined;
3117
+ }, {
3118
+ type: string;
3119
+ path?: string | undefined;
3120
+ content?: string | undefined;
3121
+ }>, "many">>;
3122
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3123
+ }, "strip", z.ZodTypeAny, {
3124
+ status: "blocked" | "success" | "needs_clarification" | "failure";
3125
+ confidence: number;
3126
+ warnings: string[];
3127
+ artifacts: {
3128
+ type: string;
3129
+ path?: string | undefined;
3130
+ content?: string | undefined;
3131
+ }[];
3132
+ next_actions: string[];
3133
+ }, {
3134
+ status: "blocked" | "success" | "needs_clarification" | "failure";
3135
+ confidence: number;
3136
+ warnings?: string[] | undefined;
3137
+ artifacts?: {
3138
+ type: string;
3139
+ path?: string | undefined;
3140
+ content?: string | undefined;
3141
+ }[] | undefined;
3142
+ next_actions?: string[] | undefined;
3143
+ }>;
3144
+ export declare const ImplementerTestsSchema: z.ZodObject<{
3145
+ runner: z.ZodString;
3146
+ result: z.ZodEnum<["passed", "failed"]>;
3147
+ failedTests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3148
+ }, "strip", z.ZodTypeAny, {
3149
+ runner: string;
3150
+ result: "passed" | "failed";
3151
+ failedTests?: string[] | undefined;
3152
+ }, {
3153
+ runner: string;
3154
+ result: "passed" | "failed";
3155
+ failedTests?: string[] | undefined;
3156
+ }>;
3157
+ export declare const ImplementerOutputSchema: z.ZodObject<{
3158
+ confidence: z.ZodNumber;
3159
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3160
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
3161
+ type: z.ZodString;
3162
+ path: z.ZodOptional<z.ZodString>;
3163
+ content: z.ZodOptional<z.ZodString>;
3164
+ }, "strip", z.ZodTypeAny, {
3165
+ type: string;
3166
+ path?: string | undefined;
3167
+ content?: string | undefined;
3168
+ }, {
3169
+ type: string;
3170
+ path?: string | undefined;
3171
+ content?: string | undefined;
3172
+ }>, "many">>;
3173
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3174
+ } & {
3175
+ status: z.ZodEnum<["success", "failure", "blocked"]>;
3176
+ filesChanged: z.ZodDefault<z.ZodArray<z.ZodObject<{
3177
+ path: z.ZodString;
3178
+ summary: z.ZodString;
3179
+ }, "strip", z.ZodTypeAny, {
3180
+ path: string;
3181
+ summary: string;
3182
+ }, {
3183
+ path: string;
3184
+ summary: string;
3185
+ }>, "many">>;
3186
+ tests: z.ZodOptional<z.ZodObject<{
3187
+ runner: z.ZodString;
3188
+ result: z.ZodEnum<["passed", "failed"]>;
3189
+ failedTests: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3190
+ }, "strip", z.ZodTypeAny, {
3191
+ runner: string;
3192
+ result: "passed" | "failed";
3193
+ failedTests?: string[] | undefined;
3194
+ }, {
3195
+ runner: string;
3196
+ result: "passed" | "failed";
3197
+ failedTests?: string[] | undefined;
3198
+ }>>;
3199
+ }, "strip", z.ZodTypeAny, {
3200
+ status: "blocked" | "success" | "failure";
3201
+ confidence: number;
3202
+ warnings: string[];
3203
+ artifacts: {
3204
+ type: string;
3205
+ path?: string | undefined;
3206
+ content?: string | undefined;
3207
+ }[];
3208
+ next_actions: string[];
3209
+ filesChanged: {
3210
+ path: string;
3211
+ summary: string;
3212
+ }[];
3213
+ tests?: {
3214
+ runner: string;
3215
+ result: "passed" | "failed";
3216
+ failedTests?: string[] | undefined;
3217
+ } | undefined;
3218
+ }, {
3219
+ status: "blocked" | "success" | "failure";
3220
+ confidence: number;
3221
+ warnings?: string[] | undefined;
3222
+ artifacts?: {
3223
+ type: string;
3224
+ path?: string | undefined;
3225
+ content?: string | undefined;
3226
+ }[] | undefined;
3227
+ next_actions?: string[] | undefined;
3228
+ filesChanged?: {
3229
+ path: string;
3230
+ summary: string;
3231
+ }[] | undefined;
3232
+ tests?: {
3233
+ runner: string;
3234
+ result: "passed" | "failed";
3235
+ failedTests?: string[] | undefined;
3236
+ } | undefined;
3237
+ }>;
3238
+ export declare const ReviewAxisSchema: z.ZodEnum<["complexity", "cost", "performance", "maintainability", "security", "scalability", "style"]>;
3239
+ export declare const ReviewFindingSchema: z.ZodObject<{
3240
+ severity: z.ZodEnum<["CRITICAL", "WARNING", "SUGGESTION"]>;
3241
+ message: z.ZodString;
3242
+ axis: z.ZodUnion<[z.ZodEnum<["complexity", "cost", "performance", "maintainability", "security", "scalability", "style"]>, z.ZodString]>;
3243
+ path: z.ZodOptional<z.ZodString>;
3244
+ line: z.ZodOptional<z.ZodNumber>;
3245
+ }, "strip", z.ZodTypeAny, {
3246
+ message: string;
3247
+ severity: "CRITICAL" | "WARNING" | "SUGGESTION";
3248
+ axis: string;
3249
+ path?: string | undefined;
3250
+ line?: number | undefined;
3251
+ }, {
3252
+ message: string;
3253
+ severity: "CRITICAL" | "WARNING" | "SUGGESTION";
3254
+ axis: string;
3255
+ path?: string | undefined;
3256
+ line?: number | undefined;
3257
+ }>;
3258
+ export declare const ReviewerOutputSchema: z.ZodObject<{
3259
+ status: z.ZodEnum<["pass", "fail"]>;
3260
+ confidence: z.ZodNumber;
3261
+ verdict: z.ZodEnum<["approved", "approved_with_warnings", "blocked"]>;
3262
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3263
+ findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
3264
+ severity: z.ZodEnum<["CRITICAL", "WARNING", "SUGGESTION"]>;
3265
+ message: z.ZodString;
3266
+ axis: z.ZodUnion<[z.ZodEnum<["complexity", "cost", "performance", "maintainability", "security", "scalability", "style"]>, z.ZodString]>;
3267
+ path: z.ZodOptional<z.ZodString>;
3268
+ line: z.ZodOptional<z.ZodNumber>;
3269
+ }, "strip", z.ZodTypeAny, {
3270
+ message: string;
3271
+ severity: "CRITICAL" | "WARNING" | "SUGGESTION";
3272
+ axis: string;
3273
+ path?: string | undefined;
3274
+ line?: number | undefined;
3275
+ }, {
3276
+ message: string;
3277
+ severity: "CRITICAL" | "WARNING" | "SUGGESTION";
3278
+ axis: string;
3279
+ path?: string | undefined;
3280
+ line?: number | undefined;
3281
+ }>, "many">>;
3282
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
3283
+ type: z.ZodString;
3284
+ path: z.ZodOptional<z.ZodString>;
3285
+ content: z.ZodOptional<z.ZodString>;
3286
+ }, "strip", z.ZodTypeAny, {
3287
+ type: string;
3288
+ path?: string | undefined;
3289
+ content?: string | undefined;
3290
+ }, {
3291
+ type: string;
3292
+ path?: string | undefined;
3293
+ content?: string | undefined;
3294
+ }>, "many">>;
3295
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3296
+ }, "strip", z.ZodTypeAny, {
3297
+ status: "pass" | "fail";
3298
+ confidence: number;
3299
+ findings: {
3300
+ message: string;
3301
+ severity: "CRITICAL" | "WARNING" | "SUGGESTION";
3302
+ axis: string;
3303
+ path?: string | undefined;
3304
+ line?: number | undefined;
3305
+ }[];
3306
+ verdict: "blocked" | "approved" | "approved_with_warnings";
3307
+ warnings: string[];
3308
+ artifacts: {
3309
+ type: string;
3310
+ path?: string | undefined;
3311
+ content?: string | undefined;
3312
+ }[];
3313
+ next_actions: string[];
3314
+ }, {
3315
+ status: "pass" | "fail";
3316
+ confidence: number;
3317
+ verdict: "blocked" | "approved" | "approved_with_warnings";
3318
+ findings?: {
3319
+ message: string;
3320
+ severity: "CRITICAL" | "WARNING" | "SUGGESTION";
3321
+ axis: string;
3322
+ path?: string | undefined;
3323
+ line?: number | undefined;
3324
+ }[] | undefined;
3325
+ warnings?: string[] | undefined;
3326
+ artifacts?: {
3327
+ type: string;
3328
+ path?: string | undefined;
3329
+ content?: string | undefined;
3330
+ }[] | undefined;
3331
+ next_actions?: string[] | undefined;
3332
+ }>;
3333
+ export declare const TechnicalPlanOutputSchema: z.ZodObject<{
3334
+ approach: z.ZodString;
3335
+ filesAffected: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3336
+ risks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3337
+ openQuestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3338
+ }, "strip", z.ZodTypeAny, {
3339
+ risks: string[];
3340
+ approach: string;
3341
+ filesAffected: string[];
3342
+ openQuestions?: string[] | undefined;
3343
+ }, {
3344
+ approach: string;
3345
+ risks?: string[] | undefined;
3346
+ filesAffected?: string[] | undefined;
3347
+ openQuestions?: string[] | undefined;
3348
+ }>;
3349
+ export declare const ScorecardVerdictSchema: z.ZodEnum<["PASS", "REVISE", "REJECT"]>;
3350
+ export declare const ScorecardCriterionIdSchema: z.ZodEnum<["acceptance", "minimal_diff", "tests", "regressions", "conventions", "documentation", "context_discipline", "cc_gain"]>;
3351
+ export declare const ScorecardCriterionSchema: z.ZodObject<{
3352
+ id: z.ZodEnum<["acceptance", "minimal_diff", "tests", "regressions", "conventions", "documentation", "context_discipline", "cc_gain"]>;
3353
+ label: z.ZodString;
3354
+ weight: z.ZodNumber;
3355
+ score: z.ZodNumber;
3356
+ notes: z.ZodOptional<z.ZodString>;
3357
+ autoSuggested: z.ZodOptional<z.ZodBoolean>;
3358
+ }, "strip", z.ZodTypeAny, {
3359
+ id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3360
+ label: string;
3361
+ weight: number;
3362
+ score: number;
3363
+ notes?: string | undefined;
3364
+ autoSuggested?: boolean | undefined;
3365
+ }, {
3366
+ id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3367
+ label: string;
3368
+ weight: number;
3369
+ score: number;
3370
+ notes?: string | undefined;
3371
+ autoSuggested?: boolean | undefined;
3372
+ }>;
3373
+ export declare const ScorecardRecordSchema: z.ZodObject<{
3374
+ id: z.ZodString;
3375
+ taskId: z.ZodString;
3376
+ agent: z.ZodString;
3377
+ model: z.ZodOptional<z.ZodString>;
3378
+ contractVersion: z.ZodString;
3379
+ evaluator: z.ZodOptional<z.ZodString>;
3380
+ criteria: z.ZodArray<z.ZodObject<{
3381
+ id: z.ZodEnum<["acceptance", "minimal_diff", "tests", "regressions", "conventions", "documentation", "context_discipline", "cc_gain"]>;
3382
+ label: z.ZodString;
3383
+ weight: z.ZodNumber;
3384
+ score: z.ZodNumber;
3385
+ notes: z.ZodOptional<z.ZodString>;
3386
+ autoSuggested: z.ZodOptional<z.ZodBoolean>;
3387
+ }, "strip", z.ZodTypeAny, {
3388
+ id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3389
+ label: string;
3390
+ weight: number;
3391
+ score: number;
3392
+ notes?: string | undefined;
3393
+ autoSuggested?: boolean | undefined;
3394
+ }, {
3395
+ id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3396
+ label: string;
3397
+ weight: number;
3398
+ score: number;
3399
+ notes?: string | undefined;
3400
+ autoSuggested?: boolean | undefined;
3401
+ }>, "many">;
3402
+ weightedScore: z.ZodNumber;
3403
+ verdict: z.ZodEnum<["PASS", "REVISE", "REJECT"]>;
3404
+ findings: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
3405
+ createdAt: z.ZodString;
3406
+ backlogId: z.ZodOptional<z.ZodString>;
3407
+ source: z.ZodOptional<z.ZodEnum<["openspec", "review", "manual", "pipeline"]>>;
3408
+ }, "strip", z.ZodTypeAny, {
3409
+ id: string;
3410
+ contractVersion: string;
3411
+ findings: string[];
3412
+ taskId: string;
3413
+ agent: string;
3414
+ verdict: "PASS" | "REVISE" | "REJECT";
3415
+ criteria: {
3416
+ id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3417
+ label: string;
3418
+ weight: number;
3419
+ score: number;
3420
+ notes?: string | undefined;
3421
+ autoSuggested?: boolean | undefined;
3422
+ }[];
3423
+ weightedScore: number;
3424
+ createdAt: string;
3425
+ source?: "review" | "openspec" | "manual" | "pipeline" | undefined;
3426
+ backlogId?: string | undefined;
3427
+ model?: string | undefined;
3428
+ evaluator?: string | undefined;
3429
+ }, {
3430
+ id: string;
3431
+ contractVersion: string;
3432
+ taskId: string;
3433
+ agent: string;
3434
+ verdict: "PASS" | "REVISE" | "REJECT";
3435
+ criteria: {
3436
+ id: "documentation" | "tests" | "acceptance" | "minimal_diff" | "regressions" | "conventions" | "context_discipline" | "cc_gain";
3437
+ label: string;
3438
+ weight: number;
3439
+ score: number;
3440
+ notes?: string | undefined;
3441
+ autoSuggested?: boolean | undefined;
3442
+ }[];
3443
+ weightedScore: number;
3444
+ createdAt: string;
3445
+ findings?: string[] | undefined;
3446
+ source?: "review" | "openspec" | "manual" | "pipeline" | undefined;
3447
+ backlogId?: string | undefined;
3448
+ model?: string | undefined;
3449
+ evaluator?: string | undefined;
3450
+ }>;
3451
+ export declare const TaskOutcomeSourceSchema: z.ZodEnum<["openspec", "review", "manual", "pipeline"]>;
3452
+ export declare const TaskOutcomeStatusSchema: z.ZodEnum<["phase_done", "phase_failed", "pass", "revise", "reject"]>;
3453
+ export declare const TaskOutcomeSchema: z.ZodObject<{
3454
+ id: z.ZodString;
3455
+ taskId: z.ZodString;
3456
+ source: z.ZodEnum<["openspec", "review", "manual", "pipeline"]>;
3457
+ agent: z.ZodString;
3458
+ model: z.ZodString;
3459
+ contractVersion: z.ZodString;
3460
+ timestamp: z.ZodString;
3461
+ status: z.ZodOptional<z.ZodEnum<["phase_done", "phase_failed", "pass", "revise", "reject"]>>;
3462
+ verdict: z.ZodOptional<z.ZodEnum<["PASS", "REVISE", "REJECT"]>>;
3463
+ weightedScore: z.ZodOptional<z.ZodNumber>;
3464
+ taskCardId: z.ZodOptional<z.ZodString>;
3465
+ backlogId: z.ZodOptional<z.ZodString>;
3466
+ phase: z.ZodOptional<z.ZodString>;
3467
+ scorecardId: z.ZodOptional<z.ZodString>;
3468
+ tokensIn: z.ZodOptional<z.ZodNumber>;
3469
+ tokensOut: z.ZodOptional<z.ZodNumber>;
3470
+ costUsd: z.ZodOptional<z.ZodNumber>;
3471
+ durationMs: z.ZodOptional<z.ZodNumber>;
3472
+ }, "strip", z.ZodTypeAny, {
3473
+ id: string;
3474
+ contractVersion: string;
3475
+ timestamp: string;
3476
+ source: "review" | "openspec" | "manual" | "pipeline";
3477
+ taskId: string;
3478
+ agent: string;
3479
+ model: string;
3480
+ status?: "reject" | "pass" | "phase_done" | "phase_failed" | "revise" | undefined;
3481
+ backlogId?: string | undefined;
3482
+ phase?: string | undefined;
3483
+ verdict?: "PASS" | "REVISE" | "REJECT" | undefined;
3484
+ weightedScore?: number | undefined;
3485
+ taskCardId?: string | undefined;
3486
+ scorecardId?: string | undefined;
3487
+ tokensIn?: number | undefined;
3488
+ tokensOut?: number | undefined;
3489
+ costUsd?: number | undefined;
3490
+ durationMs?: number | undefined;
3491
+ }, {
3492
+ id: string;
3493
+ contractVersion: string;
3494
+ timestamp: string;
3495
+ source: "review" | "openspec" | "manual" | "pipeline";
3496
+ taskId: string;
3497
+ agent: string;
3498
+ model: string;
3499
+ status?: "reject" | "pass" | "phase_done" | "phase_failed" | "revise" | undefined;
3500
+ backlogId?: string | undefined;
3501
+ phase?: string | undefined;
3502
+ verdict?: "PASS" | "REVISE" | "REJECT" | undefined;
3503
+ weightedScore?: number | undefined;
3504
+ taskCardId?: string | undefined;
3505
+ scorecardId?: string | undefined;
3506
+ tokensIn?: number | undefined;
3507
+ tokensOut?: number | undefined;
3508
+ costUsd?: number | undefined;
3509
+ durationMs?: number | undefined;
3510
+ }>;
3511
+ export declare const EvaluationIndexSchema: z.ZodObject<{
3512
+ version: z.ZodLiteral<1>;
3513
+ lastOutcomeId: z.ZodOptional<z.ZodString>;
3514
+ }, "strip", z.ZodTypeAny, {
3515
+ version: 1;
3516
+ lastOutcomeId?: string | undefined;
3517
+ }, {
3518
+ version: 1;
3519
+ lastOutcomeId?: string | undefined;
3520
+ }>;
3521
+ export declare const ExecutionProfileNameSchema: z.ZodEnum<["balanced", "quality", "economical"]>;
3522
+ export declare const ExecutionProfileSchema: z.ZodObject<{
3523
+ profile: z.ZodDefault<z.ZodEnum<["balanced", "quality", "economical"]>>;
3524
+ target: z.ZodOptional<z.ZodEnum<["opencode", "claude", "codex", "gemini", "cursor", "agy"]>>;
3525
+ overrides: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
3526
+ subagentPolicy: z.ZodOptional<z.ZodObject<{
3527
+ orchestrator: z.ZodOptional<z.ZodEnum<["primary", "delegate"]>>;
3528
+ testerReviewer: z.ZodOptional<z.ZodEnum<["primary", "delegate"]>>;
3529
+ }, "strip", z.ZodTypeAny, {
3530
+ orchestrator?: "primary" | "delegate" | undefined;
3531
+ testerReviewer?: "primary" | "delegate" | undefined;
3532
+ }, {
3533
+ orchestrator?: "primary" | "delegate" | undefined;
3534
+ testerReviewer?: "primary" | "delegate" | undefined;
3535
+ }>>;
3536
+ }, "strip", z.ZodTypeAny, {
3537
+ profile: "balanced" | "quality" | "economical";
3538
+ overrides: Record<string, string>;
3539
+ target?: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy" | undefined;
3540
+ subagentPolicy?: {
3541
+ orchestrator?: "primary" | "delegate" | undefined;
3542
+ testerReviewer?: "primary" | "delegate" | undefined;
3543
+ } | undefined;
3544
+ }, {
3545
+ profile?: "balanced" | "quality" | "economical" | undefined;
3546
+ target?: "opencode" | "claude" | "codex" | "gemini" | "cursor" | "agy" | undefined;
3547
+ overrides?: Record<string, string> | undefined;
3548
+ subagentPolicy?: {
3549
+ orchestrator?: "primary" | "delegate" | undefined;
3550
+ testerReviewer?: "primary" | "delegate" | undefined;
3551
+ } | undefined;
3552
+ }>;
3553
+ export type ContractTargetInput = z.infer<typeof ContractTargetSchema>;
3554
+ export type ContractFormatInput = z.infer<typeof ContractFormatSchema>;
3555
+ export type AgentContractInput = z.infer<typeof AgentContractSchema>;
3556
+ export type CouncilFindingInput = z.infer<typeof CouncilFindingSchema>;
3557
+ export type CouncilVerdictInputData = z.infer<typeof CouncilVerdictInputSchema>;
3558
+ export type ConsensusConfigInput = z.infer<typeof ConsensusConfigSchema>;
3559
+ export type CouncilVerdictOutput = z.infer<typeof CouncilVerdictSchema>;
3560
+ export type GoalTaskInput = z.infer<typeof GoalTaskSchema>;
3561
+ export type GoalGraphInput = z.infer<typeof GoalGraphSchema>;
3562
+ export type KnowledgeEntityInput = z.infer<typeof KnowledgeEntitySchema>;
3563
+ export type DecisionInput = z.infer<typeof DecisionSchema>;
3564
+ export type EvidenceInput = z.infer<typeof EvidenceSchema>;
3565
+ export type CanonicalTaskCardInput = z.infer<typeof CanonicalTaskCardSchema>;
3566
+ export type ProductGraphInput = z.infer<typeof ProductGraphSchema>;
3567
+ export type ProductGraphNodeInput = z.infer<typeof ProductGraphNodeSchema>;
3568
+ export type ProductGraphEdgeInput = z.infer<typeof ProductGraphEdgeSchema>;
3569
+ export type ProductMetaInput = z.infer<typeof ProductMetaSchema>;
3570
+ export type ProductEventInput = z.infer<typeof ProductEventSchema>;
3571
+ export type OperationalStateInput = z.infer<typeof OperationalStateSchema>;
3572
+ export type StrategicMemoryInput = z.infer<typeof StrategicMemorySchema>;
3573
+ export type ImpactReportInput = z.infer<typeof ImpactReportSchema>;
3574
+ export type BusinessReviewOutputInput = z.infer<typeof BusinessReviewOutputSchema>;
3575
+ export type VerificationReportInput = z.infer<typeof VerificationReportSchema>;
3576
+ export type MemoryPointerInput = z.infer<typeof MemoryPointerSchema>;
3577
+ export type MemoryIndexInput = z.infer<typeof MemoryIndexSchema>;
3578
+ export type BacklogStatusInput = z.infer<typeof BacklogStatusSchema>;
3579
+ export type BacklogTypeInput = z.infer<typeof BacklogTypeSchema>;
3580
+ export type BacklogPriorityInput = z.infer<typeof BacklogPrioritySchema>;
3581
+ export type BacklogGlobalInput = z.infer<typeof BacklogGlobalSchema>;
3582
+ export type BacklogItemInput = z.infer<typeof BacklogItemSchema>;
3583
+ export type BacklogDocumentInput = z.infer<typeof BacklogDocumentSchema>;
3584
+ export type OpenspecTaskCardPhaseInput = z.infer<typeof OpenspecTaskCardPhaseSchema>;
3585
+ export type OpenspecTaskCardStatusInput = z.infer<typeof OpenspecTaskCardStatusSchema>;
3586
+ export type OpenspecTaskCardInput = z.infer<typeof OpenspecTaskCardSchema>;
3587
+ export type OpenspecStateInput = z.infer<typeof OpenspecStateSchema>;
3588
+ export type ScorecardVerdictInput = z.infer<typeof ScorecardVerdictSchema>;
3589
+ export type ScorecardCriterionInput = z.infer<typeof ScorecardCriterionSchema>;
3590
+ export type ScorecardRecordInput = z.infer<typeof ScorecardRecordSchema>;
3591
+ export type TaskOutcomeInput = z.infer<typeof TaskOutcomeSchema>;
3592
+ export type EvaluationIndexInput = z.infer<typeof EvaluationIndexSchema>;
3593
+ export type ExecutionProfileInput = z.infer<typeof ExecutionProfileSchema>;
3594
+ export type WorkflowCommandInput = z.infer<typeof WorkflowCommandSchema>;
3595
+ export type CommandEnvelopeInput = z.infer<typeof CommandEnvelopeSchema>;
3596
+ export type WorkflowProfileInput = z.infer<typeof WorkflowProfileSchema>;
3597
+ export type ExecutionContextInput = z.infer<typeof ExecutionContextSchema>;
3598
+ export type PlannerOutputInput = z.infer<typeof PlannerOutputSchema>;
3599
+ export type AgentOutputInput = z.infer<typeof AgentOutputSchema>;
3600
+ export type ImplementerOutputInput = z.infer<typeof ImplementerOutputSchema>;
3601
+ export type ReviewerOutputInput = z.infer<typeof ReviewerOutputSchema>;
3602
+ /**
3603
+ * Validate agent contract input
3604
+ */
3605
+ export declare function validateAgentContract(data: unknown): AgentContractInput;
3606
+ /**
3607
+ * Validate council verdict input
3608
+ */
3609
+ export declare function validateCouncilVerdictInput(data: unknown): CouncilVerdictInputData;
3610
+ /**
3611
+ * Validate consensus config
3612
+ */
3613
+ export declare function validateConsensusConfig(data: unknown): ConsensusConfigInput;
3614
+ /**
3615
+ * Validate council verdict output
3616
+ */
3617
+ export declare function validateCouncilVerdict(data: unknown): CouncilVerdictOutput;
3618
+ /**
3619
+ * Validate a Claude agent file
3620
+ */
3621
+ export declare function validateClaudeAgentFile(data: unknown): z.infer<typeof ClaudeAgentFileSchema>;
3622
+ /**
3623
+ * Validate an OpenCode agent file
3624
+ */
3625
+ export declare function validateOpenCodeAgentFile(data: unknown): z.infer<typeof OpenCodeAgentFileSchema>;
3626
+ /**
3627
+ * Validate goal graph
3628
+ */
3629
+ export declare function validateGoalGraph(data: unknown): z.infer<typeof GoalGraphSchema>;
3630
+ /**
3631
+ * Validate memory pointer
3632
+ */
3633
+ export declare function validateMemoryPointer(data: unknown): z.infer<typeof MemoryPointerSchema>;
3634
+ /**
3635
+ * Validate memory index
3636
+ */
3637
+ export declare function validateMemoryIndex(data: unknown): z.infer<typeof MemoryIndexSchema>;
3638
+ /**
3639
+ * Validate backlog document
3640
+ */
3641
+ export declare function validateBacklogDocument(data: unknown): BacklogDocumentInput;
3642
+ /**
3643
+ * Validate openspec state
3644
+ */
3645
+ export declare function validateOpenspecState(data: unknown): OpenspecStateInput;
3646
+ export declare function validateScorecardRecord(data: unknown): ScorecardRecordInput;
3647
+ export declare function validateTaskOutcome(data: unknown): TaskOutcomeInput;
3648
+ export declare function validateCommandEnvelope(data: unknown): CommandEnvelopeInput;
3649
+ export declare function validateWorkflowProfile(data: unknown): WorkflowProfileInput;
3650
+ export declare function validateExecutionContext(data: unknown): ExecutionContextInput;
3651
+ export declare function validatePlannerOutput(data: unknown): PlannerOutputInput;
3652
+ export declare function validateAgentOutput(data: unknown): AgentOutputInput;
3653
+ export declare function validateImplementerOutput(data: unknown): ImplementerOutputInput;
3654
+ export declare function validateReviewerOutput(data: unknown): ReviewerOutputInput;
3655
+ export declare function validateProductGraph(data: unknown): ProductGraphInput;
3656
+ export declare function validateKnowledgeEntity(data: unknown): KnowledgeEntityInput;
3657
+ export declare function validateDecision(data: unknown): DecisionInput;
3658
+ export declare function validateEvidence(data: unknown): EvidenceInput;
3659
+ export declare function validateCanonicalTaskCard(data: unknown): CanonicalTaskCardInput;
3660
+ export declare function validateProductEvent(data: unknown): ProductEventInput;