sdd-agent-platform 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,28 @@ export declare const BACKGROUND_EXECUTOR_CONTRACT_VERSION = "phase-3.11-backgrou
20
20
  export declare const WAVE_EXECUTOR_CONTRACT_VERSION = "phase-3.12-wave-executor-v1";
21
21
  export declare const LOCAL_RUN_INDEX_CONTRACT_VERSION = "phase-3.13-local-run-index-v1";
22
22
  export declare const GOVERNANCE_POLICY_CONTRACT_VERSION = "phase-3.14-governance-policy-v1";
23
+ export declare const CONTEXT_RESOLVER_CONTRACT_VERSION = "phase-5.1-context-resolver-v1";
24
+ export declare const LIFECYCLE_RISK_GATE_CONTRACT_VERSION = "phase-5.1-lifecycle-risk-gate-v1";
25
+ export declare const OUTPUT_QUALITY_CONTRACT_VERSION = "phase-5.1-output-quality-v1";
26
+ export declare const WORKFLOW_GATE_CONTRACT_VERSION = "phase-5.2-workflow-gate-v1";
27
+ export declare const AGENT_REGISTRY_CONTRACT_VERSION = "phase-5.2-agent-registry-v1";
28
+ export declare const TASK_GRAPH_CONTRACT_VERSION = "phase-5.3-task-graph-v1";
29
+ export declare const TASK_RUN_EVIDENCE_CONTRACT_VERSION = "phase-5.3-task-run-evidence-v1";
30
+ export declare const QUERY_STATUS_CONTRACT_VERSION = "phase-5.4-query-status-v1";
31
+ export declare const SKILL_AGENT_EVAL_CONTRACT_VERSION = "phase-5.5-skill-agent-eval-v1";
32
+ export declare const HARNESS_LEARNING_CONTRACT_VERSION = "phase-5.5-harness-learning-v1";
33
+ export declare const PROJECT_CONTEXT_PACK_CONTRACT_VERSION = "phase-5.5-project-context-pack-v1";
34
+ export declare const AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION = "phase-6.0-agent-skill-team-runtime-v1";
35
+ export declare const CAPABILITY_SOURCE_CATALOG_VERSION = "phase-6.0-capability-source-catalog-v1";
36
+ export declare const EXTERNAL_AGENT_PACK_IMPORT_POLICY_VERSION = "phase-6.0-external-agent-pack-import-policy-v1";
37
+ export declare const TOOL_PERMISSION_SPEC_VERSION = "phase-6.0-tool-permission-spec-v1";
38
+ export declare const HOST_ADAPTER_CONTRACT_VERSION = "phase-6.0-host-adapter-contract-v1";
39
+ export declare const AGENT_ROUTER_CONTRACT_VERSION = "phase-6.0-agent-router-v1";
40
+ export declare const TEAM_MODE_POLICY_VERSION = "phase-6.0-team-mode-policy-v1";
41
+ export declare const EVIDENCE_INGESTION_CONTRACT_VERSION = "phase-6.0-evidence-ingestion-v1";
42
+ export declare const AGENT_EXECUTION_RECORD_CONTRACT_VERSION = "phase-6.0-agent-execution-record-v1";
43
+ export declare const TEAM_SESSION_RECORD_CONTRACT_VERSION = "phase-6.0-team-session-record-v1";
44
+ export declare const RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION = "phase-6.1-resident-worker-runtime-v1";
23
45
  export type DoctorLevel = 'PASS' | 'WARN' | 'FAIL';
24
46
  export type RunStatus = 'created' | 'running' | 'completed' | 'blocked' | 'failed' | 'archived';
25
47
  export type LifecycleProfile = 'direct' | 'compact' | 'full' | 'research';
@@ -28,6 +50,7 @@ export type SddResultStatus = 'PASS' | 'PASS_WITH_GAPS' | 'FAIL' | 'BLOCKED' | '
28
50
  export type DelegationRunMode = 'foreground' | 'background';
29
51
  export type DelegationStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'RECOVERABLE' | 'STALE';
30
52
  export type GoalVerifyStatus = 'PASS' | 'PASS_WITH_GAPS' | 'FAIL' | 'BLOCKED';
53
+ export type HarnessVerifyStatus = 'PASS' | 'GAPS' | 'BLOCKED' | 'HUMAN_NEEDED';
31
54
  export type ArtifactResultIngestionStatus = 'accepted' | 'rejected';
32
55
  export type DetectionConfidence = 'high' | 'medium' | 'low';
33
56
  export interface DetectionEvidence {
@@ -68,6 +91,7 @@ export interface ProjectConfig {
68
91
  };
69
92
  sdd: {
70
93
  spec_dir: string;
94
+ default_branch?: string;
71
95
  docs_language: string;
72
96
  compatible_with: string;
73
97
  };
@@ -87,6 +111,7 @@ export interface ProjectConfig {
87
111
  decision_required: boolean;
88
112
  profiles: LifecycleProfile[];
89
113
  };
114
+ agentRuntime?: ProjectAgentRuntimeConfig;
90
115
  }
91
116
  export type ToolCapabilityCategory = 'runtime' | 'editing' | 'git' | 'validation' | 'browser' | 'artifact' | 'governance';
92
117
  export type ToolCapabilitySideEffect = 'read_only' | 'local_write' | 'command_execution' | 'external_interaction';
@@ -303,6 +328,38 @@ export type ImpactConfidence = 'high' | 'medium' | 'low';
303
328
  export type ValidationClarity = 'clear' | 'partial' | 'unclear';
304
329
  export type OrchestrationUncertainty = 'low' | 'medium' | 'high';
305
330
  export type Reversibility = 'reversible' | 'irreversible' | 'unknown';
331
+ export type ContextBranchSource = 'explicit_option' | 'cli_option' | 'project_config' | 'git_branch';
332
+ export interface ContextResolverContract {
333
+ contract: typeof CONTEXT_RESOLVER_CONTRACT_VERSION;
334
+ branch: string;
335
+ partition: string;
336
+ rawBranch: string;
337
+ branchSource: ContextBranchSource;
338
+ currentGitBranch: string | null;
339
+ workingTreeMatched: boolean | null;
340
+ specDir: string;
341
+ }
342
+ export type LifecycleRiskCategory = 'state_machine' | 'concurrency' | 'database_data_loss' | 'security' | 'sql' | 'api_schema' | 'ci_build' | 'external_unknown';
343
+ export type LifecycleRiskExtractionSource = 'from_text' | 'from_file' | 'none';
344
+ export interface LifecycleRiskExtractionEvidence {
345
+ category: LifecycleRiskCategory;
346
+ matched: string;
347
+ riskTag: string;
348
+ }
349
+ export interface LifecycleRiskGateExtraction {
350
+ contract: typeof LIFECYCLE_RISK_GATE_CONTRACT_VERSION;
351
+ source: LifecycleRiskExtractionSource;
352
+ riskTags: string[];
353
+ affectedContracts: string[];
354
+ externalUnknown: boolean;
355
+ architectureDecisionRequired: boolean;
356
+ reversibility?: Reversibility;
357
+ validationClarity?: ValidationClarity;
358
+ impactConfidence?: ImpactConfidence;
359
+ evidence: LifecycleRiskExtractionEvidence[];
360
+ signals: Partial<LifecycleDecisionSignals>;
361
+ }
362
+ export type LifecycleAutonomyCeiling = 'direct_execution_allowed' | 'compact_boundary_only' | 'full_sdd_with_checkpoint' | 'research_before_implementation';
306
363
  export interface LifecycleDecisionSignals {
307
364
  intent_clarity: SignalClarity;
308
365
  acceptance_clarity: SignalClarity;
@@ -336,6 +393,7 @@ export interface LifecycleDecisionGateResult {
336
393
  record: LifecycleDecisionRecord;
337
394
  checkpointRequired: boolean;
338
395
  boundaries: string[];
396
+ autonomyCeiling: LifecycleAutonomyCeiling;
339
397
  }
340
398
  export interface ArtifactIndexEntry {
341
399
  path: string;
@@ -344,6 +402,13 @@ export interface ArtifactIndexEntry {
344
402
  agent: string | null;
345
403
  createdAt: string;
346
404
  }
405
+ export interface RunDocumentSnapshot {
406
+ specHash: string | null;
407
+ planHash: string | null;
408
+ tasksHash: string | null;
409
+ planBasedOnSpecHash: string | null;
410
+ tasksBasedOnPlanHash: string | null;
411
+ }
347
412
  export interface RunState {
348
413
  contract: typeof RUN_STATE_CONTRACT;
349
414
  runtimeVersion: typeof RUNTIME_VERSION;
@@ -351,6 +416,11 @@ export interface RunState {
351
416
  status: RunStatus;
352
417
  phase: string | null;
353
418
  currentTask: string | null;
419
+ partition: string | null;
420
+ gitBranch: string | null;
421
+ taskId: string | null;
422
+ affectedFiles: string[];
423
+ documentSnapshot: RunDocumentSnapshot;
354
424
  createdAt: string;
355
425
  updatedAt: string;
356
426
  projectRoot: string;
@@ -411,6 +481,15 @@ export interface SddTask {
411
481
  affectedFiles: string[];
412
482
  validation: string[];
413
483
  risk: string[];
484
+ acceptanceRefs: string[];
485
+ planRefs: string[];
486
+ fileOwnership: string[];
487
+ agentFit: string[];
488
+ verificationAvailability: string[];
489
+ autonomy: string | null;
490
+ allowedAgents: string[];
491
+ requiredArtifacts: string[];
492
+ gapState: string | null;
414
493
  boundary: string | null;
415
494
  acceptance: string[];
416
495
  implementationNotes: string | null;
@@ -434,6 +513,13 @@ export interface SddTaskModel {
434
513
  specExists: boolean;
435
514
  planExists: boolean;
436
515
  tasksExists: boolean;
516
+ specHash?: string | null;
517
+ planHash?: string | null;
518
+ tasksHash?: string | null;
519
+ planBasedOnSpecHash?: string | null;
520
+ tasksBasedOnPlanHash?: string | null;
521
+ planStale?: boolean;
522
+ tasksStale?: boolean;
437
523
  };
438
524
  tasks: SddTask[];
439
525
  gaps: SddTaskGap[];
@@ -448,6 +534,15 @@ export interface TaskGraphNode {
448
534
  affectedFiles: string[];
449
535
  risk: string[];
450
536
  validation: string[];
537
+ acceptanceRefs: string[];
538
+ planRefs: string[];
539
+ fileOwnership: string[];
540
+ agentFit: string[];
541
+ verificationAvailability: string[];
542
+ autonomy: string | null;
543
+ allowedAgents: string[];
544
+ requiredArtifacts: string[];
545
+ gapState: string | null;
451
546
  source: SddTaskSourceLocation;
452
547
  }
453
548
  export interface TaskGraphEdge {
@@ -464,6 +559,7 @@ export interface TaskGraphDiagnostic {
464
559
  recommendation: string;
465
560
  }
466
561
  export interface TaskGraphPlan {
562
+ contract: typeof TASK_GRAPH_CONTRACT_VERSION;
467
563
  version: typeof TASK_GRAPH_PLANNER_CONTRACT_VERSION;
468
564
  branch: string;
469
565
  valid: boolean;
@@ -543,6 +639,90 @@ export interface BackgroundExecutorInspection {
543
639
  valid: boolean;
544
640
  issues: ContractValidationIssue[];
545
641
  }
642
+ export type ResidentWorkerRuntimeStatus = 'claimed' | 'active' | 'stale' | 'terminal' | 'blocked';
643
+ export interface ResidentWorkerRuntimeRecord {
644
+ version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
645
+ runtimeId: string;
646
+ runId: string;
647
+ taskId: string;
648
+ agent: string;
649
+ workerAdapterId: string;
650
+ delegationId: string;
651
+ queueItemId: string;
652
+ expectedArtifact: string;
653
+ status: ResidentWorkerRuntimeStatus;
654
+ claimedAt: string;
655
+ lastHeartbeatAt: string | null;
656
+ leaseSeconds: number;
657
+ leaseExpiresAt: string;
658
+ updatedAt: string;
659
+ evidenceSummary: string;
660
+ }
661
+ export interface ResidentWorkerRuntimeClaimOptions {
662
+ branch?: string;
663
+ runId?: string;
664
+ taskId: string;
665
+ runtimeId?: string;
666
+ agent?: string;
667
+ workerAdapterId?: string;
668
+ delegationId?: string;
669
+ leaseSeconds?: number;
670
+ }
671
+ export interface ResidentWorkerRuntimeClaimResult {
672
+ version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
673
+ runId: string;
674
+ runtimeId: string | null;
675
+ taskId: string;
676
+ agent: string;
677
+ workerAdapterId: string;
678
+ delegationId: string | null;
679
+ queueItemId: string | null;
680
+ expectedArtifact: string | null;
681
+ status: ResidentWorkerRuntimeStatus;
682
+ leaseExpiresAt: string | null;
683
+ runtime: ResidentWorkerRuntimeRecord | null;
684
+ issues: ContractValidationIssue[];
685
+ message: string;
686
+ }
687
+ export interface ResidentWorkerRuntimeHeartbeatOptions {
688
+ runId: string;
689
+ runtimeId: string;
690
+ leaseSeconds?: number;
691
+ }
692
+ export interface ResidentWorkerRuntimeHeartbeatResult {
693
+ version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
694
+ runId: string;
695
+ runtimeId: string;
696
+ status: ResidentWorkerRuntimeStatus;
697
+ leaseExpiresAt: string | null;
698
+ runtime: ResidentWorkerRuntimeRecord | null;
699
+ issues: ContractValidationIssue[];
700
+ message: string;
701
+ }
702
+ export interface ResidentWorkerRuntimeInspection {
703
+ version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
704
+ runId: string;
705
+ runtimeId: string;
706
+ runtime: ResidentWorkerRuntimeRecord | null;
707
+ queueItem: DelegationQueueItem | null;
708
+ workerAdapter: WorkerAdapterContract | null;
709
+ status: ResidentWorkerRuntimeStatus;
710
+ leaseExpired: boolean;
711
+ valid: boolean;
712
+ issues: ContractValidationIssue[];
713
+ recommendedNextCommand: string;
714
+ }
715
+ export interface ResidentWorkerRuntimeList {
716
+ version: typeof RESIDENT_WORKER_RUNTIME_CONTRACT_VERSION;
717
+ runId: string;
718
+ runtimes: ResidentWorkerRuntimeRecord[];
719
+ activeRuntimes: number;
720
+ staleRuntimes: number;
721
+ terminalRuntimes: number;
722
+ blockedRuntimes: number;
723
+ valid: boolean;
724
+ issues: ContractValidationIssue[];
725
+ }
546
726
  export type WaveExecutorStrategy = 'fast-stop' | 'safe-continue';
547
727
  export type WaveExecutorStatus = 'claimed' | 'completed' | 'failed' | 'blocked';
548
728
  export interface WaveExecutorRunOptions {
@@ -626,6 +806,399 @@ export interface GovernancePolicyDecision {
626
806
  issues: ContractValidationIssue[];
627
807
  policy: GovernancePolicy;
628
808
  }
809
+ export type WorkflowGateId = 'spec' | 'plan' | 'tasks' | 'do' | 'verify' | 'doctor';
810
+ export interface WorkflowGateContract {
811
+ version: typeof WORKFLOW_GATE_CONTRACT_VERSION;
812
+ id: WorkflowGateId;
813
+ command: string;
814
+ requiredInputs: string[];
815
+ allowedAgents: string[];
816
+ requiredArtifacts: string[];
817
+ gateConditions: string[];
818
+ gapClosureBehavior: string;
819
+ nextAction: string;
820
+ }
821
+ export interface WorkflowGateRegistry {
822
+ version: typeof WORKFLOW_GATE_CONTRACT_VERSION;
823
+ workflows: WorkflowGateContract[];
824
+ }
825
+ export interface WorkflowGateValidation {
826
+ version: typeof WORKFLOW_GATE_CONTRACT_VERSION;
827
+ valid: boolean;
828
+ workflows: WorkflowGateContract[];
829
+ issues: ContractValidationIssue[];
830
+ }
831
+ export type AgentAutonomyCeiling = 'read_only' | 'foreground_write' | 'validation_only' | 'review_only';
832
+ export interface AgentRegistryEntry {
833
+ version: typeof AGENT_REGISTRY_CONTRACT_VERSION;
834
+ id: string;
835
+ role: string;
836
+ allowedStages: string[];
837
+ capabilities: string[];
838
+ readBoundary: string[];
839
+ writeBoundary: string[];
840
+ toolAllowlist: string[];
841
+ requiredArtifact: string;
842
+ verificationExpectation: string;
843
+ autonomyCeiling: AgentAutonomyCeiling;
844
+ stopCondition: string;
845
+ }
846
+ export interface AgentRegistry {
847
+ version: typeof AGENT_REGISTRY_CONTRACT_VERSION;
848
+ agents: AgentRegistryEntry[];
849
+ }
850
+ export interface AgentRegistryValidation {
851
+ version: typeof AGENT_REGISTRY_CONTRACT_VERSION;
852
+ valid: boolean;
853
+ agents: AgentRegistryEntry[];
854
+ issues: ContractValidationIssue[];
855
+ }
856
+ export type BuiltInAgentProfileId = 'planner' | 'architect' | 'implementer' | 'reviewer' | 'validator' | 'researcher' | 'orchestrator' | 'security' | 'domain_expert';
857
+ export type AgentProfileId = BuiltInAgentProfileId | string;
858
+ export type CapabilityReuseDecision = 'reuse_direct' | 'adapt_via_host_adapter' | 'borrow_mechanism' | 'avoid';
859
+ export type SkillCapabilityKind = 'skill' | 'mcp' | 'cli_tool' | 'host_tool' | 'project_agent' | 'external_pattern';
860
+ export type SkillCapabilitySource = 'project' | 'user_global' | 'claude_code' | 'mcp' | 'open_source' | 'host';
861
+ export type SkillCapabilityEvidenceType = 'none' | 'command_output' | 'test_result' | 'browser_snapshot' | 'artifact' | 'external_source' | 'execution_record';
862
+ export type CapabilitySourceKind = 'native_host' | 'mcp_tool' | 'open_source_material' | 'mechanism_reference' | 'future_adapter' | 'project_material';
863
+ export type ExternalPackImportStatus = 'approved' | 'quarantined' | 'denied';
864
+ export type ExternalPackCheckStatus = 'pass' | 'warn' | 'fail' | 'not_run';
865
+ export type ToolPermissionPolicy = 'allow' | 'ask' | 'deny';
866
+ export type AgentRouterCategory = 'planning' | 'implementation' | 'implementation_review' | 'validation' | 'security_research' | 'external_research' | 'blocked';
867
+ export type TeamModeDecisionStatus = 'disabled' | 'enabled' | 'blocked';
868
+ export type TeamModeActivation = 'auto' | 'force' | 'off';
869
+ export type TeamModeSelection = 'off' | 'inspect' | 'review-lite' | 'hyperplan' | 'security-research';
870
+ export type TeamModeCostClass = 'none' | 'low' | 'medium' | 'high';
871
+ export type AgentExecutionRecordStatus = 'claimed' | 'completed' | 'failed' | 'blocked' | 'skipped';
872
+ export type TeamSessionRecordStatus = 'created' | 'completed' | 'blocked' | 'disabled';
873
+ export interface AgentProfileContract {
874
+ version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
875
+ id: AgentProfileId;
876
+ stageScope: string[];
877
+ riskCeiling: LifecycleAutonomyCeiling;
878
+ defaultAutonomy: LifecycleAutonomyCeiling;
879
+ requiredArtifacts: string[];
880
+ toolScope: string[];
881
+ modelPolicyId: string;
882
+ hostCapabilityRequirements: string[];
883
+ boundaries: string[];
884
+ }
885
+ export interface SkillCapabilityContract {
886
+ version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
887
+ id: string;
888
+ name: string;
889
+ kind: SkillCapabilityKind;
890
+ source: SkillCapabilitySource;
891
+ sourceRef: string;
892
+ capabilityDomain: string[];
893
+ allowedStages: string[];
894
+ requiredRiskCeiling: LifecycleAutonomyCeiling;
895
+ evidenceType: SkillCapabilityEvidenceType;
896
+ reuseDecision: CapabilityReuseDecision;
897
+ buildExceptionReason: string | null;
898
+ }
899
+ export interface CapabilitySourceCatalogEntry {
900
+ version: typeof CAPABILITY_SOURCE_CATALOG_VERSION;
901
+ id: string;
902
+ name: string;
903
+ kind: CapabilitySourceKind;
904
+ sourceRef: string;
905
+ reuseDecision: CapabilityReuseDecision;
906
+ quarantineRequired: boolean;
907
+ allowedUse: string;
908
+ attribution: string;
909
+ rationale: string;
910
+ }
911
+ export type RuntimeRegistryOrigin = 'built_in' | 'project_config' | 'external_manifest';
912
+ export interface RuntimeRegistryEntrySource {
913
+ id: string;
914
+ kind: 'profile' | 'skill_capability' | 'capability_source';
915
+ origin: RuntimeRegistryOrigin;
916
+ sourceId: string | null;
917
+ quarantineRequired: boolean;
918
+ }
919
+ export interface AgentRuntimeRoutingRuleWhen {
920
+ keywords: string[];
921
+ affectedFileGlobs: string[];
922
+ }
923
+ export interface AgentRuntimeRoutingRule {
924
+ id: string;
925
+ when: AgentRuntimeRoutingRuleWhen;
926
+ preferProfile: AgentProfileId;
927
+ requireCapabilities: string[];
928
+ category: AgentRouterCategory | null;
929
+ }
930
+ export interface AgentRuntimeAdapterMapping {
931
+ profile: AgentProfileId;
932
+ hostAdapter: string;
933
+ projection: string;
934
+ permissionPolicy: string;
935
+ }
936
+ export interface AgentRuntimeAliasResolution {
937
+ input: string;
938
+ resolved: AgentProfileId;
939
+ source: 'built_in' | 'project_config';
940
+ }
941
+ export interface ProjectAgentRuntimeConfig {
942
+ profiles: AgentProfileContract[];
943
+ skillCapabilities: SkillCapabilityContract[];
944
+ capabilitySources: CapabilitySourceCatalogEntry[];
945
+ aliases: Record<string, string>;
946
+ routingRules: AgentRuntimeRoutingRule[];
947
+ adapterMappings: AgentRuntimeAdapterMapping[];
948
+ }
949
+ export interface ExternalAgentPackImportCheck {
950
+ check: string;
951
+ status: ExternalPackCheckStatus;
952
+ evidence: string;
953
+ }
954
+ export interface ExternalAgentPackImportInspection {
955
+ version: typeof EXTERNAL_AGENT_PACK_IMPORT_POLICY_VERSION;
956
+ sourceId: string;
957
+ status: ExternalPackImportStatus;
958
+ checks: ExternalAgentPackImportCheck[];
959
+ mappingResult: string;
960
+ allowedProfiles: AgentProfileId[];
961
+ riskCeiling: LifecycleAutonomyCeiling;
962
+ reason: string;
963
+ }
964
+ export interface ModelPolicyContract {
965
+ id: string;
966
+ category: string;
967
+ fallbackPolicy: string;
968
+ hostProjection: string;
969
+ }
970
+ export interface ToolPermissionSpec {
971
+ version: typeof TOOL_PERMISSION_SPEC_VERSION;
972
+ profile: AgentProfileId;
973
+ risk: string[];
974
+ toolGroups: string[];
975
+ fileScope: string[];
976
+ policy: ToolPermissionPolicy;
977
+ approvalPolicy: string;
978
+ runtimeValidationRequired: boolean;
979
+ deniedTools: string[];
980
+ hostPermissionProjection: string;
981
+ }
982
+ export interface HostAdapterContract {
983
+ version: typeof HOST_ADAPTER_CONTRACT_VERSION;
984
+ id: string;
985
+ host: string;
986
+ responsibilities: string[];
987
+ forbiddenAuthority: string[];
988
+ projections: string[];
989
+ }
990
+ export interface DelegationWavePolicy {
991
+ id: string;
992
+ waveKind: 'hyperplan' | 'security_research' | 'implementation_review' | 'validation';
993
+ memberProfiles: AgentProfileId[];
994
+ requiredArtifacts: string[];
995
+ fileOwnershipRequired: boolean;
996
+ mergeGate: string;
997
+ }
998
+ export interface TeamModePolicy {
999
+ version: typeof TEAM_MODE_POLICY_VERSION;
1000
+ enabled: boolean;
1001
+ decision: TeamModeDecisionStatus;
1002
+ mode: TeamModeSelection;
1003
+ activation: TeamModeActivation;
1004
+ costClass: TeamModeCostClass;
1005
+ reason: string;
1006
+ chiefProfile: AgentProfileId;
1007
+ memberProfiles: AgentProfileId[];
1008
+ allowedWaves: DelegationWavePolicy[];
1009
+ maxMembers: number;
1010
+ requireArtifacts: boolean;
1011
+ blockedReason: string | null;
1012
+ waveRecommendation: string[];
1013
+ }
1014
+ export interface EvidenceIngestionContract {
1015
+ version: typeof EVIDENCE_INGESTION_CONTRACT_VERSION;
1016
+ sourceOutputs: string[];
1017
+ evidenceTargets: string[];
1018
+ canonicalTruth: string;
1019
+ forbiddenTruthSources: string[];
1020
+ }
1021
+ export interface AgentExecutionRecord {
1022
+ version: typeof AGENT_EXECUTION_RECORD_CONTRACT_VERSION;
1023
+ executionId: string;
1024
+ runId: string;
1025
+ taskId: string;
1026
+ profile: AgentProfileId;
1027
+ category: AgentRouterCategory;
1028
+ host: string;
1029
+ hostSessionId: string | null;
1030
+ hostTaskId: string | null;
1031
+ modelPolicy: ModelPolicyContract;
1032
+ toolPermission: ToolPermissionSpec | null;
1033
+ capabilitiesUsed: string[];
1034
+ sourceAttribution: string[];
1035
+ artifacts: string[];
1036
+ status: AgentExecutionRecordStatus;
1037
+ delegationId: string | null;
1038
+ queueItemId: string | null;
1039
+ ingestionStatus: ArtifactResultIngestionStatus | null;
1040
+ resultStatus: SddResultStatus | null;
1041
+ routeDecision: Pick<AgentRouterDecision, 'version' | 'category' | 'recommendedProfile' | 'autonomyCeiling' | 'requiredCapabilities' | 'blockedReason'>;
1042
+ evidenceSummary: string;
1043
+ createdAt: string;
1044
+ updatedAt: string;
1045
+ }
1046
+ export interface TeamMessageRecord {
1047
+ sender: AgentProfileId | 'runtime';
1048
+ receiver: AgentProfileId | 'team' | 'runtime';
1049
+ taskRef: string | null;
1050
+ artifactRefs: string[];
1051
+ blocker: string | null;
1052
+ evidenceSummary: string;
1053
+ createdAt: string;
1054
+ }
1055
+ export interface TeamSessionRecord {
1056
+ version: typeof TEAM_SESSION_RECORD_CONTRACT_VERSION;
1057
+ teamId: string;
1058
+ runId: string;
1059
+ taskId: string | null;
1060
+ status: TeamSessionRecordStatus;
1061
+ chiefProfile: AgentProfileId;
1062
+ memberProfiles: AgentProfileId[];
1063
+ hostLayout: string | null;
1064
+ teamMode: TeamModePolicy;
1065
+ waves: DelegationWavePolicy[];
1066
+ messages: TeamMessageRecord[];
1067
+ artifacts: string[];
1068
+ evidenceSummary: string;
1069
+ createdAt: string;
1070
+ updatedAt: string;
1071
+ }
1072
+ export interface AgentRouterRejectedProfile {
1073
+ profile: AgentProfileId;
1074
+ reason: string;
1075
+ }
1076
+ export interface AgentRouterDecision {
1077
+ version: typeof AGENT_ROUTER_CONTRACT_VERSION;
1078
+ taskId: string;
1079
+ branch: string;
1080
+ category: AgentRouterCategory;
1081
+ recommendedProfile: AgentProfileId | null;
1082
+ allowedProfiles: AgentProfileId[];
1083
+ rejectedProfiles: AgentRouterRejectedProfile[];
1084
+ requiredCapabilities: string[];
1085
+ sourceCapability: string | null;
1086
+ reuseDecision: CapabilityReuseDecision | null;
1087
+ toolPermission: ToolPermissionSpec | null;
1088
+ modelPolicy: ModelPolicyContract;
1089
+ teamMode: TeamModePolicy;
1090
+ autonomyCeiling: LifecycleAutonomyCeiling;
1091
+ requiredArtifacts: string[];
1092
+ blockedReason: string | null;
1093
+ nextAction: string;
1094
+ registrySources?: RuntimeRegistryEntrySource[];
1095
+ resolvedAliases?: AgentRuntimeAliasResolution[];
1096
+ routingRuleHits?: string[];
1097
+ quarantineWarnings?: string[];
1098
+ adapterMapping?: AgentRuntimeAdapterMapping | null;
1099
+ }
1100
+ export interface AgentSkillTeamRuntimeInspection {
1101
+ version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
1102
+ profiles: AgentProfileContract[];
1103
+ skillCapabilities: SkillCapabilityContract[];
1104
+ capabilitySources: CapabilitySourceCatalogEntry[];
1105
+ hostAdapter: HostAdapterContract;
1106
+ evidenceIngestion: EvidenceIngestionContract;
1107
+ teamMode: TeamModePolicy;
1108
+ reusePolicy: string;
1109
+ registrySources?: RuntimeRegistryEntrySource[];
1110
+ aliases?: Record<string, string>;
1111
+ routingRules?: AgentRuntimeRoutingRule[];
1112
+ adapterMappings?: AgentRuntimeAdapterMapping[];
1113
+ }
1114
+ export interface SkillCapabilityRegistry {
1115
+ version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
1116
+ capabilities: SkillCapabilityContract[];
1117
+ registrySources?: RuntimeRegistryEntrySource[];
1118
+ }
1119
+ export interface CapabilitySourceCatalog {
1120
+ version: typeof CAPABILITY_SOURCE_CATALOG_VERSION;
1121
+ sources: CapabilitySourceCatalogEntry[];
1122
+ registrySources?: RuntimeRegistryEntrySource[];
1123
+ }
1124
+ export interface AgentSkillTeamRuntimeValidation {
1125
+ version: typeof AGENT_SKILL_TEAM_RUNTIME_CONTRACT_VERSION;
1126
+ valid: boolean;
1127
+ inspection: AgentSkillTeamRuntimeInspection;
1128
+ issues: ContractValidationIssue[];
1129
+ }
1130
+ export type QuerySurfaceId = 'status' | 'doctor' | 'run_inspect' | 'debug';
1131
+ export interface QueryStatusSurface {
1132
+ id: QuerySurfaceId;
1133
+ command: string;
1134
+ responsibility: string;
1135
+ includes: string[];
1136
+ excludes: string[];
1137
+ nextActionRule: string;
1138
+ }
1139
+ export interface QueryStatusContract {
1140
+ version: typeof QUERY_STATUS_CONTRACT_VERSION;
1141
+ sourceDocument: string;
1142
+ surfaces: QueryStatusSurface[];
1143
+ }
1144
+ export interface QueryStatusValidation {
1145
+ version: typeof QUERY_STATUS_CONTRACT_VERSION;
1146
+ valid: boolean;
1147
+ surfaces: QueryStatusSurface[];
1148
+ issues: ContractValidationIssue[];
1149
+ }
1150
+ export type SkillAgentEvalDimensionId = 'novel_judgment' | 'risk_identification' | 'task_slicing' | 'agent_evidence' | 'output_concision' | 'verification_executability' | 'autonomy_correctness' | 'agent_fit' | 'verification_availability' | 'gap_closure';
1151
+ export interface SkillAgentEvalDimension {
1152
+ id: SkillAgentEvalDimensionId;
1153
+ expectation: string;
1154
+ baselineFinding: string;
1155
+ passThreshold: number;
1156
+ }
1157
+ export interface SkillAgentEvalContract {
1158
+ version: typeof SKILL_AGENT_EVAL_CONTRACT_VERSION;
1159
+ corpus: string[];
1160
+ sourceReport: string;
1161
+ dimensions: SkillAgentEvalDimension[];
1162
+ regressionAssertions: string[];
1163
+ }
1164
+ export interface SkillAgentEvalValidation {
1165
+ version: typeof SKILL_AGENT_EVAL_CONTRACT_VERSION;
1166
+ valid: boolean;
1167
+ contract: SkillAgentEvalContract;
1168
+ issues: ContractValidationIssue[];
1169
+ }
1170
+ export type HarnessLearningSinkId = 'project_context_pack' | 'risk_vocabulary' | 'checklist' | 'doctor_check' | 'eval_assertion' | 'generated_entry_guidance';
1171
+ export interface HarnessLearningSink {
1172
+ id: HarnessLearningSinkId;
1173
+ output: string;
1174
+ boundary: string;
1175
+ }
1176
+ export interface HarnessLearningContract {
1177
+ version: typeof HARNESS_LEARNING_CONTRACT_VERSION;
1178
+ sourceTrial: string;
1179
+ allowedSinks: HarnessLearningSink[];
1180
+ forbiddenOutputs: string[];
1181
+ promotionRule: string;
1182
+ }
1183
+ export interface HarnessLearningValidation {
1184
+ version: typeof HARNESS_LEARNING_CONTRACT_VERSION;
1185
+ valid: boolean;
1186
+ contract: HarnessLearningContract;
1187
+ issues: ContractValidationIssue[];
1188
+ }
1189
+ export interface ProjectContextPackContract {
1190
+ version: typeof PROJECT_CONTEXT_PACK_CONTRACT_VERSION;
1191
+ entryPoint: string;
1192
+ durableContext: string[];
1193
+ runtimeSourcesOfTruth: string[];
1194
+ boundaries: string[];
1195
+ }
1196
+ export interface ProjectContextPackValidation {
1197
+ version: typeof PROJECT_CONTEXT_PACK_CONTRACT_VERSION;
1198
+ valid: boolean;
1199
+ contract: ProjectContextPackContract;
1200
+ issues: ContractValidationIssue[];
1201
+ }
629
1202
  export interface SddResult {
630
1203
  contract: typeof SDD_RESULT_CONTRACT;
631
1204
  version: typeof SDD_RESULT_VERSION;
@@ -685,6 +1258,8 @@ export interface SingleTaskLoopOptions {
685
1258
  reviewArtifact?: string;
686
1259
  validationArtifact?: string;
687
1260
  debugArtifact?: string;
1261
+ teamModeEnabled?: boolean;
1262
+ teamModeActivation?: TeamModeActivation;
688
1263
  }
689
1264
  export interface SingleTaskLoopResult {
690
1265
  runId: string;
@@ -695,12 +1270,13 @@ export interface SingleTaskLoopResult {
695
1270
  requiredArtifacts: string[];
696
1271
  acceptedArtifacts: string[];
697
1272
  syncBackProposalPath: string;
1273
+ routeDecision: AgentRouterDecision;
698
1274
  message: string;
699
1275
  }
700
1276
  export interface GoalVerifyOptions {
701
1277
  branch?: string;
702
1278
  taskId: string;
703
- runId: string;
1279
+ runId?: string;
704
1280
  reviewArtifact?: string;
705
1281
  validationArtifact?: string;
706
1282
  }
@@ -721,6 +1297,7 @@ export interface GoalVerifyResult {
721
1297
  acceptanceCoverage: AcceptanceCoverageItem[];
722
1298
  gaps: SddTaskGap[];
723
1299
  commands: string[];
1300
+ standardStatus: HarnessVerifyStatus;
724
1301
  message: string;
725
1302
  }
726
1303
  export interface RunSummary {
@@ -728,6 +1305,11 @@ export interface RunSummary {
728
1305
  status: RunStatus;
729
1306
  phase: string | null;
730
1307
  currentTask: string | null;
1308
+ partition: string | null;
1309
+ gitBranch: string | null;
1310
+ taskId: string | null;
1311
+ affectedFiles: string[];
1312
+ documentSnapshot: RunDocumentSnapshot;
731
1313
  createdAt: string;
732
1314
  updatedAt: string;
733
1315
  validationStatus: RunState['validation']['status'];
@@ -737,6 +1319,9 @@ export interface RunSummary {
737
1319
  }
738
1320
  export interface LocalRunIndexTaskEntry {
739
1321
  taskId: string;
1322
+ partition: string | null;
1323
+ gitBranch: string | null;
1324
+ affectedFiles: string[];
740
1325
  status: string | null;
741
1326
  runId: string;
742
1327
  runStatus: RunStatus;
@@ -755,9 +1340,31 @@ export interface LocalRunIndexWaveSummary {
755
1340
  eventCount: number;
756
1341
  lastEvent: string | null;
757
1342
  }
1343
+ export interface LocalRunIndexPartitionTaskEntry {
1344
+ partition: string;
1345
+ gitBranch: string | null;
1346
+ taskId: string;
1347
+ runId: string;
1348
+ runStatus: RunStatus;
1349
+ validationStatus: RunState['validation']['status'];
1350
+ syncBackStatus: RunState['syncBack']['status'];
1351
+ affectedFiles: string[];
1352
+ updatedAt: string;
1353
+ }
1354
+ export interface LocalRunIndexAffectedFileEntry {
1355
+ file: string;
1356
+ partition: string;
1357
+ gitBranch: string | null;
1358
+ taskId: string;
1359
+ runId: string;
1360
+ runStatus: RunStatus;
1361
+ syncBackStatus: RunState['syncBack']['status'];
1362
+ updatedAt: string;
1363
+ }
758
1364
  export interface LocalRunIndexQuery {
759
1365
  runId?: string;
760
1366
  taskId?: string;
1367
+ partition?: string;
761
1368
  status?: RunStatus;
762
1369
  artifact?: string;
763
1370
  }
@@ -769,6 +1376,8 @@ export interface LocalRunIndex {
769
1376
  delegations: DelegationQueueItem[];
770
1377
  artifacts: LocalRunIndexArtifactEntry[];
771
1378
  waves: LocalRunIndexWaveSummary[];
1379
+ latestByPartitionTask: LocalRunIndexPartitionTaskEntry[];
1380
+ activeByAffectedFile: LocalRunIndexAffectedFileEntry[];
772
1381
  }
773
1382
  export interface LocalRunIndexInspection {
774
1383
  valid: boolean;
@@ -777,6 +1386,31 @@ export interface LocalRunIndexInspection {
777
1386
  index: LocalRunIndex | null;
778
1387
  issues: ContractValidationIssue[];
779
1388
  }
1389
+ export interface TaskRunEvidenceContract {
1390
+ version: typeof TASK_RUN_EVIDENCE_CONTRACT_VERSION;
1391
+ runId: string;
1392
+ state: {
1393
+ status: RunStatus;
1394
+ phase: string | null;
1395
+ currentTask: string | null;
1396
+ };
1397
+ events: Array<{
1398
+ event: string;
1399
+ summary: string | null;
1400
+ task: string | null;
1401
+ agent: string | null;
1402
+ gate: string | null;
1403
+ validation: string | null;
1404
+ gap: string | null;
1405
+ }>;
1406
+ artifacts: ArtifactIndexEntry[];
1407
+ validation: RunState['validation'];
1408
+ gaps: SddTaskGap[];
1409
+ syncBackProposal: string | null;
1410
+ agentExecutions: AgentExecutionRecord[];
1411
+ teamSessions: TeamSessionRecord[];
1412
+ workerRuntimes: ResidentWorkerRuntimeRecord[];
1413
+ }
780
1414
  export interface RunInspection {
781
1415
  summary: RunSummary;
782
1416
  state: RunState;
@@ -789,9 +1423,37 @@ export interface RunInspection {
789
1423
  validation: RunState['validation'];
790
1424
  syncBack: RunState['syncBack'];
791
1425
  tasks: Record<string, unknown>;
1426
+ taskRunEvidence: TaskRunEvidenceContract;
1427
+ agentExecutions: AgentExecutionRecord[];
1428
+ teamSessions: TeamSessionRecord[];
1429
+ workerRuntimes: ResidentWorkerRuntimeRecord[];
1430
+ }
1431
+ export interface RunEvidenceSummary {
1432
+ agentExecutions: number;
1433
+ teamSessions: number;
1434
+ artifactIngestions: number;
1435
+ workerRuntimes: number;
1436
+ staleWorkerRuntimes: number;
1437
+ routePreflight: boolean;
1438
+ tasksChangedAfterRun: boolean;
1439
+ tasksUpdatedAt: string | null;
1440
+ runUpdatedAt: string | null;
1441
+ }
1442
+ export interface ResolvedTaskRun {
1443
+ runId: string;
1444
+ state: RunState;
1445
+ context: ContextResolverContract;
1446
+ model: SddTaskModel;
1447
+ task: SddTask | null;
1448
+ explicitRunId: boolean;
1449
+ staleReasons: string[];
1450
+ affectedFileConflicts: LocalRunIndexAffectedFileEntry[];
792
1451
  }
793
1452
  export interface ProjectStatus {
794
1453
  branch: string;
1454
+ workflowStatus: 'active' | 'not_started';
1455
+ context: ContextResolverContract;
1456
+ gitRoot: string | null;
795
1457
  documents: SddTaskModel['documents'];
796
1458
  tasks: {
797
1459
  total: number;
@@ -804,6 +1466,10 @@ export interface ProjectStatus {
804
1466
  gaps: number;
805
1467
  };
806
1468
  latestRun: RunSummary | null;
1469
+ latestRunsByTask: LocalRunIndexPartitionTaskEntry[];
1470
+ latestRunEvidence: RunEvidenceSummary | null;
1471
+ latestRunStaleReasons: string[];
1472
+ affectedFileConflicts: LocalRunIndexAffectedFileEntry[];
807
1473
  recommendedNextCommand: string;
808
1474
  gaps: SddTaskGap[];
809
1475
  }
@@ -827,6 +1493,8 @@ export interface SyncBackInspection {
827
1493
  artifacts: string[];
828
1494
  gaps: SddTaskGap[];
829
1495
  applyPolicy: SyncBackApplyPolicy;
1496
+ staleReasons: string[];
1497
+ affectedFileConflicts: LocalRunIndexAffectedFileEntry[];
830
1498
  }
831
1499
  export interface SyncBackApplyResult {
832
1500
  runId: string;
@@ -843,6 +1511,12 @@ export declare function getRunsDir(projectRoot: string): string;
843
1511
  export declare function getLocalRunIndexPath(projectRoot: string): string;
844
1512
  export declare function getRunDir(projectRoot: string, runId: string): string;
845
1513
  export declare function getArtifactsDir(projectRoot: string, runId: string): string;
1514
+ export declare function getAgentExecutionsDir(projectRoot: string, runId: string): string;
1515
+ export declare function getTeamSessionsDir(projectRoot: string, runId: string): string;
1516
+ export declare function getWorkerRuntimesDir(projectRoot: string, runId: string): string;
1517
+ export declare function getWorkerRuntimeRecordPath(projectRoot: string, runId: string, runtimeId: string): string;
1518
+ export declare function getAgentExecutionRecordPath(projectRoot: string, runId: string, executionId: string): string;
1519
+ export declare function getTeamSessionRecordPath(projectRoot: string, runId: string, teamId: string): string;
846
1520
  export declare function getArtifactPath(projectRoot: string, runId: string, relativeArtifactPath: string): string;
847
1521
  export declare function getRunRelativeArtifactPath(artifactRootRelativePath: string): string;
848
1522
  export declare function toArtifactRootRelativePath(runRelativeArtifactPath: string): string;
@@ -851,6 +1525,13 @@ export declare function writeArtifact(projectRoot: string, runId: string, artifa
851
1525
  runRelativePath: string;
852
1526
  }>;
853
1527
  export declare function readArtifact(projectRoot: string, runId: string, artifactRootRelativePath: string): Promise<string>;
1528
+ export declare function writeAgentExecutionRecord(projectRoot: string, record: AgentExecutionRecord): Promise<AgentExecutionRecord>;
1529
+ export declare function writeTeamSessionRecord(projectRoot: string, record: TeamSessionRecord): Promise<TeamSessionRecord>;
1530
+ export declare function writeResidentWorkerRuntimeRecord(projectRoot: string, record: ResidentWorkerRuntimeRecord): Promise<ResidentWorkerRuntimeRecord>;
1531
+ export declare function listAgentExecutionRecords(projectRoot: string, runId: string): Promise<AgentExecutionRecord[]>;
1532
+ export declare function listTeamSessionRecords(projectRoot: string, runId: string): Promise<TeamSessionRecord[]>;
1533
+ export declare function readResidentWorkerRuntimeRecord(projectRoot: string, runId: string, runtimeId: string): Promise<ResidentWorkerRuntimeRecord>;
1534
+ export declare function listResidentWorkerRuntimeRecords(projectRoot: string, runId: string): Promise<ResidentWorkerRuntimeRecord[]>;
854
1535
  export type InitDocumentStatus = 'created' | 'unchanged' | 'overwritten' | 'skipped';
855
1536
  export interface InitDocumentReport {
856
1537
  branch: string;
@@ -892,16 +1573,26 @@ export declare function readLocalRunIndex(projectRoot: string): Promise<LocalRun
892
1573
  export declare function queryLocalRunIndex(projectRoot: string, query?: LocalRunIndexQuery): Promise<LocalRunIndex>;
893
1574
  export declare function inspectLocalRunIndex(projectRoot: string): Promise<LocalRunIndexInspection>;
894
1575
  export declare function inspectRun(projectRoot: string, runId: string): Promise<RunInspection>;
1576
+ export declare function resolveSddContext(projectRoot: string, options?: {
1577
+ branch?: string | null;
1578
+ branchSource?: ContextBranchSource;
1579
+ }): Promise<ContextResolverContract>;
895
1580
  export declare function getProjectStatus(projectRoot: string, options?: {
896
- branch?: string;
1581
+ branch?: string | null;
1582
+ branchSource?: ContextBranchSource;
897
1583
  }): Promise<ProjectStatus>;
1584
+ export declare function resolveTaskRun(projectRoot: string, options: {
1585
+ runId?: string;
1586
+ branch?: string;
1587
+ taskId: string;
1588
+ }): Promise<ResolvedTaskRun>;
898
1589
  export declare function inspectSyncBack(projectRoot: string, options: {
899
- runId: string;
1590
+ runId?: string;
900
1591
  branch?: string;
901
1592
  taskId?: string;
902
1593
  }): Promise<SyncBackInspection>;
903
1594
  export declare function applySyncBack(projectRoot: string, options: {
904
- runId: string;
1595
+ runId?: string;
905
1596
  branch?: string;
906
1597
  taskId?: string;
907
1598
  approved?: boolean;
@@ -970,6 +1661,15 @@ export declare function inspectWavePlan(projectRoot: string, options?: {
970
1661
  }): Promise<WavePlan>;
971
1662
  export declare function runBackgroundExecutor(projectRoot: string, options: BackgroundExecutorRunOptions): Promise<BackgroundExecutorResult>;
972
1663
  export declare function inspectBackgroundExecutor(projectRoot: string, runId: string): Promise<BackgroundExecutorInspection>;
1664
+ export declare function claimResidentWorkerRuntime(projectRoot: string, options: ResidentWorkerRuntimeClaimOptions): Promise<ResidentWorkerRuntimeClaimResult>;
1665
+ export declare function heartbeatResidentWorkerRuntime(projectRoot: string, options: ResidentWorkerRuntimeHeartbeatOptions): Promise<ResidentWorkerRuntimeHeartbeatResult>;
1666
+ export declare function listResidentWorkerRuntimes(projectRoot: string, options: {
1667
+ runId: string;
1668
+ }): Promise<ResidentWorkerRuntimeList>;
1669
+ export declare function inspectResidentWorkerRuntime(projectRoot: string, options: {
1670
+ runId: string;
1671
+ runtimeId: string;
1672
+ }): Promise<ResidentWorkerRuntimeInspection>;
973
1673
  export declare function runWaveExecutor(projectRoot: string, options?: WaveExecutorRunOptions): Promise<WaveExecutorResult>;
974
1674
  export declare function inspectWaveExecutor(projectRoot: string, runId: string): Promise<WaveExecutorInspection>;
975
1675
  export declare function renderDoctorReport(report: DoctorReport): string;
@@ -1004,6 +1704,39 @@ export declare function listToolPluginContracts(projectRoot: string): Promise<To
1004
1704
  export declare function inspectToolPluginContract(projectRoot: string, pluginId: string): Promise<ToolPluginContract | null>;
1005
1705
  export declare function listWorkerAdapterContracts(projectRoot: string): Promise<WorkerAdapterContractRegistry>;
1006
1706
  export declare function inspectWorkerAdapterContract(projectRoot: string, adapterId: string): Promise<WorkerAdapterContract | null>;
1707
+ export declare function listWorkflowGates(projectRoot: string): Promise<WorkflowGateRegistry>;
1708
+ export declare function inspectWorkflowGate(projectRoot: string, workflowId: string): Promise<WorkflowGateContract | null>;
1709
+ export declare function validateWorkflowGates(projectRoot: string): Promise<WorkflowGateValidation>;
1710
+ export declare function listAgentRegistry(projectRoot: string): Promise<AgentRegistry>;
1711
+ export declare function inspectAgentRegistryEntry(projectRoot: string, agentId: string): Promise<AgentRegistryEntry | null>;
1712
+ export declare function validateAgentRegistry(projectRoot: string): Promise<AgentRegistryValidation>;
1713
+ export declare function inspectAgentSkillTeamRuntime(projectRoot: string): Promise<AgentSkillTeamRuntimeInspection>;
1714
+ export declare function validateAgentSkillTeamRuntime(projectRoot: string): Promise<AgentSkillTeamRuntimeValidation>;
1715
+ export declare function listSkillCapabilities(projectRoot: string): Promise<SkillCapabilityRegistry>;
1716
+ export declare function inspectSkillCapability(projectRoot: string, capabilityId: string): Promise<SkillCapabilityContract | null>;
1717
+ export declare function listCapabilitySources(projectRoot: string): Promise<CapabilitySourceCatalog>;
1718
+ export declare function inspectCapabilitySource(projectRoot: string, sourceId: string): Promise<CapabilitySourceCatalogEntry | null>;
1719
+ export declare function inspectExternalAgentPackImport(projectRoot: string, sourceId: string): Promise<ExternalAgentPackImportInspection>;
1720
+ export declare function inspectTeamModePolicy(projectRoot: string, options?: {
1721
+ taskId?: string;
1722
+ branch?: string;
1723
+ enabled?: boolean;
1724
+ teamModeActivation?: TeamModeActivation;
1725
+ }): Promise<TeamModePolicy>;
1726
+ export declare function routeSddTask(projectRoot: string, options: {
1727
+ taskId: string;
1728
+ branch?: string;
1729
+ teamModeEnabled?: boolean;
1730
+ teamModeActivation?: TeamModeActivation;
1731
+ }): Promise<AgentRouterDecision>;
1732
+ export declare function inspectQueryStatusContract(projectRoot: string): Promise<QueryStatusContract>;
1733
+ export declare function inspectSkillAgentEvalContract(projectRoot: string): Promise<SkillAgentEvalContract>;
1734
+ export declare function validateSkillAgentEvalContract(projectRoot: string): Promise<SkillAgentEvalValidation>;
1735
+ export declare function inspectHarnessLearningContract(projectRoot: string): Promise<HarnessLearningContract>;
1736
+ export declare function validateHarnessLearningContract(projectRoot: string): Promise<HarnessLearningValidation>;
1737
+ export declare function inspectProjectContextPackContract(projectRoot: string): Promise<ProjectContextPackContract>;
1738
+ export declare function validateProjectContextPackContract(projectRoot: string): Promise<ProjectContextPackValidation>;
1739
+ export declare function validateQueryStatusContract(projectRoot: string): Promise<QueryStatusValidation>;
1007
1740
  export declare function inspectGovernancePolicy(projectRoot: string): Promise<GovernancePolicy>;
1008
1741
  export declare function evaluateGovernancePolicy(projectRoot: string, input: GovernancePolicyDecisionInput): Promise<GovernancePolicyDecision>;
1009
1742
  export declare function listDelegationQueueItems(projectRoot: string, options?: {
@@ -1014,3 +1747,5 @@ export declare function getDelegationStateMachine(): DelegationStateMachine;
1014
1747
  export declare function validateDelegationStateTransition(from: DelegationStatus, to: DelegationStatus, event?: string | null): DelegationStateTransitionValidation;
1015
1748
  export declare function emptyLifecycleDecisionRecord(): LifecycleDecisionRecord;
1016
1749
  export declare function readRunEvents(projectRoot: string, runId: string): Promise<RuntimeEvent[]>;
1750
+ export declare function extractLifecycleRiskSignalsFromText(text: string, source?: LifecycleRiskExtractionSource): LifecycleRiskGateExtraction;
1751
+ export declare function lifecycleAutonomyCeiling(record: LifecycleDecisionRecord): LifecycleAutonomyCeiling;