@lbruton/specflow 3.5.3 → 3.5.4

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 +1 @@
1
- {"version":3,"file":"spec-workflow-guide.d.ts","sourceRoot":"","sources":["../../src/tools/spec-workflow-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,qBAAqB,EAAE,IAenC,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAsBrG"}
1
+ {"version":3,"file":"spec-workflow-guide.d.ts","sourceRoot":"","sources":["../../src/tools/spec-workflow-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,eAAO,MAAM,qBAAqB,EAAE,IAenC,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAsBrG"}
@@ -1,3 +1,4 @@
1
+ import { PathUtils } from '../core/path-utils.js';
1
2
  export const specWorkflowGuideTool = {
2
3
  name: 'spec-workflow-guide',
3
4
  description: `Load essential spec workflow instructions to guide feature development from idea to implementation.
@@ -23,7 +24,7 @@ export async function specWorkflowGuideHandler(args, context) {
23
24
  success: true,
24
25
  message: 'Complete spec workflow guide loaded - follow this workflow exactly',
25
26
  data: {
26
- guide: getSpecWorkflowGuide(),
27
+ guide: getSpecWorkflowGuide(PathUtils.getWorkflowRoot(context.projectPath)),
27
28
  dashboardUrl: context.dashboardUrl,
28
29
  dashboardAvailable: !!context.dashboardUrl
29
30
  },
@@ -36,8 +37,11 @@ export async function specWorkflowGuideHandler(args, context) {
36
37
  ]
37
38
  };
38
39
  }
39
- function getSpecWorkflowGuide() {
40
+ function getSpecWorkflowGuide(workflowRoot) {
40
41
  const currentYear = new Date().getFullYear();
42
+ // workflowRoot is the resolved path (DocVault or local ${wr}/)
43
+ // Use it in all path references so agents look in the right place
44
+ const wr = workflowRoot;
41
45
  return `# Spec Development Workflow
42
46
 
43
47
  ## Overview
@@ -49,13 +53,13 @@ Spec names MUST use issue prefix: {ISSUE-ID}-{kebab-title} (e.g., STAK-123-user-
49
53
  \`\`\`mermaid
50
54
  flowchart TD
51
55
  Start([Start: User requests feature]) --> CheckSteering{Steering docs exist?}
52
- CheckSteering -->|Yes| P1_Load[Read steering docs:<br/>.specflow/steering/*.md]
56
+ CheckSteering -->|Yes| P1_Load[Read steering docs:<br/>${wr}/steering/*.md]
53
57
  CheckSteering -->|No| P1_Template
54
58
 
55
59
  %% Phase 1: Requirements
56
- P1_Load --> P1_Template[Check user-templates first,<br/>then read template:<br/>requirements-template.md]
60
+ P1_Load --> P1_Template[Check project template overrides,<br/>then global template:<br/>requirements-template.md]
57
61
  P1_Template --> P1_Research[Web search if available]
58
- P1_Research --> P1_Create[Create file:<br/>.specflow/specs/{name}/<br/>requirements.md]
62
+ P1_Research --> P1_Create[Create file:<br/>${wr}/specs/{name}/<br/>requirements.md]
59
63
  P1_Create --> P1_Approve[approvals<br/>action: request<br/>filePath only]
60
64
  P1_Approve --> P1_Status[approvals<br/>action: status<br/>poll status]
61
65
  P1_Status --> P1_Check{Status?}
@@ -65,9 +69,9 @@ flowchart TD
65
69
  P1_Clean -->|failed| P1_Status
66
70
 
67
71
  %% Phase 2: Design
68
- P1_Clean -->|success| P2_Template[Check user-templates first,<br/>then read template:<br/>design-template.md]
72
+ P1_Clean -->|success| P2_Template[Check project template overrides,<br/>then global template:<br/>design-template.md]
69
73
  P2_Template --> P2_Analyze[Analyze codebase patterns]
70
- P2_Analyze --> P2_Create[Create file:<br/>.specflow/specs/{name}/<br/>design.md]
74
+ P2_Analyze --> P2_Create[Create file:<br/>${wr}/specs/{name}/<br/>design.md]
71
75
  P2_Create --> P2_Approve[approvals<br/>action: request<br/>filePath only]
72
76
  P2_Approve --> P2_Status[approvals<br/>action: status<br/>poll status]
73
77
  P2_Status --> P2_Check{Status?}
@@ -77,9 +81,9 @@ flowchart TD
77
81
  P2_Clean -->|failed| P2_Status
78
82
 
79
83
  %% Phase 3: Tasks
80
- P2_Clean -->|success| P3_Template[Check user-templates first,<br/>then read template:<br/>tasks-template.md]
84
+ P2_Clean -->|success| P3_Template[Check project template overrides,<br/>then global template:<br/>tasks-template.md]
81
85
  P3_Template --> P3_Break[Convert design to tasks]
82
- P3_Break --> P3_Create[Create file:<br/>.specflow/specs/{name}/<br/>tasks.md]
86
+ P3_Break --> P3_Create[Create file:<br/>${wr}/specs/{name}/<br/>tasks.md]
83
87
  P3_Create --> P3_Approve[approvals<br/>action: request<br/>filePath only]
84
88
  P3_Approve --> P3_Status[approvals<br/>action: status<br/>poll status]
85
89
  P3_Status --> P3_Check{Status?}
@@ -171,20 +175,20 @@ flowchart TD
171
175
  **Purpose**: Define what to build based on user needs.
172
176
 
173
177
  **File Operations**:
174
- - Read steering docs: \`.specflow/steering/*.md\` (if they exist)
175
- - Check for custom template: \`.specflow/user-templates/requirements-template.md\`
176
- - Read template: \`.specflow/templates/requirements-template.md\` (if no custom template)
177
- - Create document: \`.specflow/specs/{issue-id}-{kebab-title}/requirements.md\`
178
+ - Read steering docs: \`${wr}/steering/*.md\` (if they exist)
179
+ - Check for project override: \`${wr}/templates/requirements-template.md\`
180
+ - Read global template: \`${wr}/templates/requirements-template.md\` (if no custom template)
181
+ - Create document: \`${wr}/specs/{issue-id}-{kebab-title}/requirements.md\`
178
182
 
179
183
  **Tools**:
180
184
  - approvals: Manage approval workflow (actions: request, status, delete)
181
185
 
182
186
  **Process**:
183
- 1. Check if \`.specflow/steering/\` exists (if yes, read product.md, tech.md, structure.md)
184
- 2. Check for custom template at \`.specflow/user-templates/requirements-template.md\`
185
- 3. If no custom template, read from \`.specflow/templates/requirements-template.md\`
187
+ 1. Check if \`${wr}/steering/\` exists (if yes, read product.md, tech.md, structure.md)
188
+ 2. Check for project template override at \`${wr}/templates/requirements-template.md\`
189
+ 3. If no project override, the global template is used automatically from \`${wr}/templates/requirements-template.md\`
186
190
  4. Research market/user expectations (if web search available, current year: ${currentYear})
187
- 5. Generate requirements as user stories with EARS criteria6. Create \`requirements.md\` at \`.specflow/specs/{issue-id}-{kebab-title}/requirements.md\`
191
+ 5. Generate requirements as user stories with EARS criteria6. Create \`requirements.md\` at \`${wr}/specs/{issue-id}-{kebab-title}/requirements.md\`
188
192
  7. Request approval using approvals tool with action:'request' (filePath only, never content)
189
193
  8. Poll status using approvals with action:'status' until approved/needs-revision (NEVER accept verbal approval)
190
194
  9. If needs-revision: update document using comments, create NEW approval, do NOT proceed
@@ -195,19 +199,19 @@ flowchart TD
195
199
  **Purpose**: Create technical design addressing all requirements.
196
200
 
197
201
  **File Operations**:
198
- - Check for custom template: \`.specflow/user-templates/design-template.md\`
199
- - Read template: \`.specflow/templates/design-template.md\` (if no custom template)
200
- - Create document: \`.specflow/specs/{issue-id}-{kebab-title}/design.md\`
202
+ - Check for project override: \`${wr}/templates/design-template.md\`
203
+ - Read global template: \`${wr}/templates/design-template.md\` (if no custom template)
204
+ - Create document: \`${wr}/specs/{issue-id}-{kebab-title}/design.md\`
201
205
 
202
206
  **Tools**:
203
207
  - approvals: Manage approval workflow (actions: request, status, delete)
204
208
 
205
209
  **Process**:
206
- 1. Check for custom template at \`.specflow/user-templates/design-template.md\`
207
- 2. If no custom template, read from \`.specflow/templates/design-template.md\`
210
+ 1. Check for project template override at \`${wr}/templates/design-template.md\`
211
+ 2. If no project override, the global template is used automatically from \`${wr}/templates/design-template.md\`
208
212
  3. Analyze codebase for patterns to reuse
209
213
  4. Research technology choices (if web search available, current year: ${currentYear})
210
- 5. Generate design with all template sections6. Create \`design.md\` at \`.specflow/specs/{issue-id}-{kebab-title}/design.md\`
214
+ 5. Generate design with all template sections6. Create \`design.md\` at \`${wr}/specs/{issue-id}-{kebab-title}/design.md\`
211
215
  7. Request approval using approvals tool with action:'request'
212
216
  8. Poll status using approvals with action:'status' until approved/needs-revision
213
217
  9. If needs-revision: update document using comments, create NEW approval, do NOT proceed
@@ -218,16 +222,16 @@ flowchart TD
218
222
  **Purpose**: Break design into atomic implementation tasks.
219
223
 
220
224
  **File Operations**:
221
- - Check for custom template: \`.specflow/user-templates/tasks-template.md\`
222
- - Read template: \`.specflow/templates/tasks-template.md\` (if no custom template)
223
- - Create document: \`.specflow/specs/{issue-id}-{kebab-title}/tasks.md\`
225
+ - Check for project override: \`${wr}/templates/tasks-template.md\`
226
+ - Read global template: \`${wr}/templates/tasks-template.md\` (if no custom template)
227
+ - Create document: \`${wr}/specs/{issue-id}-{kebab-title}/tasks.md\`
224
228
 
225
229
  **Tools**:
226
230
  - approvals: Manage approval workflow (actions: request, status, delete)
227
231
 
228
232
  **Process**:
229
- 1. Check for custom template at \`.specflow/user-templates/tasks-template.md\`
230
- 2. If no custom template, read from \`.specflow/templates/tasks-template.md\`
233
+ 1. Check for project template override at \`${wr}/templates/tasks-template.md\`
234
+ 2. If no project override, the global template is used automatically from \`${wr}/templates/tasks-template.md\`
231
235
  3. Convert design into atomic tasks (1-3 files each)
232
236
  4. Include file paths and requirement references
233
237
  5. **IMPORTANT**: Generate a _Prompt field for each task with:
@@ -241,7 +245,7 @@ flowchart TD
241
245
  - Start the prompt with "Implement the task for spec {issue-id}-{kebab-title}, first run spec-workflow-guide to get the workflow guide then implement the task:"
242
246
  6. (Optional) Add a **Recommended Agent** field to each task: Claude, Codex, Gemini, or Human
243
247
  7. Include a **File Touch Map** at the top of tasks.md listing all files the spec will CREATE, MODIFY, or TEST with brief scope notes
244
- 8. Create \`tasks.md\` at \`.specflow/specs/{issue-id}-{kebab-title}/tasks.md\`
248
+ 8. Create \`tasks.md\` at \`${wr}/specs/{issue-id}-{kebab-title}/tasks.md\`
245
249
  7. Request approval using approvals tool with action:'request'
246
250
  8. Poll status using approvals with action:'status' until approved/needs-revision
247
251
  9. If needs-revision: update document using comments, create NEW approval, do NOT proceed
@@ -261,7 +265,7 @@ flowchart TD
261
265
  2. If UI changes are declared with prototype required:
262
266
  - Execute tasks 0.1–0.3 from tasks.md (these are the prototype gate tasks)
263
267
  - Task 0.1: Create visual mockup via \`ui-mockup\` skill (Stitch) or \`frontend-design\` skill
264
- - Task 0.2: Build interactive prototype via \`playground\` skill — **save to \`.specflow/specs/{spec-name}/artifacts/playground.html\`**
268
+ - Task 0.2: Build interactive prototype via \`playground\` skill — **save to \`${wr}/specs/{spec-name}/artifacts/playground.html\`**
265
269
  - Task 0.3: Present to user, collect explicit visual approval
266
270
  3. If a reference HTML/mockup file path is listed in design.md, the prototype MUST use it as the baseline — do not ignore provided prototypes
267
271
  4. **Save all visual artifacts** (playground HTML, mockup screenshots, Stitch exports) to the spec's \`artifacts/\` folder
@@ -277,8 +281,8 @@ flowchart TD
277
281
  **Trigger**: This phase fires automatically after Phase 3 approval (and Phase 3.5 if applicable). It runs on EVERY spec — it is not conditional.
278
282
 
279
283
  **File Operations**:
280
- - Read specs: \`.specflow/specs/{issue-id}-{kebab-title}/requirements.md\`, \`design.md\`, \`tasks.md\`
281
- - Create report: \`.specflow/specs/{issue-id}-{kebab-title}/readiness-report.md\`
284
+ - Read specs: \`${wr}/specs/{issue-id}-{kebab-title}/requirements.md\`, \`design.md\`, \`tasks.md\`
285
+ - Create report: \`${wr}/specs/{issue-id}-{kebab-title}/readiness-report.md\`
282
286
 
283
287
  **Tools**:
284
288
  - approvals: Submit readiness report for dashboard review (actions: request, status, delete)
@@ -293,7 +297,7 @@ flowchart TD
293
297
  - **Prototype consistency**: If design.md references a prototype HTML file, verify it appears in task 0.1-0.3 artifacts and/or task \`_Leverage\` fields.
294
298
  - **File touch map validation**: Verify the File Touch Map in tasks.md covers all files mentioned in individual tasks.
295
299
  - **Test Design Coverage**: At least one task in tasks.md covers test authoring for new behavior (matching task title/description patterns: "test", "TDD", "verify", "write tests"). If no test task found → FAIL.
296
- - **Release Hygiene**: Check \`.specflow/project-conventions.json\` (if exists):
300
+ - **Release Hygiene**: Check \`${wr}/project-conventions.json\` (if exists):
297
301
  - If version lock detected: verify a task covers version bump. Missing → FAIL.
298
302
  - If changelog detected: verify a task covers changelog entry. Missing → FAIL.
299
303
  - Verify a task covers DocVault documentation update. Missing → FAIL.
@@ -350,7 +354,7 @@ flowchart TD
350
354
  **Purpose**: Execute tasks systematically.
351
355
 
352
356
  **File Operations**:
353
- - Read specs: \`.specflow/specs/{issue-id}-{kebab-title}/*.md\` (if returning to work)
357
+ - Read specs: \`${wr}/specs/{issue-id}-{kebab-title}/*.md\` (if returning to work)
354
358
  - Edit tasks.md to update status:
355
359
  - \`- [ ]\` = Pending task
356
360
  - \`- [-]\` = In-progress task
@@ -372,17 +376,17 @@ flowchart TD
372
376
  - Read design.md \`UI Impact Assessment\` section
373
377
  - If \`Prototype Required: Yes\`, confirm tasks 0.1–0.3 are marked \`[x]\` and \`Prototype Artifacts\` in design.md are populated
374
378
  - If prototype gate is incomplete, STOP — complete Phase 3.5 first
375
- - **MANDATORY**: Include the playground file path (e.g., \`.specflow/specs/{spec-name}/artifacts/playground.html\`) in the subagent prompt so the implementer has the approved visual reference
379
+ - **MANDATORY**: Include the playground file path (e.g., \`${wr}/specs/{spec-name}/artifacts/playground.html\`) in the subagent prompt so the implementer has the approved visual reference
376
380
  - Tell the implementer explicitly: "Source your visual design from the prototype file. Do NOT re-read earlier spec documents and reinvent the design. The prototype IS the approved design."
377
381
  - The spec compliance reviewer (Stage 1) will compare implementation against the prototype — visual deviations are a FAIL
378
382
  - Edit tasks.md: Change \`[ ]\` to \`[-]\` for the task you're starting
379
383
  - **CRITICAL: BEFORE implementing, search existing implementation logs**:
380
- - Implementation logs are in: \`.specflow/specs/{issue-id}-{kebab-title}/Implementation Logs/\`
384
+ - Implementation logs are in: \`${wr}/specs/{issue-id}-{kebab-title}/Implementation Logs/\`
381
385
  - **Option 1: Use grep for fast searches**:
382
- - \`grep -r "api\|endpoint" .specflow/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find API endpoints
383
- - \`grep -r "component" .specflow/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find UI components
384
- - \`grep -r "function" .specflow/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find utility functions
385
- - \`grep -r "integration" .specflow/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find integration patterns
386
+ - \`grep -r "api\|endpoint" ${wr}/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find API endpoints
387
+ - \`grep -r "component" ${wr}/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find UI components
388
+ - \`grep -r "function" ${wr}/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find utility functions
389
+ - \`grep -r "integration" ${wr}/specs/{issue-id}-{kebab-title}/Implementation Logs/\` - Find integration patterns
386
390
  - **Option 2: Read markdown files directly** - Use Read tool to examine specific log files
387
391
  - Best practice: Search 2-3 different terms to discover comprehensively
388
392
  - This prevents: duplicate endpoints, reimplemented components, broken integrations
@@ -424,7 +428,7 @@ Never write implementation code in the main context — dispatch a subagent inst
424
428
 
425
429
  **Parallel Session** — If the plan has 10+ tasks, split into session-sized batches. Each session handles ~3-4 batches of 3 tasks. Use a handoff mechanism between sessions to relay context (spec name, completed tasks, next task).
426
430
 
427
- **Implementer template**: See \`.specflow/templates/implementer-prompt-template.md\` for the subagent dispatch template. Paste the full task text into the subagent prompt — don't make the subagent read the plan file.
431
+ **Implementer template**: See \`${wr}/templates/implementer-prompt-template.md\` for the subagent dispatch template. Paste the full task text into the subagent prompt — don't make the subagent read the plan file.
428
432
 
429
433
  #### Two-Stage Review (after each task, BEFORE marking [x])
430
434
 
@@ -436,7 +440,7 @@ Dispatch a reviewer subagent to verify the implementer built what was requested
436
440
  - Check for missing requirements, extra/unneeded work, misunderstandings
437
441
  - ✅ Pass = proceed to Stage 2
438
442
  - ❌ Fail = implementer fixes issues → dispatch reviewer again
439
- - Template: \`.specflow/templates/spec-reviewer-template.md\`
443
+ - Template: \`${wr}/templates/spec-reviewer-template.md\`
440
444
 
441
445
  **Stage 2 — Code Quality Review:**
442
446
  Only dispatch AFTER Stage 1 passes. Verify the code is well-built and production-ready.
@@ -444,7 +448,7 @@ Only dispatch AFTER Stage 1 passes. Verify the code is well-built and production
444
448
  - Categorize issues: Critical (must fix) / Important (should fix) / Minor (nice to have)
445
449
  - ✅ Approved = proceed to log-implementation → mark [x]
446
450
  - Issues found = implementer fixes → dispatch reviewer again
447
- - Template: \`.specflow/templates/code-quality-reviewer-template.md\`
451
+ - Template: \`${wr}/templates/code-quality-reviewer-template.md\`
448
452
 
449
453
  **Review loop:** If either reviewer finds issues, the implementer subagent fixes them, then the reviewer re-reviews. Repeat until approved. Never skip re-review — "it should be fine now" is not verification.
450
454
 
@@ -476,7 +480,7 @@ Phase 5 has three stages. The spec is NOT complete until all three are done.
476
480
  **Purpose**: Run the project's test suite to verify the implementation.
477
481
 
478
482
  **Process**:
479
- 1. Check \`.specflow/project-conventions.json\` for the project's test command and framework.
483
+ 1. Check \`${wr}/project-conventions.json\` for the project's test command and framework.
480
484
  2. If conventions exist and specify a test command: run that command (e.g., \`npm test\`, \`npx vitest\`, \`pytest\`).
481
485
  3. If no conventions exist: check \`package.json\` for a \`test\` script. If found, run \`npm test\`. If not found, ask the user for the test command.
482
486
  4. If the project uses Browserbase/Stagehand (\`conventions.testing.hasBrowserbase\` is true):
@@ -535,7 +539,7 @@ Phase 5 has three stages. The spec is NOT complete until all three are done.
535
539
  ## Workflow Rules
536
540
 
537
541
  - Create documents directly at specified file paths
538
- - Read templates from \`.specflow/templates/\` directory
542
+ - Templates are resolved automatically: project override (${wr}/templates/) → global → bundled fallback
539
543
  - Follow exact template structures
540
544
  - Get explicit user approval between phases (using approvals tool with action:'request')
541
545
  - Complete phases in sequence (no skipping)
@@ -559,32 +563,30 @@ Phase 5 has three stages. The spec is NOT complete until all three are done.
559
563
  - Steering docs are optional - only create when explicitly requested
560
564
 
561
565
  ## File Structure
566
+
567
+ All specflow artifacts live in DocVault. The project root only has \`.specflow/config.json\`.
568
+
562
569
  \`\`\`
563
- .specflow/
564
- ├── templates/ # Auto-populated on server start
565
- │ ├── requirements-template.md
566
- │ ├── design-template.md
567
- │ ├── tasks-template.md
568
- │ ├── product-template.md
569
- │ ├── tech-template.md
570
- │ └── structure-template.md
570
+ ${wr}/ # DocVault/specflow/{project}/ (resolved via config.json)
571
+ ├── templates/ # Project-level overrides ONLY (not copies of globals)
571
572
  ├── specs/
572
573
  │ └── {ISSUE-ID}-{kebab-title}/
573
574
  │ ├── requirements.md
574
575
  │ ├── design.md
575
576
  │ ├── tasks.md
576
- │ ├── readiness-report.md # Phase 3.9 — NOT tasks.md
577
+ │ ├── readiness-report.md # Phase 3.9
577
578
  │ ├── artifacts/ # Visual source of truth for UI specs
578
- │ │ ├── playground.html # Approved interactive prototype (Phase 3.5)
579
- │ │ └── *.png # Mockup screenshots / Stitch exports
580
- │ └── Implementation Logs/ # Created automatically
579
+ │ │ ├── playground.html
580
+ │ │ └── *.png
581
+ │ └── Implementation Logs/
581
582
  │ ├── task-1_timestamp_id.md
582
- │ ├── task-2_timestamp_id.md
583
583
  │ └── ...
584
- └── steering/
585
- ├── product.md
586
- ├── tech.md
587
- └── structure.md
584
+ ├── steering/
585
+ ├── product.md
586
+ ├── tech.md
587
+ └── structure.md
588
+ ├── approvals/ # Approval records
589
+ └── archive/specs/ # Archived specs
588
590
  \`\`\``;
589
591
  }
590
592
  //# sourceMappingURL=spec-workflow-guide.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-workflow-guide.js","sourceRoot":"","sources":["../../src/tools/spec-workflow-guide.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qBAAqB,GAAS;IACzC,IAAI,EAAE,qBA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AAE;;;;;;;;;;;;gBAYpB,EAAE;;;;;;;;gBAQF,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAgCL,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4DA2D6C,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4B5D,EAAE;;;;;;;;;;;;;;;;;;;;OAoBG,CAAC;AACR,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"steering-guide.d.ts","sourceRoot":"","sources":["../../src/tools/steering-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,IAe/B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAgBjG"}
1
+ {"version":3,"file":"steering-guide.d.ts","sourceRoot":"","sources":["../../src/tools/steering-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,eAAO,MAAM,iBAAiB,EAAE,IAe/B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAgBjG"}
@@ -1,3 +1,4 @@
1
+ import { PathUtils } from '../core/path-utils.js';
1
2
  export const steeringGuideTool = {
2
3
  name: 'steering-guide',
3
4
  description: `Load guide for creating project steering documents.
@@ -19,7 +20,7 @@ export async function steeringGuideHandler(args, context) {
19
20
  success: true,
20
21
  message: 'Steering workflow guide loaded - follow this workflow exactly to avoid errors',
21
22
  data: {
22
- guide: getSteeringGuide(),
23
+ guide: getSteeringGuide(PathUtils.getWorkflowRoot(context.projectPath)),
23
24
  dashboardUrl: context.dashboardUrl
24
25
  },
25
26
  nextSteps: [
@@ -31,7 +32,8 @@ export async function steeringGuideHandler(args, context) {
31
32
  ]
32
33
  };
33
34
  }
34
- function getSteeringGuide() {
35
+ function getSteeringGuide(workflowRoot) {
36
+ const wr = workflowRoot;
35
37
  return `# Steering Workflow
36
38
 
37
39
  ## Overview
@@ -47,7 +49,7 @@ flowchart TD
47
49
  %% Phase 1: Product
48
50
  Guide --> P1_Template[Check user-templates first,<br/>then read template:<br/>product-template.md]
49
51
  P1_Template --> P1_Generate[Generate vision & goals]
50
- P1_Generate --> P1_Create[Create file:<br/>.specflow/steering/<br/>product.md]
52
+ P1_Generate --> P1_Create[Create file:<br/>${wr}/steering/<br/>product.md]
51
53
  P1_Create --> P1_Approve[approvals<br/>action: request<br/>filePath only]
52
54
  P1_Approve --> P1_Status[approvals<br/>action: status<br/>poll status]
53
55
  P1_Status --> P1_Check{Status?}
@@ -59,7 +61,7 @@ flowchart TD
59
61
  %% Phase 2: Tech
60
62
  P1_Clean -->|success| P2_Template[Check user-templates first,<br/>then read template:<br/>tech-template.md]
61
63
  P2_Template --> P2_Analyze[Analyze tech stack]
62
- P2_Analyze --> P2_Create[Create file:<br/>.specflow/steering/<br/>tech.md]
64
+ P2_Analyze --> P2_Create[Create file:<br/>${wr}/steering/<br/>tech.md]
63
65
  P2_Create --> P2_Approve[approvals<br/>action: request<br/>filePath only]
64
66
  P2_Approve --> P2_Status[approvals<br/>action: status<br/>poll status]
65
67
  P2_Status --> P2_Check{Status?}
@@ -71,7 +73,7 @@ flowchart TD
71
73
  %% Phase 3: Structure
72
74
  P2_Clean -->|success| P3_Template[Check user-templates first,<br/>then read template:<br/>structure-template.md]
73
75
  P3_Template --> P3_Analyze[Analyze codebase structure]
74
- P3_Analyze --> P3_Create[Create file:<br/>.specflow/steering/<br/>structure.md]
76
+ P3_Analyze --> P3_Create[Create file:<br/>${wr}/steering/<br/>structure.md]
75
77
  P3_Create --> P3_Approve[approvals<br/>action: request<br/>filePath only]
76
78
  P3_Approve --> P3_Status[approvals<br/>action: status<br/>poll status]
77
79
  P3_Status --> P3_Check{Status?}
@@ -95,9 +97,9 @@ flowchart TD
95
97
  **Purpose**: Define vision, goals, and user outcomes.
96
98
 
97
99
  **File Operations**:
98
- - Check for custom template: \`.specflow/user-templates/product-template.md\`
99
- - Read template: \`.specflow/templates/product-template.md\` (if no custom template)
100
- - Create document: \`.specflow/steering/product.md\`
100
+ - Check for custom template: \`${wr}/user-templates/product-template.md\`
101
+ - Read template: \`${wr}/templates/product-template.md\` (if no custom template)
102
+ - Create document: \`${wr}/steering/product.md\`
101
103
 
102
104
  **Tools**:
103
105
  - steering-guide: Load workflow instructions
@@ -105,10 +107,10 @@ flowchart TD
105
107
 
106
108
  **Process**:
107
109
  1. Load steering guide for workflow overview
108
- 2. Check for custom template at \`.specflow/user-templates/product-template.md\`
109
- 3. If no custom template, read from \`.specflow/templates/product-template.md\`
110
+ 2. Check for custom template at \`${wr}/user-templates/product-template.md\`
111
+ 3. If no custom template, read from \`${wr}/templates/product-template.md\`
110
112
  4. Generate product vision and goals
111
- 5. Create \`product.md\` at \`.specflow/steering/product.md\`
113
+ 5. Create \`product.md\` at \`${wr}/steering/product.md\`
112
114
  6. Request approval using approvals tool with action:'request' (filePath only)
113
115
  7. Poll status using approvals with action:'status' until approved/needs-revision (NEVER accept verbal approval)
114
116
  8. If needs-revision: update document using comments, create NEW approval, do NOT proceed
@@ -119,19 +121,19 @@ flowchart TD
119
121
  **Purpose**: Document technology decisions and architecture.
120
122
 
121
123
  **File Operations**:
122
- - Check for custom template: \`.specflow/user-templates/tech-template.md\`
123
- - Read template: \`.specflow/templates/tech-template.md\` (if no custom template)
124
- - Create document: \`.specflow/steering/tech.md\`
124
+ - Check for custom template: \`${wr}/user-templates/tech-template.md\`
125
+ - Read template: \`${wr}/templates/tech-template.md\` (if no custom template)
126
+ - Create document: \`${wr}/steering/tech.md\`
125
127
 
126
128
  **Tools**:
127
129
  - approvals: Manage approval workflow (actions: request, status, delete)
128
130
 
129
131
  **Process**:
130
- 1. Check for custom template at \`.specflow/user-templates/tech-template.md\`
131
- 2. If no custom template, read from \`.specflow/templates/tech-template.md\`
132
+ 1. Check for custom template at \`${wr}/user-templates/tech-template.md\`
133
+ 2. If no custom template, read from \`${wr}/templates/tech-template.md\`
132
134
  3. Analyze existing technology stack
133
135
  4. Document architectural decisions and patterns
134
- 5. Create \`tech.md\` at \`.specflow/steering/tech.md\`
136
+ 5. Create \`tech.md\` at \`${wr}/steering/tech.md\`
135
137
  6. Request approval using approvals tool with action:'request'
136
138
  7. Poll status using approvals with action:'status' until approved/needs-revision
137
139
  8. If needs-revision: update document using comments, create NEW approval, do NOT proceed
@@ -142,19 +144,19 @@ flowchart TD
142
144
  **Purpose**: Map codebase organization and patterns.
143
145
 
144
146
  **File Operations**:
145
- - Check for custom template: \`.specflow/user-templates/structure-template.md\`
146
- - Read template: \`.specflow/templates/structure-template.md\` (if no custom template)
147
- - Create document: \`.specflow/steering/structure.md\`
147
+ - Check for custom template: \`${wr}/user-templates/structure-template.md\`
148
+ - Read template: \`${wr}/templates/structure-template.md\` (if no custom template)
149
+ - Create document: \`${wr}/steering/structure.md\`
148
150
 
149
151
  **Tools**:
150
152
  - approvals: Manage approval workflow (actions: request, status, delete)
151
153
 
152
154
  **Process**:
153
- 1. Check for custom template at \`.specflow/user-templates/structure-template.md\`
154
- 2. If no custom template, read from \`.specflow/templates/structure-template.md\`
155
+ 1. Check for custom template at \`${wr}/user-templates/structure-template.md\`
156
+ 2. If no custom template, read from \`${wr}/templates/structure-template.md\`
155
157
  3. Analyze directory structure and file organization
156
158
  4. Document coding patterns and conventions
157
- 5. Create \`structure.md\` at \`.specflow/steering/structure.md\`
159
+ 5. Create \`structure.md\` at \`${wr}/steering/structure.md\`
158
160
  6. Request approval using approvals tool with action:'request'
159
161
  7. Poll status using approvals with action:'status' until approved/needs-revision
160
162
  8. If needs-revision: update document using comments, create NEW approval, do NOT proceed
@@ -165,8 +167,8 @@ flowchart TD
165
167
  ## Workflow Rules
166
168
 
167
169
  - Create documents directly at specified file paths
168
- - Check for custom templates in \`.specflow/user-templates/\` first
169
- - Read templates from \`.specflow/templates/\` directory if no custom template exists
170
+ - Check for custom templates in \`${wr}/user-templates/\` first
171
+ - Read templates from \`${wr}/templates/\` directory if no custom template exists
170
172
  - Follow exact template structures
171
173
  - Get explicit user approval between phases (using approvals tool with action:'request')
172
174
  - Complete phases in sequence (no skipping)
@@ -178,7 +180,7 @@ flowchart TD
178
180
 
179
181
  ## File Structure
180
182
  \`\`\`
181
- .specflow/
183
+ ${wr}/
182
184
  ├── templates/ # Auto-populated on server start
183
185
  │ ├── product-template.md
184
186
  │ ├── tech-template.md
@@ -1 +1 @@
1
- {"version":3,"file":"steering-guide.js","sourceRoot":"","sources":["../../src/tools/steering-guide.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,iBAAiB,GAAS;IACrC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;;;ySAG0R;IACvS,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,oBAAoB,EAAE,KAAK;KAC5B;IACD,WAAW,EAAE;QACX,KAAK,EAAE,gBAAgB;QACvB,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAS,EAAE,OAAoB;IACxE,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+EAA+E;QACxF,IAAI,EAAE;YACJ,KAAK,EAAE,gBAAgB,EAAE;YACzB,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC;QACD,SAAS,EAAE;YACT,8CAA8C;YAC9C,yBAAyB;YACzB,+BAA+B;YAC/B,2BAA2B;YAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,OAA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C,MAAM,EAAE,GAAG,YAAY,CAAC;IACxB,OAAO;;;;;;;;;;;;;;;iDAewC,EAAE;;;;;;;;;;;;gDAYH,EAAE;;;;;;;;;;;;gDAYF,EAAE;;;;;;;;;;;;;;;;;;;;;;;;iCAwBjB,EAAE;qBACd,EAAE;uBACA,EAAE;;;;;;;;oCAQW,EAAE;wCACE,EAAE;;gCAEV,EAAE;;;;;;;;;;;iCAWD,EAAE;qBACd,EAAE;uBACA,EAAE;;;;;;oCAMW,EAAE;wCACE,EAAE;;;6BAGb,EAAE;;;;;;;;;;;iCAWE,EAAE;qBACd,EAAE;uBACA,EAAE;;;;;;oCAMW,EAAE;wCACE,EAAE;;;kCAGR,EAAE;;;;;;;;;;;oCAWA,EAAE;0BACZ,EAAE;;;;;;;;;;;;EAY1B,EAAE;;;;;;;;;OASG,CAAC;AACR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lbruton/specflow",
3
- "version": "3.5.3",
3
+ "version": "3.5.4",
4
4
  "description": "MCP server for spec-driven development workflow with real-time web dashboard",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",