specweave 1.0.338 → 1.0.339
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/plugins/specweave-github/lib/github-batch-sync.js +27 -2
- package/dist/plugins/specweave-github/lib/github-batch-sync.js.map +1 -1
- package/dist/src/cli/helpers/init/quality-gates-config.d.ts +1 -0
- package/dist/src/cli/helpers/init/quality-gates-config.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/quality-gates-config.js +9 -0
- package/dist/src/cli/helpers/init/quality-gates-config.js.map +1 -1
- package/dist/src/core/config/types.d.ts +11 -0
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/increment/completion-validator.d.ts +17 -0
- package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
- package/dist/src/core/increment/completion-validator.js +123 -1
- package/dist/src/core/increment/completion-validator.js.map +1 -1
- package/dist/src/core/increment/status-commands.js +2 -2
- package/dist/src/core/increment/status-commands.js.map +1 -1
- package/dist/src/core/living-docs/sync-helpers/parsers.d.ts.map +1 -1
- package/dist/src/core/living-docs/sync-helpers/parsers.js +33 -4
- package/dist/src/core/living-docs/sync-helpers/parsers.js.map +1 -1
- package/dist/src/core/skills/skill-judge.d.ts +9 -0
- package/dist/src/core/skills/skill-judge.d.ts.map +1 -1
- package/dist/src/core/skills/skill-judge.js +54 -0
- package/dist/src/core/skills/skill-judge.js.map +1 -1
- package/dist/src/metrics/utils/tier-classifier.js +3 -3
- package/dist/src/metrics/utils/tier-classifier.js.map +1 -1
- package/dist/src/utils/clean-env.d.ts +7 -4
- package/dist/src/utils/clean-env.d.ts.map +1 -1
- package/dist/src/utils/clean-env.js +12 -4
- package/dist/src/utils/clean-env.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/user-prompt-submit.sh +16 -0
- package/plugins/specweave/skills/do/SKILL.md +3 -1
- package/plugins/specweave/skills/done/SKILL.md +17 -10
- package/plugins/specweave/skills/grill/SKILL.md +29 -6
- package/plugins/specweave/skills/judge-llm/SKILL.md +37 -7
- package/plugins/specweave-github/lib/github-batch-sync.js +25 -2
- package/plugins/specweave-github/lib/github-batch-sync.ts +30 -2
- package/src/templates/AGENTS.md.template +8 -11
- package/src/templates/CLAUDE.md.template +7 -6
|
@@ -104,6 +104,10 @@ const US_HEADER_RE = /^###?\s+(US-\d{3,}E?):\s*(.+)$/;
|
|
|
104
104
|
const AC_CHECKBOX_RE = /^-\s+\[([ xX])\]\s+\*\*(?<acId>AC-US\d+E?-\d{2})\*\*:\s*(?<desc>.+)$/;
|
|
105
105
|
// Priority: **Priority**: P1
|
|
106
106
|
const PRIORITY_RE = /\*\*Priority\*\*:\s*(P[0-3])/;
|
|
107
|
+
// Section headers that end description collection
|
|
108
|
+
const AC_SECTION_RE = /^\*\*(?:Acceptance Criteria|ACs?)\*\*:/i;
|
|
109
|
+
// Metadata lines to exclude from description
|
|
110
|
+
const METADATA_RE = /^\*\*(?:Project|Board|External)\*\*:/i;
|
|
107
111
|
|
|
108
112
|
/**
|
|
109
113
|
* Parse user stories from spec.md content.
|
|
@@ -112,11 +116,15 @@ function parseUserStoriesFromSpec(content: string): UserStoryForSync[] {
|
|
|
112
116
|
const lines = content.split('\n');
|
|
113
117
|
const userStories: UserStoryForSync[] = [];
|
|
114
118
|
let current: UserStoryForSync | null = null;
|
|
119
|
+
let collectingDescription = false;
|
|
115
120
|
|
|
116
121
|
for (const line of lines) {
|
|
117
122
|
const usMatch = line.match(US_HEADER_RE);
|
|
118
123
|
if (usMatch) {
|
|
119
|
-
if (current)
|
|
124
|
+
if (current) {
|
|
125
|
+
current.description = current.description.trim();
|
|
126
|
+
userStories.push(current);
|
|
127
|
+
}
|
|
120
128
|
current = {
|
|
121
129
|
id: usMatch[1],
|
|
122
130
|
title: usMatch[2],
|
|
@@ -125,6 +133,7 @@ function parseUserStoriesFromSpec(content: string): UserStoryForSync[] {
|
|
|
125
133
|
status: 'planned',
|
|
126
134
|
acceptanceCriteria: [],
|
|
127
135
|
};
|
|
136
|
+
collectingDescription = true;
|
|
128
137
|
continue;
|
|
129
138
|
}
|
|
130
139
|
|
|
@@ -132,6 +141,7 @@ function parseUserStoriesFromSpec(content: string): UserStoryForSync[] {
|
|
|
132
141
|
|
|
133
142
|
const acMatch = line.match(AC_CHECKBOX_RE);
|
|
134
143
|
if (acMatch?.groups) {
|
|
144
|
+
collectingDescription = false;
|
|
135
145
|
current.acceptanceCriteria.push({
|
|
136
146
|
id: acMatch.groups.acId,
|
|
137
147
|
description: acMatch.groups.desc.trim(),
|
|
@@ -142,11 +152,29 @@ function parseUserStoriesFromSpec(content: string): UserStoryForSync[] {
|
|
|
142
152
|
|
|
143
153
|
const prioMatch = line.match(PRIORITY_RE);
|
|
144
154
|
if (prioMatch) {
|
|
155
|
+
collectingDescription = false;
|
|
145
156
|
current.priority = prioMatch[1];
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (AC_SECTION_RE.test(line)) {
|
|
161
|
+
collectingDescription = false;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Collect description lines between US header and first AC/Priority
|
|
166
|
+
if (collectingDescription) {
|
|
167
|
+
if (METADATA_RE.test(line)) continue;
|
|
168
|
+
if (line.trim() !== '' || current.description.length > 0) {
|
|
169
|
+
current.description += line + '\n';
|
|
170
|
+
}
|
|
146
171
|
}
|
|
147
172
|
}
|
|
148
173
|
|
|
149
|
-
if (current)
|
|
174
|
+
if (current) {
|
|
175
|
+
current.description = current.description.trim();
|
|
176
|
+
userStories.push(current);
|
|
177
|
+
}
|
|
150
178
|
|
|
151
179
|
return userStories;
|
|
152
180
|
}
|
|
@@ -51,11 +51,10 @@ See **Task Format** and **User Story Format** sections for templates.
|
|
|
51
51
|
|
|
52
52
|
Never mark a task complete without proving it works:
|
|
53
53
|
- Code compiles/builds successfully
|
|
54
|
-
- Run tests: `npx vitest run`
|
|
55
|
-
-
|
|
56
|
-
-
|
|
54
|
+
- Run tests after every task: `npx vitest run` + `npx playwright test`
|
|
55
|
+
- `/sw:grill` writes `grill-report.json` — CLI blocks closure without it
|
|
56
|
+
- `/sw:judge-llm` writes `judge-llm-report.json` — WAIVED if consent denied
|
|
57
57
|
- Acceptance criteria actually satisfied
|
|
58
|
-
- Ask: "Would a staff engineer approve this?"
|
|
59
58
|
|
|
60
59
|
### 3. Dependencies First
|
|
61
60
|
|
|
@@ -370,13 +369,11 @@ specweave context projects
|
|
|
370
369
|
8. If 3 consecutive test failures: STOP, re-plan, ask user
|
|
371
370
|
|
|
372
371
|
### Closing Increment
|
|
373
|
-
1. Full test suite: `npx vitest run`
|
|
374
|
-
2. Full E2E
|
|
375
|
-
3.
|
|
376
|
-
4.
|
|
377
|
-
5. `/sw:done
|
|
378
|
-
6. Living docs synced automatically
|
|
379
|
-
7. GitHub/Jira issue closed if enabled
|
|
372
|
+
1. Full test suite: `npx vitest run`
|
|
373
|
+
2. Full E2E: `npx playwright test`
|
|
374
|
+
3. `/sw:grill <id>` — writes `grill-report.json` (CLI requires it)
|
|
375
|
+
4. User acceptance for critical flows (UI, auth, payments)
|
|
376
|
+
5. `/sw:done <id>` — validates report files + PM 3 gates (tasks, tests, docs)
|
|
380
377
|
<!-- /SECTION -->
|
|
381
378
|
|
|
382
379
|
---
|
|
@@ -77,9 +77,9 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
77
77
|
|
|
78
78
|
### 3. Verification Before Done
|
|
79
79
|
- Never mark a task complete without proving it works
|
|
80
|
-
- Run tests: `npx vitest run`
|
|
81
|
-
-
|
|
82
|
-
-
|
|
80
|
+
- Run tests after every task: `npx vitest run` + `npx playwright test`
|
|
81
|
+
- `/sw:grill` writes `grill-report.json` — CLI blocks closure without it
|
|
82
|
+
- `/sw:judge-llm` writes `judge-llm-report.json` — WAIVED if consent denied
|
|
83
83
|
- Ask yourself: **"Would a staff engineer approve this?"**
|
|
84
84
|
|
|
85
85
|
### 4. Think-Before-Act (Dependencies)
|
|
@@ -201,9 +201,10 @@ Primary: `/sw:progress-sync`. Individual: `/sw-github:push`, `/sw-github:close`.
|
|
|
201
201
|
- Never mark a task `[x]` until its tests pass
|
|
202
202
|
|
|
203
203
|
### Before Closing (`/sw:done`)
|
|
204
|
-
- `/sw:grill`
|
|
205
|
-
-
|
|
206
|
-
-
|
|
204
|
+
- `/sw:grill` writes `grill-report.json` — CLI blocks closure without it
|
|
205
|
+
- `/sw:judge-llm` writes `judge-llm-report.json` — WAIVED if consent denied
|
|
206
|
+
- `/sw:validate` — 130+ rule checks
|
|
207
|
+
- E2E: `npx playwright test` (blocking gate)
|
|
207
208
|
|
|
208
209
|
### Test Stack
|
|
209
210
|
- Unit/Integration: Vitest (`.test.ts`), ESM mocking with `vi.hoisted()` + `vi.mock()`
|