@jterrats/open-orchestra 0.4.2-beta.2 → 0.5.0-beta.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 (148) hide show
  1. package/README.md +29 -5
  2. package/dist/advisory-artifacts.d.ts +6 -0
  3. package/dist/advisory-artifacts.js +37 -1
  4. package/dist/advisory-artifacts.js.map +1 -1
  5. package/dist/assets/web-console.js +297 -4
  6. package/dist/cli.js +13 -118
  7. package/dist/cli.js.map +1 -1
  8. package/dist/command-manifest.d.ts +3 -0
  9. package/dist/command-manifest.js +132 -42
  10. package/dist/command-manifest.js.map +1 -1
  11. package/dist/command-utils.d.ts +5 -0
  12. package/dist/command-utils.js +23 -0
  13. package/dist/command-utils.js.map +1 -1
  14. package/dist/commands.d.ts +6 -42
  15. package/dist/commands.js +204 -1372
  16. package/dist/commands.js.map +1 -1
  17. package/dist/constants.js +1 -0
  18. package/dist/constants.js.map +1 -1
  19. package/dist/delivery-commands.d.ts +10 -0
  20. package/dist/delivery-commands.js +152 -0
  21. package/dist/delivery-commands.js.map +1 -0
  22. package/dist/github.d.ts +50 -1
  23. package/dist/github.js +234 -0
  24. package/dist/github.js.map +1 -1
  25. package/dist/health-checks.d.ts +1 -0
  26. package/dist/health-checks.js +11 -1
  27. package/dist/health-checks.js.map +1 -1
  28. package/dist/health-commands.js +2 -0
  29. package/dist/health-commands.js.map +1 -1
  30. package/dist/memory.d.ts +2 -1
  31. package/dist/memory.js +71 -10
  32. package/dist/memory.js.map +1 -1
  33. package/dist/package-update-check.d.ts +5 -1
  34. package/dist/package-update-check.js +20 -8
  35. package/dist/package-update-check.js.map +1 -1
  36. package/dist/planning-commands.d.ts +14 -0
  37. package/dist/planning-commands.js +372 -0
  38. package/dist/planning-commands.js.map +1 -0
  39. package/dist/release-candidate.d.ts +2 -0
  40. package/dist/release-candidate.js +9 -14
  41. package/dist/release-candidate.js.map +1 -1
  42. package/dist/release-commands.d.ts +2 -0
  43. package/dist/release-commands.js +58 -6
  44. package/dist/release-commands.js.map +1 -1
  45. package/dist/release-readiness.d.ts +49 -0
  46. package/dist/release-readiness.js +172 -0
  47. package/dist/release-readiness.js.map +1 -0
  48. package/dist/runtime-commands.js +2 -5
  49. package/dist/runtime-commands.js.map +1 -1
  50. package/dist/setup-agents-import.js +1 -3
  51. package/dist/setup-agents-import.js.map +1 -1
  52. package/dist/skills-catalog-service.d.ts +2 -0
  53. package/dist/skills-catalog-service.js +8 -0
  54. package/dist/skills-catalog-service.js.map +1 -0
  55. package/dist/skills-catalog.d.ts +2 -0
  56. package/dist/skills-catalog.js +389 -0
  57. package/dist/skills-catalog.js.map +1 -0
  58. package/dist/skills-commands.js +1 -11
  59. package/dist/skills-commands.js.map +1 -1
  60. package/dist/skills-events.d.ts +9 -0
  61. package/dist/skills-events.js +50 -0
  62. package/dist/skills-events.js.map +1 -0
  63. package/dist/skills-memory.d.ts +18 -0
  64. package/dist/skills-memory.js +127 -0
  65. package/dist/skills-memory.js.map +1 -0
  66. package/dist/skills-planning.d.ts +2 -0
  67. package/dist/skills-planning.js +87 -0
  68. package/dist/skills-planning.js.map +1 -0
  69. package/dist/skills-render.d.ts +14 -0
  70. package/dist/skills-render.js +83 -0
  71. package/dist/skills-render.js.map +1 -0
  72. package/dist/skills-validation.d.ts +2 -0
  73. package/dist/skills-validation.js +49 -0
  74. package/dist/skills-validation.js.map +1 -0
  75. package/dist/skills.d.ts +6 -42
  76. package/dist/skills.js +6 -773
  77. package/dist/skills.js.map +1 -1
  78. package/dist/task-graph-commands.d.ts +14 -0
  79. package/dist/task-graph-commands.js +367 -0
  80. package/dist/task-graph-commands.js.map +1 -0
  81. package/dist/types/context.d.ts +12 -0
  82. package/dist/types/context.js +2 -0
  83. package/dist/types/context.js.map +1 -0
  84. package/dist/types/metrics.d.ts +114 -0
  85. package/dist/types/metrics.js +2 -0
  86. package/dist/types/metrics.js.map +1 -0
  87. package/dist/types/model-config.d.ts +212 -0
  88. package/dist/types/model-config.js +2 -0
  89. package/dist/types/model-config.js.map +1 -0
  90. package/dist/types/runtime.d.ts +93 -0
  91. package/dist/types/runtime.js +2 -0
  92. package/dist/types/runtime.js.map +1 -0
  93. package/dist/types/skills.d.ts +147 -0
  94. package/dist/types/skills.js +2 -0
  95. package/dist/types/skills.js.map +1 -0
  96. package/dist/types/tasks.d.ts +171 -0
  97. package/dist/types/tasks.js +2 -0
  98. package/dist/types/tasks.js.map +1 -0
  99. package/dist/types/workflow-run.d.ts +79 -0
  100. package/dist/types/workflow-run.js +2 -0
  101. package/dist/types/workflow-run.js.map +1 -0
  102. package/dist/types.d.ts +12 -833
  103. package/dist/types.js +1 -1
  104. package/dist/types.js.map +1 -1
  105. package/dist/upgrade-commands.d.ts +2 -0
  106. package/dist/upgrade-commands.js +65 -0
  107. package/dist/upgrade-commands.js.map +1 -0
  108. package/dist/web-api-read-routes.d.ts +5 -0
  109. package/dist/web-api-read-routes.js +37 -0
  110. package/dist/web-api-read-routes.js.map +1 -0
  111. package/dist/web-api.d.ts +1 -3
  112. package/dist/web-api.js +23 -45
  113. package/dist/web-api.js.map +1 -1
  114. package/dist/web-console-sections.d.ts +2 -0
  115. package/dist/web-console-sections.js +7 -0
  116. package/dist/web-console-sections.js.map +1 -0
  117. package/dist/web-console.js +23 -3
  118. package/dist/web-console.js.map +1 -1
  119. package/dist/workflow-approval-service.d.ts +9 -0
  120. package/dist/workflow-approval-service.js +126 -0
  121. package/dist/workflow-approval-service.js.map +1 -0
  122. package/dist/workflow-approval-utils.d.ts +10 -0
  123. package/dist/workflow-approval-utils.js +82 -0
  124. package/dist/workflow-approval-utils.js.map +1 -0
  125. package/dist/workflow-budget-utils.d.ts +7 -0
  126. package/dist/workflow-budget-utils.js +96 -0
  127. package/dist/workflow-budget-utils.js.map +1 -0
  128. package/dist/workflow-evidence-service.d.ts +7 -0
  129. package/dist/workflow-evidence-service.js +100 -0
  130. package/dist/workflow-evidence-service.js.map +1 -0
  131. package/dist/workflow-run-commands.d.ts +8 -0
  132. package/dist/workflow-run-commands.js +479 -0
  133. package/dist/workflow-run-commands.js.map +1 -0
  134. package/dist/workflow-services.d.ts +5 -17
  135. package/dist/workflow-services.js +26 -479
  136. package/dist/workflow-services.js.map +1 -1
  137. package/dist/workflow-summary-service.d.ts +4 -0
  138. package/dist/workflow-summary-service.js +82 -0
  139. package/dist/workflow-summary-service.js.map +1 -0
  140. package/dist/workspace.d.ts +18 -1
  141. package/dist/workspace.js +66 -4
  142. package/dist/workspace.js.map +1 -1
  143. package/docs/orchestra-mvp.md +158 -114
  144. package/docs/package-naming.md +20 -0
  145. package/docs/persona-workflows.md +209 -0
  146. package/docs/runtime-adapters.md +15 -14
  147. package/docs/runtime-llm-flow.md +29 -28
  148. package/package.json +3 -2
package/dist/types.d.ts CHANGED
@@ -1,100 +1,14 @@
1
- export type TaskStatus = "pending" | "ready" | "in_progress" | "blocked" | "review" | "approved" | "rejected" | "done" | "canceled" | "archived";
2
- export type ReviewResult = "approve" | "block" | "changes";
3
- export type Severity = "info" | "low" | "medium" | "high" | "critical";
4
- export type EvidenceType = "command" | "file" | "screenshot" | "trace" | "video" | "log" | "report";
5
- export type SkillLoadBudget = "small" | "normal" | "large";
6
- export type SkillRenderTarget = "generic" | "claude" | "cursor" | "codex" | "vscode" | "windsurf";
7
- export type RuntimeAdapterKind = "llm" | "ide" | "cli";
8
- export type RuntimeExecutionId = "claude-cli" | "codex-cli" | "cursor-cli" | "vscode-agent" | "windsurf-agent" | "generic-runtime";
9
- export type RuntimeDelegationMode = "runtime-native" | "brief-only";
10
- export interface RuntimeAdapter {
11
- target: SkillRenderTarget;
12
- label: string;
13
- kind: RuntimeAdapterKind;
14
- defaultInstructionFiles: string[];
15
- supportsStructuredPayload: boolean;
16
- supportsManagedBlocks: boolean;
17
- supportsImports: boolean;
18
- guidance: string;
19
- }
20
- export interface RuntimeExecutionCapabilities {
21
- nonInteractive: boolean;
22
- promptInjection: boolean;
23
- structuredOutput: boolean;
24
- fileEdits: boolean;
25
- testExecution: boolean;
26
- evidenceReturn: boolean;
27
- requiresTty: boolean;
28
- requiresUserApproval: boolean;
29
- resumeSession: boolean;
30
- }
31
- export interface RuntimeSubagentCapabilities {
32
- runtimeNative: boolean;
33
- parallel: boolean;
34
- namedRoles: boolean;
35
- forkedContext: boolean;
36
- structuredHandoff: boolean;
37
- fileOwnership: boolean;
38
- requiresParentApproval: boolean;
39
- }
40
- export interface RuntimeExecutionAdapter {
41
- id: RuntimeExecutionId;
42
- target: SkillRenderTarget;
43
- label: string;
44
- kind: RuntimeAdapterKind;
45
- summary: string;
46
- execution: RuntimeExecutionCapabilities;
47
- subagents: RuntimeSubagentCapabilities;
48
- briefOnlyFallback: boolean;
49
- directProviderApiAllowed: false;
50
- guidance: string;
51
- }
52
- export interface RuntimeExecutorConfig {
53
- executor?: RuntimeExecutionId;
54
- }
55
- export interface RuntimeDelegationPolicy {
56
- mode: RuntimeDelegationMode;
57
- allowDirectProviderApi: boolean;
58
- }
59
- export interface RuntimeExecutionPolicy {
60
- defaults?: RuntimeExecutorConfig;
61
- byRole: Record<string, RuntimeExecutorConfig>;
62
- byTask: Record<string, RuntimeExecutorConfig>;
63
- delegation: RuntimeDelegationPolicy;
64
- }
65
- export interface RuntimeSelection {
66
- taskId: string;
67
- role: string;
68
- runtime: RuntimeExecutionAdapter;
69
- source: "explicit" | "task" | "role" | "default" | "fallback";
70
- directProviderApiAllowed: false;
71
- }
72
- export interface RuntimeDelegationAssignment {
73
- role: string;
74
- paths: string[];
75
- allowedCommands: string[];
76
- expectedArtifacts: string[];
77
- }
78
- export interface RuntimeBrief {
79
- taskId: string;
80
- runtime: RuntimeExecutionId;
81
- artifact: string;
82
- content: string;
83
- mode: "brief-only";
84
- directProviderApiAllowed: false;
85
- contextBudget: ContextBudgetMetadata;
86
- }
87
- export interface RuntimeDelegationPacket {
88
- taskId: string;
89
- runtime: RuntimeExecutionId;
90
- artifact: string;
91
- content: string;
92
- mode: RuntimeDelegationMode;
93
- directProviderApiAllowed: false;
94
- assignments: RuntimeDelegationAssignment[];
95
- requiresApproval: boolean;
96
- contextBudget: ContextBudgetMetadata;
97
- }
1
+ import type { ContextBudgetMetadata } from "./types/context.js";
2
+ import type { ModelProvenanceRecord, TelemetryConsentState } from "./types/model-config.js";
3
+ import type { CollaborationFlowRecommendation, MemoryPacket, SkillPlan, SkillRenderTarget, WorkflowTemplateSelection } from "./types/skills.js";
4
+ import type { EventEntry, LockEntry, Task, TaskStatus } from "./types/tasks.js";
5
+ export type { ContextBudgetMetadata, ContextBudgetSection, } from "./types/context.js";
6
+ export type { BudgetLimit, BudgetPolicy, ConfiguredProviderSummary, GitHubConfig, GitHubNotificationConfig, ModelMessage, ModelProvider, ModelProviderCapabilities, ModelProviderError, ModelProvenanceInput, ModelProvenanceRecord, ModelRequest, ModelResponse, ModelStreamEvent, NotificationChannelResult, NotificationsConfig, PhaseExecutionMode, PhaseExecutorPhase, PhaseLlmResult, PhaseOutcome, PhaseStructuredOutput, ProviderFallbackResult, ProviderPolicyConfig, ProviderRouting, SlackNotificationConfig, TelemetryConsentState, TelemetryLevel, ToolConfig, WorkflowConfig, WorkflowProvidersConfig, } from "./types/model-config.js";
7
+ export type { RuntimeAdapter, RuntimeAdapterKind, RuntimeBrief, RuntimeDelegationAssignment, RuntimeDelegationMode, RuntimeDelegationPacket, RuntimeDelegationPolicy, RuntimeExecutionAdapter, RuntimeExecutionCapabilities, RuntimeExecutionId, RuntimeExecutionPolicy, RuntimeExecutorConfig, RuntimeSelection, RuntimeSubagentCapabilities, } from "./types/runtime.js";
8
+ export type { AgentLesson, AgentLessonInput, CollaborationFlow, CollaborationFlowRecommendation, CollaborationFlowStep, MemoryHookPoint, MemoryLessonSnippet, MemoryPacket, MemoryPromptSnippet, MemorySectionReport, Skill, SkillLoadBudget, SkillPlan, SkillPlanItem, SkillRenderTarget, SkillValidationReport, RenderedWorkflowTemplate, WorkflowTemplate, WorkflowTemplateSelection, } from "./types/skills.js";
9
+ export { SIZING_LABELS, type BenchmarkQualitySignals, type BenchmarkResult, type BenchmarkSummary, type BurndownPoint, type BurndownSeries, type CalibrationReport, type CalibrationRoleReport, type EstimateConfidence, type EstimateInput, type EstimateRecord, type SizingLabel, type SprintRecord, type SprintVelocity, type SprintVelocityReport, type TaskEstimateBreakdown, type VelocityReport, type VelocityWeek, } from "./types/metrics.js";
10
+ export type { AddTaskInput, ArchitectureApproval, ArtifactResult, ClaimLockInput, DecisionInput, DecisionRecord, EventEntry, EventInput, EvidenceInput, EvidenceType, ExternalTaskReferences, HandoffInput, LockEntry, MechanicalOverride, PlaywrightEvidenceInput, QaGateMetadata, ReviewInput, ReviewResult, RiskAcceptance, RiskGateMetadata, RiskImpactArea, SetupAgentsTaskReference, Severity, Task, TaskStatus, UpdateTaskInput, } from "./types/tasks.js";
11
+ export type { AutonomousGateMode, AutonomousPhase, AutonomousPhaseStatus, AutonomousRun, AutonomousRunResult, BenchmarkPhaseDuration, ClarificationAnswerInput, ClarificationInput, ClarificationRecord, ClarificationStatus, ClarificationTarget, WorkflowGateApprovalInput, WorkflowGateApprovalResult, } from "./types/workflow-run.js";
98
12
  export type WorkspaceClassificationKind = "project" | "advisory" | "unsafe" | "unknown";
99
13
  export type WorkspaceWritePolicy = "allow" | "confirm_required" | "blocked";
100
14
  export interface WorkspaceClassification {
@@ -108,141 +22,6 @@ export interface WorkspaceClassification {
108
22
  recommendedAction: string;
109
23
  supportedTargets: SkillRenderTarget[];
110
24
  }
111
- export interface Skill {
112
- id: string;
113
- name: string;
114
- summary: string;
115
- triggers: string[];
116
- roles: string[];
117
- capabilities: string[];
118
- riskAreas: string[];
119
- sourceGroups: string[];
120
- entry: string;
121
- assets: string[];
122
- evidence: EvidenceType[];
123
- loadBudget: SkillLoadBudget;
124
- instructions: string[];
125
- }
126
- export interface SkillPlanItem {
127
- skill: Skill;
128
- score: number;
129
- rationale: string[];
130
- }
131
- export interface SkillPlan {
132
- taskId: string;
133
- selected: SkillPlanItem[];
134
- skipped: SkillPlanItem[];
135
- sourceGroups: string[];
136
- }
137
- export interface SkillValidationReport {
138
- valid: boolean;
139
- errors: string[];
140
- warnings: string[];
141
- }
142
- export interface CollaborationFlowStep {
143
- from: string;
144
- to: string;
145
- purpose: string;
146
- requiredContext: string[];
147
- requiredArtifacts: string[];
148
- exitCriteria: string[];
149
- }
150
- export interface CollaborationFlow {
151
- id: string;
152
- name: string;
153
- summary: string;
154
- triggers: string[];
155
- roles: string[];
156
- riskAreas: string[];
157
- requiredContext: string[];
158
- requiredArtifacts: string[];
159
- exitCriteria: string[];
160
- optionalReviewers: string[];
161
- steps: CollaborationFlowStep[];
162
- }
163
- export interface CollaborationFlowRecommendation {
164
- flow: CollaborationFlow;
165
- score: number;
166
- rationale: string[];
167
- missingArtifacts: string[];
168
- requiredHandoffFields: string[];
169
- optionalReviewers: string[];
170
- }
171
- export interface WorkflowTemplate {
172
- id: string;
173
- name: string;
174
- summary: string;
175
- triggers: string[];
176
- roles: string[];
177
- riskAreas: string[];
178
- inputs: string[];
179
- outputs: string[];
180
- evidenceRequirements: EvidenceType[];
181
- gates: string[];
182
- compatibleSkills: string[];
183
- steps: string[];
184
- }
185
- export interface WorkflowTemplateSelection {
186
- template: WorkflowTemplate;
187
- score: number;
188
- rationale: string[];
189
- missingEvidence: EvidenceType[];
190
- }
191
- export interface RenderedWorkflowTemplate {
192
- target: SkillRenderTarget;
193
- taskId?: string;
194
- selected: WorkflowTemplateSelection[];
195
- content: string;
196
- contextBudget?: ContextBudgetMetadata;
197
- }
198
- export interface AgentLessonInput {
199
- taskId?: string;
200
- actor: string;
201
- operation: string;
202
- failedAction: string;
203
- errorSignature: string;
204
- rootCause: string;
205
- fix: string;
206
- prevention: string;
207
- appliesTo: string[];
208
- verifiedBy: string[];
209
- }
210
- export interface AgentLesson extends AgentLessonInput {
211
- id: string;
212
- timestamp: string;
213
- }
214
- export type MemoryHookPoint = "before_plan" | "before_implementation" | "before_handoff" | "before_final" | "after_failure";
215
- export interface MemoryLessonSnippet {
216
- type: "lesson";
217
- score: number;
218
- operation: string;
219
- errorSignature: string;
220
- fix: string;
221
- prevention: string;
222
- appliesTo: string[];
223
- taskId?: string;
224
- timestamp: string;
225
- }
226
- export interface MemoryPromptSnippet {
227
- type: "prompt";
228
- score: number;
229
- file: string;
230
- artifact: string;
231
- summary: string;
232
- }
233
- export interface MemoryPacket {
234
- taskId?: string;
235
- hook: MemoryHookPoint;
236
- queryTerms: string[];
237
- tokenBudget: number;
238
- estimatedTokens: number;
239
- lessons: MemoryLessonSnippet[];
240
- prompts: MemoryPromptSnippet[];
241
- redaction: {
242
- applied: boolean;
243
- patterns: string[];
244
- };
245
- }
246
25
  export interface Role {
247
26
  id: string;
248
27
  name: string;
@@ -254,307 +33,6 @@ export interface Role {
254
33
  expectedEvidence?: string[];
255
34
  gateParticipation?: string[];
256
35
  }
257
- export interface MechanicalOverride {
258
- rationale: string;
259
- }
260
- export interface ArchitectureApproval {
261
- proposal?: string;
262
- userApproved?: boolean;
263
- approvedBy?: string;
264
- approvedAt?: string;
265
- }
266
- export interface QaGateMetadata {
267
- plan?: string;
268
- executionStatus?: "not_run" | "passed" | "failed" | "deferred";
269
- deferredRationale?: string;
270
- deferredOwner?: string;
271
- }
272
- export type RiskImpactArea = "security" | "sre" | "dba" | "data" | "devops" | "compliance" | "accessibility" | "ux";
273
- export interface RiskAcceptance {
274
- acceptedBy?: string;
275
- rationale?: string;
276
- }
277
- export interface RiskGateMetadata {
278
- impactAreas?: RiskImpactArea[];
279
- acceptance?: RiskAcceptance;
280
- }
281
- export interface Task {
282
- id: string;
283
- title: string;
284
- ownerRole: string;
285
- status: TaskStatus;
286
- dependencies: string[];
287
- backlogItem?: string;
288
- goal?: string;
289
- scope?: string;
290
- acceptanceCriteria?: string[];
291
- definitionOfReady?: string[];
292
- definitionOfDone?: string[];
293
- assumptions?: string[];
294
- risks?: string[];
295
- paths?: string[];
296
- testStrategy?: string;
297
- blockedReason?: string;
298
- mechanicalOverride?: MechanicalOverride;
299
- architectureApproval?: ArchitectureApproval;
300
- qaGate?: QaGateMetadata;
301
- riskGate?: RiskGateMetadata;
302
- externalRefs?: ExternalTaskReferences;
303
- createdAt?: string;
304
- updatedAt?: string;
305
- }
306
- export interface ExternalTaskReferences {
307
- setupAgents?: SetupAgentsTaskReference;
308
- }
309
- export interface SetupAgentsTaskReference {
310
- sourceId: string;
311
- sourcePath?: string;
312
- profileId?: string;
313
- mode?: string;
314
- contractVersion?: string;
315
- acceptanceStatus?: string;
316
- acceptedBy?: string;
317
- evidenceIds?: string[];
318
- handoffIds?: string[];
319
- }
320
- export interface LockEntry {
321
- id: string;
322
- taskId: string;
323
- ownerRole: string;
324
- path: string;
325
- reason: string;
326
- createdAt: string;
327
- expiresAt?: string;
328
- }
329
- export interface EventEntry {
330
- id: string;
331
- type: string;
332
- timestamp: string;
333
- actor: string;
334
- summary: string;
335
- taskId: string | null;
336
- artifacts?: string[];
337
- metadata: Record<string, unknown>;
338
- }
339
- export interface EventInput {
340
- type: string;
341
- actor: string;
342
- summary: string;
343
- taskId?: string;
344
- artifacts?: string[];
345
- metadata?: Record<string, unknown>;
346
- }
347
- export interface ToolConfig {
348
- enabled?: boolean;
349
- command: string;
350
- args: string[];
351
- cwd: string;
352
- allowedRoles: string[];
353
- timeoutMs: number;
354
- evidence: string;
355
- risk: string;
356
- }
357
- export interface ModelProviderCapabilities {
358
- streaming: boolean;
359
- tools: boolean;
360
- vision: boolean;
361
- jsonMode: boolean;
362
- maxContextTokens: number;
363
- timeoutMs: number;
364
- }
365
- export interface ModelMessage {
366
- role: "system" | "user" | "assistant" | "tool";
367
- content: string;
368
- }
369
- export interface ModelRequest {
370
- messages: ModelMessage[];
371
- model: string;
372
- temperature?: number;
373
- maxTokens?: number;
374
- jsonMode?: boolean;
375
- tools?: unknown[];
376
- timeoutMs?: number;
377
- }
378
- export interface ModelResponse {
379
- id: string;
380
- provider: string;
381
- model: string;
382
- content: string;
383
- usage: {
384
- inputTokens: number;
385
- outputTokens: number;
386
- };
387
- finishReason: "stop" | "length" | "tool_call" | "error";
388
- }
389
- export interface ModelStreamEvent {
390
- type: "content" | "tool_call" | "done" | "error";
391
- content?: string;
392
- error?: string;
393
- }
394
- export interface ModelProviderError {
395
- provider: string;
396
- code: string;
397
- message: string;
398
- retryable: boolean;
399
- }
400
- export interface ProviderFallbackResult {
401
- provider: string;
402
- model: string;
403
- response: ModelResponse;
404
- fallbackUsed: boolean;
405
- failedProviders: {
406
- provider: string;
407
- reason: string;
408
- }[];
409
- }
410
- export interface ModelProvenanceInput {
411
- task: string;
412
- role: string;
413
- provider: string;
414
- model: string;
415
- promptId: string;
416
- responseId: string;
417
- inputTokens: number;
418
- outputTokens: number;
419
- estimatedCostUsd: number;
420
- finishReason: ModelResponse["finishReason"];
421
- }
422
- export interface ModelProvenanceRecord extends ModelProvenanceInput {
423
- timestamp: string;
424
- }
425
- export type PhaseOutcome = {
426
- kind: "done";
427
- notes: string;
428
- } | {
429
- kind: "gate_pause";
430
- reviewArtifact: string;
431
- } | {
432
- kind: "qa_fail";
433
- notes: string;
434
- };
435
- export type PhaseExecutionMode = "deterministic" | "llm";
436
- export interface PhaseExecutorPhase {
437
- phase: string;
438
- role: string;
439
- summary: string;
440
- }
441
- export interface PhaseStructuredOutput {
442
- summary: string;
443
- notes: string;
444
- verdict: "pass" | "fail";
445
- findings: string[];
446
- decisions: string[];
447
- evidence: string[];
448
- handoff: string;
449
- sizing?: string;
450
- }
451
- export interface PhaseLlmResult {
452
- mode: PhaseExecutionMode;
453
- outcome: PhaseOutcome;
454
- artifact?: string;
455
- output?: PhaseStructuredOutput;
456
- }
457
- export interface ModelProvider {
458
- id: string;
459
- capabilities: ModelProviderCapabilities;
460
- complete(request: ModelRequest): Promise<ModelResponse>;
461
- stream?(request: ModelRequest): AsyncIterable<ModelStreamEvent>;
462
- }
463
- export interface ConfiguredProviderSummary {
464
- scope: string;
465
- provider: string;
466
- model: string;
467
- fallbacks: string[];
468
- maxTokens: number;
469
- maxCostUsd: number;
470
- timeoutMs: number;
471
- retries: number;
472
- requiredCapabilities: string[];
473
- }
474
- export interface ProviderRouting {
475
- provider: string;
476
- model: string;
477
- fallbacks: string[];
478
- maxTokens: number;
479
- maxCostUsd: number;
480
- timeoutMs: number;
481
- retries: number;
482
- requiredCapabilities: string[];
483
- }
484
- export interface WorkflowProvidersConfig {
485
- defaults: ProviderRouting;
486
- byRole: Record<string, ProviderRouting>;
487
- }
488
- export interface ProviderPolicyConfig {
489
- allowedProviders?: string[];
490
- blockedProviders?: string[];
491
- allowVendorFallbackWithoutApproval?: boolean;
492
- }
493
- export interface BudgetLimit {
494
- maxRequests?: number;
495
- maxInputTokens?: number;
496
- maxOutputTokens?: number;
497
- maxTotalTokens?: number;
498
- maxEstimatedCostUsd?: number;
499
- }
500
- export interface BudgetPolicy {
501
- defaults?: BudgetLimit;
502
- byRole: Record<string, BudgetLimit>;
503
- byTask: Record<string, BudgetLimit>;
504
- }
505
- export type TelemetryLevel = "off" | "metadata" | "prompt-summary" | "prompt-sample" | "eval-dataset";
506
- export interface TelemetryConsentState {
507
- enabled: boolean;
508
- level: TelemetryLevel;
509
- policyVersion: string;
510
- actor: string;
511
- updatedAt?: string;
512
- }
513
- export interface GitHubConfig {
514
- autoCreatePr?: boolean;
515
- baseBranch?: string;
516
- }
517
- export interface NotificationChannelResult {
518
- channel: "slack" | "github";
519
- status: "sent" | "skipped" | "failed";
520
- detail: string;
521
- }
522
- export interface SlackNotificationConfig {
523
- webhookUrl?: string;
524
- webhookUrlEnv?: string;
525
- }
526
- export interface GitHubNotificationConfig {
527
- issueComment?: boolean;
528
- }
529
- export interface NotificationsConfig {
530
- slack?: SlackNotificationConfig;
531
- github?: GitHubNotificationConfig;
532
- }
533
- export interface WorkflowConfig {
534
- version: number;
535
- providers: WorkflowProvidersConfig;
536
- budgets?: BudgetPolicy;
537
- workflow?: {
538
- phaseSequence?: string[];
539
- phaseTimeoutMinutes?: number;
540
- };
541
- tools: Record<string, ToolConfig>;
542
- telemetry?: TelemetryConsentState;
543
- github?: GitHubConfig;
544
- notifications?: NotificationsConfig;
545
- providerPolicy?: ProviderPolicyConfig;
546
- runtimePolicy?: RuntimeExecutionPolicy;
547
- staticAnalysis: {
548
- preCommit: {
549
- required: boolean;
550
- checks: string[];
551
- disallowNoVerifyWithoutApproval: boolean;
552
- };
553
- ci: {
554
- checks: string[];
555
- };
556
- };
557
- }
558
36
  export interface Workspace {
559
37
  base: string;
560
38
  roles: Role[];
@@ -592,6 +70,7 @@ export interface WorkflowGate {
592
70
  evaluate(context: GateEvaluationContext): GateEvaluationResult;
593
71
  }
594
72
  export interface WorkflowStatus {
73
+ mode?: "project" | "advisory";
595
74
  tasks: {
596
75
  total: number;
597
76
  byStatus: Record<string, number>;
@@ -730,102 +209,6 @@ export interface PlaywrightTestPlan {
730
209
  fixtures: string[];
731
210
  notes: string[];
732
211
  }
733
- export interface AddTaskInput {
734
- id: string;
735
- title: string;
736
- ownerRole: string;
737
- dependencies: string[];
738
- backlogItem?: string;
739
- goal?: string;
740
- scope?: string;
741
- acceptanceCriteria?: string[];
742
- definitionOfReady?: string[];
743
- definitionOfDone?: string[];
744
- assumptions?: string[];
745
- risks?: string[];
746
- paths?: string[];
747
- testStrategy?: string;
748
- architectureApproval?: ArchitectureApproval;
749
- qaGate?: QaGateMetadata;
750
- riskGate?: RiskGateMetadata;
751
- externalRefs?: ExternalTaskReferences;
752
- }
753
- export interface UpdateTaskInput {
754
- id: string;
755
- title?: string;
756
- ownerRole?: string;
757
- goal?: string;
758
- scope?: string;
759
- paths?: string[];
760
- acceptanceCriteria?: string[];
761
- assumptions?: string[];
762
- risks?: string[];
763
- testStrategy?: string;
764
- status?: TaskStatus;
765
- blockedReason?: string;
766
- }
767
- export interface ClaimLockInput {
768
- id?: string;
769
- taskId: string;
770
- ownerRole: string;
771
- path: string;
772
- reason: string;
773
- expiresAt?: string;
774
- }
775
- export interface HandoffInput {
776
- task: string;
777
- from: string;
778
- to: string;
779
- changed: string;
780
- behavior: string;
781
- tests: string;
782
- commands: string;
783
- status?: string;
784
- gaps?: string;
785
- risks?: string;
786
- playwright?: string;
787
- updateOwner?: boolean;
788
- }
789
- export interface ReviewInput {
790
- task: string;
791
- role: string;
792
- result: string;
793
- severity: string;
794
- findings: string;
795
- recommendation: string;
796
- }
797
- export interface EvidenceInput {
798
- task: string;
799
- role: string;
800
- type: string;
801
- summary: string;
802
- path?: string | boolean | string[];
803
- command?: string | boolean | string[];
804
- exitCode?: string | boolean | string[];
805
- }
806
- export interface PlaywrightEvidenceInput {
807
- task: string;
808
- kind: "screenshot" | "trace" | "video" | "report";
809
- path: string;
810
- summary: string;
811
- runId?: string;
812
- }
813
- export interface ArtifactResult {
814
- artifact: string;
815
- content: string;
816
- }
817
- export interface DecisionInput {
818
- task: string;
819
- title: string;
820
- context: string;
821
- decision: string;
822
- consequences: string;
823
- status: "proposed" | "accepted" | "superseded";
824
- owner: string;
825
- }
826
- export interface DecisionRecord extends DecisionInput {
827
- artifact: string;
828
- }
829
212
  export type DelegationRecommendation = "local" | "single_delegate" | "parallel_delegate" | "review_delegate" | "no_delegation";
830
213
  export type DelegationMode = "execute" | "review";
831
214
  export interface DelegationAssignment {
@@ -866,18 +249,6 @@ export interface TaskContext {
866
249
  workflowTemplates: WorkflowTemplateSelection[];
867
250
  contextBudget: ContextBudgetMetadata;
868
251
  }
869
- export interface ContextBudgetSection {
870
- section: string;
871
- originalCount: number;
872
- keptCount: number;
873
- droppedCount: number;
874
- }
875
- export interface ContextBudgetMetadata {
876
- tokenBudget: number;
877
- estimatedTokens: number;
878
- trimmed: boolean;
879
- sections: ContextBudgetSection[];
880
- }
881
252
  export interface ExecutionPlanStep {
882
253
  id: string;
883
254
  role: string;
@@ -995,195 +366,3 @@ export interface ApprovalDecisionInput {
995
366
  approver: string;
996
367
  rationale: string;
997
368
  }
998
- export type SizingLabel = "xs" | "s" | "m" | "l" | "xl";
999
- export declare const SIZING_LABELS: SizingLabel[];
1000
- export type AutonomousGateMode = "none" | "phase" | "all";
1001
- export type AutonomousPhaseStatus = "pending" | "running" | "done" | "skipped" | "failed" | "gate_paused" | "qa_failed" | "blocked" | "awaiting_clarification" | "canceled";
1002
- export interface AutonomousPhase {
1003
- phase: string;
1004
- role: string;
1005
- status: AutonomousPhaseStatus;
1006
- taskId: string;
1007
- gateId?: string;
1008
- handoffArtifact?: string;
1009
- reviewArtifact?: string;
1010
- approvedBy?: string;
1011
- approvedAt?: string;
1012
- approvalRationale?: string;
1013
- startedAt: string;
1014
- completedAt?: string;
1015
- skippedAt?: string;
1016
- notes?: string;
1017
- }
1018
- export interface WorkflowGateApprovalInput {
1019
- runId: string;
1020
- gateId: string;
1021
- approver: string;
1022
- rationale: string;
1023
- }
1024
- export interface WorkflowGateApprovalResult {
1025
- run: AutonomousRun;
1026
- gateId: string;
1027
- approver: string;
1028
- approvedAt: string;
1029
- alreadyApproved: boolean;
1030
- }
1031
- export interface AutonomousRun {
1032
- id: string;
1033
- taskId: string;
1034
- gates: AutonomousGateMode;
1035
- maxIterations: number;
1036
- phaseSequence?: string[];
1037
- qaIterations: number;
1038
- phases: AutonomousPhase[];
1039
- status: "running" | "paused" | "done" | "failed" | "canceled";
1040
- createdAt: string;
1041
- updatedAt: string;
1042
- }
1043
- export interface AutonomousRunResult {
1044
- run: AutonomousRun;
1045
- file: string;
1046
- cwd: string;
1047
- }
1048
- export interface BenchmarkPhaseDuration {
1049
- phase: string;
1050
- startedAt: string;
1051
- completedAt?: string;
1052
- durationMs: number | null;
1053
- }
1054
- export type ClarificationStatus = "open" | "answered";
1055
- export type ClarificationTarget = string;
1056
- export interface ClarificationRecord {
1057
- id: string;
1058
- runId: string;
1059
- taskId: string;
1060
- fromRole: string;
1061
- toRole: string;
1062
- question: string;
1063
- answer?: string;
1064
- status: ClarificationStatus;
1065
- createdAt: string;
1066
- answeredAt?: string;
1067
- }
1068
- export interface ClarificationInput {
1069
- runId: string;
1070
- taskId: string;
1071
- fromRole: string;
1072
- to: ClarificationTarget;
1073
- question: string;
1074
- }
1075
- export interface ClarificationAnswerInput {
1076
- id: string;
1077
- answer: string;
1078
- }
1079
- export type EstimateConfidence = "low" | "medium" | "high";
1080
- export interface EstimateRecord {
1081
- id: string;
1082
- taskId: string;
1083
- sizingLabel: SizingLabel;
1084
- soloEstimateDays: number;
1085
- aiUnguidedEstimateDays: number;
1086
- confidence: EstimateConfidence;
1087
- declaredBy: string;
1088
- declaredAt: string;
1089
- }
1090
- export interface EstimateInput {
1091
- taskId: string;
1092
- sizingLabel: SizingLabel;
1093
- soloEstimateDays: number;
1094
- aiUnguidedEstimateDays: number;
1095
- confidence: EstimateConfidence;
1096
- declaredBy: string;
1097
- }
1098
- export interface BenchmarkQualitySignals {
1099
- reviewCount: number;
1100
- blockingReviews: number;
1101
- evidenceCount: number;
1102
- gateBlockCount: number;
1103
- lessonCount: number;
1104
- totalInputTokens: number;
1105
- totalOutputTokens: number;
1106
- estimatedCostUsd: number;
1107
- }
1108
- export interface BenchmarkResult {
1109
- taskId: string;
1110
- sizingLabel: SizingLabel;
1111
- soloEstimateDays: number;
1112
- aiUnguidedEstimateDays: number;
1113
- actualDays: number | null;
1114
- vsSoloPct: number | null;
1115
- vsAiUnguidedPct: number | null;
1116
- qaIterations: number;
1117
- phaseDurations: BenchmarkPhaseDuration[];
1118
- quality: BenchmarkQualitySignals;
1119
- status: "pending" | "complete";
1120
- }
1121
- export interface BenchmarkSummary {
1122
- stories: BenchmarkResult[];
1123
- totalWithActuals: number;
1124
- avgVsSoloPct: number | null;
1125
- avgVsAiUnguidedPct: number | null;
1126
- }
1127
- export interface VelocityWeek {
1128
- week: string;
1129
- storiesCompleted: number;
1130
- pointsCompleted: number;
1131
- }
1132
- export interface VelocityReport {
1133
- totalStoriesCompleted: number;
1134
- totalPointsCompleted: number;
1135
- avgActualDaysPerStory: number | null;
1136
- avgVsSoloPct: number | null;
1137
- avgVsAiUnguidedPct: number | null;
1138
- weeks: VelocityWeek[];
1139
- trend: "improving" | "stable" | "declining" | "insufficient_data";
1140
- }
1141
- export interface SprintRecord {
1142
- id: string;
1143
- taskIds: string[];
1144
- status: "active" | "closed";
1145
- startedAt: string;
1146
- closedAt: string | null;
1147
- }
1148
- export interface SprintVelocity {
1149
- sprintId: string;
1150
- taskIds: string[];
1151
- storiesCompleted: number;
1152
- pointsCompleted: number;
1153
- }
1154
- export interface SprintVelocityReport {
1155
- sprints: SprintVelocity[];
1156
- trend: "improving" | "stable" | "declining" | "insufficient_data";
1157
- }
1158
- export interface CalibrationRoleReport {
1159
- role: string;
1160
- stories: number;
1161
- avgDeclaredDays: number;
1162
- avgActualDays: number;
1163
- avgErrorPct: number;
1164
- bias: "over" | "under" | "balanced" | "insufficient_data";
1165
- lessonRecorded: boolean;
1166
- }
1167
- export interface CalibrationReport {
1168
- roles: CalibrationRoleReport[];
1169
- }
1170
- export interface BurndownPoint {
1171
- day: number;
1172
- remaining: number;
1173
- completedTaskIds?: string[];
1174
- }
1175
- export interface TaskEstimateBreakdown {
1176
- taskId: string;
1177
- architectPoints: number | null;
1178
- developerPoints: number | null;
1179
- resolvedPoints: number;
1180
- completedAt: string | null;
1181
- }
1182
- export interface BurndownSeries {
1183
- sprintTaskIds: string[];
1184
- totalPoints: number;
1185
- idealLine: BurndownPoint[];
1186
- actualLine: BurndownPoint[];
1187
- taskBreakdown: TaskEstimateBreakdown[];
1188
- warnings: string[];
1189
- }