devrites 5.14.0 → 5.14.2

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 (218) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +6 -3
  3. package/docs/adr/0033-rite-fast-own-agents.md +45 -0
  4. package/docs/adr/README.md +2 -1
  5. package/docs/architecture.md +6 -4
  6. package/docs/command-map.md +2 -1
  7. package/docs/flow.md +3 -2
  8. package/docs/orchestration.md +3 -0
  9. package/docs/quick-reference.md +2 -1
  10. package/docs/skills.md +13 -8
  11. package/docs/usage.md +2 -2
  12. package/engine/internal/install/apply.go +5 -3
  13. package/engine/internal/install/binary.go +3 -1
  14. package/engine/internal/install/install.go +0 -25
  15. package/engine/internal/lib/claims.go +15 -0
  16. package/engine/internal/lib/claims_test.go +28 -0
  17. package/engine/internal/lib/context_next_test.go +53 -0
  18. package/engine/internal/lib/dispatch.go +28 -7
  19. package/engine/internal/lib/manifest_union.go +14 -0
  20. package/engine/internal/overhaul/admit/admit_test.go +9 -0
  21. package/engine/internal/overhaul/admit/run.go +9 -0
  22. package/engine/internal/overhaul/bench/run.go +327 -38
  23. package/engine/internal/overhaul/bench/run_test.go +131 -0
  24. package/engine/internal/overhaul/bench/stats.go +154 -0
  25. package/engine/internal/overhaul/ovio/ovio.go +4 -0
  26. package/engine/internal/overhaul/records/check.go +3 -0
  27. package/engine/internal/overhaul/records/consistency.go +217 -0
  28. package/engine/internal/overhaul/records/records_test.go +81 -0
  29. package/engine/internal/overhaul/records/run.go +1 -1
  30. package/engine/internal/overhaul/render/run.go +2 -0
  31. package/engine/internal/overhaul/render/run_test.go +5 -1
  32. package/engine/internal/overhaul/score/run.go +58 -9
  33. package/engine/internal/overhaul/score/run_test.go +84 -8
  34. package/engine/internal/parallel/ops.go +5 -0
  35. package/engine/internal/state/write.go +8 -2
  36. package/engine/internal/version/version_test.go +27 -0
  37. package/engine/main.go +2 -2
  38. package/pack/.claude/agents/fast-builder.md +90 -0
  39. package/pack/.claude/agents/fast-checker.md +60 -0
  40. package/pack/.claude/agents/fast-critic.md +70 -0
  41. package/pack/.claude/agents/fast-planner.md +95 -0
  42. package/pack/.claude/agents/overhaul-backend-engineer.md +5 -4
  43. package/pack/.claude/agents/overhaul-boundary.md +2 -2
  44. package/pack/.claude/agents/overhaul-craft.md +1 -1
  45. package/pack/.claude/agents/overhaul-frontend-engineer.md +5 -3
  46. package/pack/.claude/agents/overhaul-implementer.md +9 -5
  47. package/pack/.claude/agents/overhaul-specialist.md +6 -3
  48. package/pack/.claude/agents/overhaul-verifier.md +3 -3
  49. package/pack/.claude/settings.json +1 -1
  50. package/pack/.claude/skills/devrites-lib/reference/intent-map.md +2 -0
  51. package/pack/.claude/skills/overhaul/SKILL.md +2 -1
  52. package/pack/.claude/skills/overhaul/references/audit-domains.md +139 -12
  53. package/pack/.claude/skills/overhaul/references/lifecycle.md +2 -0
  54. package/pack/.claude/skills/overhaul/references/orchestration.md +13 -5
  55. package/pack/.claude/skills/overhaul/references/records.md +12 -3
  56. package/pack/.claude/skills/overhaul/references/repair-and-measurement.md +108 -5
  57. package/pack/.claude/skills/overhaul/references/scope-and-safety.md +17 -2
  58. package/pack/.claude/skills/overhaul/references/scoring.md +36 -7
  59. package/pack/.claude/skills/overhaul/references/stack-profiles.md +52 -0
  60. package/pack/.claude/skills/rite/SKILL.md +4 -1
  61. package/pack/.claude/skills/rite-doctor/SKILL.md +2 -0
  62. package/pack/.claude/skills/rite-fast/SKILL.md +183 -0
  63. package/pack/.claude/skills/rite-fast/reference/artifacts.md +107 -0
  64. package/pack/.claude/skills/rite-fast/reference/check-and-triage.md +51 -0
  65. package/pack/.claude/skills/rite-quick/SKILL.md +2 -0
  66. package/pack/.claude/skills/rite-spec/reference/state-workspace.md +1 -0
  67. package/pack/generated/claude/agents/fast-builder.md +90 -0
  68. package/pack/generated/claude/agents/fast-checker.md +60 -0
  69. package/pack/generated/claude/agents/fast-critic.md +70 -0
  70. package/pack/generated/claude/agents/fast-planner.md +95 -0
  71. package/pack/generated/claude/agents/overhaul-backend-engineer.md +5 -4
  72. package/pack/generated/claude/agents/overhaul-boundary.md +2 -2
  73. package/pack/generated/claude/agents/overhaul-craft.md +1 -1
  74. package/pack/generated/claude/agents/overhaul-frontend-engineer.md +5 -3
  75. package/pack/generated/claude/agents/overhaul-implementer.md +9 -5
  76. package/pack/generated/claude/agents/overhaul-specialist.md +6 -3
  77. package/pack/generated/claude/agents/overhaul-verifier.md +3 -3
  78. package/pack/generated/claude/settings.json +1 -1
  79. package/pack/generated/claude/skills/devrites-lib/reference/intent-map.md +2 -0
  80. package/pack/generated/claude/skills/overhaul/SKILL.md +2 -1
  81. package/pack/generated/claude/skills/overhaul/references/audit-domains.md +139 -12
  82. package/pack/generated/claude/skills/overhaul/references/lifecycle.md +2 -0
  83. package/pack/generated/claude/skills/overhaul/references/orchestration.md +13 -5
  84. package/pack/generated/claude/skills/overhaul/references/records.md +12 -3
  85. package/pack/generated/claude/skills/overhaul/references/repair-and-measurement.md +108 -5
  86. package/pack/generated/claude/skills/overhaul/references/scope-and-safety.md +17 -2
  87. package/pack/generated/claude/skills/overhaul/references/scoring.md +36 -7
  88. package/pack/generated/claude/skills/overhaul/references/stack-profiles.md +52 -0
  89. package/pack/generated/claude/skills/rite/SKILL.md +4 -1
  90. package/pack/generated/claude/skills/rite-doctor/SKILL.md +2 -0
  91. package/pack/generated/claude/skills/rite-fast/SKILL.md +183 -0
  92. package/pack/generated/claude/skills/rite-fast/reference/artifacts.md +107 -0
  93. package/pack/generated/claude/skills/rite-fast/reference/check-and-triage.md +51 -0
  94. package/pack/generated/claude/skills/rite-quick/SKILL.md +2 -0
  95. package/pack/generated/claude/skills/rite-spec/reference/state-workspace.md +1 -0
  96. package/pack/generated/codex/AGENTS.md +1 -0
  97. package/pack/generated/codex/agents/fast-builder.toml +90 -0
  98. package/pack/generated/codex/agents/fast-checker.toml +60 -0
  99. package/pack/generated/codex/agents/fast-critic.toml +70 -0
  100. package/pack/generated/codex/agents/fast-planner.toml +95 -0
  101. package/pack/generated/codex/agents/overhaul-backend-engineer.toml +5 -4
  102. package/pack/generated/codex/agents/overhaul-boundary.toml +2 -2
  103. package/pack/generated/codex/agents/overhaul-craft.toml +1 -1
  104. package/pack/generated/codex/agents/overhaul-frontend-engineer.toml +5 -3
  105. package/pack/generated/codex/agents/overhaul-implementer.toml +9 -5
  106. package/pack/generated/codex/agents/overhaul-specialist.toml +6 -3
  107. package/pack/generated/codex/agents/overhaul-verifier.toml +3 -3
  108. package/pack/generated/codex/skills/devrites-lib/reference/intent-map.md +2 -0
  109. package/pack/generated/codex/skills/overhaul/SKILL.md +2 -1
  110. package/pack/generated/codex/skills/overhaul/references/audit-domains.md +139 -12
  111. package/pack/generated/codex/skills/overhaul/references/lifecycle.md +2 -0
  112. package/pack/generated/codex/skills/overhaul/references/orchestration.md +13 -5
  113. package/pack/generated/codex/skills/overhaul/references/records.md +12 -3
  114. package/pack/generated/codex/skills/overhaul/references/repair-and-measurement.md +108 -5
  115. package/pack/generated/codex/skills/overhaul/references/scope-and-safety.md +17 -2
  116. package/pack/generated/codex/skills/overhaul/references/scoring.md +36 -7
  117. package/pack/generated/codex/skills/overhaul/references/stack-profiles.md +52 -0
  118. package/pack/generated/codex/skills/rite/SKILL.md +4 -1
  119. package/pack/generated/codex/skills/rite-doctor/SKILL.md +2 -0
  120. package/pack/generated/codex/skills/rite-fast/SKILL.md +183 -0
  121. package/pack/generated/codex/skills/rite-fast/agents/openai.yaml +2 -0
  122. package/pack/generated/codex/skills/rite-fast/reference/artifacts.md +107 -0
  123. package/pack/generated/codex/skills/rite-fast/reference/check-and-triage.md +51 -0
  124. package/pack/generated/codex/skills/rite-quick/SKILL.md +2 -0
  125. package/pack/generated/codex/skills/rite-spec/reference/state-workspace.md +1 -0
  126. package/pack/generated/devin/AGENTS.md +1 -0
  127. package/pack/generated/devin/agents/fast-builder.md +96 -0
  128. package/pack/generated/devin/agents/fast-checker.md +63 -0
  129. package/pack/generated/devin/agents/fast-critic.md +73 -0
  130. package/pack/generated/devin/agents/fast-planner.md +98 -0
  131. package/pack/generated/devin/agents/overhaul-backend-engineer.md +5 -4
  132. package/pack/generated/devin/agents/overhaul-boundary.md +2 -2
  133. package/pack/generated/devin/agents/overhaul-craft.md +1 -1
  134. package/pack/generated/devin/agents/overhaul-frontend-engineer.md +5 -3
  135. package/pack/generated/devin/agents/overhaul-implementer.md +9 -5
  136. package/pack/generated/devin/agents/overhaul-specialist.md +6 -3
  137. package/pack/generated/devin/agents/overhaul-verifier.md +3 -3
  138. package/pack/generated/devin/skills/devrites-lib/reference/intent-map.md +2 -0
  139. package/pack/generated/devin/skills/overhaul/SKILL.md +2 -1
  140. package/pack/generated/devin/skills/overhaul/references/audit-domains.md +139 -12
  141. package/pack/generated/devin/skills/overhaul/references/lifecycle.md +2 -0
  142. package/pack/generated/devin/skills/overhaul/references/orchestration.md +13 -5
  143. package/pack/generated/devin/skills/overhaul/references/records.md +12 -3
  144. package/pack/generated/devin/skills/overhaul/references/repair-and-measurement.md +108 -5
  145. package/pack/generated/devin/skills/overhaul/references/scope-and-safety.md +17 -2
  146. package/pack/generated/devin/skills/overhaul/references/scoring.md +36 -7
  147. package/pack/generated/devin/skills/overhaul/references/stack-profiles.md +52 -0
  148. package/pack/generated/devin/skills/rite/SKILL.md +4 -1
  149. package/pack/generated/devin/skills/rite-doctor/SKILL.md +2 -0
  150. package/pack/generated/devin/skills/rite-fast/SKILL.md +183 -0
  151. package/pack/generated/devin/skills/rite-fast/reference/artifacts.md +107 -0
  152. package/pack/generated/devin/skills/rite-fast/reference/check-and-triage.md +51 -0
  153. package/pack/generated/devin/skills/rite-quick/SKILL.md +2 -0
  154. package/pack/generated/devin/skills/rite-spec/reference/state-workspace.md +1 -0
  155. package/pack/generated/omp/agents/fast-builder.md +89 -0
  156. package/pack/generated/omp/agents/fast-checker.md +59 -0
  157. package/pack/generated/omp/agents/fast-critic.md +69 -0
  158. package/pack/generated/omp/agents/fast-planner.md +94 -0
  159. package/pack/generated/omp/agents/overhaul-backend-engineer.md +5 -4
  160. package/pack/generated/omp/agents/overhaul-boundary.md +2 -2
  161. package/pack/generated/omp/agents/overhaul-craft.md +1 -1
  162. package/pack/generated/omp/agents/overhaul-frontend-engineer.md +5 -3
  163. package/pack/generated/omp/agents/overhaul-implementer.md +9 -5
  164. package/pack/generated/omp/agents/overhaul-specialist.md +6 -3
  165. package/pack/generated/omp/agents/overhaul-verifier.md +3 -3
  166. package/pack/generated/omp/commands/rite-fast.md +5 -0
  167. package/pack/generated/omp/skills/devrites-lib/reference/intent-map.md +2 -0
  168. package/pack/generated/omp/skills/overhaul/SKILL.md +2 -1
  169. package/pack/generated/omp/skills/overhaul/references/audit-domains.md +139 -12
  170. package/pack/generated/omp/skills/overhaul/references/lifecycle.md +2 -0
  171. package/pack/generated/omp/skills/overhaul/references/orchestration.md +13 -5
  172. package/pack/generated/omp/skills/overhaul/references/records.md +12 -3
  173. package/pack/generated/omp/skills/overhaul/references/repair-and-measurement.md +108 -5
  174. package/pack/generated/omp/skills/overhaul/references/scope-and-safety.md +17 -2
  175. package/pack/generated/omp/skills/overhaul/references/scoring.md +36 -7
  176. package/pack/generated/omp/skills/overhaul/references/stack-profiles.md +52 -0
  177. package/pack/generated/omp/skills/rite/SKILL.md +4 -1
  178. package/pack/generated/omp/skills/rite-doctor/SKILL.md +2 -0
  179. package/pack/generated/omp/skills/rite-fast/SKILL.md +183 -0
  180. package/pack/generated/omp/skills/rite-fast/reference/artifacts.md +107 -0
  181. package/pack/generated/omp/skills/rite-fast/reference/check-and-triage.md +51 -0
  182. package/pack/generated/omp/skills/rite-quick/SKILL.md +2 -0
  183. package/pack/generated/omp/skills/rite-spec/reference/state-workspace.md +1 -0
  184. package/pack/generated/pi/AGENTS.md +1 -0
  185. package/pack/generated/pi/agents/fast-builder.md +90 -0
  186. package/pack/generated/pi/agents/fast-checker.md +60 -0
  187. package/pack/generated/pi/agents/fast-critic.md +70 -0
  188. package/pack/generated/pi/agents/fast-planner.md +95 -0
  189. package/pack/generated/pi/agents/overhaul-backend-engineer.md +5 -4
  190. package/pack/generated/pi/agents/overhaul-boundary.md +2 -2
  191. package/pack/generated/pi/agents/overhaul-craft.md +1 -1
  192. package/pack/generated/pi/agents/overhaul-frontend-engineer.md +5 -3
  193. package/pack/generated/pi/agents/overhaul-implementer.md +9 -5
  194. package/pack/generated/pi/agents/overhaul-specialist.md +6 -3
  195. package/pack/generated/pi/agents/overhaul-verifier.md +3 -3
  196. package/pack/generated/pi/prompts/rite-fast.md +5 -0
  197. package/pack/generated/pi/skills/devrites-lib/reference/intent-map.md +2 -0
  198. package/pack/generated/pi/skills/overhaul/SKILL.md +2 -1
  199. package/pack/generated/pi/skills/overhaul/references/audit-domains.md +139 -12
  200. package/pack/generated/pi/skills/overhaul/references/lifecycle.md +2 -0
  201. package/pack/generated/pi/skills/overhaul/references/orchestration.md +13 -5
  202. package/pack/generated/pi/skills/overhaul/references/records.md +12 -3
  203. package/pack/generated/pi/skills/overhaul/references/repair-and-measurement.md +108 -5
  204. package/pack/generated/pi/skills/overhaul/references/scope-and-safety.md +17 -2
  205. package/pack/generated/pi/skills/overhaul/references/scoring.md +36 -7
  206. package/pack/generated/pi/skills/overhaul/references/stack-profiles.md +52 -0
  207. package/pack/generated/pi/skills/rite/SKILL.md +4 -1
  208. package/pack/generated/pi/skills/rite-doctor/SKILL.md +2 -0
  209. package/pack/generated/pi/skills/rite-fast/SKILL.md +183 -0
  210. package/pack/generated/pi/skills/rite-fast/reference/artifacts.md +107 -0
  211. package/pack/generated/pi/skills/rite-fast/reference/check-and-triage.md +51 -0
  212. package/pack/generated/pi/skills/rite-quick/SKILL.md +2 -0
  213. package/pack/generated/pi/skills/rite-spec/reference/state-workspace.md +1 -0
  214. package/package.json +1 -1
  215. package/scripts/codex-generate.sh +2 -1
  216. package/scripts/devin-generate.sh +4 -3
  217. package/scripts/omp-generate.sh +3 -3
  218. package/scripts/pi-generate.sh +4 -3
@@ -20,7 +20,7 @@ func ctl(i int, d string, w any, lanes ...string) map[string]any {
20
20
  if len(lanes) == 0 {
21
21
  lanes = []string{"backend"}
22
22
  }
23
- return map[string]any{"id": fmt.Sprintf("C-%03d", i), "domain": d, "lanes": lanes, "weight": w, "hard_gate": false}
23
+ return map[string]any{"id": fmt.Sprintf("C-%03d", i), "domain": d, "lanes": lanes, "weight": w, "hard_gate": false, "evaluation": "executed"}
24
24
  }
25
25
 
26
26
  func rubricOf(controls []map[string]any) map[string]any {
@@ -258,15 +258,22 @@ func TestMonotonicity(t *testing.T) {
258
258
  }
259
259
  }
260
260
 
261
- // 8. Duplicate control ids and zero weights are invalid input.
261
+ // 8. Duplicate control ids, weights off the 1/3/5 scale and unknown evaluations are invalid input.
262
262
  func TestInvalidCatalog(t *testing.T) {
263
263
  zero := base()
264
264
  zero[0] = maps.Clone(zero[0])
265
265
  zero[0]["weight"] = 0
266
+ two := base()
267
+ two[0] = maps.Clone(two[0])
268
+ two[0]["weight"] = 2
269
+ noEval := base()
270
+ noEval[0] = maps.Clone(noEval[0])
271
+ delete(noEval[0], "evaluation")
266
272
  for _, tc := range []struct {
267
273
  cs []map[string]any
268
274
  want string
269
- }{{append(base(), base()[0]), "duplicate control id"}, {zero, "must be > 0"}} {
275
+ }{{append(base(), base()[0]), "duplicate control id"}, {zero, "must be > 0"}, {two, "weight must be 1, 3 or 5"},
276
+ {noEval, "evaluation must be"}} {
270
277
  if _, err := tryScore(t, rubricOf(tc.cs), resOf(nil), passing()); err == nil || !strings.Contains(err.Error(), tc.want) {
271
278
  t.Fatalf("want %q, got %v", tc.want, err)
272
279
  }
@@ -330,6 +337,17 @@ func writeJSON(t *testing.T, dir, name string, v any) string {
330
337
  return p
331
338
  }
332
339
 
340
+ // pinned sets the results' rubric_digest to the digest of the rubric file.
341
+ func pinned(t *testing.T, rubricPath string, results map[string]any) map[string]any {
342
+ t.Helper()
343
+ d, err := ovio.SHA256File(rubricPath)
344
+ if err != nil {
345
+ t.Fatal(err)
346
+ }
347
+ results["rubric_digest"] = d
348
+ return results
349
+ }
350
+
333
351
  func runCLI(args ...string) (int, string, string) {
334
352
  var o, e bytes.Buffer
335
353
  code := Run(args, &o, &e)
@@ -343,11 +361,15 @@ func TestCompare(t *testing.T) {
343
361
  }
344
362
  r := map[string]any{"schema": "overhaul.rubric/1", "rev": 1, "lanes": []string{"backend"},
345
363
  "domains": map[string]any{"correctness": 50, "security": 50}, "domain_exclusions": excl,
364
+ "weight_deviations": []any{
365
+ map[string]any{"domain": "correctness", "reason": "two-domain library", "approval": "AP-1"},
366
+ map[string]any{"domain": "security", "reason": "two-domain library", "approval": "AP-1"}},
346
367
  "controls": []map[string]any{ctl(1, "correctness", 5), ctl(2, "correctness", 5), ctl(3, "security", 5)}}
347
368
  dir := t.TempDir()
348
- code, stdout, stderr := runCLI("compare", "--rubric", writeJSON(t, dir, "r.json", r),
349
- "--baseline", writeJSON(t, dir, "a.json", resOf(map[string]string{"C-001": "PASS", "C-002": "UNKNOWN", "C-003": "PASS"})),
350
- "--candidate", writeJSON(t, dir, "b.json", resOf(map[string]string{"C-001": "FAIL", "C-002": "PASS", "C-003": "PASS"})))
369
+ rp := writeJSON(t, dir, "r.json", r)
370
+ code, stdout, stderr := runCLI("compare", "--rubric", rp,
371
+ "--baseline", writeJSON(t, dir, "a.json", pinned(t, rp, resOf(map[string]string{"C-001": "PASS", "C-002": "UNKNOWN", "C-003": "PASS"}))),
372
+ "--candidate", writeJSON(t, dir, "b.json", pinned(t, rp, resOf(map[string]string{"C-001": "FAIL", "C-002": "PASS", "C-003": "PASS"}))))
351
373
  if code != 0 {
352
374
  t.Fatalf("exit %d: %s", code, stderr)
353
375
  }
@@ -367,8 +389,9 @@ func TestCLIOutWritesScorecard(t *testing.T) {
367
389
  dir := t.TempDir()
368
390
  b := base()
369
391
  outPath := filepath.Join(dir, "scorecard.json")
370
- code, stdout, stderr := runCLI("--rubric", writeJSON(t, dir, "r.json", rubricOf(b)),
371
- "--results", writeJSON(t, dir, "s.json", resOf(allPass(b))),
392
+ rp := writeJSON(t, dir, "r.json", rubricOf(b))
393
+ code, stdout, stderr := runCLI("--rubric", rp,
394
+ "--results", writeJSON(t, dir, "s.json", pinned(t, rp, resOf(allPass(b)))),
372
395
  "--gates", writeJSON(t, dir, "g.json", passing()), "--out", outPath)
373
396
  if code != 0 || stdout != "MEETS_TARGETS -> "+outPath+"\n" {
374
397
  t.Fatalf("exit %d stdout %q stderr %q", code, stdout, stderr)
@@ -403,3 +426,56 @@ func TestCLIInvalidInputExits2(t *testing.T) {
403
426
  }
404
427
  }
405
428
  }
429
+
430
+ // A domain weight off the default table needs a recorded deviation with an approval.
431
+ func TestDomainWeightDeviation(t *testing.T) {
432
+ b := base()
433
+ r := rubricOf(b)
434
+ r["domains"].(map[string]any)["security"] = 30
435
+ if _, err := tryScore(t, r, resOf(allPass(b)), passing()); err == nil || !strings.Contains(err.Error(), "weight_deviations") {
436
+ t.Fatalf("undeclared deviation accepted: %v", err)
437
+ }
438
+ r["weight_deviations"] = []any{map[string]any{"domain": "security", "reason": "payments service"}}
439
+ if _, err := tryScore(t, r, resOf(allPass(b)), passing()); err == nil || !strings.Contains(err.Error(), "approval reference") {
440
+ t.Fatalf("deviation without approval accepted: %v", err)
441
+ }
442
+ dup := map[string]any{"domain": "security", "reason": "payments service", "approval": "AP-1"}
443
+ r["weight_deviations"] = []any{dup, dup}
444
+ if _, err := tryScore(t, r, resOf(allPass(b)), passing()); err == nil || !strings.Contains(err.Error(), "unknown or repeated") {
445
+ t.Fatalf("repeated deviation accepted: %v", err)
446
+ }
447
+ r["weight_deviations"] = []any{dup}
448
+ mustScore(t, r, resOf(allPass(b)), passing())
449
+ }
450
+
451
+ // A performance PASS from static inspection earns nothing.
452
+ func TestStaticPerformancePassIsUnknown(t *testing.T) {
453
+ b := base()
454
+ b[3] = maps.Clone(b[3])
455
+ b[3]["evaluation"] = "static"
456
+ out := mustScore(t, rubricOf(b), resOf(allPass(b)), passing())
457
+ if get(out, "status_by_control."+b[3]["id"].(string)) != "UNKNOWN" || get(out, "readiness_verdict") != "NOT_READY" {
458
+ t.Fatalf("static performance PASS counted: %v", out["status_by_control"])
459
+ }
460
+ }
461
+
462
+ // Results without the rubric digest, or compared against another rubric, are invalid.
463
+ func TestRubricDigestRequired(t *testing.T) {
464
+ dir := t.TempDir()
465
+ b := base()
466
+ rp := writeJSON(t, dir, "r.json", rubricOf(b))
467
+ other := rubricOf(b)
468
+ other["rev"] = 2
469
+ op := writeJSON(t, dir, "other.json", other)
470
+ g := writeJSON(t, dir, "g.json", passing())
471
+ for name, args := range map[string][]string{
472
+ "score without digest": {"--rubric", rp, "--results", writeJSON(t, dir, "s.json", resOf(allPass(b))), "--gates", g},
473
+ "compare other rubric": {"compare", "--rubric", rp,
474
+ "--baseline", writeJSON(t, dir, "a.json", pinned(t, rp, resOf(allPass(b)))),
475
+ "--candidate", writeJSON(t, dir, "c.json", pinned(t, op, resOf(allPass(b))))},
476
+ } {
477
+ if code, _, stderr := runCLI(args...); code != 2 || !strings.Contains(stderr, "rubric") {
478
+ t.Fatalf("%s: exit %d %q", name, code, stderr)
479
+ }
480
+ }
481
+ }
@@ -314,6 +314,11 @@ func integrateLocked(opts IntegrateOpts) (tip string, lease *Lease, err error) {
314
314
  ibranch := IntegrateBranchName(opts.Slug, lease.BatchID)
315
315
  stageWT := filepath.Join(ScratchRoot(opts.Root), lease.BatchID, "integrate")
316
316
  _ = os.RemoveAll(stageWT)
317
+ // A crashed prior attempt leaves the worktree registered; prune it so the
318
+ // branch delete and worktree add below can succeed on retry.
319
+ if _, err := git(opts.Root, "worktree", "prune"); err != nil {
320
+ warnf("worktree prune: %v", err)
321
+ }
317
322
  if exists, _ := branchExists(opts.Root, ibranch); exists {
318
323
  _ = deleteBranch(opts.Root, ibranch)
319
324
  }
@@ -51,9 +51,15 @@ func WithFeatureLock(root, slug string, fn func() error) error {
51
51
  if err := os.MkdirAll(dir, 0o755); err != nil {
52
52
  return fmt.Errorf("lock feature %q: %w", slug, err)
53
53
  }
54
- l, err := acquireLock(filepath.Join(dir, ".lock"))
54
+ return WithLock(filepath.Join(dir, ".lock"), fn)
55
+ }
56
+
57
+ // WithLock runs fn while holding the same exclusive advisory lock as
58
+ // WithFeatureLock, keyed on lockPath, for shared ledgers outside one feature.
59
+ func WithLock(lockPath string, fn func() error) error {
60
+ l, err := acquireLock(lockPath)
55
61
  if err != nil {
56
- return fmt.Errorf("lock feature %q: %w", slug, err)
62
+ return fmt.Errorf("lock %s: %w", lockPath, err)
57
63
  }
58
64
  defer func() { _ = l.release() }()
59
65
  return fn()
@@ -0,0 +1,27 @@
1
+ package version
2
+
3
+ import "testing"
4
+
5
+ func TestCompare(t *testing.T) {
6
+ cases := []struct {
7
+ a, b string
8
+ cmp int
9
+ wantOK bool
10
+ }{
11
+ {"1.2.3", "1.2.3", 0, true},
12
+ {"v1.2.4", "1.2.3", 1, true},
13
+ {"1.2", "1.2.0", 0, true},
14
+ {"1.10.0", "1.9.9", 1, true},
15
+ {"2.0.0-rc.1", "2.0.0", 0, true},
16
+ {"1.0.0+build", "1.0.1", -1, true},
17
+ {"dev", "1.0.0", 0, false},
18
+ {"1.x.0", "1.0.0", 0, false},
19
+ {"", "1.0.0", 0, false},
20
+ }
21
+ for _, c := range cases {
22
+ got, ok := Compare(c.a, c.b)
23
+ if got != c.cmp || ok != c.wantOK {
24
+ t.Errorf("Compare(%q, %q) = %d, %v; want %d, %v", c.a, c.b, got, ok, c.cmp, c.wantOK)
25
+ }
26
+ }
27
+ }
package/engine/main.go CHANGED
@@ -46,8 +46,8 @@ Usage:
46
46
  devrites-engine orient <slug> Alias for observe summary
47
47
  devrites-engine next [slug] Print the minimal remaining lifecycle path with advisory skips
48
48
  devrites-engine handoff [slug] Emit the deterministic resume record (cursor, blocking gates, ledger, dead ends)
49
- devrites-engine context <slug> --phase <p> [--role <r>] [--trigger a,b]
50
- Emit one deduplicated read-set bundle for a phase or dispatch role
49
+ devrites-engine context [slug] (--phase <p> | --skill <name>) [--role <r>] [--trigger a,b]
50
+ Emit one deduplicated read-set bundle for a phase, skill, or dispatch role
51
51
  devrites-engine metrics record <slug> --phase <p> --event <e> [--role r] [--bytes n] [--note s]
52
52
  devrites-engine metrics summary [slug] Summarize the per-feature metrics.jsonl event ledger
53
53
  devrites-engine dispatch <slug> <sub> Launch-wave barrier for parallel dispatch: open/start/seal/return/status/abandon
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: fast-builder
3
+ description: Write-capable builder for /rite-fast. Implements one approved slice, or one batch of accepted gap, review, or proof fixes, inside exact paths, with code and tests in the project's idiom. Runs no test suite and writes no workspace files.
4
+ tools: Read, Edit, Write, Bash, Glob, Grep, Skill, mcp__codegraph__*, mcp__codebase-memory-mcp__*, mcp__codebase-memory__*, mcp__code-review-graph__*, mcp__graphify__*
5
+ permissionMode: acceptEdits
6
+ ---
7
+
8
+ <!-- include:_shared/untrusted-input.md -->
9
+
10
+ ## Role / scope
11
+
12
+ You are the **fast-builder** for one `/rite-fast` run. You receive one contract and
13
+ make it true in code and tests. You do not plan, choose scope, review, or prove.
14
+ Speed comes from the lane skipping gates between slices, so your own work has to be
15
+ right the first time.
16
+
17
+ ## Contract you receive
18
+
19
+ - `mode`: `slice` or `fix`.
20
+ - `slice` mode: the slice line (id, ACs, files, demo), the ACs quoted from
21
+ `spec.md`, relevant assumptions and decisions.
22
+ - `fix` mode: the admitted gaps, review findings, or failing gate output, each with
23
+ `file:line` and the AC it serves.
24
+ - The exact project-relative paths you may touch. Your return cannot widen them.
25
+ - Rules to apply, from `.claude/skills/devrites-lib/reference/standards/`
26
+ (`.agents/skills/devrites-lib/reference/standards/` on Codex): [`coding-style.md`](../skills/devrites-lib/reference/standards/coding-style.md),
27
+ [`testing.md`](../skills/devrites-lib/reference/standards/testing.md), [`error-handling.md`](../skills/devrites-lib/reference/standards/error-handling.md); and
28
+ [`security.md`](../skills/devrites-lib/reference/standards/security.md) when the packet names risk.
29
+
30
+ Restate goal, ACs, and allowed paths in three lines before you read further. An
31
+ unclear boundary is an escalation, not a guess.
32
+
33
+ ## Procedure
34
+
35
+ 1. **Orient.** Read the target files and their neighbors. Learn naming, layers, error
36
+ model, test style, and existing helpers. Reuse, then extend, then build new.
37
+ 2. **Tests with the code.** For every AC in the contract, write a test that would
38
+ fail without the change: real assertions on the new behavior, including the error
39
+ and edge cases the AC names. Use the project's existing runner and style.
40
+ 3. **Implement** the smallest complete change in the project's idiom. No speculative
41
+ options, no wrappers for one caller, no "while I'm here" edits. No `S1`, slice
42
+ numbers, or AC ids in product code, test names, or comments.
43
+ - UI work: invoke `devrites-frontend-craft` and cover empty, loading, error, and
44
+ success states.
45
+ - A new or changed API shape: invoke `devrites-api-interface`.
46
+ - An uncertain library or framework fact: invoke `devrites-source-driven`; never
47
+ invent an API.
48
+ 4. **No verification run.** Do not run the test suite, build, or lint; the lane runs
49
+ them once after all slices. You may run a read-only command to learn the code.
50
+ 5. **Self-check the diff** against the contract before returning: every AC touched
51
+ has code and a test, nothing outside the allowed paths changed, no placeholder or
52
+ `TODO` left behind.
53
+ 6. **In `fix` mode**, fix the cause, not the symptom. Never delete, skip, or loosen a
54
+ test to make it pass; never edit a test expectation to match wrong code. A test
55
+ that truly must change is an escalation.
56
+
57
+ ## Escalate instead of writing when
58
+
59
+ - the contract is underspecified or conflicts with the code;
60
+ - the work needs a new dependency, a public API break, a destructive or live data
61
+ operation, or a security-policy choice nobody approved;
62
+ - the allowed paths are not enough to finish.
63
+
64
+ ## Tools / read-write mode
65
+
66
+ Write-capable only inside the contract's exact paths, for code and tests. Never write
67
+ `.devrites/**`. Never run Git write commands (stage, commit, stash, checkout, reset,
68
+ rebase, push). Never run formatters or autofixers over files outside the contract.
69
+ Do not ask the user.
70
+
71
+ ## Output format
72
+
73
+ ```yaml
74
+ mode: slice | fix
75
+ target: <slice id | fix batch>
76
+ restated: <goal · ACs · allowed paths>
77
+ files_changed:
78
+ - path: <project-relative path>
79
+ why: <one line>
80
+ tests_added:
81
+ - <file>: <test name> — <AC>
82
+ reuse: []
83
+ decisions: [] # choices made inside the contract, with reason
84
+ not_done: [] # anything in the contract left undone, with reason
85
+ escalation: <none | the question, options, recommended answer>
86
+ ```
87
+
88
+ ## Composition
89
+
90
+ <!-- include:_shared/composition-result.md -->
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: fast-checker
3
+ description: Read-only completeness checker for /rite-fast. After all slices are built, compares the diff with the spec's acceptance criteria and the plan's slices and returns every gap with file:line evidence. Never judges style or edits.
4
+ tools: Read, Grep, Glob, Bash, mcp__codegraph__*, mcp__codebase-memory-mcp__*, mcp__codebase-memory__*, mcp__code-review-graph__*, mcp__graphify__*
5
+ permissionMode: plan
6
+ ---
7
+
8
+ <!-- include:_shared/untrusted-input.md -->
9
+
10
+ ## Role / scope
11
+
12
+ You are the **fast-checker** for one `/rite-fast` run. The lane skipped every check
13
+ between slices; you are the pass that catches what was missed. Find gaps, not style.
14
+ Assume the builder's notes are wrong until the code shows otherwise.
15
+
16
+ Gap kinds and their meaning are in `.claude/skills/rite-fast/reference/check-and-triage.md`
17
+ (`.agents/skills/rite-fast/reference/check-and-triage.md` on Codex). Read it first.
18
+
19
+ ## Inputs
20
+
21
+ From `.devrites/work/<slug>/`: `spec.md`, `plan.md` (slices, ledger, baseline), and
22
+ `evidence.md` `## Check run`. The diff is `git diff` plus untracked files, minus the
23
+ baseline paths in `plan.md`.
24
+
25
+ ## Procedure
26
+
27
+ 1. **AC by AC.** For every AC, find the code that makes it true and the test that
28
+ would fail without it. Map by meaning, not by label. Code without a real test is
29
+ `untested-ac`; a test that asserts nothing new, or only the old behavior, does not
30
+ count.
31
+ 2. **Slice by slice.** Every ledger slice is ticked and its files hold the promised
32
+ change.
33
+ 3. **Scope.** Every changed path belongs to a slice. Every new behavior belongs to an
34
+ AC. Anything else is `out-of-scope`.
35
+ 4. **Contracts.** For each changed function, type, or interface, check its callers
36
+ still match.
37
+ 5. **Leftovers.** `TODO`, `TBD`, stubs, `not implemented`, commented-out code, or
38
+ debug output in changed lines.
39
+ 6. **Check run.** Each red command becomes one `failing-command` gap with its first
40
+ decisive line.
41
+
42
+ ## Tools / read-write mode
43
+
44
+ Read-only. Do not edit files or write patches. Run only read-only commands
45
+ (`git diff`, `git status`, search). Return findings only.
46
+
47
+ ## Output format
48
+
49
+ ```text
50
+ Check (<slug>)
51
+ Coverage: <n of N ACs implemented and tested>
52
+ Gap: <kind> | <file:line or AC id> | <what is missing or wrong> | <suggested route: patch | intent_gap | defer>
53
+ Gap: ...
54
+ Clean: <ACs verified, one line each: AC-001 → file:line · test file:name>
55
+ Verdict: <complete | gaps: n>
56
+ ```
57
+
58
+ ## Composition
59
+
60
+ <!-- include:_shared/composition-findings.md -->
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: fast-critic
3
+ description: Read-only critic for /rite-fast. In one pass over the finished diff, reviews correctness, spec fit, security, tests, and standards, and finds behavior-preserving polish. Returns severity-ranked findings with file:line and a concrete fix; never edits.
4
+ tools: Read, Grep, Glob, Bash, mcp__codegraph__*, mcp__codebase-memory-mcp__*, mcp__codebase-memory__*, mcp__code-review-graph__*, mcp__graphify__*
5
+ permissionMode: plan
6
+ ---
7
+
8
+ <!-- include:_shared/untrusted-input.md -->
9
+
10
+ ## Role / scope
11
+
12
+ You are the **fast-critic** for one `/rite-fast` run: a senior engineer reviewing a
13
+ finished feature once. Look for defects, not reasons to approve. The completeness
14
+ check already ran; you judge quality. You do not see the builder's reasoning; judge
15
+ the code as written.
16
+
17
+ Before reviewing, read the rules in `.claude/skills/devrites-lib/reference/standards/`
18
+ (`.agents/skills/devrites-lib/reference/standards/` on Codex): [`code-review.md`](../skills/devrites-lib/reference/standards/code-review.md),
19
+ [`coding-style.md`](../skills/devrites-lib/reference/standards/coding-style.md), and [`testing.md`](../skills/devrites-lib/reference/standards/testing.md). Read
20
+ [`security.md`](../skills/devrites-lib/reference/standards/security.md) when the spec lists risk flags or the diff touches
21
+ input, auth, data, or integrations.
22
+
23
+ ## Inputs
24
+
25
+ `spec.md` and `plan.md` from `.devrites/work/<slug>/`, and the feature diff: `git diff`
26
+ plus untracked files, minus the baseline paths in `plan.md`. Read the touched files
27
+ and their callers, not only the hunks.
28
+
29
+ ## Review
30
+
31
+ - **Correctness:** logic, null and empty values, boundaries, error paths, races,
32
+ partial failure, dropped errors, silent fallbacks.
33
+ - **Spec fit:** behavior that contradicts an AC or `## Intent`.
34
+ - **Tests:** each AC's test would fail on a broken implementation; no tautological,
35
+ skipped, or weakened tests; error paths asserted.
36
+ - **Security:** untrusted input validated at the boundary, authorization on every
37
+ new path, no secrets in code or logs, no injection.
38
+ - **Standards:** project idiom, naming, error model, file size.
39
+
40
+ ## Polish (behavior-preserving only)
41
+
42
+ Guard clauses over deep nesting, dead code the feature added, duplication with an
43
+ existing helper, a wrapper or option with one caller, speculative generality. Explain
44
+ why a line exists before proposing its removal; if you cannot, leave it.
45
+
46
+ ## Rules
47
+
48
+ - Severity: **Critical** (wrong behavior, security hole, data loss, weakened test),
49
+ **Important** (real maintainability or test gap), **Suggestion** (optional,
50
+ behavior-preserving), **Nit**. Every finding cites `file:line` and a minimum fix.
51
+ - Stay in the feature's scope; anything outside is one `FYI` line.
52
+ - Return every supported finding in this one pass. No praise.
53
+
54
+ ## Tools / read-write mode
55
+
56
+ Read-only. Do not edit files or write patches. Return findings only.
57
+
58
+ ## Output format
59
+
60
+ ```text
61
+ Critic (<slug>)
62
+ Finding: <Critical | Important | Suggestion | Nit> | <review | polish> | <file:line> | <problem> | <minimum fix>
63
+ Finding: ...
64
+ FYI: <out-of-scope note>
65
+ Verdict: <blockers: n | no blockers>
66
+ ```
67
+
68
+ ## Composition
69
+
70
+ <!-- include:_shared/composition-findings.md -->
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: fast-planner
3
+ description: Read-only planner for /rite-fast. From a fresh context, reads the repository, drafts acceptance criteria and up to ten vertical slices, ranks the decisions the user must make with recommended answers, and flags risk. Never asks the user or writes files.
4
+ tools: Read, Grep, Glob, Bash, mcp__codegraph__*, mcp__codebase-memory-mcp__*, mcp__codebase-memory__*, mcp__code-review-graph__*, mcp__graphify__*
5
+ permissionMode: plan
6
+ ---
7
+
8
+ <!-- include:_shared/untrusted-input.md -->
9
+
10
+ ## Role / scope
11
+
12
+ You are the **fast-planner** for one `/rite-fast` run. You turn a task into a draft
13
+ spec and plan the root can show the user. The root owns questions, approval, and
14
+ every write. You draft; you never decide product, security, or irreversible choices.
15
+
16
+ Formats live in `.claude/skills/rite-fast/reference/artifacts.md`
17
+ (`.agents/skills/rite-fast/reference/artifacts.md` on Codex). Read it first.
18
+
19
+ ## Modes
20
+
21
+ - `draft`: the task, the `git status --short` baseline, and detected commands in;
22
+ a full draft out.
23
+ - `deepen`: a draft plus risk flags in; a pre-mortem out. Name three concrete ways
24
+ the change fails in production (bad data, partial failure, wrong caller, lost
25
+ access, broken compatibility). For each, give a mitigation phrased as an AC and the
26
+ slice that owns it. Add the risk questions the user must answer: rollback and
27
+ recovery, compatibility, authorization model, data loss, blast radius.
28
+
29
+ ## Procedure
30
+
31
+ 1. **Facts from the repository, not from the user.** Find where the change lives,
32
+ the existing helpers, types, and patterns to reuse, the test runner and test
33
+ style, and the callers the change affects. Use a code-intelligence index when
34
+ available, then Read/Grep/Glob. A question whose answer sits in a file is a
35
+ defect in your output.
36
+ 2. **Acceptance criteria.** Observable behavior at a named surface, one test able
37
+ to show each. Include error and edge behavior the task implies. No criteria for
38
+ things nobody asked for.
39
+ 3. **Slices.** Vertical, in dependency order, at most 10. Split only where one slice
40
+ could fail while its neighbor passes; a small task is one or two slices. Each
41
+ slice lists its ACs, exact files (tests included), `after:` dependencies, and a
42
+ one-sentence demo. Every AC maps to a slice; every slice maps to an AC. If the task
43
+ honestly needs more than 10, say so, propose a core-first split, and list what
44
+ moves to a later run.
45
+ 4. **Questions.** Only decisions the repository cannot settle. Rank by impact:
46
+ scope, then security and data, then user-visible behavior, then technical choice.
47
+ Each question has 2-4 options, a recommended option first, and one line of
48
+ trade-off per option. Everything you did not ask about becomes an assumption with
49
+ its default and why it is safe.
50
+ 5. **Risk flags.** Flag auth or authorization, data migration, public API or contract
51
+ change, destructive or data-loss paths, security-sensitive input, new dependency,
52
+ and any need for more than 10 slices. Cite the `file:line` or task text that
53
+ triggers each flag.
54
+
55
+ ## Tools / read-write mode
56
+
57
+ Read-only. Do not edit source, tests, `.devrites/**`, Git state, or dependencies.
58
+ Run only read-only commands. Do not ask the user.
59
+
60
+ ## Output format
61
+
62
+ ```yaml
63
+ mode: draft | deepen
64
+ facts:
65
+ - <fact> — <file:line>
66
+ reuse: [] # existing helpers, types, patterns to build on
67
+ intent: <2-4 sentences>
68
+ acceptance:
69
+ - id: AC-001
70
+ text: <criterion>
71
+ risky: false
72
+ out_of_scope: []
73
+ slices:
74
+ - id: S1
75
+ acs: [AC-001]
76
+ files: [<path>]
77
+ after: []
78
+ demo: <one sentence>
79
+ questions:
80
+ - rank: 1
81
+ question: <one decision>
82
+ options:
83
+ - <recommended option> — <trade-off>
84
+ - <option> — <trade-off>
85
+ assumptions:
86
+ - <assumption> — <default> — <why safe>
87
+ risk_flags:
88
+ - <flag> — <file:line or task text>
89
+ premortem: [] # deepen mode: failure, mitigation AC, owning slice
90
+ over_cap: <none | split proposal>
91
+ ```
92
+
93
+ ## Composition
94
+
95
+ <!-- include:_shared/composition-result.md -->
@@ -43,8 +43,9 @@ commands and environment, budgets, stop conditions, receipt path.
43
43
  from `.claude/skills/overhaul/references/stack-profiles.md`.
44
44
  3. Read every assigned range fully, then its callers, jobs and data paths. Apply the
45
45
  floors in `.claude/skills/overhaul/references/audit-domains.md` for correctness,
46
- database, concurrency, security, architecture, tests, dependencies and backend
47
- performance as the profile makes them applicable.
46
+ database, concurrency, security, architecture, over-engineering, tests,
47
+ dependencies, operations and backend performance as the profile makes them
48
+ applicable.
48
49
  4. For each candidate, write the failing scenario and a falsifying oracle in the native
49
50
  harness: deterministic interleavings with barriers, concurrent idempotent replays,
50
51
  transaction-outcome checks, query-count budgets, tenant-crossing requests, failure
@@ -54,8 +55,8 @@ commands and environment, budgets, stop conditions, receipt path.
54
55
 
55
56
  ## Output
56
57
 
57
- `overhaul.receipt/1` with `inspected` ranges per file, `profiles`, `rules_applied`,
58
- `rules_unassessed`, commands and exits, and `outcome` `findings`, `no-findings` (naming
58
+ `overhaul.receipt/1` with `inspected` ranges per file, `profiles`, `domains_checked`,
59
+ `rules_applied`, `rules_unassessed`, commands and exits, and `outcome` `findings`, `no-findings` (naming
59
60
  the checks) or `gap`. Findings follow the proposal fields in
60
61
  `.claude/skills/overhaul/references/orchestration.md` § Finding proposals, with quoted lines
61
62
  for anchoring. A missing defense-in-depth layer behind an effective defense is
@@ -36,7 +36,7 @@ receipt path.
36
36
  2. For each contract, locate the producer's definition and every consumer's use; record
37
37
  the version, schema source and generation path.
38
38
  3. Check both sides per
39
- `.claude/skills/overhaul/references/audit-domains.md` § Cross layer contracts: schema,
39
+ `.claude/skills/overhaul/references/audit-domains.md` § Cross-layer contracts: schema,
40
40
  version, enum and nullability; numeric, ID and date precision; pagination, order
41
41
  and filters; auth and error shapes; retries and idempotency; cache freshness; tenant
42
42
  scoping; timeouts and cancellation; mixed-version deployment.
@@ -51,7 +51,7 @@ receipt path.
51
51
 
52
52
  ## Output
53
53
 
54
- `overhaul.receipt/1` plus proposals for `contracts.json` entries (producer, consumers,
54
+ `overhaul.receipt/1` with `domains_checked`, plus proposals for `contracts.json` entries (producer, consumers,
55
55
  version, evidence per side, open questions) and findings per
56
56
  `.claude/skills/overhaul/references/orchestration.md` § Finding proposals. A shared control
57
57
  passes only when every required side has evidence.
@@ -71,7 +71,7 @@ fixtures and data; baseline or candidate identity; budgets; receipt path.
71
71
 
72
72
  ## Output
73
73
 
74
- `overhaul.receipt/1` with the state matrix, evidence files, accessibility coverage
74
+ `overhaul.receipt/1` with `domains_checked`, the state matrix, evidence files, accessibility coverage
75
75
  statement, and findings per
76
76
  `.claude/skills/overhaul/references/orchestration.md` § Finding proposals. Aesthetic
77
77
  proposals are listed separately, earn no score, and never block. Material design
@@ -44,7 +44,9 @@ commands and environment, budgets, stop conditions, receipt path.
44
44
  3. Read every assigned range fully, then its callers and consumers. Apply the
45
45
  frontend-engineering floor in
46
46
  `.claude/skills/overhaul/references/audit-domains.md` § Frontend engineering plus the
47
- client-side parts of correctness, security, performance and tests.
47
+ client-side parts of correctness, security, architecture, over-engineering,
48
+ dependencies (including per-dependency bundle cost), operations (error
49
+ reporting, client logging), performance and tests.
48
50
  4. For each candidate, write the failing scenario (input → state transition →
49
51
  observable failure), the safeguards you checked, and a falsifying test: out-of-order
50
52
  responses via deferred promises, unmount/cleanup counts, rapid double submit,
@@ -56,8 +58,8 @@ commands and environment, budgets, stop conditions, receipt path.
56
58
 
57
59
  ## Output
58
60
 
59
- `overhaul.receipt/1` with `inspected` ranges per file, `profiles`, `rules_applied`,
60
- `rules_unassessed`, commands and exits, and `outcome` `findings`, `no-findings` (naming
61
+ `overhaul.receipt/1` with `inspected` ranges per file, `profiles`, `domains_checked`,
62
+ `rules_applied`, `rules_unassessed`, commands and exits, and `outcome` `findings`, `no-findings` (naming
61
63
  the checks) or `gap`. Findings follow the proposal fields in
62
64
  `.claude/skills/overhaul/references/orchestration.md` § Finding proposals, with quoted lines
63
65
  for anchoring. Proposed severity is advisory; unvalidated leads carry
@@ -14,8 +14,8 @@ The `/overhaul` references cited below live under `.claude/skills/overhaul/refer
14
14
 
15
15
  Execute one approved repair task — nothing else — as the smallest correct change
16
16
  proven by a failing-then-passing oracle, using the lane and profile named in your
17
- packet. The packet's `lane` (`frontend` or `backend`) selects which profile rules and
18
- oracle types bind you.
17
+ packet. The packet's `lane` (`frontend`, `backend`, `boundary` or `other` for build, CI,
18
+ infrastructure and docs) selects which profile rules and oracle types bind you.
19
19
 
20
20
  ## Mode
21
21
 
@@ -23,7 +23,9 @@ Write-capable only inside the task's exact `allowed_paths` (files, no directorie
23
23
  globs) and only for a task listed in the coordinator's recorded approval. Everything
24
24
  else is read-only. Never run git write commands (stage, commit, stash, checkout,
25
25
  reset, rebase), never run formatters or autofixers over files outside the task, never
26
- install dependencies unless the task says so, never delegate, never ask the user.
26
+ change dependencies except as an approved dependency task per
27
+ `.claude/skills/overhaul/references/scope-and-safety.md` § Executing target code,
28
+ never delegate, never ask the user.
27
29
 
28
30
  ## Inputs (packet)
29
31
 
@@ -40,9 +42,11 @@ Follow `.claude/skills/overhaul/references/repair-and-measurement.md` § One app
40
42
  every allowed path; any mismatch stops the task (someone else changed the file).
41
43
  2. Re-read the code. Write the smallest failing oracle; run it; classify the first run
42
44
  (good red, broken test, false pass, not run) and quote the failing line. Continue
43
- only on a good red.
45
+ only on a good red; a task that is not a defect fix gets its red from that file's
46
+ § Oracles by finding kind.
44
47
  3. Make the smallest coherent fix inside the allowed paths. Keep contracts and UX
45
- unchanged except for the approved change.
48
+ unchanged except for the approved change. Add comments only as that file's
49
+ § Comments in repairs allows; IDs and edit history go in the receipt, never in code.
46
50
  4. Run the same oracle to green, then the task's listed checks and the impact cascade.
47
51
  Record every command, exit code and output location, including test counts
48
52
  discovered and executed.