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
@@ -1,233 +0,0 @@
1
- ---
2
- name: requirements-interview
3
- description: Mandatory step-0 requirements discovery for non-trivial work before any implementation or SDD routing decisions.
4
- metadata:
5
- author: thoth-agents
6
- version: '1.0'
7
- ---
8
-
9
- # Requirements Interview Skill
10
-
11
- Use this skill as the mandatory step-0 entry point for non-trivial requests.
12
- The goal is requirement clarity, scope calibration, and a user-approved
13
- handoff path before implementation begins.
14
-
15
- ## Shared Conventions
16
-
17
- - [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
18
- - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
19
- - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
20
-
21
- ## HARD GATE
22
-
23
- - Do not implement during the requirements interview.
24
- - Do not write code.
25
- - Do not patch files.
26
- - Do not create formal SDD artifacts until the user approves the route.
27
-
28
- ## Root Session Bootstrap
29
-
30
- This skill is normally loaded by the root/main orchestrator at the start of a
31
- new root session. When thoth-mem tools are available, the root/main
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.
36
-
37
- If thoth-mem tools or the required identity values are unavailable, disclose
38
- that memory bootstrap could not run and continue without claiming memory was
39
- saved. Do not save subagent prompts, generated handoffs, or interview
40
- scaffolding as user prompts.
41
-
42
- ## Blocking User Input Surface Requirement
43
-
44
- - The interview flow MUST use the active harness blocking user input surface
45
- for user-input prompts.
46
- - Do not embed interview questions as plain prose in normal response text when
47
- a blocking user input surface exists.
48
- - Prefer one focused blocking input call at a time for the core interview loop.
49
- - Use short headers (<=30 chars), concise option labels, and concrete
50
- descriptions.
51
- - Put the recommended option first and include `(Recommended)` in that label.
52
- - Do not add an `Other` option manually when the active harness already adds or
53
- supports custom input. Use the equivalent runtime option unless custom input
54
- must be disabled.
55
- - Use multi-select only when multiple simultaneous selections are genuinely
56
- valid. Use the equivalent runtime option if one exists.
57
-
58
- ## Workflow
59
-
60
- ### Phase 1: Discovery Context Gathering
61
-
62
- 1. Always use the semantic explorer role for codebase context. Use the
63
- semantic librarian role for external APIs, dependency versions, library
64
- migration, or public documentation.
65
- 2. Collect only the minimum context needed to improve questions and reduce
66
- user repetition.
67
- 3. Prefer facts from the codebase and known references over asking the user
68
- for information the environment can answer.
69
-
70
- ### Phase 2: Requirements Interview
71
-
72
- 1. Ask each interview question through the blocking user input surface.
73
- 2. Ask 1 blocking input call at a time.
74
- 3. Ask at most 5 total questions.
75
- 4. Prefer multiple-choice questions when practical.
76
- 5. Stop early when clarity is already sufficient.
77
- 6. Focus on what the user truly needs, not only the first phrasing of the
78
- request.
79
- 7. Surface unstated assumptions and validate them with the user.
80
- 8. Guide the user toward potentially better options when appropriate, but never
81
- impose a decision.
82
- 9. Always ask and confirm; never choose on the user's behalf.
83
- 10. Do not ask for details that the codebase, task artifacts, or gathered
84
- context already answer.
85
- 11. Enforce scope faithfulness: scope calibration must not silently shrink the
86
- user's stated intent.
87
- 12. Alignment note: a genuine decision fork left unresolved at interview is not
88
- settled here — downstream it becomes either a `[NEEDS CLARIFICATION]`
89
- marker or a recorded entry in the spec's `## Assumptions` section
90
- (informed-guess-first). This note is alignment only; the interview does not
91
- own the clarification cap or the Assumptions gate.
92
-
93
- ### Phase 3: Complexity Assessment
94
-
95
- Evaluate these 6 dimensions. Rate each as **Low**, **Medium**, or **High**:
96
-
97
- | Dimension | Low | Medium | High |
98
- | --- | --- | --- | --- |
99
- | **Logic depth** | Copy, CSS, rename, simple wiring | Localized behavior tweak, validation, one workflow step | Algorithm, state-machine, or business-rule rewrite with many invariants |
100
- | **Contract sensitivity** | Presentation only, internal refactor | User-visible behavior change in one flow | API, schema, data model, migration, auth, privacy, or public contract |
101
- | **Context span** | Can be done in one bounded pass | Several dependent edits or choices to coordinate | Many sequential steps where earlier decisions must be remembered |
102
- | **Discovery need** | Request and acceptance criteria are already clear | Some ambiguity, a few viable approaches | Goal is clear but solution requires investigation or tradeoff analysis |
103
- | **Failure cost** | Mistakes are obvious and cheap to revert | Needs integration or regression checks | Subtle correctness bugs, customer-facing, data, or compliance impact |
104
- | **Concern coupling** | Single concern | Two related concerns | Multiple independent concerns that could conflict |
105
-
106
- ### Phase 4: Approach Proposal
107
-
108
- 1. Present 2-3 viable options as recommendations, not decisions.
109
- 2. For each option, give the main trade-offs and when it is a good fit.
110
- 3. Mark one option as the current recommendation and explain why.
111
- 4. Use the active harness blocking user input surface to confirm the preferred
112
- approach before moving on.
113
-
114
- ### Phase 5: User Approval Gate
115
-
116
- Present:
117
-
118
- - Summary of understanding
119
- - Broad user intent and product goal
120
- - Accepted scope boundaries
121
- - Deferred or unresolved affected areas that still belong to the accepted goal
122
- - Explicit exclusions and why they are excluded
123
- - Scope classification and why
124
- - Recommended approach options
125
- - Proposed handoff path
126
-
127
- Then wait for explicit user confirmation.
128
-
129
- Use the active harness blocking user input surface for this approval gate.
130
-
131
- Nothing proceeds without explicit approval in this phase. The user is the sole
132
- approver during requirements discovery. Do not request oracle review here.
133
-
134
- ### Phase 6: Handoff
135
-
136
- Recommend a route based on the complexity assessment, then wait for the
137
- user to confirm it:
138
-
139
- **Direct implementation** — when all of:
140
- - No dimensions rated High
141
- - At most one dimension rated Medium
142
- - Contract sensitivity is Low
143
- - Failure cost is Low
144
-
145
- **Accelerated SDD** (`sdd-explore -> propose -> tasks`) — when:
146
- - 2-3 dimensions are Medium, or
147
- - 1 dimension is High in logic depth, context span, or discovery need
148
- - But contract sensitivity and failure cost are not High
149
-
150
- **Full SDD** (`sdd-explore -> propose -> spec -> clarify -> design -> tasks`) — when any of:
151
- - Contract sensitivity is High
152
- - Failure cost is High
153
- - 2 or more dimensions are High
154
- - Discovery need is High and at least one other dimension is
155
- Medium or High
156
- - Concern coupling is High with risk of conflicting decisions
157
-
158
- Quick decision heuristics:
159
-
160
- 1. Cosmetic work routes direct regardless of file count.
161
- 2. Dense logic rewrites route to at least accelerated SDD regardless
162
- of file count.
163
- 3. End-to-end UX redesign across screens/workflows is usually full SDD when
164
- user-flow contracts, behavior contracts, or multiple concerns are involved.
165
- 4. External contracts (API, schema, migration, auth, privacy) usually
166
- need full SDD.
167
- 5. If the model must remember decisions across many steps, write them
168
- down — that means SDD.
169
- 6. Tie-breaker: unsure between direct and accelerated, choose
170
- accelerated. Unsure between accelerated and full, ask: 'Do we
171
- need a durable behavior contract?' If yes, full SDD.
172
-
173
- Before any SDD generation starts, present the artifact store policy choice:
174
-
175
- ```text
176
- How would you like to persist planning artifacts?
177
- 1. none — No persistence. Ephemeral exploration, privacy-sensitive work, or when no backend is available. Results are inline only and not saved across sessions.
178
- 2. thoth-mem — Memory only. Lightest token cost. No repo files.
179
- 3. openspec — Repo files only. Visible and reviewable.
180
- 4. hybrid — Both. Maximum durability, higher token cost.
181
- Default: hybrid
182
- ```
183
-
184
- Collect this choice with the active blocking user input surface rather than
185
- plain prose.
186
-
187
- When the user selects a mode that includes OpenSpec (`openspec` or `hybrid`),
188
- verify that `openspec/` is initialized AND not stale. If it is not initialized,
189
- or it exists but is stale (`config.yaml` missing one or more mechanism sections
190
- / toggles, or `openspec/memory/constitution.md` absent), recommend running the
191
- `sdd-init` skill before proceeding so it can additively realign the project.
192
-
193
- Once route, persistence mode, and initialization are confirmed, hand off to the
194
- corresponding SDD pipeline phase. The handoff MUST include:
195
- - `pipeline-type`: `accelerated` or `full` (matching the confirmed route)
196
- - `persistence-mode`: the user's chosen artifact store mode
197
- - `change-name`: derived from the approved scope
198
-
199
- Hand off to:
200
-
201
- - **Explore**: delegate read-only repository discovery to explorer before artifact-producing phases.
202
- - **Propose**: [../sdd-propose/SKILL.md](../sdd-propose/SKILL.md)
203
- - **Spec** (full SDD only): [../sdd-spec/SKILL.md](../sdd-spec/SKILL.md)
204
- - **Clarify** (full SDD only): [../sdd-clarify/SKILL.md](../sdd-clarify/SKILL.md)
205
- - **Design** (full SDD only): [../sdd-design/SKILL.md](../sdd-design/SKILL.md)
206
- - **Tasks**: [../sdd-tasks/SKILL.md](../sdd-tasks/SKILL.md)
207
-
208
- Do not silently choose the handoff route or artifact store mode. Recommend,
209
- ask, and wait.
210
-
211
- ## Guardrails
212
-
213
- - Maximum 5 interview questions.
214
- - Ask only one blocking input call at a time.
215
- - Do not ask what codebase context can answer.
216
- - Do not skip explicit user approval.
217
- - Do not auto-select the handoff route.
218
- - Do not auto-select the persistence mode.
219
- - Never convert recommendations into unilateral decisions.
220
- - Do not replace blocking input prompts with plain-text interview questions
221
- when the harness exposes a blocking user input surface.
222
- - Do not narrow accepted scope by omission; surface broad intent, accepted
223
- scope, deferred or unresolved affected areas, and explicit exclusions before
224
- SDD handoff.
225
-
226
- ## Anti-Patterns
227
-
228
- - Question dumping
229
- - Option inflation
230
- - Premature implementation
231
- - Silent route selection
232
- - Silent persistence-mode selection
233
- - Treating discovery as optional
@@ -1,89 +0,0 @@
1
- ---
2
- name: sdd-apply
3
- description: Execute assigned SDD tasks and return structured implementation results.
4
- ---
5
-
6
- # SDD Apply Skill
7
-
8
- Implement assigned SDD tasks and return durable execution results to the
9
- orchestrator.
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
- - A change has a task plan and implementation should begin or resume
30
- - A batch of checklist items must be executed and reported back to the
31
- orchestrator
32
-
33
- ## Prerequisites
34
-
35
- - `change-name`
36
- - `pipeline-type` (`accelerated` or `full`)
37
- - Assigned task numbers or phase range
38
- - Task artifact
39
- - Spec and design artifacts (full pipeline only)
40
- - Proposal artifact (accelerated pipeline — used as the acceptance reference)
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 acceptance reference)
50
- 3. Read the affected code before editing anything.
51
- 4. Execute only the assigned checklist items.
52
- 5. In modes that include thoth-mem, persist an implementation progress report
53
- with:
54
-
55
- Use the memory tool binding for `mem_save` with the canonical SDD topic key
56
- and required metadata fields: `title`, `topic_key`, `type`, `project`,
57
- `scope`, and `content`.
58
-
59
- 6. If the orchestrator requests it, include enough detail for it to update the
60
- canonical tasks artifact and memory checkpoints accurately.
61
-
62
- ## Response Format
63
-
64
- Return a structured result to the orchestrator using the Task Result envelope:
65
-
66
- **Status**: completed | failed | partial
67
- **Task**: {task reference}
68
-
69
- **What was done**: concrete list of changes
70
- **Files changed**: paths with descriptions
71
- **Verification**: check results (passed/failed)
72
- **Issues**: problems encountered with severity
73
- **Failure/Skip reason**: if applicable
74
-
75
- Progress tracking (checkbox state updates) is managed by the orchestrator
76
- via the harness-bound progress workflow in the `executing-plans` skill. Do not
77
- update task checkboxes yourself.
78
-
79
- ## Rules
80
-
81
- - Read the acceptance contract before implementing: specs in full pipeline,
82
- proposal in accelerated pipeline.
83
- - Follow the design unless you explicitly report a justified deviation.
84
- - Update only the tasks assigned in the current batch.
85
- - Persist the progress artifact whenever the selected mode includes thoth-mem.
86
- - Retrieve every SDD dependency with the mode-aware protocol in the
87
- persistence contract.
88
- - Return structured execution evidence to the orchestrator so it can manage task
89
- state correctly.
@@ -1,92 +0,0 @@
1
- ---
2
- name: sdd-archive
3
- description: Merge completed deltas into main specs and archive the change.
4
- ---
5
-
6
- # SDD Archive Skill
7
-
8
- Close the SDD loop by promoting verified change specs into main specs and
9
- recording an audit trail.
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
- - The change has an acceptable verification report and is ready to close
30
- - An archive attempt must be retried after an interrupted move or merge
31
-
32
- ## Prerequisites
33
-
34
- - `change-name`
35
- - `pipeline-type` (`accelerated` or `full`)
36
- - Tasks artifact
37
- - Verify report artifact
38
- - Spec artifact (full pipeline only)
39
- - Design artifact (full pipeline only)
40
- - Proposal artifact (always — used for audit trail)
41
-
42
- ## Workflow
43
-
44
- 1. Read the shared conventions.
45
- 2. Recover artifacts through the retrieval protocol in
46
- the persistence contract:
47
- - **Always**: recover `proposal`, `tasks`, and `verify-report`
48
- - **Full pipeline only**: recover `spec` and `design`
49
- 3. Refuse to archive if the verification report still contains unresolved
50
- critical failures.
51
- 4. If the selected mode includes OpenSpec and the pipeline is full, merge
52
- every change spec from
53
- `openspec/changes/{change-name}/specs/{domain}/spec.md` into
54
- `openspec/specs/{domain}/spec.md`. In accelerated pipeline, skip the
55
- spec merge (no delta specs exist).
56
- 5. If the selected mode includes OpenSpec, move the completed change directory
57
- to `openspec/changes/archive/YYYY-MM-DD-{change-name}/`.
58
- 6. Create an audit trail report summarizing merged domains, archive location,
59
- verification lineage, and any mode-based skips.
60
- 7. Apply the governance-touched heuristic from
61
- `_shared/openspec-convention.md` > Constitution Governance > Amendment
62
- Auto-Suggest. When it matches, surface the shared report-only
63
- `sdd-constitution` suggestion. This is advisory and MUST NOT block archival.
64
- 8. In `thoth-mem` mode, do not create or move `openspec/` artifacts; record the
65
- archive result only in the audit trail.
66
- 9. If the selected mode includes thoth-mem, persist the audit trail with:
67
-
68
- Use the memory tool binding for `mem_save` with the canonical SDD topic key
69
- and required metadata fields: `title`, `topic_key`, `type`, `project`,
70
- `scope`, and `content`.
71
-
72
- ## Output Format
73
-
74
- Return:
75
-
76
- - `Change`
77
- - `Archive Path`: `openspec/changes/archive/YYYY-MM-DD-{change-name}/`
78
- - `Topic Key`: `sdd/{change-name}/archive-report`
79
- - `Merged Specs`: list of domains updated in `openspec/specs/`
80
- - `Audit Summary`: concise bullets
81
- - `Constitution Suggestion`: surfaced or none
82
- - `Status`: archived or blocked
83
-
84
- ## Rules
85
-
86
- - Archive only after verification is acceptable.
87
- - In full pipeline, merge delta specs before moving the change folder.
88
- In accelerated pipeline, skip the spec merge (no delta specs exist).
89
- - Preserve canonical spec structure and untouched requirements.
90
- - Persist the final audit trail through thoth-mem when the selected mode
91
- includes it.
92
- - Use the retrieval protocol in the persistence contract for every dependency.
@@ -1,105 +0,0 @@
1
- ---
2
- name: sdd-clarify
3
- description: Resolve residual spec ambiguity in place before design, with a bounded taxonomy-driven clarification pass.
4
- ---
5
-
6
- # SDD Clarify Skill
7
-
8
- Resolve residual ambiguity that survives `sdd-spec` by writing clarified
9
- resolutions back into the authoritative delta spec, before `sdd-design`
10
- consumes it.
11
-
12
- ## Shared Conventions
13
-
14
- - [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
15
- - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
16
- - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
17
-
18
- ## Persistence Mode
19
-
20
- The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
21
- `hybrid`). Follow the persistence contract for read/write rules per mode.
22
-
23
- - `thoth-mem`: persist to thoth-mem only — do NOT create or modify
24
- `openspec/` files.
25
- - `openspec`: write files only — do NOT call thoth-mem save tools.
26
- - `hybrid`: persist to both (default).
27
-
28
- ## When to Use
29
-
30
- - The delta specs are authored and residual ambiguity (unresolved
31
- `[NEEDS CLARIFICATION]` markers or taxonomy-classified gaps) must be resolved
32
- before design.
33
- - A `full` SDD pipeline run reaches the `clarify` phase between `spec` and
34
- `design`. The phase is full-pipeline only; accelerated and direct pipelines
35
- skip it.
36
-
37
- ## Prerequisites
38
-
39
- - `change-name`
40
- - The spec artifact must exist (recoverable under `sdd/{change-name}/spec`).
41
- - `openspec/changes/{change-name}/checklists/requirements.md` must exist.
42
-
43
- ## Workflow
44
-
45
- 1. Read the shared conventions.
46
- 2. Recover `sdd/{change-name}/spec` using the recall funnel in the persistence
47
- contract (`mem_recall(mode="compact")` -> `mem_recall(mode="context")` ->
48
- `mem_get(...)`), and read the delta spec file(s) under
49
- `openspec/changes/{change-name}/specs/{domain}/spec.md`.
50
- 3. **Taxonomy scan** — scan the recovered spec against the ambiguity taxonomy to
51
- produce resolution candidates:
52
- - ambiguous quantifiers (e.g. "fast", "several", "most")
53
- - undefined terms (domain nouns with no pinned meaning)
54
- - missing error/edge behavior (no failure/edge path specified)
55
- - unresolved decision forks (competing options with no default)
56
- - underspecified data shapes (fields, types, or cardinality not pinned)
57
- - unstated non-functional bounds (latency, size, concurrency, limits)
58
- - plus every unresolved `[NEEDS CLARIFICATION]` marker already in the spec.
59
- 4. **Bounded Q&A** — resolve candidates capped at
60
- `rules.clarification.max_markers_per_spec` (default 3) per spec file. With
61
- more than the cap, resolve at most the cap's worth, prioritizing the
62
- highest-impact ambiguities; leave the rest as explicit markers for a later
63
- pass. Prefer an informed-guess default recorded in `## Assumptions` over a
64
- blocking question when a defensible default exists.
65
- 5. **Write-back in place** — replace each resolved `[NEEDS CLARIFICATION]`
66
- marker / ambiguous statement with its resolved decision directly in the same
67
- delta spec file(s) (inline, or folded into the spec's `## Assumptions`
68
- section when the resolution is a recorded default). Do NOT create a new
69
- artifact (`clarifications.md`, `spec-clarified.md`, etc.). In
70
- `hybrid`/`thoth-mem` mode, re-save the edited spec under the SAME canonical
71
- key `sdd/{change-name}/spec` (upsert) — no `spec-clarified` key.
72
- 6. **Re-validate** `openspec/changes/{change-name}/checklists/requirements.md`
73
- against the clarified spec: flip items that were waived or open due to a
74
- now-resolved ambiguity, and declare `handoffHints` for design (the resolved
75
- decisions and the re-validated checklist state design must preserve). Do not
76
- advance past design with an unresolved checklist.
77
-
78
- ## Boundary
79
-
80
- `sdd-clarify` targets only **post-spec residual** ambiguity. It MUST NOT
81
- re-run or duplicate the upfront `requirements-interview`, and MUST NOT re-ask
82
- questions already resolved during requirements discovery. It edits only the
83
- spec and its requirements checklist; it produces no new permanent artifact.
84
-
85
- ## Output Format
86
-
87
- Return:
88
-
89
- - `Change`
90
- - `Artifact`: clarified delta spec path(s) (edited in place)
91
- - `Topic Key`: `sdd/{change-name}/spec`
92
- - `Resolved`: list of ambiguities resolved (marker/taxonomy class -> resolution)
93
- - `Next Step`: `sdd-design`
94
-
95
- ## Rules
96
-
97
- - Write resolutions back into the authoritative spec in place; never leave a
98
- resolved ambiguity standing as unresolved.
99
- - Reuse the canonical `sdd/{change-name}/spec` topic key (upsert); introduce no
100
- new artifact or key.
101
- - Cap resolutions at `rules.clarification.max_markers_per_spec` per spec file.
102
- - Re-validate `checklists/requirements.md` before handing off to design.
103
- - Do not duplicate `requirements-interview`; resolve only residual post-spec
104
- ambiguity.
105
- - Use the recall funnel from the persistence contract for every SDD dependency.
@@ -1,107 +0,0 @@
1
- ---
2
- name: sdd-constitution
3
- description: Guide a semver constitution amendment and Sync-Impact Report entry.
4
- metadata:
5
- author: thoth-agents
6
- version: 1.0.0
7
- ---
8
-
9
- # SDD Constitution Skill
10
-
11
- Perform a guided, human-confirmed amendment of `openspec/memory/constitution.md`
12
- ONLY — a semver version bump, an updated `Last-Amended` date, and one prepended
13
- `## Sync-Impact Report` entry. This skill closes the constitution lifecycle by
14
- adding its AMENDMENT side; it never edits any other bundled asset.
15
-
16
- ## Shared Conventions
17
-
18
- - [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
19
- - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
20
- - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
21
-
22
- ## Persistence Mode
23
-
24
- The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
25
- `hybrid`). Follow the persistence contract for read/write rules per mode.
26
-
27
- - `thoth-mem`: record the amendment as a governance observation only — do NOT
28
- create or modify `openspec/` files.
29
- - `openspec`: write `openspec/memory/constitution.md` only — do NOT call
30
- thoth-mem save tools.
31
- - `hybrid`: do both — write the file AND record the governance observation
32
- (default).
33
-
34
- ## When to Use
35
-
36
- - A native principle must be added, redefined, removed, or its guidance
37
- materially expanded or clarified, and the constitution must record it.
38
- - A report-only suggestion from `sdd-verify` or `sdd-archive` flagged a
39
- completed change as governance-touching and a human chooses to record an
40
- amendment.
41
-
42
- ## Prerequisites
43
-
44
- - An existing `openspec/memory/constitution.md` (bootstrapped by `sdd-init`).
45
- - A human-described principle change (what changed and why).
46
- - `change-name` — OPTIONAL context only; the skill may run standalone and is not
47
- a per-change pipeline phase.
48
- - Selected persistence mode (default: `hybrid`).
49
-
50
- ## Workflow
51
-
52
- 1. Read the shared conventions, especially `openspec-convention.md` >
53
- Constitution Governance (amendment doctrine, read-only-asset rules, and the
54
- Sync-Impact Report entry format).
55
- 2. Load `openspec/memory/constitution.md` and read its `Version:`, `Ratified:`,
56
- `Last-Amended:` header fields and the existing `## Sync-Impact Report`
57
- section. If the file is absent, instruct the user to run `sdd-init` first;
58
- do NOT create the constitution here.
59
- 3. Determine the principle change from the human description. If no principle
60
- change is warranted, report a no-op and stop — write nothing.
61
- 4. Classify the bump per policy: MAJOR = a principle is removed or redefined;
62
- MINOR = a principle is added or guidance materially expanded; PATCH =
63
- clarification or wording with no behavioral change. Present the
64
- classification for confirmation via the harness blocking-input surface
65
- (AskUserQuestion-equivalent). Do NOT write any version bump before the user
66
- confirms, and NEVER use a runtime parser to auto-select the bump.
67
- 5. Apply the amendment to `openspec/memory/constitution.md` ONLY: bump the
68
- `Version:` field, set `Last-Amended:` to the current date, and PREPEND
69
- exactly one entry to the top of the `## Sync-Impact Report` section in the
70
- canonical format
71
- `- X.Y.Z | change type | principles touched | downstream gates/artifacts affected`.
72
- Preserve all existing content and ALL prior Sync-Impact Report entries.
73
- 6. Emit REPORT-ONLY impact: name the live-read consuming gates (`sdd-design`,
74
- `plan-reviewer`) in the Sync-Impact entry, and FLAG any in-flight change
75
- `openspec/changes/{name}/design.md` or `tasks.md` that reference now-changed
76
- principles for HUMAN re-review. Do NOT edit those artifacts or any other
77
- bundled asset.
78
- 7. Persist per the selected mode: in modes that include OpenSpec write the
79
- constitution file; in modes that include thoth-mem record a governance
80
- observation per the persistence contract.
81
-
82
- ## Output Format
83
-
84
- Return:
85
-
86
- - `Constitution Version`: old `X.Y.Z` -> new `X.Y.Z` (or unchanged on no-op)
87
- - `Bump`: MAJOR, MINOR, PATCH, or no-op
88
- - `Sync-Impact Entry`: the single prepended line (or none on no-op)
89
- - `Consuming Gates`: live-read gates that consume the changed principles
90
- (e.g. `sdd-design`, `plan-reviewer`)
91
- - `In-Flight Artifacts Flagged`: change `design.md` / `tasks.md` flagged for
92
- human re-review, or none
93
- - `Files Written`: `openspec/memory/constitution.md` only, or none
94
- - `Status`: amended or no-op
95
-
96
- ## Rules
97
-
98
- - NEVER edit, create, or delete any other `SKILL.md`, any file under `src/`, or
99
- any bundled/template asset — the ONLY writable target is
100
- `openspec/memory/constitution.md`.
101
- - NEVER auto-bump: there is no runtime parser, and no `Version:` change is
102
- written without explicit human confirmation via the blocking-input surface.
103
- - No-op when no principle change is warranted: report it and write nothing.
104
- - Preserve all existing constitution content and ALL prior `## Sync-Impact
105
- Report` entries; only PREPEND the new entry and update the version/date.
106
- - Propagation is report-only: document the consuming gates and flag in-flight
107
- change artifacts for human re-review; NEVER auto-fix them.