thoth-agents 0.1.11 → 0.1.16
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.
- package/README.md +7 -0
- package/dist/{chunk-A753XXHX.js → chunk-HFKZF2ZB.js} +29 -10
- package/dist/{chunk-R2AP6O5Q.js → chunk-XTLXC2CM.js} +249 -11
- package/dist/cli/index.js +2 -2
- package/dist/cli/tui/index.js +2 -2
- package/dist/harness/core/agent-pack.d.ts +1 -1
- package/dist/harness/core/memory-governance.d.ts +1 -1
- package/dist/harness/core/sdd.d.ts +58 -16
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/skills/_shared/openspec-convention.md +5 -0
- package/src/skills/_shared/persistence-contract.md +71 -76
- package/src/skills/_shared/thoth-mem-convention.md +41 -44
- package/src/skills/executing-plans/SKILL.md +9 -3
- package/src/skills/plan-reviewer/SKILL.md +8 -0
- package/src/skills/requirements-interview/SKILL.md +21 -8
- package/src/skills/sdd-propose/SKILL.md +16 -4
- package/src/skills/sdd-tasks/SKILL.md +6 -0
- package/src/skills/thoth-mem-agents/SKILL.md +112 -260
|
@@ -29,9 +29,10 @@ handoff path before implementation begins.
|
|
|
29
29
|
|
|
30
30
|
This skill is normally loaded by the root/main orchestrator at the start of a
|
|
31
31
|
new root session. When thoth-mem tools are available, the root/main
|
|
32
|
-
orchestrator MUST also load `thoth-mem-agents`, call
|
|
33
|
-
the active project and session identity,
|
|
34
|
-
`
|
|
32
|
+
orchestrator MUST also load `thoth-mem-agents`, call
|
|
33
|
+
`mem_session(action="start")` with the active project and session identity,
|
|
34
|
+
and save the real user prompt with `mem_save(kind="prompt")` before later
|
|
35
|
+
delegation.
|
|
35
36
|
|
|
36
37
|
If thoth-mem tools or the required identity values are unavailable, disclose
|
|
37
38
|
that memory bootstrap could not run and continue without claiming memory was
|
|
@@ -81,6 +82,8 @@ scaffolding as user prompts.
|
|
|
81
82
|
9. Always ask and confirm; never choose on the user's behalf.
|
|
82
83
|
10. Do not ask for details that the codebase, task artifacts, or gathered
|
|
83
84
|
context already answer.
|
|
85
|
+
11. Enforce scope faithfulness: scope calibration must not silently shrink the
|
|
86
|
+
user's stated intent.
|
|
84
87
|
|
|
85
88
|
### Phase 3: Complexity Assessment
|
|
86
89
|
|
|
@@ -108,6 +111,10 @@ Evaluate these 6 dimensions. Rate each as **Low**, **Medium**, or **High**:
|
|
|
108
111
|
Present:
|
|
109
112
|
|
|
110
113
|
- Summary of understanding
|
|
114
|
+
- Broad user intent and product goal
|
|
115
|
+
- Accepted scope boundaries
|
|
116
|
+
- Deferred or unresolved affected areas that still belong to the accepted goal
|
|
117
|
+
- Explicit exclusions and why they are excluded
|
|
111
118
|
- Scope classification and why
|
|
112
119
|
- Recommended approach options
|
|
113
120
|
- Proposed handoff path
|
|
@@ -130,12 +137,12 @@ user to confirm it:
|
|
|
130
137
|
- Contract sensitivity is Low
|
|
131
138
|
- Failure cost is Low
|
|
132
139
|
|
|
133
|
-
**Accelerated SDD** (`propose -> tasks`) — when:
|
|
140
|
+
**Accelerated SDD** (`sdd-explore -> propose -> tasks`) — when:
|
|
134
141
|
- 2-3 dimensions are Medium, or
|
|
135
142
|
- 1 dimension is High in logic depth, context span, or discovery need
|
|
136
143
|
- But contract sensitivity and failure cost are not High
|
|
137
144
|
|
|
138
|
-
**Full SDD** (`propose -> spec -> design -> tasks`) — when any of:
|
|
145
|
+
**Full SDD** (`sdd-explore -> propose -> spec -> design -> tasks`) — when any of:
|
|
139
146
|
- Contract sensitivity is High
|
|
140
147
|
- Failure cost is High
|
|
141
148
|
- 2 or more dimensions are High
|
|
@@ -148,11 +155,13 @@ Quick decision heuristics:
|
|
|
148
155
|
1. Cosmetic work routes direct regardless of file count.
|
|
149
156
|
2. Dense logic rewrites route to at least accelerated SDD regardless
|
|
150
157
|
of file count.
|
|
151
|
-
3.
|
|
158
|
+
3. End-to-end UX redesign across screens/workflows is usually full SDD when
|
|
159
|
+
user-flow contracts, behavior contracts, or multiple concerns are involved.
|
|
160
|
+
4. External contracts (API, schema, migration, auth, privacy) usually
|
|
152
161
|
need full SDD.
|
|
153
|
-
|
|
162
|
+
5. If the model must remember decisions across many steps, write them
|
|
154
163
|
down — that means SDD.
|
|
155
|
-
|
|
164
|
+
6. Tie-breaker: unsure between direct and accelerated, choose
|
|
156
165
|
accelerated. Unsure between accelerated and full, ask: 'Do we
|
|
157
166
|
need a durable behavior contract?' If yes, full SDD.
|
|
158
167
|
|
|
@@ -182,6 +191,7 @@ corresponding SDD pipeline phase. The handoff MUST include:
|
|
|
182
191
|
|
|
183
192
|
Hand off to:
|
|
184
193
|
|
|
194
|
+
- **Explore**: delegate read-only repository discovery to explorer before artifact-producing phases.
|
|
185
195
|
- **Propose**: [../sdd-propose/SKILL.md](../sdd-propose/SKILL.md)
|
|
186
196
|
- **Spec** (full SDD only): [../sdd-spec/SKILL.md](../sdd-spec/SKILL.md)
|
|
187
197
|
- **Design** (full SDD only): [../sdd-design/SKILL.md](../sdd-design/SKILL.md)
|
|
@@ -201,6 +211,9 @@ ask, and wait.
|
|
|
201
211
|
- Never convert recommendations into unilateral decisions.
|
|
202
212
|
- Do not replace blocking input prompts with plain-text interview questions
|
|
203
213
|
when the harness exposes a blocking user input surface.
|
|
214
|
+
- Do not narrow accepted scope by omission; surface broad intent, accepted
|
|
215
|
+
scope, deferred or unresolved affected areas, and explicit exclusions before
|
|
216
|
+
SDD handoff.
|
|
204
217
|
|
|
205
218
|
## Anti-Patterns
|
|
206
219
|
|
|
@@ -51,6 +51,7 @@ The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
|
|
|
51
51
|
## Intent
|
|
52
52
|
## Scope
|
|
53
53
|
### In Scope
|
|
54
|
+
### Deferred / Needs Discovery
|
|
54
55
|
### Out of Scope
|
|
55
56
|
## Approach
|
|
56
57
|
## Affected Areas
|
|
@@ -82,8 +83,19 @@ Return a short report with:
|
|
|
82
83
|
|
|
83
84
|
- Use canonical OpenSpec filenames only.
|
|
84
85
|
- Keep the proposal focused on why, scope, and success criteria.
|
|
85
|
-
-
|
|
86
|
+
- Preserve the original user intent and product goal in proposal scope. Do not
|
|
87
|
+
silently shrink broad goals such as full UX redesigns.
|
|
88
|
+
- Describe material behavior changes with `From`, `To`, `Reason`, and `Impact`
|
|
89
|
+
when applicable.
|
|
90
|
+
- Use `Deferred / Needs Discovery` for unresolved affected areas that are still
|
|
91
|
+
part of the accepted goal.
|
|
92
|
+
- Keep `Out of Scope` disciplined: include only explicit exclusions, rejected
|
|
93
|
+
options, ownership-separated future work, or deliberately deferred phases.
|
|
94
|
+
- Do not move parts of the stated user goal to `Out of Scope` only because the
|
|
95
|
+
implementation path is unknown.
|
|
96
|
+
- Always include rollback guidance and explicit out-of-scope items when they
|
|
97
|
+
exist.
|
|
86
98
|
- Never reference engram.
|
|
87
|
-
- Never rely on compact
|
|
88
|
-
|
|
89
|
-
`
|
|
99
|
+
- Never rely on compact recall output alone when the mode uses thoth-mem.
|
|
100
|
+
Use `mem_recall(mode="compact")` -> `mem_recall(mode="context")` ->
|
|
101
|
+
`mem_get(id=...)` to retrieve the full artifact body.
|
|
@@ -129,6 +129,12 @@ Return:
|
|
|
129
129
|
- Tasks must be small, actionable, and verifiable.
|
|
130
130
|
- Order tasks by dependency.
|
|
131
131
|
- Include testing and verification work explicitly.
|
|
132
|
+
- Preserve accepted proposal or spec scope and success criteria in tasks.
|
|
133
|
+
- Use boundaries and non-goals to express phase, file, or ownership limits,
|
|
134
|
+
not to shrink the accepted goal.
|
|
135
|
+
- Convert deferred or unresolved affected areas into discovery,
|
|
136
|
+
coordination, or follow-up tasks, or emit an explicit warning when follow-up
|
|
137
|
+
cannot be planned yet.
|
|
132
138
|
- Do not create vague tasks such as "implement feature".
|
|
133
139
|
- The governance validator is advisory only at this stage; it documents
|
|
134
140
|
handoff placement and report findings, but it does not block task generation
|
|
@@ -9,347 +9,199 @@ metadata:
|
|
|
9
9
|
# thoth-mem Agents Skill
|
|
10
10
|
|
|
11
11
|
Use this skill whenever memory work crosses the orchestrator/subagent boundary.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
artifacts that belong to the orchestrator.
|
|
12
|
+
It prevents prompt pollution, implicit fallback sessions such as
|
|
13
|
+
`manual-save-{project}`, and session-level writes from the wrong agent.
|
|
15
14
|
|
|
16
15
|
## Shared References
|
|
17
16
|
|
|
18
|
-
Read these first
|
|
17
|
+
Read these first:
|
|
19
18
|
|
|
20
19
|
- [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
|
|
21
20
|
- [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
duplicate their SDD persistence details unless needed to make a decision.
|
|
22
|
+
## Active MCP Surface
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
hold.
|
|
24
|
+
Use thoth-mem through these MCP tools:
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
for
|
|
35
|
-
`orchestrator`, all "orchestrator-only", "root-only", and
|
|
36
|
-
"orchestrator-owned" rules still apply to that initial/root agent.
|
|
26
|
+
- `mem_recall` for fused retrieval and search
|
|
27
|
+
- `mem_save` for observations, prompts, session summaries, and passive learnings
|
|
28
|
+
- `mem_context` for recent session/project continuity
|
|
29
|
+
- `mem_get` for full memory content and optional timeline context
|
|
30
|
+
- `mem_project` for project summaries, graph facts, topics, and topic context
|
|
31
|
+
- `mem_session` for root-owned session lifecycle and checkpoints
|
|
37
32
|
|
|
38
|
-
|
|
33
|
+
Admin/export/import/sync/migration/rebuild/index/trace operations are CLI/HTTP/dashboard operations, not MCP tools.
|
|
39
34
|
|
|
40
|
-
|
|
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`.
|
|
35
|
+
## Hard Ownership Split
|
|
48
36
|
|
|
49
|
-
|
|
50
|
-
subagent prompts, internal handoffs, tool scaffolding, summaries, or delegated
|
|
51
|
-
task text as user intent.
|
|
37
|
+
### Root/main orchestrator identity
|
|
52
38
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
saved.
|
|
39
|
+
The initial/root agent in the harness is the orchestrator owner for this
|
|
40
|
+
session, even when the runtime does not label it `orchestrator`.
|
|
56
41
|
|
|
57
|
-
###
|
|
42
|
+
### Root-only session and prompt ownership
|
|
58
43
|
|
|
59
|
-
|
|
44
|
+
At new root session start, when tools and identity are available, the root:
|
|
60
45
|
|
|
61
|
-
- `
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
1. Loads `thoth-mem-agents` and `requirements-interview`.
|
|
47
|
+
2. Calls `mem_session(action="start")` with root session identity.
|
|
48
|
+
3. Saves real user intent with `mem_save(kind="prompt")`.
|
|
64
49
|
|
|
65
|
-
|
|
50
|
+
Root owns these operations:
|
|
66
51
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
- `mem_session(action="start")`
|
|
53
|
+
- `mem_session(action="checkpoint")` when used for root progress checkpoints
|
|
54
|
+
- `mem_session(action="summary")`
|
|
55
|
+
- `mem_save(kind="prompt")`
|
|
56
|
+
- root-owned session summaries/checkpoints, including `mem_save(kind="session_summary")` when used as the summary carrier
|
|
71
57
|
|
|
72
|
-
|
|
58
|
+
Subagents must never start/checkpoint/summarize sessions or save prompts.
|
|
73
59
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- `mem_save_prompt` is only valid for real user requests, and subagent prompts
|
|
77
|
-
are orchestration artifacts, not user intent.
|
|
60
|
+
If tools or required identity are missing, report that bootstrap/compaction
|
|
61
|
+
could not be persisted and continue without claiming memory was saved.
|
|
78
62
|
|
|
79
|
-
## Root
|
|
63
|
+
## Root Recall and Save Protocol
|
|
80
64
|
|
|
81
|
-
### Durable
|
|
65
|
+
### Durable saves
|
|
82
66
|
|
|
83
|
-
|
|
84
|
-
decisions, including:
|
|
67
|
+
Root should persist durable outcomes with `mem_save`:
|
|
85
68
|
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
- reusable patterns or conventions
|
|
92
|
-
- durable user preferences or constraints
|
|
69
|
+
- decisions and architecture constraints
|
|
70
|
+
- bug fixes and root cause
|
|
71
|
+
- non-obvious discoveries and patterns
|
|
72
|
+
- configuration changes
|
|
73
|
+
- durable preferences/constraints
|
|
93
74
|
|
|
94
|
-
|
|
95
|
-
`mem_suggest_topic_key` before saving. Keep the observation content structured:
|
|
75
|
+
Keep content structured:
|
|
96
76
|
|
|
97
77
|
```text
|
|
98
78
|
What: concise description
|
|
99
79
|
Why: reason or problem solved
|
|
100
80
|
Where: files, paths, systems, or artifacts
|
|
101
|
-
Learned:
|
|
81
|
+
Learned: caveats or edge cases
|
|
102
82
|
```
|
|
103
83
|
|
|
104
|
-
|
|
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
|
|
84
|
+
### Recall funnel (canonical)
|
|
119
85
|
|
|
120
|
-
|
|
121
|
-
`
|
|
86
|
+
1. `mem_recall(mode="compact")`
|
|
87
|
+
2. `mem_recall(mode="context")`
|
|
88
|
+
3. `mem_get(id=...)`
|
|
122
89
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- Accomplished
|
|
127
|
-
- Next Steps
|
|
128
|
-
- Relevant Files
|
|
90
|
+
Use `mem_get(id=..., include_timeline=true)` when chronology matters.
|
|
91
|
+
Use `mem_context(..., recall_query="...")` only as optional fused context, not
|
|
92
|
+
as a replacement for the recall funnel.
|
|
129
93
|
|
|
130
|
-
|
|
131
|
-
the next session will recover it from memory.
|
|
94
|
+
### Project navigation
|
|
132
95
|
|
|
133
|
-
|
|
96
|
+
Use `mem_project` for project-level navigation:
|
|
134
97
|
|
|
135
|
-
|
|
136
|
-
`
|
|
137
|
-
|
|
98
|
+
- `action="list"`
|
|
99
|
+
- `action="summary"`
|
|
100
|
+
- `action="graph"`
|
|
101
|
+
- `action="topics"`
|
|
102
|
+
- `action="topic"`
|
|
138
103
|
|
|
139
|
-
###
|
|
104
|
+
### Session close and compaction
|
|
140
105
|
|
|
141
|
-
|
|
106
|
+
Before ending meaningful work, root records continuity with either:
|
|
142
107
|
|
|
143
|
-
`
|
|
144
|
-
|
|
145
|
-
Examples: `sdd/add-user-auth/spec`, `sdd/add-user-auth/design`,
|
|
146
|
-
`sdd/add-user-auth/tasks`.
|
|
108
|
+
- `mem_session(action="summary")`, or
|
|
109
|
+
- root-owned `mem_save(kind="session_summary")`
|
|
147
110
|
|
|
148
|
-
|
|
111
|
+
Before delegation after meaningful context changes, root may refresh a
|
|
112
|
+
checkpoint/summary context using root-owned session tools. Subagent prompts must
|
|
113
|
+
carry recovery instructions, never the raw handoff body.
|
|
149
114
|
|
|
150
|
-
## Project-Scoped
|
|
115
|
+
## Project-Scoped Context Rules
|
|
151
116
|
|
|
152
|
-
|
|
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.
|
|
117
|
+
`mem_context` and `mem_project(...)` are bounded context reads, not ownership
|
|
118
|
+
transfers.
|
|
161
119
|
|
|
162
120
|
Rules:
|
|
163
121
|
|
|
164
|
-
-
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
- Do not use them to create
|
|
168
|
-
- Do not use them to save prompts or durable observations.
|
|
169
|
-
|
|
170
|
-
## Prompt Saving Rule
|
|
122
|
+
- Use only with parent `session_id` and `project` when delegated.
|
|
123
|
+
- Keep calls bounded to the task scope.
|
|
124
|
+
- Do not use them to bypass the recall funnel.
|
|
125
|
+
- Do not use them to create session summaries or save prompts.
|
|
171
126
|
|
|
172
|
-
|
|
173
|
-
|
|
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.
|
|
127
|
+
Operational note: semantic lanes can be pending/degraded; lexical/KG fallback is
|
|
128
|
+
valid and expected. Treat fallback metadata as state, not failure.
|
|
179
129
|
|
|
180
130
|
## Dispatch Contract
|
|
181
131
|
|
|
182
|
-
When
|
|
132
|
+
When subagents may use thoth-mem, dispatch MUST include:
|
|
183
133
|
|
|
184
134
|
- parent `session_id`
|
|
185
135
|
- `project`
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
any thoth-mem tool.
|
|
136
|
+
- persistence mode
|
|
137
|
+
- memory permissions (read-only vs delegated write)
|
|
138
|
+
- bounded recall instructions
|
|
190
139
|
|
|
191
|
-
|
|
192
|
-
`manual-save-{project}`. That splits history away from the root workflow.
|
|
140
|
+
Without both `session_id` and `project`, subagents must not call thoth-mem.
|
|
193
141
|
|
|
194
142
|
## Capability Split by Agent Type
|
|
195
143
|
|
|
196
144
|
### Read-only subagents
|
|
197
145
|
|
|
198
|
-
|
|
146
|
+
Roles: explorer, librarian, oracle.
|
|
199
147
|
|
|
200
|
-
Allowed
|
|
148
|
+
Allowed:
|
|
201
149
|
|
|
202
|
-
|
|
203
|
-
|
|
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
|
|
150
|
+
- recall funnel: `mem_recall(mode="compact")` -> `mem_recall(mode="context")` -> `mem_get`
|
|
151
|
+
- optional bounded context: `mem_context`, `mem_project`
|
|
208
152
|
|
|
209
|
-
|
|
153
|
+
Not allowed:
|
|
210
154
|
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
|
|
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.
|
|
155
|
+
- `mem_save`
|
|
156
|
+
- any root session ownership action (`mem_session(...)`)
|
|
157
|
+
- `mem_save(kind="prompt")`
|
|
217
158
|
|
|
218
159
|
### Write-capable subagents
|
|
219
160
|
|
|
220
|
-
|
|
161
|
+
Roles: deep, quick, designer.
|
|
221
162
|
|
|
222
|
-
Allowed
|
|
163
|
+
Allowed:
|
|
223
164
|
|
|
224
|
-
- same
|
|
225
|
-
-
|
|
226
|
-
|
|
227
|
-
-
|
|
228
|
-
implementation work
|
|
165
|
+
- same recall funnel as read-only roles
|
|
166
|
+
- optional bounded context via `mem_context`/`mem_project`
|
|
167
|
+
- delegated durable saves via `mem_save(kind="observation")`
|
|
168
|
+
- deterministic SDD artifact saves only when explicitly delegated
|
|
229
169
|
|
|
230
170
|
Rules:
|
|
231
171
|
|
|
232
|
-
-
|
|
233
|
-
|
|
234
|
-
-
|
|
235
|
-
|
|
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
|
|
172
|
+
- every thoth-mem call uses parent `session_id` and `project`
|
|
173
|
+
- never start/checkpoint/summarize sessions
|
|
174
|
+
- never save prompts
|
|
175
|
+
- report missing/stale/contradictory/insufficient recall context
|
|
250
176
|
|
|
251
|
-
|
|
177
|
+
## Topic-Key Rules
|
|
252
178
|
|
|
253
|
-
|
|
254
|
-
|
|
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:
|
|
179
|
+
General durable observations must stay outside `sdd/*`.
|
|
180
|
+
SDD artifacts use deterministic keys only:
|
|
262
181
|
|
|
263
182
|
`sdd/{change}/{artifact}`
|
|
264
183
|
|
|
265
|
-
|
|
266
|
-
|
|
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.
|
|
184
|
+
Examples: `sdd/add-user-auth/spec`, `sdd/add-user-auth/design`,
|
|
185
|
+
`sdd/add-user-auth/tasks`.
|
|
286
186
|
|
|
287
187
|
## Anti-Patterns
|
|
288
188
|
|
|
289
|
-
Reject
|
|
189
|
+
Reject immediately:
|
|
290
190
|
|
|
291
|
-
-
|
|
292
|
-
-
|
|
293
|
-
-
|
|
294
|
-
-
|
|
295
|
-
-
|
|
296
|
-
|
|
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.
|
|
191
|
+
- asking a subagent to save a generated dispatch prompt
|
|
192
|
+
- subagent use of root session operations (`mem_session(...)`)
|
|
193
|
+
- subagent save of `kind="prompt"`
|
|
194
|
+
- inventing thoth-mem tools outside the six-tool MCP surface
|
|
195
|
+
- treating `mem_context` as a substitute for recall funnel
|
|
196
|
+
- saving general notes under `sdd/*`
|
|
339
197
|
|
|
340
198
|
## Response Standard
|
|
341
199
|
|
|
342
|
-
When
|
|
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
|
|
200
|
+
When applying this skill, state clearly:
|
|
353
201
|
|
|
354
|
-
|
|
355
|
-
|
|
202
|
+
- memory owner for each operation (root vs subagent)
|
|
203
|
+
- allowed tools for the task
|
|
204
|
+
- whether parent `session_id` and `project` are present
|
|
205
|
+
- whether context reads are bounded and explicitly allowed
|
|
206
|
+
- whether topic keys collide with `sdd/*`
|
|
207
|
+
- whether any rule is instruction-level due to runtime enforcement limits
|