opensddrag 0.1.1 → 0.1.2

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.
@@ -1,12 +1,207 @@
1
+ export function getOpenCodeSkills(slug, _serverUrl) {
2
+ const note = `> **project_slug for every call:** \`${slug}\`\n\n`;
3
+
4
+ const fm = (name, description) => `---\nname: ${name}\ndescription: ${description}\n---\n\n`;
5
+
6
+ return [
7
+ {
8
+ name: "opensddrag-propose",
9
+ content: `${fm("opensddrag-propose", "Create a named change proposal — entry point for every feature or bugfix")}# OpenSddRag — Propose
10
+ ${note}Creates a named **change** with a proposal artifact: Why, What Changes, Capabilities, Impact.
11
+ Entry point for every new feature or bugfix. No code is written here.
12
+ After this, /opsr:spec and /opsr:design become available.
13
+
14
+ **Run:** \`/opsr:propose <change-name or description>\`
15
+
16
+ **Creates:** \`<change-name>-proposal\` artifact in database.
17
+ **Unlocks:** /opsr:spec, /opsr:design
18
+ `,
19
+ },
20
+ {
21
+ name: "opensddrag-spec",
22
+ content: `${fm("opensddrag-spec", "Write capability specs with SHALL/MUST requirements and WHEN/THEN scenarios")}# OpenSddRag — Spec
23
+ ${note}Creates spec artifacts for each capability listed in the proposal.
24
+ Uses SHALL/MUST language. Each requirement MUST have Scenarios with WHEN/THEN format.
25
+
26
+ **New capability** → full spec (Purpose + Requirements + Scenarios)
27
+ **Modified capability** → delta spec (ADDED / MODIFIED / REMOVED / RENAMED sections)
28
+
29
+ **Run:** \`/opsr:spec <change-name>\`
30
+
31
+ **Requires:** proposal artifact in database.
32
+ **Creates:** \`<change-name>-<capability>-spec\` artifact(s) in database.
33
+ **Unlocks:** /opsr:design (when all capabilities have specs)
34
+ `,
35
+ },
36
+ {
37
+ name: "opensddrag-design",
38
+ content: `${fm("opensddrag-design", "Document technical decisions, architecture, and trade-offs for a change")}# OpenSddRag — Design
39
+ ${note}Creates a design document: Context, Goals, Decisions (with alternatives), Architecture, Risks, Migration.
40
+ Must read proposal and all specs from the database as context.
41
+
42
+ **Run:** \`/opsr:design <change-name>\`
43
+
44
+ **Requires:** proposal + specs in database.
45
+ **Creates:** \`<change-name>-design\` artifact in database.
46
+ **Unlocks:** /opsr:tasks
47
+ `,
48
+ },
49
+ {
50
+ name: "opensddrag-tasks",
51
+ content: `${fm("opensddrag-tasks", "Break a design into atomic, verifiable implementation tasks")}# OpenSddRag — Tasks
52
+ ${note}Decomposes specs + design into atomic task artifacts, each < 4 hours.
53
+ Each task has: Goal, Acceptance criteria (referencing REQ-NNN), Dependencies.
54
+ Tasks are individual database artifacts — NOT a single markdown file.
55
+
56
+ **Run:** \`/opsr:tasks <change-name>\`
57
+
58
+ **Requires:** proposal + specs + design in database.
59
+ **Creates:** \`<change-name>-task-<N>\` artifacts in database.
60
+ **Unlocks:** /opsr:apply
61
+ `,
62
+ },
63
+ {
64
+ name: "opensddrag-apply",
65
+ content: `${fm("opensddrag-apply", "Implement the next pending task against spec acceptance criteria")}# OpenSddRag — Apply
66
+ ${note}Implements tasks one at a time, reading ALL planning artifacts (proposal + specs + design) as context.
67
+ Marks tasks active → archived in the database after implementation.
68
+ Must validate each task against spec acceptance criteria before marking done.
69
+
70
+ **Run:** \`/opsr:apply <change-name>\`
71
+
72
+ **Requires:** all planning artifacts + pending tasks in database.
73
+ **Updates:** task status in database (draft → active → archived).
74
+ **After all tasks:** run /opsr:verify then /opsr:archive.
75
+ `,
76
+ },
77
+ {
78
+ name: "opensddrag-verify",
79
+ content: `${fm("opensddrag-verify", "Validate implementation against spec requirements and design decisions")}# OpenSddRag — Verify
80
+ ${note}Read-only validation of the implementation against spec requirements and design decisions.
81
+ Produces a report with CRITICAL / WARNING / SUGGESTION severity levels.
82
+
83
+ Checks:
84
+ - **Completeness**: all tasks done, all REQ-NNN implemented
85
+ - **Correctness**: all spec scenarios covered
86
+ - **Coherence**: implementation follows design decisions
87
+
88
+ **Run:** \`/opsr:verify <change-name>\`
89
+
90
+ **Requires:** all artifacts in database + implementation in codebase.
91
+ **Output:** verification report (no artifacts modified).
92
+ `,
93
+ },
94
+ {
95
+ name: "opensddrag-sync",
96
+ content: `${fm("opensddrag-sync", "Merge delta specs back into main capability specs")}# OpenSddRag — Sync
97
+ ${note}Merges delta specs (ADDED/MODIFIED/REMOVED/RENAMED) into main specs stored in the database.
98
+ Called automatically during /opsr:archive when delta specs exist.
99
+
100
+ Delta operations:
101
+ - **ADDED** → append new requirement to main spec
102
+ - **MODIFIED** → apply partial updates (not wholesale replace)
103
+ - **REMOVED** → delete requirement + add Reason/Migration note
104
+ - **RENAMED** → rename requirement heading
105
+
106
+ **Run:** \`/opsr:sync <change-name>\`
107
+
108
+ **Requires:** delta specs + main specs in database.
109
+ **Updates:** main spec artifacts in database.
110
+ `,
111
+ },
112
+ {
113
+ name: "opensddrag-archive",
114
+ content: `${fm("opensddrag-archive", "Finalize a completed change by archiving all its artifacts")}# OpenSddRag — Archive
115
+ ${note}Finalizes a completed change: validates, syncs delta specs, archives all artifacts.
116
+
117
+ Steps:
118
+ 1. Validate artifact and task completion (warns if incomplete)
119
+ 2. Sync delta specs to main specs (if any)
120
+ 3. Mark all change artifacts as archived in database
121
+
122
+ **Run:** \`/opsr:archive <change-name>\`
123
+
124
+ **Requires:** all tasks completed (or user confirmation to archive anyway).
125
+ **Updates:** all change artifacts to status=archived in database.
126
+ `,
127
+ },
128
+ {
129
+ name: "opensddrag-explore",
130
+ content: `${fm("opensddrag-explore", "Investigate a problem or idea without writing any code")}# OpenSddRag — Explore
131
+ ${note}Thinking mode — investigates ideas WITHOUT implementing any code.
132
+ Reads existing specs and codebase for context. Can create artifacts to capture insights.
133
+
134
+ Rules:
135
+ - NEVER write application code
136
+ - NEVER create implementation files
137
+ - MAY create/update OpenSddRag artifacts to capture decisions
138
+
139
+ Use when: thinking through options, investigating feasibility, comparing approaches.
140
+ Transition: when ready → /opsr:propose <name>
141
+
142
+ **Run:** \`/opsr:explore <topic or question>\`
143
+ `,
144
+ },
145
+ {
146
+ name: "opensddrag-continue",
147
+ content: `${fm("opensddrag-continue", "Create the next single artifact in the SDD dependency chain")}# OpenSddRag — Continue
148
+ ${note}Creates the NEXT SINGLE artifact in the dependency chain and stops.
149
+ Unlike /opsr:flow, creates one artifact per invocation.
150
+
151
+ Dependency order: proposal → specs → design → tasks
152
+
153
+ Use when: stepping through the SDD flow one artifact at a time.
154
+
155
+ **Run:** \`/opsr:continue <change-name>\`
156
+ `,
157
+ },
158
+ {
159
+ name: "opensddrag-status",
160
+ content: `${fm("opensddrag-status", "Show current state of all in-progress changes")}# OpenSddRag — Status
161
+ ${note}Shows current state of all in-progress changes: artifact completion, task progress, recent activity.
162
+
163
+ Reads from MCP server — no local files.
164
+
165
+ **Run:** \`/opsr:status\` or \`/opsr:status <change-name>\`
166
+ `,
167
+ },
168
+ {
169
+ name: "opensddrag-flow",
170
+ content: `${fm("opensddrag-flow", "Run the complete SDD flow end-to-end in one session")}# OpenSddRag — Flow
171
+ ${note}Runs the complete SDD flow end-to-end: propose → spec → design → tasks → apply → archive.
172
+ ALL artifacts saved to database via MCP — no local files created.
173
+
174
+ Use when: implementing a feature from scratch in a single session.
175
+
176
+ **Run:** \`/opsr:flow <feature description>\`
177
+ `,
178
+ },
179
+ {
180
+ name: "opensddrag-search",
181
+ content: `${fm("opensddrag-search", "Semantic search over specs, tasks, and past agent actions")}# OpenSddRag — Search
182
+ ${note}Semantic search over the SDD knowledge base using pgvector similarity.
183
+ Always run this BEFORE starting new work to find existing specs and decisions.
184
+
185
+ Searches: this project first, then all projects if no results.
186
+ Also recalls past agent actions (episodic memory).
187
+
188
+ **Run:** \`/opsr:search <natural language query>\`
189
+ `,
190
+ },
191
+ ];
192
+ }
193
+
1
194
  export function getSkills(slug, serverUrl) {
2
195
  const note = `> **MCP server:** \`opensddrag\` (${serverUrl}) | **project_slug:** \`${slug}\`
3
196
  > **Available tools:** \`create_artifact\`, \`read_artifact\`, \`list_artifacts\`, \`update_artifact\`, \`validate_artifact\`, \`link_artifacts\`, \`get_relationships\`, \`search_semantic\`, \`recall_episodes\`, \`get_working_context\`, \`update_working_context\`, \`record_trace\`
4
197
  > If these tools are not in your active tool list, the \`opensddrag\` MCP server is not connected — STOP and inform the user.\n\n`;
5
198
 
199
+ const fm = (name, description) => `---\nname: ${name}\ndescription: ${description}\n---\n\n`;
200
+
6
201
  return [
7
202
  {
8
203
  name: "opensddrag-propose",
9
- content: `# OpenSddRag — Propose
204
+ content: `${fm("opensddrag-propose", "Create a named change proposal — entry point for every feature or bugfix")}# OpenSddRag — Propose
10
205
  ${note}Creates a named **change** with a proposal artifact: Why, What Changes, Capabilities, Impact.
11
206
  Entry point for every new feature or bugfix. No code is written here.
12
207
  After this, /opsr:spec and /opsr:design become available.
@@ -19,7 +214,7 @@ After this, /opsr:spec and /opsr:design become available.
19
214
  },
20
215
  {
21
216
  name: "opensddrag-spec",
22
- content: `# OpenSddRag — Spec
217
+ content: `${fm("opensddrag-spec", "Write capability specs with SHALL/MUST requirements and WHEN/THEN scenarios")}# OpenSddRag — Spec
23
218
  ${note}Creates spec artifacts for each capability listed in the proposal.
24
219
  Uses SHALL/MUST language. Each requirement MUST have Scenarios with WHEN/THEN format.
25
220
 
@@ -35,7 +230,7 @@ Uses SHALL/MUST language. Each requirement MUST have Scenarios with WHEN/THEN fo
35
230
  },
36
231
  {
37
232
  name: "opensddrag-design",
38
- content: `# OpenSddRag — Design
233
+ content: `${fm("opensddrag-design", "Document technical decisions, architecture, and trade-offs for a change")}# OpenSddRag — Design
39
234
  ${note}Creates a design document: Context, Goals, Decisions (with alternatives), Architecture, Risks, Migration.
40
235
  Must read proposal and all specs from the database as context.
41
236
 
@@ -48,7 +243,7 @@ Must read proposal and all specs from the database as context.
48
243
  },
49
244
  {
50
245
  name: "opensddrag-tasks",
51
- content: `# OpenSddRag — Tasks
246
+ content: `${fm("opensddrag-tasks", "Break a design into atomic, verifiable implementation tasks")}# OpenSddRag — Tasks
52
247
  ${note}Decomposes specs + design into atomic task artifacts, each < 4 hours.
53
248
  Each task has: Goal, Acceptance criteria (referencing REQ-NNN), Dependencies.
54
249
  Tasks are individual database artifacts — NOT a single markdown file.
@@ -62,7 +257,7 @@ Tasks are individual database artifacts — NOT a single markdown file.
62
257
  },
63
258
  {
64
259
  name: "opensddrag-apply",
65
- content: `# OpenSddRag — Apply
260
+ content: `${fm("opensddrag-apply", "Implement the next pending task against spec acceptance criteria")}# OpenSddRag — Apply
66
261
  ${note}Implements tasks one at a time, reading ALL planning artifacts (proposal + specs + design) as context.
67
262
  Marks tasks active → archived in the database after implementation.
68
263
  Must validate each task against spec acceptance criteria before marking done.
@@ -76,7 +271,7 @@ Must validate each task against spec acceptance criteria before marking done.
76
271
  },
77
272
  {
78
273
  name: "opensddrag-verify",
79
- content: `# OpenSddRag — Verify
274
+ content: `${fm("opensddrag-verify", "Validate implementation against spec requirements and design decisions")}# OpenSddRag — Verify
80
275
  ${note}Read-only validation of the implementation against spec requirements and design decisions.
81
276
  Produces a report with CRITICAL / WARNING / SUGGESTION severity levels.
82
277
 
@@ -93,7 +288,7 @@ Checks:
93
288
  },
94
289
  {
95
290
  name: "opensddrag-sync",
96
- content: `# OpenSddRag — Sync
291
+ content: `${fm("opensddrag-sync", "Merge delta specs back into main capability specs")}# OpenSddRag — Sync
97
292
  ${note}Merges delta specs (ADDED/MODIFIED/REMOVED/RENAMED) into main specs stored in the database.
98
293
  Called automatically during /opsr:archive when delta specs exist.
99
294
 
@@ -111,7 +306,7 @@ Delta operations:
111
306
  },
112
307
  {
113
308
  name: "opensddrag-archive",
114
- content: `# OpenSddRag — Archive
309
+ content: `${fm("opensddrag-archive", "Finalize a completed change by archiving all its artifacts")}# OpenSddRag — Archive
115
310
  ${note}Finalizes a completed change: validates, syncs delta specs, archives all artifacts.
116
311
 
117
312
  Steps:
@@ -127,7 +322,7 @@ Steps:
127
322
  },
128
323
  {
129
324
  name: "opensddrag-explore",
130
- content: `# OpenSddRag — Explore
325
+ content: `${fm("opensddrag-explore", "Investigate a problem or idea without writing any code")}# OpenSddRag — Explore
131
326
  ${note}Thinking mode — investigates ideas WITHOUT implementing any code.
132
327
  Reads existing specs and codebase for context. Can create artifacts to capture insights.
133
328
 
@@ -144,7 +339,7 @@ Transition: when ready → /opsr:propose <name>
144
339
  },
145
340
  {
146
341
  name: "opensddrag-continue",
147
- content: `# OpenSddRag — Continue
342
+ content: `${fm("opensddrag-continue", "Create the next single artifact in the SDD dependency chain")}# OpenSddRag — Continue
148
343
  ${note}Creates the NEXT SINGLE artifact in the dependency chain and stops.
149
344
  Unlike /opsr:flow, creates one artifact per invocation.
150
345
 
@@ -157,7 +352,7 @@ Use when: stepping through the SDD flow one artifact at a time.
157
352
  },
158
353
  {
159
354
  name: "opensddrag-status",
160
- content: `# OpenSddRag — Status
355
+ content: `${fm("opensddrag-status", "Show current state of all in-progress changes")}# OpenSddRag — Status
161
356
  ${note}Shows current state of all in-progress changes: artifact completion, task progress, recent activity.
162
357
 
163
358
  Reads from MCP server — no local files.
@@ -167,7 +362,7 @@ Reads from MCP server — no local files.
167
362
  },
168
363
  {
169
364
  name: "opensddrag-flow",
170
- content: `# OpenSddRag — Flow
365
+ content: `${fm("opensddrag-flow", "Run the complete SDD flow end-to-end in one session")}# OpenSddRag — Flow
171
366
  ${note}Runs the complete SDD flow end-to-end: propose → spec → design → tasks → apply → archive.
172
367
  ALL artifacts saved to database via MCP — no local files created.
173
368
 
@@ -178,7 +373,7 @@ Use when: implementing a feature from scratch in a single session.
178
373
  },
179
374
  {
180
375
  name: "opensddrag-search",
181
- content: `# OpenSddRag — Search
376
+ content: `${fm("opensddrag-search", "Semantic search over specs, tasks, and past agent actions")}# OpenSddRag — Search
182
377
  ${note}Semantic search over the SDD knowledge base using pgvector similarity.
183
378
  Always run this BEFORE starting new work to find existing specs and decisions.
184
379