opensddrag 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.
File without changes
@@ -0,0 +1,74 @@
1
+ export function renderSkillMd({ slug, serverUrl }) {
2
+ return `# OpenSddRag — SDD + Harness
3
+
4
+ This project is connected to the OpenSddRag Harness (${serverUrl}).
5
+ Use the MCP tools below to follow Spec-Driven Development with persistent semantic memory.
6
+
7
+ ## Project slug: \`${slug}\`
8
+
9
+ Always pass \`project_slug: "${slug}"\` to scope queries to this project.
10
+ Use \`project_slug: "*"\` to search across all projects.
11
+
12
+ ## When to start
13
+
14
+ Before implementing any feature, always check for existing specs:
15
+
16
+ \`\`\`
17
+ search_semantic(query="<topic>", project_slug="${slug}")
18
+ \`\`\`
19
+
20
+ Then pick the right SDD skill:
21
+
22
+ \`\`\`
23
+ suggest_skill(objective="<your goal>", project_slug="${slug}")
24
+ \`\`\`
25
+
26
+ ## SDD Skills (built-in)
27
+
28
+ | Skill | When to use |
29
+ |-------|-------------|
30
+ | \`sdd:propose\` | Before anything — write intent and scope |
31
+ | \`sdd:spec\` | After proposal — Purpose / Requirements / Scenarios |
32
+ | \`sdd:design\` | After spec — technical decisions and trade-offs |
33
+ | \`sdd:tasks\` | After design — decompose into atomic tasks (<4h each) |
34
+ | \`sdd:apply\` | Execute tasks against spec acceptance criteria |
35
+ | \`sdd:full-flow\` | Run all steps above in sequence |
36
+
37
+ ## Memory tools
38
+
39
+ | Tool | Purpose |
40
+ |------|---------|
41
+ | \`search_semantic\` | Find specs/tasks by topic (semantic) |
42
+ | \`recall_episodes\` | Find past agent actions (episodic memory) |
43
+ | \`get_working_context\` | See the active session and focused artifacts |
44
+ | \`update_working_context\` | Set which artifacts you are working on |
45
+ | \`record_trace\` | Log what you just did (builds episodic memory) |
46
+
47
+ ## SDD Artifact tools
48
+
49
+ | Tool | Purpose |
50
+ |------|---------|
51
+ | \`create_artifact\` | Create proposal / spec / change / task / design |
52
+ | \`read_artifact\` | Read a specific artifact by name |
53
+ | \`list_artifacts\` | List artifacts with type/status filters |
54
+ | \`update_artifact\` | Update content or status |
55
+ | \`validate_artifact\` | Check spec structure |
56
+ | \`link_artifacts\` | Link artifacts (implements / depends_on / relates_to) |
57
+ | \`get_relationships\` | Get related artifacts |
58
+
59
+ ## Full flow example
60
+
61
+ \`\`\`
62
+ 1. suggest_skill(objective="add JWT authentication", project_slug="${slug}")
63
+ → returns "sdd:full-flow"
64
+
65
+ 2. get_skill(name="sdd:propose", project_slug="${slug}")
66
+ → follow the steps to create a proposal
67
+
68
+ 3. create_artifact(name="auth-jwt-proposal", type="proposal",
69
+ content="...", project_slug="${slug}")
70
+
71
+ 4. ... follow sdd:spec, sdd:design, sdd:tasks, sdd:apply
72
+ \`\`\`
73
+ `;
74
+ }
@@ -0,0 +1,192 @@
1
+ export function getSkills(slug, serverUrl) {
2
+ const note = `> **MCP server:** \`opensddrag\` (${serverUrl}) | **project_slug:** \`${slug}\`
3
+ > **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
+ > 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
+
6
+ return [
7
+ {
8
+ name: "opensddrag-propose",
9
+ content: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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: `# 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
+ }