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,155 +0,0 @@
1
- ---
2
- name: sdd-design
3
- description: Create `design.md` as a technical solution design with architecture decisions and file changes.
4
- ---
5
-
6
- # SDD Design Skill
7
-
8
- Create the technical solution design that explains how the approved spec will
9
- be built. OpenSpec `design.md` is a technical approach artifact covering
10
- implementation architecture, tradeoffs, and repository patterns.
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
- - Proposal and specs exist and implementation planning needs technical depth
31
- - A prior design needs to be revised after spec changes
32
-
33
- This phase is not a UI/UX design task. Do not route this phase to the designer
34
- agent because it is named `design`; the default implementation owner is a
35
- technical write-capable role such as `deep`.
36
-
37
- ## Prerequisites
38
-
39
- - `change-name`
40
- - Proposal artifact
41
- - Spec artifact
42
- - Access to the repository code that will change
43
-
44
- ## Workflow
45
-
46
- 1. Read the shared conventions.
47
- 2. Recover `sdd/{change-name}/proposal` and `sdd/{change-name}/spec` using the
48
- retrieval protocol in
49
- the persistence contract.
50
- 3. If revising work, recover `sdd/{change-name}/design` with the same
51
- mode-aware retrieval rules.
52
- 4. Read the actual code paths affected by the change before deciding on an
53
- approach.
54
- 5. If the selected mode includes OpenSpec, write
55
- `openspec/changes/{change-name}/design.md` using this structure. In
56
- `thoth-mem` mode, produce the same content without creating the file:
57
-
58
- ```md
59
- # Design: {Change Title}
60
-
61
- ## Technical Approach
62
- ## Architecture Decisions
63
- ### Decision: {Title}
64
- **Choice**:
65
- **Alternatives considered**:
66
- **Rationale**:
67
- ## Data Flow
68
- ## File Changes
69
- ## Interfaces / Contracts
70
- ## Testing Strategy
71
- ## Migration / Rollout
72
- ## Open Questions
73
- ```
74
-
75
- 6. If the selected mode includes thoth-mem, persist the design with:
76
-
77
- Use the memory tool binding for `mem_save` with the canonical SDD topic key
78
- and required metadata fields: `title`, `topic_key`, `type`, `project`,
79
- `scope`, and `content`.
80
-
81
- ## Optional Sub-Artifacts
82
-
83
- Beyond the always-present `design.md`, `sdd-design` MAY produce optional plan
84
- sub-artifacts. They are gated by BOTH conditions, config as the hard floor and
85
- author judgment within the gate:
86
-
87
- - **Hard gate (config)**: `rules.design.sub_artifacts` MUST be `true`. When
88
- `false` or absent, NO sub-artifacts are ever produced (back-compat default).
89
- - **Complexity gate (config threshold, author-evaluated)**: when enabled, the
90
- change MUST meet `rules.design.complexity_threshold` (e.g. `affected_domains`,
91
- `affected_files`, `external_research` — eligible when ANY trigger is met). The
92
- threshold is the reviewable hard floor; the author still selects which (if any)
93
- sub-artifacts add value within the gate. An eligible change MAY still produce
94
- zero sub-artifacts.
95
-
96
- `design.md` is ALWAYS produced regardless of the gate. The optional types are:
97
-
98
- - `research.md` — only when there is genuine unknown investigation.
99
- - `data-model.md` — only when there is a non-trivial data shape.
100
- - `contracts/` (subdir) — only when there are interfaces to pin; follow the
101
- `checklists/` subdir as the precedent for change-dir subdirectory layout.
102
- - `quickstart.md` — only when a runnable smoke path helps.
103
-
104
- Note: the `clarify` phase now precedes design (`spec -> clarify -> design`), so
105
- design consumes the already-clarified spec.
106
-
107
- ## Constitution Check and Handoff Hints
108
-
109
- ### Consume upstream handoffHints
110
-
111
- At design start, surface the spec phase's `handoffHints` (recorded
112
- `## Assumptions` and `[NEEDS CLARIFICATION]` resolutions) and treat them as
113
- constraints the design must preserve. When the spec declared no hints, surface
114
- nothing. Surfacing is gated by `rules.handoffs.surface_hints`.
115
-
116
- ### Constitution Check self-review
117
-
118
- Before finalizing the design, run a Constitution Check self-review: evaluate the
119
- emerging design against EACH principle in `openspec/memory/constitution.md` —
120
- delegate-first coordination, read-only role boundaries, governed persistence,
121
- multi-harness parity, and evidence-led verification. Report any principle the
122
- design would violate.
123
-
124
- - On a detected violation, BLOCK finalization and surface the violated
125
- principle through the harness blocking-input surface (the
126
- AskUserQuestion-equivalent primitive). An explicit user override MUST be
127
- logged with the violated principle before proceeding. Gated by
128
- `rules.constitution.enforce_check`; when disabled, note the skip and do not
129
- block.
130
- - This self-review does not replace `plan-reviewer`'s independent Constitution
131
- Check; both run. See `_shared/openspec-convention.md` (Constitution
132
- Governance, Handoff Hints) for the canonical, harness-agnostic semantics.
133
-
134
- ## Output Format
135
-
136
- Return:
137
-
138
- - `Change`
139
- - `Artifact`: `openspec/changes/{change-name}/design.md`
140
- - `Topic Key`: `sdd/{change-name}/design`
141
- - `Key Decisions`: concise bullet list
142
- - `Files Planned`: created, modified, deleted paths
143
- - `Next Step`: `sdd-tasks`
144
-
145
- ## Rules
146
-
147
- - Base the design on the actual codebase, not generic assumptions.
148
- - Do not route this phase to the designer agent. `sdd-design` itself always
149
- stays with the technical write-capable agent.
150
- - Later `sdd-apply` tasks may route to the designer agent when the work is
151
- specifically user-facing UI, visual work, screenshots, or visual QA.
152
- - Every architecture decision must include rationale.
153
- - Use concrete file paths and interfaces.
154
- - Keep implementation details aligned with the spec and repository patterns.
155
- - Retrieve full dependencies with the protocol in the persistence contract.
@@ -1,233 +0,0 @@
1
- ---
2
- name: sdd-init
3
- description: Bootstrap OpenSpec structure and SDD context for a project.
4
- metadata:
5
- author: gentleman-programming
6
- version: "1.0"
7
- ---
8
-
9
- # SDD Init Skill
10
-
11
- Initialize SDD for a project by detecting local conventions, creating the
12
- minimal OpenSpec structure when needed, and persisting startup context.
13
-
14
- ## Shared Conventions
15
-
16
- - [../_shared/openspec-convention.md](../_shared/openspec-convention.md)
17
- - [../_shared/persistence-contract.md](../_shared/persistence-contract.md)
18
- - [../_shared/thoth-mem-convention.md](../_shared/thoth-mem-convention.md)
19
-
20
- ## Persistence Mode
21
-
22
- The orchestrator passes the artifact store mode (`thoth-mem`, `openspec`, or
23
- `hybrid`). Follow the persistence contract for read/write rules per mode.
24
-
25
- - `thoth-mem`: persist initialization context to thoth-mem only — do NOT create
26
- or modify `openspec/` files.
27
- - `openspec`: create or update OpenSpec structure only — do NOT call thoth-mem
28
- save tools.
29
- - `hybrid`: do both (default).
30
-
31
- ## When to Use
32
-
33
- - SDD is needed but `openspec/` is not initialized
34
- - `openspec/` exists but is stale: missing `config.yaml` mechanism sections
35
- (`constitution` / `consistency` / `requirements_quality` / `clarification` /
36
- `handoffs`), missing `tasks.traceability` / `tasks.parallel_markers` /
37
- `design.sub_artifacts` / `design.complexity_threshold` / `verify` toggles, or a
38
- missing `openspec/memory/constitution.md`
39
- - A new project needs initial OpenSpec conventions
40
- - The team wants detected stack/context captured before `sdd-propose`
41
-
42
- ## Prerequisites
43
-
44
- - Project root path
45
- - Project name
46
- - Selected persistence mode (default: `hybrid`)
47
-
48
- ## Workflow
49
-
50
- 1. Read the shared conventions before initializing.
51
- 2. Detect project stack and conventions from repository files:
52
- - Stack indicators: `package.json`, `go.mod`, `pyproject.toml`,
53
- `requirements.txt`, `Cargo.toml`, `pom.xml`, `build.gradle`,
54
- `composer.json`.
55
- - Testing indicators: `vitest.config.*`, `jest.config.*`,
56
- `playwright.config.*`, `pytest.ini`, `tox.ini`, `go test` conventions,
57
- `Cargo.toml` test crates.
58
- - Style indicators: `biome.json`, `.eslintrc*`, `eslint.config.*`,
59
- `.prettierrc*`, `ruff.toml`, `.golangci.*`, `rustfmt.toml`.
60
- - CI indicators: `.github/workflows/*`, `.gitlab-ci.yml`,
61
- `azure-pipelines.yml`, `.circleci/config.yml`.
62
- - Architecture hints: common layout markers such as `apps/`, `packages/`,
63
- `services/`, `src/`, `cmd/`, `internal/`.
64
- 3. Build concise config context (max 10 lines) using detected values. Use
65
- `unknown` for missing signals.
66
- 4. If the selected mode includes OpenSpec (`openspec` or `hybrid`), check
67
- whether these already exist:
68
- - `openspec/config.yaml`
69
- - `openspec/specs/`
70
- - `openspec/changes/`
71
- 5. If the required OpenSpec paths already exist, do not dead-end. Compute
72
- whether the project is fully aligned or stale, then realign additively:
73
- - **Fully aligned** (all paths present AND `config.yaml` already carries
74
- every mechanism section / toggle AND `openspec/memory/constitution.md`
75
- exists) -> report a no-op and return. Never overwrite by default.
76
- - **Stale / partial** (any piece below is absent) -> proceed to the
77
- additive backfill in steps 5a-5c. Never overwrite a value that is
78
- already present.
79
-
80
- 5a. Compute the per-piece *absent set* (detect each independently; treat a
81
- partially-present `openspec/` per-piece, not all-or-nothing):
82
- - missing `openspec/specs/`
83
- - missing `openspec/changes/` (and `changes/archive/`)
84
- - missing `config.yaml` mechanism sections: `constitution`,
85
- `consistency`, `requirements_quality`, `clarification`, `handoffs`
86
- - missing `config.yaml` toggles: `rules.tasks.traceability`,
87
- `rules.tasks.parallel_markers`, `rules.design.sub_artifacts`,
88
- `rules.design.complexity_threshold`,
89
- `rules.verify` (`test_command` / `build_command` /
90
- `coverage_threshold`)
91
- - missing `openspec/memory/constitution.md`
92
-
93
- 5b. For each absent piece, additively create or merge ONLY that piece using
94
- the canonical shapes defined in step 7 (`config.yaml`) and step 7a
95
- (`constitution.md`). Merge missing `config.yaml` sections into the
96
- existing file, preserving every present key and value verbatim. Never
97
- rewrite a value that is already present. Never renumber or recreate an
98
- existing `constitution.md` (see step 7a idempotency).
99
-
100
- 5c. Report exactly what was added (list each created path and each merged
101
- `config.yaml` section / toggle). If the absent set was empty, report a
102
- no-op instead.
103
- 6. If any required OpenSpec path is missing and mode includes OpenSpec, create
104
- only the minimum structure:
105
-
106
- ```text
107
- openspec/
108
- ├── config.yaml
109
- ├── specs/
110
- └── changes/
111
- └── archive/
112
- ```
113
-
114
- 7. Generate `openspec/config.yaml` dynamically with this shape:
115
-
116
- ```yaml
117
- schema: spec-driven
118
-
119
- context: |
120
- Tech stack: {detected}
121
- Architecture: {detected}
122
- Testing: {detected}
123
- Style: {detected}
124
-
125
- rules:
126
- proposal:
127
- - Include rollback plan for risky changes
128
- - Identify affected modules/packages
129
- spec:
130
- - Use RFC 2119 keywords (MUST, SHALL, SHOULD, MAY)
131
- - Use Given/When/Then scenarios
132
- design:
133
- guidance:
134
- - Document architecture decisions with rationale
135
- - Require a File Changes section
136
- sub_artifacts: false # optional design sub-artifacts (default off)
137
- complexity_threshold: # author-evaluated eligibility triggers (OR)
138
- affected_domains: 3
139
- affected_files: 12
140
- external_research: true
141
- tasks:
142
- guidance:
143
- - Group tasks by phase with hierarchical numbering
144
- - Keep tasks small enough to complete in one session
145
- tdd: false # TDD ordering flag (sdd-tasks-format)
146
- traceability: true # require [USN] + Spec: tag + Independent Test per task
147
- parallel_markers: false # [P] emission + executing-plans consumption (default off)
148
- apply:
149
- guidance:
150
- - Follow existing code patterns and conventions
151
- test_command: ''
152
- verify:
153
- test_command: ''
154
- build_command: ''
155
- coverage_threshold: 0
156
- archive:
157
- - Warn before merging destructive deltas
158
-
159
- # --- mechanism sections (spec-kit-rigor) ---
160
- constitution:
161
- path: openspec/memory/constitution.md
162
- enforce_check: true # Constitution Check gate blocks on violation
163
- version_policy: semver # MAJOR=remove/redefine, MINOR=add, PATCH=clarify
164
- consistency:
165
- enforce_block: true # CRITICAL findings block plan-review
166
- require_coverage_percentage: true
167
- requirements_quality:
168
- enforce_block: true # incomplete checklist blocks tasks phase
169
- dimensions: [completeness, clarity, measurability, testability]
170
- clarification:
171
- max_markers_per_spec: 3 # [NEEDS CLARIFICATION] cap enforced by plan-reviewer
172
- handoffs:
173
- surface_hints: true # surface SddPhaseContract.handoffHints at transitions
174
- ```
175
-
176
- Mixing bare `- item` list entries with `key: value` scalars under one key is
177
- invalid YAML; when a phase carries scalar toggles (`tasks`, `apply`,
178
- `verify`), put its guidance strings under a `guidance:` subkey.
179
-
180
- 7a. Bootstrap the project constitution at `openspec/memory/constitution.md`
181
- (mode includes OpenSpec):
182
- - **Absent** -> create it at `Version: 1.0.0` with `Ratified`/`Last-Amended`
183
- dates, the five native principles (delegate-first coordination, read-only
184
- role boundaries, governed persistence, multi-harness parity, evidence-led
185
- verification) each with Statement/Rationale/Gate Implications, and an empty
186
- `## Sync-Impact Report` section.
187
- - **Present** -> preserve the existing content AND its existing version
188
- unchanged; do NOT recreate or renumber it. This step is idempotent: a
189
- second `sdd-init` run on a repo whose `constitution.md` is at `2.1.0`
190
- leaves it at `2.1.0`.
191
- - **Semver bump policy** (manual, by whoever edits the constitution): MAJOR
192
- = a principle removed or redefined; MINOR = a principle added or guidance
193
- materially expanded; PATCH = clarification/wording. Each edit also appends
194
- a `## Sync-Impact Report` entry. No tooled auto-bump exists.
195
- - See `_shared/openspec-convention.md` (Constitution Governance) for the
196
- canonical artifact and gate semantics.
197
-
198
- 8. Never create placeholder SDD artifacts (`proposal.md`, `design.md`,
199
- `tasks.md`, or spec files) during initialization.
200
- 9. If the selected mode includes thoth-mem (`thoth-mem` or `hybrid`), persist
201
- the detected context and initialization status with:
202
-
203
- ```text
204
- Use the memory tool binding for `mem_save` with the canonical topic key and
205
- required metadata fields: `title`, `topic_key`, `type`, `project`,
206
- `scope`, and `content`.
207
-
208
- 10. In `hybrid` mode, initialization is complete only when both OpenSpec setup
209
- and thoth-mem persistence succeed.
210
-
211
- ## Output Format
212
-
213
- Return:
214
-
215
- - `Project`
216
- - `Mode`
217
- - `Detected Context`: stack, architecture, testing, style, CI
218
- - `OpenSpec Status`: initialized, already initialized, or skipped by mode
219
- - `Created Paths`: list of directories/files created (if any)
220
- - `Topic Key`: `sdd-init/{project-name}` when mode includes thoth-mem
221
- - `Next Step`: usually `sdd-propose`
222
-
223
- ## Rules
224
-
225
- - Realignment is strictly additive: when `openspec/` already exists, backfill
226
- only the absent pieces and NEVER overwrite a value that is already present.
227
- - An existing `constitution.md` is never renumbered or recreated; create it
228
- only when absent and otherwise preserve its content and version unchanged.
229
- - A re-run on a fully-aligned project is a reported no-op (no writes).
230
- - In `thoth-mem` mode, never create `openspec/` directories or files.
231
- - Keep `config.yaml` context concise (max 10 lines).
232
- - Detect and include CI, test, and style conventions in the context summary.
233
- - Never create placeholder spec/change files during init.
@@ -1,101 +0,0 @@
1
- ---
2
- name: sdd-propose
3
- description: Create or update `proposal.md` for an OpenSpec change.
4
- ---
5
-
6
- # SDD Propose Skill
7
-
8
- Create the proposal artifact for a change and persist it with thoth-mem.
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
- - A change needs its first `proposal.md`
29
- - An existing proposal must be refined after new requirements
30
-
31
- ## Prerequisites
32
-
33
- - A `change-name`
34
- - User intent, problem statement, or prior exploration notes
35
- - Project name for thoth-mem persistence
36
-
37
- ## Workflow
38
-
39
- 1. Read the shared conventions before drafting.
40
- 2. If the change already exists, recover the latest proposal using the
41
- retrieval protocol from the persistence contract.
42
- 3. Review relevant main specs under the active OpenSpec path to avoid
43
- proposing contradictions.
44
- 4. If the selected mode includes OpenSpec, write
45
- `openspec/changes/{change-name}/proposal.md` using this shape. In
46
- `thoth-mem` mode, produce the same content without creating the file:
47
-
48
- ```md
49
- # Proposal: {Change Title}
50
-
51
- ## Intent
52
- ## Scope
53
- ### In Scope
54
- ### Deferred / Needs Discovery
55
- ### Out of Scope
56
- ## Approach
57
- ## Affected Areas
58
- ## Risks
59
- ## Rollback Plan
60
- ## Success Criteria
61
- ```
62
-
63
- 5. If the selected mode includes thoth-mem, persist the full proposal with:
64
-
65
- Use the memory tool binding for `mem_save` with the canonical SDD topic key
66
- and required metadata fields: `title`, `topic_key`, `type`, `project`,
67
- `scope`, and `content`.
68
-
69
- 6. In `hybrid` mode, both the filesystem artifact and thoth-mem save must
70
- succeed.
71
-
72
- ## Output Format
73
-
74
- Return a short report with:
75
-
76
- - `Change`: change name
77
- - `Artifact`: `openspec/changes/{change-name}/proposal.md`
78
- - `Topic Key`: `sdd/{change-name}/proposal`
79
- - `Summary`: 2-4 bullets covering intent, scope, and major risks
80
- - `Next Step`: `sdd-spec` (full pipeline) or `sdd-tasks` (accelerated pipeline)
81
-
82
- ## Rules
83
-
84
- - Use canonical OpenSpec filenames only.
85
- - Keep the proposal focused on why, scope, and success criteria.
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.
98
- - Never reference engram.
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.
@@ -1,136 +0,0 @@
1
- ---
2
- name: sdd-spec
3
- description: Write OpenSpec delta specs with RFC 2119 language and GWT scenarios.
4
- ---
5
-
6
- # SDD Spec Skill
7
-
8
- Write or update the change specifications for one or more affected domains.
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
- - A proposal is approved and must be converted into testable requirements
29
- - Existing change specs need to be expanded or corrected
30
-
31
- > Boundary: residual ambiguity that surfaces after spec authoring is resolved by
32
- > the `sdd-clarify` phase (between `spec` and `design`), not here — spec
33
- > authoring behavior itself is unchanged.
34
-
35
- ## Prerequisites
36
-
37
- - `change-name`
38
- - The proposal artifact must exist
39
- - Access to any current main specs for impacted domains
40
-
41
- ## Workflow
42
-
43
- 1. Read the shared conventions.
44
- 2. Recover the proposal using the retrieval protocol in
45
- the persistence contract.
46
- 3. If the change already has spec work, recover `sdd/{change-name}/spec` with
47
- the same mode-aware retrieval rules before editing.
48
- 4. Read `openspec/specs/{domain}/spec.md` for each affected domain to determine
49
- whether you are writing a delta spec or a brand-new spec.
50
- 5. If the selected mode includes OpenSpec, write canonical change artifacts
51
- under `openspec/changes/{change-name}/specs/{domain}/spec.md`. In
52
- `thoth-mem` mode, produce the same canonical content without creating files.
53
- 6. Use this structure in every spec file:
54
-
55
- ```md
56
- # Delta for {Domain}
57
-
58
- ## ADDED Requirements
59
- ### Requirement: {Name}
60
- The system MUST ...
61
-
62
- #### Scenario: {Name}
63
- - GIVEN ...
64
- - WHEN ...
65
- - THEN ...
66
-
67
- ## MODIFIED Requirements
68
- ## REMOVED Requirements
69
- ```
70
-
71
- For a brand-new domain, write a full spec instead of a delta.
72
-
73
- 7. If the selected mode includes thoth-mem, persist the complete spec payload
74
- with:
75
-
76
- Use the memory tool binding for `mem_save` with the canonical SDD topic key
77
- and required metadata fields: `title`, `topic_key`, `type`, `project`,
78
- `scope`, and `content`.
79
-
80
- ## Clarification Discipline and Requirements-Quality Checklist
81
-
82
- Follow these mechanisms (canonical definitions in
83
- `_shared/openspec-convention.md` — Clarification Discipline and
84
- Requirements-Quality Checklist). All are gated by their `config.yaml rules:`
85
- sections.
86
-
87
- ### `[NEEDS CLARIFICATION]` markers and Assumptions
88
-
89
- - Use `[NEEDS CLARIFICATION: <concrete question>]` ONLY for a genuine decision
90
- fork where no single default is defensible. The marker text MUST name the
91
- specific unresolved decision, not a vague placeholder.
92
- - Cap markers at `rules.clarification.max_markers_per_spec` (default 3) per spec
93
- file.
94
- - Informed-guess-first: when an ambiguity has a defensible default, APPLY the
95
- default and record it in an `## Assumptions` section of the spec rather than
96
- emitting a marker. Do not silently default a genuine fork.
97
-
98
- ### Generate `checklists/requirements.md`
99
-
100
- At or after authoring the delta specs, generate
101
- `openspec/changes/{change-name}/checklists/requirements.md` ("unit tests for
102
- English"):
103
-
104
- - One `## Domain: {domain}` section per authored delta domain.
105
- - Each domain section carries checkbox items across the four dimensions:
106
- completeness, clarity, measurability, testability.
107
- - Items use the task checkbox states (`- [ ]` / `- [x]` / `- [-] waived:
108
- reason`).
109
- - The spec->tasks transition is gated on every item being `- [x]` or explicitly
110
- waived (gated by `rules.requirements_quality.enforce_block`).
111
-
112
- ### Declare handoffHints
113
-
114
- Declare `handoffHints` for the design phase: the recorded `## Assumptions` and
115
- any unresolved `[NEEDS CLARIFICATION]` resolutions the design phase must
116
- preserve. Surfacing is gated by `rules.handoffs.surface_hints`.
117
-
118
- ## Output Format
119
-
120
- Return:
121
-
122
- - `Change`
123
- - `Artifacts`: list of domain spec paths written
124
- - `Checklist`: `openspec/changes/{change-name}/checklists/requirements.md`
125
- - `Topic Key`: `sdd/{change-name}/spec`
126
- - `Coverage Summary`: requirements and scenarios added or modified
127
- - `Next Step`: usually `sdd-design`
128
-
129
- ## Rules
130
-
131
- - Every requirement must use RFC 2119 keywords.
132
- - Every requirement must have at least one Given/When/Then scenario.
133
- - Specs describe behavior, not implementation details.
134
- - Keep domain boundaries explicit.
135
- - Use the retrieval protocol from the persistence contract for every SDD
136
- dependency.