@gobing-ai/spur 0.3.80 → 0.3.82

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 (177) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/config.example.yaml +31 -18
  3. package/config/config.global.yaml +13 -11
  4. package/config/pipeline-budgets.json +34 -2
  5. package/config/plugin-scripts.json +25 -0
  6. package/config/rules/boundary/config-loading-ownership.yaml +0 -3
  7. package/config/rules/boundary/dao-boundary.yaml +4 -17
  8. package/config/rules/boundary/planning-folder-hardcode.yaml +0 -1
  9. package/config/rules/boundary/sp-no-vendor-refs.yaml +3 -2
  10. package/config/rules/boundary/sp-runtime-path.yaml +3 -14
  11. package/config/rules/quality/coverage-gate.yaml +3 -14
  12. package/config/rules/quality/tsdoc-exports.yaml +4 -7
  13. package/config/rules/strict/http-boundaries.yaml +5 -8
  14. package/config/rules/strict/runtime-boundaries.yaml +1 -5
  15. package/config/rules/structure/protected-files.yaml +9 -3
  16. package/config/rules/structure/test-focus-skip.yaml +0 -2
  17. package/config/rules/structure/test-location.yaml +0 -5
  18. package/config/rules/surface/check-cli-surface.yaml +3 -2
  19. package/config/rules/typescript/bun-tooling.yaml +5 -7
  20. package/config/rules/typescript/guarded-happy-dom-register.yaml +0 -2
  21. package/config/rules/typescript/happy-dom-teardown.yaml +0 -2
  22. package/config/rules/typescript/no-biome-suppressions.yaml +0 -2
  23. package/config/rules/typescript/no-debugger.yaml +0 -2
  24. package/config/rules/typescript/no-eslint-suppressions.yaml +0 -4
  25. package/config/rules/typescript/no-leaky-module-mocks.yaml +6 -13
  26. package/config/rules/typescript/no-module-scope-import-calls.yaml +0 -2
  27. package/config/rules/typescript/no-syscall-emulation-in-boundary-mock.yaml +0 -3
  28. package/config/rules/typescript/no-unmocked-module-eval-side-effects.yaml +0 -3
  29. package/config/rules/typescript/output-boundaries.yaml +0 -3
  30. package/config/rules/typescript/prefer-accessible-role-for-button-queries.yaml +0 -3
  31. package/config/rules/ui/ui-import-boundary.yaml +1 -5
  32. package/config/templates/docs/99_PROJECT_CONSTITUTION.md +75 -13
  33. package/config/transition-shims.json +0 -7
  34. package/config/workflows/basic.yaml +4 -0
  35. package/config/workflows/docs-pipeline.yaml +13 -14
  36. package/config/workflows/feature-dev.yaml +20 -65
  37. package/config/workflows/history-anatomy.yaml +22 -1
  38. package/config/workflows/idea-pipeline.yaml +53 -97
  39. package/config/workflows/pr-review.yaml +21 -33
  40. package/config/workflows/task-pipeline.yaml +87 -330
  41. package/config/workflows/wayfinder-resolution.yaml +12 -26
  42. package/config/workflows/wrapup-pipeline.yaml +48 -189
  43. package/package.json +9 -9
  44. package/plugins/sp/README.md +12 -3
  45. package/plugins/sp/agents/expert-spur.md +41 -19
  46. package/plugins/sp/lib/idea-handoff.generated.d.mts +17 -0
  47. package/plugins/sp/lib/idea-handoff.generated.mjs +1301 -0
  48. package/plugins/sp/plugin.json +1 -1
  49. package/plugins/sp/scripts/feature-dev-precheck.mjs +146 -0
  50. package/plugins/sp/scripts/feature-dev-precheck.ts +238 -0
  51. package/plugins/sp/scripts/idea-handoff.mjs +27 -0
  52. package/plugins/sp/scripts/idea-handoff.ts +44 -0
  53. package/plugins/sp/scripts/inline-run-setup.ts +69 -1
  54. package/plugins/sp/scripts/quality-gate.mjs +216 -0
  55. package/plugins/sp/scripts/quality-gate.ts +287 -0
  56. package/plugins/sp/scripts/surface-drift-inventory.ts +0 -2
  57. package/plugins/sp/scripts/task-size-precheck.ts +44 -16
  58. package/plugins/sp/scripts/verify-answer-lint.ts +17 -1
  59. package/plugins/sp/scripts/workflow-step-profile.mjs +319 -0
  60. package/plugins/sp/scripts/workflow-step-profile.ts +456 -0
  61. package/plugins/sp/scripts/wrapup-steps.mjs +350 -0
  62. package/plugins/sp/scripts/wrapup-steps.ts +466 -0
  63. package/plugins/sp/skills/code-review/references/review-lenses.md +3 -0
  64. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +1 -1
  65. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +29 -0
  66. package/plugins/sp/skills/spur-cli/SKILL.md +4 -8
  67. package/plugins/sp/skills/spur-cli/references/agent.md +44 -69
  68. package/plugins/sp/skills/spur-cli/references/message.md +30 -3
  69. package/plugins/sp/skills/spur-cli/references/projects.md +25 -1
  70. package/plugins/sp/skills/spur-cli/references/self.md +6 -5
  71. package/plugins/sp/skills/spur-cli/references/serve.md +8 -7
  72. package/plugins/sp/skills/spur-cli/references/tasks.md +1 -1
  73. package/plugins/sp/skills/spur-cli/references/workflows/operations.md +6 -3
  74. package/plugins/sp/skills/spur-cli/references/workflows/workflow-fit-and-tuning.md +57 -18
  75. package/plugins/sp/skills/spur-composer/SKILL.md +145 -0
  76. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +10 -0
  77. package/plugins/sp/skills/spur-dev/references/execution-batch.md +1 -1
  78. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +4 -6
  79. package/plugins/sp/skills/spur-dev/references/glossary.md +1 -1
  80. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +11 -1
  81. package/plugins/sp/skills/spur-dev/references/planning-workflow.md +24 -0
  82. package/plugins/sp/skills/spur-doctor/SKILL.md +138 -0
  83. package/plugins/sp/skills/taste-refactoring-api/README.md +43 -0
  84. package/plugins/sp/skills/taste-refactoring-api/SKILL.md +334 -0
  85. package/plugins/sp/skills/taste-refactoring-api/checklists/daily-api-review.md +71 -0
  86. package/plugins/sp/skills/taste-refactoring-api/examples/refactor-example.md +72 -0
  87. package/plugins/sp/skills/taste-refactoring-api/examples/review-template.md +93 -0
  88. package/plugins/sp/skills/taste-refactoring-api/references/api-refactoring-playbook.md +253 -0
  89. package/plugins/sp/skills/taste-refactoring-api/references/protocol-modes.md +79 -0
  90. package/plugins/sp/skills/taste-refactoring-api/references/research-basis.md +58 -0
  91. package/plugins/sp/skills/taste-refactoring-architect/README.md +26 -0
  92. package/plugins/sp/skills/taste-refactoring-architect/SKILL.md +471 -0
  93. package/plugins/sp/skills/taste-refactoring-architect/checklists/daily-architecture-review.md +48 -0
  94. package/plugins/sp/skills/taste-refactoring-architect/examples/refactor-example.md +55 -0
  95. package/plugins/sp/skills/taste-refactoring-architect/examples/review-template.md +51 -0
  96. package/plugins/sp/skills/taste-refactoring-architect/references/architecture-refactoring-playbook.md +173 -0
  97. package/plugins/sp/skills/taste-refactoring-architect/references/research-basis.md +28 -0
  98. package/plugins/sp/skills/taste-refactoring-tests/README.md +28 -0
  99. package/plugins/sp/skills/taste-refactoring-tests/SKILL.md +482 -0
  100. package/plugins/sp/skills/taste-refactoring-tests/checklists/daily-test-review.md +39 -0
  101. package/plugins/sp/skills/taste-refactoring-tests/examples/refactor-example.md +85 -0
  102. package/plugins/sp/skills/taste-refactoring-tests/examples/review-template.md +59 -0
  103. package/plugins/sp/skills/taste-refactoring-tests/references/research-basis.md +47 -0
  104. package/plugins/sp/skills/taste-refactoring-tests/references/test-refactoring-playbook.md +222 -0
  105. package/plugins/sp/skills/taste-refactoring-ui/README.md +12 -0
  106. package/plugins/sp/skills/taste-refactoring-ui/SKILL.md +290 -0
  107. package/plugins/sp/skills/taste-refactoring-ui/checklists/daily-ui-review.md +72 -0
  108. package/plugins/sp/skills/taste-refactoring-ui/examples/review-template.md +51 -0
  109. package/plugins/sp/skills/taste-refactoring-ui/references/refactoring-ui-playbook.md +170 -0
  110. package/plugins/sp/skills/wayfinder/SKILL.md +2 -2
  111. package/plugins/sp/skills/wayfinder/references/pipeline-resolution.md +30 -0
  112. package/schemas/spur-config.schema.json +105 -85
  113. package/spur.js +44616 -43320
  114. package/web/_astro/BoardApp.D-WlxiN2.js +1 -0
  115. package/web/_astro/{BoardApp.CHQ1lycZ.js → BoardApp.D8bM9pKL.js} +97 -95
  116. package/web/_astro/{TaskDetail.GKfQJ60c.js → TaskDetail.BPRqgVUE.js} +1 -1
  117. package/web/_astro/{arc.DWEtA3Tx.js → arc.BPrPES3z.js} +1 -1
  118. package/web/_astro/{architectureDiagram-3BPJPVTR.DB42oWmP.js → architectureDiagram-3BPJPVTR.qX_7q02P.js} +1 -1
  119. package/web/_astro/{blockDiagram-GPEHLZMM.rhv-zNQV.js → blockDiagram-GPEHLZMM.CUZfj5V7.js} +1 -1
  120. package/web/_astro/{c4Diagram-AAUBKEIU.Ci4-4VvY.js → c4Diagram-AAUBKEIU.CTaOr8hH.js} +1 -1
  121. package/web/_astro/channel.DGZaFHZx.js +1 -0
  122. package/web/_astro/{chunk-2J33WTMH.Cc9veUgf.js → chunk-2J33WTMH.Dt-9wf3h.js} +1 -1
  123. package/web/_astro/{chunk-4BX2VUAB.Bec9c4eI.js → chunk-4BX2VUAB.CTC2sdoN.js} +1 -1
  124. package/web/_astro/{chunk-55IACEB6.DoV8S1iB.js → chunk-55IACEB6.DQcxt2_g.js} +1 -1
  125. package/web/_astro/{chunk-727SXJPM.DwR-Qlyj.js → chunk-727SXJPM.DXFPSn-a.js} +1 -1
  126. package/web/_astro/{chunk-AQP2D5EJ.ND_a81WY.js → chunk-AQP2D5EJ.BCx3U4bT.js} +1 -1
  127. package/web/_astro/{chunk-FMBD7UC4.Wv_jwG48.js → chunk-FMBD7UC4.DL2tJkdO.js} +1 -1
  128. package/web/_astro/{chunk-ND2GUHAM.CXKXCMmp.js → chunk-ND2GUHAM.DZyflMro.js} +1 -1
  129. package/web/_astro/{chunk-QZHKN3VN.nkaoNYQq.js → chunk-QZHKN3VN.CUI2mT09.js} +1 -1
  130. package/web/_astro/{classDiagram-4FO5ZUOK.cMQcVlQu.js → classDiagram-4FO5ZUOK.g4rX4Fr1.js} +1 -1
  131. package/web/_astro/{classDiagram-v2-Q7XG4LA2.cMQcVlQu.js → classDiagram-v2-Q7XG4LA2.g4rX4Fr1.js} +1 -1
  132. package/web/_astro/{cose-bilkent-S5V4N54A.OaDJ7Mr2.js → cose-bilkent-S5V4N54A.CzWJLqp0.js} +1 -1
  133. package/web/_astro/{cynefin-OW5HDTMX.Chi8IphF.js → cynefin-OW5HDTMX.WgsvQeCR.js} +1 -1
  134. package/web/_astro/{cytoscape.esm.DzSz-X2X.js → cytoscape.esm.BB4DxJjf.js} +1 -1
  135. package/web/_astro/{dagre-BM42HDAG.CzK2t_Fp.js → dagre-BM42HDAG.Dzv6ngql.js} +1 -1
  136. package/web/_astro/{diagram-2AECGRRQ.DRvxlVS7.js → diagram-2AECGRRQ.CpJ4a9rU.js} +1 -1
  137. package/web/_astro/{diagram-5GNKFQAL.CnYvNdwA.js → diagram-5GNKFQAL.CzPlF_dq.js} +1 -1
  138. package/web/_astro/{diagram-KO2AKTUF.CpLpMw5R.js → diagram-KO2AKTUF.TAkZNTcQ.js} +1 -1
  139. package/web/_astro/{diagram-LMA3HP47.JTb78qUA.js → diagram-LMA3HP47.uCjoKSag.js} +1 -1
  140. package/web/_astro/{diagram-OG6HWLK6.Bk-1jDIb.js → diagram-OG6HWLK6.eMplIjoK.js} +1 -1
  141. package/web/_astro/{erDiagram-TEJ5UH35.D8hN9GZq.js → erDiagram-TEJ5UH35.Bf7zoXGz.js} +1 -1
  142. package/web/_astro/{flowDiagram-I6XJVG4X.-6zQr6m5.js → flowDiagram-I6XJVG4X.B_bHj3gN.js} +1 -1
  143. package/web/_astro/{ganttDiagram-6RSMTGT7.DboLQ9ca.js → ganttDiagram-6RSMTGT7.BasrHRMj.js} +1 -1
  144. package/web/_astro/{gitGraphDiagram-PVQCEYII.4tYvJKGR.js → gitGraphDiagram-PVQCEYII.C6iphq1x.js} +1 -1
  145. package/web/_astro/index.DayyIngm.css +1 -0
  146. package/web/_astro/{infoDiagram-5YYISTIA.Bd9rXpsB.js → infoDiagram-5YYISTIA.HXmDMhW4.js} +1 -1
  147. package/web/_astro/{ishikawaDiagram-YF4QCWOH.CvMoaf67.js → ishikawaDiagram-YF4QCWOH.BSmW8NiU.js} +1 -1
  148. package/web/_astro/{journeyDiagram-JHISSGLW.Ccy1CA7y.js → journeyDiagram-JHISSGLW.DEQow5fo.js} +1 -1
  149. package/web/_astro/{kanban-definition-UN3LZRKU.0MaMqHNS.js → kanban-definition-UN3LZRKU.IVm9cTdc.js} +1 -1
  150. package/web/_astro/{linear.CHXgcIbN.js → linear.CrsM73_9.js} +1 -1
  151. package/web/_astro/{mermaid.core.Ca-kcelG.js → mermaid.core.CfBeDJls.js} +6 -6
  152. package/web/_astro/{mindmap-definition-RKZ34NQL.BUIDlHa0.js → mindmap-definition-RKZ34NQL.C3j60Y-0.js} +1 -1
  153. package/web/_astro/ordinal.BYWQX77i.js +1 -0
  154. package/web/_astro/{pieDiagram-4H26LBE5.2dX3CU1s.js → pieDiagram-4H26LBE5.B-aCMeEA.js} +1 -1
  155. package/web/_astro/{quadrantDiagram-W4KKPZXB.B3LBlRiv.js → quadrantDiagram-W4KKPZXB.Cib965yq.js} +1 -1
  156. package/web/_astro/{requirementDiagram-4Y6WPE33.X12I2uNx.js → requirementDiagram-4Y6WPE33.D61cS4O-.js} +1 -1
  157. package/web/_astro/{sankeyDiagram-5OEKKPKP.BXohIHqx.js → sankeyDiagram-5OEKKPKP.GKF2qVPy.js} +1 -1
  158. package/web/_astro/{sequenceDiagram-3UESZ5HK.C37ZIUzg.js → sequenceDiagram-3UESZ5HK.DZnq8F2h.js} +1 -1
  159. package/web/_astro/{stateDiagram-AJRCARHV.BRgz317z.js → stateDiagram-AJRCARHV.DXUFmdgM.js} +1 -1
  160. package/web/_astro/{stateDiagram-v2-BHNVJYJU.7VYSXN9-.js → stateDiagram-v2-BHNVJYJU.BtHmhLEz.js} +1 -1
  161. package/web/_astro/{timeline-definition-PNZ67QCA.BVNz_HiN.js → timeline-definition-PNZ67QCA.Cy-WW2ln.js} +1 -1
  162. package/web/_astro/{vennDiagram-CIIHVFJN.CHVDkPX4.js → vennDiagram-CIIHVFJN.SLp5b9KI.js} +1 -1
  163. package/web/_astro/{wardleyDiagram-YWT4CUSO.EQQ_qT9v.js → wardleyDiagram-YWT4CUSO.Bww45mWV.js} +1 -1
  164. package/web/_astro/{xychartDiagram-2RQKCTM6.DrAT9WoP.js → xychartDiagram-2RQKCTM6.DR4swI6a.js} +1 -1
  165. package/web/apple-touch-icon.png +0 -0
  166. package/web/favicon.ico +0 -0
  167. package/web/favicon.svg +17 -4
  168. package/web/icon-192.png +0 -0
  169. package/web/icon-512.png +0 -0
  170. package/web/index.html +2 -2
  171. package/web/site.webmanifest +31 -0
  172. package/web/spur_logo.svg +1 -0
  173. package/plugins/sp/skills/spur-cli/references/team.md +0 -145
  174. package/web/_astro/BoardApp.DV9kx0wo.js +0 -1
  175. package/web/_astro/channel.BAI6xLeV.js +0 -1
  176. package/web/_astro/index.Dcr_8fiK.css +0 -1
  177. package/web/_astro/ordinal.DBvzRdQf.js +0 -1
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: spur-composer
3
+ description: "Select, compose and tune spur artifacts — tasks, features, rules, workflows and agent specs. Owns workflow catalog selection, the ephemeral→project→shared ladder, the ADR-115 budgets, trace-driven rule tuning, and applying accepted sp:spur-doctor proposals. Triggers: compose a workflow, tune a rule, apply doctor proposals."
4
+ license: Apache-2.0
5
+ version: 1.0.0
6
+ metadata:
7
+ author: spur
8
+ platforms: "claude-code,codex,openclaw,opencode,antigravity"
9
+ category: artifact-composition
10
+ interactions:
11
+ - inversion
12
+ - companion
13
+ operations:
14
+ - select
15
+ - compose
16
+ - tune
17
+ - apply
18
+ openclaw:
19
+ emoji: "🎼"
20
+ see_also:
21
+ - sp:spur-cli
22
+ - sp:spur-doctor
23
+ - sp:super-planner
24
+ ---
25
+
26
+ # sp:spur-composer — compose, select and tune spur artifacts
27
+
28
+ One cross-noun method (ADR-114, [spur artifact evolution](../../../../docs/design/spur-artifact-evolution.md)
29
+ §2): **select** an existing artifact, **compose** a new one up the ladder, **tune** it against
30
+ evidence, and **apply** the proposals the operator accepts from `sp:spur-doctor`. It never judges
31
+ its own output and never runs a recurring loop — evaluation is the doctor's job.
32
+
33
+ ## Boundary — read before composing
34
+
35
+ - **Verbs and flags live in `sp:spur-cli`.** This skill links references; it never restates a verb
36
+ or flag catalog: [../spur-cli/SKILL.md](../spur-cli/SKILL.md).
37
+ - **Recurring loops and coordination go to `sp:super-planner`** or a workflow — not here. This skill
38
+ runs one bounded composition or tuning pass per invocation.
39
+ - **Forbidden surface: `spur agent loop`** (supervisor-internal). Agent specs are read through
40
+ `spur agent list --specs`; they are declared in the fleet config, not authored by a CLI verb.
41
+ - **Writes land only through `spur` verbs** and the ladder's gated file steps (§ below). The shared
42
+ step additionally needs recorded operator consent plus `build:bundle` parity.
43
+
44
+ ## Covered nouns
45
+
46
+ | Noun | Composition / tuning method | Verb reference |
47
+ | --- | --- | --- |
48
+ | task | Apply accepted doctor rows via the CLI-gated corpus surface; author variants through the task reference's conventions | [../spur-cli/references/tasks.md](../spur-cli/references/tasks.md) |
49
+ | feature | Apply accepted rows through `spur feature update --section --from-file`; keep acceptance criteria in Gherkin | [../spur-cli/references/features.md](../spur-cli/references/features.md) |
50
+ | rule | The trace-driven tuning loop (§ Rule tuning loop) | [../spur-cli/references/rules.md](../spur-cli/references/rules.md) · [fine-tuning](../spur-cli/references/rules/fine-tuning.md) |
51
+ | workflow | Catalog selection, the composition ladder, and the ADR-115 budgets (§ below) | [../spur-cli/references/workflows.md](../spur-cli/references/workflows.md) · [operations](../spur-cli/references/workflows/operations.md) |
52
+ | agent spec | Read through `spur agent list --specs`; specs are materialized from the fleet declaration at serve start | [../spur-cli/references/agent.md](../spur-cli/references/agent.md) |
53
+
54
+ Do not drive the planning→execution lifecycle from here — that is `sp:spur-dev`.
55
+
56
+ ## Workflow catalog selection
57
+
58
+ Run this **before composing anything new**, exactly as the
59
+ [find-existing-workflow](../spur-cli/references/workflows/operations.md#sub-procedure-find-existing-workflow)
60
+ procedure: the catalog is `spur workflow list --json` across all layers, and each entry's
61
+ `description` is its intent.
62
+
63
+ | Catalog match | Action |
64
+ | --- | --- |
65
+ | Matches the intent | **Run it as is.** No new artifact. |
66
+ | Near match | **Same-name override in the project layer** (`.spur/workflows/<name>.yaml`) — the project layer wins name resolution — and tune from there. |
67
+ | No match | **Compose** up the ladder (§ Composition ladder). |
68
+
69
+ Never glob a folder to enumerate candidates: layers you skip that way are layers a bare name
70
+ cannot resolve from.
71
+
72
+ ## Composition ladder
73
+
74
+ | Step | Location | Gate before use |
75
+ | --- | --- | --- |
76
+ | ephemeral | A scratch file outside every layer (for example under `.spur/run/`), run by explicit path | `spur workflow validate`, `spur workflow run --dry-run`, a `spur workflow show` preview |
77
+ | project | `.spur/workflows/<name>.yaml` | The same gates |
78
+ | shared | the spur repository's shipped shared workflow layer (layer id `shared` in `spur workflow list --json`) as `<name>.yaml` | The same gates, **plus recorded operator consent and `build:bundle` parity** |
79
+
80
+ - `spur workflow validate --json` exits 1 on an error-level composition finding, so a definition
81
+ over a cap cannot climb. Warn-level findings do not block a step.
82
+ - Verify each step through the shared
83
+ [validate-and-dry-run](../spur-cli/references/workflows/operations.md#sub-procedure-validate-and-dry-run)
84
+ core. The shared step is a promotion, not a copy: record the operator consent that authorizes it,
85
+ then rebuild the bundle (`bun run --filter @gobing-ai/spur build:bundle`) so the shipped config
86
+ matches.
87
+ - In an adopting project the shared layer is the installed package and is read-only — the project
88
+ step is the tuning path there.
89
+
90
+ ## Composition budgets (ADR-115)
91
+
92
+ The consolidation and cache-window rules are taught once in
93
+ [workflow-fit-and-tuning.md](../spur-cli/references/workflows/workflow-fit-and-tuning.md#consolidation-and-cache-windows-adr-115)
94
+ and owned by the
95
+ [workflow composition contract](../../../../docs/design/workflow-composition-contract.md#composition-budgets-adr-115);
96
+ link them, never restate them. While composing or tuning a workflow, apply them with the ADR-115
97
+ budgets:
98
+
99
+ - **Merge adjacent model steps** only when they share a role and an executor **and** no gate, HITL
100
+ state or independence boundary sits between them.
101
+ - **Never merge an author step with the review or verify step that certifies it** — those keep
102
+ `freshSession: true`.
103
+ - **Run long deterministic work outside `agent.run`** — an in-step tool call that outlasts the
104
+ cache window idles the model and cold-rewrites the prefix.
105
+
106
+ A new model step in a shared workflow raises its `pipeline-budgets` `modelQueries`; that needs a
107
+ recorded decision before the shared step.
108
+
109
+ ## Rule tuning loop
110
+
111
+ Start from trace evidence, never from a guess:
112
+
113
+ 1. `spur rule trace <runId> --json` — read the per-rule `evaluations` findings and severities.
114
+ 2. Classify each hit: true positive, false positive, or noise.
115
+ 3. Tune with the [fine-tuning levers](../spur-cli/references/rules/fine-tuning.md) — severity,
116
+ glob scoping, exemptions, preset composition.
117
+ 4. `spur rule validate` on the tuned rule files.
118
+ 5. `spur rule run` on the affected inputs (constitution T11 — affected inputs, not a corpus sweep).
119
+ 6. Trace again and compare. A tuning with no trace pair behind it is a preference.
120
+
121
+ ## Applying doctor proposals
122
+
123
+ `sp:spur-doctor` ([../spur-doctor/SKILL.md](../spur-doctor/SKILL.md)) returns a proposal table;
124
+ the operator accepts rows; **this skill applies them**:
125
+
126
+ 1. For each accepted row, run its `apply` route — always the `spur` verb or ladder step named in
127
+ the row. Composer never invents a write route.
128
+ 2. Re-run that row's `verify` evidence and confirm it clears. An accepted row that cannot verify
129
+ is reported as not applied, never waved through.
130
+ 3. A `task` row carries the history-anatomy finding `key` in the task body — the existing handoff
131
+ route. Keep it.
132
+ 4. A row that changes a shared workflow goes through the ladder's shared step and its recorded
133
+ consent.
134
+
135
+ A caller that wants a record saves the accepted table under `docs/reports/`; this skill creates no
136
+ artifact store.
137
+
138
+ ## What this skill is not
139
+
140
+ - **Not the judge.** `sp:spur-doctor` evaluates artifacts and proposes; code review is
141
+ `sp:super-reviewer`.
142
+ - **Not a loop.** Recurring evolution loops and multi-agent coordination belong to
143
+ `sp:super-planner` or a workflow definition.
144
+ - **Not a catalog.** Verb, flag, output and exit semantics live in the `sp:spur-cli` references
145
+ linked above.
@@ -127,6 +127,16 @@ unmatchable):
127
127
  | AC-0817-HERM-SKIP | MET | test | `tests/loader.test.ts:962` | ← declared
128
128
  ```
129
129
 
130
+ ### A bullet's bold head is its id
131
+
132
+ `verify-answer-lint` declares the bold span of a single-line criterion bullet
133
+ (`- **AC2 — The roster runtime is gone (R3).** Given …, when …, then …`) and its head before the
134
+ first ` — ` or `:` — so answer rows may key `AC2` or `AC2 — The roster runtime is gone (R3).`. Keep
135
+ at least one answer row keyed to the verbatim feature scenario title the task graduates, and keep
136
+ requirement ids in the corpus form they are checked against (`- **R1** — …`): `L3.requirements-format`
137
+ matches `R\d+` followed by a space, so a colon after the bold span silently drops the whole section
138
+ to a warning.
139
+
130
140
  ### The id is exactly the scenario title — no Gherkin body appended
131
141
 
132
142
  An AC row id must be **exactly** the scenario title (plus any of the four forms above), with the
@@ -885,7 +885,7 @@ command doc so it does not read as a bug.
885
885
  ## Still out of scope
886
886
 
887
887
  - **Interactive within-step Q&A** — a headless subprocess `agent.run` agent asking the operator a
888
- real question. This waits for the workspace module + inbox module + `spur agent` team mode.
888
+ real question. This waits for the workspace module + inbox module + the agent fleet.
889
889
  `sp:super-planner` surfaces blockers/HITL only at the **batch boundary** (between task runs), not
890
890
  from inside a pipeline step.
891
891
 
@@ -327,12 +327,10 @@ task.** A `cheap`/`standard`-tier model handed a task that big does not fail fas
327
327
  entire `implementTimeoutMs` and exits 3 with a partial tree (run `ca130182` — 7 reqs / 9 plan
328
328
  items / 12+ files → 30 minutes, 6 of 12 files, no tests, no docs, no `## Solution`).
329
329
 
330
- The precheck size gate enforces this: it resolves `$implementAgent`'s capability tier
331
- (`spur agent doctor <exec> --json` → `capabilityTier`) and writes FAIL for a large task on an
332
- executor below the `reviewer` role's floor, naming the executor and its tier. An unknown or
333
- undeclared tier reads as the `coder` floor, so the block is the default. Clear it deliberately —
334
- `--agent <capable>` / `--vars '{"implementAgent":"<capable>"}'`, or split — never by raising
335
- `maxImplementReqs`: the caps accept a big task, they do not make a flash model able to finish one.
330
+ The precheck size gate is count-only: it writes FAIL above 10 requirements or 16 Plan items and
331
+ never consults the executor's capability tier. Clear a FAIL deliberately — split the task, or raise
332
+ the cap with `--vars '{"maxImplementReqs":<n>}'` — but the caps only accept a big task, they do not
333
+ make a flash model able to finish one.
336
334
 
337
335
  The empty-implement guard (`requireDiff` on the task-pipeline `implement` step, R3) fails the
338
336
  run fast when an implement exits 0 with zero non-corpus changes — a no-op never drifts into
@@ -55,7 +55,7 @@ Avoid: *result* (too generic — a verdict has a fixed three-value contract), *r
55
55
  for narrative output like the dogfood report or batch report).
56
56
 
57
57
  **noun/verb** — the two-part CLI grammar: a noun names the domain object (`task`, `feature`,
58
- `rule`, `workflow`, `agent`, `message`, `team`), a verb names the operation on it (`create`,
58
+ `rule`, `workflow`, `agent`, `message`), a verb names the operation on it (`create`,
59
59
  `update`, `check`, `run`, `list`). The `sp:spur-cli` facade organizes its references one file
60
60
  per noun.
61
61
  Avoid: *command* alone (ambiguous with a `/sp:dev-*` slash command, which is a different
@@ -206,7 +206,12 @@ Action semantics come from the YAML and the workflow action contract:
206
206
  state mutates the task, the host validates the same refusal conditions inline — the declared
207
207
  artifact exists at the resolved path and is canonical-valid for the run's wbs (for
208
208
  `verify-verdict`: verdict `PASS`), `proofBinding: current` is honored against a freshly captured
209
- proof digest, and the run-scoped review-completion marker exists — then appends one provenance
209
+ proof digest — capture it with `bun "$SETUP_SCRIPT" --fingerprint --task-file <task path>
210
+ [--feature-file <feature path>]`, the same entry point used at Run setup, which prints the engine
211
+ `sha256:<hex>` digest. Run it from the worktree root (cwd feeds the git-tree half of the digest)
212
+ and pass the same `--feature-file` the run folded in — omitting it, or running from elsewhere,
213
+ yields a different digest and the mismatch surfaces later as a refused `run.artifact`
214
+ registration — and the run-scoped review-completion marker exists — then appends one provenance
210
215
  line to `.spur/run/<run-id>.log` naming the equivalence (artifact kind, path, verdict, digest) and
211
216
  proceeds to `spur task record`. A failed validation stops at the state and follows the failure
212
217
  contract; the step is never silently skipped. Artifact-provenance consumers read that run-log
@@ -267,6 +272,11 @@ boundary, and a delegate left to re-derive them re-derives them against its own
267
272
  Nothing else: no task/session transcripts, no machine-specific session paths. The WBS/path already
268
273
  carried by the slash command remains the task handoff.
269
274
 
275
+ **Delegate hygiene.** A dispatched stage cleans up after itself: temporary artifacts stay inside the
276
+ execution tree, and an ad-hoc git worktree created for a comparison is removed before the stage
277
+ reports. The G65 batch's implement dispatches left an 867 MB worktree plus a trail of `/tmp` scratch
278
+ files that outlived the run (2026-09-15).
279
+
270
280
  **Verify-stage artifact contract.** A verify handoff names
271
281
  [`code-verification/references/verdict-schema.md`](../../code-verification/references/verdict-schema.md)
272
282
  as the canonical answer schema and carries this compact form verbatim:
@@ -270,6 +270,30 @@ missing title match. After batch creation, `handoff-finalize`:
270
270
  (runall is then omitted), otherwise `/sp:dev-runall --feature <id> --auto`. The terminal
271
271
  handoff note points at this report.
272
272
 
273
+ **Ready preparation (ready-prepare, 0788).** The input is the `.wbs` array in
274
+ `.spur/run/<runId>-idea-batch-create-result.json`. For EACH wbs: resolve the task file with
275
+ `spur task path <wbs> --json` and apply the ready-refinement checklist — make requirements,
276
+ design, plan, acceptance criteria, decisions, dependencies and premises present and
277
+ non-placeholder so `spur task check <wbs> --json` exits 0. Write planning sections only, through
278
+ `spur task update <wbs> --section <Name> --from-file <file>` — never Solution, Testing, Review
279
+ or History. Record one checklist row per id, with concrete evidence of how you verified it.
280
+ Compute the planning digest with the project's own implementation when this is a monorepo
281
+ checkout — resolve the file with `spur task path <wbs> --json`, then run:
282
+
283
+ ```bash
284
+ bun -e 'const m = await import("./packages/app/src/services/task-readiness"); console.log(m.computePlanningDigest(await Bun.file(process.argv[1]).text()))' <task-file>
285
+ ```
286
+
287
+ When that is impossible in this checkout, set status `skipped` instead of guessing a digest.
288
+ Finally write `.spur/run/<runId>-idea-ready.json` with exactly this shape:
289
+
290
+ ```json
291
+ {"runId":"<runId>","depth":"ready","tasks":[{"wbs":"<wbs>","status":"ready" | "failed" | "skipped","planningDigest":"<sha256 hex>","checks":[{"id":"requirements" | "design" | "plan" | "ac" | "decisions" | "dependencies" | "premises","pass":true,"evidence":"<how verified>"}]}]}
292
+ ```
293
+
294
+ A task you cannot fully prepare gets status `failed` or `skipped` — never fabricate evidence;
295
+ the handoff degrades to refineall.
296
+
273
297
  ## Step 6: Refine before execute (the spec-completion gate)
274
298
 
275
299
  `batch-create` accepts optional `design` / `plan` / `acceptance_criteria` fields (plus
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: spur-doctor
3
+ description: "Evaluate spur artifacts from read-only CLI evidence — tasks, features, rules, workflows, agent specs — reflect over sp:history-anatomy findings, and return a proposal table. Diagnoses spur artifacts, not runtime environments (that is spur agent doctor). Triggers: check artifact health, propose evolution, reflect over history findings."
4
+ license: Apache-2.0
5
+ version: 1.0.0
6
+ metadata:
7
+ author: spur
8
+ platforms: "claude-code,codex,openclaw,opencode,antigravity,pi"
9
+ category: artifact-composition
10
+ interactions:
11
+ - reviewer
12
+ - inversion
13
+ operations:
14
+ - evaluate
15
+ - reflect
16
+ - propose
17
+ openclaw:
18
+ emoji: "🔬"
19
+ see_also:
20
+ - sp:spur-cli
21
+ - sp:spur-composer
22
+ - sp:history-anatomy
23
+ - sp:super-planner
24
+ ---
25
+
26
+ # sp:spur-doctor — evaluate spur artifacts and propose changes
27
+
28
+ One cross-noun method (ADR-114, [spur artifact evolution](../../../../docs/design/spur-artifact-evolution.md)
29
+ §2): gather **read-only CLI evidence** about tasks, features, rules, workflows and agent specs,
30
+ **reflect** over `sp:history-anatomy` findings, and return a **proposal table**. It diagnoses spur
31
+ **artifacts** — definitions, rules, corpus records — not runtime environments: whether an agent
32
+ binary, host session or tool install is healthy is `spur agent doctor`'s job, not this skill's.
33
+
34
+ ## Read-only invariant
35
+
36
+ The doctor **writes nothing and names no mutating verb**. It performs no task, feature, rule or
37
+ workflow write — the operator accepts rows and `sp:spur-composer`
38
+ ([../spur-composer/SKILL.md](../spur-composer/SKILL.md)) applies them. A caller that wants a
39
+ record saves the returned table under `docs/reports/`; the doctor creates no artifact store.
40
+
41
+ - **History enters only through `sp:history-anatomy` findings.** Raw history records stay out
42
+ of scope and are never re-interpreted here; history-anatomy is the only history interpreter.
43
+ - **Recurring reflection loops and coordination go to `sp:super-planner`** or a workflow — one
44
+ bounded evaluation pass per invocation.
45
+ - **Forbidden surface: `spur agent loop`** (supervisor-internal). Agent specs are read only through
46
+ `spur agent list --specs --json`.
47
+
48
+ ## Evidence per noun
49
+
50
+ | Noun | Evidence (read-only) |
51
+ | --- | --- |
52
+ | task | `spur task check <wbs> --json` |
53
+ | feature | `spur feature check <id> --json` |
54
+ | rule | `spur rule trace --json`, `spur rule validate` |
55
+ | workflow | `spur workflow validate --json` (findings by `level`), `node "$(superskill script path sp workflow-step-profile.mjs)" <workflow> --json` |
56
+ | agent spec | `spur agent list --specs --json` |
57
+ | history | A `sp:history-anatomy` report ([../history-anatomy/SKILL.md](../history-anatomy/SKILL.md)), never raw history records |
58
+
59
+ Every row of a proposal cites the evidence it rests on. No anchor, no proposal.
60
+
61
+ ## Workflow step profile and cache-window flags
62
+
63
+ The step profile (`plugins/sp/scripts/workflow-step-profile`, ADR-065 plugin entrypoint) reads
64
+ `spur workflow trace` for a workflow's last N completed, non-dry runs. Per node and action kind it
65
+ reports run count, executions, p50 and max `durationMs`, p50 idle gap before the step, session mode
66
+ (`fresh`, `resumed` or `mixed`) and `cacheHit` p50 with its coverage — satellite §10 step evidence.
67
+
68
+ ```bash
69
+ node "$(superskill script path sp workflow-step-profile.mjs)" <workflow> --json
70
+ ```
71
+
72
+ `W` is the cache window, **300** seconds by default (satellite §10). The script computes every flag
73
+ arithmetically; doctor maps the flag ids to proposals and never re-derives numbers from prose. Each
74
+ flag and each composition finding becomes one proposal row with action class **workflow
75
+ optimization**, and the change comes from the §10 table:
76
+
77
+ | Evidence | Flag | Proposed change |
78
+ | --- | --- | --- |
79
+ | Validate finding, `level: error` | always | Extract to an owner from the closed fix vocabulary |
80
+ | Validate finding, `level: warn` | always | Extract, or record a stays-shell reason inside the warn band |
81
+ | Deterministic step | `step-over-window` — p50 > W | Split it, or move the slow work out of the step |
82
+ | Resumed `agent.run` | `resume-after-idle` — p50 idle gap before it > W | `freshSession: true` with the prior artifact as handoff |
83
+ | Resumed `agent.run` | `resume-cold-cache` — `cacheHit` p50 < 0.5, with evidence | The same, or move a long in-step tool call to a deterministic step |
84
+ | `agent.run` | `agent-run-over-2w` — p50 > 2W | Split at an artifact seam, or no-op when none exists |
85
+
86
+ - The two validate finding rows classify by `level` alone and carry no flag id.
87
+ - A row with `cacheHit.known: 0` raises no cache flag. Its cache evidence is **unknown, never a zero
88
+ hit rate**, and doctor reports it as unknown rather than as a 0% hit.
89
+ - A proposal that changes a shared workflow goes through §7 of the composition ladder
90
+ ([spur-composer](../spur-composer/SKILL.md)), including its recorded operator consent.
91
+
92
+ ## Reflection map over history findings
93
+
94
+ For each history-anatomy finding (`key`, `category`, `trend`, `ownerSurface`), assign **exactly
95
+ one** action class. The first matching row wins:
96
+
97
+ | # | Finding | Action class |
98
+ | --- | --- | --- |
99
+ | 1 | `trend` is `resolved` or `improved` | no-op |
100
+ | 2 | `category` is `positive` | doc or learning |
101
+ | 3 | Automatable, per step 1 of the [placement rule](../../references/environment-lens.md#placement-rule) | rule candidate |
102
+ | 4 | `ownerSurface` is a workflow definition | workflow optimization |
103
+ | 5 | `ownerSurface` is a doc, skill, reference or steering file | doc or learning |
104
+ | 6 | Anything else | task |
105
+
106
+ The five action classes are closed: **task**, **rule candidate**, **workflow optimization**,
107
+ **doc or learning**, **no-op**. The doctor classifies the report's findings and never derives new
108
+ ones from raw records — that would make it a second history interpreter.
109
+
110
+ ## Proposal table
111
+
112
+ Return one row per actionable finding, with exactly these columns:
113
+
114
+ | Column | Content |
115
+ | --- | --- |
116
+ | `key` | The finding key, or `<noun>:<id>:<check>` for an artifact finding |
117
+ | `evidence` | The CLI output or report section the row rests on |
118
+ | `action` | One action class from the reflection map (or the per-noun evaluation) |
119
+ | `change` | The proposed change, in one line |
120
+ | `apply` | The `spur` verb or composer procedure that lands it |
121
+ | `verify` | The evidence to re-run after applying |
122
+
123
+ Rules:
124
+
125
+ - The `apply` route is always a `spur` verb or a gated composer step — never a raw file edit this
126
+ skill performs. Shared-workflow rows route through the composition ladder's shared step.
127
+ - A `task` row carries the finding `key` in the task body (the history-anatomy handoff route).
128
+ - Rows are proposals only. No applied change, diff, or command output claimed as run.
129
+
130
+ ## What this skill is not
131
+
132
+ - **Not the applier.** `sp:spur-composer` applies accepted rows; this skill performs no
133
+ task/feature/rule/workflow write.
134
+ - **Not a runtime doctor.** Environment, binary and session readiness belong to
135
+ `spur agent doctor`; this skill diagnoses spur artifacts from CLI evidence.
136
+ - **Not a history interpreter.** Findings come from `sp:history-anatomy` reports, never from raw
137
+ history records.
138
+ - **Not a loop.** Recurring evolution passes belong to `sp:super-planner` or a workflow.
@@ -0,0 +1,43 @@
1
+ # taste-refactoring-api
2
+
3
+ A reusable agent skill for designing, reviewing, and safely refactoring production APIs.
4
+
5
+ ## What it covers
6
+
7
+ - REST/HTTP
8
+ - RPC/gRPC
9
+ - GraphQL
10
+ - events/webhooks
11
+ - domain/resource modeling
12
+ - naming and schemas
13
+ - errors
14
+ - pagination/filtering/sorting
15
+ - idempotency and retries
16
+ - concurrency
17
+ - versioning/deprecation/migration
18
+ - API security
19
+ - observability
20
+ - reliability/performance
21
+ - contract testing and documentation
22
+
23
+ ## Suggested installation
24
+
25
+ Install/copy this directory as an agent skill named `taste-refactoring-api` and load `SKILL.md` as the skill instructions. Keep the `references`, `checklists`, and `examples` directories available for deeper reviews.
26
+
27
+ ## Daily usage examples
28
+
29
+ - “Use taste-refactoring-api to review this OpenAPI spec.”
30
+ - “Refactor these Express routes without breaking current clients.”
31
+ - “Review this GraphQL schema for compatibility and developer experience.”
32
+ - “Design a safe pagination and filtering contract for this endpoint.”
33
+ - “Create a migration plan from v1 to v2 with no abrupt client breakage.”
34
+ - “Run the daily API quality checklist on this PR.”
35
+
36
+ ## Files
37
+
38
+ - `SKILL.md` — main agent operating instructions
39
+ - `references/api-refactoring-playbook.md` — deeper operational guidance
40
+ - `references/research-basis.md` — standards and sources used to build the skill
41
+ - `checklists/daily-api-review.md` — fast daily checklist
42
+ - `examples/review-template.md` — reusable review format
43
+ - `examples/refactor-example.md` — worked refactoring example