@gobing-ai/spur 0.3.95 → 0.3.97

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 (165) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/plugin-scripts.json +0 -54
  3. package/config/rules/boundary/sp-script-placement.yaml +19 -0
  4. package/config/rules/strict/runtime-boundaries.yaml +6 -0
  5. package/config/rules/structure/test-location.yaml +2 -0
  6. package/config/rules/typescript/no-syscall-emulation-in-boundary-mock.yaml +1 -1
  7. package/config/rules/typescript/output-boundaries.yaml +15 -2
  8. package/config/script-placement-baseline.json +51 -0
  9. package/config/templates/AGENTS.md +3 -3
  10. package/config/workflows/feature-verification.yaml +1 -1
  11. package/config/workflows/history-anatomy.yaml +23 -11
  12. package/config/workflows/idea-pipeline.yaml +80 -85
  13. package/config/workflows/pr-review.yaml +18 -9
  14. package/config/workflows/task-pipeline.yaml +42 -95
  15. package/config/workflows/wrapup-pipeline.yaml +91 -38
  16. package/package.json +2 -2
  17. package/plugins/sp/README.md +14 -10
  18. package/plugins/sp/agents/super-reviewer.md +43 -18
  19. package/plugins/sp/commands/dev-fixgha.md +83 -0
  20. package/plugins/sp/commands/dev-gitmsg.md +8 -6
  21. package/plugins/sp/commands/dev-gtd.md +2 -2
  22. package/plugins/sp/commands/dev-idea.md +22 -12
  23. package/plugins/sp/commands/dev-job-dump.md +29 -0
  24. package/plugins/sp/commands/dev-job-resume.md +29 -0
  25. package/plugins/sp/commands/dev-plan.md +8 -9
  26. package/plugins/sp/commands/dev-review.md +22 -13
  27. package/plugins/sp/commands/dev-verifyall.md +1 -1
  28. package/plugins/sp/commands/spur-init.md +2 -2
  29. package/plugins/sp/lib/history-anatomy.generated.d.mts +112 -0
  30. package/plugins/sp/lib/history-anatomy.generated.mjs +686 -0
  31. package/plugins/sp/lib/idea-handoff.generated.mjs +5 -4
  32. package/plugins/sp/lib/inline-run.generated.d.mts +11 -0
  33. package/plugins/sp/lib/inline-run.generated.mjs +39 -13
  34. package/plugins/sp/lib/quality-gate.generated.d.mts +104 -0
  35. package/plugins/sp/lib/quality-gate.generated.mjs +445 -0
  36. package/plugins/sp/lib/residual-scan.generated.d.mts +63 -0
  37. package/plugins/sp/lib/residual-scan.generated.mjs +226 -0
  38. package/plugins/sp/lib/spur-bin.ts +36 -0
  39. package/plugins/sp/lib/step-profile.generated.d.mts +71 -0
  40. package/plugins/sp/lib/step-profile.generated.mjs +174 -0
  41. package/plugins/sp/plugin.json +1 -1
  42. package/plugins/sp/references/roles.md +3 -3
  43. package/plugins/sp/scripts/feature-verification-steps.mjs +14 -1
  44. package/plugins/sp/scripts/feature-verification-steps.ts +14 -1
  45. package/plugins/sp/scripts/history-anatomy-cache.mjs +20 -19
  46. package/plugins/sp/scripts/history-anatomy-cache.ts +23 -928
  47. package/plugins/sp/scripts/inline-run-setup.mjs +85 -320
  48. package/plugins/sp/scripts/inline-run-setup.ts +104 -667
  49. package/plugins/sp/scripts/quality-gate.mjs +46 -24
  50. package/plugins/sp/scripts/quality-gate.ts +13 -659
  51. package/plugins/sp/scripts/residual-scan.mjs +179 -174
  52. package/plugins/sp/scripts/residual-scan.ts +125 -517
  53. package/plugins/sp/scripts/script-root.mjs +5 -1
  54. package/plugins/sp/scripts/script-root.ts +5 -1
  55. package/plugins/sp/scripts/workflow-step-profile.mjs +25 -17
  56. package/plugins/sp/scripts/workflow-step-profile.ts +21 -315
  57. package/plugins/sp/scripts/wrapup-drift-probe.mjs +8 -2
  58. package/plugins/sp/scripts/wrapup-drift-probe.ts +3 -2
  59. package/plugins/sp/scripts/wrapup-steps.mjs +72 -33
  60. package/plugins/sp/scripts/wrapup-steps.ts +128 -37
  61. package/plugins/sp/skills/code-improvement/SKILL.md +5 -4
  62. package/plugins/sp/skills/code-verification/SKILL.md +34 -9
  63. package/plugins/sp/skills/code-verification/references/verdict-schema.md +3 -3
  64. package/plugins/sp/skills/functional-review/SKILL.md +7 -4
  65. package/plugins/sp/skills/functional-review/references/verdict-schema.md +1 -1
  66. package/plugins/sp/skills/history-anatomy/references/modes.md +2 -1
  67. package/plugins/sp/skills/next-feature/references/handoff-routing.md +1 -1
  68. package/plugins/sp/skills/next-router/references/routing-table.md +1 -1
  69. package/plugins/sp/skills/source-driven-development/SKILL.md +11 -0
  70. package/plugins/sp/skills/spur-cli/SKILL.md +3 -3
  71. package/plugins/sp/skills/spur-cli/references/agent.md +10 -10
  72. package/plugins/sp/skills/spur-cli/references/features.md +17 -6
  73. package/plugins/sp/skills/spur-cli/references/init.md +17 -16
  74. package/plugins/sp/skills/spur-cli/references/self.md +3 -2
  75. package/plugins/sp/skills/spur-cli/references/serve.md +10 -10
  76. package/plugins/sp/skills/spur-cli/references/tasks/section-editing.md +9 -5
  77. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +21 -6
  78. package/plugins/sp/skills/spur-cli/references/tasks.md +14 -8
  79. package/plugins/sp/skills/spur-cli/references/workflows.md +17 -14
  80. package/plugins/sp/skills/spur-dev/SKILL.md +2 -0
  81. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +4 -3
  82. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +14 -10
  83. package/plugins/sp/skills/spur-dev/references/decision-brief.md +1 -1
  84. package/plugins/sp/skills/spur-dev/references/dev-operations.md +165 -75
  85. package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +7 -5
  86. package/plugins/sp/skills/spur-dev/references/execution-batch.md +84 -39
  87. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +8 -12
  88. package/plugins/sp/skills/spur-dev/references/feature-link-helper.md +3 -3
  89. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +40 -21
  90. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +19 -19
  91. package/plugins/sp/skills/spur-dev/references/idea-evaluation.md +4 -3
  92. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +72 -15
  93. package/plugins/sp/skills/spur-doctor/SKILL.md +1 -1
  94. package/plugins/sp/skills/sys-architecture/SKILL.md +3 -2
  95. package/spur.js +4461 -2085
  96. package/web/_astro/{BoardApp.Cpxntzad.js → BoardApp.Bmv5WkJ9.js} +1 -1
  97. package/web/_astro/BoardApp.vveLOdDq.js +322 -0
  98. package/web/_astro/{TaskDetail.C5bW4WGV.js → TaskDetail.IKc3uDYV.js} +1 -1
  99. package/web/_astro/{arc.CyjRvNMY.js → arc.C63Ufg35.js} +1 -1
  100. package/web/_astro/{architectureDiagram-3BPJPVTR.B4lWRzJA.js → architectureDiagram-3BPJPVTR.CP8Hyldk.js} +1 -1
  101. package/web/_astro/{blockDiagram-GPEHLZMM.Be38USQ2.js → blockDiagram-GPEHLZMM.Bo_48MRA.js} +1 -1
  102. package/web/_astro/{c4Diagram-AAUBKEIU.DT9Fj5Qx.js → c4Diagram-AAUBKEIU.Ch61sw-O.js} +1 -1
  103. package/web/_astro/channel.BKCmJpWM.js +1 -0
  104. package/web/_astro/{chunk-2J33WTMH.SeSBWLg5.js → chunk-2J33WTMH.CHpzS7xf.js} +1 -1
  105. package/web/_astro/{chunk-4BX2VUAB.DoO4VE14.js → chunk-4BX2VUAB.DzMNNWIw.js} +1 -1
  106. package/web/_astro/{chunk-55IACEB6.DrmTFA53.js → chunk-55IACEB6.BqPrDw_Q.js} +1 -1
  107. package/web/_astro/{chunk-727SXJPM.Bi-TUb_V.js → chunk-727SXJPM.ZzBHhNw-.js} +1 -1
  108. package/web/_astro/{chunk-AQP2D5EJ.B-xp8Uhi.js → chunk-AQP2D5EJ.1_O_LLkx.js} +1 -1
  109. package/web/_astro/{chunk-FMBD7UC4.DGWrDnUU.js → chunk-FMBD7UC4.GS4UHg7_.js} +1 -1
  110. package/web/_astro/{chunk-ND2GUHAM._BagvPDy.js → chunk-ND2GUHAM.BnqotN4g.js} +1 -1
  111. package/web/_astro/{chunk-QZHKN3VN.VOboYWQ0.js → chunk-QZHKN3VN.Ghuh8zoJ.js} +1 -1
  112. package/web/_astro/{classDiagram-4FO5ZUOK.D_apfHS7.js → classDiagram-4FO5ZUOK.BW9vC3zg.js} +1 -1
  113. package/web/_astro/{classDiagram-v2-Q7XG4LA2.D_apfHS7.js → classDiagram-v2-Q7XG4LA2.BW9vC3zg.js} +1 -1
  114. package/web/_astro/{cose-bilkent-S5V4N54A.DNLU_L-x.js → cose-bilkent-S5V4N54A.D6jNC0ti.js} +1 -1
  115. package/web/_astro/{cynefin-OW5HDTMX.D8borhV-.js → cynefin-OW5HDTMX.BOGoCs4L.js} +1 -1
  116. package/web/_astro/{dagre-BM42HDAG.Uc0lvjcV.js → dagre-BM42HDAG.8iU5VcWi.js} +1 -1
  117. package/web/_astro/{diagram-2AECGRRQ.DDIxtDBo.js → diagram-2AECGRRQ.CVt88HwH.js} +1 -1
  118. package/web/_astro/{diagram-5GNKFQAL.DVoDnD3H.js → diagram-5GNKFQAL.C9HxUUMl.js} +1 -1
  119. package/web/_astro/{diagram-KO2AKTUF.CRubTJ-0.js → diagram-KO2AKTUF.4ywkQN3t.js} +1 -1
  120. package/web/_astro/{diagram-LMA3HP47.m9SeYcXQ.js → diagram-LMA3HP47.C48A6gpz.js} +1 -1
  121. package/web/_astro/{diagram-OG6HWLK6.C6s2ZjV5.js → diagram-OG6HWLK6.DxFieQW4.js} +1 -1
  122. package/web/_astro/{erDiagram-TEJ5UH35.nSzr5KTj.js → erDiagram-TEJ5UH35.CtjtQqYs.js} +1 -1
  123. package/web/_astro/{flowDiagram-I6XJVG4X.DrZcys16.js → flowDiagram-I6XJVG4X.C5zAiahU.js} +1 -1
  124. package/web/_astro/{ganttDiagram-6RSMTGT7.Do4M1b-K.js → ganttDiagram-6RSMTGT7.D_L6zsny.js} +1 -1
  125. package/web/_astro/{gitGraphDiagram-PVQCEYII.BWc9oJ4l.js → gitGraphDiagram-PVQCEYII.Ignnrk3V.js} +1 -1
  126. package/web/_astro/index.CbNz17Sx.css +1 -0
  127. package/web/_astro/{infoDiagram-5YYISTIA.BIdOctFk.js → infoDiagram-5YYISTIA.DLv8-P5u.js} +1 -1
  128. package/web/_astro/{ishikawaDiagram-YF4QCWOH.CV5SuG2t.js → ishikawaDiagram-YF4QCWOH.p0OTpwFO.js} +1 -1
  129. package/web/_astro/{journeyDiagram-JHISSGLW.CxE-rEJ-.js → journeyDiagram-JHISSGLW.CIaBt-DD.js} +1 -1
  130. package/web/_astro/{kanban-definition-UN3LZRKU.BPRdKWs_.js → kanban-definition-UN3LZRKU.DGySIntq.js} +1 -1
  131. package/web/_astro/{linear.zRsuuDTE.js → linear.BATV4RXu.js} +1 -1
  132. package/web/_astro/{mermaid.core.jAJTcMKc.js → mermaid.core.DzkwM3VX.js} +4 -4
  133. package/web/_astro/{mindmap-definition-RKZ34NQL.BffJxfCr.js → mindmap-definition-RKZ34NQL.3piBRRzA.js} +1 -1
  134. package/web/_astro/{pieDiagram-4H26LBE5.CacwWaE3.js → pieDiagram-4H26LBE5.DUNueLub.js} +1 -1
  135. package/web/_astro/{quadrantDiagram-W4KKPZXB.hXELD06-.js → quadrantDiagram-W4KKPZXB.9bihVbrt.js} +1 -1
  136. package/web/_astro/{requirementDiagram-4Y6WPE33.DdEbPcqT.js → requirementDiagram-4Y6WPE33.CkjsC-YT.js} +1 -1
  137. package/web/_astro/{sankeyDiagram-5OEKKPKP.DgaDocKv.js → sankeyDiagram-5OEKKPKP.Dbq4vaoQ.js} +1 -1
  138. package/web/_astro/{sequenceDiagram-3UESZ5HK.B0KScnAu.js → sequenceDiagram-3UESZ5HK.BivrH99P.js} +1 -1
  139. package/web/_astro/{stateDiagram-AJRCARHV.CV9M_WNc.js → stateDiagram-AJRCARHV.CqLQ1Vzz.js} +1 -1
  140. package/web/_astro/{stateDiagram-v2-BHNVJYJU.BOAo74Et.js → stateDiagram-v2-BHNVJYJU.DvvoLD3b.js} +1 -1
  141. package/web/_astro/{timeline-definition-PNZ67QCA.CqqepUMe.js → timeline-definition-PNZ67QCA.B-KR78gv.js} +1 -1
  142. package/web/_astro/{vennDiagram-CIIHVFJN.DDqe4dOG.js → vennDiagram-CIIHVFJN.Ck0Eieb5.js} +1 -1
  143. package/web/_astro/{wardleyDiagram-YWT4CUSO.B3R9OPdO.js → wardleyDiagram-YWT4CUSO.CRfdd_do.js} +1 -1
  144. package/web/_astro/{xychartDiagram-2RQKCTM6.B3SvgXpQ.js → xychartDiagram-2RQKCTM6.Ck_Jxk9C.js} +1 -1
  145. package/web/index.html +2 -2
  146. package/plugins/sp/lib/artifact-digest.generated.d.mts +0 -7
  147. package/plugins/sp/lib/artifact-digest.generated.mjs +0 -48
  148. package/plugins/sp/scripts/feature-sync-bounded.mjs +0 -301
  149. package/plugins/sp/scripts/feature-sync-bounded.ts +0 -481
  150. package/plugins/sp/scripts/idea-coverage-check.ts +0 -168
  151. package/plugins/sp/scripts/inline-pipeline-parity-check.ts +0 -298
  152. package/plugins/sp/scripts/record-feature-sync.mjs +0 -63
  153. package/plugins/sp/scripts/record-feature-sync.ts +0 -84
  154. package/plugins/sp/scripts/script-contract-check.ts +0 -506
  155. package/plugins/sp/scripts/stage-registry-adapter.ts +0 -1533
  156. package/plugins/sp/scripts/surface-drift-inventory.ts +0 -989
  157. package/plugins/sp/scripts/task-evidence-precheck.ts +0 -189
  158. package/plugins/sp/scripts/task-size-precheck.ts +0 -212
  159. package/plugins/sp/scripts/transition-shim-check.ts +0 -238
  160. package/plugins/sp/scripts/validate-commands.ts +0 -689
  161. package/plugins/sp/scripts/validate-flag-contracts.ts +0 -890
  162. package/plugins/sp/scripts/verify-answer-lint.ts +0 -549
  163. package/web/_astro/BoardApp.BxJuwD7I.js +0 -191
  164. package/web/_astro/channel.CI6N_tCg.js +0 -1
  165. package/web/_astro/index.CENnIEqT.css +0 -1
@@ -7,7 +7,7 @@
7
7
  "plugins": [
8
8
  {
9
9
  "name": "sp",
10
- "version": "0.3.95",
10
+ "version": "0.3.97",
11
11
  "source": "./plugins/sp"
12
12
  }
13
13
  ]
@@ -26,11 +26,6 @@
26
26
  "contract": "standard",
27
27
  "twin": "dogfood-testing/validate-report.mjs"
28
28
  },
29
- {
30
- "rel": "feature-sync-bounded.ts",
31
- "contract": "standard",
32
- "twin": "feature-sync-bounded.mjs"
33
- },
34
29
  {
35
30
  "rel": "idea-handoff.ts",
36
31
  "contract": "standard",
@@ -61,24 +56,11 @@
61
56
  "contract": "standard",
62
57
  "twin": "feature-verification-steps.mjs"
63
58
  },
64
- {
65
- "rel": "idea-coverage-check.ts",
66
- "contract": "repo-only"
67
- },
68
- {
69
- "rel": "inline-pipeline-parity-check.ts",
70
- "contract": "repo-only"
71
- },
72
59
  {
73
60
  "rel": "pr-reviewing.ts",
74
61
  "contract": "standard",
75
62
  "twin": "pr-reviewing.mjs"
76
63
  },
77
- {
78
- "rel": "record-feature-sync.ts",
79
- "contract": "standard",
80
- "twin": "record-feature-sync.mjs"
81
- },
82
64
  {
83
65
  "rel": "quality-gate.ts",
84
66
  "contract": "standard",
@@ -89,52 +71,16 @@
89
71
  "contract": "standard",
90
72
  "twin": "residual-scan.mjs"
91
73
  },
92
- {
93
- "rel": "script-contract-check.ts",
94
- "contract": "repo-only"
95
- },
96
74
  {
97
75
  "rel": "script-root.ts",
98
76
  "contract": "standard",
99
77
  "twin": "script-root.mjs"
100
78
  },
101
- {
102
- "rel": "stage-registry-adapter.ts",
103
- "contract": "repo-only"
104
- },
105
- {
106
- "rel": "surface-drift-inventory.ts",
107
- "contract": "repo-only"
108
- },
109
79
  {
110
80
  "rel": "task-diffstat.ts",
111
81
  "contract": "standard",
112
82
  "twin": "task-diffstat.mjs"
113
83
  },
114
- {
115
- "rel": "task-evidence-precheck.ts",
116
- "contract": "repo-only"
117
- },
118
- {
119
- "rel": "task-size-precheck.ts",
120
- "contract": "repo-only"
121
- },
122
- {
123
- "rel": "verify-answer-lint.ts",
124
- "contract": "repo-only"
125
- },
126
- {
127
- "rel": "transition-shim-check.ts",
128
- "contract": "repo-only"
129
- },
130
- {
131
- "rel": "validate-commands.ts",
132
- "contract": "repo-only"
133
- },
134
- {
135
- "rel": "validate-flag-contracts.ts",
136
- "contract": "repo-only"
137
- },
138
84
  {
139
85
  "rel": "workflow-step-profile.ts",
140
86
  "contract": "standard",
@@ -0,0 +1,19 @@
1
+ $schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
2
+ # [boundary] ADR-130 script placement contract (task 1000). Runs the fast
3
+ # --placement-only mode of the relocated script-contract-check on every
4
+ # recommended-pre-check; SKIPs outside the Spur source repo (same pattern as
5
+ # strict/rule-files-structural.yaml SKIP on missing yq). The full twin check
6
+ # stays in spur-check-feature.
7
+ rules:
8
+ - id: sp-script-placement
9
+ description: "Plugins/sp scripts must honor the ADR-130 placement contract (glue budget, no db imports, no corpus parsing, no noun clash); baseline config/script-placement-baseline.json can only shrink."
10
+ severity: error
11
+ evaluator:
12
+ type: exit-code
13
+ config:
14
+ command: sh
15
+ args:
16
+ - -c
17
+ - >-
18
+ [ -f scripts/commands/script-contract-check.ts ] || { echo "SKIP: not the Spur source repo"; exit 0; };
19
+ bun scripts/commands/script-contract-check.ts --placement-only
@@ -32,6 +32,9 @@ rules:
32
32
  - "**/tests/**"
33
33
  - "**/*.test.ts"
34
34
 
35
+ # Low-level system primitives:
36
+ - "packages/app/src/services/quality-gate.ts" # gate runs `sh -c` with stdout+stderr merged onto ONE fd; ProcessExecutor captures streams separately and cannot reproduce the stream-order contract (task 1006 R1; mirrors the history-anatomy bundling exemptions)
37
+
35
38
  - id: no-direct-fs-io
36
39
  description: "Prefer ts-runtime's FileSystem seam for fs IO."
37
40
  severity: warning
@@ -60,9 +63,12 @@ rules:
60
63
  - "packages/app/src/services/slash-commands-service.ts" # synchronous ~/.config/spur/slash_commands.json persistence (mirrors project-registry.ts)
61
64
  - "packages/app/src/services/agent-usage-producer.ts" # atomic agent-usage snapshot write (tmp + rename, mirrors project-registry.ts; task 0892 R1)
62
65
  - "packages/app/src/services/history-service.ts" # versioned analyze artifact + bounded-errors sidecar + latest.json symlink pointer (task 0474); ts-runtime FileSystem seam has no symlink, so the pointer uses node:fs directly (mirrors project-registry.ts persistence exemption)
66
+ - "packages/app/src/services/history-anatomy.ts" # deterministic history-anatomy cache core (task 1005 R2): fsync'd tmp+rename atomic publish, readdir digest scans and sync report reads must stay byte-stable; bundled standalone for the bare-node plugin twin (mirrors agent-usage-producer.ts / history-service.ts exemptions)
63
67
  - "packages/app/src/observability/workflow-run-log-sink.ts" # sync FD append for mid-run tail-able all-in-one run log (task 0426 / feature D2); append() is sync from the observability bus
64
68
  - "apps/cli/src/commands/workflow.ts" # FD byte-window tail of the mid-run run log for `workflow trace --follow` streaming (task 0428 / feature D2); readSync at offset over the observability sink's FDs
65
69
  - "apps/web/src/modules/discover.ts" # Vite/Astro module scanner fallback under bun test
70
+ - "packages/app/src/services/quality-gate.ts" # gate artifacts (log/findings/receipt) written directly; merged-fd gate log and fsync-free atomic writes must stay byte-stable; bundled standalone for the bare-node plugin twin (task 1006 R1; mirrors history-anatomy.ts)
71
+ - "packages/app/src/services/run-storage.ts" # durable-evidence migration core (task 1025 R4): atomic tmp+rename byte copies with digest reread and atomic manifest publish must stay byte-stable (mirrors agent-usage-producer.ts / project-registry.ts exemptions)
66
72
 
67
73
  # Synchronous bootstrap & path resolution:
68
74
  - "packages/config/src/bundled-config.ts" # sync bundledConfigRoot() directory walk
@@ -36,6 +36,8 @@ rules:
36
36
  - "apps/**/src/**/*.ts"
37
37
 
38
38
  exclude:
39
+ ## transient CLI test-fixture projects (apps/cli/tests/.tmp-*), same pattern as .gitignore
40
+ - "**/.tmp-*/**"
39
41
  - "**/index.ts"
40
42
  - "**/*.d.ts"
41
43
  - "**/types.ts"
@@ -12,7 +12,7 @@ $schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
12
12
  # replaced the very portability the tests were supposed to verify.
13
13
  #
14
14
  # SCOPE / discriminator: mocking the subprocess boundary to control *subprocess
15
- # responses* (e.g. feature-sync-bounded.test.ts intercepting `show`/`list`/`sync`
15
+ # responses* (e.g. a boundary test intercepting `show`/`list`/`sync`
16
16
  # commands) is legitimate and NOT flagged — the boundary mock returns canned
17
17
  # responses, it does not re-implement the syscall the code under test calls. The
18
18
  # rule fires only when the mock handler itself references `stat`/`%m`/`birthtime`
@@ -2,8 +2,9 @@ $schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
2
2
  # Output boundary rules — terminal writes go through the output seam
3
3
  # (apps/cli/src/output.ts → ts-utils echo/echoError), never raw console/stdout.
4
4
  # Absorbed from ts-libs/.spur/rules/typescript/no-raw-output.yaml, re-scoped to
5
- # the app-monorepo layout. Spur's only sanctioned sink is the ts-utils helper,
6
- # so no local exclusions are needed.
5
+ # the app-monorepo layout. Spur's only sanctioned sink is the ts-utils helper;
6
+ # narrow per-rule excludes exist only for moved driver code whose byte-stable
7
+ # stdout contract must survive lib bundling under bare node (task 1006).
7
8
  include:
8
9
  - "apps/**/src/**/*.ts"
9
10
  - "packages/**/src/**/*.ts"
@@ -16,6 +17,11 @@ rules:
16
17
  type: rg
17
18
  config:
18
19
  pattern: "console\\.(log|error|warn|info|debug|dir|time|trace)"
20
+ # Task 1006 R3: the inline-run driver's fail-closed stderr lines moved here from the
21
+ # plugin script (byte-stable driver contract, emitted through the bundled lib under
22
+ # bare node); the output seam is a CLI-layer dependency the app service cannot take.
23
+ exclude:
24
+ - "packages/app/src/services/inline-run-setup.ts"
19
25
 
20
26
  - id: no-raw-stdout-stderr
21
27
  description: "Use the output seam (ts-utils echo/echoError) instead of process.stdout/stderr.write directly."
@@ -24,3 +30,10 @@ rules:
24
30
  type: rg
25
31
  config:
26
32
  pattern: "process\\.(stdout|stderr)\\.write"
33
+ # Tasks 1006 R1/R3: gate receipts (`check-receipt/v1`, one JSON line — the runner's parsed
34
+ # stdout contract) and the inline driver's stdout lines moved here from the plugin scripts.
35
+ # Both must stay byte-stable through the bundled libs under bare node; the seam would
36
+ # rewrite framing the CLI/tests parse. Mirrors the history-anatomy bundling exemptions.
37
+ exclude:
38
+ - "packages/app/src/services/quality-gate.ts"
39
+ - "packages/app/src/services/inline-run-setup.ts"
@@ -0,0 +1,51 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "description": "ADR-130 placement baseline (task 1000, seeded from plan \u00a72 inventory). Entries suppress sp-script-placement findings; kinds[] rows are migration-ledger entries for plan \u00a72 rows with no current findings. Baseline can only shrink: a listed kind the file no longer produces is a stale-baseline finding. Tasks 1001-1007 delete their entries in the same commit as the move.",
4
+ "entries": {
5
+ "plugins/sp/scripts/pr-reviewing.ts": {
6
+ "kinds": ["budget"],
7
+ "reason": "Keep, sp-owned git/gh loop; cited exemption (plan \u00a72)"
8
+ },
9
+ "plugins/sp/scripts/wrapup-steps.ts": {
10
+ "kinds": ["budget"],
11
+ "reason": "Keep (budget exemption), W2 (plan \u00a72)",
12
+ "exempt": true
13
+ },
14
+ "plugins/sp/scripts/batch-preflight.ts": {
15
+ "kinds": ["budget"],
16
+ "reason": "Keep (budget exemption; reviewed W4) (plan \u00a72)",
17
+ "exempt": true
18
+ },
19
+ "plugins/sp/scripts/feature-verification-steps.ts": {
20
+ "kinds": ["budget"],
21
+ "reason": "Keep (ADR-119 receipt writer; budget exemption) (plan \u00a72)",
22
+ "exempt": true
23
+ },
24
+ "plugins/sp/scripts/wrapup-drift-probe.ts": {
25
+ "kinds": ["budget", "corpus-parse"],
26
+ "reason": "Keep (glue over capture file; budget exemption) (plan \u00a72)",
27
+ "exempt": true
28
+ },
29
+ "plugins/sp/scripts/daily-summary/daily-summary.ts": {
30
+ "kinds": ["budget", "db-import"],
31
+ "reason": "Keep (daily-summary/, plan \u00a72); read-only history-health query via dynamic bun:sqlite import (task 1018)"
32
+ },
33
+ "plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.ts": {
34
+ "kinds": ["budget"],
35
+ "reason": "Keep (dogfood-testing/, plan \u00a72)"
36
+ },
37
+ "plugins/sp/scripts/dogfood-testing/validate-report.ts": {
38
+ "kinds": ["budget"],
39
+ "reason": "Keep (dogfood-testing/, plan \u00a72)"
40
+ },
41
+ "plugins/sp/hooks/context-post-tool.ts": {
42
+ "kinds": ["budget"],
43
+ "reason": "Keep: ADR-129 core (budget exemption) (plan \u00a72)",
44
+ "exempt": true
45
+ },
46
+ "plugins/sp/hooks/pi/guard-extension.ts": {
47
+ "kinds": ["budget"],
48
+ "reason": "Keep (ADR-129 normalizer) (plan \u00a72)"
49
+ }
50
+ }
51
+ }
@@ -163,9 +163,9 @@ spur <noun> --help
163
163
  **Long-tail:** Additional `/sp:dev-*` commands (handover, gitmsg, fixall, findconflict, dogfood, reverse, arch,
164
164
  …) are indexed in the project plugin README (`plugins/sp/README.md` when present).
165
165
 
166
- **Outside spur-cli:** Nouns not fully documented in `sp:spur-cli` (`agent`, `history`, `message`,
167
- `team`, `status`, `migrate`, `serve`, `init`, …) — use only `spur <noun> --help` and
168
- `docs/04_DESIGN.md`. Never guess flags.
166
+ **Outside spur-cli:** For nouns without a reference file, use only `spur <noun> --help` and
167
+ `docs/04_DESIGN.md`; never guess flags. Agent/message/self/projects references live under
168
+ `plugins/sp/skills/spur-cli/references/`.
169
169
 
170
170
  ---
171
171
 
@@ -59,7 +59,7 @@ states:
59
59
  - kind: shell
60
60
  options:
61
61
  command: >-
62
- mkdir -p .spur/run; S=plugins/sp/scripts/feature-verification-steps.ts; [ -f config/plugin-scripts.json -a -f "$S" ] || S="$(superskill script path sp feature-verification-steps.mjs 2>/dev/null)"; RUNNER=bun; case "$S" in *.mjs) RUNNER=node ;; esac; [ -f "$S" ] && "$RUNNER" "$S" verify --feature-id "$featureId" --run-id "$__runId" --spur-bin "$spurBin" || printf 'FAIL feature-verification failed closed — script not found — run superskill install sp --marketplace gobing-ai/spur\n' > ".spur/run/$__runId-feature-verification.status"; exit 0
62
+ mkdir -p .spur/run; eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/feature-verification-steps.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/feature-verification-steps.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)"; [ -f "$S" ] && "$RUNNER" "$S" verify --feature-id "$featureId" --run-id "$__runId" --spur-bin "$spurBin" || printf 'FAIL feature-verification failed closed — script not found — run superskill install sp --marketplace gobing-ai/spur\n' > ".spur/run/$__runId-feature-verification.status"; exit 0
63
63
 
64
64
  - id: done
65
65
  description: Terminal — repo-wide checks passed and the receipt is bound.
@@ -102,6 +102,14 @@ states:
102
102
  # exempt from the catalog record-name sweep (see run-record-catalog.test.ts).
103
103
 
104
104
 
105
+ # 1007 R8: run-start script-resolution identity (same command as feature-verification
106
+ # verify's first action), placed AFTER the id allocation above — the snippet reads
107
+ # .spur/run/$__runId-script-root.json, so it needs the allocated id. Later
108
+ # plugin-script actions resolve through it (1007 R4 snippet). Never aborts.
109
+ - kind: shell
110
+ options:
111
+ command: >-
112
+ S=plugins/sp/scripts/script-root.ts; [ -f config/plugin-scripts.json -a -f "$S" ] || S="$(superskill script path sp script-root.mjs 2>/dev/null)"; RUNNER=bun; case "$S" in *.mjs) RUNNER=node ;; esac; [ -f "$S" ] && "$RUNNER" "$S" --run-id "$__runId" --spur-bin "$spurBin" || echo "script-root failed closed — run 'superskill install sp --marketplace gobing-ai/spur'" >&2; exit 0
105
113
  - id: resolve-paths
106
114
  description: >
107
115
  Resolve the helper, the skill/contract logic paths, and the publication target once, into a
@@ -113,8 +121,8 @@ states:
113
121
  # Path arithmetic lives in the helper (ADR-069 R1); the shell only locates it. Avoid
114
122
  # `${...}` here — that syntax collides with the engine's own template interpolation.
115
123
  command: >-
116
- h=$(superskill script path sp history-anatomy-cache.mjs);
117
- node "$h" paths --helper "$h" --report-dir "$reportDir" --date "$date"
124
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)";
125
+ "$RUNNER" "$S" paths --helper "$S" --report-dir "$reportDir" --date "$date"
118
126
  --output "$output" --mode "$mode" --since "$since" --until "$until"
119
127
  --focus "$focus" --recompute "$recompute" --run-id "$__runId"
120
128
  --out .spur/run/$__runId-paths.txt
@@ -147,12 +155,13 @@ states:
147
155
  - kind: shell
148
156
  options:
149
157
  command: >-
158
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)";
150
159
  . .spur/run/$__runId-paths.txt;
151
- node "$HA_HELPER" probe --artifact .spur/run/$__runId-history-anatomy-current.json
160
+ "$RUNNER" "$S" probe --artifact .spur/run/$__runId-history-anatomy-current.json
152
161
  --baseline .spur/run/$__runId-history-anatomy-baseline.json --target "$HA_TARGET"
153
162
  --mode "$mode" --date "$HA_DATE" --recompute "$recompute" --executor "$agent"
154
163
  --skill-dir "$HA_SKILL" --contract "$HA_SKILL/references/report-contract.md"
155
- --workflow "$workflowFile" --helper "$HA_HELPER" --contract-version "$contractVersion" --run-id "$__runId"
164
+ --workflow "$workflowFile" --helper "$S" --contract-version "$contractVersion" --run-id "$__runId"
156
165
  --out .spur/run/$__runId-provenance.json
157
166
  > .spur/run/$__runId-cache-disposition.txt
158
167
 
@@ -189,7 +198,7 @@ states:
189
198
  - kind: shell
190
199
  options:
191
200
  command: >-
192
- node "$(superskill script path sp history-anatomy-cache.mjs)" assert-clean --baseline .spur/run/$__runId-baseline-enrich.txt --expect .spur/run/$__runId-candidate.md
201
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)"; "$RUNNER" "$S" assert-clean --baseline .spur/run/$__runId-baseline-enrich.txt --expect .spur/run/$__runId-candidate.md
193
202
 
194
203
  - id: structure-gate
195
204
  description: >
@@ -200,7 +209,7 @@ states:
200
209
  - kind: shell
201
210
  options:
202
211
  command: >-
203
- node "$(superskill script path sp history-anatomy-cache.mjs)" check \
212
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)"; "$RUNNER" "$S" check \
204
213
  .spur/run/$__runId-candidate.md > .spur/run/$__runId-structure-gate.txt 2>&1 || true
205
214
 
206
215
  - id: validate
@@ -244,7 +253,7 @@ states:
244
253
  - kind: shell
245
254
  options:
246
255
  command: >-
247
- node "$(superskill script path sp history-anatomy-cache.mjs)" assert-clean --baseline .spur/run/$__runId-baseline-validate.txt --expect .spur/run/$__runId-validation.txt
256
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)"; "$RUNNER" "$S" assert-clean --baseline .spur/run/$__runId-baseline-validate.txt --expect .spur/run/$__runId-validation.txt
248
257
 
249
258
  - id: correct
250
259
  description: >
@@ -281,7 +290,7 @@ states:
281
290
  - kind: shell
282
291
  options:
283
292
  command: >-
284
- node "$(superskill script path sp history-anatomy-cache.mjs)" assert-clean --baseline .spur/run/$__runId-baseline-correct.txt --expect .spur/run/$__runId-candidate.md
293
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)"; "$RUNNER" "$S" assert-clean --baseline .spur/run/$__runId-baseline-correct.txt --expect .spur/run/$__runId-candidate.md
285
294
 
286
295
  - id: refresh-provenance
287
296
  description: >
@@ -293,8 +302,9 @@ states:
293
302
  - kind: shell
294
303
  options:
295
304
  command: >-
305
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)";
296
306
  . .spur/run/$__runId-paths.txt;
297
- node "$HA_HELPER" refresh --report "$HA_TARGET"
307
+ "$RUNNER" "$S" refresh --report "$HA_TARGET"
298
308
  --out .spur/run/$__runId-publishable.md --disposition hit
299
309
 
300
310
  - id: stamp
@@ -307,8 +317,9 @@ states:
307
317
  - kind: shell
308
318
  options:
309
319
  command: >-
320
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)";
310
321
  . .spur/run/$__runId-paths.txt;
311
- node "$HA_HELPER" stamp --candidate .spur/run/$__runId-candidate.md
322
+ "$RUNNER" "$S" stamp --candidate .spur/run/$__runId-candidate.md
312
323
  --provenance .spur/run/$__runId-provenance.json
313
324
  --out .spur/run/$__runId-publishable.md
314
325
 
@@ -321,9 +332,10 @@ states:
321
332
  - kind: shell
322
333
  options:
323
334
  command: >-
335
+ eval "$(jq -r 'if .mode=="source-repo" then "S="+@sh"\(.dir)/history-anatomy-cache.ts"+" RUNNER=bun" elif .mode=="installed" then "S="+@sh"\(.dir)/history-anatomy-cache.mjs"+" RUNNER=node" else empty end' ".spur/run/$__runId-script-root.json" 2>/dev/null)";
324
336
  . .spur/run/$__runId-paths.txt;
325
337
  mkdir -p "$(dirname "$HA_TARGET")";
326
- node "$HA_HELPER" publish .spur/run/$__runId-publishable.md "$HA_TARGET"
338
+ "$RUNNER" "$S" publish .spur/run/$__runId-publishable.md "$HA_TARGET"
327
339
 
328
340
  - id: published
329
341
  description: Terminal — report published atomically after a passing validation.