thoth-agents 0.2.11 → 0.3.1

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 (149) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +21 -0
  3. package/README.md +301 -311
  4. package/dist/agents/configured-role-prompt.d.ts +9 -0
  5. package/dist/agents/prompt-sections.d.ts +8 -4
  6. package/dist/agents/prompt-utils.d.ts +0 -4
  7. package/dist/{chunk-ASKXWU6E.js → chunk-2MZ5C2RN.js} +1078 -1725
  8. package/dist/chunk-XO74DXBZ.js +1781 -0
  9. package/dist/{chunk-6BNAV534.js → chunk-YUCGIJPP.js} +12 -30
  10. package/dist/cli/claude-code-install.d.ts +24 -26
  11. package/dist/cli/claude-code-paths.d.ts +0 -28
  12. package/dist/cli/codex-install.d.ts +2 -2
  13. package/dist/cli/codex-paths.d.ts +0 -2
  14. package/dist/cli/index.js +279 -119
  15. package/dist/cli/install.d.ts +5 -1
  16. package/dist/cli/model-catalog/cache.d.ts +1 -1
  17. package/dist/cli/operations/claude-code.d.ts +6 -3
  18. package/dist/cli/operations/codex.d.ts +2 -1
  19. package/dist/cli/operations/opencode.d.ts +2 -1
  20. package/dist/cli/operations/types.d.ts +9 -1
  21. package/dist/cli/package-root.d.ts +1 -0
  22. package/dist/cli/providers.d.ts +6 -116
  23. package/dist/cli/skills.d.ts +19 -32
  24. package/dist/cli/thoth-mem-install.d.ts +45 -0
  25. package/dist/cli/tui/components/StatusView.d.ts +12 -1
  26. package/dist/cli/tui/index.js +256 -142
  27. package/dist/cli/tui/operations.d.ts +4 -3
  28. package/dist/cli/types.d.ts +0 -10
  29. package/dist/config/constants.d.ts +20 -16
  30. package/dist/config/index.d.ts +0 -1
  31. package/dist/config/loader.d.ts +1 -1
  32. package/dist/config/schema.d.ts +2 -38
  33. package/dist/config/utils.d.ts +1 -2
  34. package/dist/harness/adapters/codex-surfaces.d.ts +3 -3
  35. package/dist/harness/core/agent-pack.d.ts +37 -29
  36. package/dist/harness/core/memory-governance.d.ts +24 -48
  37. package/dist/harness/core/sdd.d.ts +364 -131
  38. package/dist/harness/generate-integration-packages.d.ts +20 -0
  39. package/dist/harness/opencode-init-command.d.ts +11 -0
  40. package/dist/harness/types.d.ts +14 -1
  41. package/dist/harness/writers/claude-code-subagent.d.ts +3 -1
  42. package/dist/hooks/index.d.ts +0 -5
  43. package/dist/index.js +562 -1314
  44. package/dist/mcp/index.d.ts +1 -2
  45. package/package.json +17 -12
  46. package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +50 -0
  47. package/plugin/.claude-plugin/plugin.json +8 -0
  48. package/plugin/.codex-plugin/.thoth-agents-plugin-assets.json +16 -0
  49. package/plugin/.codex-plugin/plugin.json +7 -0
  50. package/plugin/.mcp.json +19 -0
  51. package/plugin/agents/deep.md +89 -0
  52. package/plugin/agents/designer.md +89 -0
  53. package/plugin/agents/explorer.md +90 -0
  54. package/plugin/agents/librarian.md +90 -0
  55. package/plugin/agents/oracle.md +92 -0
  56. package/plugin/agents/orchestrator.md +128 -0
  57. package/plugin/agents/quick.md +89 -0
  58. package/plugin/codex.mcp.json +17 -0
  59. package/plugin/settings.json +3 -0
  60. package/plugin/skills/thoth-archive/SKILL.md +40 -0
  61. package/plugin/skills/thoth-archive/scripts/archive.mjs +748 -0
  62. package/plugin/skills/thoth-constitution/SKILL.md +45 -0
  63. package/plugin/skills/thoth-constitution/scripts/validate.mjs +167 -0
  64. package/plugin/skills/thoth-constitution/templates/constitution.md +54 -0
  65. package/plugin/skills/thoth-init/SKILL.md +30 -0
  66. package/plugin/skills/thoth-init/scripts/init.mjs +141 -0
  67. package/plugin/skills/thoth-sdd/SKILL.md +83 -0
  68. package/plugin/skills/thoth-sdd/references/phases/analyze.md +21 -0
  69. package/plugin/skills/thoth-sdd/references/phases/checklist.md +20 -0
  70. package/plugin/skills/thoth-sdd/references/phases/clarify.md +15 -0
  71. package/plugin/skills/thoth-sdd/references/phases/converge.md +14 -0
  72. package/plugin/skills/thoth-sdd/references/phases/explore.md +10 -0
  73. package/plugin/skills/thoth-sdd/references/phases/implement.md +19 -0
  74. package/plugin/skills/thoth-sdd/references/phases/plan.md +15 -0
  75. package/plugin/skills/thoth-sdd/references/phases/specify.md +21 -0
  76. package/plugin/skills/thoth-sdd/references/phases/tasks.md +20 -0
  77. package/plugin/skills/thoth-sdd/references/phases/verify.md +22 -0
  78. package/plugin/skills/thoth-sdd/scripts/validate.mjs +1117 -0
  79. package/plugin/skills/thoth-sdd/templates/archive-report.md +25 -0
  80. package/plugin/skills/thoth-sdd/templates/checklist.md +27 -0
  81. package/plugin/skills/thoth-sdd/templates/plan.md +38 -0
  82. package/plugin/skills/thoth-sdd/templates/spec.md +54 -0
  83. package/plugin/skills/thoth-sdd/templates/tasks.md +29 -0
  84. package/plugin/skills/thoth-sdd/templates/verify-report.md +28 -0
  85. package/skills/README.md +12 -0
  86. package/skills/thoth-archive/SKILL.md +40 -0
  87. package/skills/thoth-archive/scripts/archive.mjs +748 -0
  88. package/skills/thoth-constitution/SKILL.md +45 -0
  89. package/skills/thoth-constitution/scripts/validate.mjs +167 -0
  90. package/skills/thoth-constitution/templates/constitution.md +54 -0
  91. package/skills/thoth-init/SKILL.md +30 -0
  92. package/skills/thoth-init/scripts/init.mjs +141 -0
  93. package/skills/thoth-sdd/SKILL.md +83 -0
  94. package/skills/thoth-sdd/references/phases/analyze.md +21 -0
  95. package/skills/thoth-sdd/references/phases/checklist.md +20 -0
  96. package/skills/thoth-sdd/references/phases/clarify.md +15 -0
  97. package/skills/thoth-sdd/references/phases/converge.md +14 -0
  98. package/skills/thoth-sdd/references/phases/explore.md +10 -0
  99. package/skills/thoth-sdd/references/phases/implement.md +19 -0
  100. package/skills/thoth-sdd/references/phases/plan.md +15 -0
  101. package/skills/thoth-sdd/references/phases/specify.md +21 -0
  102. package/skills/thoth-sdd/references/phases/tasks.md +20 -0
  103. package/skills/thoth-sdd/references/phases/verify.md +22 -0
  104. package/skills/thoth-sdd/scripts/validate.mjs +1117 -0
  105. package/skills/thoth-sdd/templates/archive-report.md +25 -0
  106. package/skills/thoth-sdd/templates/checklist.md +27 -0
  107. package/skills/thoth-sdd/templates/plan.md +38 -0
  108. package/skills/thoth-sdd/templates/spec.md +54 -0
  109. package/skills/thoth-sdd/templates/tasks.md +29 -0
  110. package/skills/thoth-sdd/templates/verify-report.md +28 -0
  111. package/thoth-agents.schema.json +0 -39
  112. package/dist/chunk-OZE7JVGS.js +0 -2344
  113. package/dist/cli/custom-skills.d.ts +0 -49
  114. package/dist/cli/skill-manifest.d.ts +0 -32
  115. package/dist/harness/core/skills.d.ts +0 -211
  116. package/dist/harness/generate-codex-plugin.d.ts +0 -9
  117. package/dist/harness/writers/claude-code-skill-layout.d.ts +0 -16
  118. package/dist/harness/writers/fs-skill-collect.d.ts +0 -7
  119. package/dist/harness/writers/skill-layout.d.ts +0 -16
  120. package/dist/hooks/chat-headers.d.ts +0 -16
  121. package/dist/hooks/phase-reminder/index.d.ts +0 -28
  122. package/dist/hooks/post-read-nudge/index.d.ts +0 -18
  123. package/dist/hooks/skill-sync.d.ts +0 -10
  124. package/dist/hooks/thoth-mem/index.d.ts +0 -46
  125. package/dist/hooks/thoth-mem/protocol.d.ts +0 -7
  126. package/dist/mcp/thoth.d.ts +0 -3
  127. package/dist/sdd/artifact-governance/artifact-loader.d.ts +0 -130
  128. package/dist/sdd/artifact-governance/index.d.ts +0 -6
  129. package/dist/sdd/artifact-governance/tasks-validator.d.ts +0 -17
  130. package/dist/sdd/artifact-governance/types.d.ts +0 -52
  131. package/dist/thoth/client.d.ts +0 -14
  132. package/dist/thoth/index.d.ts +0 -2
  133. package/src/skills/_shared/openspec-convention.md +0 -350
  134. package/src/skills/_shared/persistence-contract.md +0 -163
  135. package/src/skills/_shared/thoth-mem-convention.md +0 -123
  136. package/src/skills/executing-plans/SKILL.md +0 -288
  137. package/src/skills/plan-reviewer/SKILL.md +0 -219
  138. package/src/skills/requirements-interview/SKILL.md +0 -233
  139. package/src/skills/sdd-apply/SKILL.md +0 -89
  140. package/src/skills/sdd-archive/SKILL.md +0 -92
  141. package/src/skills/sdd-clarify/SKILL.md +0 -105
  142. package/src/skills/sdd-constitution/SKILL.md +0 -107
  143. package/src/skills/sdd-design/SKILL.md +0 -155
  144. package/src/skills/sdd-init/SKILL.md +0 -233
  145. package/src/skills/sdd-propose/SKILL.md +0 -101
  146. package/src/skills/sdd-spec/SKILL.md +0 -136
  147. package/src/skills/sdd-tasks/SKILL.md +0 -232
  148. package/src/skills/sdd-verify/SKILL.md +0 -131
  149. package/src/skills/thoth-mem-agents/SKILL.md +0 -210
@@ -101,11 +101,11 @@ export declare const PresetSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
101
101
  }, z.core.$strip>>;
102
102
  export type Preset = z.infer<typeof PresetSchema>;
103
103
  export declare const AgentNameSchema: z.ZodEnum<{
104
- explorer: "explorer";
105
- designer: "designer";
106
104
  orchestrator: "orchestrator";
105
+ explorer: "explorer";
107
106
  librarian: "librarian";
108
107
  oracle: "oracle";
108
+ designer: "designer";
109
109
  quick: "quick";
110
110
  deep: "deep";
111
111
  }>;
@@ -113,30 +113,8 @@ export declare const McpNameSchema: z.ZodEnum<{
113
113
  exa: "exa";
114
114
  context7: "context7";
115
115
  grep_app: "grep_app";
116
- thoth_mem: "thoth_mem";
117
116
  }>;
118
117
  export type McpName = string;
119
- export declare const ThothConfigSchema: z.ZodObject<{
120
- command: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
- data_dir: z.ZodOptional<z.ZodString>;
122
- environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
123
- timeout: z.ZodOptional<z.ZodNumber>;
124
- http_port: z.ZodOptional<z.ZodNumber>;
125
- }, z.core.$strip>;
126
- export type ThothConfig = z.infer<typeof ThothConfigSchema>;
127
- export declare const ArtifactStoreModeSchema: z.ZodEnum<{
128
- "thoth-mem": "thoth-mem";
129
- openspec: "openspec";
130
- hybrid: "hybrid";
131
- }>;
132
- export declare const ArtifactStoreConfigSchema: z.ZodObject<{
133
- mode: z.ZodDefault<z.ZodEnum<{
134
- "thoth-mem": "thoth-mem";
135
- openspec: "openspec";
136
- hybrid: "hybrid";
137
- }>>;
138
- }, z.core.$strip>;
139
- export type ArtifactStoreConfig = z.infer<typeof ArtifactStoreConfigSchema>;
140
118
  export declare const CodexGenerationConfigSchema: z.ZodObject<{
141
119
  enabled: z.ZodDefault<z.ZodBoolean>;
142
120
  outputRoot: z.ZodOptional<z.ZodString>;
@@ -262,20 +240,6 @@ export declare const PluginConfigSchema: z.ZodObject<{
262
240
  deep: z.ZodOptional<z.ZodArray<z.ZodString>>;
263
241
  }, z.core.$catchall<z.ZodArray<z.ZodString>>>>;
264
242
  }, z.core.$strip>>;
265
- thoth: z.ZodOptional<z.ZodObject<{
266
- command: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
- data_dir: z.ZodOptional<z.ZodString>;
268
- environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
269
- timeout: z.ZodOptional<z.ZodNumber>;
270
- http_port: z.ZodOptional<z.ZodNumber>;
271
- }, z.core.$strip>>;
272
- artifactStore: z.ZodOptional<z.ZodObject<{
273
- mode: z.ZodDefault<z.ZodEnum<{
274
- "thoth-mem": "thoth-mem";
275
- openspec: "openspec";
276
- hybrid: "hybrid";
277
- }>>;
278
- }, z.core.$strip>>;
279
243
  codex: z.ZodOptional<z.ZodObject<{
280
244
  enabled: z.ZodDefault<z.ZodBoolean>;
281
245
  outputRoot: z.ZodOptional<z.ZodString>;
@@ -1,7 +1,6 @@
1
1
  import type { AgentOverrideConfig, PluginConfig } from './schema';
2
2
  /**
3
- * Get agent override config by name, supporting backward-compatible aliases.
4
- * Checks both the current name and any legacy alias names.
3
+ * Get an agent override by its canonical v0.3 role name.
5
4
  *
6
5
  * @param config - The plugin configuration
7
6
  * @param name - The current agent name
@@ -151,10 +151,10 @@ export declare const CODEX_SURFACES: readonly [{
151
151
  readonly target: "mcp-config";
152
152
  readonly status: "validated";
153
153
  readonly artifactKind: "mcp-config";
154
- readonly path: ".codex-plugin/.mcp.json";
155
- readonly fields: ["mcpServers", "./.mcp.json"];
154
+ readonly path: ".codex-plugin/codex.mcp.json";
155
+ readonly fields: ["mcpServers", "./codex.mcp.json"];
156
156
  readonly diagnosticCode: "codex.surface.plugin_mcp_json.validated";
157
- readonly summary: "Codex plugin packages can bundle MCP server definitions in plugin-root .mcp.json.";
157
+ readonly summary: "Codex plugin packages can reference bundled MCP server definitions from the plugin root.";
158
158
  readonly evidence: "OpenAI Codex plugin docs describe bundled .mcp.json server definitions referenced from plugin.json using plugin-root relative paths.";
159
159
  }, {
160
160
  readonly id: "inline-hooks";
@@ -1,5 +1,5 @@
1
1
  export type AgentRoleName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'quick' | 'deep';
2
- export type AgentMutationMode = 'primary-non-mutating' | 'read-only' | 'write-capable';
2
+ export type AgentMutationMode = 'adaptive-root' | 'read-only' | 'write-capable';
3
3
  export type AgentDispatchMethod = 'root-coordinator' | 'task' | 'synchronous-task-only';
4
4
  export interface AgentRoleContract {
5
5
  name: AgentRoleName;
@@ -8,50 +8,57 @@ export interface AgentRoleContract {
8
8
  canMutateWorkspace: boolean;
9
9
  scope: string;
10
10
  responsibility: string;
11
+ writeScope?: string[];
11
12
  toolGovernance: string[];
12
13
  verification: string[];
13
14
  }
15
+ export interface OrchestrationPolicy {
16
+ maxDelegationDepth: number;
17
+ singleWriter: boolean;
18
+ rules: string[];
19
+ }
14
20
  export interface AgentPackContract {
15
21
  roles: AgentRoleContract[];
16
- delegateFirstRules: string[];
22
+ orchestrationPolicy: OrchestrationPolicy;
23
+ returnContract: string[];
17
24
  verificationProtocol: string[];
18
25
  }
19
26
  export declare const AGENT_ROLE_NAMES: readonly ["orchestrator", "explorer", "librarian", "oracle", "designer", "quick", "deep"];
20
27
  export declare const AGENT_ROLES: readonly [{
21
28
  readonly name: "orchestrator";
22
- readonly mode: "primary-non-mutating";
29
+ readonly mode: "adaptive-root";
23
30
  readonly dispatch: "root-coordinator";
24
- readonly canMutateWorkspace: false;
25
- readonly scope: "coordination, routing, decisions, progress, and root memory";
26
- readonly responsibility: "Delegate-first coordinator for SDD workflow, specialist dispatch, and root-session memory ownership.";
27
- readonly toolGovernance: ["delegates inspection, writing, debugging, and verification", "owns question prompts and root-session memory", "does not perform inline workspace implementation"];
28
- readonly verification: ["routes verification to specialists", "summarizes evidence from changed files, diagnostics, and tests"];
31
+ readonly canMutateWorkspace: true;
32
+ readonly scope: "requirements, SDD coordination, routing, bounded direct work, decisions, and synthesis";
33
+ readonly responsibility: "Keep the task coherent, own sequential specification, planning, task, convergence, and archive coordination, act directly when work is clear and bounded, and delegate only for net gain.";
34
+ readonly toolGovernance: ["may inspect and edit bounded direct work, but every verification is delegated to oracle", "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"];
35
+ readonly verification: ["delegates analyze and every verify phase to oracle, including Direct and Accelerated routes", "consolidates summarized evidence returned by child agents"];
29
36
  }, {
30
37
  readonly name: "explorer";
31
38
  readonly mode: "read-only";
32
39
  readonly dispatch: "task";
33
40
  readonly canMutateWorkspace: false;
34
41
  readonly scope: "local repository discovery";
35
- readonly responsibility: "Find workspace facts fast and return paths, lines, symbols, constraints, edit targets, and conclusions.";
36
- readonly toolGovernance: ["read/search/code-navigation tools only", "no durable memory writes", "no task delegation or progress ownership"];
37
- readonly verification: ["reports confidence, anchors, unchecked areas, and gaps"];
42
+ readonly responsibility: "Resolve broad or uncertain repository questions and return distilled evidence.";
43
+ readonly toolGovernance: ["uses read, search, and code-navigation tools only", "does not mutate files or delegate further"];
44
+ readonly verification: ["reports inspected paths, confidence, and remaining gaps"];
38
45
  }, {
39
46
  readonly name: "librarian";
40
47
  readonly mode: "read-only";
41
48
  readonly dispatch: "task";
42
49
  readonly canMutateWorkspace: false;
43
- readonly scope: "external research plus local confirmation when needed";
44
- readonly responsibility: "Gather authoritative external evidence and distinguish official docs from examples.";
45
- readonly toolGovernance: ["research and read-only local confirmation tools", "no workspace mutation", "no durable memory writes"];
46
- readonly verification: ["sources every substantive external claim with a URL"];
50
+ readonly scope: "authoritative external research with local confirmation when needed";
51
+ readonly responsibility: "Gather current authoritative evidence and separate documented facts from inference.";
52
+ readonly toolGovernance: ["uses research and read-only local tools", "does not mutate files or delegate further"];
53
+ readonly verification: ["provides direct sources for substantive external claims"];
47
54
  }, {
48
55
  readonly name: "oracle";
49
56
  readonly mode: "read-only";
50
57
  readonly dispatch: "synchronous-task-only";
51
58
  readonly canMutateWorkspace: false;
52
- readonly scope: "advice, diagnosis, architecture, code review, and plan review";
53
- readonly responsibility: "Provide strategic technical guidance anchored to evidence and review SDD plans.";
54
- readonly toolGovernance: ["read-only analysis and review", "no implementation; may perform read-only SDD plan review and verification review, but does not persist artifacts", "no task delegation"];
59
+ readonly scope: "diagnosis, architecture, analysis, and independent verification";
60
+ readonly responsibility: "Independently analyze plans and perform every implementation verification, exposing correctness risks and judging whether results satisfy their contracts.";
61
+ 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"];
55
62
  readonly verification: ["separates observations, risks, and recommendations"];
56
63
  }, {
57
64
  readonly name: "designer";
@@ -59,30 +66,31 @@ export declare const AGENT_ROLES: readonly [{
59
66
  readonly dispatch: "synchronous-task-only";
60
67
  readonly canMutateWorkspace: true;
61
68
  readonly scope: "UI/UX decisions, implementation, and visual verification";
62
- readonly responsibility: "Own user-facing implementation choices and visual QA for UI work.";
63
- readonly toolGovernance: ["may edit focused UI/UX files", "owns screenshots and visual QA", "does not delegate or own SDD progress"];
64
- readonly verification: ["includes visual verification status when applicable"];
69
+ readonly responsibility: "Own user-facing implementation choices and visual quality for UI work.";
70
+ readonly toolGovernance: ["may edit focused UI/UX files", "owns screenshots and visual QA", "does not delegate further"];
71
+ readonly verification: ["includes visual verification when applicable"];
65
72
  }, {
66
73
  readonly name: "quick";
67
74
  readonly mode: "write-capable";
68
75
  readonly dispatch: "synchronous-task-only";
69
76
  readonly canMutateWorkspace: true;
70
77
  readonly scope: "fast bounded implementation";
71
- readonly responsibility: "Implement well-defined narrow or mechanical changes with focused verification.";
72
- readonly toolGovernance: ["may edit bounded targets", "does not perform broad rediscovery", "does not delegate or own SDD progress"];
78
+ readonly responsibility: "Implement narrow, clear, low-risk changes within an explicitly bounded surface.";
79
+ readonly toolGovernance: ["edits only bounded targets", "escalates when discovery or correctness risk exceeds the assignment", "does not delegate further"];
73
80
  readonly verification: ["runs the smallest sufficient focused check"];
74
81
  }, {
75
82
  readonly name: "deep";
76
83
  readonly mode: "write-capable";
77
84
  readonly dispatch: "synchronous-task-only";
78
85
  readonly canMutateWorkspace: true;
79
- readonly scope: "thorough implementation and verification";
80
- readonly responsibility: "Handle correctness-critical, multi-file, or edge-case-heavy changes with full local context analysis.";
81
- readonly toolGovernance: ["may edit implementation and tests", "validates shared behavior against related code and call sites", "does not delegate or own SDD progress"];
82
- readonly verification: ["does not skip verification and reports edge-case evidence"];
86
+ readonly scope: "correctness-critical implementation and verification";
87
+ readonly responsibility: "Handle multi-file, edge-case-heavy, or high-risk implementation with full local context.";
88
+ readonly toolGovernance: ["may edit implementation and tests within the assigned surface", "validates shared behavior against related code and call sites", "does not delegate further"];
89
+ readonly verification: ["reports focused checks and relevant edge-case evidence"];
83
90
  }];
84
- export declare const DELEGATE_FIRST_RULES: readonly ["The orchestrator coordinates, decides, asks blocking questions, and delegates evidence or action.", "Explorer, librarian, and oracle remain read-only specialists.", "Designer, quick, and deep are write-capable leaf agents with synchronous task dispatch.", "Subagents return findings, diffs, verification, and blockers rather than raw file dumps.", "No leaf agent owns SDD progress checkboxes or orchestrator-only memory."];
85
- export declare const VERIFICATION_PROTOCOL: readonly ["Completion reports include changed files and verification evidence.", "Behavior changes require the smallest sufficient automated check or an explicitly documented check.", "Visual changes require designer-owned visual QA when feasible."];
91
+ export declare const ORCHESTRATION_POLICY: OrchestrationPolicy;
92
+ export declare const AGENT_RETURN_CONTRACT: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
93
+ 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."];
86
94
  export declare const AGENT_PACK_CONTRACT: AgentPackContract;
87
95
  export declare function getAgentRole(name: AgentRoleName): AgentRoleContract;
88
96
  export declare function getAgentPackContract(): AgentPackContract;
@@ -1,67 +1,43 @@
1
1
  import type { HarnessPromptDialect } from '../../agents/prompt-dialects';
2
2
  import type { HarnessCapabilityStatus, HarnessDiagnostic } from '../types';
3
3
  import type { AgentRoleContract, AgentRoleName } from './agent-pack';
4
- export type MemoryToolName = 'mem_save' | 'mem_recall' | 'mem_context' | 'mem_get' | 'mem_project' | 'mem_session';
5
- export type MemSaveKind = 'observation' | 'prompt' | 'session_summary' | 'passive_learnings';
6
- export type MemSessionAction = 'start' | 'checkpoint' | 'summary';
7
- export type MemRecallMode = 'compact' | 'context';
8
- export type MemProjectAction = 'list' | 'summary' | 'graph' | 'topics' | 'topic';
9
- export type MemoryOperation = {
10
- tool: 'mem_session';
11
- action: MemSessionAction;
12
- } | {
13
- tool: 'mem_save';
14
- kind: MemSaveKind;
15
- } | {
16
- tool: 'mem_recall';
17
- mode: MemRecallMode;
18
- } | {
19
- tool: 'mem_get';
20
- includeTimeline?: boolean;
21
- } | {
22
- tool: 'mem_context';
23
- recallQuery?: boolean;
24
- } | {
25
- tool: 'mem_project';
26
- action: MemProjectAction;
27
- };
28
- export type RootOwnedMemoryOperation = {
29
- tool: 'mem_session';
30
- action: MemSessionAction;
31
- } | {
32
- tool: 'mem_save';
33
- kind: 'prompt' | 'session_summary';
34
- };
35
- export type MemoryRuntimeEnforcement = 'runtime' | 'instruction-only';
4
+ export type MemoryAuthorization = 'none' | 'recall' | 'observe';
5
+ export interface MemoryDispatchContract {
6
+ provider: 'thoth-mem';
7
+ project: string;
8
+ rootSessionId?: string;
9
+ authorization: MemoryAuthorization;
10
+ context?: string[];
11
+ }
36
12
  export interface RoleMemoryGovernance {
37
13
  role: AgentRoleName;
38
- rootOwnedOperations: RootOwnedMemoryOperation[];
39
- allowedTools: MemoryToolName[];
40
- forbiddenTools: MemoryToolName[];
14
+ workspaceMode: AgentRoleContract['mode'];
41
15
  requiresParentContext: boolean;
42
- mayReadProjectMemory: boolean;
43
- mayWriteDurableObservations: boolean;
44
- protectsSddNamespace: boolean;
16
+ availableAuthorizations: MemoryAuthorization[];
17
+ ownsRootLifecycle: boolean;
45
18
  rules: string[];
46
19
  }
47
- export interface MemoryGovernanceContract {
48
- rootOwnedOperations: RootOwnedMemoryOperation[];
49
- readRecallChain: MemoryOperation[];
50
- writeCapableDelegatedTools: MemoryToolName[];
51
- protectedTopicNamespaces: string[];
20
+ export interface MemoryOrchestrationContract {
21
+ provider: 'thoth-mem';
22
+ providerOwnership: 'external';
23
+ installedGuidance: 'thoth-mem skill';
24
+ canonicalSddStore: 'openspec/';
25
+ prohibitsSddArtifactMirroring: true;
26
+ requiresParentAuthorization: true;
27
+ rootLifecycleOwner: 'orchestrator';
28
+ handoffOutcome: 'bounded-memory-contract';
29
+ completionOutcome: 'provider-confirmed-semantic-summary';
30
+ prohibitsFalseSuccess: true;
31
+ prohibitsConsumerFallback: true;
52
32
  roles: RoleMemoryGovernance[];
53
33
  }
34
+ export type MemoryGovernanceContract = MemoryOrchestrationContract;
54
35
  export interface MemoryGovernanceDiagnosticInput {
55
36
  harness: string;
56
37
  permissionControls: HarnessCapabilityStatus;
57
38
  parentContextInjection: HarnessCapabilityStatus;
58
39
  memoryWriteControls: HarnessCapabilityStatus;
59
40
  }
60
- export declare const ROOT_OWNED_OPERATIONS: RootOwnedMemoryOperation[];
61
- export declare const READ_RECALL_CHAIN: MemoryOperation[];
62
- export declare const PARENT_SCOPED_READ_TOOLS: MemoryToolName[];
63
- export declare const WRITE_CAPABLE_DELEGATED_TOOLS: MemoryToolName[];
64
- export declare const ALL_MEMORY_TOOLS: MemoryToolName[];
65
41
  export declare function getRoleMemoryGovernance(role: AgentRoleContract): RoleMemoryGovernance;
66
42
  export declare function getMemoryGovernanceContract(roles: readonly AgentRoleContract[]): MemoryGovernanceContract;
67
43
  export declare function renderMemoryGovernanceInstructions(role: AgentRoleContract, dialect?: HarnessPromptDialect): string;