specweave 1.0.571 → 1.0.573
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/bin/specweave.js +36 -2
- package/dist/src/cli/commands/hooks-cmd.d.ts +27 -0
- package/dist/src/cli/commands/hooks-cmd.d.ts.map +1 -0
- package/dist/src/cli/commands/hooks-cmd.js +145 -0
- package/dist/src/cli/commands/hooks-cmd.js.map +1 -0
- package/dist/src/cli/commands/update.d.ts.map +1 -1
- package/dist/src/cli/commands/update.js +9 -2
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/cli/helpers/init/smart-defaults.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/smart-defaults.js +0 -6
- package/dist/src/cli/helpers/init/smart-defaults.js.map +1 -1
- package/dist/src/core/doctor/checkers/hooks-checker.js +2 -2
- package/dist/src/core/doctor/checkers/hooks-checker.js.map +1 -1
- package/dist/src/core/doctor/doctor.js +1 -1
- package/dist/src/core/doctor/doctor.js.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.js +34 -2
- package/dist/src/core/hooks/handlers/hook-router.js.map +1 -1
- package/dist/src/core/hooks/handlers/utils.d.ts +2 -1
- package/dist/src/core/hooks/handlers/utils.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/utils.js +14 -1
- package/dist/src/core/hooks/handlers/utils.js.map +1 -1
- package/dist/src/core/hooks/hook-health-tracker.js +2 -2
- package/dist/src/core/hooks/hook-health-tracker.js.map +1 -1
- package/dist/src/core/hooks/hook-logger.d.ts +1 -1
- package/dist/src/core/hooks/hook-logger.js +1 -1
- package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
- package/dist/src/core/increment/completion-validator.js +60 -0
- package/dist/src/core/increment/completion-validator.js.map +1 -1
- package/dist/src/core/increment/template-creator.d.ts.map +1 -1
- package/dist/src/core/increment/template-creator.js +19 -0
- package/dist/src/core/increment/template-creator.js.map +1 -1
- package/dist/src/core/rubric/index.d.ts +6 -0
- package/dist/src/core/rubric/index.d.ts.map +1 -0
- package/dist/src/core/rubric/index.js +6 -0
- package/dist/src/core/rubric/index.js.map +1 -0
- package/dist/src/core/rubric/rubric-evaluator.d.ts +17 -0
- package/dist/src/core/rubric/rubric-evaluator.d.ts.map +1 -0
- package/dist/src/core/rubric/rubric-evaluator.js +141 -0
- package/dist/src/core/rubric/rubric-evaluator.js.map +1 -0
- package/dist/src/core/rubric/rubric-generator.d.ts +13 -0
- package/dist/src/core/rubric/rubric-generator.d.ts.map +1 -0
- package/dist/src/core/rubric/rubric-generator.js +126 -0
- package/dist/src/core/rubric/rubric-generator.js.map +1 -0
- package/dist/src/core/rubric/rubric-merger.d.ts +14 -0
- package/dist/src/core/rubric/rubric-merger.d.ts.map +1 -0
- package/dist/src/core/rubric/rubric-merger.js +78 -0
- package/dist/src/core/rubric/rubric-merger.js.map +1 -0
- package/dist/src/core/rubric/rubric-parser.d.ts +10 -0
- package/dist/src/core/rubric/rubric-parser.d.ts.map +1 -0
- package/dist/src/core/rubric/rubric-parser.js +172 -0
- package/dist/src/core/rubric/rubric-parser.js.map +1 -0
- package/dist/src/core/rubric/types.d.ts +74 -0
- package/dist/src/core/rubric/types.d.ts.map +1 -0
- package/dist/src/core/rubric/types.js +16 -0
- package/dist/src/core/rubric/types.js.map +1 -0
- package/package.json +2 -2
- package/plugins/specweave/agents/sw-planner.md +22 -0
- package/plugins/specweave/defaults/rubric-defaults.md +53 -0
- package/plugins/specweave/skills/auto/SKILL.md +0 -1
- package/plugins/specweave/skills/code-reviewer/SKILL.md +5 -0
- package/plugins/specweave/skills/done/SKILL.md +2 -0
- package/plugins/specweave/skills/grill/SKILL.md +6 -0
- package/plugins/specweave/skills/judge-llm/SKILL.md +7 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
increment: defaults
|
|
3
|
+
title: Global Rubric Defaults
|
|
4
|
+
generated: ""
|
|
5
|
+
source: specweave-defaults
|
|
6
|
+
version: "1.0"
|
|
7
|
+
status: defaults
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Global Rubric Defaults
|
|
11
|
+
|
|
12
|
+
> These criteria apply to all increments unless overridden at the project or increment level.
|
|
13
|
+
> Override by creating `.specweave/rubric-defaults.md` (project) or editing `rubric.md` (increment).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Test Coverage
|
|
18
|
+
|
|
19
|
+
### R-D01: Unit test coverage meets project target [blocking]
|
|
20
|
+
- **Source**: project-default
|
|
21
|
+
- **Evaluator**: coverage
|
|
22
|
+
- **Verify**: Coverage output on new/modified files
|
|
23
|
+
- **Threshold**: >= configured coverageTarget (default 90%) line coverage
|
|
24
|
+
- **Result**: [ ] PENDING
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Code Quality
|
|
29
|
+
|
|
30
|
+
### R-D02: No critical or high code review findings [blocking]
|
|
31
|
+
- **Source**: project-default
|
|
32
|
+
- **Evaluator**: sw:code-reviewer
|
|
33
|
+
- **Verify**: code-review-report.json summary
|
|
34
|
+
- **Threshold**: critical === 0 AND high === 0 AND medium === 0
|
|
35
|
+
- **Result**: [ ] PENDING
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Independent Evaluation
|
|
40
|
+
|
|
41
|
+
### R-D03: Grill ship readiness verified [blocking]
|
|
42
|
+
- **Source**: project-default
|
|
43
|
+
- **Evaluator**: sw:grill
|
|
44
|
+
- **Verify**: grill-report.json shipReadiness
|
|
45
|
+
- **Threshold**: shipReadiness !== "NOT READY"
|
|
46
|
+
- **Result**: [ ] PENDING
|
|
47
|
+
|
|
48
|
+
### R-D04: LLM judge verdict acceptable [blocking]
|
|
49
|
+
- **Source**: project-default
|
|
50
|
+
- **Evaluator**: sw:judge-llm
|
|
51
|
+
- **Verify**: judge-llm-report.json verdict
|
|
52
|
+
- **Threshold**: verdict !== "REJECTED"
|
|
53
|
+
- **Result**: [ ] PENDING
|
|
@@ -404,6 +404,11 @@ Report includes both pre-validation and post-validation severity counts for tran
|
|
|
404
404
|
|
|
405
405
|
### Write JSON Report
|
|
406
406
|
|
|
407
|
+
**Rubric Integration**: If `rubric.md` exists in the increment directory:
|
|
408
|
+
1. Load the file and find all criteria where `Evaluator: sw:code-reviewer`
|
|
409
|
+
2. After completing your review, update matching criteria: `[x] PASS` if no critical/high/medium findings, `[!] FAIL — N critical, M high findings` otherwise
|
|
410
|
+
3. If rubric.md does not exist, skip rubric operations entirely (no error)
|
|
411
|
+
|
|
407
412
|
**IMPORTANT**: When reviewing an increment (`--increment` flag), always use the fixed name
|
|
408
413
|
`code-review-report.json`. The CLI's completion-validator checks for this exact filename.
|
|
409
414
|
Date-based naming is for standalone reviews only.
|
|
@@ -120,6 +120,8 @@ MANDATORY, cannot be bypassed. Runs BEFORE PM validation.
|
|
|
120
120
|
2. **Desync check**: `DesyncDetector.validateOrThrow(incrementId)` -- blocks if metadata.json/spec.md inconsistent
|
|
121
121
|
3. **Completion validation**: `IncrementCompletionValidator.validateCompletion(incrementId)`
|
|
122
122
|
|
|
123
|
+
**Rubric Quality Contract**: If `rubric.md` exists in the increment directory, rubric evaluation runs automatically via the completion-validator. The validator reads rubric.md, evaluates all criteria against gate reports (grill-report.json, code-review-report.json, judge-llm-report.json), and blocks closure if any `[blocking]` criterion has status FAIL or PENDING. Advisory failures are reported as warnings. If rubric.md does not exist, the existing hardcoded gates run unchanged (backward compatible). Review any blocking rubric failures before retrying closure.
|
|
124
|
+
|
|
123
125
|
**Gate 0 validates**:
|
|
124
126
|
- All ACs checked in spec.md (`- [x] **AC-...`)
|
|
125
127
|
- All tasks completed in tasks.md (`**Status**: [x] completed`)
|
|
@@ -48,6 +48,12 @@ I approach code like a demanding tech lead:
|
|
|
48
48
|
|
|
49
49
|
### Phase 0: Spec Compliance Interrogation (ALWAYS RUNS)
|
|
50
50
|
|
|
51
|
+
**Rubric Integration**: If `rubric.md` exists in the increment directory:
|
|
52
|
+
1. Load the file and find all criteria where `Evaluator: sw:grill`
|
|
53
|
+
2. For each criterion, use your AC compliance analysis to determine PASS or FAIL
|
|
54
|
+
3. Update the criterion's `Result` field: `[x] PASS` or `[!] FAIL — <brief reason>`
|
|
55
|
+
4. If rubric.md does not exist, proceed with existing behavior (no error)
|
|
56
|
+
|
|
51
57
|
**This phase runs before any code quality review. It is not opt-in — it always executes.**
|
|
52
58
|
|
|
53
59
|
The implementer finished suspiciously quickly. Their report may be incomplete, inaccurate, or optimistic. You MUST verify everything independently.
|
|
@@ -140,6 +140,13 @@ VERDICT: [summary sentence]
|
|
|
140
140
|
| **CONCERNS** | Issues found worth addressing | Review and fix recommended |
|
|
141
141
|
| **REJECTED** | Critical issues found | MUST fix before proceeding |
|
|
142
142
|
|
|
143
|
+
## Rubric Integration
|
|
144
|
+
|
|
145
|
+
**Rubric Integration**: If `rubric.md` exists in the increment directory:
|
|
146
|
+
1. Load the file and find all criteria where `Evaluator: sw:judge-llm`
|
|
147
|
+
2. After determining your verdict, update matching criteria: `[x] PASS` if verdict is not REJECTED, `[!] FAIL — verdict: REJECTED` otherwise
|
|
148
|
+
3. If rubric.md does not exist, proceed with existing behavior (no error)
|
|
149
|
+
|
|
143
150
|
## Persistent Report (MANDATORY)
|
|
144
151
|
|
|
145
152
|
After evaluation (including consent-denied fallback), you **MUST** write a JSON report. The CLI checks for this file during closure.
|