@lbruton/specflow 3.5.4 → 3.5.5
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.
- package/dist/core/__tests__/template-generator.test.js +36 -1
- package/dist/core/__tests__/template-generator.test.js.map +1 -1
- package/dist/core/archive-service.d.ts.map +1 -1
- package/dist/core/archive-service.js +29 -12
- package/dist/core/archive-service.js.map +1 -1
- package/dist/core/template-generator.d.ts.map +1 -1
- package/dist/core/template-generator.js +116 -44
- package/dist/core/template-generator.js.map +1 -1
- package/dist/dashboard/approval-storage.d.ts.map +1 -1
- package/dist/dashboard/approval-storage.js +4 -2
- package/dist/dashboard/approval-storage.js.map +1 -1
- package/dist/dashboard/job-scheduler.js +2 -2
- package/dist/dashboard/job-scheduler.js.map +1 -1
- package/dist/dashboard/multi-server.d.ts.map +1 -1
- package/dist/dashboard/multi-server.js +23 -18
- package/dist/dashboard/multi-server.js.map +1 -1
- package/dist/dashboard/parser.d.ts.map +1 -1
- package/dist/dashboard/parser.js +8 -7
- package/dist/dashboard/parser.js.map +1 -1
- package/dist/dashboard/project-manager.d.ts.map +1 -1
- package/dist/dashboard/project-manager.js +12 -1
- package/dist/dashboard/project-manager.js.map +1 -1
- package/dist/dashboard/watcher.d.ts.map +1 -1
- package/dist/dashboard/watcher.js +5 -4
- package/dist/dashboard/watcher.js.map +1 -1
- package/dist/markdown/templates/code-quality-reviewer-template.md +2 -0
- package/dist/markdown/templates/implementer-prompt-template.md +11 -0
- package/dist/markdown/templates/spec-reviewer-template.md +32 -0
- package/dist/markdown/templates/tasks-template.md +124 -138
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +94 -40
- package/dist/server.js.map +1 -1
- package/dist/tools/approvals.js +24 -3
- package/dist/tools/approvals.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { readFileSync } from 'fs';
|
|
3
|
+
import { join, dirname } from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
const __dirname_test = dirname(fileURLToPath(import.meta.url));
|
|
2
6
|
// Mock fs/promises before importing the module under test
|
|
3
7
|
vi.mock('fs/promises', () => ({
|
|
4
8
|
readFile: vi.fn(),
|
|
@@ -99,9 +103,10 @@ describe('generateUserTemplates', () => {
|
|
|
99
103
|
// Design template should contain Runbook E2E Tests section
|
|
100
104
|
expect(result.designTemplate).toContain('Runbook E2E Tests');
|
|
101
105
|
expect(result.designTemplate).toContain('tests/runbook/');
|
|
102
|
-
// Tasks template should contain /bb-test references
|
|
106
|
+
// Tasks template should contain /bb-test references AND verification.md
|
|
103
107
|
expect(result.tasksTemplate).toContain('/bb-test');
|
|
104
108
|
expect(result.tasksTemplate).toContain('runbook');
|
|
109
|
+
expect(result.tasksTemplate).toContain('verification.md');
|
|
105
110
|
});
|
|
106
111
|
it('should generate vitest-specific templates', async () => {
|
|
107
112
|
setupTemplateReads();
|
|
@@ -112,6 +117,13 @@ describe('generateUserTemplates', () => {
|
|
|
112
117
|
// Should reference vitest
|
|
113
118
|
expect(result.designTemplate).toContain('vitest');
|
|
114
119
|
expect(result.tasksTemplate).toContain('npx vitest');
|
|
120
|
+
// Should contain verification.md and log-implementation gate
|
|
121
|
+
expect(result.tasksTemplate).toContain('verification.md');
|
|
122
|
+
expect(result.tasksTemplate).toContain('log-implementation');
|
|
123
|
+
// Should NOT contain upstream TypeScript/React/Express sample references
|
|
124
|
+
expect(result.tasksTemplate).not.toContain('TypeScript');
|
|
125
|
+
expect(result.tasksTemplate).not.toContain('IFeatureService');
|
|
126
|
+
expect(result.tasksTemplate).not.toContain('BaseComponent');
|
|
115
127
|
// Should NOT contain browserbase references
|
|
116
128
|
expect(result.designTemplate).not.toContain('bb-test');
|
|
117
129
|
expect(result.designTemplate).not.toContain('runbook');
|
|
@@ -126,11 +138,34 @@ describe('generateUserTemplates', () => {
|
|
|
126
138
|
expect(result.designTemplate).toContain('npm test');
|
|
127
139
|
expect(result.designTemplate).toContain('tests/');
|
|
128
140
|
expect(result.tasksTemplate).toContain('npm test');
|
|
141
|
+
// Should contain the HARD GATE and verification artifacts
|
|
142
|
+
expect(result.tasksTemplate).toContain('HARD GATE');
|
|
143
|
+
expect(result.tasksTemplate).toContain('verification.md');
|
|
144
|
+
expect(result.tasksTemplate).toContain('log-implementation');
|
|
145
|
+
// Should NOT contain upstream TypeScript/React/Express sample references
|
|
146
|
+
expect(result.tasksTemplate).not.toContain('TypeScript');
|
|
147
|
+
expect(result.tasksTemplate).not.toContain('IFeatureService');
|
|
148
|
+
expect(result.tasksTemplate).not.toContain('BaseComponent');
|
|
129
149
|
// Should NOT contain browserbase references
|
|
130
150
|
expect(result.designTemplate).not.toContain('bb-test');
|
|
131
151
|
expect(result.tasksTemplate).not.toContain('bb-test');
|
|
132
152
|
});
|
|
133
153
|
});
|
|
154
|
+
describe('bundled tasks-template.md', () => {
|
|
155
|
+
it('should contain MANDATORY GATES comment and no upstream sample references', () => {
|
|
156
|
+
// Read the source template directly from disk
|
|
157
|
+
const templatePath = join(__dirname_test, '..', '..', 'markdown', 'templates', 'tasks-template.md');
|
|
158
|
+
const content = readFileSync(templatePath, 'utf-8');
|
|
159
|
+
// Must contain the MANDATORY GATES HTML comment
|
|
160
|
+
expect(content).toContain('MANDATORY GATES');
|
|
161
|
+
// Must NOT contain upstream Pimzino TypeScript/React/Express sample references
|
|
162
|
+
expect(content).not.toContain('TypeScript');
|
|
163
|
+
expect(content).not.toContain('React');
|
|
164
|
+
expect(content).not.toContain('Express');
|
|
165
|
+
expect(content).not.toContain('IFeatureService');
|
|
166
|
+
expect(content).not.toContain('BaseComponent');
|
|
167
|
+
});
|
|
168
|
+
});
|
|
134
169
|
describe('writeUserTemplates', () => {
|
|
135
170
|
it('should not overwrite existing user-template files', async () => {
|
|
136
171
|
// Simulate that the design template already exists
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-generator.test.js","sourceRoot":"","sources":["../../../src/core/__tests__/template-generator.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"template-generator.test.js","sourceRoot":"","sources":["../../../src/core/__tests__/template-generator.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAIpC,MAAM,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,0DAA0D;AAC1D,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE;IACjB,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;IACd,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;IAClB,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;CACd,CAAC,CAAC,CAAC;AAEJ,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAErF,MAAM,YAAY,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACzC,MAAM,SAAS,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnC,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3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AA0D,EAC1D,mBAAmB,EACnB,OAAO,CACR,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-service.d.ts","sourceRoot":"","sources":["../../src/core/archive-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archive-service.d.ts","sourceRoot":"","sources":["../../src/core/archive-service.ts"],"names":[],"mappings":"AAuBA,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,EAAE,MAAM;IAKzB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2C5C,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2C9C,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAShD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IASlD,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;CAStF"}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { promises as fs } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
2
3
|
import { PathUtils } from './path-utils.js';
|
|
3
4
|
import { removeSpecFromIndex, addSpecToIndex } from './index-updater.js';
|
|
4
5
|
import { loadConfig } from './config-loader.js';
|
|
6
|
+
// Helper: resolve spec/archive paths using direct joins.
|
|
7
|
+
// The caller (ProjectManager) passes the correct workflow root.
|
|
8
|
+
// PathUtils.get*Path() methods rely on a process-level DocVault singleton
|
|
9
|
+
// that isn't initialized in the dashboard process.
|
|
10
|
+
function specsPath(projectPath, specName) {
|
|
11
|
+
return join(projectPath, 'specs', specName);
|
|
12
|
+
}
|
|
13
|
+
function archiveSpecPath(projectPath, specName) {
|
|
14
|
+
return join(projectPath, 'archive', 'specs', specName);
|
|
15
|
+
}
|
|
16
|
+
function archiveSpecsDir(projectPath) {
|
|
17
|
+
return join(projectPath, 'archive', 'specs');
|
|
18
|
+
}
|
|
19
|
+
function specsDir(projectPath) {
|
|
20
|
+
return join(projectPath, 'specs');
|
|
21
|
+
}
|
|
5
22
|
export class SpecArchiveService {
|
|
6
23
|
projectPath;
|
|
7
24
|
constructor(projectPath) {
|
|
@@ -9,8 +26,8 @@ export class SpecArchiveService {
|
|
|
9
26
|
this.projectPath = projectPath;
|
|
10
27
|
}
|
|
11
28
|
async archiveSpec(specName) {
|
|
12
|
-
const activeSpecPath =
|
|
13
|
-
const
|
|
29
|
+
const activeSpecPath = specsPath(this.projectPath, specName);
|
|
30
|
+
const archivePath = archiveSpecPath(this.projectPath, specName);
|
|
14
31
|
// Verify the active spec exists
|
|
15
32
|
try {
|
|
16
33
|
await fs.access(activeSpecPath);
|
|
@@ -20,7 +37,7 @@ export class SpecArchiveService {
|
|
|
20
37
|
}
|
|
21
38
|
// Verify the archive destination doesn't already exist
|
|
22
39
|
try {
|
|
23
|
-
await fs.access(
|
|
40
|
+
await fs.access(archivePath);
|
|
24
41
|
throw new Error(`Spec '${specName}' already exists in archive`);
|
|
25
42
|
}
|
|
26
43
|
catch (error) {
|
|
@@ -30,9 +47,9 @@ export class SpecArchiveService {
|
|
|
30
47
|
}
|
|
31
48
|
try {
|
|
32
49
|
// Ensure archive directory structure exists
|
|
33
|
-
await fs.mkdir(
|
|
50
|
+
await fs.mkdir(archiveSpecsDir(this.projectPath), { recursive: true });
|
|
34
51
|
// Move the entire spec directory to archive
|
|
35
|
-
await fs.rename(activeSpecPath,
|
|
52
|
+
await fs.rename(activeSpecPath, archivePath);
|
|
36
53
|
}
|
|
37
54
|
catch (error) {
|
|
38
55
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -50,11 +67,11 @@ export class SpecArchiveService {
|
|
|
50
67
|
}
|
|
51
68
|
}
|
|
52
69
|
async unarchiveSpec(specName) {
|
|
53
|
-
const
|
|
54
|
-
const activeSpecPath =
|
|
70
|
+
const archivePath = archiveSpecPath(this.projectPath, specName);
|
|
71
|
+
const activeSpecPath = specsPath(this.projectPath, specName);
|
|
55
72
|
// Verify the archived spec exists
|
|
56
73
|
try {
|
|
57
|
-
await fs.access(
|
|
74
|
+
await fs.access(archivePath);
|
|
58
75
|
}
|
|
59
76
|
catch {
|
|
60
77
|
throw new Error(`Spec '${specName}' not found in archive`);
|
|
@@ -71,9 +88,9 @@ export class SpecArchiveService {
|
|
|
71
88
|
}
|
|
72
89
|
try {
|
|
73
90
|
// Ensure active specs directory exists
|
|
74
|
-
await fs.mkdir(
|
|
91
|
+
await fs.mkdir(specsDir(this.projectPath), { recursive: true });
|
|
75
92
|
// Move the entire spec directory back to active
|
|
76
|
-
await fs.rename(
|
|
93
|
+
await fs.rename(archivePath, activeSpecPath);
|
|
77
94
|
}
|
|
78
95
|
catch (error) {
|
|
79
96
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -92,7 +109,7 @@ export class SpecArchiveService {
|
|
|
92
109
|
}
|
|
93
110
|
async isSpecActive(specName) {
|
|
94
111
|
try {
|
|
95
|
-
await fs.access(
|
|
112
|
+
await fs.access(specsPath(this.projectPath, specName));
|
|
96
113
|
return true;
|
|
97
114
|
}
|
|
98
115
|
catch {
|
|
@@ -101,7 +118,7 @@ export class SpecArchiveService {
|
|
|
101
118
|
}
|
|
102
119
|
async isSpecArchived(specName) {
|
|
103
120
|
try {
|
|
104
|
-
await fs.access(
|
|
121
|
+
await fs.access(archiveSpecPath(this.projectPath, specName));
|
|
105
122
|
return true;
|
|
106
123
|
}
|
|
107
124
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-service.js","sourceRoot":"","sources":["../../src/core/archive-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":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|
|
|
1
|
-
{"version":3,"file":"template-generator.d.ts","sourceRoot":"","sources":["../../src/core/template-generator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKnE,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"template-generator.d.ts","sourceRoot":"","sources":["../../src/core/template-generator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKnE,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAuRD;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,kBAAkB,GAC9B,OAAO,CAAC,kBAAkB,CAAC,CAU7B;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,kBAAkB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAkBf"}
|
|
@@ -111,76 +111,148 @@ function replaceDesignTestingStrategy(template, conventions) {
|
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Generate the Standard Closing Tasks section for browserbase projects.
|
|
114
|
-
*
|
|
114
|
+
* Uses the 7-step closing flow (C1–C7) with runbook-specific test commands.
|
|
115
115
|
*/
|
|
116
116
|
function generateBrowserbaseClosingTasks() {
|
|
117
117
|
return `## Standard Closing Tasks
|
|
118
118
|
|
|
119
|
-
- [ ]
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
|
|
125
|
-
- [ ] 6.1 Write end-to-end runbook tests (TDD — write BEFORE implementation)
|
|
126
|
-
- Write runbook test blocks in tests/runbook/*.md for new user-facing behavior
|
|
127
|
-
- Use the /browserbase-test-maintenance skill for the standard 7-field format
|
|
128
|
-
- Map implementation changes to the correct runbook section file
|
|
129
|
-
- _Leverage: /browserbase-test-maintenance skill, tests/runbook/*.md section files_
|
|
119
|
+
- [ ] C1. Establish test baseline
|
|
120
|
+
- File: (no file changes — testing only)
|
|
121
|
+
- Run \`/bb-test sections=NN\` to establish a passing baseline before any implementation changes
|
|
122
|
+
- If no runbook tests exist for the affected sections, flag this to the user
|
|
123
|
+
- Purpose: Record the starting state so regressions can be detected
|
|
124
|
+
- _Leverage: tests/runbook/*.md section files, /bb-test skill, /browserbase-test-maintenance skill_
|
|
130
125
|
- _Requirements: All_
|
|
131
|
-
- _Prompt:
|
|
126
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Engineer | Task: Identify affected runbook sections and run \`/bb-test sections=NN\` to verify a passing baseline before implementation. Record the number of passing/failing/skipped tests. If no runbook tests exist for the affected sections, flag this to the user. | Restrictions: Use the project's existing runbook test framework — do not introduce a new one. Do not modify any source files. | Success: Runbook test suite runs and baseline results (pass/fail/skip counts) are recorded. PREREQUISITE: This is a verification-only task — no worktree changes needed. BLOCKING: After recording baseline, you MUST call the log-implementation tool with the test results before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
132
127
|
|
|
133
|
-
- [ ]
|
|
134
|
-
-
|
|
135
|
-
-
|
|
128
|
+
- [ ] C2. Write failing tests for new behavior (TDD — BEFORE implementation)
|
|
129
|
+
- File: [test file paths — determined by affected runbook sections]
|
|
130
|
+
- Write failing runbook test blocks in \`tests/runbook/*.md\` for all new behavior described in requirements.md
|
|
131
|
+
- Use the \`/browserbase-test-maintenance\` skill for the standard 7-field format
|
|
132
|
+
- Tests should map to acceptance criteria — one or more tests per AC
|
|
133
|
+
- Purpose: TDD — tests define the expected behavior before code is written
|
|
134
|
+
- _Leverage: tests/runbook/*.md, /browserbase-test-maintenance skill, requirements.md acceptance criteria_
|
|
136
135
|
- _Requirements: All_
|
|
137
|
-
- _Prompt: Role: QA Automation Engineer | Task:
|
|
136
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Automation Engineer | Task: Write failing runbook test blocks in tests/runbook/*.md for all new behavior described in requirements.md acceptance criteria. Use the /browserbase-test-maintenance skill for the standard 7-field format (Test name, Added, Preconditions, Steps, Pass criteria, Tags, Section). Each acceptance criterion should have at least one corresponding test. Tests MUST fail before implementation (red phase of TDD) and pass after (green phase). | Restrictions: Use the standard runbook format, append to section files (never modify existing tests), act steps must be atomic. No Playwright, no browserless. Do not write implementation code in this task. | Success: Failing runbook tests exist for every acceptance criterion in requirements.md. Running /bb-test shows the new tests fail (expected) while existing tests still pass. PREREQUISITE: Before writing any code, verify you are in the correct working context. If the project uses version.lock, confirm \`git branch --show-current\` returns patch/VERSION. If not, STOP and run /release patch first. Mark task as [-] in tasks.md before starting. BLOCKING: After writing tests, you MUST call the log-implementation tool with test file paths and AC mapping before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
138
137
|
|
|
139
|
-
- [ ]
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
138
|
+
- [ ] C3. Implement — make tests pass
|
|
139
|
+
- File: [implementation file paths — determined by design.md]
|
|
140
|
+
- Write the minimum code needed to make all failing tests from C2 pass
|
|
141
|
+
- Follow existing project patterns and conventions
|
|
142
|
+
- Purpose: Green phase of TDD — implementation is driven by tests
|
|
143
|
+
- _Leverage: design.md architecture decisions, existing project patterns_
|
|
144
144
|
- _Requirements: All_
|
|
145
|
-
- _Prompt: Role: Senior Developer
|
|
145
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: Senior Developer | Task: Write the implementation code to make all failing tests from task C2 pass. Follow the architecture and patterns described in design.md. Use existing project utilities and patterns — do not reinvent. Keep changes minimal and focused on making tests green. | Restrictions: Do not modify test files from C2 to make them pass — fix the implementation instead. Do not introduce new dependencies without justification. Follow existing code style and patterns. | Success: All tests from C2 now pass. No existing tests regress. Code follows project conventions. PREREQUISITE: Before writing any code, verify you are in the correct working context. If the project uses version.lock, confirm \`git branch --show-current\` returns patch/VERSION. If not, STOP and run /release patch first. Mark task as [-] in tasks.md before starting. BLOCKING: After implementation, you MUST call the log-implementation tool with full artifacts before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
146
|
+
|
|
147
|
+
- [ ] C4. Run full test suite — zero regressions
|
|
148
|
+
- File: (no file changes — testing only)
|
|
149
|
+
- Run \`/bb-test sections=NN\` after all implementation is done
|
|
150
|
+
- All new tests must pass; no existing tests may regress from the C1 baseline
|
|
151
|
+
- Purpose: Verify implementation is complete and nothing is broken
|
|
152
|
+
- _Leverage: /bb-test skill, baseline results from C1_
|
|
153
|
+
- _Requirements: All_
|
|
154
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Engineer | Task: Run \`/bb-test sections=NN\` for the full runbook test suite. Compare results against the baseline from task C1. All new tests from C2 must pass. No existing tests may have regressed. If any test fails, diagnose and fix before proceeding — do not skip or disable failing tests. | Restrictions: Do not skip or disable any tests. Do not modify tests to make them pass unless they have a genuine bug. | Success: Full runbook test suite passes. New test count matches C2. Zero regressions from C1 baseline. PREREQUISITE: This is a verification-only task — no file changes expected unless fixing regressions. BLOCKING: After test run, you MUST call the log-implementation tool with pass/fail/skip counts and comparison to C1 baseline before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
155
|
+
|
|
156
|
+
- [ ] C5. Log implementation — HARD GATE
|
|
157
|
+
- File: (no file changes — logging only)
|
|
158
|
+
- Call the \`log-implementation\` MCP tool with a comprehensive summary of ALL implementation work done across all tasks in this spec
|
|
159
|
+
- Include: all functions added/modified, all files changed, all tests written, all endpoints created
|
|
160
|
+
- Purpose: Create a permanent record of what was implemented for future reference and audit
|
|
161
|
+
- _Leverage: Implementation logs from individual tasks, git diff_
|
|
162
|
+
- _Requirements: All_
|
|
163
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: Project Coordinator | Task: Call the log-implementation MCP tool with a comprehensive summary covering all implementation tasks in this spec. Aggregate: (1) all functions added or modified with file paths, (2) all files created or changed, (3) all test files and test counts, (4) any new endpoints, routes, or APIs, (5) any configuration changes. This is the consolidated implementation record. | Restrictions: Do not skip any task's artifacts. Do not mark this task [x] until the log-implementation tool call succeeds. | Success: log-implementation MCP tool call succeeds with full artifact listing. BLOCKING: This IS the logging gate. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
164
|
+
|
|
165
|
+
- [ ] C6. Generate verification.md
|
|
166
|
+
- File: \`DocVault/specflow/{{projectName}}/specs/{{spec-name}}/verification.md\`
|
|
167
|
+
- Generate a verification checklist in the spec directory
|
|
168
|
+
- List every requirement and acceptance criterion from requirements.md as a checklist item
|
|
169
|
+
- For each item: mark \`[x]\` with \`file:line\` code evidence, OR mark \`[ ]\` with a gap description
|
|
170
|
+
- Purpose: Prove every requirement is met with traceable evidence — no hand-waving
|
|
171
|
+
- _Leverage: requirements.md, implementation logs, git diff_
|
|
172
|
+
- _Requirements: All_
|
|
173
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Engineer | Task: Generate verification.md in the spec directory. Read requirements.md and list every requirement and acceptance criterion as a markdown checklist. For each item, search the codebase for the implementing code and mark [x] with file:line evidence (e.g., "src/core/parser.ts:142 — validates input format"). If any criterion cannot be verified, mark [ ] with a description of the gap. Run /vault-update to update any DocVault pages affected by this spec's changes. Close all linked DocVault issues. Run /verification-before-completion for a final check. | Restrictions: Do not mark [x] without concrete file:line evidence. Do not fabricate evidence. If a gap exists, document it honestly. | Success: verification.md exists with every requirement/AC listed. All items marked [x] with evidence, OR [ ] items have gap descriptions. /vault-update completed. Linked issues closed. /verification-before-completion passed. BLOCKING: After generating verification.md, you MUST call the log-implementation tool before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
174
|
+
|
|
175
|
+
- [ ] C7. Loop or complete
|
|
176
|
+
- File: (no file changes — decision gate only)
|
|
177
|
+
- IF verification.md has ANY unchecked \`[ ]\` items → return to task C2 and write tests for the gaps, then implement (C3), test (C4), log (C5), and re-verify (C6)
|
|
178
|
+
- ONLY when ALL items in verification.md are \`[x]\` → proceed to PR/commit
|
|
179
|
+
- Purpose: Enforce the verification loop — specs are not complete until every requirement is proven
|
|
180
|
+
- _Leverage: verification.md from C6_
|
|
181
|
+
- _Requirements: All_
|
|
182
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: Project Coordinator | Task: Read verification.md from task C6. Count unchecked [ ] items. IF any exist: list the gaps, return to task C2 to write tests targeting those gaps, then re-execute C3 through C6. Repeat until verification.md has zero unchecked items. ONLY when all items are [x]: proceed to create the PR or commit. | Restrictions: Do NOT proceed to PR/commit if ANY [ ] items remain in verification.md. Do NOT remove unchecked items to force completion. Each loop iteration must go through C2→C6 in order. | Success: verification.md has zero unchecked items. All requirements are proven with code evidence. PR/commit may proceed. BLOCKING: After confirming all items are verified, you MUST call the log-implementation tool with the final verification status before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._`;
|
|
146
183
|
}
|
|
147
184
|
/**
|
|
148
185
|
* Generate the Standard Closing Tasks section for non-browserbase projects.
|
|
149
|
-
* Uses the generic test command from detected conventions.
|
|
186
|
+
* Uses the 7-step closing flow (C1–C7) with the generic test command from detected conventions.
|
|
150
187
|
*/
|
|
151
188
|
function generateGenericClosingTasks(conventions) {
|
|
152
189
|
const command = conventions.testing.command || 'npm test';
|
|
153
190
|
const framework = conventions.testing.framework || 'the project test framework';
|
|
154
191
|
return `## Standard Closing Tasks
|
|
155
192
|
|
|
156
|
-
- [ ]
|
|
157
|
-
-
|
|
158
|
-
-
|
|
193
|
+
- [ ] C1. Establish test baseline
|
|
194
|
+
- File: (no file changes — testing only)
|
|
195
|
+
- Run \`${command}\` to establish a passing baseline before any implementation changes
|
|
196
|
+
- If no test suite exists, flag this to the user and discuss whether to set one up
|
|
197
|
+
- Purpose: Record the starting state so regressions can be detected
|
|
159
198
|
- _Leverage: Project test configuration (package.json scripts, vitest.config, jest.config, etc.)_
|
|
160
199
|
- _Requirements: All_
|
|
161
|
-
- _Prompt: Role: QA Engineer | Task:
|
|
200
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Engineer | Task: Identify and run the project's established test suite (\`${command}\`) to verify a passing baseline before implementation. Record the number of passing/failing/skipped tests. If no test suite exists, flag this to the user and ask whether to set one up before proceeding. | Restrictions: Use the project's existing test framework — do not introduce a new one. Do not modify any source files. | Success: Test suite runs and baseline results (pass/fail/skip counts) are recorded. PREREQUISITE: This is a verification-only task — no worktree changes needed. BLOCKING: After recording baseline, you MUST call the log-implementation tool with the test results before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
201
|
+
|
|
202
|
+
- [ ] C2. Write failing tests for new behavior (TDD — BEFORE implementation)
|
|
203
|
+
- File: [test file paths — determined by project conventions]
|
|
204
|
+
- Write failing tests using ${framework} for all new behavior described in requirements.md
|
|
205
|
+
- Tests should map to acceptance criteria — one or more tests per AC
|
|
206
|
+
- Purpose: TDD — tests define the expected behavior before code is written
|
|
207
|
+
- _Leverage: Project test framework (${framework}), requirements.md acceptance criteria_
|
|
208
|
+
- _Requirements: All_
|
|
209
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Engineer | Task: Write failing tests for all new behavior described in requirements.md acceptance criteria. Use ${framework} and the project's existing test conventions. Each acceptance criterion should have at least one corresponding test. Tests MUST fail before implementation (red phase of TDD) and pass after (green phase). | Restrictions: Use the project's existing test framework — do not introduce a new one. Tests must be runnable with \`${command}\`. Do not write implementation code in this task. | Success: Failing tests exist for every acceptance criterion in requirements.md. Running \`${command}\` shows the new tests fail (expected) while existing tests still pass. PREREQUISITE: Before writing any code, verify you are in the correct working context. If the project uses version.lock, confirm \`git branch --show-current\` returns patch/VERSION. If not, STOP and run /release patch first. Mark task as [-] in tasks.md before starting. BLOCKING: After writing tests, you MUST call the log-implementation tool with test file paths and AC mapping before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
210
|
+
|
|
211
|
+
- [ ] C3. Implement — make tests pass
|
|
212
|
+
- File: [implementation file paths — determined by design.md]
|
|
213
|
+
- Write the minimum code needed to make all failing tests from C2 pass
|
|
214
|
+
- Follow existing project patterns and conventions
|
|
215
|
+
- Purpose: Green phase of TDD — implementation is driven by tests
|
|
216
|
+
- _Leverage: design.md architecture decisions, existing project patterns_
|
|
217
|
+
- _Requirements: All_
|
|
218
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: Senior Developer | Task: Write the implementation code to make all failing tests from task C2 pass. Follow the architecture and patterns described in design.md. Use existing project utilities and patterns — do not reinvent. Keep changes minimal and focused on making tests green. | Restrictions: Do not modify test files from C2 to make them pass — fix the implementation instead. Do not introduce new dependencies without justification. Follow existing code style and patterns. | Success: All tests from C2 now pass. No existing tests regress. Code follows project conventions. PREREQUISITE: Before writing any code, verify you are in the correct working context. If the project uses version.lock, confirm \`git branch --show-current\` returns patch/VERSION. If not, STOP and run /release patch first. Mark task as [-] in tasks.md before starting. BLOCKING: After implementation, you MUST call the log-implementation tool with full artifacts before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
219
|
+
|
|
220
|
+
- [ ] C4. Run full test suite — zero regressions
|
|
221
|
+
- File: (no file changes — testing only)
|
|
222
|
+
- Run \`${command}\` after all implementation is done
|
|
223
|
+
- All new tests must pass; no existing tests may regress from the C1 baseline
|
|
224
|
+
- Purpose: Verify implementation is complete and nothing is broken
|
|
225
|
+
- _Leverage: Project test command (\`${command}\`), baseline results from C1_
|
|
226
|
+
- _Requirements: All_
|
|
227
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Engineer | Task: Run \`${command}\` for the full test suite. Compare results against the baseline from task C1. All new tests from C2 must pass. No existing tests may have regressed. If any test fails, diagnose and fix before proceeding — do not skip or disable failing tests. | Restrictions: Do not skip or disable any tests. Do not modify tests to make them pass unless they have a genuine bug. | Success: Full test suite passes. New test count matches C2. Zero regressions from C1 baseline. PREREQUISITE: This is a verification-only task — no file changes expected unless fixing regressions. BLOCKING: After test run, you MUST call the log-implementation tool with pass/fail/skip counts and comparison to C1 baseline before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
162
228
|
|
|
163
|
-
- [ ]
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
229
|
+
- [ ] C5. Log implementation — HARD GATE
|
|
230
|
+
- File: (no file changes — logging only)
|
|
231
|
+
- Call the \`log-implementation\` MCP tool with a comprehensive summary of ALL implementation work done across all tasks in this spec
|
|
232
|
+
- Include: all functions added/modified, all files changed, all tests written, all endpoints created
|
|
233
|
+
- Purpose: Create a permanent record of what was implemented for future reference and audit
|
|
234
|
+
- _Leverage: Implementation logs from individual tasks, git diff_
|
|
167
235
|
- _Requirements: All_
|
|
168
|
-
- _Prompt: Role:
|
|
236
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: Project Coordinator | Task: Call the log-implementation MCP tool with a comprehensive summary covering all implementation tasks in this spec. Aggregate: (1) all functions added or modified with file paths, (2) all files created or changed, (3) all test files and test counts, (4) any new endpoints, routes, or APIs, (5) any configuration changes. This is the consolidated implementation record. | Restrictions: Do not skip any task's artifacts. Do not mark this task [x] until the log-implementation tool call succeeds. | Success: log-implementation MCP tool call succeeds with full artifact listing. BLOCKING: This IS the logging gate. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
169
237
|
|
|
170
|
-
- [ ]
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
238
|
+
- [ ] C6. Generate verification.md
|
|
239
|
+
- File: \`DocVault/specflow/{{projectName}}/specs/{{spec-name}}/verification.md\`
|
|
240
|
+
- Generate a verification checklist in the spec directory
|
|
241
|
+
- List every requirement and acceptance criterion from requirements.md as a checklist item
|
|
242
|
+
- For each item: mark \`[x]\` with \`file:line\` code evidence, OR mark \`[ ]\` with a gap description
|
|
243
|
+
- Purpose: Prove every requirement is met with traceable evidence — no hand-waving
|
|
244
|
+
- _Leverage: requirements.md, implementation logs, git diff_
|
|
174
245
|
- _Requirements: All_
|
|
175
|
-
- _Prompt: Role: QA Engineer | Task: Run
|
|
246
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: QA Engineer | Task: Generate verification.md in the spec directory. Read requirements.md and list every requirement and acceptance criterion as a markdown checklist. For each item, search the codebase for the implementing code and mark [x] with file:line evidence (e.g., "src/core/parser.ts:142 — validates input format"). If any criterion cannot be verified, mark [ ] with a description of the gap. Run /vault-update to update any DocVault pages affected by this spec's changes. Close all linked DocVault issues. Run /verification-before-completion for a final check. | Restrictions: Do not mark [x] without concrete file:line evidence. Do not fabricate evidence. If a gap exists, document it honestly. | Success: verification.md exists with every requirement/AC listed. All items marked [x] with evidence, OR [ ] items have gap descriptions. /vault-update completed. Linked issues closed. /verification-before-completion passed. BLOCKING: After generating verification.md, you MUST call the log-implementation tool before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._
|
|
176
247
|
|
|
177
|
-
- [ ]
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
248
|
+
- [ ] C7. Loop or complete
|
|
249
|
+
- File: (no file changes — decision gate only)
|
|
250
|
+
- IF verification.md has ANY unchecked \`[ ]\` items → return to task C2 and write tests for the gaps, then implement (C3), test (C4), log (C5), and re-verify (C6)
|
|
251
|
+
- ONLY when ALL items in verification.md are \`[x]\` → proceed to PR/commit
|
|
252
|
+
- Purpose: Enforce the verification loop — specs are not complete until every requirement is proven
|
|
253
|
+
- _Leverage: verification.md from C6_
|
|
182
254
|
- _Requirements: All_
|
|
183
|
-
- _Prompt: Role:
|
|
255
|
+
- _Prompt: Implement the task for spec {{spec-name}}, first run spec-workflow-guide to get the workflow guide then implement the task: Role: Project Coordinator | Task: Read verification.md from task C6. Count unchecked [ ] items. IF any exist: list the gaps, return to task C2 to write tests targeting those gaps, then re-execute C3 through C6. Repeat until verification.md has zero unchecked items. ONLY when all items are [x]: proceed to create the PR or commit. | Restrictions: Do NOT proceed to PR/commit if ANY [ ] items remain in verification.md. Do NOT remove unchecked items to force completion. Each loop iteration must go through C2→C6 in order. | Success: verification.md has zero unchecked items. All requirements are proven with code evidence. PR/commit may proceed. BLOCKING: After confirming all items are verified, you MUST call the log-implementation tool with the final verification status before marking [x]. Do NOT mark [x] until the log-implementation tool call succeeds._`;
|
|
184
256
|
}
|
|
185
257
|
/**
|
|
186
258
|
* Replace the Standard Closing Tasks section in the tasks template with project-specific content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-generator.js","sourceRoot":"","sources":["../../src/core/template-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAO1D;;GAEG;AACH,KAAK,UAAU,YAAY,CAAC,QAAgB;IAC1C,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC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CAAC;IAE9D,yEAAyE;IACzE,IAAI,MAAM,UAAU,CAAC,UAAU,CAAC,IAAI,MAAM,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAChE,OAAO;IACT,CAAC;IAED,6BAA6B;IAC7B,MAAM,KAAK,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEnD,uBAAuB;IACvB,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;QACxD,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC;KACvD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval-storage.d.ts","sourceRoot":"","sources":["../../src/dashboard/approval-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"approval-storage.d.ts","sourceRoot":"","sources":["../../src/dashboard/approval-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAStC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,GAAG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AAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiB5C,mBAAmB,CAAC,UAAU,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B1D,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,oBAAoB,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IA4FrH,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA2B7D,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAKlF,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBjE,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IA4FnH,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -3,7 +3,6 @@ import { promises as fs } from 'fs';
|
|
|
3
3
|
import { join, isAbsolute, resolve, basename } from 'path';
|
|
4
4
|
import chokidar from 'chokidar';
|
|
5
5
|
import { diffLines } from 'diff';
|
|
6
|
-
import { PathUtils } from '../core/path-utils.js';
|
|
7
6
|
export class ApprovalStorage extends EventEmitter {
|
|
8
7
|
projectPath; // Workflow root path (.specflow location)
|
|
9
8
|
originalProjectPath; // Original workflow root path for display/registry
|
|
@@ -30,7 +29,10 @@ export class ApprovalStorage extends EventEmitter {
|
|
|
30
29
|
// Relative approval file paths are resolved against workspace path by default.
|
|
31
30
|
// Falls back to workflow root path when files only exist in shared .specflow root.
|
|
32
31
|
this.fileResolutionPath = resolve(options.fileResolutionPath ?? translatedPath);
|
|
33
|
-
|
|
32
|
+
// Use direct path join — the caller passes the correct workflow root.
|
|
33
|
+
// PathUtils.getApprovalsPath() re-derives the root via a process-level singleton
|
|
34
|
+
// which isn't initialized in the dashboard process for DocVault projects.
|
|
35
|
+
this.approvalsDir = join(resolvedPath, 'approvals');
|
|
34
36
|
}
|
|
35
37
|
async start() {
|
|
36
38
|
// Create the approvals directory (empty) so watcher can establish properly
|