@gobing-ai/spur 0.3.92 → 0.3.93

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 (56) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/pipeline-budgets.json +0 -7
  3. package/config/plugin-scripts.json +10 -0
  4. package/config/templates/AGENTS.md +4 -0
  5. package/config/templates/docs/02_ROADMAP.md +2 -0
  6. package/config/templates/docs/03_ARCHITECTURE.md +3 -1
  7. package/config/templates/docs/04_DESIGN.md +2 -0
  8. package/config/templates/docs/99_PROJECT_CONSTITUTION.md +10 -2
  9. package/config/workflow-candidates.json +72 -1
  10. package/config/workflows/feature-verification.yaml +1 -0
  11. package/config/workflows/history-anatomy.yaml +2 -0
  12. package/config/workflows/idea-pipeline.yaml +67 -18
  13. package/config/workflows/pr-review.yaml +8 -0
  14. package/config/workflows/task-pipeline.yaml +180 -39
  15. package/config/workflows/wayfinder-resolution.yaml +5 -0
  16. package/config/workflows/wrapup-pipeline.yaml +55 -14
  17. package/package.json +9 -9
  18. package/plugins/sp/README.md +7 -2
  19. package/plugins/sp/commands/dev-run.md +2 -2
  20. package/plugins/sp/commands/dev-runall.md +2 -2
  21. package/plugins/sp/lib/idea-handoff.generated.mjs +8 -4
  22. package/plugins/sp/lib/inline-run.generated.d.mts +1 -0
  23. package/plugins/sp/lib/inline-run.generated.mjs +24 -16
  24. package/plugins/sp/plugin.json +1 -1
  25. package/plugins/sp/scripts/inline-pipeline-parity-check.ts +1 -1
  26. package/plugins/sp/scripts/inline-run-setup.mjs +75 -3
  27. package/plugins/sp/scripts/inline-run-setup.ts +133 -3
  28. package/plugins/sp/scripts/quality-gate.mjs +248 -6
  29. package/plugins/sp/scripts/quality-gate.ts +410 -9
  30. package/plugins/sp/scripts/residual-scan.mjs +12 -4
  31. package/plugins/sp/scripts/residual-scan.ts +32 -6
  32. package/plugins/sp/scripts/task-diffstat.mjs +156 -0
  33. package/plugins/sp/scripts/task-diffstat.ts +229 -0
  34. package/plugins/sp/scripts/wrapup-drift-probe.mjs +181 -0
  35. package/plugins/sp/scripts/wrapup-drift-probe.ts +258 -0
  36. package/plugins/sp/scripts/wrapup-steps.mjs +60 -1
  37. package/plugins/sp/scripts/wrapup-steps.ts +89 -4
  38. package/plugins/sp/skills/brainstorm/SKILL.md +2 -0
  39. package/plugins/sp/skills/brainstorm/references/workflows.md +17 -2
  40. package/plugins/sp/skills/code-verification/SKILL.md +2 -2
  41. package/plugins/sp/skills/code-verification/references/secu-review.md +3 -2
  42. package/plugins/sp/skills/spur-check/SKILL.md +112 -0
  43. package/plugins/sp/skills/spur-dev/SKILL.md +2 -1
  44. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +14 -2
  45. package/plugins/sp/skills/spur-dev/references/document-authoring.md +85 -0
  46. package/plugins/sp/skills/spur-dev/references/execution-batch.md +1 -1
  47. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +8 -0
  48. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +3 -2
  49. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +19 -1
  50. package/plugins/sp/skills/spur-dev/references/planning-workflow.md +5 -5
  51. package/plugins/sp/skills/spur-dev/templates/design.md +31 -0
  52. package/plugins/sp/skills/spur-dev/templates/plan.md +32 -0
  53. package/plugins/sp/skills/spur-doctor/SKILL.md +60 -14
  54. package/schemas/state-machine-workflow.schema.json +4 -0
  55. package/spur.js +1117 -472
  56. package/config/workflows/decision-routing-example.yaml +0 -134
@@ -1,134 +0,0 @@
1
- # DecisionMaker routing example (task 0911, D7). Demonstrates the three `decision:` modes
2
- # on hitl.* actions; copy the pattern into your own workflow instead of running this file.
3
- #
4
- # never — the action always asks the human (DecisionMaker is bypassed even when
5
- # `workflow.hitlDecisionMaker: true`). Used for gates that must stay human-only.
6
- # evidence — the DecisionMaker answers from recorded action evidence of the listed producer
7
- # states: it picks one of the offered choices when confidence >= 0.9, or defers
8
- # (answer var is cleared, status var records `deferred`) when evidence is missing,
9
- # stale, or inconclusive. Requires a non-paused state, a statusVar distinct from
10
- # the answer var, and producer states that exist in this workflow.
11
- # (omitted) — legacy 0910 semantics: DecisionMaker may confirm/select without evidence and
12
- # without provenance. Kept for compatibility; prefer an explicit mode.
13
- #
14
- # The run is safe and local: one shell producer emits a fixed failure summary, the choose step
15
- # reads it as evidence, and the operator gate has no side effects. No provider is required —
16
- # without `workflow.hitlDecisionMaker: true` (or without a key) the evidence step defers and
17
- # `never` behaves exactly like an unconfigured gate. See `spur self status` -> `decisionMaker`
18
- # for offline readiness. Optional registered-summary evidence (`summaryArtifact`) is documented
19
- # in docs/help/how_to_enable_jev_in_spur.md; this example deliberately creates no artifact.
20
- "$schema": "@gobing-ai/spur/schemas/state-machine-workflow.schema.json"
21
- kind: state-machine
22
- name: decision-routing-example
23
- version: "1"
24
- initialState: assess
25
- description: >
26
- Worked example of DecisionMaker decision routing (0911 D7): a shell producer records a fixed
27
- recovery summary as action evidence, a non-pausing hitl.select lets the DecisionMaker choose
28
- retry or stop from that evidence (deferring with provenance when it is inconclusive), an
29
- accepted retry runs exactly one attempt and then escalates, and the never-mode pause=true
30
- hitl.confirm gate always waits for the operator with explicit yes/no/cancel branches.
31
- Illustrative only — copy the patterns rather than running this file.
32
- vars:
33
- recoveryChoice: ""
34
- decisionStatus: ""
35
- # Default answer var the never-mode gate's yes/no/cancel branches read (matches the stock gates).
36
- __hitlAnswer: ""
37
- states:
38
- - id: assess
39
- description: >
40
- Producer state: one shell action whose redacted output becomes the evidence the decide
41
- state's DecisionMaker reads. One producer state carries one evidence-bearing action.
42
- onEnter:
43
- - kind: shell
44
- options:
45
- command: >-
46
- printf 'Failure summary: verification failed twice on the flaky fixture; no data loss;
47
- retry is safe, or stop and hand the decision to the operator.'
48
- - id: decide
49
- description: >
50
- Evidence-mode select (non-paused): DecisionMaker picks a recovery step from the assess
51
- state's recorded evidence. Low confidence, missing or stale evidence defers and writes the
52
- status variable instead of answering, so no implicit approval is ever produced.
53
- onEnter:
54
- - kind: hitl.select
55
- options:
56
- prompt: "Choose the next safe recovery step using the recorded failure summary."
57
- options: [retry, stop]
58
- var: recoveryChoice
59
- decision:
60
- mode: evidence
61
- statusVar: decisionStatus
62
- evidenceNodes: [assess]
63
- - id: retry
64
- description: >
65
- The single bounded retry an accepted `retry` choice buys: this state runs once and routes
66
- to the operator gate, so an accepted answer can never loop back into the decision.
67
- onEnter:
68
- - kind: shell
69
- options:
70
- command: "printf 'retry attempt: re-running the failed verification step once'"
71
- - id: humanGate
72
- description: >
73
- Never-mode confirm (paused): always waits for the operator, whichever branch reached it.
74
- `spur workflow continue --answer yes|no|cancel` records the explicit operator answer.
75
- pause: true
76
- onEnter:
77
- - kind: hitl.confirm
78
- options:
79
- prompt: "Publish the recovered result, stop, or cancel the run?"
80
- decision:
81
- mode: never
82
- - id: published
83
- description: Operator approved the recovered result; terminal marker state.
84
- - id: stop
85
- description: Recovery stopped deliberately — requested by the decision or rejected by the operator.
86
- - id: cancelled
87
- description: Operator cancelled the run at the gate; terminal marker state.
88
- transitions:
89
- # Accepted decision branches first: the state machine takes the first passing edge.
90
- - from: assess
91
- to: decide
92
- guard: { kind: always }
93
- - from: decide
94
- to: retry
95
- guard:
96
- kind: shell
97
- options:
98
- command: 'test "$recoveryChoice" = "retry"'
99
- - from: decide
100
- to: stop
101
- guard:
102
- kind: shell
103
- options:
104
- command: 'test "$recoveryChoice" = "stop"'
105
- # Declared defer edge: evidence mode wrote `deferred` and cleared the answer var.
106
- - from: decide
107
- to: humanGate
108
- guard:
109
- kind: shell
110
- options:
111
- command: 'test "$decisionStatus" = "deferred"'
112
- - from: retry
113
- to: humanGate
114
- guard: { kind: always }
115
- # Explicit yes / no / cancel branches on the default answer var, matching the stock gates.
116
- - from: humanGate
117
- to: published
118
- guard:
119
- kind: shell
120
- options:
121
- command: 'test "$__hitlAnswer" = "yes"'
122
- - from: humanGate
123
- to: stop
124
- guard:
125
- kind: shell
126
- options:
127
- command: 'test "$__hitlAnswer" = "no"'
128
- - from: humanGate
129
- to: cancelled
130
- guard:
131
- kind: shell
132
- options:
133
- command: 'test "$__hitlAnswer" = "cancel"'
134
- terminalStates: [published, stop, cancelled]