@gobing-ai/spur 0.3.41 → 0.3.43

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 (185) hide show
  1. package/.claude-plugin/marketplace.json +15 -0
  2. package/README.md +15 -1
  3. package/config/templates/AGENTS.md +5 -3
  4. package/config/workflows/task-pipeline.yaml +113 -12
  5. package/package.json +15 -12
  6. package/plugins/README.md +655 -0
  7. package/plugins/sp/README.md +621 -0
  8. package/plugins/sp/agents/expert-spur.md +109 -0
  9. package/plugins/sp/agents/super-coder.md +126 -0
  10. package/plugins/sp/agents/super-planner.md +283 -0
  11. package/plugins/sp/agents/super-reviewer.md +154 -0
  12. package/plugins/sp/commands/dev-arch.md +30 -0
  13. package/plugins/sp/commands/dev-brainstorm.md +40 -0
  14. package/plugins/sp/commands/dev-changelog.md +28 -0
  15. package/plugins/sp/commands/dev-daily.md +29 -0
  16. package/plugins/sp/commands/dev-debug.md +29 -0
  17. package/plugins/sp/commands/dev-dogfood.md +33 -0
  18. package/plugins/sp/commands/dev-featurechange.md +130 -0
  19. package/plugins/sp/commands/dev-find-conflict.md +51 -0
  20. package/plugins/sp/commands/dev-find-issue.md +76 -0
  21. package/plugins/sp/commands/dev-find-next.md +60 -0
  22. package/plugins/sp/commands/dev-fixall.md +33 -0
  23. package/plugins/sp/commands/dev-gitmsg.md +28 -0
  24. package/plugins/sp/commands/dev-gtd.md +97 -0
  25. package/plugins/sp/commands/dev-handover.md +26 -0
  26. package/plugins/sp/commands/dev-idea.md +50 -0
  27. package/plugins/sp/commands/dev-next.md +31 -0
  28. package/plugins/sp/commands/dev-parallel.md +30 -0
  29. package/plugins/sp/commands/dev-plan.md +46 -0
  30. package/plugins/sp/commands/dev-refine.md +48 -0
  31. package/plugins/sp/commands/dev-refineall.md +65 -0
  32. package/plugins/sp/commands/dev-refresh.md +32 -0
  33. package/plugins/sp/commands/dev-reverse.md +32 -0
  34. package/plugins/sp/commands/dev-review.md +31 -0
  35. package/plugins/sp/commands/dev-run.md +63 -0
  36. package/plugins/sp/commands/dev-runall.md +83 -0
  37. package/plugins/sp/commands/dev-simplify.md +39 -0
  38. package/plugins/sp/commands/dev-unit.md +29 -0
  39. package/plugins/sp/commands/dev-verify.md +48 -0
  40. package/plugins/sp/commands/dev-verifyall.md +72 -0
  41. package/plugins/sp/commands/dev-wrap.md +48 -0
  42. package/plugins/sp/commands/dev-wrapall.md +51 -0
  43. package/plugins/sp/commands/rule-add.md +18 -0
  44. package/plugins/sp/commands/rule-refine.md +18 -0
  45. package/plugins/sp/commands/rule-scan.md +18 -0
  46. package/plugins/sp/commands/spur-init.md +22 -0
  47. package/plugins/sp/commands/workflow-add.md +18 -0
  48. package/plugins/sp/commands/workflow-refine.md +18 -0
  49. package/plugins/sp/hooks/agent-hint.ts +60 -0
  50. package/plugins/sp/hooks/careful-guard.ts +147 -0
  51. package/plugins/sp/hooks/context-post-tool.ts +325 -0
  52. package/plugins/sp/hooks/context-session-start.ts +182 -0
  53. package/plugins/sp/hooks/context-session-stop.ts +95 -0
  54. package/plugins/sp/hooks/hooks.json +51 -0
  55. package/plugins/sp/hooks/pi/guard-extension.ts +341 -0
  56. package/plugins/sp/hooks/task-write-guard.ts +84 -0
  57. package/plugins/sp/plugin.json +8 -0
  58. package/plugins/sp/scripts/batch-preflight.ts +204 -0
  59. package/plugins/sp/scripts/daily-summary/daily-summary.ts +606 -0
  60. package/plugins/sp/scripts/daily-summary/logger.ts +28 -0
  61. package/plugins/sp/scripts/dogfood-testing/detect-pipeline-driving.ts +363 -0
  62. package/plugins/sp/scripts/dogfood-testing/validate-report.ts +168 -0
  63. package/plugins/sp/scripts/feature-sync-bounded.ts +451 -0
  64. package/plugins/sp/scripts/stage-registry-adapter.ts +1341 -0
  65. package/plugins/sp/scripts/task-size-precheck.ts +202 -0
  66. package/plugins/sp/scripts/validate-commands.ts +651 -0
  67. package/plugins/sp/scripts/validate-flag-contracts.ts +875 -0
  68. package/plugins/sp/skills/brainstorm/SKILL.md +361 -0
  69. package/plugins/sp/skills/brainstorm/agents/openai.yaml +14 -0
  70. package/plugins/sp/skills/brainstorm/examples/ideation-example.md +209 -0
  71. package/plugins/sp/skills/brainstorm/metadata.openclaw +7 -0
  72. package/plugins/sp/skills/brainstorm/references/grilling-interview.md +68 -0
  73. package/plugins/sp/skills/brainstorm/references/workflows.md +255 -0
  74. package/plugins/sp/skills/branch-workflow/SKILL.md +109 -0
  75. package/plugins/sp/skills/branch-workflow/references/branch-lifecycle.md +69 -0
  76. package/plugins/sp/skills/branch-workflow/references/worktree-patterns.md +100 -0
  77. package/plugins/sp/skills/code-implementation/SKILL.md +203 -0
  78. package/plugins/sp/skills/code-implementation/references/debugging.md +64 -0
  79. package/plugins/sp/skills/code-implementation/references/implementation-patterns.md +113 -0
  80. package/plugins/sp/skills/code-improvement/SKILL.md +231 -0
  81. package/plugins/sp/skills/code-improvement/references/deepening-signals.md +205 -0
  82. package/plugins/sp/skills/code-review/SKILL.md +112 -0
  83. package/plugins/sp/skills/code-review/references/receiving-code-review.md +70 -0
  84. package/plugins/sp/skills/code-review/references/review-lenses.md +117 -0
  85. package/plugins/sp/skills/code-review/references/self-review-checklist.md +53 -0
  86. package/plugins/sp/skills/code-review/references/verification-before-completion.md +68 -0
  87. package/plugins/sp/skills/code-simplification/SKILL.md +225 -0
  88. package/plugins/sp/skills/code-testing/SKILL.md +108 -0
  89. package/plugins/sp/skills/code-testing/references/stacks/bun-ts.md +165 -0
  90. package/plugins/sp/skills/code-testing/references/stacks/go.md +88 -0
  91. package/plugins/sp/skills/code-testing/references/stacks/python.md +117 -0
  92. package/plugins/sp/skills/code-testing/references/test-loop-breaker.md +37 -0
  93. package/plugins/sp/skills/code-testing/references/test-output-discipline.md +52 -0
  94. package/plugins/sp/skills/code-testing/references/unit-testing.md +212 -0
  95. package/plugins/sp/skills/code-verification/SKILL.md +535 -0
  96. package/plugins/sp/skills/code-verification/references/code-improvement.md +39 -0
  97. package/plugins/sp/skills/code-verification/references/secu-review.md +94 -0
  98. package/plugins/sp/skills/code-verification/references/verdict-schema.md +141 -0
  99. package/plugins/sp/skills/conflict-finding/SKILL.md +254 -0
  100. package/plugins/sp/skills/conflict-finding/references/authority-resolution.md +258 -0
  101. package/plugins/sp/skills/conflict-finding/references/comparison-protocol.md +277 -0
  102. package/plugins/sp/skills/conflict-finding/references/finding-contract.md +346 -0
  103. package/plugins/sp/skills/conflict-finding/references/remediation-routing.md +276 -0
  104. package/plugins/sp/skills/daily-summary/SKILL.md +171 -0
  105. package/plugins/sp/skills/daily-summary/agents/openai.yaml +13 -0
  106. package/plugins/sp/skills/doc-evolve/SKILL.md +175 -0
  107. package/plugins/sp/skills/doc-evolve/references/operations.md +93 -0
  108. package/plugins/sp/skills/dogfood-testing/SKILL.md +608 -0
  109. package/plugins/sp/skills/dogfood-testing/references/monitor-ledger.md +211 -0
  110. package/plugins/sp/skills/dogfood-testing/references/report-template.md +351 -0
  111. package/plugins/sp/skills/doubt-driven-development/SKILL.md +136 -0
  112. package/plugins/sp/skills/functional-review/SKILL.md +364 -0
  113. package/plugins/sp/skills/functional-review/references/verdict-schema.md +133 -0
  114. package/plugins/sp/skills/indexed-context/SKILL.md +164 -0
  115. package/plugins/sp/skills/issue-finding/SKILL.md +442 -0
  116. package/plugins/sp/skills/issue-finding/agents/openai.yaml +15 -0
  117. package/plugins/sp/skills/issue-finding/examples/expected-findings.json +27 -0
  118. package/plugins/sp/skills/issue-finding/examples/session-test-loop.jsonl +23 -0
  119. package/plugins/sp/skills/issue-finding/references/session-formats.md +151 -0
  120. package/plugins/sp/skills/next-feature/SKILL.md +125 -0
  121. package/plugins/sp/skills/next-feature/references/handoff-routing.md +92 -0
  122. package/plugins/sp/skills/next-feature/references/proposal-contract.md +49 -0
  123. package/plugins/sp/skills/next-feature/references/ranking-rubric.md +52 -0
  124. package/plugins/sp/skills/next-feature/references/signal-derivation.md +67 -0
  125. package/plugins/sp/skills/next-router/SKILL.md +181 -0
  126. package/plugins/sp/skills/next-router/references/messages.md +90 -0
  127. package/plugins/sp/skills/next-router/references/routing-table.md +216 -0
  128. package/plugins/sp/skills/parallel-execution/SKILL.md +148 -0
  129. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +109 -0
  130. package/plugins/sp/skills/parallel-execution/references/fan-out-patterns.md +101 -0
  131. package/plugins/sp/skills/parallel-execution/references/result-synthesis.md +94 -0
  132. package/plugins/sp/skills/reverse-engineering/SKILL.md +375 -0
  133. package/plugins/sp/skills/reverse-engineering/agents/openai.yaml +18 -0
  134. package/plugins/sp/skills/source-driven-development/SKILL.md +124 -0
  135. package/plugins/sp/skills/spec-decomposition/SKILL.md +117 -0
  136. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +539 -0
  137. package/plugins/sp/skills/spur-cli/SKILL.md +133 -0
  138. package/plugins/sp/skills/spur-cli/references/agent.md +179 -0
  139. package/plugins/sp/skills/spur-cli/references/features/acceptance-criteria.md +82 -0
  140. package/plugins/sp/skills/spur-cli/references/features/hierarchy-mece.md +177 -0
  141. package/plugins/sp/skills/spur-cli/references/features/roadmap-priority.md +84 -0
  142. package/plugins/sp/skills/spur-cli/references/features/verbs.md +122 -0
  143. package/plugins/sp/skills/spur-cli/references/features.md +234 -0
  144. package/plugins/sp/skills/spur-cli/references/init.md +119 -0
  145. package/plugins/sp/skills/spur-cli/references/message.md +98 -0
  146. package/plugins/sp/skills/spur-cli/references/rules/authoring-rules.md +212 -0
  147. package/plugins/sp/skills/spur-cli/references/rules/fine-tuning.md +148 -0
  148. package/plugins/sp/skills/spur-cli/references/rules/operations.md +228 -0
  149. package/plugins/sp/skills/spur-cli/references/rules/validation-and-extension.md +129 -0
  150. package/plugins/sp/skills/spur-cli/references/rules.md +209 -0
  151. package/plugins/sp/skills/spur-cli/references/serve.md +58 -0
  152. package/plugins/sp/skills/spur-cli/references/tasks/l3-guard-cheatsheet.md +98 -0
  153. package/plugins/sp/skills/spur-cli/references/tasks/section-editing.md +95 -0
  154. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +361 -0
  155. package/plugins/sp/skills/spur-cli/references/tasks.md +280 -0
  156. package/plugins/sp/skills/spur-cli/references/team.md +133 -0
  157. package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +226 -0
  158. package/plugins/sp/skills/spur-cli/references/workflows/operations.md +211 -0
  159. package/plugins/sp/skills/spur-cli/references/workflows/validation-and-extension.md +129 -0
  160. package/plugins/sp/skills/spur-cli/references/workflows.md +355 -0
  161. package/plugins/sp/skills/spur-dev/SKILL.md +224 -0
  162. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +196 -0
  163. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +680 -0
  164. package/plugins/sp/skills/spur-dev/references/decision-brief.md +80 -0
  165. package/plugins/sp/skills/spur-dev/references/dev-operations.md +546 -0
  166. package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +164 -0
  167. package/plugins/sp/skills/spur-dev/references/execution-batch.md +790 -0
  168. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +352 -0
  169. package/plugins/sp/skills/spur-dev/references/feature-link-helper.md +191 -0
  170. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +417 -0
  171. package/plugins/sp/skills/spur-dev/references/gate-checklists.md +171 -0
  172. package/plugins/sp/skills/spur-dev/references/glossary.md +95 -0
  173. package/plugins/sp/skills/spur-dev/references/idea-evaluation.md +80 -0
  174. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +120 -0
  175. package/plugins/sp/skills/spur-dev/references/planning-workflow.md +302 -0
  176. package/plugins/sp/skills/spur-dev/references/product-planning.md +206 -0
  177. package/plugins/sp/skills/spur-dev/references/section-batching.md +24 -0
  178. package/plugins/sp/skills/sys-architecture/SKILL.md +155 -0
  179. package/plugins/sp/skills/sys-architecture/references/decision-method.md +137 -0
  180. package/plugins/sp/skills/sys-architecture/references/upkeep-survey.md +75 -0
  181. package/plugins/sp/skills/sys-debugging/SKILL.md +228 -0
  182. package/plugins/sp/skills/sys-debugging/references/debugging-protocol.md +62 -0
  183. package/plugins/sp/skills/test-driven-development/SKILL.md +248 -0
  184. package/plugins/sp/skills/wayfinder/SKILL.md +292 -0
  185. package/spur.js +6035 -4963
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "spur",
3
+ "owner": {
4
+ "name": "Robin Min",
5
+ "email": "minlongbing@gmail.com"
6
+ },
7
+ "plugins": [
8
+ {
9
+ "version": "0.3.43",
10
+ "name": "sp",
11
+ "source": "./plugins/sp",
12
+ "description": "Spur - my harness toolkits"
13
+ }
14
+ ]
15
+ }
package/README.md CHANGED
@@ -23,6 +23,20 @@ spur --help
23
23
  bunx @gobing-ai/spur --help
24
24
  ```
25
25
 
26
+ #### Install the `sp` plugin to your coding agents
27
+
28
+ The npm package ships the `sp` plugin and its marketplace manifest alongside the CLI. Install it
29
+ into your supported coding agents without cloning this repository:
30
+
31
+ ```bash
32
+ # point superskill at the installed @gobing-ai/spur package root
33
+ superskill install sp --marketplace $(npm root -g)/@gobing-ai/spur
34
+ ```
35
+
36
+ (With Bun: `bun install -g @gobing-ai/spur`; the package root is `$(npm root -g)/@gobing-ai/spur`
37
+ or `$(bun pm bin -g)/../lib/node_modules/@gobing-ai/spur`.) This registers the marketplace and
38
+ installs the `sp` plugin to Claude Code, Codex, Gemini CLI, pi, omp, OpenCode, Antigravity, etc.
39
+
26
40
  ### If you don't have Bun — standalone binary
27
41
 
28
42
  A self-contained executable (Bun embedded) for macOS and Linux. No runtime to install.
@@ -50,7 +64,7 @@ Windows: use the Bun path under WSL.
50
64
  The published tarball is a self-contained Bun bundle plus static assets:
51
65
 
52
66
  | Path | Purpose |
53
- |------|---------|
67
+ | ------ | --------- |
54
68
  | `spur.js` | CLI entry (`bin.spur`) |
55
69
  | `config/` | Default rules, workflows, tasks, templates, plugins (ADR-015 SSOT) |
56
70
  | `web/` | Spur Board SPA served by `spur serve` |
@@ -36,7 +36,7 @@ All product development work goes through the harness by default.
36
36
  | ------ | ---------- | -------- |
37
37
  | Plan a feature (intake → AC → tasks) | `/sp:dev-plan`, `/sp:dev-idea` | Freeform feature files without gates |
38
38
  | Drive one task end-to-end | `/sp:dev-run <wbs>` or **`sp:super-planner`** | Implement with no task / no pipeline |
39
- | Batch or parallel task runs | `/sp:dev-runall`, `/sp:dev-parallel` **`sp:super-planner`** | Unordered multi-task thrash |
39
+ | Batch or parallel task runs | `/sp:dev-runall` (host sequential; **`sp:super-planner`** explicit/parallel), `/sp:dev-parallel` | Unordered multi-task thrash |
40
40
  | Batch-refine tasks under a feature | `/sp:dev-refineall --feature <id> --auto` | Hand-looping `/sp:dev-refine` per WBS |
41
41
  | Multi-step corpus CLI (tasks/features/rules/workflows) | **`sp:expert-spur`** | Raw Write/Edit on corpus files |
42
42
  | Look up `spur` verbs / flags / `--json` | Skill **`sp:spur-cli`** | Inventing flags from memory |
@@ -64,8 +64,10 @@ All product development work goes through the harness by default.
64
64
  5. **Keep tool ownership explicit** — project lifecycle/corpus/gates → Spur; plugin installation and
65
65
  capability lifecycle → Superskill. Do not hand-maintain per-platform adapters Superskill generates.
66
66
  6. **Run dev skills inline by default** — direct model-bearing `/sp:dev-*` commands execute in the
67
- current coding-agent session. `--subprocess` or a named dispatch-surface trigger uses
68
- `spur agent run`; direct `spur agent run` and workflow `agent.run` remain subprocess surfaces.
67
+ current coding-agent session. Interactive `/sp:dev-run --mode full` and sequential
68
+ `/sp:dev-runall` with omit/`--agent inline` interpret `task-pipeline.yaml` in-session; `--agent
69
+ auto`, a name, parallel/headless execution, direct `spur agent run`, and engine-driven workflow
70
+ `agent.run` remain subprocess surfaces.
69
71
 
70
72
  **Platform fallback:** Platforms without slash commands and/or subagents still use the harness.
71
73
  Install the plugin through Superskill for the target platform, then use skills `sp:spur-dev`,
@@ -131,11 +131,29 @@ states:
131
131
  # semantics are deliberately untouched; the gate lives here.
132
132
  # R4 (0487): one divergence line when the two executors differ (legitimate
133
133
  # when only implementAgent is pinned, but it must be visible in the log).
134
+ # R2 (0503): omp/pi env-key probe misses are soft because the CLI process
135
+ # cannot see relay-owned credentials; explicit non-omp auth failures remain hard.
134
136
  - kind: shell
135
137
  options:
136
138
  command: >-
137
139
  mkdir -p .spur/run &&
138
140
  DOCTOR_FILE=".spur/run/$wbs-precheck-doctor.status" &&
141
+ classifyDoctorProbe() {
142
+ PROBE_DETAIL="$1";
143
+ PROBE_AGENT="$2";
144
+ case "$PROBE_AGENT" in
145
+ omp|omp-*|pi|pi-*)
146
+ if printf '%s' "$PROBE_DETAIL" | grep -Eiq 'API key not found for provider|no probe registered'; then
147
+ printf 'env-miss\n';
148
+ return;
149
+ fi;;
150
+ esac;
151
+ if printf '%s' "$PROBE_DETAIL" | grep -Eiq 'invalid (API )?key|unauthori[sz]ed|forbidden|authentication failed|credential(s)? rejected'; then
152
+ printf 'auth-fail\n';
153
+ else
154
+ printf 'unknown\n';
155
+ fi;
156
+ } &&
139
157
  STATUS=PASS;
140
158
  if [ -n "$implementAgent" ] && [ "$implementAgent" != "$agent" ]; then
141
159
  echo "precheck: agent=$agent implementAgent=$implementAgent (executors diverge)";
@@ -152,10 +170,16 @@ states:
152
170
  };
153
171
  AUTH=$(printf '%s' "$OUT" | jq -r '.agents[0].authenticated // "unknown"' 2>/dev/null || echo unknown);
154
172
  DETAIL=$(printf '%s' "$OUT" | jq -r '.agents[0].modelStatus.detail // ""' 2>/dev/null || echo "");
155
- echo "precheck: $EXE auth=$AUTH $DETAIL";
173
+ PROBE=$(classifyDoctorProbe "$DETAIL" "$EXE");
174
+ echo "precheck: $EXE auth=$AUTH probe=$PROBE $DETAIL";
156
175
  if [ "$AUTH" = unauthenticated ]; then
157
- echo "precheck: FAIL - executor $EXE is unauthenticated; $DETAIL";
158
- STATUS=FAIL;
176
+ case "$EXE:$PROBE" in
177
+ omp*:env-miss|pi*:env-miss|omp*:unknown|pi*:unknown)
178
+ echo "precheck: SOFT - executor $EXE auth probe cannot see agent-owned credentials";;
179
+ *)
180
+ echo "precheck: FAIL - executor $EXE is unauthenticated; fix agent.default or pass --vars '{\"agent\":\"<authenticated-executor>\"}' ($spurBin agent doctor $EXE --json); $DETAIL";
181
+ STATUS=FAIL;;
182
+ esac;
159
183
  fi;
160
184
  done;
161
185
  echo "$STATUS" > "$DOCTOR_FILE";
@@ -164,6 +188,11 @@ states:
164
188
  # a tree already dirty with another task's implementation is how 0485's diff
165
189
  # got swept into 0486's run. Corpus dirs are excluded: the pipeline writes
166
190
  # those itself.
191
+ # R1 (0511): task-corpus dirt gets its own advisory NOTE — docs/tasks* is
192
+ # excluded from the non-corpus warning, so pre-existing task-corpus edits are
193
+ # invisible at launch yet can be accidentally staged with the current task
194
+ # later. Advisory only (never a block): the pipeline legitimately updates
195
+ # task files, so corpus dirt is launch-time visibility, not a lifecycle guard.
167
196
  - kind: shell
168
197
  options:
169
198
  command: >-
@@ -172,6 +201,11 @@ states:
172
201
  echo "precheck: WARNING - working tree has uncommitted non-corpus changes; commit or stash before starting a new task:";
173
202
  echo "$DIRTY";
174
203
  fi;
204
+ CORPUS_DIRTY=$(git status --porcelain -- ':(glob)docs/tasks*/**' 2>/dev/null);
205
+ if [ -n "$CORPUS_DIRTY" ]; then
206
+ echo "precheck: NOTE - task corpus has uncommitted changes; review before staging with this task:";
207
+ echo "$CORPUS_DIRTY";
208
+ fi;
175
209
  exit 0
176
210
  - kind: note
177
211
  options:
@@ -238,7 +272,21 @@ states:
238
272
  requireDiff: true
239
273
  - kind: shell
240
274
  options:
241
- command: "$spurBin task update $wbs wip --no-lifecycle"
275
+ command: >-
276
+ retry_transient() {
277
+ RETRY_OUTPUT=$("$@" 2>&1); RETRY_RC=$?;
278
+ printf '%s\n' "$RETRY_OUTPUT";
279
+ if [ "$RETRY_RC" -eq 0 ]; then return 0; fi;
280
+ if ! printf '%s' "$RETRY_OUTPUT" | grep -Eq 'ENOENT|EBUSY|ENOTEMPTY|database is locked'; then return "$RETRY_RC"; fi;
281
+ sleep 2;
282
+ RETRY_SECOND_OUTPUT=$("$@" 2>&1); RETRY_RC=$?;
283
+ printf '%s\n' "$RETRY_SECOND_OUTPUT";
284
+ if [ "$RETRY_RC" -ne 0 ] && printf '%s\n%s' "$RETRY_OUTPUT" "$RETRY_SECOND_OUTPUT" | grep -Eq 'ENOENT|EBUSY|ENOTEMPTY'; then
285
+ echo "node_modules link/dependency broken — run bun install and retry";
286
+ fi;
287
+ return "$RETRY_RC";
288
+ };
289
+ retry_transient $spurBin task update "$wbs" wip --no-lifecycle
242
290
  # Post-implement cleanup: auto-format any unformatted output the agent produced.
243
291
  # The agent may leave files that don't pass `biome check`, which then fails
244
292
  # `bun run lint` downstream. Running format here is cheap (< 1 s) and prevents
@@ -265,7 +313,8 @@ states:
265
313
  # test-recheck — soft recheck → review | test-fix | failed (never silent lifecycle abort)
266
314
  - id: test
267
315
  description: >
268
- Soft quality-gate probe (single full gate on the green path). Runs
316
+ Soft quality-gate probe (single logical gate on the green path; bounded retries only
317
+ for SQLite lock contention). Runs
269
318
  `${vars.qualityGateCmd}`, records PASS|FAIL under
270
319
  `.spur/run/<wbs>-test-gate.status`, resets the fix attempt counter, always exit 0.
271
320
  onEnter:
@@ -277,8 +326,20 @@ states:
277
326
  LOG_FILE=".spur/run/$wbs-test-gate.log" &&
278
327
  ATTEMPT_FILE=".spur/run/$wbs-test-fix-attempt" &&
279
328
  echo 0 > "$ATTEMPT_FILE" &&
280
- set +e &&
281
- ( sh -c "$qualityGateCmd" ) > "$LOG_FILE" 2>&1; gate_rc=$?; set -e &&
329
+ : > "$LOG_FILE" &&
330
+ gate_attempt=1;
331
+ while [ "$gate_attempt" -le 5 ]; do
332
+ ATTEMPT_LOG="$LOG_FILE.attempt-$gate_attempt";
333
+ sh -c "$qualityGateCmd" > "$ATTEMPT_LOG" 2>&1; gate_rc=$?;
334
+ gate_locked=0;
335
+ grep -q 'SQLiteError: database is locked' "$ATTEMPT_LOG" && gate_locked=1;
336
+ cat "$ATTEMPT_LOG" >> "$LOG_FILE";
337
+ rm -f "$ATTEMPT_LOG";
338
+ if [ "$gate_rc" -eq 0 ] || [ "$gate_locked" -ne 1 ] || [ "$gate_attempt" -ge 5 ]; then break; fi;
339
+ printf 'quality gate: database is locked; retrying (%s/5) in 10s\n' "$gate_attempt" | tee -a "$LOG_FILE";
340
+ sleep 10;
341
+ gate_attempt=$((gate_attempt + 1));
342
+ done &&
282
343
  cat "$LOG_FILE" &&
283
344
  FINDINGS_FILE=".spur/run/$wbs-test-gate.findings" &&
284
345
  set +e; grep -oE '[A-Za-z0-9_./-]+\.[A-Za-z]+:[0-9]+' "$LOG_FILE" | sort -u | head -20 | tr '\n' ' ' > "$FINDINGS_FILE"; set -e &&
@@ -319,7 +380,7 @@ states:
319
380
 
320
381
  - id: test-recheck
321
382
  description: >
322
- Soft recheck after fixall. Writes PASS|FAIL (always exit 0). Transitions
383
+ Soft recheck after fixall with bounded SQLite-lock retry. Writes PASS|FAIL (always exit 0). Transitions
323
384
  branch to review (PASS), another test-fix (FAIL and under max attempts),
324
385
  or the pipeline `failed` state (FAIL and attempts exhausted) — never a
325
386
  raw lifecycle abort that skips the terminal `failed` state.
@@ -330,8 +391,20 @@ states:
330
391
  mkdir -p .spur/run &&
331
392
  STATUS_FILE=".spur/run/$wbs-test-gate.status" &&
332
393
  LOG_FILE=".spur/run/$wbs-test-gate.log" &&
333
- set +e &&
334
- ( sh -c "$qualityGateCmd" ) > "$LOG_FILE" 2>&1; gate_rc=$?; set -e &&
394
+ : > "$LOG_FILE" &&
395
+ gate_attempt=1;
396
+ while [ "$gate_attempt" -le 5 ]; do
397
+ ATTEMPT_LOG="$LOG_FILE.attempt-$gate_attempt";
398
+ sh -c "$qualityGateCmd" > "$ATTEMPT_LOG" 2>&1; gate_rc=$?;
399
+ gate_locked=0;
400
+ grep -q 'SQLiteError: database is locked' "$ATTEMPT_LOG" && gate_locked=1;
401
+ cat "$ATTEMPT_LOG" >> "$LOG_FILE";
402
+ rm -f "$ATTEMPT_LOG";
403
+ if [ "$gate_rc" -eq 0 ] || [ "$gate_locked" -ne 1 ] || [ "$gate_attempt" -ge 5 ]; then break; fi;
404
+ printf 'quality gate: database is locked; retrying (%s/5) in 10s\n' "$gate_attempt" | tee -a "$LOG_FILE";
405
+ sleep 10;
406
+ gate_attempt=$((gate_attempt + 1));
407
+ done &&
335
408
  cat "$LOG_FILE" &&
336
409
  FINDINGS_FILE=".spur/run/$wbs-test-gate.findings" &&
337
410
  set +e; grep -oE '[A-Za-z0-9_./-]+\.[A-Za-z]+:[0-9]+' "$LOG_FILE" | sort -u | head -20 | tr '\n' ' ' > "$FINDINGS_FILE"; set -e &&
@@ -396,7 +469,21 @@ states:
396
469
  onEnter:
397
470
  - kind: shell
398
471
  options:
399
- command: "$spurBin task record $wbs --solution-from-diff --transition testing"
472
+ command: >-
473
+ retry_transient() {
474
+ RETRY_OUTPUT=$("$@" 2>&1); RETRY_RC=$?;
475
+ printf '%s\n' "$RETRY_OUTPUT";
476
+ if [ "$RETRY_RC" -eq 0 ]; then return 0; fi;
477
+ if ! printf '%s' "$RETRY_OUTPUT" | grep -Eq 'ENOENT|EBUSY|ENOTEMPTY|database is locked'; then return "$RETRY_RC"; fi;
478
+ sleep 2;
479
+ RETRY_SECOND_OUTPUT=$("$@" 2>&1); RETRY_RC=$?;
480
+ printf '%s\n' "$RETRY_SECOND_OUTPUT";
481
+ if [ "$RETRY_RC" -ne 0 ] && printf '%s\n%s' "$RETRY_OUTPUT" "$RETRY_SECOND_OUTPUT" | grep -Eq 'ENOENT|EBUSY|ENOTEMPTY'; then
482
+ echo "node_modules link/dependency broken — run bun install and retry";
483
+ fi;
484
+ return "$RETRY_RC";
485
+ };
486
+ retry_transient $spurBin task record "$wbs" --solution-from-diff --transition testing
400
487
  # Best-effort, and portable across layouts. `feature-sync-bounded.ts` is a
401
488
  # Spur-monorepo path — `spur init` never scaffolds `plugins/sp/`, so a seeded
402
489
  # project must fall back to the plain `spur feature sync` verb rather than
@@ -427,7 +514,21 @@ states:
427
514
  onEnter:
428
515
  - kind: shell
429
516
  options:
430
- command: "$spurBin task update $wbs done --no-lifecycle"
517
+ command: >-
518
+ retry_transient() {
519
+ RETRY_OUTPUT=$("$@" 2>&1); RETRY_RC=$?;
520
+ printf '%s\n' "$RETRY_OUTPUT";
521
+ if [ "$RETRY_RC" -eq 0 ]; then return 0; fi;
522
+ if ! printf '%s' "$RETRY_OUTPUT" | grep -Eq 'ENOENT|EBUSY|ENOTEMPTY|database is locked'; then return "$RETRY_RC"; fi;
523
+ sleep 2;
524
+ RETRY_SECOND_OUTPUT=$("$@" 2>&1); RETRY_RC=$?;
525
+ printf '%s\n' "$RETRY_SECOND_OUTPUT";
526
+ if [ "$RETRY_RC" -ne 0 ] && printf '%s\n%s' "$RETRY_OUTPUT" "$RETRY_SECOND_OUTPUT" | grep -Eq 'ENOENT|EBUSY|ENOTEMPTY'; then
527
+ echo "node_modules link/dependency broken — run bun install and retry";
528
+ fi;
529
+ return "$RETRY_RC";
530
+ };
531
+ retry_transient $spurBin task update "$wbs" done --no-lifecycle
431
532
  - kind: note
432
533
  options:
433
534
  message: "Pipeline complete for task ${vars.wbs} (done gate cleared)."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobing-ai/spur",
3
- "version": "0.3.41",
3
+ "version": "0.3.43",
4
4
  "description": "Spur CLI — local-first harness for mainstream coding agents: constraint checking, workflow orchestration, agent health, and history analytics. Bun-native; exposes the `spur` command.",
5
5
  "keywords": [
6
6
  "spur",
@@ -31,7 +31,9 @@
31
31
  "config",
32
32
  "schemas",
33
33
  "web",
34
- "README.md"
34
+ "README.md",
35
+ "plugins/",
36
+ ".claude-plugin/"
35
37
  ],
36
38
  "engines": {
37
39
  "bun": ">=1.3.0"
@@ -43,21 +45,22 @@
43
45
  "dev": "bun run src/index.ts",
44
46
  "build": "bun run ../../scripts/spur-dev.ts build-cli",
45
47
  "build:binaries": "bun run ../../scripts/spur-dev.ts build-binaries",
46
- "build:bundle": "bun run ../../scripts/spur-dev.ts bundle-web && bun build src/index.ts --target=bun --outfile spur.js && bun run ../../scripts/spur-dev.ts bundle-config config",
48
+ "build:bundle": "bun run ../../scripts/spur-dev.ts bundle-web && bun build src/index.ts --target=bun --outfile spur.js && bun run ../../scripts/spur-dev.ts bundle-config config && bun run ../../scripts/spur-dev.ts bundle-plugins",
47
49
  "test": "bun test tests --coverage --coverage-dir=../../.coverage --pass-with-no-tests",
48
50
  "typecheck": "tsc --noEmit",
49
- "prepublishOnly": "bun run build:bundle"
51
+ "prepack": "bun run build:bundle",
52
+ "prepublishOnly": "bun run ../../scripts/spur-dev.ts check-marketplace-version"
50
53
  },
51
54
  "devDependencies": {
52
55
  "@commander-js/extra-typings": "^14.0.0",
53
- "@gobing-ai/ts-db": "^0.4.23",
54
- "@gobing-ai/ts-ai-runner": "^0.4.23",
55
- "@gobing-ai/ts-dual-workflow-engine": "^0.4.23",
56
- "@gobing-ai/ts-infra": "^0.4.23",
57
- "@gobing-ai/ts-llm-jsonl-importer": "^0.4.23",
58
- "@gobing-ai/ts-rule-engine": "^0.4.23",
59
- "@gobing-ai/ts-runtime": "^0.4.23",
60
- "@gobing-ai/ts-utils": "^0.4.23",
56
+ "@gobing-ai/ts-db": "^0.4.27",
57
+ "@gobing-ai/ts-ai-runner": "^0.4.27",
58
+ "@gobing-ai/ts-dual-workflow-engine": "^0.4.27",
59
+ "@gobing-ai/ts-infra": "^0.4.27",
60
+ "@gobing-ai/ts-llm-jsonl-importer": "^0.4.27",
61
+ "@gobing-ai/ts-rule-engine": "^0.4.27",
62
+ "@gobing-ai/ts-runtime": "^0.4.27",
63
+ "@gobing-ai/ts-utils": "^0.4.27",
61
64
  "@types/bun": "1.3.14",
62
65
  "@types/figlet": "^1.7.0",
63
66
  "@types/node-notifier": "8.0.5",