thoth-agents 0.4.1 → 0.5.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 (117) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +86 -58
  3. package/dist/agents/prompt-sections.d.ts +5 -3
  4. package/dist/agents/prompt-utils.d.ts +1 -1
  5. package/dist/agents/worker.d.ts +2 -0
  6. package/dist/{chunk-STCURXAQ.js → chunk-MRFCA3U2.js} +33 -67
  7. package/dist/{chunk-EFGSGPYM.js → chunk-OW6I7ZUU.js} +391 -416
  8. package/dist/chunk-V7HSGRMB.js +1016 -0
  9. package/dist/{chunk-2D7E7GMP.js → chunk-VUNYH263.js} +1650 -380
  10. package/dist/cli/claude-code-paths.d.ts +2 -2
  11. package/dist/cli/codex-install.d.ts +5 -2
  12. package/dist/cli/codex-paths.d.ts +2 -2
  13. package/dist/cli/index.js +47 -11
  14. package/dist/cli/model-defaults.d.ts +4 -0
  15. package/dist/cli/operations/pi.d.ts +1 -0
  16. package/dist/cli/pi-effort.d.ts +1 -1
  17. package/dist/cli/pi-external-package.d.ts +24 -0
  18. package/dist/cli/pi-git-source.d.ts +1 -0
  19. package/dist/cli/pi-install.d.ts +92 -15
  20. package/dist/cli/pi-managed-write.d.ts +3 -0
  21. package/dist/cli/pi-model-config.d.ts +17 -0
  22. package/dist/cli/pi-native-probe.d.ts +2 -0
  23. package/dist/cli/pi-paths.d.ts +2 -0
  24. package/dist/cli/pi-resources.d.ts +3 -1
  25. package/dist/cli/pi-tool-config.d.ts +32 -0
  26. package/dist/cli/tui/index.js +32 -7
  27. package/dist/cli/tui/operations.d.ts +3 -1
  28. package/dist/cli/types.d.ts +2 -0
  29. package/dist/config/constants.d.ts +4 -8
  30. package/dist/config/schema.d.ts +7 -36
  31. package/dist/harness/adapters/claude-code.d.ts +2 -4
  32. package/dist/harness/core/agent-pack.d.ts +52 -42
  33. package/dist/harness/core/memory-governance.d.ts +2 -2
  34. package/dist/harness/core/sdd.d.ts +159 -319
  35. package/dist/harness/writers/pi-agent.d.ts +3 -1
  36. package/dist/index.js +12 -6
  37. package/dist/pi/tools-panel.d.ts +51 -0
  38. package/dist/pi.d.ts +44 -2
  39. package/dist/pi.js +471 -9
  40. package/dist/utils/subprocess.d.ts +1 -0
  41. package/package.json +18 -4
  42. package/pi/.thoth-agents-assets.json +5 -6
  43. package/pi/agents/thoth-designer.md +23 -8
  44. package/pi/agents/thoth-explorer.md +29 -9
  45. package/pi/agents/thoth-librarian.md +30 -8
  46. package/pi/agents/thoth-oracle.md +18 -10
  47. package/pi/agents/thoth-worker.md +96 -0
  48. package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +7 -12
  49. package/plugin/.claude-plugin/plugin.json +2 -2
  50. package/plugin/.codex-plugin/plugin.json +2 -2
  51. package/plugin/agents/designer.md +13 -5
  52. package/plugin/agents/explorer.md +16 -5
  53. package/plugin/agents/librarian.md +15 -4
  54. package/plugin/agents/oracle.md +13 -7
  55. package/plugin/agents/orchestrator.md +82 -91
  56. package/plugin/agents/worker.md +76 -0
  57. package/plugin/skills/plan-reviewer/SKILL.md +39 -141
  58. package/plugin/skills/thoth-archive/SKILL.md +50 -47
  59. package/plugin/skills/thoth-archive/scripts/archive.mjs +287 -654
  60. package/plugin/skills/thoth-constitution/SKILL.md +23 -42
  61. package/plugin/skills/thoth-constitution/templates/constitution.md +54 -44
  62. package/plugin/skills/thoth-init/SKILL.md +19 -29
  63. package/plugin/skills/thoth-init/scripts/init.mjs +73 -66
  64. package/plugin/skills/thoth-sdd/SKILL.md +164 -117
  65. package/plugin/skills/thoth-sdd/references/phases/checklist.md +2 -22
  66. package/plugin/skills/thoth-sdd/references/phases/clarify.md +14 -12
  67. package/plugin/skills/thoth-sdd/references/phases/converge.md +2 -13
  68. package/plugin/skills/thoth-sdd/references/phases/explore.md +3 -8
  69. package/plugin/skills/thoth-sdd/references/phases/implement.md +58 -57
  70. package/plugin/skills/thoth-sdd/references/phases/plan.md +2 -18
  71. package/plugin/skills/thoth-sdd/references/phases/specify.md +2 -33
  72. package/plugin/skills/thoth-sdd/references/phases/tasks.md +4 -45
  73. package/plugin/skills/thoth-sdd/references/phases/verify.md +4 -22
  74. package/plugin/skills/thoth-sdd/scripts/validate.mjs +610 -1232
  75. package/plugin/skills/thoth-sdd/templates/change.md +94 -0
  76. package/skills/README.md +11 -13
  77. package/skills/plan-reviewer/SKILL.md +39 -141
  78. package/skills/thoth-archive/SKILL.md +50 -47
  79. package/skills/thoth-archive/scripts/archive.mjs +287 -654
  80. package/skills/thoth-constitution/SKILL.md +23 -42
  81. package/skills/thoth-constitution/templates/constitution.md +54 -44
  82. package/skills/thoth-init/SKILL.md +19 -29
  83. package/skills/thoth-init/scripts/init.mjs +73 -66
  84. package/skills/thoth-sdd/SKILL.md +164 -117
  85. package/skills/thoth-sdd/references/phases/checklist.md +2 -22
  86. package/skills/thoth-sdd/references/phases/clarify.md +14 -12
  87. package/skills/thoth-sdd/references/phases/converge.md +2 -13
  88. package/skills/thoth-sdd/references/phases/explore.md +3 -8
  89. package/skills/thoth-sdd/references/phases/implement.md +58 -57
  90. package/skills/thoth-sdd/references/phases/plan.md +2 -18
  91. package/skills/thoth-sdd/references/phases/specify.md +2 -33
  92. package/skills/thoth-sdd/references/phases/tasks.md +4 -45
  93. package/skills/thoth-sdd/references/phases/verify.md +4 -22
  94. package/skills/thoth-sdd/scripts/validate.mjs +610 -1232
  95. package/skills/thoth-sdd/templates/change.md +94 -0
  96. package/thoth-agents.schema.json +9 -77
  97. package/dist/agents/deep.d.ts +0 -2
  98. package/dist/agents/quick.d.ts +0 -2
  99. package/dist/chunk-2U5MBLLV.js +0 -312
  100. package/pi/agents/thoth-deep.md +0 -81
  101. package/pi/agents/thoth-quick.md +0 -81
  102. package/plugin/agents/deep.md +0 -68
  103. package/plugin/agents/quick.md +0 -68
  104. package/plugin/skills/plan-reviewer/templates/plan-review.md +0 -65
  105. package/plugin/skills/thoth-sdd/templates/archive-report.md +0 -25
  106. package/plugin/skills/thoth-sdd/templates/checklist.md +0 -27
  107. package/plugin/skills/thoth-sdd/templates/plan.md +0 -46
  108. package/plugin/skills/thoth-sdd/templates/spec.md +0 -62
  109. package/plugin/skills/thoth-sdd/templates/tasks.md +0 -58
  110. package/plugin/skills/thoth-sdd/templates/verify-report.md +0 -28
  111. package/skills/plan-reviewer/templates/plan-review.md +0 -65
  112. package/skills/thoth-sdd/templates/archive-report.md +0 -25
  113. package/skills/thoth-sdd/templates/checklist.md +0 -27
  114. package/skills/thoth-sdd/templates/plan.md +0 -46
  115. package/skills/thoth-sdd/templates/spec.md +0 -62
  116. package/skills/thoth-sdd/templates/tasks.md +0 -58
  117. package/skills/thoth-sdd/templates/verify-report.md +0 -28
@@ -4,6 +4,7 @@ export interface InstallArgs {
4
4
  tui: boolean;
5
5
  agent?: InstallAgent;
6
6
  localPackageRoot?: string;
7
+ localPiRuntimeRoot?: string;
7
8
  tmux?: BooleanArg;
8
9
  dryRun?: boolean;
9
10
  reset?: boolean;
@@ -55,6 +56,7 @@ export interface InstallConfig {
55
56
  agent: InstallAgent;
56
57
  hasTmux: boolean;
57
58
  localPackageRoot?: string;
59
+ localPiRuntimeRoot?: string;
58
60
  dryRun?: boolean;
59
61
  reset: boolean;
60
62
  }
@@ -1,6 +1,6 @@
1
- type BuiltinAgentName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'quick' | 'deep';
1
+ type BuiltinAgentName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'worker';
2
2
  export type AgentName = BuiltinAgentName | (string & {});
3
- export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "quick", "deep"];
3
+ export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "worker"];
4
4
  export declare const ORCHESTRATOR_NAME: "orchestrator";
5
5
  export declare const ALL_AGENT_NAMES: readonly BuiltinAgentName[];
6
6
  export declare const SUBAGENT_DELEGATION_RULES: Record<AgentName, readonly string[]>;
@@ -21,13 +21,9 @@ export declare const CONFIRMED_OPENAI_SUBAGENT_PRESET: {
21
21
  readonly model: "gpt-6-sol";
22
22
  readonly effort: "medium";
23
23
  };
24
- readonly quick: {
24
+ readonly worker: {
25
25
  readonly model: "gpt-6-luna";
26
- readonly effort: "medium";
27
- };
28
- readonly deep: {
29
- readonly model: "gpt-6-sol";
30
- readonly effort: "medium";
26
+ readonly effort: "max";
31
27
  };
32
28
  };
33
29
  export declare const OPENCODE_OPENAI_ORCHESTRATOR_PRESET: {
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- declare const FALLBACK_AGENT_NAMES: readonly ["orchestrator", "oracle", "designer", "explorer", "librarian", "quick", "deep"];
3
- declare const MANUAL_AGENT_NAMES: readonly ["orchestrator", "oracle", "designer", "explorer", "librarian", "quick", "deep"];
2
+ declare const FALLBACK_AGENT_NAMES: readonly ["orchestrator", "oracle", "designer", "explorer", "librarian", "worker"];
3
+ declare const MANUAL_AGENT_NAMES: readonly ["orchestrator", "oracle", "designer", "explorer", "librarian", "worker"];
4
4
  export declare const ManualAgentPlanSchema: z.ZodObject<{
5
5
  primary: z.ZodString;
6
6
  fallback1: z.ZodString;
@@ -38,13 +38,7 @@ export declare const ManualPlanSchema: z.ZodObject<{
38
38
  fallback2: z.ZodString;
39
39
  fallback3: z.ZodString;
40
40
  }, z.core.$strip>;
41
- quick: z.ZodObject<{
42
- primary: z.ZodString;
43
- fallback1: z.ZodString;
44
- fallback2: z.ZodString;
45
- fallback3: z.ZodString;
46
- }, z.core.$strip>;
47
- deep: z.ZodObject<{
41
+ worker: z.ZodObject<{
48
42
  primary: z.ZodString;
49
43
  fallback1: z.ZodString;
50
44
  fallback2: z.ZodString;
@@ -106,8 +100,7 @@ export declare const AgentNameSchema: z.ZodEnum<{
106
100
  librarian: "librarian";
107
101
  oracle: "oracle";
108
102
  designer: "designer";
109
- quick: "quick";
110
- deep: "deep";
103
+ worker: "worker";
111
104
  }>;
112
105
  export declare const McpNameSchema: z.ZodEnum<{
113
106
  exa: "exa";
@@ -131,15 +124,7 @@ export declare const FailoverConfigSchema: z.ZodObject<{
131
124
  enabled: z.ZodDefault<z.ZodBoolean>;
132
125
  timeoutMs: z.ZodDefault<z.ZodNumber>;
133
126
  retryDelayMs: z.ZodDefault<z.ZodNumber>;
134
- chains: z.ZodDefault<z.ZodObject<{
135
- orchestrator: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
- oracle: z.ZodOptional<z.ZodArray<z.ZodString>>;
137
- designer: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
- explorer: z.ZodOptional<z.ZodArray<z.ZodString>>;
139
- librarian: z.ZodOptional<z.ZodArray<z.ZodString>>;
140
- quick: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
- deep: z.ZodOptional<z.ZodArray<z.ZodString>>;
142
- }, z.core.$catchall<z.ZodArray<z.ZodString>>>>;
127
+ chains: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
143
128
  }, z.core.$strip>;
144
129
  export type FailoverConfig = z.infer<typeof FailoverConfigSchema>;
145
130
  export declare const PluginConfigSchema: z.ZodObject<{
@@ -183,13 +168,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
183
168
  fallback2: z.ZodString;
184
169
  fallback3: z.ZodString;
185
170
  }, z.core.$strip>;
186
- quick: z.ZodObject<{
187
- primary: z.ZodString;
188
- fallback1: z.ZodString;
189
- fallback2: z.ZodString;
190
- fallback3: z.ZodString;
191
- }, z.core.$strip>;
192
- deep: z.ZodObject<{
171
+ worker: z.ZodObject<{
193
172
  primary: z.ZodString;
194
173
  fallback1: z.ZodString;
195
174
  fallback2: z.ZodString;
@@ -230,15 +209,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
230
209
  enabled: z.ZodDefault<z.ZodBoolean>;
231
210
  timeoutMs: z.ZodDefault<z.ZodNumber>;
232
211
  retryDelayMs: z.ZodDefault<z.ZodNumber>;
233
- chains: z.ZodDefault<z.ZodObject<{
234
- orchestrator: z.ZodOptional<z.ZodArray<z.ZodString>>;
235
- oracle: z.ZodOptional<z.ZodArray<z.ZodString>>;
236
- designer: z.ZodOptional<z.ZodArray<z.ZodString>>;
237
- explorer: z.ZodOptional<z.ZodArray<z.ZodString>>;
238
- librarian: z.ZodOptional<z.ZodArray<z.ZodString>>;
239
- quick: z.ZodOptional<z.ZodArray<z.ZodString>>;
240
- deep: z.ZodOptional<z.ZodArray<z.ZodString>>;
241
- }, z.core.$catchall<z.ZodArray<z.ZodString>>>>;
212
+ chains: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
242
213
  }, z.core.$strip>>;
243
214
  codex: z.ZodOptional<z.ZodObject<{
244
215
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -10,14 +10,12 @@ export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS: {
10
10
  readonly librarian: "sonnet";
11
11
  readonly oracle: "opus";
12
12
  readonly designer: "sonnet";
13
- readonly quick: "haiku";
14
- readonly deep: "sonnet";
13
+ readonly worker: "sonnet";
15
14
  };
16
15
  export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_EFFORTS: {
17
16
  readonly explorer: "low";
18
- readonly quick: "low";
19
17
  readonly designer: "medium";
20
- readonly deep: "medium";
18
+ readonly worker: "medium";
21
19
  readonly librarian: "high";
22
20
  readonly oracle: "high";
23
21
  };
@@ -1,6 +1,6 @@
1
- export type AgentRoleName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'quick' | 'deep';
1
+ export type AgentRoleName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'worker';
2
2
  export type AgentMutationMode = 'adaptive-root' | 'read-only' | 'write-capable';
3
- export type AgentDispatchMethod = 'root-coordinator' | 'task' | 'synchronous-task-only';
3
+ export type AgentDispatchMethod = 'root-coordinator' | 'task';
4
4
  export interface AgentRoleContract {
5
5
  name: AgentRoleName;
6
6
  mode: AgentMutationMode;
@@ -23,7 +23,7 @@ export interface OrchestrationPolicy {
23
23
  specialistDirectory: SpecialistDecision[];
24
24
  rules: string[];
25
25
  }
26
- export type TaskShapingStep = 'bound-work' | 'map-dependencies' | 'assign-ownership' | 'select-specialists' | 'mark-ready-and-blocked' | 'dispatch-ready-wave' | 'wait-for-terminal-evidence' | 'reconcile-and-verify';
26
+ export type TaskShapingStep = 'bound-units' | 'map-output-dependencies' | 'assign-ownership' | 'select-specialists' | 'admit-ready-units' | 'dispatch-to-native-capacity' | 'wait-for-native-terminal-event' | 'accept-results' | 'refill-capacity';
27
27
  export interface TaskShapingPolicy {
28
28
  steps: TaskShapingStep[];
29
29
  nativeAuthority: boolean;
@@ -31,7 +31,13 @@ export interface TaskShapingPolicy {
31
31
  decisions: {
32
32
  dependency: string;
33
33
  ownershipConflict: string;
34
- readyWave: string;
34
+ unitOutcome: string;
35
+ unitEnvelope: string;
36
+ phaseSplitting: string;
37
+ independentDiscovery: string;
38
+ scopeGrowth: string;
39
+ readyDispatch: string;
40
+ refill: string;
35
41
  terminalEvidence: string;
36
42
  degradation: string;
37
43
  };
@@ -41,34 +47,42 @@ export interface SpecialistDecision {
41
47
  selectWhen: string;
42
48
  rejectWhen: string;
43
49
  }
44
- export type ImplementationOwner = 'orchestrator' | 'designer' | 'quick' | 'deep';
50
+ export type ImplementationOwner = 'orchestrator' | 'designer' | 'worker';
45
51
  export interface ImplementationOwnershipPolicy {
46
52
  eligibleOwners: ImplementationOwner[];
47
- routeIndependent: boolean;
48
- delegationBenefits: string[];
49
- rootContinuityBenefits: string[];
53
+ workflowIndependent: boolean;
54
+ defaultImplementationOwner: 'specialist';
55
+ rootIdentity: string;
56
+ defaultRule: string;
57
+ rootResponsibilities: string[];
58
+ discovery: string[];
59
+ directConsultation: string[];
60
+ directException: string[];
61
+ writerRouting: string[];
62
+ evidenceHandling: string[];
63
+ delegationFailure: string[];
50
64
  userDirection: string;
51
65
  insufficientSignals: string[];
52
66
  }
53
67
  export interface AgentPackContract {
54
68
  roles: AgentRoleContract[];
55
69
  orchestrationPolicy: OrchestrationPolicy;
56
- returnContract: string[];
70
+ returnContract: Record<AgentRoleName, string[]>;
57
71
  verificationProtocol: string[];
58
72
  }
59
- export declare const AGENT_ROLE_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "quick", "deep"];
73
+ export declare const AGENT_ROLE_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "worker"];
60
74
  export declare const AGENT_ROLES: readonly [{
61
75
  readonly name: "orchestrator";
62
76
  readonly mode: "adaptive-root";
63
77
  readonly dispatch: "root-coordinator";
64
78
  readonly canMutateWorkspace: true;
65
- readonly scope: "requirements, SDD coordination, routing, bounded implementation, decisions, and synthesis";
66
- readonly responsibility: "Keep requirements, decisions, sequential SDD coordination, and final synthesis in the root thread; evaluate implementation ownership independently in every route, implement directly or delegate by demonstrated net gain, and run focused verification for trivial deterministic Direct work.";
67
- readonly useWhen: ["Coordinate requirements, governed artifacts, routing, and synthesis.", "Implement an accepted mutable surface in any route when accumulated context and continuity outweigh delegation overhead."];
79
+ readonly scope: "human agreement, SDD coordination, bounded direct exceptions, decisions, and synthesis";
80
+ readonly responsibility: "Coordinate goals, decisions, acceptance, and synthesis under the specialist-default implementation-ownership policy; direct work is limited to its bounded exceptions and explicit user instructions.";
81
+ readonly useWhen: ["Coordinate goals, constraints, decisions, governed artifacts, routing, acceptance, and synthesis.", "Retain reviewed commits and known low-risk mechanical operations; honor explicit direct-work or no-delegation instructions.", "Consult a known source for one bounded question or make a minimal authorized low-risk edit only when source, scope, and verification are known and no discovery or independent judgment is needed."];
68
82
  readonly doNotUseWhen: ["Not for independent plan review or Oracle-required final verification."];
69
- readonly escalateWhen: ["Delegate implementation when specialization, context isolation, or independent bounded work creates a demonstrated net gain; then select designer, quick, or deep by task shape."];
70
- readonly toolGovernance: ["may inspect and edit the accepted bounded implementation surface in every route and may verify trivial deterministic Direct work without self-approval", "loads the matching thoth-sdd phase contract on demand instead of carrying every phase protocol in its prompt", "owns governed coordination writes under openspec/ and uses append-only tasks.md updates during convergence", "delegates independent or specialist work only when it produces a net gain", "keeps requirements, decisions, and final synthesis in the root thread"];
71
- readonly verification: ["runs focused checks for trivial deterministic Direct work while final verification remains mandatory", "delegates selected plan review plus Accelerated, Full, and material-risk Direct final verification to a fresh oracle", "consolidates summarized evidence returned by child agents"];
83
+ readonly escalateWhen: ["Reassess ownership when actual uncertainty, scope, or risk increases, not because another search is needed; never override explicit no-delegation instructions."];
84
+ readonly toolGovernance: ["may inspect and edit the accepted bounded implementation surface and may verify trivial deterministic work without self-approval", "loads the matching thoth-sdd phase guidance on demand instead of carrying every phase protocol in its prompt", "owns proportional understanding, classification, one ID-named substantial-change record, semantic acceptance, and active .thoth/ work evidence", "uses the bounded implementation-ownership exceptions for reviewed commits and known low-risk mechanical work", "keeps requirements, decisions, and final synthesis in the root thread"];
85
+ readonly verification: ["runs focused checks for trivial deterministic work while final verification remains mandatory", "delegates selected focused plan review plus artifact-backed and material-risk final verification to a fresh oracle", "consolidates summarized evidence returned by child agents"];
72
86
  }, {
73
87
  readonly name: "explorer";
74
88
  readonly mode: "read-only";
@@ -76,7 +90,7 @@ export declare const AGENT_ROLES: readonly [{
76
90
  readonly canMutateWorkspace: false;
77
91
  readonly scope: "local repository discovery";
78
92
  readonly responsibility: "Resolve broad or uncertain repository questions and return distilled evidence.";
79
- readonly useWhen: ["Repository ownership or behavior is broad or uncertain."];
93
+ readonly useWhen: ["Local source, effective flow, responsibility, repository ownership, or behavior is unknown or uncertain."];
80
94
  readonly doNotUseWhen: ["Not for implementation, edits, or known narrow questions."];
81
95
  readonly escalateWhen: ["Send external evidence to librarian and mutation scope to root."];
82
96
  readonly toolGovernance: ["uses read, search, and code-navigation tools only", "does not mutate files or delegate further"];
@@ -96,11 +110,11 @@ export declare const AGENT_ROLES: readonly [{
96
110
  }, {
97
111
  readonly name: "oracle";
98
112
  readonly mode: "read-only";
99
- readonly dispatch: "synchronous-task-only";
113
+ readonly dispatch: "task";
100
114
  readonly canMutateWorkspace: false;
101
- readonly scope: "diagnosis, architecture, optional plan review, and independent verification";
102
- readonly responsibility: "Independently review plans when the user requests it and provide independent judgment for artifact-backed or material-risk final verification, exposing correctness risks and judging whether results satisfy their contracts.";
103
- readonly useWhen: ["Selected plan review, persistent diagnosis, material architecture or security risk, contradictory evidence, high failure cost, or artifact-backed final verification needs independent judgment."];
115
+ readonly scope: "diagnosis, architecture, optional focused plan review, and independent verification";
116
+ readonly responsibility: "Independently review plans when selected and provide independent judgment for artifact-backed or material-risk final verification, exposing correctness risks and judging whether results satisfy their contracts.";
117
+ readonly useWhen: ["Selected focused plan review, persistent diagnosis, material architecture or security risk, contradictory evidence, high failure cost, or artifact-backed final verification needs independent judgment."];
104
118
  readonly doNotUseWhen: ["Not for implementation, mutation, persistence, or self-review."];
105
119
  readonly escalateWhen: ["Return blockers and remediation anchors to root."];
106
120
  readonly toolGovernance: ["performs read-only analysis and independent review and is never the implementer of the work it judges", "does not implement, persist artifacts, or delegate further"];
@@ -108,42 +122,38 @@ export declare const AGENT_ROLES: readonly [{
108
122
  }, {
109
123
  readonly name: "designer";
110
124
  readonly mode: "write-capable";
111
- readonly dispatch: "synchronous-task-only";
125
+ readonly dispatch: "task";
112
126
  readonly canMutateWorkspace: true;
113
127
  readonly scope: "UI/UX decisions, implementation, and visual verification";
114
128
  readonly responsibility: "Own user-facing implementation choices and visual quality for UI work.";
115
129
  readonly useWhen: ["User-facing UI/UX, interaction, accessibility, or visual quality is material."];
116
130
  readonly doNotUseWhen: ["Not for backend-only, non-visual, or correctness-heavy cross-cutting work."];
117
- readonly escalateWhen: ["Escalate coupled contracts, migrations, or high risk to deep."];
131
+ readonly escalateWhen: ["Escalate coupled contracts, migrations, or high risk to worker."];
118
132
  readonly toolGovernance: ["may edit focused UI/UX files", "owns screenshots and visual QA", "does not delegate further"];
119
133
  readonly verification: ["includes visual verification when applicable"];
120
134
  }, {
121
- readonly name: "quick";
122
- readonly mode: "write-capable";
123
- readonly dispatch: "synchronous-task-only";
124
- readonly canMutateWorkspace: true;
125
- readonly scope: "fast bounded implementation";
126
- readonly responsibility: "Implement narrow, clear, low-risk changes within an explicitly bounded surface.";
127
- readonly useWhen: ["Known narrow mechanical low-risk work has exact targets."];
128
- readonly doNotUseWhen: ["Not for coupled contracts, migrations, broad discovery, concurrency, edge cases, or high risk."];
129
- readonly escalateWhen: ["Escalate discovery, coupling, edge cases, or higher risk to deep."];
130
- readonly toolGovernance: ["edits only bounded targets", "escalates when discovery or correctness risk exceeds the assignment", "does not delegate further"];
131
- readonly verification: ["runs the smallest sufficient focused check"];
132
- }, {
133
- readonly name: "deep";
135
+ readonly name: "worker";
134
136
  readonly mode: "write-capable";
135
- readonly dispatch: "synchronous-task-only";
137
+ readonly dispatch: "task";
136
138
  readonly canMutateWorkspace: true;
137
- readonly scope: "correctness-critical implementation and verification";
138
- readonly responsibility: "Handle multi-file, edge-case-heavy, or high-risk implementation with full local context.";
139
- readonly useWhen: ["Implementation is multi-file, edge-case-heavy, migration, concurrency, shared-contract, or high-risk."];
140
- readonly doNotUseWhen: ["Not for visual-only work or narrow known low-risk edits."];
139
+ readonly scope: "bounded nonvisual implementation and verification";
140
+ readonly responsibility: "Handle bounded nonvisual implementation with full local context, including exact low-risk edits and correctness-critical, multi-file, edge-case-heavy, or high-risk work.";
141
+ readonly useWhen: ["Known bounded nonvisual implementation is ready, regardless of complexity; root direct work is limited to the bounded implementation-ownership exceptions.", "Correctness-critical work may be multi-file, edge-case-heavy, migration, concurrency, shared-contract, or high-risk."];
142
+ readonly doNotUseWhen: ["Not for visual-only work, reviewed commits, or work explicitly retained by the user in root."];
141
143
  readonly escalateWhen: ["Return product or architecture choices to root."];
142
144
  readonly toolGovernance: ["may edit implementation and tests within the assigned surface", "validates shared behavior against related code and call sites", "does not delegate further"];
143
145
  readonly verification: ["reports focused checks and relevant edge-case evidence"];
144
146
  }];
147
+ export declare function getImplementationOwnershipInstructions(policy: ImplementationOwnershipPolicy): string[];
145
148
  export declare const ORCHESTRATION_POLICY: OrchestrationPolicy;
146
- export declare const AGENT_RETURN_CONTRACT: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
149
+ export declare const AGENT_RETURN_CONTRACT: {
150
+ readonly orchestrator: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
151
+ readonly explorer: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions"];
152
+ readonly librarian: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions"];
153
+ readonly oracle: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
154
+ readonly designer: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
155
+ readonly worker: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
156
+ };
147
157
  export declare const VERIFICATION_PROTOCOL: readonly ["Completion reports identify changed files and verification evidence.", "Behavior changes receive the smallest sufficient automated check or a declared manual check.", "Visual changes receive designer-owned visual QA when applicable."];
148
158
  export declare const AGENT_PACK_CONTRACT: AgentPackContract;
149
159
  export declare function getAgentRole(name: AgentRoleName): AgentRoleContract;
@@ -21,8 +21,8 @@ export interface MemoryOrchestrationContract {
21
21
  provider: 'thoth-mem';
22
22
  providerOwnership: 'external';
23
23
  installedGuidance: 'thoth-mem skill';
24
- canonicalSddStore: 'openspec/';
25
- prohibitsSddArtifactMirroring: true;
24
+ canonicalWorkStore: '.thoth/';
25
+ prohibitsWorkArtifactMirroring: true;
26
26
  requiresParentAuthorization: true;
27
27
  rootLifecycleOwner: 'orchestrator';
28
28
  handoffOutcome: 'bounded-memory-contract';