thoth-agents 0.1.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 (128) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +339 -0
  3. package/dist/agents/deep.d.ts +2 -0
  4. package/dist/agents/designer.d.ts +2 -0
  5. package/dist/agents/explorer.d.ts +2 -0
  6. package/dist/agents/index.d.ts +8 -0
  7. package/dist/agents/librarian.d.ts +2 -0
  8. package/dist/agents/oracle.d.ts +2 -0
  9. package/dist/agents/orchestrator.d.ts +15 -0
  10. package/dist/agents/prompt-dialects.d.ts +28 -0
  11. package/dist/agents/prompt-sections.d.ts +47 -0
  12. package/dist/agents/prompt-utils.d.ts +25 -0
  13. package/dist/agents/quick.d.ts +2 -0
  14. package/dist/cli/codex-config-io.d.ts +31 -0
  15. package/dist/cli/codex-install.d.ts +41 -0
  16. package/dist/cli/codex-paths.d.ts +29 -0
  17. package/dist/cli/config-io.d.ts +22 -0
  18. package/dist/cli/config-manager.d.ts +4 -0
  19. package/dist/cli/custom-skills.d.ts +48 -0
  20. package/dist/cli/index.d.ts +3 -0
  21. package/dist/cli/index.js +4579 -0
  22. package/dist/cli/install.d.ts +3 -0
  23. package/dist/cli/model-key-normalization.d.ts +1 -0
  24. package/dist/cli/paths.d.ts +21 -0
  25. package/dist/cli/providers.d.ts +120 -0
  26. package/dist/cli/skill-manifest.d.ts +32 -0
  27. package/dist/cli/skills.d.ts +26 -0
  28. package/dist/cli/system.d.ts +6 -0
  29. package/dist/cli/types.d.ts +58 -0
  30. package/dist/config/constants.d.ts +17 -0
  31. package/dist/config/index.d.ts +5 -0
  32. package/dist/config/loader.d.ts +33 -0
  33. package/dist/config/schema.d.ts +279 -0
  34. package/dist/config/utils.d.ts +10 -0
  35. package/dist/delegation/project-id.d.ts +10 -0
  36. package/dist/delegation/types.d.ts +39 -0
  37. package/dist/harness/adapters/codex-surfaces.d.ts +219 -0
  38. package/dist/harness/adapters/codex.d.ts +8 -0
  39. package/dist/harness/adapters/opencode.d.ts +10 -0
  40. package/dist/harness/codex-plugin-paths.d.ts +1 -0
  41. package/dist/harness/core/agent-pack.d.ts +88 -0
  42. package/dist/harness/core/memory-governance.d.ts +33 -0
  43. package/dist/harness/core/sdd.d.ts +100 -0
  44. package/dist/harness/core/skills.d.ts +183 -0
  45. package/dist/harness/generate-codex-plugin.d.ts +9 -0
  46. package/dist/harness/registry.d.ts +6 -0
  47. package/dist/harness/types.d.ts +85 -0
  48. package/dist/harness/writers/codex-plugin-package.d.ts +26 -0
  49. package/dist/harness/writers/codex-toml.d.ts +10 -0
  50. package/dist/harness/writers/skill-layout.d.ts +15 -0
  51. package/dist/hooks/auto-update-checker/cache.d.ts +7 -0
  52. package/dist/hooks/auto-update-checker/checker.d.ts +28 -0
  53. package/dist/hooks/auto-update-checker/constants.d.ts +11 -0
  54. package/dist/hooks/auto-update-checker/index.d.ts +18 -0
  55. package/dist/hooks/auto-update-checker/types.d.ts +23 -0
  56. package/dist/hooks/chat-headers.d.ts +16 -0
  57. package/dist/hooks/delegate-task-retry/guidance.d.ts +2 -0
  58. package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
  59. package/dist/hooks/delegate-task-retry/index.d.ts +4 -0
  60. package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
  61. package/dist/hooks/foreground-fallback/index.d.ts +73 -0
  62. package/dist/hooks/index.d.ts +10 -0
  63. package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
  64. package/dist/hooks/json-error-recovery/index.d.ts +1 -0
  65. package/dist/hooks/phase-reminder/index.d.ts +26 -0
  66. package/dist/hooks/post-read-nudge/index.d.ts +18 -0
  67. package/dist/hooks/skill-sync.d.ts +10 -0
  68. package/dist/hooks/thoth-mem/index.d.ts +46 -0
  69. package/dist/hooks/thoth-mem/protocol.d.ts +7 -0
  70. package/dist/index.d.ts +5 -0
  71. package/dist/index.js +6509 -0
  72. package/dist/mcp/context7.d.ts +7 -0
  73. package/dist/mcp/exa.d.ts +6 -0
  74. package/dist/mcp/grep-app.d.ts +7 -0
  75. package/dist/mcp/index.d.ts +7 -0
  76. package/dist/mcp/thoth.d.ts +3 -0
  77. package/dist/mcp/types.d.ts +12 -0
  78. package/dist/sdd/artifact-governance/artifact-loader.d.ts +55 -0
  79. package/dist/sdd/artifact-governance/index.d.ts +6 -0
  80. package/dist/sdd/artifact-governance/tasks-validator.d.ts +17 -0
  81. package/dist/sdd/artifact-governance/types.d.ts +52 -0
  82. package/dist/thoth/client.d.ts +14 -0
  83. package/dist/thoth/index.d.ts +2 -0
  84. package/dist/tools/ast-grep/cli.d.ts +15 -0
  85. package/dist/tools/ast-grep/constants.d.ts +25 -0
  86. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  87. package/dist/tools/ast-grep/index.d.ts +10 -0
  88. package/dist/tools/ast-grep/tools.d.ts +3 -0
  89. package/dist/tools/ast-grep/types.d.ts +30 -0
  90. package/dist/tools/ast-grep/utils.d.ts +4 -0
  91. package/dist/tools/index.d.ts +2 -0
  92. package/dist/tools/lsp/client.d.ts +42 -0
  93. package/dist/tools/lsp/config-store.d.ts +29 -0
  94. package/dist/tools/lsp/config.d.ts +4 -0
  95. package/dist/tools/lsp/constants.d.ts +25 -0
  96. package/dist/tools/lsp/index.d.ts +4 -0
  97. package/dist/tools/lsp/tools.d.ts +5 -0
  98. package/dist/tools/lsp/types.d.ts +35 -0
  99. package/dist/tools/lsp/utils.d.ts +34 -0
  100. package/dist/utils/agent-variant.d.ts +47 -0
  101. package/dist/utils/env.d.ts +1 -0
  102. package/dist/utils/file-io.d.ts +3 -0
  103. package/dist/utils/frontmatter-yaml.d.ts +4 -0
  104. package/dist/utils/index.d.ts +7 -0
  105. package/dist/utils/internal-initiator.d.ts +6 -0
  106. package/dist/utils/logger.d.ts +1 -0
  107. package/dist/utils/polling.d.ts +21 -0
  108. package/dist/utils/subprocess.d.ts +24 -0
  109. package/dist/utils/tmux-session-manager.d.ts +63 -0
  110. package/dist/utils/tmux.d.ts +32 -0
  111. package/dist/utils/zip-extractor.d.ts +1 -0
  112. package/package.json +81 -0
  113. package/src/skills/_shared/openspec-convention.md +131 -0
  114. package/src/skills/_shared/persistence-contract.md +162 -0
  115. package/src/skills/_shared/thoth-mem-convention.md +124 -0
  116. package/src/skills/executing-plans/SKILL.md +245 -0
  117. package/src/skills/plan-reviewer/SKILL.md +115 -0
  118. package/src/skills/requirements-interview/SKILL.md +212 -0
  119. package/src/skills/sdd-apply/SKILL.md +89 -0
  120. package/src/skills/sdd-archive/SKILL.md +87 -0
  121. package/src/skills/sdd-design/SKILL.md +92 -0
  122. package/src/skills/sdd-init/SKILL.md +148 -0
  123. package/src/skills/sdd-propose/SKILL.md +89 -0
  124. package/src/skills/sdd-spec/SKILL.md +93 -0
  125. package/src/skills/sdd-tasks/SKILL.md +142 -0
  126. package/src/skills/sdd-verify/SKILL.md +99 -0
  127. package/src/skills/thoth-mem-agents/SKILL.md +355 -0
  128. package/thoth-agents.schema.json +470 -0
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: sdd-verify
3
+ description: Verify implementation against specs and persist a compliance report.
4
+ ---
5
+
6
+ # SDD Verify Skill
7
+
8
+ Act as the quality gate for a change by turning specs and test evidence into a
9
+ verification report.
10
+
11
+ ## Shared Conventions
12
+
13
+ - [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
14
+ - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
15
+ - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
16
+
17
+ ## Persistence Mode
18
+
19
+ The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
20
+ `hybrid`). Follow the persistence contract for read/write rules per mode.
21
+
22
+ - `thoth-mem`: persist to thoth-mem only — do NOT create or modify
23
+ `openspec/` files.
24
+ - `openspec`: write files only — do NOT call thoth-mem save tools.
25
+ - `hybrid`: persist to both (default).
26
+
27
+ ## When to Use
28
+
29
+ - Implementation work is complete enough to validate
30
+ - A prior verification report must be refreshed after more code changes
31
+
32
+ ## Prerequisites
33
+
34
+ - `change-name`
35
+ - Tasks artifact
36
+ - `pipeline-type` (`accelerated` or `full`)
37
+ - Spec artifact (full pipeline only)
38
+ - Design artifact (full pipeline only)
39
+ - Proposal artifact (accelerated pipeline — used as the verification reference)
40
+ - Ability to run the relevant checks or tests
41
+
42
+ ## Workflow
43
+
44
+ 1. Read the shared conventions.
45
+ 2. Recover artifacts with the retrieval protocol in
46
+ the persistence contract:
47
+ - **Always**: recover `tasks`
48
+ - **Full pipeline**: recover `spec` and `design`
49
+ - **Accelerated pipeline**: recover `proposal` (used as the verification reference)
50
+ 3. Optionally recover `apply-progress` with the same mode-aware rules if it
51
+ exists and helps explain task coverage.
52
+ 4. Read the changed code and run the required verification commands.
53
+ 5. If the selected mode includes OpenSpec, create
54
+ `openspec/changes/{change-name}/verify-report.md` with at least:
55
+
56
+ In `thoth-mem` mode, produce the same report content without creating the
57
+ file:
58
+
59
+ ```md
60
+ # Verification Report: {Change Title}
61
+
62
+ ## Completeness
63
+ ## Build and Test Evidence
64
+ ## Compliance Matrix
65
+ <!-- Full pipeline: map Given/When/Then scenarios from spec -->
66
+ <!-- Accelerated pipeline: map success criteria from proposal -->
67
+ ## Design Coherence (full pipeline only)
68
+ ## Issues Found
69
+ ## Verdict
70
+ ```
71
+
72
+ 6. Build a compliance matrix: in full pipeline, map each Given/When/Then
73
+ scenario to evidence; in accelerated pipeline, map each proposal success
74
+ criterion to evidence.
75
+ 7. If the selected mode includes thoth-mem, persist the report with:
76
+
77
+ Use the memory tool binding for `mem_save` with the canonical SDD topic key
78
+ and required metadata fields: `title`, `topic_key`, `type`, `project`,
79
+ `scope`, and `content`.
80
+
81
+ ## Output Format
82
+
83
+ Return:
84
+
85
+ - `Change`
86
+ - `Artifact`: `openspec/changes/{change-name}/verify-report.md`
87
+ - `Topic Key`: `sdd/{change-name}/verify-report`
88
+ - `Verdict`: pass, pass with warnings, or fail
89
+ - `Compliance Summary`: compliant vs total scenarios
90
+ - `Critical Issues`: bullets or `None`
91
+
92
+ ## Rules
93
+
94
+ - Verification requires real evidence, not only static inspection.
95
+ - Every acceptance criterion must appear in the compliance matrix: spec
96
+ scenarios in full pipeline, proposal success criteria in accelerated pipeline.
97
+ - Distinguish blockers from warnings clearly.
98
+ - Do not fix issues inside this phase; report them.
99
+ - Recover full artifacts with the protocol in the persistence contract.
@@ -0,0 +1,355 @@
1
+ ---
2
+ name: thoth-mem-agents
3
+ description: Mandatory thoth-mem workflow contract for orchestrator/subagent memory ownership, parent session_id/project dispatch, prompt-save prohibitions, project-scoped read tools, session-summary ownership, and durable observation rules. Use whenever work mentions thoth-mem, persistent memory, orchestrator/subagents, session_id, project, saved prompts, session summaries, or project-level memory context.
4
+ metadata:
5
+ author: thoth-agents
6
+ version: '1.0'
7
+ ---
8
+
9
+ # thoth-mem Agents Skill
10
+
11
+ Use this skill whenever memory work crosses the orchestrator/subagent boundary.
12
+ Its job is to prevent silent ownership bugs such as prompt pollution,
13
+ implicit `manual-save-{project}` sessions, or subagents writing session-level
14
+ artifacts that belong to the orchestrator.
15
+
16
+ ## Shared References
17
+
18
+ Read these first instead of re-inventing conventions:
19
+
20
+ - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
21
+ - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
22
+
23
+ This skill ADDS the orchestrator/subagent split that those files imply. Do not
24
+ duplicate their SDD persistence details unless needed to make a decision.
25
+
26
+ Adapter bindings may differ, but the same semantic ownership boundaries must
27
+ hold.
28
+
29
+ ## Hard Ownership Split
30
+
31
+ ### Root/main orchestrator identity
32
+
33
+ The current root/main agent owns root/main orchestrator-owned tools and responsibilities
34
+ for the session. In harnesses where the initial agent is not named
35
+ `orchestrator`, all "orchestrator-only", "root-only", and
36
+ "orchestrator-owned" rules still apply to that initial/root agent.
37
+
38
+ ### New Root Session Bootstrap
39
+
40
+ At the start of every new root session, when thoth-mem tools are available, the
41
+ root/main orchestrator MUST:
42
+
43
+ 1. Load `thoth-mem-agents` and `requirements-interview`.
44
+ 2. Call `mem_session_start` with the active project and session identity.
45
+ 3. Save the real user prompt with `mem_save_prompt`.
46
+
47
+ In prose: call `mem_session_start` before delegation, then save the real user prompt with `mem_save_prompt`.
48
+
49
+ Only save real user prompts with `mem_save_prompt`. Never save generated
50
+ subagent prompts, internal handoffs, tool scaffolding, summaries, or delegated
51
+ task text as user intent.
52
+
53
+ If thoth-mem tools or required project/session identity are unavailable, state
54
+ that memory bootstrap could not run and continue without claiming memory was
55
+ saved.
56
+
57
+ ### Orchestrator-only tools
58
+
59
+ ONLY the root/main orchestrator owns these tools:
60
+
61
+ - `mem_session_start`
62
+ - `mem_session_summary`
63
+ - `mem_save_prompt`
64
+
65
+ Subagents MUST NOT call them.
66
+
67
+ If the active harness cannot hard-enforce this ownership split, treat it as
68
+ instruction-level governance and disclose that limitation when reporting
69
+ memory-governance status. Lack of hard enforcement is not permission for a
70
+ subagent to create sessions, close sessions, or save prompts.
71
+
72
+ Why:
73
+
74
+ - `mem_session_start` defines the session boundary.
75
+ - `mem_session_summary` closes or repairs that boundary.
76
+ - `mem_save_prompt` is only valid for real user requests, and subagent prompts
77
+ are orchestration artifacts, not user intent.
78
+
79
+ ## Root Memory Protocol
80
+
81
+ ### Durable Saves
82
+
83
+ The root/main orchestrator should call `mem_save` after durable work or
84
+ decisions, including:
85
+
86
+ - architecture, design, or workflow decisions
87
+ - accepted or rejected recommendations
88
+ - bug fixes with root cause
89
+ - non-obvious discoveries, gotchas, or edge cases
90
+ - configuration changes or environment setup
91
+ - reusable patterns or conventions
92
+ - durable user preferences or constraints
93
+
94
+ Use stable topic keys for evolving topics. If unsure, call
95
+ `mem_suggest_topic_key` before saving. Keep the observation content structured:
96
+
97
+ ```text
98
+ What: concise description
99
+ Why: reason or problem solved
100
+ Where: files, paths, systems, or artifacts
101
+ Learned: edge cases, caveats, or follow-up notes
102
+ ```
103
+
104
+ Do not claim memory was saved unless the tool call succeeded.
105
+
106
+ ### Recall
107
+
108
+ Broad recovery at root session start or after compaction may use the root-owned
109
+ recent-session overview tools when available. For precise retrieval, use
110
+ Targeted 3-layer recall:
111
+
112
+ 1. `mem_search` with compact results to scan IDs and titles.
113
+ 2. `mem_timeline` around promising observation IDs.
114
+ 3. `mem_get_observation` only for records needed in full.
115
+
116
+ Use preview search only when compact results are insufficient to disambiguate.
117
+
118
+ ### Session Close
119
+
120
+ Before ending the root session, the root/main orchestrator MUST call
121
+ `mem_session_summary` when the tool is available. Use a concise summary with:
122
+
123
+ - Goal
124
+ - Instructions
125
+ - Discoveries
126
+ - Accomplished
127
+ - Next Steps
128
+ - Relevant Files
129
+
130
+ If the summary cannot be saved, disclose that limitation rather than implying
131
+ the next session will recover it from memory.
132
+
133
+ ### After Compaction
134
+
135
+ After compaction, first preserve the compacted summary with
136
+ `mem_session_summary`, then recover recent context and use Targeted 3-layer
137
+ recall before continuing. Do not invent missing memory.
138
+
139
+ ### SDD Topic Keys
140
+
141
+ SDD artifacts saved to thoth-mem use deterministic topic keys:
142
+
143
+ `sdd/{change}/{artifact}`
144
+
145
+ Examples: `sdd/add-user-auth/spec`, `sdd/add-user-auth/design`,
146
+ `sdd/add-user-auth/tasks`.
147
+
148
+ Never reuse the `sdd/...` namespace for general durable observations.
149
+
150
+ ## Project-Scoped Read Tools
151
+
152
+ These tools are read/context only, not session-owned artifacts:
153
+
154
+ - `mem_project_summary`
155
+ - `mem_project_graph`
156
+ - `mem_topic_keys`
157
+
158
+ Use them only when the dispatch includes parent `session_id` and `project`,
159
+ and only for bounded project/topic context that helps before the usual
160
+ 3-layer recall.
161
+
162
+ Rules:
163
+
164
+ - Treat them as safer alternatives to broad session context for project-scoped
165
+ discovery.
166
+ - Keep them bounded with project/topic filters and explicit limits.
167
+ - Do not use them to create, close, or summarize sessions.
168
+ - Do not use them to save prompts or durable observations.
169
+
170
+ ## Prompt Saving Rule
171
+
172
+ - Never save a subagent prompt.
173
+ - Never ask a subagent to save its prompt.
174
+ - Treat the subagent prompt as generated execution scaffolding from the
175
+ orchestrator.
176
+
177
+ If a workflow says “save the prompt for future context,” that applies to the
178
+ root user conversation only.
179
+
180
+ ## Dispatch Contract
181
+
182
+ When a subagent is allowed to touch thoth-mem, the orchestrator MUST pass:
183
+
184
+ - parent `session_id`
185
+ - `project`
186
+ - any thoth-mem limits or ownership constraints relevant to the task
187
+
188
+ If a subagent does NOT receive both `session_id` and `project`, it MUST NOT call
189
+ any thoth-mem tool.
190
+
191
+ Reason: thoth-mem can create implicit fallback sessions such as
192
+ `manual-save-{project}`. That splits history away from the root workflow.
193
+
194
+ ## Capability Split by Agent Type
195
+
196
+ ### Read-only subagents
197
+
198
+ Semantic roles: explorer, librarian, oracle.
199
+
200
+ Allowed pattern only:
201
+
202
+ 1. `mem_search`
203
+ 2. `mem_timeline`
204
+ 3. `mem_get_observation`
205
+ 4. `mem_project_summary` when project overview is needed
206
+ 5. `mem_project_graph` when relationship/lineage investigation is needed
207
+ 6. `mem_topic_keys` when topic-key discovery or inspection is needed
208
+
209
+ Rules:
210
+
211
+ - Use the parent `session_id` and `project` from dispatch.
212
+ - Do not call `mem_save`, `mem_update`, `mem_session_start`,
213
+ `mem_session_summary`, or `mem_save_prompt`.
214
+ - Do not treat `mem_search` output as the artifact body.
215
+ - Keep project-scoped read tools bounded by project/topic filters and the task
216
+ scope.
217
+
218
+ ### Write-capable subagents
219
+
220
+ Semantic roles: deep, quick, designer.
221
+
222
+ Allowed thoth-mem behavior:
223
+
224
+ - same 3-layer recall as read-only agents when reading
225
+ - project-scoped read tools when a broader project/topic context is explicitly
226
+ needed
227
+ - `mem_save` for delegated durable observations that arise from their
228
+ implementation work
229
+
230
+ Rules:
231
+
232
+ - Use the parent `session_id` and `project` from dispatch on every thoth-mem
233
+ call.
234
+ - Do not call `mem_context`; writable subagents stay on the same bounded
235
+ 3-layer recall path, using project-scoped read tools only when explicitly
236
+ granted in dispatch.
237
+ - Never create or close sessions.
238
+ - Never save prompts.
239
+ - You do not own durable memory of your own. Any `mem_save` is a delegated
240
+ write under the orchestrator's session/project, not a subagent-owned
241
+ session.
242
+ - Save only durable information: decisions, bugfixes, patterns,
243
+ configuration changes, discoveries, and explicitly assigned SDD artifacts.
244
+
245
+ ## Memory Types and Topic Keys
246
+
247
+ Prefer stable, non-colliding topic keys.
248
+
249
+ ### General durable observations
250
+
251
+ Use keys outside the SDD namespace, for example:
252
+
253
+ - `decision/thoth-mem/subagent-ownership`
254
+ - `bugfix/thoth-mem/prompt-pollution`
255
+ - `pattern/thoth-mem/parent-session-dispatch`
256
+ - `config/thoth-mem/root-hook`
257
+ - `discovery/thoth-mem/manual-save-fallback`
258
+
259
+ ### SDD artifacts
260
+
261
+ Use the shared deterministic format from the convention files:
262
+
263
+ `sdd/{change}/{artifact}`
264
+
265
+ Never reuse the `sdd/...` namespace for general notes. That causes artifact
266
+ collisions and corrupts recovery assumptions.
267
+
268
+ ## Orchestrator Checklist
269
+
270
+ Before dispatching subagents in a thoth-mem workflow, verify all of this:
271
+
272
+ - `mem_session_start` has already run for the root session before any later
273
+ `mem_session_summary`.
274
+ - The dispatch includes parent `session_id` and `project`.
275
+ - The dispatch states whether the subagent may read memory only or may also
276
+ `mem_save` delegated observations under the parent session/project, and
277
+ whether project-scoped read tools (`mem_project_summary`, `mem_project_graph`,
278
+ `mem_topic_keys`) are allowed.
279
+ - The dispatch does NOT ask the subagent to save prompts.
280
+ - The dispatch does NOT ask the subagent to write session summaries.
281
+ - If the work is SDD-related, the dispatch preserves the shared topic-key rules
282
+ and avoids collisions with `sdd/{change}/{artifact}`.
283
+ - The dispatch identifies the active binding surface when it matters for tool
284
+ names or enforcement. Explicitly note when memory ownership and tool-boundary
285
+ controls are instruction-level rather than runtime-enforced.
286
+
287
+ ## Anti-Patterns
288
+
289
+ Reject these patterns immediately:
290
+
291
+ - Subagent calls `mem_save_prompt`.
292
+ - Subagent calls `mem_session_start` or `mem_session_summary`.
293
+ - Subagent uses thoth-mem without parent `session_id` and `project`.
294
+ - Writable subagent calls `mem_context` instead of the bounded 3-layer recall.
295
+ - Subagent uses project-scoped read tools without explicit permission in the
296
+ dispatch.
297
+ - Read-only subagent writes memory.
298
+ - General observation saved under `sdd/...`.
299
+ - Orchestrator asks a subagent to “remember this user request” by saving the
300
+ generated dispatch prompt.
301
+ - A harness-specific tool alias is treated as permission to bypass the
302
+ orchestrator/subagent ownership split.
303
+
304
+ ## Dispatch Examples
305
+
306
+ ### Correct
307
+
308
+ ```text
309
+ Load skill thoth-mem-agents and follow it.
310
+ Parent session_id: ses_root_123
311
+ Project: thoth-agents
312
+ Memory limits: read-only recall only; do not write memory.
313
+ Task: inspect prior thoth-mem ownership decisions for the hook redesign.
314
+ ```
315
+
316
+ ```text
317
+ Load skill thoth-mem-agents and follow it.
318
+ Parent session_id: ses_root_123
319
+ Project: thoth-agents
320
+ Memory limits: you may mem_save durable implementation observations, but never
321
+ save prompts or call session tools.
322
+ Task: implement the prompt ownership fix and persist any durable bugfix notes.
323
+ ```
324
+
325
+ ### Incorrect
326
+
327
+ ```text
328
+ Check memory and save your prompt for traceability.
329
+ ```
330
+
331
+ Why wrong: no parent `session_id`/`project`, and it asks the subagent to save a
332
+ generated prompt.
333
+
334
+ ```text
335
+ Use mem_session_summary when done so we keep the session updated.
336
+ ```
337
+
338
+ Why wrong: session summaries are orchestrator-owned.
339
+
340
+ ## Response Standard
341
+
342
+ When you apply this skill, be explicit about:
343
+
344
+ - which agent owns the memory operation
345
+ - which thoth-mem tools are allowed for this task
346
+ - whether parent `session_id` and `project` were provided
347
+ - whether project-scoped read tools are allowed and which ones
348
+ - whether a proposed topic key is safe or collides with `sdd/...`
349
+ - which binding surface is active when the distinction affects tool names,
350
+ role invocation, or enforcement
351
+ - whether any governance rule is instruction-level because the harness cannot
352
+ hard-enforce the boundary
353
+
354
+ If any of those are missing, stop using thoth-mem and continue only with local
355
+ context unless the orchestrator provides the missing ownership data.