oh-my-opencode-lite 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +365 -0
  3. package/dist/agents/deep.d.ts +2 -0
  4. package/dist/agents/designer.d.ts +2 -0
  5. package/dist/agents/explorer.d.ts +2 -0
  6. package/dist/agents/index.d.ts +8 -0
  7. package/dist/agents/librarian.d.ts +2 -0
  8. package/dist/agents/oracle.d.ts +2 -0
  9. package/dist/agents/orchestrator.d.ts +15 -0
  10. package/dist/agents/prompt-utils.d.ts +10 -0
  11. package/dist/agents/quick.d.ts +2 -0
  12. package/dist/background/background-manager.d.ts +196 -0
  13. package/dist/background/index.d.ts +2 -0
  14. package/dist/background/tmux-session-manager.d.ts +63 -0
  15. package/dist/cli/config-io.d.ts +22 -0
  16. package/dist/cli/config-manager.d.ts +4 -0
  17. package/dist/cli/custom-skills.d.ts +48 -0
  18. package/dist/cli/index.d.ts +2 -0
  19. package/dist/cli/index.js +1178 -0
  20. package/dist/cli/install.d.ts +3 -0
  21. package/dist/cli/model-key-normalization.d.ts +1 -0
  22. package/dist/cli/paths.d.ts +21 -0
  23. package/dist/cli/providers.d.ts +120 -0
  24. package/dist/cli/skill-manifest.d.ts +32 -0
  25. package/dist/cli/skills.d.ts +26 -0
  26. package/dist/cli/system.d.ts +6 -0
  27. package/dist/cli/types.d.ts +38 -0
  28. package/dist/config/constants.d.ts +19 -0
  29. package/dist/config/index.d.ts +5 -0
  30. package/dist/config/loader.d.ts +33 -0
  31. package/dist/config/schema.d.ts +313 -0
  32. package/dist/config/utils.d.ts +10 -0
  33. package/dist/delegation/delegation-manager.d.ts +25 -0
  34. package/dist/delegation/index.d.ts +4 -0
  35. package/dist/delegation/paths.d.ts +15 -0
  36. package/dist/delegation/project-id.d.ts +1 -0
  37. package/dist/delegation/types.d.ts +39 -0
  38. package/dist/hooks/auto-update-checker/cache.d.ts +6 -0
  39. package/dist/hooks/auto-update-checker/checker.d.ts +28 -0
  40. package/dist/hooks/auto-update-checker/constants.d.ts +11 -0
  41. package/dist/hooks/auto-update-checker/index.d.ts +17 -0
  42. package/dist/hooks/auto-update-checker/types.d.ts +23 -0
  43. package/dist/hooks/chat-headers.d.ts +16 -0
  44. package/dist/hooks/clarification-gate/index.d.ts +30 -0
  45. package/dist/hooks/delegate-task-retry/guidance.d.ts +2 -0
  46. package/dist/hooks/delegate-task-retry/hook.d.ts +8 -0
  47. package/dist/hooks/delegate-task-retry/index.d.ts +4 -0
  48. package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
  49. package/dist/hooks/foreground-fallback/index.d.ts +72 -0
  50. package/dist/hooks/index.d.ts +11 -0
  51. package/dist/hooks/json-error-recovery/hook.d.ts +18 -0
  52. package/dist/hooks/json-error-recovery/index.d.ts +1 -0
  53. package/dist/hooks/phase-reminder/index.d.ts +26 -0
  54. package/dist/hooks/post-read-nudge/index.d.ts +18 -0
  55. package/dist/hooks/skill-sync.d.ts +10 -0
  56. package/dist/hooks/thoth-mem/index.d.ts +46 -0
  57. package/dist/hooks/thoth-mem/protocol.d.ts +6 -0
  58. package/dist/index.d.ts +5 -0
  59. package/dist/index.js +36210 -0
  60. package/dist/mcp/context7.d.ts +6 -0
  61. package/dist/mcp/grep-app.d.ts +6 -0
  62. package/dist/mcp/index.d.ts +7 -0
  63. package/dist/mcp/thoth.d.ts +3 -0
  64. package/dist/mcp/types.d.ts +12 -0
  65. package/dist/mcp/websearch.d.ts +6 -0
  66. package/dist/thoth/client.d.ts +14 -0
  67. package/dist/thoth/index.d.ts +2 -0
  68. package/dist/tools/ast-grep/cli.d.ts +15 -0
  69. package/dist/tools/ast-grep/constants.d.ts +25 -0
  70. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  71. package/dist/tools/ast-grep/index.d.ts +10 -0
  72. package/dist/tools/ast-grep/tools.d.ts +3 -0
  73. package/dist/tools/ast-grep/types.d.ts +30 -0
  74. package/dist/tools/ast-grep/utils.d.ts +4 -0
  75. package/dist/tools/background.d.ts +13 -0
  76. package/dist/tools/index.d.ts +3 -0
  77. package/dist/tools/lsp/client.d.ts +42 -0
  78. package/dist/tools/lsp/config-store.d.ts +29 -0
  79. package/dist/tools/lsp/config.d.ts +4 -0
  80. package/dist/tools/lsp/constants.d.ts +24 -0
  81. package/dist/tools/lsp/index.d.ts +4 -0
  82. package/dist/tools/lsp/tools.d.ts +5 -0
  83. package/dist/tools/lsp/types.d.ts +35 -0
  84. package/dist/tools/lsp/utils.d.ts +34 -0
  85. package/dist/utils/agent-variant.d.ts +47 -0
  86. package/dist/utils/env.d.ts +1 -0
  87. package/dist/utils/index.d.ts +7 -0
  88. package/dist/utils/internal-initiator.d.ts +6 -0
  89. package/dist/utils/logger.d.ts +1 -0
  90. package/dist/utils/polling.d.ts +21 -0
  91. package/dist/utils/tmux.d.ts +32 -0
  92. package/dist/utils/zip-extractor.d.ts +1 -0
  93. package/oh-my-opencode-lite.schema.json +556 -0
  94. package/package.json +74 -0
  95. package/src/skills/_shared/openspec-convention.md +92 -0
  96. package/src/skills/_shared/persistence-contract.md +78 -0
  97. package/src/skills/_shared/thoth-mem-convention.md +80 -0
  98. package/src/skills/brainstorming/SKILL.md +120 -0
  99. package/src/skills/cartography/README.md +57 -0
  100. package/src/skills/cartography/SKILL.md +160 -0
  101. package/src/skills/cartography/scripts/cartographer.py +460 -0
  102. package/src/skills/cartography/scripts/test_cartographer.py +87 -0
  103. package/src/skills/executing-plans/SKILL.md +211 -0
  104. package/src/skills/plan-reviewer/SKILL.md +100 -0
  105. package/src/skills/sdd-apply/SKILL.md +101 -0
  106. package/src/skills/sdd-archive/SKILL.md +94 -0
  107. package/src/skills/sdd-design/SKILL.md +104 -0
  108. package/src/skills/sdd-propose/SKILL.md +99 -0
  109. package/src/skills/sdd-spec/SKILL.md +105 -0
  110. package/src/skills/sdd-tasks/SKILL.md +116 -0
  111. package/src/skills/sdd-verify/SKILL.md +102 -0
@@ -0,0 +1,211 @@
1
+ ---
2
+ name: executing-plans
3
+ description: Execute SDD task lists with real-time progress tracking, sub-agent dispatch, and verification checkpoints.
4
+ metadata:
5
+ author: oh-my-opencode-lite
6
+ version: '1.0'
7
+ ---
8
+
9
+ # Executing Plans Skill
10
+
11
+ Use this skill to execute an existing SDD task list end to end while keeping
12
+ task progress durable, ordered, and verifiable.
13
+
14
+ ## Shared Conventions
15
+
16
+ - `~/.config/opencode/skills/_shared/openspec-convention.md`
17
+ - `~/.config/opencode/skills/_shared/persistence-contract.md`
18
+ - `~/.config/opencode/skills/_shared/thoth-mem-convention.md`
19
+
20
+ ## Ownership Model
21
+
22
+ The orchestrator owns task progress tracking.
23
+
24
+ - The orchestrator marks `- [ ]` to `- [~]` before dispatching execution work.
25
+ - The orchestrator marks `- [~]` to `- [x]` only after successful results are
26
+ received and verified.
27
+ - The orchestrator marks `- [-]` with a clear reason when a task is skipped or
28
+ fails after escalation.
29
+ - `openspec/` files are coordination artifacts, not source code. The
30
+ orchestrator may read and edit them directly for progress tracking and state
31
+ management.
32
+
33
+ Sub-agents execute assigned work and return structured results. They do not own
34
+ checkbox updates.
35
+
36
+ ## When to Use
37
+
38
+ - Executing an SDD task list
39
+ - Resuming work from a previous session
40
+ - Multi-task implementation with an existing change already defined
41
+
42
+ ## Workflow
43
+
44
+ ### Phase 1: Load
45
+
46
+ 1. Scan `openspec/changes/` for active changes.
47
+ 2. Read `tasks.md` and find the first unchecked task in state `- [ ]` or
48
+ `- [~]`.
49
+ 3. Build a mental model of the plan: total tasks, remaining work,
50
+ parallelizable work, and dependency order.
51
+ 4. Load SDD context from the change directory plus thoth-mem fallback using the
52
+ retrieval protocol in
53
+ `~/.config/opencode/skills/_shared/persistence-contract.md`.
54
+ 5. Determine the artifact store mode from config before reading or writing any
55
+ SDD artifacts.
56
+
57
+ ### Phase 2: Execute Each Task
58
+
59
+ #### A. Mark In-Progress
60
+
61
+ Before dispatching a task:
62
+
63
+ 1. Edit the canonical tasks artifact and change the current task from
64
+ `- [ ]` to `- [~]`.
65
+ 2. If the mode is `thoth-mem` or `hybrid`, re-persist the updated tasks
66
+ artifact with topic key `sdd/{change-name}/tasks`.
67
+ 3. Re-read `tasks.md` after the edit to confirm the change persisted.
68
+
69
+ #### B. Dispatch
70
+
71
+ Choose the execution agent based on task type:
72
+
73
+ | Need | Agent |
74
+ | --- | --- |
75
+ | Broad codebase discovery | `@explorer` |
76
+ | External docs or APIs | `@librarian` |
77
+ | Architecture or debugging | `@oracle` |
78
+ | UI or UX work | `@designer` |
79
+ | Simple, precise changes | `@quick` |
80
+ | Complex, multi-file changes | `@deep` |
81
+
82
+ Every dispatch prompt MUST include these 6 parts:
83
+
84
+ 1. `TASK` — exact task number and title
85
+ 2. `CONTEXT` — relevant proposal, spec, design, and prior-task state
86
+ 3. `REQUIREMENTS` — concrete outcomes and constraints
87
+ 4. `BOUNDARIES` — files, scope limits, and non-goals
88
+ 5. `VERIFICATION` — checks the sub-agent must run or report
89
+ 6. `RETURN ENVELOPE` — the exact structured response contract in this skill
90
+
91
+ #### C. Receive and Verify
92
+
93
+ Read the sub-agent return envelope and respond by status:
94
+
95
+ - `completed`: inspect the reported file changes, run verification checks, and
96
+ confirm the task acceptance criteria were actually met.
97
+ - `failed`: assess the blocker, decide whether to retry with sharper guidance,
98
+ switch agents, or escalate.
99
+ - `partial`: assess what is already done, preserve that context, and dispatch a
100
+ focused follow-up for the remainder.
101
+
102
+ #### D. Mark Complete
103
+
104
+ After verified completion:
105
+
106
+ 1. Edit the canonical tasks artifact and change the task from `- [~]` to
107
+ `- [x]`.
108
+ 2. If the mode is `thoth-mem` or `hybrid`, re-persist the updated tasks
109
+ artifact under `sdd/{change-name}/tasks`.
110
+ 3. Persist a progress checkpoint under `sdd/{change-name}/apply-progress` when
111
+ the mode includes thoth-mem.
112
+ 4. Re-read `tasks.md` after the edit to confirm the completed state persisted.
113
+
114
+ #### E. Auto-Continue
115
+
116
+ Immediately proceed to the next task.
117
+
118
+ Do not ask the user whether execution should continue unless one of these is
119
+ true:
120
+
121
+ - the work is truly blocked
122
+ - a critical failure prevents safe continuation
123
+ - the current task has failed 3 consecutive times
124
+
125
+ ### Phase 3: Between Tasks
126
+
127
+ Between every task:
128
+
129
+ 1. Re-read `tasks.md` because later tasks may depend on earlier outputs.
130
+ 2. Re-check that assumptions still hold.
131
+ 3. If a prior task introduced breakage, fix that before starting the next task.
132
+
133
+ ### Phase 4: Escalation Policy
134
+
135
+ - Attempt 1: re-dispatch the same task with explicit fix instructions and the
136
+ missing evidence called out.
137
+ - Attempt 2: switch to a different agent or fix directly when appropriate.
138
+ - Attempt 3: make one final targeted attempt with narrowed scope.
139
+ - After 3 consecutive failures, mark the task `- [-]` with a clear reason and
140
+ escalate to the user.
141
+
142
+ ### Phase 5: Completion
143
+
144
+ After the task list is complete:
145
+
146
+ 1. Run full verification: build, typecheck, tests, and lint using the project's
147
+ configured commands.
148
+ 2. Report a completion summary with evidence.
149
+ 3. If the work is SDD-backed, suggest `sdd-verify` as the next step.
150
+
151
+ ## Return Envelope Contract
152
+
153
+ Every execution sub-agent MUST return this exact structure:
154
+
155
+ ```markdown
156
+ ## Task Result
157
+
158
+ **Status**: completed | failed | partial
159
+ **Task**: {task number and name}
160
+
161
+ ### What was done
162
+ - {concrete change 1}
163
+ - {concrete change 2}
164
+
165
+ ### Files changed
166
+ - `path/to/file.ts` — {what changed}
167
+
168
+ ### Verification
169
+ - {check 1}: passed | failed
170
+ - {check 2}: passed | failed
171
+
172
+ ### Issues (if any)
173
+ - {issue description} — {severity: critical | important | minor}
174
+
175
+ ### Failure reason (if failed)
176
+ {Why it failed, what was attempted, what blocked progress}
177
+
178
+ ### Skip reason (if skipped)
179
+ {Why it was skipped, what prerequisite is missing}
180
+ ```
181
+
182
+ Treat missing sections or vague summaries as incomplete execution results.
183
+
184
+ ## Recovery Protocol
185
+
186
+ To resume safely:
187
+
188
+ 1. Read `openspec/changes/` to identify active changes.
189
+ 2. Read `openspec/changes/{change-name}/tasks.md` and inspect checkbox state.
190
+ 3. If the mode includes thoth-mem, recover `sdd/{change-name}/apply-progress`
191
+ and `sdd/{change-name}/tasks` with the exact topic-key protocol.
192
+ 4. Resume from the first task marked `- [ ]` or `- [~]`.
193
+
194
+ ## Progress Tracking Rules
195
+
196
+ 1. Before dispatching, change `- [ ]` to `- [~]`.
197
+ 2. After verified completion, change `- [~]` to `- [x]`.
198
+ 3. After 3 retries, change the task to `- [-]` and add the explicit reason.
199
+ 4. Never batch-update multiple checkboxes at once.
200
+ 5. Never proceed without updating the current task state first.
201
+ 6. Re-read `tasks.md` after each edit to confirm persistence.
202
+
203
+ ## Guardrails
204
+
205
+ - Do not execute tasks out of dependency order.
206
+ - Do not mark a task complete without verification evidence.
207
+ - Do not skip SDD context recovery.
208
+ - Do not modify task-list structure; only update checkbox state and explicit skip
209
+ reasons.
210
+ - Do not continue past a blocked task without escalation.
211
+ - Do not claim completion without evidence.
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: plan-reviewer
3
+ description: Review SDD task plans for execution blockers and return [OKAY] or [REJECT].
4
+ metadata:
5
+ author: oh-my-opencode-lite
6
+ version: '1.0'
7
+ ---
8
+
9
+ # Plan Reviewer Skill
10
+
11
+ Verify that an SDD task plan is executable, references valid files, and is safe
12
+ to hand to implementation.
13
+
14
+ ## Shared Conventions
15
+
16
+ - `~/.config/opencode/skills/_shared/openspec-convention.md`
17
+ - `~/.config/opencode/skills/_shared/persistence-contract.md`
18
+ - `~/.config/opencode/skills/_shared/thoth-mem-convention.md`
19
+
20
+ ## Purpose
21
+
22
+ Review `openspec/changes/{change-name}/tasks.md` for true execution blockers.
23
+ Focus on whether the plan can be executed as written, not whether you would have
24
+ designed it differently.
25
+
26
+ ## Inputs
27
+
28
+ - `change-name`
29
+ - `openspec/changes/{change-name}/tasks.md`
30
+ - Related proposal, spec, and design artifacts when needed for dependency checks
31
+
32
+ ## Task State Awareness
33
+
34
+ Recognize these checklist states in `tasks.md`:
35
+
36
+ - `- [ ]` pending
37
+ - `- [~]` in progress
38
+ - `- [x]` completed
39
+ - `- [-]` skipped with reason
40
+
41
+ Review executability of the remaining work. If a task is marked `- [-]`, ensure
42
+ the skip reason is explicit and does not hide a blocker.
43
+
44
+ ## Review Checklist
45
+
46
+ Check only what affects executability:
47
+
48
+ 1. Referenced file paths exist when they are supposed to already exist.
49
+ 2. New-file tasks use exact intended paths.
50
+ 3. Tasks reference exact file paths instead of vague areas.
51
+ 4. Each task includes a `Verification` section.
52
+ 5. Each `Verification` section includes both:
53
+ - `Run:`
54
+ - `Expected:`
55
+ 6. Dependency order is valid.
56
+ 7. The sequence is workable without hidden prerequisite steps.
57
+
58
+ ## Decision Rules
59
+
60
+ - Default to `[OKAY]`.
61
+ - Use `[REJECT]` only for true blockers.
62
+ - A rejection may list at most 3 issues.
63
+ - Do not reject for style preferences or optional improvements.
64
+
65
+ ## Output Format
66
+
67
+ If the plan is executable:
68
+
69
+ ```text
70
+ [OKAY]
71
+ - Brief confirmation that the plan is executable.
72
+ - Optional note on any non-blocking caution.
73
+ ```
74
+
75
+ If the plan has blockers:
76
+
77
+ ```text
78
+ [REJECT]
79
+ 1. <blocking issue>
80
+ 2. <blocking issue>
81
+ 3. <blocking issue>
82
+ ```
83
+
84
+ For each rejected issue, include:
85
+
86
+ - why it blocks execution
87
+ - the smallest concrete fix
88
+
89
+ ## Anti-Patterns
90
+
91
+ - No nitpicking.
92
+ - No style opinions.
93
+ - No design questioning.
94
+ - No expanding the scope of review beyond blockers.
95
+ - Do not return more than 3 rejection issues.
96
+
97
+ ## Review Standard
98
+
99
+ Approve when a competent implementer can execute the plan without guessing about
100
+ critical paths, missing files, or missing verification instructions.
@@ -0,0 +1,101 @@
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 references:
14
+ - `~/.config/opencode/skills/_shared/openspec-convention.md`
15
+ - `~/.config/opencode/skills/_shared/persistence-contract.md`
16
+ - `~/.config/opencode/skills/_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
22
+ `~/.config/opencode/skills/_shared/persistence-contract.md` for read/write
23
+ rules per mode.
24
+
25
+ - `thoth-mem`: persist to thoth-mem only — do NOT create or modify
26
+ `openspec/` files.
27
+ - `openspec`: write files only — do NOT call thoth-mem save tools.
28
+ - `hybrid`: persist to both (default).
29
+
30
+ ## When to Use
31
+
32
+ - A change has a task plan and implementation should begin or resume
33
+ - A batch of checklist items must be executed and reported back to the
34
+ orchestrator
35
+
36
+ ## Prerequisites
37
+
38
+ - `change-name`
39
+ - Assigned task numbers or phase range
40
+ - Spec, design, and task artifacts
41
+
42
+ ## Workflow
43
+
44
+ 1. Read the shared conventions.
45
+ 2. Recover `spec`, `design`, and `tasks` with the retrieval protocol in
46
+ `~/.config/opencode/skills/_shared/persistence-contract.md`.
47
+ 3. Read the affected code before editing anything.
48
+ 4. Execute only the assigned checklist items.
49
+ 5. In modes that include thoth-mem, persist an implementation progress report
50
+ with:
51
+
52
+ ```text
53
+ thoth_mem_mem_save(
54
+ title: "sdd/{change-name}/apply-progress",
55
+ topic_key: "sdd/{change-name}/apply-progress",
56
+ type: "architecture",
57
+ project: "{project}",
58
+ scope: "project",
59
+ content: "{progress report markdown}"
60
+ )
61
+ ```
62
+
63
+ 6. If the orchestrator requests it, include enough detail for it to update the
64
+ canonical tasks artifact and memory checkpoints accurately.
65
+
66
+ ## Response Format
67
+
68
+ Return a structured result to the orchestrator:
69
+
70
+ **Status**: completed | failed | partial
71
+ **Task**: {task reference}
72
+ **What was done**: {list of concrete changes}
73
+ **Files changed**: {paths with descriptions}
74
+ **Verification**: {check results}
75
+ **Issues**: {any problems encountered}
76
+ **Failure/Skip reason**: {if applicable}
77
+
78
+ Progress tracking (checkbox state updates) is managed by the orchestrator
79
+ via the `executing-plans` skill. Do not update task checkboxes yourself.
80
+
81
+ ## Output Format
82
+
83
+ Return:
84
+
85
+ - `Change`
86
+ - `Completed Tasks`: assigned items completed or partially completed
87
+ - `Files Changed`: concise table or bullets
88
+ - `Progress Topic Key`: `sdd/{change-name}/apply-progress` when applicable
89
+ - `Remaining Work`: next known pending work or blockers
90
+
91
+ ## Rules
92
+
93
+ - Read specs before implementing; they are the acceptance contract.
94
+ - Follow the design unless you explicitly report a justified deviation.
95
+ - Update only the tasks assigned in the current batch.
96
+ - Persist the progress artifact whenever the selected mode includes thoth-mem.
97
+ - Retrieve every SDD dependency with the mode-aware protocol in
98
+ `~/.config/opencode/skills/_shared/persistence-contract.md`.
99
+ - Return structured execution evidence to the orchestrator so it can manage task
100
+ state correctly.
101
+ - Never reference engram.
@@ -0,0 +1,94 @@
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 references:
14
+ - `~/.config/opencode/skills/_shared/openspec-convention.md`
15
+ - `~/.config/opencode/skills/_shared/persistence-contract.md`
16
+ - `~/.config/opencode/skills/_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
22
+ `~/.config/opencode/skills/_shared/persistence-contract.md` for read/write
23
+ rules per mode.
24
+
25
+ - `thoth-mem`: persist to thoth-mem only — do NOT create or modify
26
+ `openspec/` files.
27
+ - `openspec`: write files only — do NOT call thoth-mem save tools.
28
+ - `hybrid`: persist to both (default).
29
+
30
+ ## When to Use
31
+
32
+ - The change has an acceptable verification report and is ready to close
33
+ - An archive attempt must be retried after an interrupted move or merge
34
+
35
+ ## Prerequisites
36
+
37
+ - `change-name`
38
+ - Spec artifact
39
+ - Design artifact
40
+ - Tasks artifact
41
+ - Verify report artifact
42
+
43
+ ## Workflow
44
+
45
+ 1. Read the shared conventions.
46
+ 2. Recover `spec`, `design`, `tasks`, and `verify-report` through the
47
+ retrieval protocol in
48
+ `~/.config/opencode/skills/_shared/persistence-contract.md`.
49
+ 3. Refuse to archive if the verification report still contains unresolved
50
+ critical failures.
51
+ 4. If the selected mode includes OpenSpec, merge every change spec from
52
+ `openspec/changes/{change-name}/specs/{domain}/spec.md` into
53
+ `openspec/specs/{domain}/spec.md`.
54
+ 5. If the selected mode includes OpenSpec, move the completed change directory
55
+ to `openspec/changes/archive/YYYY-MM-DD-{change-name}/`.
56
+ 6. Create an audit trail report summarizing merged domains, archive location,
57
+ verification lineage, and any mode-based skips.
58
+ 7. In `thoth-mem` mode, do not create or move `openspec/` artifacts; record the
59
+ archive result only in the audit trail.
60
+ 8. If the selected mode includes thoth-mem, persist the audit trail with:
61
+
62
+ ```text
63
+ thoth_mem_mem_save(
64
+ title: "sdd/{change-name}/archive-report",
65
+ topic_key: "sdd/{change-name}/archive-report",
66
+ type: "architecture",
67
+ project: "{project}",
68
+ scope: "project",
69
+ content: "{full archive report markdown}"
70
+ )
71
+ ```
72
+
73
+ ## Output Format
74
+
75
+ Return:
76
+
77
+ - `Change`
78
+ - `Archive Path`: `openspec/changes/archive/YYYY-MM-DD-{change-name}/`
79
+ - `Topic Key`: `sdd/{change-name}/archive-report`
80
+ - `Merged Specs`: list of domains updated in `openspec/specs/`
81
+ - `Audit Summary`: concise bullets
82
+ - `Status`: archived or blocked
83
+
84
+ ## Rules
85
+
86
+ - Archive only after verification is acceptable.
87
+ - Merge delta specs before moving the change folder.
88
+ - Preserve canonical spec structure and untouched requirements.
89
+ - Persist the final audit trail through thoth-mem when the selected mode
90
+ includes it.
91
+ - Use the retrieval protocol in
92
+ `~/.config/opencode/skills/_shared/persistence-contract.md` for every
93
+ dependency.
94
+ - Never reference engram.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: sdd-design
3
+ description: Create `design.md` with architecture decisions and file changes.
4
+ ---
5
+
6
+ # SDD Design Skill
7
+
8
+ Create the technical design that explains how the approved spec will be built.
9
+
10
+ ## Shared Conventions
11
+
12
+ - Shared references:
13
+ - `~/.config/opencode/skills/_shared/openspec-convention.md`
14
+ - `~/.config/opencode/skills/_shared/persistence-contract.md`
15
+ - `~/.config/opencode/skills/_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
21
+ `~/.config/opencode/skills/_shared/persistence-contract.md` for read/write
22
+ rules per mode.
23
+
24
+ - `thoth-mem`: persist to thoth-mem only — do NOT create or modify
25
+ `openspec/` files.
26
+ - `openspec`: write files only — do NOT call thoth-mem save tools.
27
+ - `hybrid`: persist to both (default).
28
+
29
+ ## When to Use
30
+
31
+ - Proposal and specs exist and implementation planning needs technical depth
32
+ - A prior design needs to be revised after spec changes
33
+
34
+ ## Prerequisites
35
+
36
+ - `change-name`
37
+ - Proposal artifact
38
+ - Spec artifact
39
+ - Access to the repository code that will change
40
+
41
+ ## Workflow
42
+
43
+ 1. Read the shared conventions.
44
+ 2. Recover `sdd/{change-name}/proposal` and `sdd/{change-name}/spec` using the
45
+ retrieval protocol in
46
+ `~/.config/opencode/skills/_shared/persistence-contract.md`.
47
+ 3. If revising work, recover `sdd/{change-name}/design` with the same
48
+ mode-aware retrieval rules.
49
+ 4. Read the actual code paths affected by the change before deciding on an
50
+ approach.
51
+ 5. If the selected mode includes OpenSpec, write
52
+ `openspec/changes/{change-name}/design.md` using this structure. In
53
+ `thoth-mem` mode, produce the same content without creating the file:
54
+
55
+ ```md
56
+ # Design: {Change Title}
57
+
58
+ ## Technical Approach
59
+ ## Architecture Decisions
60
+ ### Decision: {Title}
61
+ **Choice**:
62
+ **Alternatives considered**:
63
+ **Rationale**:
64
+ ## Data Flow
65
+ ## File Changes
66
+ ## Interfaces / Contracts
67
+ ## Testing Strategy
68
+ ## Migration / Rollout
69
+ ## Open Questions
70
+ ```
71
+
72
+ 6. If the selected mode includes thoth-mem, persist the design with:
73
+
74
+ ```text
75
+ thoth_mem_mem_save(
76
+ title: "sdd/{change-name}/design",
77
+ topic_key: "sdd/{change-name}/design",
78
+ type: "architecture",
79
+ project: "{project}",
80
+ scope: "project",
81
+ content: "{full design markdown}"
82
+ )
83
+ ```
84
+
85
+ ## Output Format
86
+
87
+ Return:
88
+
89
+ - `Change`
90
+ - `Artifact`: `openspec/changes/{change-name}/design.md`
91
+ - `Topic Key`: `sdd/{change-name}/design`
92
+ - `Key Decisions`: concise bullet list
93
+ - `Files Planned`: created, modified, deleted paths
94
+ - `Next Step`: `sdd-tasks`
95
+
96
+ ## Rules
97
+
98
+ - Base the design on the actual codebase, not generic assumptions.
99
+ - Every architecture decision must include rationale.
100
+ - Use concrete file paths and interfaces.
101
+ - Keep implementation details aligned with the spec and repository patterns.
102
+ - Retrieve full dependencies with the protocol in
103
+ `~/.config/opencode/skills/_shared/persistence-contract.md`.
104
+ - Never reference engram.
@@ -0,0 +1,99 @@
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 references:
13
+ - `~/.config/opencode/skills/_shared/openspec-convention.md`
14
+ - `~/.config/opencode/skills/_shared/persistence-contract.md`
15
+ - `~/.config/opencode/skills/_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
21
+ `~/.config/opencode/skills/_shared/persistence-contract.md` for read/write
22
+ rules per mode.
23
+
24
+ - `thoth-mem`: persist to thoth-mem only — do NOT create or modify
25
+ `openspec/` files.
26
+ - `openspec`: write files only — do NOT call thoth-mem save tools.
27
+ - `hybrid`: persist to both (default).
28
+
29
+ ## When to Use
30
+
31
+ - A change needs its first `proposal.md`
32
+ - An existing proposal must be refined after new requirements
33
+
34
+ ## Prerequisites
35
+
36
+ - A `change-name`
37
+ - User intent, problem statement, or prior exploration notes
38
+ - Project name for thoth-mem persistence
39
+
40
+ ## Workflow
41
+
42
+ 1. Read the shared conventions before drafting.
43
+ 2. If the change already exists, recover the latest proposal using the
44
+ retrieval protocol in
45
+ `~/.config/opencode/skills/_shared/persistence-contract.md`.
46
+ 3. Review relevant main specs under `openspec/specs/` to avoid proposing
47
+ contradictions.
48
+ 4. If the selected mode includes OpenSpec, write
49
+ `openspec/changes/{change-name}/proposal.md` using this shape. In
50
+ `thoth-mem` mode, produce the same content without creating the file:
51
+
52
+ ```md
53
+ # Proposal: {Change Title}
54
+
55
+ ## Intent
56
+ ## Scope
57
+ ### In Scope
58
+ ### Out of Scope
59
+ ## Approach
60
+ ## Affected Areas
61
+ ## Risks
62
+ ## Rollback Plan
63
+ ## Success Criteria
64
+ ```
65
+
66
+ 5. If the selected mode includes thoth-mem, persist the full proposal with:
67
+
68
+ ```text
69
+ thoth_mem_mem_save(
70
+ title: "sdd/{change-name}/proposal",
71
+ topic_key: "sdd/{change-name}/proposal",
72
+ type: "architecture",
73
+ project: "{project}",
74
+ scope: "project",
75
+ content: "{full proposal markdown}"
76
+ )
77
+ ```
78
+
79
+ 6. In `hybrid` mode, both the filesystem artifact and thoth-mem save must
80
+ succeed.
81
+
82
+ ## Output Format
83
+
84
+ Return a short report with:
85
+
86
+ - `Change`: change name
87
+ - `Artifact`: `openspec/changes/{change-name}/proposal.md`
88
+ - `Topic Key`: `sdd/{change-name}/proposal`
89
+ - `Summary`: 2-4 bullets covering intent, scope, and major risks
90
+ - `Next Step`: usually `sdd-spec` or `sdd-design`
91
+
92
+ ## Rules
93
+
94
+ - Use canonical OpenSpec filenames only.
95
+ - Keep the proposal focused on why, scope, and success criteria.
96
+ - Always include rollback guidance and explicit out-of-scope items.
97
+ - Never reference engram.
98
+ - Never rely on a `thoth_mem_mem_search` preview without calling
99
+ `thoth_mem_mem_get_observation` when the selected mode uses thoth-mem.