thoth-agents 0.2.11 → 0.3.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 (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
@@ -1,232 +0,0 @@
1
- ---
2
- name: sdd-tasks
3
- description: Generate phased `tasks.md` checklists from specs and design.
4
- ---
5
-
6
- # SDD Tasks Skill
7
-
8
- Translate the approved spec and design into an implementation checklist.
9
-
10
- ## Shared Conventions
11
-
12
- - [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
13
- - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
14
- - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
15
-
16
- ## Persistence Mode
17
-
18
- The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
19
- `hybrid`). Follow the persistence contract for read/write rules per mode.
20
-
21
- - `thoth-mem`: persist to thoth-mem only — do NOT create or modify
22
- `openspec/` files.
23
- - `openspec`: write files only — do NOT call thoth-mem save tools.
24
- - `hybrid`: persist to both (default).
25
-
26
- ## When to Use
27
-
28
- - **Full pipeline**: proposal, spec, and design are ready for execution planning
29
- - **Accelerated pipeline**: proposal is ready and spec/design are intentionally skipped
30
- - A task plan must be refreshed after scope changes
31
-
32
- ## Prerequisites
33
-
34
- - `change-name`
35
- - `pipeline-type` (`accelerated` or `full`)
36
- - Proposal artifact
37
- - Spec artifact (full pipeline only)
38
- - Design artifact (full pipeline only)
39
-
40
- ## Workflow
41
-
42
- 1. Read the shared conventions.
43
- 2. Recover artifacts via the retrieval protocol in
44
- the persistence contract:
45
- - **Always**: recover `proposal`
46
- - **Full pipeline only**: recover `spec` and `design`
47
- - In accelerated pipeline, derive task structure directly from the proposal.
48
- 3. If a task plan already exists, recover `sdd/{change-name}/tasks` with the
49
- same mode-aware retrieval rules before rewriting it.
50
- 4. **Reuse settled evidence before validating**: Reuse settled proposal, design, exploration, and handoff evidence first. Treat accepted scope, success
51
- criteria, recorded assumptions, and surfaced `handoffHints` as preservation
52
- constraints. Do not repeat broad discovery merely because the accelerated
53
- pipeline has no design artifact or because an available artifact omits a
54
- path.
55
- 5. **Run bounded validation**: Validate only the accepted affected areas, the
56
- authoritative command source, task-referenced existing files, and neighboring relevant tests needed to make the plan executable.
57
- - Identify the authoritative command source from project instructions and
58
- existing conventions (for example `package.json`, `Makefile`, `Cargo.toml`,
59
- `.csproj`, or `pyproject.toml`). Use only commands confirmed there in
60
- `Run:` fields; never invent commands or imply that an unchecked command
61
- exists.
62
- - For every task that modifies an existing file, verify that path within the
63
- accepted affected areas. Check neighboring relevant tests only where they
64
- support a planned task or its Verification block. Never present an unverified path, command, or test reference as confirmed.
65
- - Do not expand this pass into repository-wide discovery. If a required
66
- reference remains unresolved, defer or omit the dependent task, add a
67
- bounded discovery or coordination task when appropriate, and record the
68
- unresolved reference once under `## Validation Gaps`.
69
- - Emit one entry per unresolved reference using this exact structure:
70
-
71
- ```md
72
- ## Validation Gaps
73
-
74
- | Target | Checks performed | Impact / task disposition | Next action |
75
- | --- | --- | --- | --- |
76
- | {unverified path, command, or test} | {bounded checks completed} | {blocked, deferred, omitted, or follow-up task} | {specific discovery, owner, or decision needed} |
77
- ```
78
-
79
- - Escalate a gap that prevents an executable plan. If the accumulated gaps or
80
- cross-area validation exceed bounded mechanical planning, recommend
81
- escalation or complexity-based routing; do not use role changes as generic
82
- failure recovery.
83
- 6. Build a phased checklist for `openspec/changes/{change-name}/tasks.md`. In
84
- `thoth-mem` mode, produce the same canonical checklist content without
85
- creating the file.
86
- 7. Use hierarchical numbering and Markdown checkboxes with per-task verification:
87
-
88
- ```md
89
- # Tasks: {Change Title}
90
-
91
- ## Phase 1: Foundation
92
- - [ ] 1.1 Set up project structure — `src/config/`
93
- **[USN-1]** | Priority: P1
94
- **Spec:** `config-domain/Project Structure`
95
- **Independent Test:** Inspect `src/config/` exists and typechecks in isolation.
96
- **Verification**:
97
- - Run: `pnpm run typecheck`
98
- - Expected: No TypeScript errors in config files
99
-
100
- ## Phase 2: Core Implementation
101
- - [ ] 2.1 Author core-logic tests — `src/core/handler.test.ts`
102
- **[USN-2]** | Priority: P1
103
- **Spec:** `core-domain/Core Logic`
104
- **Independent Test:** Run the new handler test file; it is red before 2.2.
105
- **Verification**:
106
- - Run: `pnpm test -- -t "core handler"`
107
- - Expected: New tests run (red before 2.2)
108
- - [ ] 2.2 Implement core logic — `src/core/handler.ts`
109
- **[USN-2]** | Priority: P1
110
- **Spec:** `core-domain/Core Logic`
111
- **Independent Test:** Run the handler tests; they pass against the impl.
112
- **Verification**:
113
- - Run: `pnpm test -- -t "core handler"`
114
- - Expected: All handler tests pass
115
-
116
- ## Phase 3: Integration
117
- - [ ] 3.1 [P] Integrate with API — `src/api/client.ts`
118
- **[USN-3]** | Priority: P2
119
- **Spec:** `api-domain/Client Integration`
120
- **Independent Test:** Run the API client lint in isolation.
121
- **Verification**:
122
- - Run: `pnpm run lint src/api/`
123
- - Expected: No linting errors in API module
124
-
125
- ## Phase 4: Integration & Release
126
- - [ ] 4.1 Run full integration test suite and validate release artifacts — all modules
127
- **Verification**:
128
- - Run: `pnpm test`
129
- - Expected: All tests pass with 100% coverage
130
- ```
131
-
132
- Recognized task states:
133
-
134
- - `- [ ]` pending
135
- - `- [~]` in progress
136
- - `- [x]` completed
137
- - `- [-]` skipped — always append a reason: `- [-] 1.2 Task name — skipped: reason here`
138
-
139
- 8. Reference concrete file paths and specific spec scenarios in the tasks.
140
- 9. If the selected mode includes thoth-mem, persist the full checklist with:
141
-
142
- Use the memory tool binding for `mem_save` with the canonical SDD topic key
143
- and required metadata fields: `title`, `topic_key`, `type`, `project`,
144
- `scope`, and `content`.
145
-
146
- 10. After `tasks.md` is generated, the workflow proceeds to an optional oracle
147
- plan review via the `plan-reviewer` skill. This is managed outside the scope
148
- of this skill.
149
- 11. The artifact governance validator may run **after** `sdd-tasks` as a
150
- report-only handoff. It captures placement guidance for the future
151
- pre-`sdd-apply` entrypoint, but it does not enforce execution or overlap
152
- with plan review.
153
- 12. The orchestrator handles the `[OKAY]` / `[REJECT]` review loop and any
154
- necessary fixes before proceeding to execution.
155
-
156
- ## Traceability, TDD Ordering, and Handoff Hints
157
-
158
- Canonical definitions live in `_shared/openspec-convention.md`. These fields are
159
- ADDITIVE to the existing `Verification` block, not a replacement, and they are
160
- optional for back-compat (legacy `tasks.md` without them still executes).
161
-
162
- - **`[USN-<n>]`** — a user-story-number grouping label (a coarse story/epic
163
- bucket). It is NOT the requirement linkage.
164
- - **Priority** — one of `P1`, `P2`, `P3`.
165
- - **`Spec:` trace tag** — names the exact requirement the task implements, in
166
- `{domain}/{Requirement Name}` format (optionally `#{Scenario Name}`). This is
167
- the requirement linkage `plan-reviewer` counts for coverage %; keep it
168
- greppable and one requirement per tag.
169
- - **`Independent Test`** — how the task's outcome is verified in isolation,
170
- without depending on other tasks being complete.
171
-
172
- ### `tasks.tdd` ordering
173
-
174
- When `rules.tasks.tdd` is enabled in `config.yaml`, sequence test-authoring
175
- tasks BEFORE their corresponding implementation tasks within the same phase (see
176
- the Phase 2 example: 2.1 authors tests, 2.2 implements). When `tasks.tdd` is
177
- disabled, impose no test-first ordering constraint. `plan-reviewer` enforces
178
- this ordering when the flag is enabled.
179
-
180
- ### `[P]` parallel markers
181
-
182
- When `rules.tasks.parallel_markers` is enabled in `config.yaml`, an optional
183
- `[P]` marker MAY be placed AFTER the `N.M` number (`- [ ] 2.1 [P] Title`),
184
- never before it (`[P] 2.1` would break the task-numbering validator). Emit
185
- `[P]` ONLY on tasks that are intra-phase, dependency-free of every other task
186
- in the same phase, and assigned to the SAME execution agent — never across
187
- phases and never on tasks with intra-phase dependencies. `[P]` is
188
- back-compatible: when `parallel_markers` is disabled or the marker is absent,
189
- the plan executes exactly as it does today (absence = today's behavior). It
190
- annotates an explicit parallel batch; it does not change `N.M`, `[USN]`, the
191
- `Spec:` tag, or introduce flat `T001` ids.
192
-
193
- ### Consume upstream handoffHints
194
-
195
- At task-generation start, surface the spec/design phases' `handoffHints` and
196
- treat them as preservation constraints (coverage decisions, architecture
197
- constraints, recorded Assumptions). When no hints were declared, surface
198
- nothing. Surfacing is gated by `rules.handoffs.surface_hints`.
199
-
200
- ## Output Format
201
-
202
- Return:
203
-
204
- - `Change`
205
- - `Artifact`: `openspec/changes/{change-name}/tasks.md`
206
- - `Topic Key`: `sdd/{change-name}/tasks`
207
- - `Phase Summary`: task counts per phase
208
- - `Execution Order`: one short paragraph
209
- - `Next Step`: `sdd-apply`
210
-
211
- ## Rules
212
-
213
- - Tasks must be small, actionable, and verifiable.
214
- - Order tasks by dependency.
215
- - Include testing and verification work explicitly.
216
- - Preserve accepted proposal or spec scope and success criteria in tasks.
217
- - Use boundaries and non-goals to express phase, file, or ownership limits,
218
- not to shrink the accepted goal.
219
- - Convert deferred or unresolved affected areas into discovery,
220
- coordination, or follow-up tasks, or emit an explicit warning when follow-up
221
- cannot be planned yet.
222
- - Do not create vague tasks such as "implement feature".
223
- - The governance validator is advisory only at this stage; it documents
224
- handoff placement and report findings, but it does not block task generation
225
- or replace execution planning.
226
- - **Every task MUST include a `Verification` sub-block** with:
227
- - `Run:` — the exact command(s) to verify this task (e.g., `pnpm test`, `pnpm run typecheck`, `pnpm run lint`)
228
- - `Expected:` — the specific observable outcome that confirms success
229
- - Tasks without a `Verification` block will be rejected by the plan-reviewer.
230
- - Do NOT group verification into a single "Phase 4: Verification" — each task gets its own.
231
- - Retrieve all dependencies through the mode-aware protocol in the persistence
232
- contract.
@@ -1,131 +0,0 @@
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
- - Expected `round N` from the dispatch envelope (the verify-loop round counter; defaults to round 1 for the first verify after apply)
42
-
43
- ## Workflow
44
-
45
- 1. Read the shared conventions.
46
- 2. Recover artifacts with the retrieval protocol in
47
- the persistence contract:
48
- - **Always**: recover `tasks`
49
- - **Full pipeline**: recover `spec` and `design`
50
- - **Accelerated pipeline**: recover `proposal` (used as the verification reference)
51
- 3. Optionally recover `apply-progress` with the same mode-aware rules if it
52
- exists and helps explain task coverage.
53
- 4. Read the changed code and run the required verification commands.
54
- 5. If the selected mode includes OpenSpec, create
55
- `openspec/changes/{change-name}/verify-report.md` with at least:
56
-
57
- In `thoth-mem` mode, produce the same report content without creating the
58
- file:
59
-
60
- ```md
61
- # Verification Report: {Change Title}
62
-
63
- ## Round
64
- round N <!-- stamped from the dispatch envelope's expected round; source of truth for the loop counter -->
65
-
66
- ## Completeness
67
- ## Build and Test Evidence
68
- ## Compliance Matrix
69
- <!-- Full pipeline: map Given/When/Then scenarios from spec -->
70
- <!-- Accelerated pipeline: map success criteria from proposal -->
71
- ## Design Coherence (full pipeline only)
72
-
73
- ## Issues Found
74
-
75
- ### Critical
76
- - **[C1]** {one-line problem statement}
77
- - file: `path/to/file.ts:LINE` (or `path/to/file.ts` when line is N/A)
78
- - scenario: `{Requirement title} › {Scenario name}` (full pipeline) OR
79
- criterion: `{proposal success-criterion id/text}` (accelerated pipeline)
80
- - fix: {imperative remediation instruction}
81
-
82
- ### Warnings
83
- - **[W1]** {one-line problem statement}
84
- - file: `path/to/file.ts:LINE`
85
- - scenario / criterion: {anchor}
86
- - fix: {imperative remediation instruction}
87
-
88
- ## Verdict
89
- ```
90
-
91
- 6. Build a compliance matrix: in full pipeline, map each Given/When/Then
92
- scenario to evidence; in accelerated pipeline, map each proposal success
93
- criterion to evidence.
94
- 7. If the selected mode includes thoth-mem, persist the report with:
95
-
96
- Use the memory tool binding for `mem_save` with the canonical SDD topic key
97
- and required metadata fields: `title`, `topic_key`, `type`, `project`,
98
- `scope`, and `content`.
99
- 8. Stamp the expected `round N` from the dispatch envelope into the report's
100
- `## Round` field and the `Round` return field. The orchestrator treats this
101
- `round N` marker as the source of truth for the verify-loop round counter
102
- when enforcing the round bound across iterations.
103
- 9. Apply the governance-touched heuristic from
104
- `_shared/openspec-convention.md` > Constitution Governance > Amendment
105
- Auto-Suggest. When it matches, surface the shared report-only
106
- `sdd-constitution` suggestion. This is advisory and MUST NOT change the
107
- verdict or block verification.
108
-
109
- ## Output Format
110
-
111
- Return:
112
-
113
- - `Change`
114
- - `Artifact`: `openspec/changes/{change-name}/verify-report.md`
115
- - `Topic Key`: `sdd/{change-name}/verify-report`
116
- - `Round`: `round N` (mirrors the report's `## Round` marker)
117
- - `Verdict`: pass, pass with warnings, or fail
118
- - `Compliance Summary`: compliant vs total scenarios
119
- - `Critical Issues`: anchored compact lines (`id — file:line — scenario/criterion — fix`), one per issue, or `None`
120
- - `Constitution Suggestion`: surfaced or none
121
-
122
- ## Rules
123
-
124
- - Verification requires real evidence, not only static inspection.
125
- - Every acceptance criterion must appear in the compliance matrix: spec
126
- scenarios in full pipeline, proposal success criteria in accelerated pipeline.
127
- - Distinguish blockers from warnings clearly.
128
- - Do not fix issues inside this phase; report them.
129
- - Every Critical Issue MUST carry at least one remediation anchor (file: and/or scenario:/criterion:); prose-only Critical Issues are invalid output.
130
- - Stamp the `round N` marker from the dispatch envelope into `## Round`.
131
- - Recover full artifacts with the protocol in the persistence contract.
@@ -1,210 +0,0 @@
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
- It prevents prompt pollution, implicit fallback sessions such as
13
- `manual-save-{project}`, and session-level writes from the wrong agent.
14
-
15
- ## Shared References
16
-
17
- Read these first:
18
-
19
- - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
20
- - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
21
-
22
- ## Active MCP Surface
23
-
24
- Use thoth-mem through these MCP tools:
25
-
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
32
-
33
- Admin/export/import/sync/migration/rebuild/index/trace operations are CLI/HTTP/dashboard operations, not MCP tools.
34
-
35
- ## Hard Ownership Split
36
-
37
- ### Root/main orchestrator identity
38
-
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`.
41
-
42
- ### Root-only session and prompt ownership
43
-
44
- At new root session start, when tools and identity are available, the root:
45
-
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")`.
49
-
50
- Root owns these operations:
51
-
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
57
-
58
- Subagents must never start/checkpoint/summarize sessions or save prompts.
59
-
60
- If tools or required identity are missing, report that bootstrap/compaction
61
- could not be persisted and continue without claiming memory was saved.
62
-
63
- ## Root Recall and Save Protocol
64
-
65
- ### Durable saves
66
-
67
- Root should persist durable outcomes with `mem_save`:
68
-
69
- - decisions and architecture constraints
70
- - bug fixes and root cause
71
- - non-obvious discoveries and patterns
72
- - configuration changes
73
- - durable preferences/constraints
74
-
75
- Keep content structured:
76
-
77
- ```text
78
- What: concise description
79
- Why: reason or problem solved
80
- Where: files, paths, systems, or artifacts
81
- Learned: caveats or edge cases
82
- ```
83
-
84
- ### Recall funnel (canonical)
85
-
86
- 1. `mem_recall(mode="compact")`
87
- 2. `mem_recall(mode="context")`
88
- 3. `mem_get(id=...)`
89
-
90
- Use `mem_get(id=..., include_timeline=true)` when chronology matters.
91
- Set `mem_recall` `limit` from 1 to 20. Use `mem_get` with `kind="observation"|"prompt"`, `include_timeline=true` plus `before`/`after`, and `offset`/`max_length` for large content.
92
- Use `mem_context(..., recall_query="...")` only as optional fused context, not
93
- as a replacement for the recall funnel.
94
-
95
- ### Project navigation
96
-
97
- Use `mem_project` for project-level navigation:
98
-
99
- - `action="list"`
100
- - `action="summary"`
101
- - `action="graph"`
102
- - `action="topics"`
103
- - `action="topic"`
104
-
105
- `mem_project(action="graph")` relations are `HAS_TYPE`, `IN_PROJECT`, `HAS_TOPIC_KEY`, `HAS_WHAT`, `HAS_WHY`, `HAS_WHERE`, and `HAS_LEARNED`.
106
-
107
- ### Session close and compaction
108
-
109
- Before ending meaningful work, root records continuity with either:
110
-
111
- - `mem_session(action="summary")`, or
112
- - root-owned `mem_save(kind="session_summary")`
113
-
114
- Before delegation after meaningful context changes, root may refresh a
115
- checkpoint/summary context using root-owned session tools. Subagent prompts must
116
- carry recovery instructions, never the raw handoff body.
117
-
118
- ## Project-Scoped Context Rules
119
-
120
- `mem_context` and `mem_project(...)` are bounded context reads, not ownership
121
- transfers.
122
-
123
- Rules:
124
-
125
- - Use only with parent `session_id` and `project` when delegated.
126
- - Keep calls bounded to the task scope.
127
- - Do not use them to bypass the recall funnel.
128
- - Do not use them to create session summaries or save prompts.
129
-
130
- Operational note: semantic lanes can be pending/degraded; lexical/KG fallback is
131
- valid and expected. Treat fallback metadata as state, not failure.
132
-
133
- ## Dispatch Contract
134
-
135
- When subagents may use thoth-mem, dispatch MUST include:
136
-
137
- - parent `session_id`
138
- - `project`
139
- - persistence mode
140
- - memory permissions (read-only vs delegated write)
141
- - bounded recall instructions
142
-
143
- Without both `session_id` and `project`, subagents must not call thoth-mem.
144
-
145
- ## Capability Split by Agent Type
146
-
147
- ### Read-only subagents
148
-
149
- Roles: explorer, librarian, oracle.
150
-
151
- Allowed:
152
-
153
- - recall funnel: `mem_recall(mode="compact")` -> `mem_recall(mode="context")` -> `mem_get`
154
- - optional bounded context: `mem_context`, `mem_project`
155
-
156
- Not allowed:
157
-
158
- - `mem_save`
159
- - any root session ownership action (`mem_session(...)`)
160
- - `mem_save(kind="prompt")`
161
-
162
- ### Write-capable subagents
163
-
164
- Roles: deep, quick, designer.
165
-
166
- Allowed:
167
-
168
- - same recall funnel as read-only roles
169
- - optional bounded context via `mem_context`/`mem_project`
170
- - delegated durable saves via `mem_save(kind="observation")`
171
- - deterministic SDD artifact saves only when explicitly delegated
172
-
173
- Rules:
174
-
175
- - every thoth-mem call uses parent `session_id` and `project`
176
- - never start/checkpoint/summarize sessions
177
- - never save prompts
178
- - report missing/stale/contradictory/insufficient recall context
179
-
180
- ## Topic-Key Rules
181
-
182
- General durable observations must stay outside `sdd/*`.
183
- SDD artifacts use deterministic keys only:
184
-
185
- `sdd/{change}/{artifact}`
186
-
187
- Examples: `sdd/add-user-auth/spec`, `sdd/add-user-auth/design`,
188
- `sdd/add-user-auth/tasks`.
189
-
190
- ## Anti-Patterns
191
-
192
- Reject immediately:
193
-
194
- - asking a subagent to save a generated dispatch prompt
195
- - subagent use of root session operations (`mem_session(...)`)
196
- - subagent save of `kind="prompt"`
197
- - inventing thoth-mem tools outside the six-tool MCP surface
198
- - treating `mem_context` as a substitute for recall funnel
199
- - saving general notes under `sdd/*`
200
-
201
- ## Response Standard
202
-
203
- When applying this skill, state clearly:
204
-
205
- - memory owner for each operation (root vs subagent)
206
- - allowed tools for the task
207
- - whether parent `session_id` and `project` are present
208
- - whether context reads are bounded and explicitly allowed
209
- - whether topic keys collide with `sdd/*`
210
- - whether any rule is instruction-level due to runtime enforcement limits