@gobing-ai/spur 0.2.12 → 0.3.0

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.
@@ -14,7 +14,8 @@
14
14
  # (task-resolve with empty list short-circuits to `skipped`).
15
15
  #
16
16
  # Vars (passed as a JSON object via `--vars`):
17
- # tasks — JSON array of WBS strings (required), e.g. --vars '{"tasks":["0167"]}'
17
+ # tasks — JSON array of WBS strings, passed as a JSON-encoded STRING value (the CLI
18
+ # rejects non-string --vars values), e.g. --vars '{"tasks":"[\"0167\"]"}'
18
19
  # feature — feature id to advance through legal lifecycle edges (optional)
19
20
  # profile — set --vars '{"profile":"auto"}' to skip objective confirmations
20
21
  # merge — set --vars '{"merge":"true"}' to run branch cleanup (irreversible HITL)
@@ -76,42 +77,56 @@ states:
76
77
 
77
78
  - id: learning-capture
78
79
  description: >
79
- Append working learnings to .spur/memory/learnings.md. The agent extracts insights
80
- from the batch conventions discovered, errors hit and resolved, patterns that
81
- worked, gotchas for future tasks. Grouped by date and task WBS. Working scratchpad,
82
- not a CLI-gated corpus artifact.
80
+ Append working learnings to .spur/memory/learnings.md. The agent extracts
81
+ insights from the batch and writes them to a capture file; a downstream shell
82
+ step appends that file to the learnings scratchpad. This decouples content
83
+ generation from file persistence: the shell step's exit code is the real
84
+ success signal, and the capture file is verified before the append.
83
85
  onEnter:
84
86
  - kind: agent.run
85
87
  options:
86
88
  agent: ${vars.agent}
87
- input: "Extract working learnings from tasks ${vars.tasks}. Append to .spur/memory/learnings.md grouped by date and task WBS. Include: conventions discovered, errors hit and resolved, patterns that worked, gotchas. This is a working scratchpad, not a validated corpus."
89
+ input: "Extract working learnings from tasks ${vars.tasks}. Output as markdown grouped by date and task WBS. Include: conventions discovered, errors hit and resolved, patterns that worked, gotchas. Output raw markdown (no code fences) — your answer will be captured to a file and appended to .spur/memory/learnings.md."
90
+ answerFile: .spur/run/wrapup-learnings.md
91
+ expectFile: .spur/run/wrapup-learnings.md
88
92
  timeoutMs: ${vars.stepTimeoutMs}
93
+ - kind: shell
94
+ options:
95
+ command: 'test -s .spur/run/wrapup-learnings.md && mkdir -p .spur/memory && cat .spur/run/wrapup-learnings.md >> .spur/memory/learnings.md && printf "\n" >> .spur/memory/learnings.md'
89
96
 
90
97
  - id: metrics-record
91
98
  description: >
92
- Append one JSONL row per task to .spur/memory/wrapup-metrics.jsonl. Each row
93
- records: task WBS, feature id, status, verdict, timestamp. Append-only and
94
- machine-readable.
99
+ Append one JSONL row per task to .spur/memory/wrapup-metrics.jsonl. The agent
100
+ produces the JSONL content to a capture file; a downstream shell step appends
101
+ it. Each row records: task WBS, feature id, status, verdict, timestamp.
102
+ Append-only and machine-readable. The capture+shell decoupling means a
103
+ non-empty capture file is verified before the append (the agent.run exit-0
104
+ is no longer the sole success signal — the shell step's exit code gates the
105
+ write).
95
106
  onEnter:
96
107
  - kind: agent.run
97
108
  options:
98
109
  agent: ${vars.agent}
99
- input: "For each task in ${vars.tasks}, read the task file and append one JSONL row to .spur/memory/wrapup-metrics.jsonl with fields: wbs, feature_id, status, verdict (from .spur/run/<wbs>-verdict.json if available), timestamp. Append-only; do not overwrite existing rows."
110
+ input: "For each task in ${vars.tasks}, read the task file and output one JSONL line per task with fields: wbs, feature_id, status, verdict (from .spur/run/<wbs>-verdict.json if available), timestamp. Output raw JSONL (no code fences) — your answer will be captured to a file and appended to .spur/memory/wrapup-metrics.jsonl."
111
+ answerFile: .spur/run/wrapup-metrics.jsonl
112
+ expectFile: .spur/run/wrapup-metrics.jsonl
100
113
  timeoutMs: ${vars.stepTimeoutMs}
114
+ - kind: shell
115
+ options:
116
+ command: 'test -s .spur/run/wrapup-metrics.jsonl && mkdir -p .spur/memory && cat .spur/run/wrapup-metrics.jsonl >> .spur/memory/wrapup-metrics.jsonl'
101
117
 
102
118
  - id: feature-transition
103
119
  description: >
104
- If vars.feature is set, advance the feature through legal lifecycle edges only
105
- via spur feature update. Never attempt backlog|active -> done directly. The
106
- legal path: backlog -> active (always), active -> verifying (feature check
107
- guard), verifying -> done (strict feature check guard). Task statuses are NOT
108
- mutated. The agent checks current status and advances idempotently.
120
+ If vars.feature is set, advance the feature through the legal forward path of
121
+ the feature-lifecycle FSM via `spur feature advance` (task 0180 F9c / ADR-029).
122
+ The verb walks backlog active verifying done idempotently, verifying the
123
+ observed status after every hop, and returns a per-hop trail. Replaces the prior
124
+ ~20-line inline shell ladder; the verb now owns the multi-hop walk + legal-edge
125
+ enforcement. Task statuses are NOT mutated.
109
126
  onEnter:
110
- - kind: agent.run
127
+ - kind: shell
111
128
  options:
112
- agent: ${vars.agent}
113
- input: "Advance feature ${vars.feature} through legal lifecycle edges using spur feature update. Check current status with 'spur feature show ${vars.feature} --json'. If backlog, transition to active. If active, run 'spur feature check ${vars.feature}' then transition to verifying. If verifying, run 'spur feature check ${vars.feature} --strict' then transition to done. Never skip edges (no backlog->done directly). Report transitions made."
114
- timeoutMs: ${vars.stepTimeoutMs}
129
+ command: '${vars.spurBin} feature advance ${vars.feature} --json'
115
130
 
116
131
  - id: branch-cleanup
117
132
  description: >