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.
Files changed (64) hide show
  1. package/bin/specweave.js +36 -2
  2. package/dist/src/cli/commands/hooks-cmd.d.ts +27 -0
  3. package/dist/src/cli/commands/hooks-cmd.d.ts.map +1 -0
  4. package/dist/src/cli/commands/hooks-cmd.js +145 -0
  5. package/dist/src/cli/commands/hooks-cmd.js.map +1 -0
  6. package/dist/src/cli/commands/update.d.ts.map +1 -1
  7. package/dist/src/cli/commands/update.js +9 -2
  8. package/dist/src/cli/commands/update.js.map +1 -1
  9. package/dist/src/cli/helpers/init/smart-defaults.d.ts.map +1 -1
  10. package/dist/src/cli/helpers/init/smart-defaults.js +0 -6
  11. package/dist/src/cli/helpers/init/smart-defaults.js.map +1 -1
  12. package/dist/src/core/doctor/checkers/hooks-checker.js +2 -2
  13. package/dist/src/core/doctor/checkers/hooks-checker.js.map +1 -1
  14. package/dist/src/core/doctor/doctor.js +1 -1
  15. package/dist/src/core/doctor/doctor.js.map +1 -1
  16. package/dist/src/core/hooks/handlers/hook-router.d.ts.map +1 -1
  17. package/dist/src/core/hooks/handlers/hook-router.js +34 -2
  18. package/dist/src/core/hooks/handlers/hook-router.js.map +1 -1
  19. package/dist/src/core/hooks/handlers/utils.d.ts +2 -1
  20. package/dist/src/core/hooks/handlers/utils.d.ts.map +1 -1
  21. package/dist/src/core/hooks/handlers/utils.js +14 -1
  22. package/dist/src/core/hooks/handlers/utils.js.map +1 -1
  23. package/dist/src/core/hooks/hook-health-tracker.js +2 -2
  24. package/dist/src/core/hooks/hook-health-tracker.js.map +1 -1
  25. package/dist/src/core/hooks/hook-logger.d.ts +1 -1
  26. package/dist/src/core/hooks/hook-logger.js +1 -1
  27. package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
  28. package/dist/src/core/increment/completion-validator.js +60 -0
  29. package/dist/src/core/increment/completion-validator.js.map +1 -1
  30. package/dist/src/core/increment/template-creator.d.ts.map +1 -1
  31. package/dist/src/core/increment/template-creator.js +19 -0
  32. package/dist/src/core/increment/template-creator.js.map +1 -1
  33. package/dist/src/core/rubric/index.d.ts +6 -0
  34. package/dist/src/core/rubric/index.d.ts.map +1 -0
  35. package/dist/src/core/rubric/index.js +6 -0
  36. package/dist/src/core/rubric/index.js.map +1 -0
  37. package/dist/src/core/rubric/rubric-evaluator.d.ts +17 -0
  38. package/dist/src/core/rubric/rubric-evaluator.d.ts.map +1 -0
  39. package/dist/src/core/rubric/rubric-evaluator.js +141 -0
  40. package/dist/src/core/rubric/rubric-evaluator.js.map +1 -0
  41. package/dist/src/core/rubric/rubric-generator.d.ts +13 -0
  42. package/dist/src/core/rubric/rubric-generator.d.ts.map +1 -0
  43. package/dist/src/core/rubric/rubric-generator.js +126 -0
  44. package/dist/src/core/rubric/rubric-generator.js.map +1 -0
  45. package/dist/src/core/rubric/rubric-merger.d.ts +14 -0
  46. package/dist/src/core/rubric/rubric-merger.d.ts.map +1 -0
  47. package/dist/src/core/rubric/rubric-merger.js +78 -0
  48. package/dist/src/core/rubric/rubric-merger.js.map +1 -0
  49. package/dist/src/core/rubric/rubric-parser.d.ts +10 -0
  50. package/dist/src/core/rubric/rubric-parser.d.ts.map +1 -0
  51. package/dist/src/core/rubric/rubric-parser.js +172 -0
  52. package/dist/src/core/rubric/rubric-parser.js.map +1 -0
  53. package/dist/src/core/rubric/types.d.ts +74 -0
  54. package/dist/src/core/rubric/types.d.ts.map +1 -0
  55. package/dist/src/core/rubric/types.js +16 -0
  56. package/dist/src/core/rubric/types.js.map +1 -0
  57. package/package.json +2 -2
  58. package/plugins/specweave/agents/sw-planner.md +22 -0
  59. package/plugins/specweave/defaults/rubric-defaults.md +53 -0
  60. package/plugins/specweave/skills/auto/SKILL.md +0 -1
  61. package/plugins/specweave/skills/code-reviewer/SKILL.md +5 -0
  62. package/plugins/specweave/skills/done/SKILL.md +2 -0
  63. package/plugins/specweave/skills/grill/SKILL.md +6 -0
  64. 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
@@ -1,5 +1,4 @@
1
1
  ---
2
- disable-model-invocation: true
3
2
  description: Start autonomous execution with stop hook feedback loop. Works until all tasks complete or max iterations reached. Use when you want continuous unattended execution.
4
3
  argument-hint: "[INCREMENT_IDS...] [OPTIONS]"
5
4
  ---
@@ -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.