@gobing-ai/spur 0.4.11 → 0.4.13

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 (108) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/config.example.yaml +22 -0
  3. package/config/rules/boundary/config-loading-ownership.yaml +1 -1
  4. package/config/rules/quality/coverage-gate.yaml +2 -2
  5. package/config/rules/strict/runtime-boundaries.yaml +2 -2
  6. package/config/rules/surface/check-cli-surface.yaml +4 -0
  7. package/config/rules/typescript/output-boundaries.yaml +4 -10
  8. package/config/workflows/feature-verification.yaml +14 -5
  9. package/config/workflows/idea-pipeline.yaml +92 -12
  10. package/config/workflows/task-pipeline.yaml +456 -830
  11. package/config/workflows/wayfinder-resolution.yaml +20 -3
  12. package/config/workflows/wrapup-pipeline.yaml +22 -9
  13. package/package.json +1 -1
  14. package/plugins/sp/README.md +2 -2
  15. package/plugins/sp/agents/super-planner.md +2 -2
  16. package/plugins/sp/agents/super-reviewer.md +17 -8
  17. package/plugins/sp/bunfig.toml +3 -3
  18. package/plugins/sp/commands/dev-changelog.md +1 -1
  19. package/plugins/sp/commands/dev-gitmsg.md +2 -2
  20. package/plugins/sp/commands/dev-handover.md +1 -1
  21. package/plugins/sp/commands/dev-idea.md +23 -13
  22. package/plugins/sp/commands/dev-job-dump.md +1 -1
  23. package/plugins/sp/commands/dev-plan.md +17 -6
  24. package/plugins/sp/commands/dev-review.md +1 -1
  25. package/plugins/sp/commands/dev-run.md +8 -7
  26. package/plugins/sp/commands/dev-runall.md +1 -1
  27. package/plugins/sp/plugin.json +1 -1
  28. package/plugins/sp/skills/code-implementation/SKILL.md +7 -7
  29. package/plugins/sp/skills/code-refactoring/SKILL.md +1 -1
  30. package/plugins/sp/skills/code-verification/SKILL.md +1 -1
  31. package/plugins/sp/skills/code-verification/references/secu-review.md +1 -1
  32. package/plugins/sp/skills/code-verification/references/verdict-schema.md +23 -10
  33. package/plugins/sp/skills/doc-evolve/SKILL.md +1 -1
  34. package/plugins/sp/skills/next-router/references/routing-table.md +1 -1
  35. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +7 -7
  36. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +4 -4
  37. package/plugins/sp/skills/spur-check/SKILL.md +9 -8
  38. package/plugins/sp/skills/spur-cli/SKILL.md +2 -2
  39. package/plugins/sp/skills/spur-cli/references/self.md +37 -2
  40. package/plugins/sp/skills/spur-cli/references/tasks/l3-guard-cheatsheet.md +1 -1
  41. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +3 -3
  42. package/plugins/sp/skills/spur-cli/references/tasks.md +1 -1
  43. package/plugins/sp/skills/spur-cli/references/workflows.md +5 -3
  44. package/plugins/sp/skills/spur-dev/SKILL.md +3 -3
  45. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +12 -11
  46. package/plugins/sp/skills/spur-dev/references/dev-operations.md +15 -15
  47. package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +4 -3
  48. package/plugins/sp/skills/spur-dev/references/execution-batch-report.md +4 -4
  49. package/plugins/sp/skills/spur-dev/references/execution-batch.md +13 -11
  50. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +32 -23
  51. package/plugins/sp/skills/spur-dev/references/execution-worktree-landing.md +5 -5
  52. package/plugins/sp/skills/spur-dev/references/execution-worktree-setup.md +4 -4
  53. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +4 -4
  54. package/plugins/sp/skills/spur-dev/references/idea-evaluation.md +1 -1
  55. package/schemas/spur-config.schema.json +19 -1
  56. package/spur.js +31459 -31868
  57. package/web/_astro/{BoardApp.BMprmPRc.js → BoardApp.Bjdp3XWV.js} +36 -36
  58. package/web/_astro/{BoardApp.B5rTVNd_.js → BoardApp.DCDZxLlQ.js} +1 -1
  59. package/web/_astro/{TaskDetail.Ddsur8qd.js → TaskDetail.B3vBxynO.js} +1 -1
  60. package/web/_astro/{arc.DLqVVBxP.js → arc.DcuHTB_T.js} +1 -1
  61. package/web/_astro/{architectureDiagram-3BPJPVTR.C-Pk3uAi.js → architectureDiagram-3BPJPVTR.ClOFWBON.js} +1 -1
  62. package/web/_astro/{blockDiagram-GPEHLZMM.BRO1i_Nm.js → blockDiagram-GPEHLZMM.otYyr7Zb.js} +1 -1
  63. package/web/_astro/{c4Diagram-AAUBKEIU.BU_cWu6e.js → c4Diagram-AAUBKEIU.BCjpc9LP.js} +1 -1
  64. package/web/_astro/channel.qgOLXjI_.js +1 -0
  65. package/web/_astro/{chunk-2J33WTMH.D2VXiQ2t.js → chunk-2J33WTMH.D5Wpnpt_.js} +1 -1
  66. package/web/_astro/{chunk-4BX2VUAB.BcHT772J.js → chunk-4BX2VUAB.DkQGtWNz.js} +1 -1
  67. package/web/_astro/{chunk-55IACEB6.DhDtICmo.js → chunk-55IACEB6.B7dqjAip.js} +1 -1
  68. package/web/_astro/{chunk-727SXJPM.BoKHp7gV.js → chunk-727SXJPM.BDQvnKE2.js} +1 -1
  69. package/web/_astro/{chunk-AQP2D5EJ.Chu4JRpE.js → chunk-AQP2D5EJ.D92doBX5.js} +1 -1
  70. package/web/_astro/{chunk-FMBD7UC4.wHdwKPlq.js → chunk-FMBD7UC4.C968oI5G.js} +1 -1
  71. package/web/_astro/{chunk-ND2GUHAM.ffN-M1JB.js → chunk-ND2GUHAM.AkkYC1bY.js} +1 -1
  72. package/web/_astro/{chunk-QZHKN3VN.FRubwg4S.js → chunk-QZHKN3VN.sCc-rKKo.js} +1 -1
  73. package/web/_astro/{classDiagram-4FO5ZUOK.c22tQsc_.js → classDiagram-4FO5ZUOK.pOQ9u0mY.js} +1 -1
  74. package/web/_astro/{classDiagram-v2-Q7XG4LA2.c22tQsc_.js → classDiagram-v2-Q7XG4LA2.pOQ9u0mY.js} +1 -1
  75. package/web/_astro/{cose-bilkent-S5V4N54A.B9c6fiSj.js → cose-bilkent-S5V4N54A.CRaeD6FY.js} +1 -1
  76. package/web/_astro/{cynefin-OW5HDTMX.DrZsrUHl.js → cynefin-OW5HDTMX.BiCPBu54.js} +1 -1
  77. package/web/_astro/{dagre-BM42HDAG.DG1U4b3y.js → dagre-BM42HDAG.C1-q3vkT.js} +1 -1
  78. package/web/_astro/{diagram-2AECGRRQ.CH15b-K3.js → diagram-2AECGRRQ.BSVOv30O.js} +1 -1
  79. package/web/_astro/{diagram-5GNKFQAL.BH1j7twR.js → diagram-5GNKFQAL.CHMkjJ-V.js} +1 -1
  80. package/web/_astro/{diagram-KO2AKTUF.q2zCkbAj.js → diagram-KO2AKTUF.CKY9M564.js} +1 -1
  81. package/web/_astro/{diagram-LMA3HP47.BLaaZnHV.js → diagram-LMA3HP47.B9yNJiTP.js} +1 -1
  82. package/web/_astro/{diagram-OG6HWLK6.BcpRdQwI.js → diagram-OG6HWLK6.Dk8AUGsk.js} +1 -1
  83. package/web/_astro/{erDiagram-TEJ5UH35.D7KBlqfM.js → erDiagram-TEJ5UH35.BQHR89TZ.js} +1 -1
  84. package/web/_astro/{flowDiagram-I6XJVG4X.D_gmuRqg.js → flowDiagram-I6XJVG4X.oNkWVgoK.js} +1 -1
  85. package/web/_astro/{ganttDiagram-6RSMTGT7.DzgWYniD.js → ganttDiagram-6RSMTGT7.Kz2U2nu9.js} +1 -1
  86. package/web/_astro/{gitGraphDiagram-PVQCEYII.576i3hm3.js → gitGraphDiagram-PVQCEYII.DHIZ_wPq.js} +1 -1
  87. package/web/_astro/{infoDiagram-5YYISTIA.DMCclBiz.js → infoDiagram-5YYISTIA.D0NJLcv9.js} +1 -1
  88. package/web/_astro/{ishikawaDiagram-YF4QCWOH.9Kyca4SH.js → ishikawaDiagram-YF4QCWOH.CFEfTWRG.js} +1 -1
  89. package/web/_astro/{journeyDiagram-JHISSGLW.chbdG-8q.js → journeyDiagram-JHISSGLW.Dc7IE7I4.js} +1 -1
  90. package/web/_astro/{kanban-definition-UN3LZRKU.Bds54-e0.js → kanban-definition-UN3LZRKU.D5v0xO9k.js} +1 -1
  91. package/web/_astro/{linear.D5ND9GN_.js → linear.wR5KzXnE.js} +1 -1
  92. package/web/_astro/{mermaid.core.D9N_PGbj.js → mermaid.core.BDQ2FoPd.js} +4 -4
  93. package/web/_astro/{mindmap-definition-RKZ34NQL.t0xop5vp.js → mindmap-definition-RKZ34NQL.W6_INsia.js} +1 -1
  94. package/web/_astro/{pieDiagram-4H26LBE5.DqgKh6hM.js → pieDiagram-4H26LBE5.61ihbgkK.js} +1 -1
  95. package/web/_astro/{quadrantDiagram-W4KKPZXB.DeuHVi2t.js → quadrantDiagram-W4KKPZXB.B5lEpFLo.js} +1 -1
  96. package/web/_astro/{requirementDiagram-4Y6WPE33.BdYFSG4W.js → requirementDiagram-4Y6WPE33.CmhVBVX0.js} +1 -1
  97. package/web/_astro/{sankeyDiagram-5OEKKPKP.k1LPPETJ.js → sankeyDiagram-5OEKKPKP.D7Vvj9Wf.js} +1 -1
  98. package/web/_astro/{sequenceDiagram-3UESZ5HK.DdyfpzoG.js → sequenceDiagram-3UESZ5HK.B1vPLixM.js} +1 -1
  99. package/web/_astro/{stateDiagram-AJRCARHV.DSEI8il0.js → stateDiagram-AJRCARHV.BnACmrGi.js} +1 -1
  100. package/web/_astro/{stateDiagram-v2-BHNVJYJU.CoMnQRKo.js → stateDiagram-v2-BHNVJYJU.CW4pnmc3.js} +1 -1
  101. package/web/_astro/{timeline-definition-PNZ67QCA.DM1AHNm-.js → timeline-definition-PNZ67QCA.CkzMCPnC.js} +1 -1
  102. package/web/_astro/{vennDiagram-CIIHVFJN.C-cJmVtl.js → vennDiagram-CIIHVFJN.CY4aNdAR.js} +1 -1
  103. package/web/_astro/{wardleyDiagram-YWT4CUSO.D0xMzKPb.js → wardleyDiagram-YWT4CUSO.BtoU9UFk.js} +1 -1
  104. package/web/_astro/{xychartDiagram-2RQKCTM6.BH5xJcEq.js → xychartDiagram-2RQKCTM6._9ijUUAs.js} +1 -1
  105. package/web/index.html +1 -1
  106. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +0 -997
  107. package/plugins/sp/skills/spur-dev/references/structured-trace-emission.md +0 -178
  108. package/web/_astro/channel.Bs3Illhy.js +0 -1
@@ -1,178 +0,0 @@
1
- ---
2
- name: structured-trace-emission
3
- description: "Structured trace emission (task 1128 split, ADR-117 / task 0868): the action vocabulary, the per-step emit shape, the close contract and the parse rules the host driver follows. Read it when the first trace event is emitted."
4
- see_also:
5
- - inline-pipeline-driver
6
- ---
7
-
8
- ## Structured trace emission (ADR-117, task 0868)
9
-
10
- `.spur/memory/runs/<run-id>.md` is the human half of the two-file run record — evidence, **not the record
11
- of truth**. A run's
12
- observability is a property of the run, so the inline driver owes the same structured trace the
13
- engine subprocess writes — and it owes it through the **same writer**, never a parallel
14
- implementation. The shared writer is `WorkflowActionTraceWriter`
15
- (`packages/app/src/workflow/action-trace.ts`): the same decorator the engine composition installs
16
- around `DbWorkflowPersistenceAdapter`, so the two surfaces call one emission path and one run-row
17
- closure path and cannot drift.
18
-
19
- The driver reaches it through the installed CLI transport `spur workflow inline <op>` (the same
20
- command that began the run) — no second entry point, no second resolution chain:
21
-
22
- - **Every executed action** — after the action settles, whether it ran host-inline or via a native
23
- subagent — append its provenance line as before, then record the boundary:
24
-
25
- ```bash
26
- spur workflow inline action --run-id "$RUN_ID" --node <state-id> --kind <action-kind> \
27
- --status <done|failed> --ok <true|false> [--duration-ms <measured-ms>] [--estimated] \
28
- --project-root "$OWNING_TREE"
29
- ```
30
-
31
- `<state-id>` is the current YAML state id (the `node`), `<action-kind>` the YAML action kind
32
- (`agent.run`, `shell`, `note`, `doctor.probe`, …). `--status` is `done` when the action settled
33
- under its declared error policy and `failed` otherwise. This writes the `action_runs` row (node,
34
- kind, status, `ok`, `duration_ms`, `run_id`) the engine would have written, so the run's rows are
35
- queryable by run id (`spur workflow progress <run-id>`, `ActionRunDao`) without reading the text
36
- log. The writer
37
- back-dates the row's `started_at` from its own `completed_at` minus the measured duration
38
- (0887 R8), so `completed_at − started_at == duration_ms` exactly; a back-date failure is
39
- recorded (`action.backdate`) and never affects the run.
40
-
41
- **`--project-root` names the tree that owns the run row (task 1136 R1/R2).** Per-tree DBs are
42
- deliberate, so when the driver runs inside a `--worktree` (or any other execution tree) the run row
43
- lives in the **invoking** tree's `.spur/spur.db` while the action commands run in the execution
44
- tree. `--project-root` is the invoking tree recorded by the WT-3 marker; without it the row is read
45
- from the cwd tree. A run-row miss is a **correctness failure**, not a best-effort emission failure:
46
- `inline action`, `inline actions` and `inline node-enter` exit `1` with
47
- `{"ok":false,"code":"RUN_NOT_FOUND"}`, exactly like `inline close`. **Never redirect these calls'
48
- stdout/stderr to `/dev/null`** — the suppressed-RUN_NOT_FOUND run of task 1132 lost 93 action rows
49
- to exactly that redirect. Capture the output or let it stream; a failure must be visible.
50
-
51
- **Durations: measured beats reported (task 1136 R4).** Stamp the enter time before the action runs:
52
-
53
- ```bash
54
- spur workflow inline node-enter --run-id "$RUN_ID" --node <state-id> --project-root "$OWNING_TREE"
55
- ```
56
-
57
- Then call `inline action` **without** `--duration-ms` — the delegate computes
58
- `duration = now − enter` and stamps `provenance: measured` into `action_runs.result_json`. A
59
- caller-supplied `--duration-ms` stays valid but is recorded `provenance: host-reported` (with
60
- `--estimated` marking a value reconstructed after the fact); every other inline row is
61
- `host-reported` too, and the projection exposes `provenance` per attempt so the Board can label a
62
- reported duration instead of presenting it as measured. A row whose computed start would precede
63
- `runs.started_at` is **rejected** (exit `1`) — a timestamp before the run began is a broken clock,
64
- not evidence. Calling `inline action` without `--duration-ms` and without a matching `inline node-enter`
65
- exits `1` with `code:"ACTION_DURATION_UNAVAILABLE"`; it never silently drops the row.
66
-
67
- - **A state with several actions (1007 R5)** — emit the whole state's boundaries in one call
68
- instead of one `inline action` invocation per action. Write a JSON array
69
- (`[{node,kind,status,ok,durationMs,estimated?}, …]` — the `inline action` fields, `estimated`
70
- optional and `false` when absent) to a temp file and pass it with `spur workflow inline actions --file`:
71
-
72
- ```bash
73
- spur workflow inline actions --file <actions.json> --run-id "$RUN_ID" --project-root "$OWNING_TREE"
74
- ```
75
-
76
- Every row is recorded through the same writer as `inline action` (one `action_runs` row per entry);
77
- the batch is validated in full before the first write, so an invalid row or unreadable file
78
- exits `1` with `{"ok":false}` and leaves **no** partial rows — fix the batch and re-emit. On
79
- success it prints `{"ok":true,"runId":…,"recorded":<n>}` and exits `0`. Row emission stays
80
- best-effort exactly like `inline action`: if a row's write fails mid-batch, the failure is recorded
81
- to the run record and the call reports `{"ok":false,…,"error":…}` but still exits `0` — the run
82
- continues; never retry the batch or backfill by hand. Each op takes only its own flags: an
83
- unknown flag (say `--status` on `inline actions`) is a usage error (exit 2), and such a call
84
- must be corrected, not silently split.
85
-
86
- - **A `decide` action (0941)** — the driver never executes the DecisionMaker itself; it delegates
87
- to the same app runner the engine registers, which writes the resultFile row (schemaVersion 1)
88
- and returns the decision, then the delegate records the `action_runs` row (`kind=decide`)
89
- through the same writer as every other action:
90
-
91
- ```bash
92
- spur workflow inline decide --run-id "$RUN_ID" --node <state-id> --options-json <options-file>
93
- ```
94
-
95
- The options JSON mirrors the YAML `decide` options (`id`, `method: choice|noul`, `question`,
96
- `choices`/`default`, optional `evidence`, optional `minConfidence`, `resultFile`); paths resolve
97
- against the project workdir. The decision never pauses and never fails the run for model
98
- problems: a degraded outcome (feature switch off, no backend, error, timeout, low confidence)
99
- prints `ok:true` with `degraded:true`, the declared `reason`, and `value = default`, and exits
100
- `0` — route on the resultFile's `.value` with the declared file guards. Every row carries
101
- `source: model|default` (0976 R2), and the delegate appends
102
- `decide node=<id> value=<v> source=<s> reason=<r>` to the run log, so a declared-default
103
- fallback is never read as a model decision. Only an invalid options
104
- schema exits `1` (fail closed), and usage errors exit `2`. The `action_runs` trace row is
105
- best-effort exactly like `inline action`.
106
-
107
- - **An operator pause is its own row (task 1136 R5)** — while the driver waits on a `hitl.confirm`
108
- or `hitl.input`, emit the wait as its own boundary instead of charging it to the neighbouring
109
- node:
110
-
111
- ```bash
112
- spur workflow inline action --run-id "$RUN_ID" --node <state-id> --kind operator-wait \
113
- --status done --ok true --duration-ms <waited-ms> --project-root "$OWNING_TREE"
114
- ```
115
-
116
- `operator-wait` is a row kind, not a new state — the decision itself still belongs to the
117
- declared node, and the wait's wall clock stays visible instead of inflating the node's duration.
118
-
119
- - **At the run's declared terminal state** — before the driver reports the run complete, close the
120
- row so a successful inline run is never left non-terminal for `spur workflow clean` to reap as
121
- stale:
122
-
123
- ```bash
124
- spur workflow inline close --run-id "$RUN_ID" --status <done|failed|paused> --project-root "$OWNING_TREE"
125
- ```
126
-
127
- The close also produces the execution summary (1146 R1): its stdout carries
128
- **`summaryFile`** (`.spur/run/<runId>-summary.md`) unless `--no-summary` was passed. Print that
129
- file's contents verbatim under an `### Execution summary` heading — the driver generates nothing
130
- itself, and the window is the run row's `started_at` → close time, so no `SINCE` is recorded. A
131
- summary failure never changes the close verdict: the file then holds exactly
132
- `Execution summary: n/a (<reason>)`.
133
-
134
- `--status` is the declared terminal state's verdict, not a guess: a run that reached a terminal
135
- state is `done`; a run halted by a failing action under its error policy is `failed`. On success
136
- the close reports the recorded evidence: `{"ok":true,"runId":…,"actionRows":<n>}` plus
137
- **`missingNodes`** — the declared states the driver recorded as entered that never emitted an
138
- `action_runs` row (`{"missingNodes":["precheck","verify"]}`, empty array when the trace is
139
- whole). `missingNodes` is a **trace defect reported, never a close failure**: the close still
140
- exits `0`, and it exists so a gap is visible — the repair is to emit the missing rows in the next
141
- run, never to backfill them (ADR-117).
142
- After the close, the invoking command prints the measured
143
- [execution summary](dev-operations.md#execution-summary) for `$RUN_ID` unless `--no-summary`.
144
-
145
- **Zero-row done closes are a named failure (task 0975 R2).** A run closed `done` with **zero**
146
- `action_runs` rows (`actionRows:0`) finalizes the row but exits `1` with
147
- `{"ok":false,"code":"NO_ACTION_ROWS","actionRows":0}` — a run that claims success without a
148
- single recorded action is exactly the untraced-runs gap ADR-117 closes, so the driver must
149
- surface the code in its final report instead of reporting a clean close. The failure must NOT
150
- be repaired by backfilling rows: the run row is already terminal, and hand-written rows are
151
- forbidden (ADR-117) — record the finding and let the task's evidence show the gap. A `failed`
152
- close with zero rows stays a clean `0` (a halt before the first boundary legitimately records
153
- nothing), and any `done` close with `actionRows ≥ 1` exits `0`.
154
-
155
- **Best-effort at the action boundary only (ADR-117, task 1136 R1/R2).** An `inline action` persistence
156
- failure is recorded — the delegate appends a `trace-emission-failed` line to
157
- `.spur/memory/runs/<run-id>.md` and prints `{"ok":false}` on stdout — and the run continues to its
158
- declared terminal state; the delegate exits `0` for that outcome and the driver must never treat an
159
- emission failure as a run failure, retry it in a loop, or substitute a hand-written row. The
160
- exception is the **run row itself**: a missing run row, a duration that cannot be measured, or a
161
- start time before `runs.started_at` are correctness failures and exit `1`
162
- (`RUN_NOT_FOUND`, `ACTION_DURATION_UNAVAILABLE`). The run-row closure (`inline close`) is bookkeeping, not
163
- trace emission, and is **not** best-effort either: a missing run row or a persistence failure exits
164
- `1` with `{"ok":false}` and a named error (a missing row also carries `code:"RUN_NOT_FOUND"`),
165
- because a silently `running` row is exactly the stale state `spur workflow clean` reaps as `failed`.
166
- Exit `2` means the invocation itself was malformed (missing `--node`/`--kind`/`--status`/`--ok`, a
167
- miscased `--ok`, or a malformed `--duration-ms`) and must be corrected, not ignored.
168
-
169
- **Never suppress this output.** The driver reference forbids redirecting `spur workflow inline`,
170
- `quality-gate` and `persist-out*` stdout/stderr to `/dev/null`; a static pin fails any reference
171
- snippet that does. Suppressing a `RUN_NOT_FOUND` is how task 1132's 93 action rows disappeared.
172
-
173
- Emission is not optional and not deferred: an inline run that skips it reintroduces the
174
- 1,011-untraced-runs gap ADR-117 exists to close.
175
-
176
- Transition guards are not advisory. Execute the declared guard exactly, in order, with the same
177
- resolved variables and artifacts. `--no-lifecycle` remains bookkeeping only; the YAML's task checks,
178
- verdict gate, record step, and done guard all remain authoritative.
@@ -1 +0,0 @@
1
- import{ah as o,ai as n}from"./mermaid.core.D9N_PGbj.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};