@arbiterforge/ca-pi 0.18.3 → 0.19.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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/plugins/ca-pi/CHANGELOG.md +60 -0
  4. package/plugins/ca-pi/COMMANDS.md +2 -2
  5. package/plugins/ca-pi/SKILLS.md +5 -5
  6. package/plugins/ca-pi/SPRINT.md +43 -230
  7. package/plugins/ca-pi/agents/backend-author.md +5 -5
  8. package/plugins/ca-pi/agents/checkpoint-aggregator.md +7 -0
  9. package/plugins/ca-pi/agents/frontend-author.md +5 -5
  10. package/plugins/ca-pi/agents/infra-author.md +6 -7
  11. package/plugins/ca-pi/agents/scout.md +25 -24
  12. package/plugins/ca-pi/arbiter.md +6 -4
  13. package/plugins/ca-pi/generated/command-catalog.json +5 -5
  14. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-amd64 +0 -0
  15. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-arm64 +0 -0
  16. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-amd64 +0 -0
  17. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-arm64 +0 -0
  18. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-amd64.exe +0 -0
  19. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-arm64.exe +0 -0
  20. package/plugins/ca-pi/helpers/artifacts/release.json +37 -37
  21. package/plugins/ca-pi/hooks/_approvallib.py +41 -0
  22. package/plugins/ca-pi/hooks/_artifactlib.py +61 -115
  23. package/plugins/ca-pi/hooks/_artifactpromptlib.py +12 -12
  24. package/plugins/ca-pi/hooks/_bashguardlib.py +66 -4
  25. package/plugins/ca-pi/hooks/_contextselectlib.py +38 -35
  26. package/plugins/ca-pi/hooks/_contextwriterlib.py +114 -0
  27. package/plugins/ca-pi/hooks/_host.py +1 -1
  28. package/plugins/ca-pi/hooks/_prerequisitelib.py +35 -0
  29. package/plugins/ca-pi/hooks/_provenancelib.py +107 -1
  30. package/plugins/ca-pi/hooks/_readinjectlib.py +21 -7
  31. package/plugins/ca-pi/hooks/_reconciliationlib.py +170 -3
  32. package/plugins/ca-pi/hooks/_releaselib.py +6 -6
  33. package/plugins/ca-pi/hooks/_sprintapprovallib.py +52 -2
  34. package/plugins/ca-pi/hooks/artifact-reconcile.py +13 -4
  35. package/plugins/ca-pi/hooks/hostapi.py +1 -1
  36. package/plugins/ca-pi/hooks/init-codearbiter.py +34 -5
  37. package/plugins/ca-pi/includes/artifacts-attestation.md +434 -0
  38. package/plugins/ca-pi/includes/artifacts.md +133 -492
  39. package/plugins/ca-pi/includes/author-tdd-workflow.md +32 -21
  40. package/plugins/ca-pi/includes/fresh-verification.md +14 -12
  41. package/plugins/ca-pi/includes/harvest.md +3 -3
  42. package/plugins/ca-pi/includes/reference-map.md +1 -1
  43. package/plugins/ca-pi/includes/routing-table.md +3 -3
  44. package/plugins/ca-pi/includes/sprint-authority.md +6 -1
  45. package/plugins/ca-pi/includes/verification-boundary.md +11 -2
  46. package/plugins/ca-pi/package.json +1 -1
  47. package/plugins/ca-pi/routines/INDEX.md +8 -8
  48. package/plugins/ca-pi/routines/brainstorming/SKILL.md +65 -202
  49. package/plugins/ca-pi/routines/commit-gate/SKILL.md +60 -25
  50. package/plugins/ca-pi/routines/context-check/SKILL.md +89 -53
  51. package/plugins/ca-pi/routines/context-creation/SKILL.md +114 -220
  52. package/plugins/ca-pi/routines/decompose/SKILL.md +139 -167
  53. package/plugins/ca-pi/routines/executing-plans/SKILL.md +38 -136
  54. package/plugins/ca-pi/routines/finishing-a-development-branch/SKILL.md +45 -55
  55. package/plugins/ca-pi/routines/refactor/SKILL.md +27 -12
  56. package/plugins/ca-pi/routines/release/SKILL.md +1 -1
  57. package/plugins/ca-pi/routines/subagent-driven-development/SKILL.md +80 -230
  58. package/plugins/ca-pi/routines/tdd/SKILL.md +115 -228
  59. package/plugins/ca-pi/routines/writing-plans/SKILL.md +104 -174
  60. package/plugins/ca-pi/skills/ca-audit/SKILL.md +2 -2
  61. package/plugins/ca-pi/skills/ca-checkpoint/SKILL.md +1 -1
  62. package/plugins/ca-pi/skills/ca-commit/SKILL.md +60 -25
  63. package/plugins/ca-pi/skills/ca-context-check/SKILL.md +89 -53
  64. package/plugins/ca-pi/skills/ca-create-context/SKILL.md +114 -220
  65. package/plugins/ca-pi/skills/ca-decompose/SKILL.md +139 -167
  66. package/plugins/ca-pi/skills/ca-feature/SKILL.md +21 -38
  67. package/plugins/ca-pi/skills/ca-fix/SKILL.md +15 -9
  68. package/plugins/ca-pi/skills/ca-init/SKILL.md +18 -40
  69. package/plugins/ca-pi/skills/ca-pr/SKILL.md +45 -55
  70. package/plugins/ca-pi/skills/ca-refactor/SKILL.md +27 -12
  71. package/plugins/ca-pi/skills/ca-release/SKILL.md +1 -1
  72. package/plugins/ca-pi/skills/ca-review/SKILL.md +5 -8
  73. package/plugins/ca-pi/skills/ca-sprint/SKILL.md +11 -25
  74. package/plugins/ca-pi/skills/ca-status/SKILL.md +15 -6
@@ -18,28 +18,24 @@ Dispatched by `decision-variance` and `context-creation` to scan an assigned cod
18
18
  - Codebase sections have natural ownership boundaries that map to scout assignments.
19
19
  - Parallel evidence gathering across multiple areas is needed.
20
20
 
21
- Under ~50 files, `decision-variance` scans inline. When a qualified context
22
- profile becomes available, `context-creation` dispatches its six fixed,
23
- isolated scout assignments because its report-only synthesis boundary depends
24
- on the orchestrator not reading raw source.
21
+ Under ~50 files, `decision-variance` scans inline. `context-creation` uses
22
+ direct bounded inspection or optional scoped agents according to the work.
23
+ Six logical categories do not require six children or parallel execution.
25
24
 
26
25
  ## Context-creation assignment
27
26
 
28
- The shared `scout` frontmatter includes Bash for existing `decision-variance`
29
- assignments. It is therefore not a context-creation containment profile.
30
- `context-creation` must BLOCK before dispatch until the active host supplies a
31
- separate, fresh child identity with host-enforced read-only restriction and an
32
- observed denied benign write, successful source read, and bounded report
33
- delivery. A prose instruction to avoid writes is not enforcement. An explicit
34
- session-only `context-scout` may retain Bash solely for exact, frozen
35
- `git hash-object -- '<source path>'` reads when a caller-owned command guard and
36
- read-only OS phase are independently qualified. No other Bash command is part
37
- of this assignment, and the inherited shared `scout` role remains ineligible. This
38
- assignment preserves report-only synthesis; the orchestrator uses reports and
39
- does not load raw source after pre-flight. A qualified context scout must emit
40
- the versioned closed report envelope accepted by `_contextreportlib`, bound to
41
- its assignment, attempt, snapshot and scope. A trusted read-only hash collector
42
- must supply each cited digest when the restricted child has no Bash.
27
+ Read only the assigned source scope and return a bounded evidence report.
28
+ Respect actual host permissions, excluded paths and secret-handling rules.
29
+ The role's tools and read-only instructions are not evidence of containment;
30
+ do not claim a trusted sandbox, independent verification or authority from
31
+ this role label. A separately required host restriction remains binding.
32
+ Do not modify files, execute repository scripts or spawn further agents.
33
+
34
+ Name the assignment, inspected paths and source identity, citations/digests,
35
+ coverage, unknowns and conflicts. The parent can directly inspect a necessary
36
+ source or resolve a missing report. Use `_contextreportlib`'s closed envelope
37
+ when the caller selects that structured transport; do not invent an envelope
38
+ or receipt to make direct inspection appear delegated.
43
39
 
44
40
  For context-creation, report each assigned category even when the search finds
45
41
  no match. Use the closed outcome vocabulary: `observed`, `not_applicable`,
@@ -83,7 +79,13 @@ Constraints:
83
79
 
84
80
  Decision-variance scouts return this exact format.
85
81
 
86
- **Hash field:** For decision-variance assignments, emit each cited file's `git hash-object <path>` oid in the `hash` field. That legacy role has Bash. A context-creation assignment needs a digest in the method and shape required by the closed report decoder. A qualified context-specific Bash route may use only its frozen exact `git hash-object -- '<source path>'` commands and must label the result `git-blob-normalized-sha1`. A different qualified read-only collector may provide `sha256-raw`, retaining that distinct method identity. A missing actual digest blocks the citation; neither the caller's snapshot checksum nor an injected answer substitutes for the child's or trusted collector's observed result. A git oid is not a code excerpt; the "no excerpts" rule (file path and line numbers only) is not violated by including an oid.
82
+ **Hash field:** For decision-variance assignments, emit each cited file's
83
+ `git hash-object <path>` oid in the `hash` field. Context assignments retain
84
+ the actual collector and digest method, distinguishing `git-blob-normalized-sha1`
85
+ from `sha256-raw`. Do not substitute a snapshot checksum for a cited file's
86
+ observed digest. A source hash binds bytes, not semantic correctness. Missing
87
+ digests remain unknown until a permitted read obtains them; no secret values
88
+ or raw excerpts belong in the report.
87
89
 
88
90
  ```markdown
89
91
  # Scout Report — <scope>
@@ -120,9 +122,8 @@ The scout reports file path and line number only — no code excerpts, quoted te
120
122
  1. **Signal-to-noise** — excerpts grow unbounded under load; entire files get pasted "for context" and reports become unreadable.
121
123
  2. **Sensitive content** — scaffold may carry secrets, internal URLs, cloud account IDs, credentials, hostnames. Quoting those leaks them into the dispatching skill's working files.
122
124
 
123
- When `decision-variance` needs actual content, it may read the file directly.
124
- `context-creation` never does so after Phase 1; it synthesizes only from the six
125
- scout reports.
125
+ When either owning workflow needs actual content, it may read the necessary
126
+ source directly under the same host permissions and secret-handling boundaries.
126
127
 
127
128
  ## Scout Confidence Levels
128
129
 
@@ -138,7 +139,7 @@ The scout MUST NOT:
138
139
 
139
140
  1. **Judge correctness.** "This looks wrong" is not the scout's call.
140
141
  2. **Compare scope against artifacts.** The scout has no knowledge of them.
141
- 3. **Speculate beyond evidence.** No evidence in a file → report it absent.
142
+ 3. **Speculate beyond evidence.** No match → report the searched scope and limits, not universal absence.
142
143
  4. **Modify files.** Read-only.
143
144
  5. **Spawn further subagents.** Only the dispatching skill spawns subagents.
144
145
  6. **Include excerpts, quotes, or pasted content.** File path and line number only.
@@ -27,7 +27,7 @@ no emojis, no flattery.
27
27
  - MUST NOT commit without `commit-gate` completing, or while the test suite is red. Sole exception: a `spike/*` branch (via `/spike`), which can never merge or PR.
28
28
  - MUST NOT resolve a `[CONFIRM-NN]` by guessing.
29
29
  - MUST NOT redefine domain vocabulary without updating `.codearbiter/CONTEXT.md`.
30
- - MUST log every `/override`, every `/sprint` auto-decision, and every mode transition (`mode --dangerous`, `mode --ops`, and the return to `mode --arbiter`) to the `.codearbiter/` audit trail.
30
+ - MUST log every `/override`, material sprint decisions, and every mode transition (`mode --dangerous`, `mode --ops`, and the return to `mode --arbiter`) to the `.codearbiter/` audit trail.
31
31
  - MUST load skill/routine bodies on invocation only; the `INDEX.md` files are the surface scan. No bulk reads.
32
32
 
33
33
  ---
@@ -61,9 +61,11 @@ Before dispatching roles, editing audit files, or using native compaction, load
61
61
 
62
62
  **Loaded fully on invocation, never acted on from memory:**
63
63
 
64
- - `/ca-sprint` — autonomous sprint: load and follow `<plugin-root>/SPRINT.md`. One
65
- interactive spec gate, then autonomous execution with every non-hard-gate decision SMARTS-scored
66
- and logged; hard gates remain true stops. A trailing `--farm` flag passes through to `SPRINT.md`.
64
+ - `/ca-sprint` — autonomous sprint: load and follow `<plugin-root>/SPRINT.md`. Maintain
65
+ the agreed spec and plan under the existing authorization, implement useful work, and report
66
+ actual checks. Ask about consequential unresolved choices and respect explicit user checkpoints;
67
+ artifact state adds no permission gate. Use SMARTS for difficult trade-offs when useful and log
68
+ material sprint decisions. A trailing `--farm` flag passes through to `SPRINT.md`.
67
69
 
68
70
  A gates-off posture is a deterministic `mode --dangerous` token flip, intercepted before this
69
71
  document is ever loaded for that turn — not a command, and not routed here. `includes/dangerous-mode.md`
@@ -143,7 +143,7 @@
143
143
  },
144
144
  "context-check": {
145
145
  "name": "context-check",
146
- "description": "Audit stale provenance-tracked docs on request. Report first; re-scout or re-baseline only for selected docs.",
146
+ "description": "Inspect context drift and refresh selected source-backed documents under existing authorization.",
147
147
  "skillPath": "skills/ca-context-check/SKILL.md",
148
148
  "visibility": "alias",
149
149
  "workflow": "operate",
@@ -152,7 +152,7 @@
152
152
  },
153
153
  "create-context": {
154
154
  "name": "create-context",
155
- "description": "Build project context from an existing codebase through isolated scouts, resolve gaps, and preserve initialization gates.",
155
+ "description": "Build source-backed project context through bounded inspection, optional agents, and safe selected writes.",
156
156
  "skillPath": "skills/ca-create-context/SKILL.md",
157
157
  "visibility": "alias",
158
158
  "workflow": "initialize",
@@ -170,7 +170,7 @@
170
170
  },
171
171
  "decompose": {
172
172
  "name": "decompose",
173
- "description": "Develop greenfield project context through a layered interview, preserve decisions, and initialize only after the required gates.",
173
+ "description": "Develop greenfield context from a durable interview and initialize it through the native context writer.",
174
174
  "skillPath": "skills/ca-decompose/SKILL.md",
175
175
  "visibility": "alias",
176
176
  "workflow": "initialize",
@@ -188,7 +188,7 @@
188
188
  },
189
189
  "feature": {
190
190
  "name": "feature",
191
- "description": "Start a feature: brainstorm a spec, get it approved, then drive it test-first through the pipeline. The one entry to implementation.",
191
+ "description": "Build an authorized feature from a maintained specification, testable criteria and useful plan, without duplicating user approval.",
192
192
  "skillPath": "skills/ca-feature/SKILL.md",
193
193
  "visibility": "core",
194
194
  "workflow": "change",
@@ -311,7 +311,7 @@
311
311
  },
312
312
  "sprint": {
313
313
  "name": "sprint",
314
- "description": "Autonomous sprint — one interactive spec gate, then plan-to-PR execution with every auto-decision SMARTS-scored and logged. Hard gates remain true stops.",
314
+ "description": "Run an autonomous sprint from maintained specs and plans, with truthful verification and no duplicate artifact approval ceremonies.",
315
315
  "skillPath": "skills/ca-sprint/SKILL.md",
316
316
  "visibility": "core",
317
317
  "workflow": "change",
@@ -2,47 +2,47 @@
2
2
  "format": "codearbiter.artifact-release/0.1.0",
3
3
  "version": "0.1.0",
4
4
  "protocol": "codearbiter.artifact-api/0.1.0",
5
- "schema_version": "0.3.1",
5
+ "schema_version": "0.3.2",
6
6
  "binaries": {
7
7
  "darwin/amd64": {
8
8
  "file": "ca-artifact-darwin-amd64",
9
- "sha256": "42f302c05c66b22294bff0bdacbd28d5373ddd64b447f087a4532cd99f0a1b6c",
9
+ "sha256": "1849b2d8abaa5ef76a4f1682bc75ba2fcf452b55d3c66f7bb6a16b141558438d",
10
10
  "native_tested": true
11
11
  },
12
12
  "darwin/arm64": {
13
13
  "file": "ca-artifact-darwin-arm64",
14
- "sha256": "adf818a92d6d45db8d13a4ec685b2e2e14ddd19d0978c3d820541c45ed5cd4d9",
14
+ "sha256": "7ee24e5ddd330a2b52336470cd28635b7f1ea16a235fd377058952d5696b0e15",
15
15
  "native_tested": true
16
16
  },
17
17
  "linux/amd64": {
18
18
  "file": "ca-artifact-linux-amd64",
19
- "sha256": "8090a552d8a40bd3d37075eb81005d4e2bc4cdefac3ecb04cef8d72ef00f64d5",
19
+ "sha256": "1d20e9dfdc663c4f3d82f82cb1df861261304acf439f604f7bddc33a79f6af91",
20
20
  "native_tested": true
21
21
  },
22
22
  "linux/arm64": {
23
23
  "file": "ca-artifact-linux-arm64",
24
- "sha256": "0e65ced478bc490e80d6ab5323d307ceffdf42830709563cd6740ef5f35fb069",
24
+ "sha256": "94a54eb7e83a4992a4ee78b98b7946d2332e2a007ad7fd4ec14a3e332ad16651",
25
25
  "native_tested": true
26
26
  },
27
27
  "windows/amd64": {
28
28
  "file": "ca-artifact-windows-amd64.exe",
29
- "sha256": "687e362c216634b531371b4238d129a5f09df716d8cf73b6123f20d4c40c9d36",
29
+ "sha256": "d8f0bafd5f1949d93e87fb3cec7222ad9757087e30f7ea06268f148897f5b5a7",
30
30
  "native_tested": true
31
31
  },
32
32
  "windows/arm64": {
33
33
  "file": "ca-artifact-windows-arm64.exe",
34
- "sha256": "bc4920311a4e3768439b9c35bd0aca77f1ab964011d7812dd8932fc7360527a0",
34
+ "sha256": "be36ede70afe3dfc57afcd1ff2f5be5b36134ac383998c10145809bd0b80f459",
35
35
  "native_tested": true
36
36
  }
37
37
  },
38
38
  "context_qualification": {
39
39
  "darwin/amd64": {
40
- "source_commit": "0e96f44ac68b2d17d5bb8b4a75a72ea35e41193e",
40
+ "source_commit": "36685a40ab035074be04bb7204618acbb0a2dfdf",
41
41
  "workflow": ".github/workflows/ci.yml",
42
- "run_id": "38467644295",
43
- "binary_sha256": "42f302c05c66b22294bff0bdacbd28d5373ddd64b447f087a4532cd99f0a1b6c",
44
- "observation_sha256": "aba4d166fee93b949db5c489e11c855afce427a2491e52973c561f8f102f2535",
45
- "module_sha256": "e482ad7b0c9264711828ac8404c624517b893981b45712d70ead0fb0ef3b5522",
42
+ "run_id": "38995632892",
43
+ "binary_sha256": "1849b2d8abaa5ef76a4f1682bc75ba2fcf452b55d3c66f7bb6a16b141558438d",
44
+ "observation_sha256": "4b2b1f09e54d99fe7e7cc0ca177b80c2ac5d47e6428eddd551453a13ac2b272f",
45
+ "module_sha256": "91fed16f177e249d082638387a5f6e8d38dcb33604f357e8296b2f0124a4ca2a",
46
46
  "native_cases": [
47
47
  "TestContextBoundedRender",
48
48
  "TestContextDocumentContract",
@@ -53,12 +53,12 @@
53
53
  ]
54
54
  },
55
55
  "darwin/arm64": {
56
- "source_commit": "0e96f44ac68b2d17d5bb8b4a75a72ea35e41193e",
56
+ "source_commit": "36685a40ab035074be04bb7204618acbb0a2dfdf",
57
57
  "workflow": ".github/workflows/ci.yml",
58
- "run_id": "38467644295",
59
- "binary_sha256": "adf818a92d6d45db8d13a4ec685b2e2e14ddd19d0978c3d820541c45ed5cd4d9",
60
- "observation_sha256": "b072ecf41993067d01ba63d09de0eceec46fc37a62f9289c9f18140549feb360",
61
- "module_sha256": "e482ad7b0c9264711828ac8404c624517b893981b45712d70ead0fb0ef3b5522",
58
+ "run_id": "38995632892",
59
+ "binary_sha256": "7ee24e5ddd330a2b52336470cd28635b7f1ea16a235fd377058952d5696b0e15",
60
+ "observation_sha256": "3a30a7b8a8d719ac8f261f3c9094bae62a5d9e3db31b565dc401d21486ed48f3",
61
+ "module_sha256": "91fed16f177e249d082638387a5f6e8d38dcb33604f357e8296b2f0124a4ca2a",
62
62
  "native_cases": [
63
63
  "TestContextBoundedRender",
64
64
  "TestContextDocumentContract",
@@ -69,12 +69,12 @@
69
69
  ]
70
70
  },
71
71
  "linux/amd64": {
72
- "source_commit": "0e96f44ac68b2d17d5bb8b4a75a72ea35e41193e",
72
+ "source_commit": "36685a40ab035074be04bb7204618acbb0a2dfdf",
73
73
  "workflow": ".github/workflows/ci.yml",
74
- "run_id": "38467644295",
75
- "binary_sha256": "8090a552d8a40bd3d37075eb81005d4e2bc4cdefac3ecb04cef8d72ef00f64d5",
76
- "observation_sha256": "a7feff5b0805cad3778559ea988bd4c0469b794c84f04b0edb8f7a4e9b6a3121",
77
- "module_sha256": "e482ad7b0c9264711828ac8404c624517b893981b45712d70ead0fb0ef3b5522",
74
+ "run_id": "38995632892",
75
+ "binary_sha256": "1d20e9dfdc663c4f3d82f82cb1df861261304acf439f604f7bddc33a79f6af91",
76
+ "observation_sha256": "d977095e8db3aa5bd71fd2db318292d6c6da3aa716b1253ae7ad0fe95780c475",
77
+ "module_sha256": "91fed16f177e249d082638387a5f6e8d38dcb33604f357e8296b2f0124a4ca2a",
78
78
  "native_cases": [
79
79
  "TestContextBoundedRender",
80
80
  "TestContextDocumentContract",
@@ -85,12 +85,12 @@
85
85
  ]
86
86
  },
87
87
  "linux/arm64": {
88
- "source_commit": "0e96f44ac68b2d17d5bb8b4a75a72ea35e41193e",
88
+ "source_commit": "36685a40ab035074be04bb7204618acbb0a2dfdf",
89
89
  "workflow": ".github/workflows/ci.yml",
90
- "run_id": "38467644295",
91
- "binary_sha256": "0e65ced478bc490e80d6ab5323d307ceffdf42830709563cd6740ef5f35fb069",
92
- "observation_sha256": "197e0321d9bd36cadb453b90be82c6c92bdddeacf1cb4f45fb9b72e2d560bf86",
93
- "module_sha256": "e482ad7b0c9264711828ac8404c624517b893981b45712d70ead0fb0ef3b5522",
90
+ "run_id": "38995632892",
91
+ "binary_sha256": "94a54eb7e83a4992a4ee78b98b7946d2332e2a007ad7fd4ec14a3e332ad16651",
92
+ "observation_sha256": "24d3bdce7f5044e3c5dda44b0f2a5ccd37bd0821408aa8f62b5b329aacd8e98b",
93
+ "module_sha256": "91fed16f177e249d082638387a5f6e8d38dcb33604f357e8296b2f0124a4ca2a",
94
94
  "native_cases": [
95
95
  "TestContextBoundedRender",
96
96
  "TestContextDocumentContract",
@@ -101,12 +101,12 @@
101
101
  ]
102
102
  },
103
103
  "windows/amd64": {
104
- "source_commit": "0e96f44ac68b2d17d5bb8b4a75a72ea35e41193e",
104
+ "source_commit": "36685a40ab035074be04bb7204618acbb0a2dfdf",
105
105
  "workflow": ".github/workflows/ci.yml",
106
- "run_id": "38467644295",
107
- "binary_sha256": "687e362c216634b531371b4238d129a5f09df716d8cf73b6123f20d4c40c9d36",
108
- "observation_sha256": "b60d2cad282358a382579eebff46acfcf2620817cbe5b27f3dd2c8c469203147",
109
- "module_sha256": "e482ad7b0c9264711828ac8404c624517b893981b45712d70ead0fb0ef3b5522",
106
+ "run_id": "38995632892",
107
+ "binary_sha256": "d8f0bafd5f1949d93e87fb3cec7222ad9757087e30f7ea06268f148897f5b5a7",
108
+ "observation_sha256": "eb42182fceca7bdb85924d382a8cf3917fb49b9c2a8a32ccd563a3acab245547",
109
+ "module_sha256": "91fed16f177e249d082638387a5f6e8d38dcb33604f357e8296b2f0124a4ca2a",
110
110
  "native_cases": [
111
111
  "TestContextBoundedRender",
112
112
  "TestContextDocumentContract",
@@ -117,12 +117,12 @@
117
117
  ]
118
118
  },
119
119
  "windows/arm64": {
120
- "source_commit": "0e96f44ac68b2d17d5bb8b4a75a72ea35e41193e",
120
+ "source_commit": "36685a40ab035074be04bb7204618acbb0a2dfdf",
121
121
  "workflow": ".github/workflows/ci.yml",
122
- "run_id": "38467644295",
123
- "binary_sha256": "bc4920311a4e3768439b9c35bd0aca77f1ab964011d7812dd8932fc7360527a0",
124
- "observation_sha256": "9211b4fc92a9cc819a120d2e71c08bdfb75a3996f8eb433bd7b9a426121c50ef",
125
- "module_sha256": "e482ad7b0c9264711828ac8404c624517b893981b45712d70ead0fb0ef3b5522",
122
+ "run_id": "38995632892",
123
+ "binary_sha256": "be36ede70afe3dfc57afcd1ff2f5be5b36134ac383998c10145809bd0b80f459",
124
+ "observation_sha256": "12b1ba42509dd791bebf60df616608e7dbf50359175f90a3cf7a857c3c82cad8",
125
+ "module_sha256": "91fed16f177e249d082638387a5f6e8d38dcb33604f357e8296b2f0124a4ca2a",
126
126
  "native_cases": [
127
127
  "TestContextBoundedRender",
128
128
  "TestContextDocumentContract",
@@ -345,6 +345,38 @@ def cancel_user_approval(root: str | Path, artifact_id: str) -> dict[str, Any]:
345
345
  return {"artifact_id": artifact_id, "cancelled": True}
346
346
 
347
347
 
348
+ def retire_unanswered_user_approval(
349
+ root: str | Path, artifact_id: str, *, reason: str,
350
+ ) -> dict[str, Any]:
351
+ """Retire only an unsubmitted historical paired prompt, not an approval.
352
+
353
+ The older single-artifact 0.1 marker cannot establish whether a reply
354
+ was captured and its write outcome lost. It is therefore not eligible
355
+ for this automatic cleanup. The paired adapter serializes cancellation
356
+ against the genuine reply consumer and checks the durable submission.
357
+ """
358
+ if (not isinstance(artifact_id, str) or re.fullmatch(r"[A-Z][A-Z0-9-]{1,79}", artifact_id) is None
359
+ or not isinstance(reason, str) or not reason.strip()
360
+ or len(reason.encode("utf-8")) > 2048):
361
+ raise ApprovalError("INVALID_RETIREMENT", "retirement requires a valid artifact ID and bounded nonblank reason")
362
+ root = Path(root).resolve(strict=True)
363
+ pending = _load_pending(root)
364
+ if pending is None or pending["artifact_id"] != artifact_id:
365
+ raise ApprovalError("NO_PENDING_APPROVAL", "no matching pending approval request")
366
+ if pending["format"] != "codearbiter.pending-user-approval/0.2.0":
367
+ raise ApprovalError("LEGACY_APPROVAL_RECOVERY_REQUIRED",
368
+ "single-artifact pending state cannot prove a user reply was unsubmitted")
369
+ import _sprintapprovallib
370
+ # Uses the existing private per-repository lock and independently checks
371
+ # the current marker and durable submission before deleting either route.
372
+ _sprintapprovallib.cancel(root, pending)
373
+ return {
374
+ "artifact_id": artifact_id, "disposition": "unanswered_prompt_superseded",
375
+ "reason": reason.strip(), "authority_granted": False, "mutation_attempted": False,
376
+ }
377
+
378
+
379
+
348
380
  def consume_user_approval(
349
381
  root: str | Path,
350
382
  client: Any,
@@ -489,6 +521,10 @@ def main(argv: list[str] | None = None) -> int:
489
521
  cancel = sub.add_parser("cancel")
490
522
  cancel.add_argument("--root", required=True)
491
523
  cancel.add_argument("--artifact-id", required=True)
524
+ retire = sub.add_parser("retire")
525
+ retire.add_argument("--root", required=True)
526
+ retire.add_argument("--artifact-id", required=True)
527
+ retire.add_argument("--reason", required=True)
492
528
  pair = sub.add_parser("arm-sprint")
493
529
  pair.add_argument("--root", required=True)
494
530
  pair.add_argument("--spec-id", required=True)
@@ -504,6 +540,11 @@ def main(argv: list[str] | None = None) -> int:
504
540
  if args.command == "cancel":
505
541
  print(json.dumps(cancel_user_approval(args.root, args.artifact_id)))
506
542
  return 0
543
+ if args.command == "retire":
544
+ print(json.dumps(retire_unanswered_user_approval(
545
+ args.root, args.artifact_id, reason=args.reason,
546
+ )))
547
+ return 0
507
548
  client = _artifactlib.ArtifactClient(
508
549
  args.root, _artifactlib.helper_installation(__file__)
509
550
  )