@gobing-ai/spur 0.3.99 → 0.4.1
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/config/config.global.yaml +17 -0
- package/config/decisions/gates.yaml +36 -0
- package/config/decisions/history-anatomy.yaml +35 -0
- package/config/decisions/idea-pipeline.yaml +38 -0
- package/config/decisions/task-pipeline.yaml +55 -0
- package/config/plugin-scripts.json +25 -0
- package/config/rules/boundary/sp-runtime-path.yaml +2 -0
- package/config/rules/docs/sourced-api-claims.yaml +60 -0
- package/config/rules/quality/coverage-gate.yaml +5 -3
- package/config/rules/recommended-pre-check.yaml +8 -3
- package/config/rules/strict/runtime-boundaries.yaml +11 -0
- package/config/rules/structure/protected-files.yaml +3 -0
- package/config/rules/structure/scratch-evidence-pointer.yaml +35 -0
- package/config/script-placement-baseline.json +2 -2
- package/config/workflows/feature-lifecycle.yaml +9 -2
- package/config/workflows/history-anatomy.yaml +22 -0
- package/config/workflows/idea-pipeline.yaml +75 -0
- package/config/workflows/task-pipeline.yaml +368 -49
- package/config/workflows/wrapup-pipeline.yaml +106 -13
- package/package.json +9 -9
- package/plugins/sp/README.md +25 -2
- package/plugins/sp/agents/super-planner.md +11 -0
- package/plugins/sp/agents/super-reviewer.md +39 -11
- package/plugins/sp/bunfig.toml +8 -0
- package/plugins/sp/commands/dev-brainstorm.md +29 -16
- package/plugins/sp/commands/dev-changelog.md +5 -4
- package/plugins/sp/commands/dev-find-way.md +80 -0
- package/plugins/sp/commands/dev-idea.md +6 -0
- package/plugins/sp/commands/dev-parallel.md +8 -2
- package/plugins/sp/commands/dev-plan.md +6 -0
- package/plugins/sp/commands/dev-review-session.md +14 -7
- package/plugins/sp/commands/dev-run.md +17 -4
- package/plugins/sp/commands/dev-runall.md +21 -10
- package/plugins/sp/hooks/agent-lifecycle.ts +155 -0
- package/plugins/sp/hooks/context-session-start.ts +1 -1
- package/plugins/sp/hooks/fleet-guest-stop.ts +180 -0
- package/plugins/sp/hooks/hooks.json +45 -1
- package/plugins/sp/hooks/pi/guard-extension.ts +21 -0
- package/plugins/sp/lib/history-anatomy.generated.mjs +5 -0
- package/plugins/sp/lib/idea-handoff.generated.mjs +72 -11
- package/plugins/sp/lib/inline-run-app.ts +28 -0
- package/plugins/sp/lib/inline-run.generated.d.mts +6 -0
- package/plugins/sp/lib/inline-run.generated.mjs +364 -46
- package/plugins/sp/lib/plan-projection.generated.d.mts +28 -0
- package/plugins/sp/lib/plan-projection.generated.mjs +255 -0
- package/plugins/sp/lib/quality-gate.generated.d.mts +47 -1
- package/plugins/sp/lib/quality-gate.generated.mjs +30489 -82
- package/plugins/sp/lib/residual-scan.generated.d.mts +19 -0
- package/plugins/sp/lib/residual-scan.generated.mjs +66 -0
- package/plugins/sp/lib/run-summary-core.ts +561 -0
- package/plugins/sp/lib/transcript.ts +275 -0
- package/plugins/sp/plugin.json +1 -1
- package/plugins/sp/references/roles.md +1 -1
- package/plugins/sp/scripts/batch-plan.mjs +335 -0
- package/plugins/sp/scripts/batch-plan.ts +100 -0
- package/plugins/sp/scripts/batch-preflight.mjs +51 -3
- package/plugins/sp/scripts/batch-preflight.ts +72 -1
- package/plugins/sp/scripts/commit-guard.mjs +216 -0
- package/plugins/sp/scripts/commit-guard.ts +249 -0
- package/plugins/sp/scripts/history-anatomy-cache.mjs +5 -0
- package/plugins/sp/scripts/inline-run-dispatch.mjs +130 -0
- package/plugins/sp/scripts/inline-run-dispatch.ts +135 -0
- package/plugins/sp/scripts/inline-run-setup.mjs +563 -91
- package/plugins/sp/scripts/inline-run-setup.ts +65 -97
- package/plugins/sp/scripts/persist-out-check.mjs +90 -41
- package/plugins/sp/scripts/persist-out-check.ts +112 -57
- package/plugins/sp/scripts/quality-gate.mjs +30407 -73
- package/plugins/sp/scripts/quality-gate.ts +21 -5
- package/plugins/sp/scripts/residual-scan.mjs +88 -38
- package/plugins/sp/scripts/residual-scan.ts +35 -38
- package/plugins/sp/scripts/run-summary.mjs +693 -0
- package/plugins/sp/scripts/run-summary.ts +105 -0
- package/plugins/sp/scripts/session-timeline.mjs +331 -0
- package/plugins/sp/scripts/session-timeline.ts +204 -0
- package/plugins/sp/scripts/wrapup-steps.mjs +150 -2
- package/plugins/sp/scripts/wrapup-steps.ts +203 -1
- package/plugins/sp/skills/brainstorm/SKILL.md +9 -47
- package/plugins/sp/skills/branch-workflow/SKILL.md +1 -0
- package/plugins/sp/skills/branch-workflow/references/worktree-patterns.md +1 -0
- package/plugins/sp/skills/code-implementation/SKILL.md +48 -1
- package/plugins/sp/skills/code-verification/SKILL.md +8 -4
- package/plugins/sp/skills/code-verification/references/secu-review.md +3 -0
- package/plugins/sp/skills/code-verification/references/verdict-schema.md +68 -0
- package/plugins/sp/skills/fleet-join/SKILL.md +63 -0
- package/plugins/sp/skills/session-review/SKILL.md +77 -24
- package/plugins/sp/skills/source-driven-development/SKILL.md +5 -0
- package/plugins/sp/skills/spec-decomposition/references/decomposition.md +5 -3
- package/plugins/sp/skills/spur-cli/SKILL.md +6 -2
- package/plugins/sp/skills/spur-cli/references/agent.md +124 -17
- package/plugins/sp/skills/spur-cli/references/decision.md +98 -0
- package/plugins/sp/skills/spur-cli/references/message.md +7 -7
- package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +41 -3
- package/plugins/sp/skills/spur-cli/references/tasks.md +10 -7
- package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +7 -0
- package/plugins/sp/skills/spur-cli/references/workflows.md +7 -2
- package/plugins/sp/skills/spur-composer/SKILL.md +28 -2
- package/plugins/sp/skills/spur-dev/SKILL.md +18 -14
- package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +6 -3
- package/plugins/sp/skills/spur-dev/references/cross-cutting.md +49 -14
- package/plugins/sp/skills/spur-dev/references/dev-operations.md +51 -18
- package/plugins/sp/skills/spur-dev/references/execution-batch-continuation.md +68 -0
- package/plugins/sp/skills/spur-dev/references/execution-batch-report.md +194 -0
- package/plugins/sp/skills/spur-dev/references/execution-batch.md +113 -963
- package/plugins/sp/skills/spur-dev/references/execution-parallel-isolation.md +130 -0
- package/plugins/sp/skills/spur-dev/references/execution-workflow.md +20 -0
- package/plugins/sp/skills/spur-dev/references/execution-worktree-landing.md +471 -0
- package/plugins/sp/skills/spur-dev/references/execution-worktree-setup.md +379 -0
- package/plugins/sp/skills/spur-dev/references/flag-glossary.md +51 -9
- package/plugins/sp/skills/spur-dev/references/glossary.md +2 -2
- package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +361 -156
- package/plugins/sp/skills/spur-dev/references/planning-workflow.md +6 -0
- package/plugins/sp/skills/spur-dev/references/structured-trace-emission.md +178 -0
- package/plugins/sp/skills/wayfinder/SKILL.md +10 -14
- package/schemas/decision-catalog.schema.json +226 -0
- package/schemas/spur-config.schema.json +25 -0
- package/schemas/state-machine-workflow.schema.json +23 -0
- package/spur.js +28165 -19051
- package/web/_astro/{BoardApp.i4eh_fHA.js → BoardApp.D66k_s_T.js} +1 -1
- package/web/_astro/BoardApp.D6sjAJr_.js +324 -0
- package/web/_astro/{TaskDetail.C5Cu8LdB.js → TaskDetail.BynLnMNc.js} +1 -1
- package/web/_astro/{arc.Bu5XpBEz.js → arc._BUadrdH.js} +1 -1
- package/web/_astro/{architectureDiagram-3BPJPVTR.9vHQTvhF.js → architectureDiagram-3BPJPVTR.Dh7xS1Pp.js} +1 -1
- package/web/_astro/{blockDiagram-GPEHLZMM.Cn2Xl7D6.js → blockDiagram-GPEHLZMM.DFDVpfXm.js} +1 -1
- package/web/_astro/{c4Diagram-AAUBKEIU.7o0P_QDo.js → c4Diagram-AAUBKEIU.V7_3_glh.js} +1 -1
- package/web/_astro/channel.DZVfto-r.js +1 -0
- package/web/_astro/{chunk-2J33WTMH.C3zZFsNt.js → chunk-2J33WTMH.De1yx7Jz.js} +1 -1
- package/web/_astro/{chunk-4BX2VUAB.CNy_M7fO.js → chunk-4BX2VUAB.BDhHFuxx.js} +1 -1
- package/web/_astro/{chunk-55IACEB6.2TiPnLBL.js → chunk-55IACEB6.DDLkWnmC.js} +1 -1
- package/web/_astro/{chunk-727SXJPM.5CGSyKAp.js → chunk-727SXJPM.CwfiLnA7.js} +1 -1
- package/web/_astro/{chunk-AQP2D5EJ.w-ZIgfsK.js → chunk-AQP2D5EJ.CtGDmUnM.js} +1 -1
- package/web/_astro/{chunk-FMBD7UC4.BkcEyhKa.js → chunk-FMBD7UC4.BOLjpw73.js} +1 -1
- package/web/_astro/{chunk-ND2GUHAM.mxKKbBG4.js → chunk-ND2GUHAM.BDhQls6O.js} +1 -1
- package/web/_astro/{chunk-QZHKN3VN.cyA0z9aT.js → chunk-QZHKN3VN.76qBynDF.js} +1 -1
- package/web/_astro/{classDiagram-4FO5ZUOK.CqtUzwhX.js → classDiagram-4FO5ZUOK.N0mpPHT0.js} +1 -1
- package/web/_astro/{classDiagram-v2-Q7XG4LA2.CqtUzwhX.js → classDiagram-v2-Q7XG4LA2.N0mpPHT0.js} +1 -1
- package/web/_astro/{cose-bilkent-S5V4N54A.BExPTopI.js → cose-bilkent-S5V4N54A.CKknFfjB.js} +1 -1
- package/web/_astro/{cynefin-OW5HDTMX.Bq2i10Cn.js → cynefin-OW5HDTMX.Cw3ZWBAh.js} +1 -1
- package/web/_astro/{dagre-BM42HDAG.By_HsOuv.js → dagre-BM42HDAG.D3yIKCRD.js} +1 -1
- package/web/_astro/{diagram-2AECGRRQ.BtU0b7hz.js → diagram-2AECGRRQ.D51dO83Z.js} +1 -1
- package/web/_astro/{diagram-5GNKFQAL.D00ztMdT.js → diagram-5GNKFQAL.Bb-FViDj.js} +1 -1
- package/web/_astro/{diagram-KO2AKTUF.DMVJWaUN.js → diagram-KO2AKTUF.D3mN8S6x.js} +1 -1
- package/web/_astro/{diagram-LMA3HP47.Cxqrjg5-.js → diagram-LMA3HP47.dMMyPcbJ.js} +1 -1
- package/web/_astro/{diagram-OG6HWLK6.2lz_1B5h.js → diagram-OG6HWLK6.AzbvzY4C.js} +1 -1
- package/web/_astro/{erDiagram-TEJ5UH35.BVQEuJ3T.js → erDiagram-TEJ5UH35.BR5I4OZb.js} +1 -1
- package/web/_astro/{flowDiagram-I6XJVG4X.Qlyo90ky.js → flowDiagram-I6XJVG4X.DFqvhGkn.js} +1 -1
- package/web/_astro/{ganttDiagram-6RSMTGT7.DRwb8HHZ.js → ganttDiagram-6RSMTGT7.ByJbhH6J.js} +1 -1
- package/web/_astro/{gitGraphDiagram-PVQCEYII.YfoPthfS.js → gitGraphDiagram-PVQCEYII.CInHjQR3.js} +1 -1
- package/web/_astro/index.COh_kBxN.css +1 -0
- package/web/_astro/{infoDiagram-5YYISTIA.DvFREck1.js → infoDiagram-5YYISTIA.Cm0dGVjJ.js} +1 -1
- package/web/_astro/{ishikawaDiagram-YF4QCWOH.BzCj9Q0-.js → ishikawaDiagram-YF4QCWOH.C3nOP6Sj.js} +1 -1
- package/web/_astro/{journeyDiagram-JHISSGLW.BDMT_AFb.js → journeyDiagram-JHISSGLW.4IvLa2MW.js} +1 -1
- package/web/_astro/{kanban-definition-UN3LZRKU.D6Fh3gj9.js → kanban-definition-UN3LZRKU.DS87Cl-k.js} +1 -1
- package/web/_astro/{linear.Dxw00fGQ.js → linear.MzmRrNER.js} +1 -1
- package/web/_astro/{mermaid.core.CsoxUWa0.js → mermaid.core.fK-WNswS.js} +4 -4
- package/web/_astro/{mindmap-definition-RKZ34NQL.CN8oeHLu.js → mindmap-definition-RKZ34NQL.BqipOHhY.js} +1 -1
- package/web/_astro/{pieDiagram-4H26LBE5.C7ADqQ_7.js → pieDiagram-4H26LBE5.0nBiPqFG.js} +1 -1
- package/web/_astro/{quadrantDiagram-W4KKPZXB.Cw9lKyHP.js → quadrantDiagram-W4KKPZXB.Szj7Zpx5.js} +1 -1
- package/web/_astro/{requirementDiagram-4Y6WPE33.B1ni-z4q.js → requirementDiagram-4Y6WPE33.D4UR6TWo.js} +1 -1
- package/web/_astro/{sankeyDiagram-5OEKKPKP.BhexdjVr.js → sankeyDiagram-5OEKKPKP.DAE7BdOs.js} +1 -1
- package/web/_astro/{sequenceDiagram-3UESZ5HK.C3Rm7dpQ.js → sequenceDiagram-3UESZ5HK.BP9ZVq25.js} +1 -1
- package/web/_astro/{stateDiagram-AJRCARHV.CkuMt27u.js → stateDiagram-AJRCARHV.BQW7mIxk.js} +1 -1
- package/web/_astro/{stateDiagram-v2-BHNVJYJU.Dc_aazUA.js → stateDiagram-v2-BHNVJYJU.PbK4nDih.js} +1 -1
- package/web/_astro/{timeline-definition-PNZ67QCA.ja7sUFhH.js → timeline-definition-PNZ67QCA.Ci_GvUpo.js} +1 -1
- package/web/_astro/{vennDiagram-CIIHVFJN.BxIshX_K.js → vennDiagram-CIIHVFJN.DNw1Y5qx.js} +1 -1
- package/web/_astro/{wardleyDiagram-YWT4CUSO.DfHlC0sh.js → wardleyDiagram-YWT4CUSO.CwlkaaNe.js} +1 -1
- package/web/_astro/{xychartDiagram-2RQKCTM6.DSnhHwCh.js → xychartDiagram-2RQKCTM6.MI6ZuiH_.js} +1 -1
- package/web/board-runtime.json +1 -1
- package/web/index.html +2 -2
- package/web/_astro/BoardApp.BVp-LYi6.js +0 -322
- package/web/_astro/channel.6IFIKBhu.js +0 -1
- package/web/_astro/index.CbNz17Sx.css +0 -1
|
@@ -149,3 +149,20 @@ agent:
|
|
|
149
149
|
# extra workflow folders by concatenating them here (loader merge):
|
|
150
150
|
workflows:
|
|
151
151
|
paths: []
|
|
152
|
+
|
|
153
|
+
# Decision catalogs (feature P / ADR-134): the project layer is always
|
|
154
|
+
# `<cwd>/.spur/decisions` and the shared layer is the installed package's own
|
|
155
|
+
# `config/decisions`, so no config entry is needed to discover the shipped
|
|
156
|
+
# catalogs. `paths` registers extra catalog folders (absolute or
|
|
157
|
+
# project-relative); the first layer wins per file basename (ADR-113 style).
|
|
158
|
+
# `maker` selects the default DecisionMaker for every decision point, and
|
|
159
|
+
# `makers` overrides it per decision id. Built-in makers: typesafe, fm-local,
|
|
160
|
+
# laya-local (laya-local needs Apple Silicon). An unregistered name is a config
|
|
161
|
+
# error, never a silent fallback. Inspect the effective choice with
|
|
162
|
+
# `spur decision status`. `init` never overwrites this file — until you add the
|
|
163
|
+
# keys, the shipped catalog's maker applies (see `status`).
|
|
164
|
+
decisions:
|
|
165
|
+
paths: []
|
|
166
|
+
maker: typesafe
|
|
167
|
+
# makers:
|
|
168
|
+
# task-triage: laya-local
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/decision-catalog.schema.json"
|
|
2
|
+
# Decision catalog for evidence-mode operator gates (feature P1 / task 1099,
|
|
3
|
+
# decision-observability-and-adoption.md §4, class keep-human).
|
|
4
|
+
#
|
|
5
|
+
# `gate-evidence` serves `hitl.confirm` actions overridden to
|
|
6
|
+
# `decision.mode: evidence`: the workflow gate responder decides through it
|
|
7
|
+
# instead of the legacy inline maker, so operator gates get catalog maker
|
|
8
|
+
# resolution, the catalog min-confidence floor and `decision.*` lifecycle
|
|
9
|
+
# events with caller `gate` (task 1099 R2). Bundled workflows keep
|
|
10
|
+
# `mode: never` and always pause for the operator (task 1099 R4); no shipped
|
|
11
|
+
# workflow YAML references this id.
|
|
12
|
+
#
|
|
13
|
+
# Resolution: this file ships in the shared layer (the installed package's
|
|
14
|
+
# config/decisions/). A project can override it per basename through
|
|
15
|
+
# .spur/decisions/ or decisions.paths (first layer wins, ADR-113 style).
|
|
16
|
+
version: 1
|
|
17
|
+
|
|
18
|
+
decisions:
|
|
19
|
+
gate-evidence:
|
|
20
|
+
type: choice
|
|
21
|
+
description: Should an evidence-mode operator gate proceed, stop, or defer to the operator?
|
|
22
|
+
parameters:
|
|
23
|
+
prompt:
|
|
24
|
+
type: string
|
|
25
|
+
description: The gate question that would have been asked to the operator.
|
|
26
|
+
evidence:
|
|
27
|
+
type: json
|
|
28
|
+
description: Bounded, redacted producer-node evidence recorded for this run.
|
|
29
|
+
node:
|
|
30
|
+
type: string
|
|
31
|
+
description: The workflow node that raised the gate.
|
|
32
|
+
criteria:
|
|
33
|
+
yes: The recorded evidence establishes that the gate should proceed.
|
|
34
|
+
no: The recorded evidence establishes that the gate should not proceed.
|
|
35
|
+
defer: The evidence is insufficient or conflicting; defer to the operator.
|
|
36
|
+
fallback: defer
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/decision-catalog.schema.json"
|
|
2
|
+
# Decision catalog for the history-anatomy workflow (feature P1 / task 1098).
|
|
3
|
+
#
|
|
4
|
+
# `anatomy-validation-verdict` backs the rescue-only classification of an
|
|
5
|
+
# ambiguous validation artifact in config/workflows/history-anatomy.yaml
|
|
6
|
+
# (validate state, verdict-normalization step): the deterministic parse stays
|
|
7
|
+
# first, and the catalog decision runs only when the artifact's final line is
|
|
8
|
+
# not exactly `Verdict: PASS` and the file holds zero exact `Verdict: FAIL`
|
|
9
|
+
# lines. Any exact `Verdict: FAIL` line short-circuits to FAIL without calling
|
|
10
|
+
# a maker, so a deterministic FAIL can never be overturned (AC1). The fallback
|
|
11
|
+
# is FAIL — an ambiguous verdict with no model answer fails the 0771 guard,
|
|
12
|
+
# the same routing as before the rescue existed.
|
|
13
|
+
#
|
|
14
|
+
# Resolution: this file ships in the shared layer (the installed package's
|
|
15
|
+
# config/decisions/). A project can override it per basename through
|
|
16
|
+
# .spur/decisions/ or decisions.paths (first layer wins, ADR-113 style).
|
|
17
|
+
version: 1
|
|
18
|
+
|
|
19
|
+
defaults:
|
|
20
|
+
# ADR-125 value, kept over the upstream 0.7 default.
|
|
21
|
+
minConfidence: 0.8
|
|
22
|
+
|
|
23
|
+
decisions:
|
|
24
|
+
anatomy-validation-verdict:
|
|
25
|
+
type: choice
|
|
26
|
+
description: >
|
|
27
|
+
Does the history-anatomy validation artifact certify the candidate
|
|
28
|
+
report? The evidence file is the full validation artifact; the
|
|
29
|
+
answer decides which verdict line the 0771 guard reads.
|
|
30
|
+
criteria:
|
|
31
|
+
PASS: The artifact substantively certifies the candidate report —
|
|
32
|
+
its only plausible reading is a PASS verdict.
|
|
33
|
+
FAIL: The artifact does not certify the candidate report, or its
|
|
34
|
+
verdict cannot be determined from the text.
|
|
35
|
+
fallback: FAIL
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/decision-catalog.schema.json"
|
|
2
|
+
# Decision catalogs for the idea pipeline (feature P1 / task 1097, design §5 S5).
|
|
3
|
+
#
|
|
4
|
+
# Rescue-only adoption (design §4): the deterministic parses in
|
|
5
|
+
# config/workflows/idea-pipeline.yaml stay FIRST — the awk derivation over
|
|
6
|
+
# `## Recommendation` and the needs_design JSON read. These entries serve only
|
|
7
|
+
# the output those parses cannot classify: recommendation `unknown`, or a
|
|
8
|
+
# missing/corrupt needs_design JSON. Fallbacks reproduce today's routing
|
|
9
|
+
# (`unknown` keeps the idea-eval pause; `design` keeps the system-design pass),
|
|
10
|
+
# so no default can auto-create a feature.
|
|
11
|
+
#
|
|
12
|
+
# Resolution: this file ships in the shared layer (the installed package's
|
|
13
|
+
# config/decisions/). A project can override it per basename through
|
|
14
|
+
# .spur/decisions/ or decisions.paths (first layer wins, ADR-113 style).
|
|
15
|
+
version: 1
|
|
16
|
+
|
|
17
|
+
defaults:
|
|
18
|
+
# ADR-125 value, kept over the upstream 0.7 default.
|
|
19
|
+
minConfidence: 0.8
|
|
20
|
+
|
|
21
|
+
decisions:
|
|
22
|
+
idea-recommendation:
|
|
23
|
+
type: choice
|
|
24
|
+
description: Which route does the idea evaluation report recommend?
|
|
25
|
+
criteria:
|
|
26
|
+
proceed: Build as evaluated — create the feature.
|
|
27
|
+
reshape: Build with the evaluation's reshaping — create the feature and fold it in.
|
|
28
|
+
drop: Do not build — cancel without creating a feature.
|
|
29
|
+
unknown: The report states no clear recommendation.
|
|
30
|
+
fallback: unknown
|
|
31
|
+
|
|
32
|
+
needs-design:
|
|
33
|
+
type: choice
|
|
34
|
+
description: Does this idea need a system-design pass before decomposition?
|
|
35
|
+
criteria:
|
|
36
|
+
design: Run the system-design stage before decomposition.
|
|
37
|
+
skip: Decompose directly — no system-design pass needed.
|
|
38
|
+
fallback: design
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/decision-catalog.schema.json"
|
|
2
|
+
# Decision catalogs for the task pipeline (feature P / task 1092, ADR-134).
|
|
3
|
+
#
|
|
4
|
+
# These entries mirror the inline decide actions that ship in
|
|
5
|
+
# config/workflows/task-pipeline.yaml today — same questions, choices and
|
|
6
|
+
# fallbacks — so their reliability can be measured with `spur decision run`
|
|
7
|
+
# before feature P1 migrates the workflow actions onto them (design §3.5).
|
|
8
|
+
# No workflow references this catalog yet.
|
|
9
|
+
#
|
|
10
|
+
# Resolution: this file ships in the shared layer (the installed package's
|
|
11
|
+
# config/decisions/). A project can override it per basename through
|
|
12
|
+
# .spur/decisions/ or decisions.paths (first layer wins, ADR-113 style).
|
|
13
|
+
version: 1
|
|
14
|
+
|
|
15
|
+
defaults:
|
|
16
|
+
# ADR-125 value, kept over the upstream 0.7 default.
|
|
17
|
+
minConfidence: 0.8
|
|
18
|
+
|
|
19
|
+
decisions:
|
|
20
|
+
task-triage:
|
|
21
|
+
type: choice
|
|
22
|
+
description: Which verification lane does a green-gate diff deserve?
|
|
23
|
+
parameters:
|
|
24
|
+
wbs:
|
|
25
|
+
type: string
|
|
26
|
+
description: Task WBS the diff belongs to.
|
|
27
|
+
criteria:
|
|
28
|
+
low: Small, contained diff — the fast lane is enough.
|
|
29
|
+
standard: Ordinary diff — the standard verification lane applies.
|
|
30
|
+
high: Broad or risky diff — verify with high caution.
|
|
31
|
+
fallback: standard
|
|
32
|
+
|
|
33
|
+
failure-class:
|
|
34
|
+
type: choice
|
|
35
|
+
description: Is a failed quality gate fixable by the repair agent, or should the run stop?
|
|
36
|
+
parameters:
|
|
37
|
+
wbs:
|
|
38
|
+
type: string
|
|
39
|
+
description: Task WBS whose gate failed.
|
|
40
|
+
criteria:
|
|
41
|
+
fix: The failure looks fixable — send it to the repair agent.
|
|
42
|
+
stop: The failure is not mechanically fixable — stop the run for the operator.
|
|
43
|
+
fallback: fix
|
|
44
|
+
|
|
45
|
+
review-failure-class:
|
|
46
|
+
type: choice
|
|
47
|
+
description: Is a non-PASS review fixable by the repair agent, or should the run stop?
|
|
48
|
+
parameters:
|
|
49
|
+
wbs:
|
|
50
|
+
type: string
|
|
51
|
+
description: Task WBS whose review did not certify PASS.
|
|
52
|
+
criteria:
|
|
53
|
+
fix: The findings look fixable — send them to the repair agent.
|
|
54
|
+
stop: The findings are not mechanically fixable — stop the run for the operator.
|
|
55
|
+
fallback: fix
|
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
"contract": "standard",
|
|
8
8
|
"twin": "batch-preflight.mjs"
|
|
9
9
|
},
|
|
10
|
+
{
|
|
11
|
+
"rel": "batch-plan.ts",
|
|
12
|
+
"contract": "standard",
|
|
13
|
+
"twin": "batch-plan.mjs"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"rel": "commit-guard.ts",
|
|
17
|
+
"contract": "standard",
|
|
18
|
+
"twin": "commit-guard.mjs"
|
|
19
|
+
},
|
|
10
20
|
{
|
|
11
21
|
"rel": "daily-summary/daily-summary.ts",
|
|
12
22
|
"contract": "standard",
|
|
@@ -51,6 +61,11 @@
|
|
|
51
61
|
"contract": "standard",
|
|
52
62
|
"twin": "inline-run-setup.mjs"
|
|
53
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"rel": "inline-run-dispatch.ts",
|
|
66
|
+
"contract": "standard",
|
|
67
|
+
"twin": "inline-run-dispatch.mjs"
|
|
68
|
+
},
|
|
54
69
|
{
|
|
55
70
|
"rel": "feature-verification-steps.ts",
|
|
56
71
|
"contract": "standard",
|
|
@@ -76,11 +91,21 @@
|
|
|
76
91
|
"contract": "standard",
|
|
77
92
|
"twin": "residual-scan.mjs"
|
|
78
93
|
},
|
|
94
|
+
{
|
|
95
|
+
"rel": "run-summary.ts",
|
|
96
|
+
"contract": "standard",
|
|
97
|
+
"twin": "run-summary.mjs"
|
|
98
|
+
},
|
|
79
99
|
{
|
|
80
100
|
"rel": "script-root.ts",
|
|
81
101
|
"contract": "standard",
|
|
82
102
|
"twin": "script-root.mjs"
|
|
83
103
|
},
|
|
104
|
+
{
|
|
105
|
+
"rel": "session-timeline.ts",
|
|
106
|
+
"contract": "standard",
|
|
107
|
+
"twin": "session-timeline.mjs"
|
|
108
|
+
},
|
|
84
109
|
{
|
|
85
110
|
"rel": "task-diffstat.ts",
|
|
86
111
|
"contract": "standard",
|
|
@@ -24,6 +24,8 @@ exclude:
|
|
|
24
24
|
# legitimately contains `config/...` documentation / self-references — not
|
|
25
25
|
# runtime paths.
|
|
26
26
|
- "apps/cli/config/**"
|
|
27
|
+
# Desktop stage copies the same generated build-time asset payload beside each binary.
|
|
28
|
+
- "apps/desktop/resources/**"
|
|
27
29
|
rules:
|
|
28
30
|
- id: sp-runtime-path
|
|
29
31
|
description: >
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
2
|
+
# Sourced-claims rules (docs corpus) — API/library claims in markdown must be
|
|
3
|
+
# verifiable. A bare version string or a time-anchored API claim ("deprecated
|
|
4
|
+
# since", "added in 0.5.x") on a line with no citation anchor (http(s) URL or a
|
|
5
|
+
# repo path:line reference) is an unverifyable claim: readers cannot tell
|
|
6
|
+
# measured fact from model memory. The deterministic scan is line-level and
|
|
7
|
+
# heuristic — code fences and command examples can legitimately carry bare
|
|
8
|
+
# versions, so severity is info (advisory visibility; the recommended-pre-check
|
|
9
|
+
# gate runs --fail-on warning, so this rule surfaces findings for review without
|
|
10
|
+
# reddening gates — changed-file enforcement happens in SECUA review).
|
|
11
|
+
#
|
|
12
|
+
# The semantic contract — every external API/library claim carries a source
|
|
13
|
+
# citation (URL or path:line) AND a confidence level (HIGH/MEDIUM/LOW) — is
|
|
14
|
+
# owned by the sp-source-driven-development skill and verified in SECUA review
|
|
15
|
+
# (code-verification secu-review checklist). Generic "supports/requires" prose
|
|
16
|
+
# is deliberately out of scope here: in this corpus it is structural writing,
|
|
17
|
+
# not external API assertion, and would drown the signal.
|
|
18
|
+
include:
|
|
19
|
+
- "docs/**/*.md"
|
|
20
|
+
- "plugins/sp/skills/**/references/**/*.md"
|
|
21
|
+
exclude:
|
|
22
|
+
# Legacy task archives are historical records — retro-citing ~900 closed
|
|
23
|
+
# lines is make-work; the tripwire targets active authoring surfaces.
|
|
24
|
+
- "docs/tasks/"
|
|
25
|
+
- "docs/tasks2/"
|
|
26
|
+
- "docs/tasks3/"
|
|
27
|
+
- "docs/tasks4/"
|
|
28
|
+
- "drizzle/**"
|
|
29
|
+
- "**/node_modules/**"
|
|
30
|
+
rules:
|
|
31
|
+
- id: cited-version-strings
|
|
32
|
+
description: >
|
|
33
|
+
A markdown line asserting a version string (x.y.z) without a citation
|
|
34
|
+
anchor on the same line — http(s) URL or repo path reference like
|
|
35
|
+
packages/app/src/foo.ts:123 — is unverifyable. Add the anchor, or drop
|
|
36
|
+
the version if it is not load-bearing. Confidence level (HIGH/MEDIUM/LOW)
|
|
37
|
+
is part of the claim contract; see sp-source-driven-development.
|
|
38
|
+
severity: info
|
|
39
|
+
evaluator:
|
|
40
|
+
type: regex
|
|
41
|
+
config:
|
|
42
|
+
mode: forbid
|
|
43
|
+
# Fire when the line has NO citation anchor (no URL, no path:line) AND
|
|
44
|
+
# contains a semver-ish token. Lookarounds exclude IPs (127.0.0.1) and
|
|
45
|
+
# longer dotted numerics; fenced-code lines are out of regex reach —
|
|
46
|
+
# that residual noise is why this is warning, not error.
|
|
47
|
+
pattern: "^(?!.*(?:https?://|(?:[\\w.-]+/)+[\\w.-]+:\\d+)).*(?<![\\d.])\\d+\\.\\d+\\.\\d+(?!\\.\\d)"
|
|
48
|
+
- id: cited-api-claims
|
|
49
|
+
description: >
|
|
50
|
+
A markdown line making a time- or version-anchored external API claim
|
|
51
|
+
("deprecated since 1.2", "introduced in v3", "available since 0.9") must
|
|
52
|
+
carry a citation anchor on the same line — URL or repo path:line. Add the
|
|
53
|
+
source (URL or path:line) and the confidence level (HIGH/MEDIUM/LOW);
|
|
54
|
+
contract in sp-source-driven-development.
|
|
55
|
+
severity: info
|
|
56
|
+
evaluator:
|
|
57
|
+
type: regex
|
|
58
|
+
config:
|
|
59
|
+
mode: forbid
|
|
60
|
+
pattern: "^(?!.*(?:https?://|(?:[\\w.-]+/)+[\\w.-]+:\\d+)).*\\b(?:deprecated (?:since|in|as of)|introduced in|added in|available since|stable since)\\b"
|
|
@@ -2,9 +2,11 @@ $schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
|
2
2
|
# Coverage gate — per-file line coverage meets threshold from Bun's lcov output.
|
|
3
3
|
# Absorbed from ts-libs/.spur/rules/quality/coverage-gate.yaml, re-scoped to
|
|
4
4
|
# Spur's monorepo layout:
|
|
5
|
-
# - lcovPath kept at .coverage/lcov.info (Spur's `bun run test:coverage`
|
|
6
|
-
#
|
|
7
|
-
#
|
|
5
|
+
# - lcovPath kept at .coverage/lcov.info (Spur's `bun run test:coverage`
|
|
6
|
+
# writes it via --coverage-dir=.coverage, and `bunfig.toml
|
|
7
|
+
# [test] coverage = true` means a plain `bun run test` writes the same
|
|
8
|
+
# artifact — so a TARGETED `bun test <file>` overwrites it with a partial
|
|
9
|
+
# tracefile, and this rule then judges that partial data)
|
|
8
10
|
# - include expanded to apps/** + packages/** (Spur tests cover both;
|
|
9
11
|
# ts-libs only covers packages/**)
|
|
10
12
|
# - threshold kept at 90 matching bunfig.toml coverageThreshold
|
|
@@ -2,9 +2,14 @@ $schema: "@gobing-ai/spur/schemas/preset.schema.json"
|
|
|
2
2
|
# Recommended pre-check preset — portable rule categories bundled with the catalog.
|
|
3
3
|
# Use with: spur rule run --preset recommended-pre-check
|
|
4
4
|
#
|
|
5
|
-
# Runs BEFORE tests (test-pre-check). Extends
|
|
6
|
-
# structure, boundary, surface, ui,
|
|
7
|
-
# 79186391). TSDoc exports run in
|
|
5
|
+
# Runs BEFORE tests (test-pre-check). Extends categories: typescript,
|
|
6
|
+
# structure, boundary, surface, ui, strict (ui since bc267cc8, strict since
|
|
7
|
+
# 79186391), and docs (sourced-api-claims, 2026-10-07). TSDoc exports run in
|
|
8
|
+
# post-check alongside coverage-gate.
|
|
9
|
+
#
|
|
10
|
+
# TEMPORARY (2026-10-08): `docs` removed from extends to unblock the gate —
|
|
11
|
+
# restore it (add `- docs` back) once sourced-api-claims finding noise is
|
|
12
|
+
# triaged. Recapture the raw-json-baseline fixtures in the same change.
|
|
8
13
|
name: recommended-pre-check
|
|
9
14
|
extends:
|
|
10
15
|
- typescript
|
|
@@ -32,6 +32,10 @@ rules:
|
|
|
32
32
|
- "**/tests/**"
|
|
33
33
|
- "**/*.test.ts"
|
|
34
34
|
|
|
35
|
+
# Electron Node adapter: ts-runtime's streaming handle uses Bun.spawn.
|
|
36
|
+
# Owns the detached process-group handle needed for startup cancellation and quit.
|
|
37
|
+
- "apps/desktop/src/server-process.ts"
|
|
38
|
+
|
|
35
39
|
# Low-level system primitives:
|
|
36
40
|
- "packages/app/src/services/quality-gate.ts" # gate runs `sh -c` with stdout+stderr merged onto ONE fd; ProcessExecutor captures streams separately and cannot reproduce the stream-order contract (task 1006 R1; mirrors the history-anatomy bundling exemptions)
|
|
37
41
|
|
|
@@ -60,16 +64,23 @@ rules:
|
|
|
60
64
|
- "packages/app/src/services/token-ledger-service.ts" # FD byte-window log tailing
|
|
61
65
|
- "packages/app/src/services/token-ledger-watcher.ts" # node:fs watch() live watcher
|
|
62
66
|
- "packages/app/src/services/project-registry.ts" # atomic projects.json persistence
|
|
67
|
+
- "packages/app/src/services/project-server-owner.ts" # atomic mkdir lifetime claim + unique-marker stale recovery; FileSystem has no exclusive mkdir primitive (1082)
|
|
63
68
|
- "packages/app/src/services/slash-commands-service.ts" # synchronous ~/.config/spur/slash_commands.json persistence (mirrors project-registry.ts)
|
|
64
69
|
- "packages/app/src/services/agent-usage-producer.ts" # atomic agent-usage snapshot write (tmp + rename, mirrors project-registry.ts; task 0892 R1)
|
|
65
70
|
- "packages/app/src/services/history-service.ts" # versioned analyze artifact + bounded-errors sidecar + latest.json symlink pointer (task 0474); ts-runtime FileSystem seam has no symlink, so the pointer uses node:fs directly (mirrors project-registry.ts persistence exemption)
|
|
66
71
|
- "packages/app/src/services/history-anatomy.ts" # deterministic history-anatomy cache core (task 1005 R2): fsync'd tmp+rename atomic publish, readdir digest scans and sync report reads must stay byte-stable; bundled standalone for the bare-node plugin twin (mirrors agent-usage-producer.ts / history-service.ts exemptions)
|
|
67
72
|
- "packages/app/src/observability/workflow-run-log-sink.ts" # sync FD append for mid-run tail-able all-in-one run log (task 0426 / feature D2); append() is sync from the observability bus
|
|
73
|
+
- "packages/app/src/observability/agent-run-log.ts" # same primitive as the sink above for the per-run agent stream (task 1076 R1, ADR-132); append() is sync from the agent service's own onOutput hook, and the byte cap needs the FD position it tracks
|
|
68
74
|
- "apps/cli/src/commands/workflow.ts" # FD byte-window tail of the mid-run run log for `workflow trace --follow` streaming (task 0428 / feature D2); readSync at offset over the observability sink's FDs
|
|
69
75
|
- "apps/web/src/modules/discover.ts" # Vite/Astro module scanner fallback under bun test
|
|
70
76
|
- "packages/app/src/services/quality-gate.ts" # gate artifacts (log/findings/receipt) written directly; merged-fd gate log and fsync-free atomic writes must stay byte-stable; bundled standalone for the bare-node plugin twin (task 1006 R1; mirrors history-anatomy.ts)
|
|
71
77
|
- "packages/app/src/services/run-storage.ts" # durable-evidence migration core (task 1025 R4): atomic tmp+rename byte copies with digest reread and atomic manifest publish must stay byte-stable (mirrors agent-usage-producer.ts / project-registry.ts exemptions)
|
|
72
78
|
|
|
79
|
+
# Electron Node adapters cannot load Bun runtime implementations; keep the
|
|
80
|
+
# synchronous existence/directory probes injected for unit testing (desktop contract).
|
|
81
|
+
- "apps/desktop/src/layout.ts"
|
|
82
|
+
- "apps/desktop/src/server-process.ts"
|
|
83
|
+
|
|
73
84
|
# Synchronous bootstrap & path resolution:
|
|
74
85
|
- "packages/config/src/bundled-config.ts" # sync bundledConfigRoot() directory walk
|
|
75
86
|
- "packages/config/src/loader.ts" # sync resolveConfigFile() / schema specifier lookup
|
|
@@ -37,6 +37,9 @@ rules:
|
|
|
37
37
|
# this rule's include scope — scanning generated copies only adds noise
|
|
38
38
|
# (e.g. `id: task-implement-transition` trips the sk- token shape).
|
|
39
39
|
- "apps/cli/config/"
|
|
40
|
+
# Desktop ships the same generated config payload beside each compiled binary.
|
|
41
|
+
# Its source remains outside this source-code rule, just like the CLI bundle.
|
|
42
|
+
- "apps/desktop/resources/"
|
|
40
43
|
# `apps/cli/plugins/` is the same kind of gitignored build:bundle output — a staged
|
|
41
44
|
# npm copy of `plugins/`, itself outside the include scope. Minified generated libs
|
|
42
45
|
# there trip the api-key shape (0976: HEAD's inline-run.generated.mjs fires too).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
|
|
2
|
+
# ADR-131 consumer invariant: `.spur/run/` may be absent in any later run, so a
|
|
3
|
+
# durable record must not cite it as evidence. `done_reason` is the one
|
|
4
|
+
# machine-consumed pointer with a fixed shape, so this rule anchors there: a task's
|
|
5
|
+
# close rationale must name `.spur/memory/evidence/<wbs>-verdict.json` (or the
|
|
6
|
+
# tracked `## Testing` section), never the scratch copy.
|
|
7
|
+
#
|
|
8
|
+
# Scope — the pointer field, not the directory string. 600+ tracked documents
|
|
9
|
+
# legitimately mention `.spur/run/` while documenting what the pipeline writes
|
|
10
|
+
# there (that is the mechanism the ADR governs); only a `done_reason:` value that
|
|
11
|
+
# points at a scratch verdict is a citation of record. Prose mentions in any
|
|
12
|
+
# section, design doc or source file never match, so no allowlist is needed.
|
|
13
|
+
#
|
|
14
|
+
# Out of scope, and this rule makes no claim to cover it: executable source under
|
|
15
|
+
# the gitignored `.spur/run/` (a hook or script loader registered from scratch).
|
|
16
|
+
# No loader registers from there — verified 2026-10-09, and the runtime-guard task
|
|
17
|
+
# that would have covered the class (1145) was cancelled. The rule engine reads
|
|
18
|
+
# tracked files only, so that class is invisible here by construction.
|
|
19
|
+
#
|
|
20
|
+
# Repair: `spur task migrate-anchors --wbs <wbs>` retargets the pointer (1140).
|
|
21
|
+
include:
|
|
22
|
+
- "docs/tasks*/**/*.md"
|
|
23
|
+
rules:
|
|
24
|
+
- id: no-scratch-verdict-pointer
|
|
25
|
+
description: >
|
|
26
|
+
done_reason cites a .spur/run verdict, which ADR-131 makes disposable: the
|
|
27
|
+
directory may be absent in any later run, so a consumer resolving this pointer
|
|
28
|
+
reads a broken reference. Cite .spur/memory/evidence/<wbs>-verdict.json, or the
|
|
29
|
+
tracked Testing section when no durable copy was retained; repair with
|
|
30
|
+
`spur task migrate-anchors --wbs <wbs>`.
|
|
31
|
+
severity: error
|
|
32
|
+
evaluator:
|
|
33
|
+
type: rg
|
|
34
|
+
config:
|
|
35
|
+
pattern: "^done_reason:.*\\.spur/run/[0-9]{4}(-|/)verdict\\.json"
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"reason": "Keep, sp-owned git/gh loop; cited exemption (plan \u00a72)"
|
|
8
8
|
},
|
|
9
9
|
"plugins/sp/scripts/wrapup-steps.ts": {
|
|
10
|
-
"kinds": ["budget"],
|
|
11
|
-
"reason": "Keep (budget exemption), W2 (plan \u00a72)",
|
|
10
|
+
"kinds": ["budget", "corpus-parse"],
|
|
11
|
+
"reason": "Keep (budget exemption), W2 (plan \u00a72). corpus-parse: the 1147 R1 doc-sync write-scope guard excludes the task/feature corpus by path prefix -- a scope exclusion, not corpus parsing (same class as wrapup-drift-probe.ts).",
|
|
12
12
|
"exempt": true
|
|
13
13
|
},
|
|
14
14
|
"plugins/sp/scripts/batch-preflight.ts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"$schema": "@gobing-ai/spur/schemas/state-machine-workflow.schema.json"
|
|
10
10
|
kind: state-machine
|
|
11
11
|
name: feature-lifecycle
|
|
12
|
-
version: "
|
|
12
|
+
version: "2"
|
|
13
13
|
description: >
|
|
14
14
|
Feature lifecycle FSM (design §2.3, §5.1, DD-13). States are the canonical
|
|
15
15
|
FeatureStatus vocabulary; transitions encode the §2.3 graph including the
|
|
@@ -50,7 +50,14 @@ states:
|
|
|
50
50
|
# applied as a replacement, so the inner run lost spurBin and loadModule
|
|
51
51
|
# fell into source mode (0948 R1). The nested JSON is shell-expanded:
|
|
52
52
|
# $spurBin inside the double quotes keeps a multi-word invocation intact.
|
|
53
|
-
|
|
53
|
+
# 1147 R4: clear the inherited nested-run marker for this ONE child. The
|
|
54
|
+
# bounded, definition-pinned feature-verification pass (no agent.run, no
|
|
55
|
+
# further nested run) is a legitimate child, but the outer run's
|
|
56
|
+
# SPUR_WORKFLOW_RUN_ACTIVE marker rides every child env — so the CLI's
|
|
57
|
+
# nested-run refusal (0610 R4) rejected it and the same pass that passes
|
|
58
|
+
# standalone failed here with a bare exit 1. The recursion guard stays
|
|
59
|
+
# binding for every other nested invocation.
|
|
60
|
+
command: 'env -u SPUR_WORKFLOW_RUN_ACTIVE $spurBin workflow run feature-verification.yaml --vars "{\"featureId\":\"$featureId\",\"spurBin\":\"$spurBin\"}"'
|
|
54
61
|
- id: blocked
|
|
55
62
|
description: Impediment; work suspended.
|
|
56
63
|
- id: done
|
|
@@ -250,6 +250,28 @@ states:
|
|
|
250
250
|
grep -vx 'Verdict: PASS' "$f" > "$f.tmp" && printf 'Verdict: PASS\n' >> "$f.tmp" && mv "$f.tmp" "$f";
|
|
251
251
|
fi;
|
|
252
252
|
fi
|
|
253
|
+
- kind: shell
|
|
254
|
+
options:
|
|
255
|
+
# 1098 ambiguous-verdict rescue (design §5 S6, rescue-only): runs AFTER the
|
|
256
|
+
# normalization step and only when the artifact is still undecidable — final
|
|
257
|
+
# line not `Verdict: PASS` and ZERO exact `Verdict: FAIL` lines (zero PASS
|
|
258
|
+
# lines or several). The catalog decision `anatomy-validation-verdict`
|
|
259
|
+
# classifies the artifact. `Verdict: PASS` is appended ONLY from a model
|
|
260
|
+
# answer (source == "model" and value == "PASS"; the jq `// .data.*` arms
|
|
261
|
+
# also accept the ADR-091 envelope shape); a fallback, a non-model source,
|
|
262
|
+
# a jq failure or any maker failure appends `Verdict: FAIL`. The zero-FAIL
|
|
263
|
+
# guard short-circuits BEFORE the maker call, so a deterministic FAIL is
|
|
264
|
+
# never overturned (AC1) and the 0771 guard/assert-clean stay the
|
|
265
|
+
# authorities. Separate action from normalization to stay inside the
|
|
266
|
+
# ADR-115 composition budget (§1.2 shell tier).
|
|
267
|
+
command: >-
|
|
268
|
+
f=.spur/run/$__runId-validation.txt;
|
|
269
|
+
if [ -f "$f" ] && [ "$(grep -cx 'Verdict: FAIL' "$f")" = 0 ] && ! tail -n 1 "$f" | grep -qx 'Verdict: PASS'; then
|
|
270
|
+
d=$("$spurBin" decision run anatomy-validation-verdict --evidence "$f" --json || true);
|
|
271
|
+
v=$(printf '%s' "$d" | jq -r 'if (.source // .data.source) == "model" and (.value // .data.value) == "PASS" then "PASS" else "FAIL" end' 2>/dev/null);
|
|
272
|
+
[ "$v" = "PASS" ] || v="FAIL";
|
|
273
|
+
printf 'Verdict: %s\n' "$v" >> "$f";
|
|
274
|
+
fi
|
|
253
275
|
- kind: shell
|
|
254
276
|
options:
|
|
255
277
|
command: >-
|