bms-speckit-plugin 4.1.0 → 4.2.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bms-speckit",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Chain-orchestrated development pipeline with per-step error handling. /bms-speckit runs brainstorm → constitution → specify → plan → tasks → analyze → implement → verify.",
5
5
  "author": {
6
6
  "name": "manoirx"
@@ -9,13 +9,14 @@
9
9
  # to prevent loss and provide traceability per the project constitution.
10
10
 
11
11
  id: bms_speckit_development_pipeline
12
- version: 4.1.0
12
+ version: 4.2.0
13
13
  name: BMS Speckit Automated Development Pipeline
14
14
  description: >
15
15
  Full engineering workflow from requirement to verified implementation.
16
- Chains brainstorming, constitution, specification, planning, task generation,
17
- analysis, implementation (TDD), and final verification.
18
- Commits after every important step for traceability and safety.
16
+ Chains brainstorming, constitution, knowledge research, specification,
17
+ planning, task generation, analysis, implementation (TDD), and final
18
+ verification. Commits after every important step. Uses knowledge-mcp
19
+ to ground specifications in real HOSxP data dictionaries and system design.
19
20
  category: Development
20
21
 
21
22
  # ─── Chain Sequence ────────────────────────────────────────────────────────────
@@ -100,14 +101,49 @@ chain_sequence:
100
101
  Read CLAUDE.md and verify it complies with specs/constitution.md.
101
102
  Update CLAUDE.md if it conflicts with or is missing constitution rules.
102
103
 
103
- - step_id: step_4_specify
104
+ - step_id: step_4_knowledge_research
105
+ skill_id: internal.knowledge_mcp_search
106
+ action: execute
107
+ phase: 1
108
+ description: Search knowledge base for HOSxP data dictionaries, system design, and regulatory context
109
+ timeout_seconds: 300
110
+ input:
111
+ query: "{{step_1_brainstorm.output}}"
112
+ collections:
113
+ - hosxp # 49 sources — data dictionaries, ER diagrams, table schemas, module architecture
114
+ - bms # 3 sources — BMS tools, organization, API info
115
+ - moph # 3 sources — Ministry of Public Health regulations
116
+ - nhso # 44 sources — NHSO reimbursement rules and announcements
117
+ output:
118
+ artifacts: [knowledge_context]
119
+ post_action:
120
+ commit: true
121
+ message: "feat(speckit): add knowledge research from HOSxP data dictionary"
122
+ push: true
123
+ error_handling:
124
+ on_failure: continue
125
+ max_retries: 2
126
+ opinionated_prompts:
127
+ system_context: >
128
+ Use the knowledge-mcp MCP server to search for relevant context.
129
+ Search the hosxp collection for: data dictionaries, table schemas,
130
+ ER diagrams, and system architecture related to the feature.
131
+ Search bms for API and tool context.
132
+ Search moph/nhso if the feature involves regulatory compliance or
133
+ reimbursement rules.
134
+ Compile findings into a knowledge context document that will
135
+ inform the specification step. Include exact table names, field
136
+ names, data types, and relationships discovered.
137
+
138
+ - step_id: step_5_specify
104
139
  skill_id: speckit.specify
105
140
  action: execute
106
141
  phase: 1
107
- description: Create feature specification from brainstorm output
142
+ description: Create feature specification enriched with HOSxP knowledge
108
143
  timeout_seconds: 300
109
144
  input:
110
145
  requirement: "{{step_1_brainstorm.output}}"
146
+ knowledge_context: "{{step_4_knowledge_research.output}}"
111
147
  output:
112
148
  artifacts: [specs/*/spec.md]
113
149
  post_action:
@@ -121,15 +157,18 @@ chain_sequence:
121
157
  system_context: >
122
158
  Generate a complete, testable specification. Include acceptance criteria,
123
159
  data models, API contracts, and edge cases.
160
+ IMPORTANT: Use the knowledge context from step 4 to ground the spec
161
+ in real HOSxP table structures, field names, and data types.
162
+ Reference actual table names and columns from the data dictionary.
124
163
 
125
- - step_id: step_5_plan
164
+ - step_id: step_6_plan
126
165
  skill_id: speckit.plan
127
166
  action: execute
128
167
  phase: 1
129
168
  description: Generate implementation plan from specification
130
169
  timeout_seconds: 300
131
170
  input:
132
- source: "{{step_4_specify.artifacts}}"
171
+ source: "{{step_5_specify.artifacts}}"
133
172
  output:
134
173
  artifacts: [specs/*/plan.md]
135
174
  post_action:
@@ -144,14 +183,14 @@ chain_sequence:
144
183
  Plan in ordered steps. Include file paths, component boundaries,
145
184
  test strategy, and rollback considerations.
146
185
 
147
- - step_id: step_6_tasks
186
+ - step_id: step_7_tasks
148
187
  skill_id: speckit.tasks
149
188
  action: execute
150
189
  phase: 1
151
190
  description: Generate dependency-ordered task list
152
191
  timeout_seconds: 300
153
192
  input:
154
- source: "{{step_5_plan.artifacts}}"
193
+ source: "{{step_6_plan.artifacts}}"
155
194
  output:
156
195
  artifacts: [specs/*/tasks.md]
157
196
  post_action:
@@ -166,14 +205,14 @@ chain_sequence:
166
205
  Tasks must be atomic, dependency-ordered, and each independently testable.
167
206
  Include clear acceptance criteria per task.
168
207
 
169
- - step_id: step_7_analyze
208
+ - step_id: step_8_analyze
170
209
  skill_id: speckit.analyze
171
210
  action: execute
172
211
  phase: 1
173
212
  description: Cross-artifact consistency and quality check
174
213
  timeout_seconds: 300
175
214
  input:
176
- source: "{{step_6_tasks.artifacts}}"
215
+ source: "{{step_7_tasks.artifacts}}"
177
216
  output:
178
217
  artifacts: [analysis_report]
179
218
  post_action:
@@ -190,7 +229,7 @@ chain_sequence:
190
229
 
191
230
  # ── Phase 2: Implementation (main context) ────────────────────────────────
192
231
 
193
- - step_id: step_8_compact
232
+ - step_id: step_9_compact
194
233
  skill_id: internal.compact
195
234
  action: execute
196
235
  phase: 2
@@ -200,14 +239,14 @@ chain_sequence:
200
239
  on_failure: continue
201
240
  max_retries: 0
202
241
 
203
- - step_id: step_9_implement
242
+ - step_id: step_10_implement
204
243
  skill_id: speckit.implement
205
244
  action: execute_loop
206
245
  phase: 2
207
246
  description: Execute all tasks with TDD workflow via ralph-loop
208
247
  timeout_seconds: 3600
209
248
  input:
210
- tasks_path: "specs/*/tasks.md"
249
+ tasks_path: "{{step_7_tasks.artifacts}}"
211
250
  loop_engine: ralph-loop
212
251
  completion_promise: "FINISHED"
213
252
  max_iterations: 10
@@ -231,7 +270,7 @@ chain_sequence:
231
270
  apply improvements, re-run all tests, confirm zero regression.
232
271
  Only output FINISHED after everything is validated.
233
272
 
234
- - step_id: step_10_verify
273
+ - step_id: step_11_verify
235
274
  skill_id: speckit.analyze
236
275
  action: execute
237
276
  phase: 2
@@ -249,7 +288,7 @@ chain_sequence:
249
288
  Final gate. Verify all tasks completed, tests passing,
250
289
  no regressions, code quality standards met.
251
290
 
252
- - step_id: step_11_merge
291
+ - step_id: step_12_merge
253
292
  skill_id: internal.git_merge_to_main
254
293
  action: execute
255
294
  phase: 2
@@ -270,17 +309,22 @@ chain_sequence:
270
309
  metadata:
271
310
  author: manoirx
272
311
  created_at: "2026-03-29"
273
- tags: [speckit, tdd, workflow, development, chain, engineering]
274
- estimated_duration_seconds: 6000
312
+ tags: [speckit, tdd, workflow, development, chain, engineering, hosxp, knowledge]
313
+ estimated_duration_seconds: 6500
275
314
  commit_strategy: per_step
315
+ knowledge_collections:
316
+ hosxp: "49 sources — data dictionaries, ER diagrams, table schemas, module architecture"
317
+ bms: "3 sources — BMS tools, organization, API info"
318
+ moph: "3 sources — Ministry of Public Health regulations"
319
+ nhso: "44 sources — NHSO reimbursement rules and announcements"
276
320
  phases:
277
321
  phase_1:
278
322
  name: Specification & Planning
279
- steps: [step_1 through step_7]
323
+ steps: [step_1 through step_8]
280
324
  execution: subagent
281
325
  reason: Preserve main context window for implementation
282
326
  phase_2:
283
327
  name: Implementation & Verification & Merge
284
- steps: [step_8 through step_11]
328
+ steps: [step_9 through step_12]
285
329
  execution: main_context
286
330
  reason: Implementation needs full tool access and ralph-loop
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bms-speckit-plugin",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Chain-orchestrated development pipeline: /bms-speckit takes requirements and runs brainstorm → constitution → specify → plan → tasks → analyze → implement → verify with per-step error handling",
5
5
  "files": [
6
6
  ".claude-plugin/",
@@ -14,7 +14,7 @@ Chain blueprint: `blueprints/bms-speckit-pipeline.yaml`
14
14
  3. On step failure, check the **error policy** before proceeding:
15
15
  - `on_failure: stop` → halt the chain and report which step failed
16
16
  - `on_failure: continue` → log the failure and proceed to next step
17
- 4. Pass `$ARGUMENTS` (the user's requirement) to step 1 (brainstorm). Step 4 (specify) receives the **output from step 1**, not raw `$ARGUMENTS`
17
+ 4. Pass `$ARGUMENTS` (the user's requirement) to step 1 (brainstorm). Step 5 (specify) receives the **output from step 1** enriched with **knowledge context from step 4**
18
18
  5. **Commit and push after every important step** — each artifact-producing step must commit its output before proceeding to the next step
19
19
  6. Do NOT ask for confirmation between steps
20
20
 
@@ -48,31 +48,43 @@ You are running the BMS Speckit specification and planning chain. Execute each s
48
48
  - **Timeout:** 120s
49
49
  - **Post-action:** Commit all files and push. Message: `feat(speckit): add constitution and sync CLAUDE.md`
50
50
 
51
- ### Step 4 — Specify `[on_failure: STOP]`
51
+ ### Step 4 — Knowledge Research `[on_failure: CONTINUE]`
52
+ - **Tool:** `mcp__knowledge-mcp__search_knowledge` (MCP tool, not a skill)
53
+ - **Purpose:** Search HOSxP knowledge base for data dictionaries, table schemas, ER diagrams, system architecture, and regulatory context relevant to the feature
54
+ - **Timeout:** 300s
55
+ - **Searches to perform:**
56
+ 1. Search collection `hosxp` for table schemas and data dictionary related to the brainstorm output (e.g. patient tables, OPD/IPD tables, lab, pharmacy, appointments — whatever is relevant to the feature)
57
+ 2. Search collection `hosxp` for system architecture and module design related to the feature
58
+ 3. Search collection `bms` for BMS API and tool context if relevant
59
+ 4. Search collection `moph` or `nhso` if the feature involves regulatory compliance or reimbursement rules
60
+ - **Output:** Compile all findings into a knowledge context summary with exact table names, field names, data types, and relationships. Save to `specs/*/knowledge-context.md`
61
+ - **Post-action:** Commit all files and push. Message: `feat(speckit): add knowledge research from HOSxP data dictionary`
62
+
63
+ ### Step 5 — Specify `[on_failure: STOP]`
52
64
  - **Skill:** `speckit.specify`
53
- - **Input:** Use the detailed specification output from Step 1 (brainstorm) as the argument
65
+ - **Input:** Use the detailed specification output from Step 1 (brainstorm) as the argument. **IMPORTANT:** Also incorporate the knowledge context from Step 4 — reference actual HOSxP table names, field names, and data types in the specification.
54
66
  - **Output:** `specs/*/spec.md`
55
67
  - **Timeout:** 300s
56
68
  - **Retry:** up to 2 attempts
57
69
  - **Post-action:** Commit all files and push. Message: `feat(speckit): add feature specification`
58
70
 
59
- ### Step 5 — Plan `[on_failure: STOP]`
71
+ ### Step 6 — Plan `[on_failure: STOP]`
60
72
  - **Skill:** `speckit.plan`
61
- - **Input:** reads from step 4 artifacts
73
+ - **Input:** reads from step 5 artifacts
62
74
  - **Output:** `specs/*/plan.md`
63
75
  - **Timeout:** 300s
64
76
  - **Retry:** up to 2 attempts
65
77
  - **Post-action:** Commit all files and push. Message: `feat(speckit): add implementation plan`
66
78
 
67
- ### Step 6 — Tasks `[on_failure: STOP]`
79
+ ### Step 7 — Tasks `[on_failure: STOP]`
68
80
  - **Skill:** `speckit.tasks`
69
- - **Input:** reads from step 5 artifacts
81
+ - **Input:** reads from step 6 artifacts
70
82
  - **Output:** `specs/*/tasks.md`
71
83
  - **Timeout:** 300s
72
84
  - **Retry:** up to 2 attempts
73
85
  - **Post-action:** Commit all files and push. Message: `feat(speckit): add task list`
74
86
 
75
- ### Step 7 — Analyze `[on_failure: CONTINUE]`
87
+ ### Step 8 — Analyze `[on_failure: CONTINUE]`
76
88
  - **Skill:** `speckit.analyze`
77
89
  - **Purpose:** Cross-artifact consistency check (spec ↔ plan ↔ tasks). Non-destructive — report only.
78
90
  - **Timeout:** 300s
@@ -87,25 +99,26 @@ After all steps complete, return: the feature name, number of tasks created, and
87
99
 
88
100
  > **Execution context:** Runs in main context after subagent completes.
89
101
 
90
- ### Step 8 — Compact `[on_failure: CONTINUE]`
102
+ ### Step 9 — Compact `[on_failure: CONTINUE]`
91
103
  - **Action:** Run `/compact` to free context window before implementation.
92
104
 
93
- ### Step 9 — Implement (loop) `[on_failure: CONTINUE | max_retries: 3]`
105
+ ### Step 10 — Implement (loop) `[on_failure: CONTINUE | max_retries: 3]`
94
106
  - **Engine:** ralph-loop
107
+ - **Input:** Use the **tasks.md path returned by the Phase 1 subagent** (e.g. `specs/my-feature/tasks.md`). Replace `{TASKS_PATH}` below with the actual path.
95
108
  - **Completion promise:** `FINISHED`
96
109
  - **Max iterations:** 10
97
110
  - **Commit strategy:** Atomic commit after each completed task
98
111
  - **Action:** Run:
99
112
 
100
- `/ralph-loop:ralph-loop "systematically execute speckit.implement via the Skill tool to complete every task defined in specs/*/tasks.md with strict adherence to specification requirements, enforce TDD workflow including writing and passing unit, integration, and end-to-end tests before marking any task complete, ensure code quality through linting, static analysis, and consistent architecture with reusable components and centralized business logic, maintain atomic commits after each successful task with clear traceability, avoid requesting confirmation and proceed autonomously, once all tasks are implemented invoke speckit.analyze via the Skill tool to perform a full validation pass, automatically apply all recommended improvements or corrections, re-run all tests to confirm stability and zero regression, and only output <promise>FINISHED</promise> after every task is fully completed, validated, and aligned with production-grade quality standards" --completion-promise "FINISHED" --max-iterations 10`
113
+ `/ralph-loop:ralph-loop "systematically execute speckit.implement via the Skill tool to complete every task defined in {TASKS_PATH} with strict adherence to specification requirements, enforce TDD workflow including writing and passing unit, integration, and end-to-end tests before marking any task complete, ensure code quality through linting, static analysis, and consistent architecture with reusable components and centralized business logic, maintain atomic commits after each successful task with clear traceability, avoid requesting confirmation and proceed autonomously, once all tasks are implemented invoke speckit.analyze via the Skill tool to perform a full validation pass, automatically apply all recommended improvements or corrections, re-run all tests to confirm stability and zero regression, and only output <promise>FINISHED</promise> after every task is fully completed, validated, and aligned with production-grade quality standards" --completion-promise "FINISHED" --max-iterations 10`
101
114
 
102
- ### Step 10 — Verify `[on_failure: STOP]`
115
+ ### Step 11 — Verify `[on_failure: STOP]`
103
116
  - **Skill:** `speckit.analyze`
104
117
  - **Purpose:** Final validation — confirm all tasks completed, tests passing, no regressions, code quality standards met.
105
118
  - **Timeout:** 300s
106
119
  - **Post-action:** Commit all files and push. Message: `chore(speckit): final verification pass complete`
107
120
 
108
- ### Step 11 — Merge to Main `[on_failure: STOP]`
121
+ ### Step 12 — Merge to Main `[on_failure: STOP]`
109
122
  - **Action:** Switch to main branch, merge the feature branch (fast-forward if possible), push main to remote, then clean up the feature branch.
110
123
  - **Timeout:** 120s
111
124
 
@@ -114,13 +127,23 @@ After all steps complete, return: the feature name, number of tasks created, and
114
127
  ## Chain Summary
115
128
 
116
129
  ```
117
- Phase 1 (subagent) Phase 2 (main context)
118
- ────────────────────────────── ──────────────────────────────
119
- Step 1: brainstorm ──STOP── commit Step 8: compact
120
- Step 2: constitution STOP─┐ Step 9: implement (ralph-loop)
121
- Step 3: CLAUDE.md sync ────┘ commit commit per task
122
- Step 4: specify ──────STOP── commit Step 10: verify ── commit
123
- Step 5: plan ─────────STOP── commit Step 11: merge to main + push
124
- Step 6: tasks ────────STOP── commit
125
- Step 7: analyze ──────────── commit
130
+ Phase 1 (subagent) Phase 2 (main context)
131
+ ────────────────────────────────── ──────────────────────────────
132
+ Step 1: brainstorm ──────STOP── commit Step 9: compact
133
+ Step 2: constitution ────STOP─┐ Step 10: implement (ralph-loop)
134
+ Step 3: CLAUDE.md sync ──────┘ commit commit per task
135
+ Step 4: knowledge research ─── commit Step 11: verify ── commit
136
+ Step 5: specify ─────────STOP── commit Step 12: merge to main + push
137
+ Step 6: plan ────────────STOP── commit
138
+ Step 7: tasks ───────────STOP── commit
139
+ Step 8: analyze ────────────── commit
126
140
  ```
141
+
142
+ ### Knowledge Collections Available
143
+
144
+ | Collection | Sources | Content |
145
+ |---|---|---|
146
+ | `hosxp` | 49 | Data dictionaries, ER diagrams, table schemas, module architecture |
147
+ | `bms` | 3 | BMS tools, organization, API info |
148
+ | `moph` | 3 | Ministry of Public Health regulations |
149
+ | `nhso` | 44 | NHSO reimbursement rules and announcements |