@arbiterforge/ca-pi 0.18.4 → 0.20.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 (80) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/plugins/ca-pi/CHANGELOG.md +63 -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 +44 -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/grader.md +5 -4
  11. package/plugins/ca-pi/agents/infra-author.md +6 -7
  12. package/plugins/ca-pi/agents/scout.md +25 -24
  13. package/plugins/ca-pi/arbiter.md +6 -4
  14. package/plugins/ca-pi/generated/command-catalog.json +5 -5
  15. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-amd64 +0 -0
  16. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-arm64 +0 -0
  17. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-amd64 +0 -0
  18. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-arm64 +0 -0
  19. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-amd64.exe +0 -0
  20. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-arm64.exe +0 -0
  21. package/plugins/ca-pi/helpers/artifacts/release.json +37 -37
  22. package/plugins/ca-pi/hooks/_approvallib.py +41 -0
  23. package/plugins/ca-pi/hooks/_artifactlib.py +61 -115
  24. package/plugins/ca-pi/hooks/_artifactpromptlib.py +12 -12
  25. package/plugins/ca-pi/hooks/_bashguardlib.py +66 -4
  26. package/plugins/ca-pi/hooks/_contextselectlib.py +38 -35
  27. package/plugins/ca-pi/hooks/_contextwriterlib.py +114 -0
  28. package/plugins/ca-pi/hooks/_host.py +1 -1
  29. package/plugins/ca-pi/hooks/_prerequisitelib.py +35 -0
  30. package/plugins/ca-pi/hooks/_provenancelib.py +107 -1
  31. package/plugins/ca-pi/hooks/_readinjectlib.py +21 -7
  32. package/plugins/ca-pi/hooks/_reconciliationlib.py +167 -2
  33. package/plugins/ca-pi/hooks/_releaselib.py +6 -6
  34. package/plugins/ca-pi/hooks/_sprintapprovallib.py +52 -2
  35. package/plugins/ca-pi/hooks/artifact-reconcile.py +13 -4
  36. package/plugins/ca-pi/hooks/hostapi.py +1 -1
  37. package/plugins/ca-pi/hooks/init-codearbiter.py +34 -5
  38. package/plugins/ca-pi/includes/artifacts-attestation.md +434 -0
  39. package/plugins/ca-pi/includes/artifacts.md +138 -492
  40. package/plugins/ca-pi/includes/author-tdd-workflow.md +32 -21
  41. package/plugins/ca-pi/includes/fresh-verification.md +14 -12
  42. package/plugins/ca-pi/includes/harvest.md +3 -3
  43. package/plugins/ca-pi/includes/reference-map.md +1 -1
  44. package/plugins/ca-pi/includes/routing-table.md +3 -3
  45. package/plugins/ca-pi/includes/smarts/core.md +93 -17
  46. package/plugins/ca-pi/includes/smarts/lenses.md +115 -0
  47. package/plugins/ca-pi/includes/sprint-authority.md +6 -1
  48. package/plugins/ca-pi/includes/verification-boundary.md +11 -2
  49. package/plugins/ca-pi/package.json +1 -1
  50. package/plugins/ca-pi/routines/INDEX.md +8 -8
  51. package/plugins/ca-pi/routines/brainstorming/SKILL.md +71 -202
  52. package/plugins/ca-pi/routines/commit-gate/SKILL.md +60 -25
  53. package/plugins/ca-pi/routines/context-check/SKILL.md +89 -53
  54. package/plugins/ca-pi/routines/context-creation/SKILL.md +114 -220
  55. package/plugins/ca-pi/routines/debug/SKILL.md +1 -0
  56. package/plugins/ca-pi/routines/decision-variance/references/analysis.md +5 -2
  57. package/plugins/ca-pi/routines/decompose/SKILL.md +139 -167
  58. package/plugins/ca-pi/routines/executing-plans/SKILL.md +38 -136
  59. package/plugins/ca-pi/routines/finishing-a-development-branch/SKILL.md +45 -55
  60. package/plugins/ca-pi/routines/refactor/SKILL.md +33 -12
  61. package/plugins/ca-pi/routines/release/SKILL.md +1 -1
  62. package/plugins/ca-pi/routines/subagent-driven-development/SKILL.md +88 -230
  63. package/plugins/ca-pi/routines/tdd/SKILL.md +115 -228
  64. package/plugins/ca-pi/routines/writing-plans/SKILL.md +112 -174
  65. package/plugins/ca-pi/skills/ca-audit/SKILL.md +2 -2
  66. package/plugins/ca-pi/skills/ca-checkpoint/SKILL.md +1 -1
  67. package/plugins/ca-pi/skills/ca-commit/SKILL.md +60 -25
  68. package/plugins/ca-pi/skills/ca-context-check/SKILL.md +89 -53
  69. package/plugins/ca-pi/skills/ca-create-context/SKILL.md +114 -220
  70. package/plugins/ca-pi/skills/ca-debug/SKILL.md +1 -0
  71. package/plugins/ca-pi/skills/ca-decompose/SKILL.md +139 -167
  72. package/plugins/ca-pi/skills/ca-feature/SKILL.md +28 -38
  73. package/plugins/ca-pi/skills/ca-fix/SKILL.md +21 -9
  74. package/plugins/ca-pi/skills/ca-init/SKILL.md +18 -40
  75. package/plugins/ca-pi/skills/ca-pr/SKILL.md +45 -55
  76. package/plugins/ca-pi/skills/ca-refactor/SKILL.md +33 -12
  77. package/plugins/ca-pi/skills/ca-release/SKILL.md +1 -1
  78. package/plugins/ca-pi/skills/ca-review/SKILL.md +5 -8
  79. package/plugins/ca-pi/skills/ca-sprint/SKILL.md +11 -25
  80. package/plugins/ca-pi/skills/ca-status/SKILL.md +15 -6
@@ -1,27 +1,38 @@
1
- # Author TDD workflow — non-negotiable, fixed order
1
+ # Author verification workflow
2
2
 
3
- Canonical for the author agents (`backend-author`, `frontend-author`, `infra-author`). Loaded via each agent's
4
- Required Reading; the agent bodies do not restate it. This is the worker's execution order for
5
- one task — the tdd skill's phase gates govern the lane above it.
6
- Apply `<plugin-root>/includes/verification-boundary.md` throughout.
3
+ Use the caller's scoped obligations and selected verification approach from
4
+ `<plugin-root>/routines/tdd/SKILL.md`. Keep each obligation tied to its source and
5
+ proving check. Apply `<plugin-root>/includes/verification-boundary.md` for local
6
+ checks and exact-head hosted CI.
7
7
 
8
- Use the Phase 1 checklist for the owning route. For a bug-origin `/fix`, carry the
9
- current expectation, cited evidence, supported cause, and regression oracle into
10
- the existing obligation ledger; confirm the original caller's repair authority and
11
- source freshness through the fix owner. Do not fabricate a feature artifact. For
12
- `/feature`, keep the approved spec and its criteria; for `/refactor`, keep its
13
- approved surface and parity contract. An ADR remains a user-attributed decision
14
- through `/adr`, never an author shortcut.
8
+ | Route | Required evidence |
9
+ |---|---|
10
+ | /fix | Observe genuine target RED before repair, then fresh GREEN for the same named regression with unchanged assertions. Reuse an adequate current bug-origin RED. |
11
+ | /feature | Keep the agreed spec and criteria. Prefer test-first work; existing implementation may use current criterion-focused checks and meaningful negative controls. Report the observed sequence accurately. |
12
+ | /refactor | Keep the approved surface and parity contract. Establish passing characterization before restructuring and preserve baseline assertions throughout implementation. |
15
13
 
16
- Fixed order. Do not skip or reorder.
14
+ For a bug-origin fix, carry the current expectation, cited evidence, supported
15
+ cause and regression oracle into the existing obligation ledger. Check the
16
+ original caller's repair authority and source freshness through the fix owner.
17
+ Do not fabricate a feature artifact. An ADR remains a user-attributed decision
18
+ through `/adr`.
17
19
 
18
- 1. **Map failing tests** — bind each Phase 1 obligation to a test ID. For `/fix`, assess an existing failing test against target red using the current regression oracle and evidence. Name the existing test ID in the ledger and reuse that named existing target-red test when its oracle is adequate and the assertion matches the defect. Do not duplicate a test because of its age or because it predates repair. Add tests only for uncovered obligations.
19
- 2. **Confirm tests are red for the right reason** — run the test command from `tech-stack.md`; the target failure must match the obligation. Record unrelated existing failures in the baseline; an unrelated failure is not target red. An import or setup error is not target red. Preserve and report their identities and outputs. Required commit gates remain blocked while required checks fail. Do not skip tests, suppress failures, or waive gates to proceed.
20
- 3. **Write minimum implementation** — only enough code to make the failing tests pass; no extra scope
21
- 4. **Run impact-bounded local suite** — rerun the same named target test for fresh green on the repaired source, with its assertions unchanged between red and green. Rerun fresh affected-contract tests on that source and record their results; exhaustive and cross-platform proof runs in exact-head hosted CI before merge
22
- 5. **Run lint and type-check** — both clean
23
- 6. **Stage for commit** — only after steps 1–5 complete
20
+ Name the existing target test and reuse it when its assertion matches the defect;
21
+ add tests for uncovered obligations. An import, setup or unrelated failure is not
22
+ target RED. Retain unrelated baseline failures and their outputs. A material
23
+ fixture or setup change requires renewed target RED on the broken source before
24
+ claiming RED-to-GREEN. Preserve the regression's assertions between those runs.
24
25
 
25
- For a repair, observe target red on the broken source before minimum implementation. If a material fixture or setup change occurs after that observation, the earlier red no longer qualifies: repeat target red on the broken implementation with the changed fixture or setup before continuing the repair. Keep the test's assertions unchanged between red and green.
26
+ For intermittent or timing defects, prefer a faithful deterministic seam.
27
+ Otherwise declare a finite repeated-trial bound and failure oracle before running
28
+ it. Report the sample limits; do not claim deterministic proof from a passing
29
+ sample or retry until GREEN.
26
30
 
27
- For an intermittent or timing defect, use a faithful deterministic seam when one exists. Otherwise define a finite repeated-trial oracle with its trial bound and pass/fail rule before running it. Record the stochastic sample limit; do not claim deterministic proof from a passing sample or retry until green. A failing trial must still match the target mechanism, and fresh green remains bounded by the stated oracle.
31
+ Implement only the assigned scope. Run its proving checks and affected existing
32
+ contracts on the resulting source, then applicable coverage, lint and type checks.
33
+ Preserve failures and actual user stops; never skip tests, suppress failures or
34
+ waive required checks to obtain a pass.
35
+
36
+ Return changed paths, obligation evidence, actual commands/cwd/results and pending
37
+ checks to the caller. Stage only when that action is assigned and authorized;
38
+ committing and publication retain their own owners and permissions.
@@ -1,14 +1,16 @@
1
- # Fresh-run verification
1
+ # Current verification evidence
2
2
 
3
- The shared proof-by-fresh-evidence discipline. Used by `subagent-driven-development` Phase 5 (per
4
- accepted task, against the task's verification command) and `commit-gate` Phase 5 (the whole change,
5
- against the spec's acceptance criterion). Each caller supplies its own target; this is the common rule.
3
+ Verify the caller's actual task or acceptance criterion before claiming completion.
4
+ Read the command, cwd, relevant source and input identities, output and exit code.
5
+ A result is reusable across execution, commit and PR preparation when those inputs
6
+ still match and the observed behavior proves the required claim.
6
7
 
7
- A green suite proves the tests pass — not that the change does what was asked. Before accepting or
8
- committing:
9
-
10
- - **Run the proving command FRESH**, in a clean invocation, in this phase. Do not accept a logged
11
- result from an earlier phase, and never trust a subagent's self-report.
12
- - **Read the actual output AND the exit code.** A non-zero exit, or output that does not demonstrate
13
- the obligation/acceptance criterion, fails the gate and returns the work for correction.
14
- - A self-reported "it works" is never evidence — proof is.
8
+ - Reuse inspected current results, including an earlier phase's result. A phase
9
+ transition, bookkeeping edit or new receipt ID alone requires no rerun.
10
+ - Run the missing or affected check when evidence is absent, its inputs changed,
11
+ its scope is insufficient, or its outcome is unresolved. A passing general suite
12
+ cannot replace a missing criterion-specific check.
13
+ - Inspect delegated command output and its source binding before relying on it.
14
+ A self-report without accessible evidence is insufficient.
15
+ - Keep a relevant failure or contradictory later result visible until resolved.
16
+ Correct the affected work and rerun its check; preserve unrelated valid results.
@@ -43,14 +43,14 @@ as a **GitHub issue**, not the board.
43
43
  the board BUT record one audit line (`harvest declined: N candidates from <origin>`)
44
44
  to `triage.log` (append-only — use Edit/`>>`, never Write) so the decline is
45
45
  recoverable, not invisible.
46
- - **Autonomous (`/sprint`):** SMARTS-score the batch, auto-promote, and append each
46
+ - **Autonomous (`/sprint`):** promote in-scope follow-ups and append each
47
47
  promotion (id + `(from origin)`) to `sprint-log.md` — append-only, so use Edit/`>>`,
48
48
  never Write (H-05 blocks a Write to it). A blocking decision is never auto-promoted
49
49
  — it escalates and STOPs.
50
50
  4. **Apply.** On confirm, route each:
51
51
  - **work → `open-tasks.md`** — a queued, ID-less `- [ ] <desc> (from <origin>)` via
52
- `/ca-task add -- "<desc>" --from <origin>` (the `--` lets a desc start with `-`;
53
- add `--boundaries a,b` when the extractor supplied them).
52
+ `/ca-task add --from <origin> -- "<desc>"`. Put optional
53
+ `--boundaries a,b` before `--`; the terminator lets a description start with `-`.
54
54
  - **non-blocking decision → `open-questions.md`** "Deferred decisions" (a
55
55
  non-`CONFIRM-NN` bullet with the back-ref).
56
56
  - **blocking decision → ESCALATE**, never the Deferred-decisions section: `promote`
@@ -19,4 +19,4 @@ then route to the owning skill or agent. This map answers *what to read before t
19
19
  | Out-of-scope finding | — | inline `[NEEDS-TRIAGE]` marker (never an ADR); promoted to `open-tasks.md` by the harvest at the workflow's terminal step |
20
20
  | Following up on workflow residue / a backlog task | `open-tasks.md` (schema), `<plugin-root>/includes/harvest.md` | `/ca-task` writer; harvest (`extract_*` → `promote`) at a terminal step |
21
21
  | Generating a user-facing deliverable (UI, report, PR/CHANGELOG prose, slide, chart) | `<plugin-root>/includes/anti-slop-design/INDEX.md` (then `core` + the medium leaf) | `design-quality-reviewer` agent |
22
- | Provenance drift surfaced outside a commit (merge, external edit, SessionStart drift line) | `.codearbiter/.provenance/` + `.codearbiter/code-map.md` | `context-check` skill (`/ca-context-check`) |
22
+ | Provenance drift or requested refresh of initialized context | Selected documents + `.codearbiter/.provenance/` + `.codearbiter/code-map.md` | `context-check` skill (`/ca-context-check`); reuse the selected scope and existing authorization |
@@ -21,8 +21,8 @@ reached the same way.
21
21
 
22
22
  | Invocation cue | Primary route | Also dispatch | Hard gate |
23
23
  |---|---|---|---|
24
- | New feature | `/feature` Step 0 triage → full lane `brainstorming` → `writing-plans` → `executing-plans` → `tdd`, or logged small lane straight to `tdd` | `backend-`/`frontend-`/`infra-author` | No spec, no code; no code before `tdd` Phase 1; small lane only on all triage criteria, logged to `triage.log` |
25
- | Autonomous sprint | `/sprint` → `SPRINT.md` (brainstorm → plan → `subagent-driven-development`) | per-task impl authors + reviewers | One interactive spec gate; hard gates never auto-decided; every auto-decision logged |
24
+ | New feature | `/feature` Step 0 triage → full lane `brainstorming` → `writing-plans` → `executing-plans` → `tdd`, or logged small lane straight to `tdd` | `backend-`/`frontend-`/`infra-author` | Maintain useful full-lane spec/plan and applicable tests; small lane requires its listed criteria and triage log, not another permission question |
25
+ | Autonomous sprint | `/sprint` → `SPRINT.md` (brainstorm → plan → `subagent-driven-development`) | implementation or useful delegated authors; reviews by actual risk | No duplicate artifact approval; real host/security and unresolved material decisions remain stops; meaningful auto-decisions logged |
26
26
  | Bug fix | `/fix` → `tdd` (bug variant) | impl author | Failing regression test before any fix code |
27
27
  | Docs edit / dep bump / revert | `/chore` (type-scaled gates) | `dependency-reviewer` for deps | No behavioral code; suite green for deps/revert; exits via `commit-gate` |
28
28
  | Exploratory throwaway spike | `/spike` (self-contained command) → `spike/<slug>` branch | — | Never merges or PRs; `commit-gate`-exempt (nothing on the branch can land); exits to a findings note or `/feature` |
@@ -53,5 +53,5 @@ reached the same way.
53
53
  | Local runtime work (run, watch, exercise this repo's own app) | `mode --ops` → narrows the persona per `includes/ops-mode.md`, no skill/agent dispatch | — | Advisory only, no hook becomes mode-aware; permitted only when the operation starts, observes, or exercises and leaves no change in tracked files or git history — anything that mutates tracked files, the index, git history, or published state still routes normally |
54
54
  | Promote a workflow's un-actioned follow-ups | `includes/harvest.md` (run at a terminal step) → `/ca-task` (work) / `open-questions.md` (decision) | — | Batch-confirm interactive; SMARTS-logged auto under `/sprint`; dedup by `(from <origin>)`; a blocking decision escalates, never demoted |
55
55
  | Zero-onboarding dry-run of the reviewer fleet | `/ca-preview` (no skill; reuses `includes/review-matrix.md` to predict reviewers) | — | Read-only; writes nothing, stages nothing, `git status` unchanged; no `/ca-init` or `.codearbiter/` required; empty diff exits clean |
56
- | Manual drift audit of provenance-tracked docs (bypass / merge / external edit case) | `context-check` at `<plugin-root>/routines/context-check/SKILL.md` (explicit `/ca-status drift` or `/ca-context-check`) | — | Read-only unless user selects re-scout or re-baseline; MUST NOT commit on its own; not the daily loop — commit-gate auto-heal is the routine path |
56
+ | Context drift audit or requested scoped/full refresh of initialized context | `context-check` at `<plugin-root>/routines/context-check/SKILL.md` (explicit `/ca-status drift` or `/ca-context-check`) | — | Audits are read-only; a direct refresh request selects its scope without another per-document approval. Preserve unselected content and initialized state; MUST NOT commit on its own. Commit-gate auto-heal owns routine maintenance. |
57
57
  | Deep on-demand codebase audit | `tribunal` at `<plugin-root>/routines/tribunal/SKILL.md` (explicit `/ca-tribunal` retained) | `tribunal-lens-reviewer` per active lens (+ optional `map-structure`/`map-deps` on large repos) | Read-only until the filing gate; runs only after the user acknowledges the token estimate; never blocks a merge/commit; nothing filed or sent without explicit authorization |
@@ -1,10 +1,23 @@
1
- # SMARTS — lenses, cell rules, strength
1
+ # SMARTS — design-quality rubric
2
2
 
3
- The standardized evaluation for architectural variances. Apply the six lenses evenhandedly to every
4
- option. This is the project's framework; do not substitute another. This `core` file is everything the
5
- scoring path needs (decision-variance, the grader, the decision-challenger, and `/sprint` autonomous
6
- scoring). The append-only **decision-log entry format** lives separately in
7
- [`decision-log-format.md`](decision-log-format.md) — load it only when writing a log line.
3
+ SMARTS is codeArbiter's six-lens design-quality rubric for material engineering solution choices.
4
+ Workflow owners decide when a choice needs a scan, a full comparison, or delegated autonomous
5
+ handling; SMARTS itself does not grant authority. Architectural variance (decision-variance, the
6
+ grader, the decision-challenger) is one consumer of the rubric, not the definition of the framework.
7
+ Apply the six lenses evenhandedly to every option; this is the project's framework, do not substitute
8
+ another. This `core` file is everything a routine evaluation needs; the per-lens detail in [`lenses.md`](lenses.md)
9
+ is loaded only when a case named under the lenses below arises. The append-only **decision-log entry
10
+ format** lives separately in [`decision-log-format.md`](decision-log-format.md) — load it only when
11
+ writing a log line.
12
+
13
+ ## Evaluation depths
14
+
15
+ 1. **Scan** — a lightweight six-lens fitness pass when a choice is material but does not need the full table: name the material strengths, weaknesses, unknowns and decisive lenses; no full table is required in user-visible output.
16
+ 2. **Comparison** — the full option-by-option table, when two or more materially plausible approaches exist, when the user explicitly asks for a full SMARTS read, or when reconciliation or arbitration requires it.
17
+ 3. **Delegated decision** — a requested `/sprint` choosing a reversible in-scope method on the user's behalf and logging its reason in `.codearbiter/sprint-log.md`; no separate method grant is required.
18
+
19
+ All three depths use the semantics in this file; they differ in presentation, persistence and
20
+ decision authority, not in what the acronym means.
8
21
 
9
22
  ## Step 0 — recorded-intent check (before any lens is scored; ADR-0025)
10
23
 
@@ -37,8 +50,27 @@ Three outcomes:
37
50
  Fail-soft: an absent `plans/` or `decisions/` directory is not a gap to surface and never a STOP —
38
51
  record `intent: silent — no decomposition record` and proceed.
39
52
 
53
+ ## Context envelope
54
+
55
+ Before judging a material choice, establish only the context that makes the lenses meaningful:
56
+
57
+ - **decision** — the actual choice being made, stated when the request leaves it implicit.
58
+ - **scope/horizon** — the bounded system and planning horizon, when they change a verdict.
59
+ - **scale expectation** — only when scale could differentiate the options.
60
+ - **failure/availability expectation** — only when failure behavior could differentiate the options.
61
+ - **security/trust boundary** — only when it bears on Securable.
62
+ - **non-SMARTS constraints** — cost, schedule, team skill, vendor or stakeholder constraints, only when they materially affect the recommendation.
63
+
64
+ The envelope is scope-sized and fail-soft. No dimension is required for every choice, and it creates
65
+ no new project or configuration file: existing project context, the active spec, explicit user
66
+ steering and relevant recorded decisions supply the evidence when available.
67
+
40
68
  ## The six lenses
41
69
 
70
+ The summaries below settle most verdicts. Load the per-lens reference
71
+ [`lenses.md`](lenses.md) only when a verdict turns on a consideration these summaries do not
72
+ settle, or when the user asks for a full SMARTS read — never for a routine scan.
73
+
42
74
  - **Scalable** — supports growth in users, data, throughput, geography without an architectural rewrite. Trap: over-engineering for scale that never arrives, or under-engineering for scale that's on the roadmap.
43
75
  - **Maintainable** — can be understood, modified, and extended later (including by agents) without prohibitive effort. Standard patterns over bespoke abstractions; mind the refactoring blast radius and eventual hand-off.
44
76
  - **Available** — reachable and functional when needed, including under partial failure. Watch single points of failure, bundled-dependency failure, recovery time. Do not conflate availability with high availability.
@@ -46,33 +78,77 @@ record `intent: silent — no decomposition record` and proceed.
46
78
  - **Testable** — validated by deterministic, fast tests that cover real failure modes. Unit + integration + contract; mind mockability and test-data isolation. "Tests later" is a Weak verdict.
47
79
  - **Securable** — enables the project's security posture (per `<project-root>/.codearbiter/security-controls.md`) without retrofit. Authentication, authorization, audit, secret management, attack surface, default-deny stance, supply-chain integrity.
48
80
 
81
+ ## Verdicts
82
+
83
+ Every evaluated lens takes exactly one verdict:
84
+
85
+ - **Strong** — performs well for the stated context.
86
+ - **Adequate** — acceptable for the stated context.
87
+ - **Weak** — materially poor for the stated context.
88
+ - **Indifferent** — evidence shows the lens does not materially differentiate the options at the stated context and horizon. If any option marks a lens `Indifferent`, every option marks it `Indifferent`. In a single-option scan there is nothing to differentiate, so Indifferent means the lens is not material to this choice at the stated context; a lens that matters but lacks evidence is `Unknown`, never `Indifferent`.
89
+ - **Unknown** — the evidence needed to judge the lens is missing, contradictory or not yet established. Every Unknown names its missing observation (`missing_observation`) and states whether it is decision-critical (`decision_critical`: true when that observation could change the selected option); no other verdict carries those fields.
90
+
91
+ `Unknown` is not neutral: never treat it as `Indifferent`, `Adequate` or a pass, and never map it to
92
+ one. A recommendation may stand with a non-critical Unknown only when the output names the missing
93
+ observation and why it does not control the decision. A decision-critical Unknown blocks a `strong`
94
+ recommendation, blocks selecting the option that carries it, and is surfaced before any irreversible
95
+ or authority-bearing choice. A non-critical Unknown never shields a dominated option: on the selected
96
+ option it is no better than the other option's verdict on that lens, and strictly worse than a compared
97
+ `Strong`.
98
+
49
99
  ## Cell rules (hard)
50
100
 
51
101
  Each SMARTS cell is a constraint, not a guideline. A non-conformant cell is rejected.
52
102
 
53
103
  1. **Length cap** — at most 25 words per cell.
54
- 2. **Verdict-first** — every cell opens with one verdict word: `Strong` (performs well), `Adequate` (acceptable), `Weak` (poor), `Indifferent` (this lens does not differentiate the options at the current scale).
55
- 3. **Justification follows** — at most 20 words after the verdict.
56
- 4. **No hedging adverbs** — forbidden: potentially, might, arguably, perhaps, generally, tends to, could be, may. If genuinely uncertain, the verdict is `Indifferent`.
104
+ 2. **Verdict-first** — every cell opens with one verdict word: `Strong`, `Adequate`, `Weak`, `Indifferent` or `Unknown`.
105
+ 3. **Justification follows** — at most 20 words after the verdict; an `Unknown` justification names the missing observation and whether it is decision-critical.
106
+ 4. **No hedging adverbs** — forbidden: potentially, might, arguably, perhaps, generally, tends to, could be, may. If genuinely uncertain, the verdict is `Unknown` with its missing observation.
57
107
  5. **Evidence specificity** — "industry standard," "best practice," "widely adopted" are not evidence. Cite a specific property of the option, a specific project constraint, or a specific failure mode.
58
108
 
109
+ ## Conflicting lenses and priority
110
+
111
+ SMARTS stays qualitative: never count `Strong` cells, assign weights, sum or compute percentages to pick a winner.
112
+ Per-lens dominance — one option no worse on every lens and better on at least one — is an ordinal
113
+ comparison, not a score. When lenses conflict, apply preference evidence in this order:
114
+
115
+ 1. explicit current user or approved-spec priority;
116
+ 2. explicit project priority already recorded in project context or an accepted decision;
117
+ 3. relevant prior-decision precedent, labelled as precedent, not authority;
118
+ 4. no assumed priority.
119
+
120
+ Absent explicit priority evidence, a tied comparison stays tied.
121
+
59
122
  ## Strength of recommendation
60
123
 
61
124
  Every recommendation carries exactly one strength label:
62
125
 
63
- - **strong** — multiple dominant lenses align cleanly on one option; non-SMARTS factors confirm.
126
+ - **strong** — dominant lenses align cleanly on one option, non-SMARTS factors confirm, and no option carries a decision-critical Unknown.
64
127
  - **moderate** — dominant lenses align with caveats, or a single lens dominates.
65
128
  - **tied** — no preferred option emerges. A legitimate output: "This is a coin flip under SMARTS — your call."
66
129
 
67
- There is no `weak` level — a slight edge is `moderate`. When lenses conflict with no winner, state it
68
- plainly, surface which lens the user has emphasized in prior decisions as input, and mark `tied`.
69
- The `Precedent:` line under each table (decision-variance Phase 3) is how that emphasis is surfaced
70
- systematically: 1–3 most-similar prior decisions by ID plus the observed lens pattern, or
71
- `Precedent: none on record` when history is thin — never an invented pattern.
130
+ There is no `weak` level — a slight edge is `moderate`. The `Precedent:` line under each table
131
+ (decision-variance Phase 3) surfaces step 3 of the priority order: 1–3 most-similar prior decisions by
132
+ ID plus the observed lens pattern, or `Precedent: none on record` when history is thin — never an
133
+ invented pattern, and never authority on its own.
72
134
 
73
135
  SMARTS does not cover cost, time-to-market, team-skill fit, vendor lock-in, or political
74
- acceptability. When these matter, surface them as **non-SMARTS considerations** alongside the table;
75
- they supplement, never replace, the analysis.
136
+ acceptability. When these matter, surface them as **non-SMARTS considerations** alongside the
137
+ analysis; they supplement, never replace it, and never become a seventh lens.
138
+
139
+ ## Design rationale record
140
+
141
+ An approved full-lane spec keeps a concise SMARTS design rationale; it is design evidence, not a
142
+ source of execution authority. For a typed HTML spec, write it through the existing mutation
143
+ operations with this convention, with no spec-schema change:
144
+
145
+ - the chosen approach and its trade-off live in the existing `approach` record (`choice`, `tradeoff`);
146
+ - a `decisions` record carries each material decision the SMARTS pass settled, and `approach.binding_decision_refs` cites it;
147
+ - one `sections` record with the fixed id `SEC-SMARTS` (title "SMARTS design rationale") holds one block each for: alternatives considered or the single-option statement; decisive lenses; material Weak and Unknown observations, each Unknown with its missing observation and whether it is decision-critical; load-bearing assumptions; non-SMARTS considerations; and priority evidence when one influenced the recommendation.
148
+
149
+ Read the rationale back with the existing read operations; never hand-edit or parse rendered HTML.
150
+ A legacy Markdown spec keeps the rationale in one stable `## SMARTS design rationale` section that
151
+ carries the same parts in the same order.
76
152
 
77
153
  ## Worked example
78
154
 
@@ -0,0 +1,115 @@
1
+ # SMARTS — lens reference (lazy)
2
+
3
+ Per-lens detail behind the one-line summaries in [`core.md`](core.md). `core.md` owns the role,
4
+ verdicts, cell rules and strength; this file only deepens what each lens asks. Load it only under
5
+ the condition `core.md` states — never for a routine scan the summaries already settle.
6
+
7
+ Each lens lists the question it answers, the considerations that usually decide it, the traps
8
+ that produce a wrong verdict, and the observation that settles an `Unknown` on it (the
9
+ `missing_observation` an Unknown cell names).
10
+
11
+ ## Scalable
12
+
13
+ **Question:** does the option support growth in users, data, throughput or geography without an
14
+ architectural rewrite?
15
+
16
+ **Considerations:**
17
+ - User scale across the stated horizon — prototype, pilot, production.
18
+ - Data volume and its growth rate, including retained history and logs.
19
+ - Throughput shape: bursty versus steady, and the peak the design must absorb.
20
+ - Geographic spread: single region now, multi-region on the roadmap or not.
21
+
22
+ **Traps:** over-engineering for scale that never arrives; under-engineering for scale that is on
23
+ the roadmap; confusing performance (one request is fast) with scalability (many requests stay fast).
24
+
25
+ **Settles an Unknown:** the expected load or data volume at the stated horizon, or a measurement
26
+ of the option at that load.
27
+
28
+ ## Maintainable
29
+
30
+ **Question:** can the system be understood, modified and extended later — including by agents —
31
+ without prohibitive effort?
32
+
33
+ **Considerations:**
34
+ - Comprehensibility for the next contributor, human or agent, without reading internals.
35
+ - Standard patterns versus bespoke abstractions.
36
+ - Documentation the option obliges someone to keep current.
37
+ - Refactoring blast radius when the option changes.
38
+ - Onboarding and hand-off cost to whoever owns the code next.
39
+
40
+ **Traps:** treating maintainability as one engineer's concern; underestimating the cost of a
41
+ bespoke pattern when agents write most of the code; ignoring the eventual hand-off.
42
+
43
+ **Settles an Unknown:** who maintains the code at the stated horizon, and whether the pattern
44
+ already exists in the codebase.
45
+
46
+ ## Available
47
+
48
+ **Question:** is the system reachable and functional when needed, including under partial failure?
49
+
50
+ **Considerations:**
51
+ - Single points of failure the option introduces or removes.
52
+ - Failure of a bundled or external dependency, and what keeps working.
53
+ - Disconnected or degraded operation requirements.
54
+ - Time to recover from the common failure modes.
55
+ - The downtime the caller can actually accept.
56
+
57
+ **Traps:** conflating availability with high availability; designing for high availability the
58
+ project does not require; ignoring partial-availability states.
59
+
60
+ **Settles an Unknown:** the stated downtime tolerance, or how the option behaves when its
61
+ dependency is unreachable.
62
+
63
+ ## Reliable
64
+
65
+ **Question:** does the option produce correct, predictable, durable outcomes?
66
+
67
+ **Considerations:**
68
+ - Atomicity and durability where they matter — the decision log, audit events, receipts.
69
+ - Idempotency of retried operations.
70
+ - State consistency across components.
71
+ - Recovery from failure without corruption.
72
+ - Reproducibility of builds, deployments and recorded evidence.
73
+
74
+ **Traps:** assuming the database or framework handles it without checking; underestimating the
75
+ reliability cost of distribution; ignoring long-tail durability.
76
+
77
+ **Settles an Unknown:** the failure the option must survive, and evidence of its behavior under it.
78
+
79
+ ## Testable
80
+
81
+ **Question:** can the option be validated by deterministic, fast tests that cover meaningful
82
+ failure modes?
83
+
84
+ **Considerations:**
85
+ - Unit testability of the parts the option introduces.
86
+ - Integration and contract testing between components.
87
+ - Test data generation and isolation.
88
+ - Whether the real failure modes can be reproduced in a test, not just the happy path.
89
+ - The boundary between a throwaway spike and a test that must hold.
90
+
91
+ **Traps:** patterns that resist mocking or isolation; ignoring the cost of test infrastructure;
92
+ "tests later" for foundational components.
93
+
94
+ **Settles an Unknown:** whether a deterministic test can reproduce the failure mode the option
95
+ must handle.
96
+
97
+ ## Securable
98
+
99
+ **Question:** does the option enable the project's security posture — as defined in
100
+ `<project-root>/.codearbiter/security-controls.md` — without retrofit?
101
+
102
+ **Considerations:**
103
+ - Authentication boundary: who the actor is.
104
+ - Authorization boundary: what the actor may do.
105
+ - Audit boundary: what is recorded, and whether it can be trusted.
106
+ - Secret handling.
107
+ - Attack surface: every bundled component and exposed input.
108
+ - Default-deny versus default-allow stance.
109
+ - Supply-chain integrity: provenance, licenses, signatures.
110
+
111
+ **Traps:** bolting security on after the architecture is set; confusing compliance with security;
112
+ underestimating the hardening burden of bundled components.
113
+
114
+ **Settles an Unknown:** the trust boundary the option crosses, and the control
115
+ `security-controls.md` requires there.
@@ -1,4 +1,9 @@
1
- # Sprint approval and delegated method authority
1
+ # Historical sprint approval and delegated method authority
2
+
3
+ This is an explicit historical attestation and recovery reference, not the normal sprint
4
+ workflow. Load it only for a requested attestation claim or an already-observed transaction
5
+ that needs recovery. Ordinary planning, method changes and execution use `SPRINT.md` under
6
+ the existing authorization; do not arm this protocol to obtain permission for them.
2
7
 
3
8
  This private extension adds no registered command, skill or agent. Check that the verified installed
4
9
  native capability lists `sprint-approval-context`, `sprint-approve` and `smarts-apply`; a schema name
@@ -1,10 +1,12 @@
1
1
  # Local and hosted verification boundary
2
2
 
3
3
  Use **impact-bounded local verification** for the contributor loop. Before a
4
- commit or pull request, run the smallest fresh set that directly proves the
4
+ commit or pull request, establish the smallest applicable set that directly proves the
5
5
  changed obligations and affected contracts, plus applicable lint/type-check,
6
6
  coverage, generated-artifact parity, staged secret scanning, and specialized
7
- security, dependency, migration, release, ADR, or deployment gates. A failing
7
+ security, dependency, migration, release, ADR, or deployment gates. Reuse inspected
8
+ results while their relevant source, inputs, command and obligations still match;
9
+ run missing or affected checks. A phase transition alone does not require a rerun. A failing
8
10
  local check blocks. Do not require a repository-wide or cross-platform suite on
9
11
  the contributor's machine merely to create a commit or open a pull request.
10
12
 
@@ -25,3 +27,10 @@ gates. It never waives focused regression proof, coverage thresholds, lint or
25
27
  type-check failures, security and secret controls, dependency review, migration
26
28
  review, release invariants, ADR lifecycle proof, deployment review, or exact-head
27
29
  merge protection.
30
+
31
+ Use the host relevant to the change for a needed live check. Do not require users
32
+ to install, configure, or switch hosts to complete ordinary work. Cross-adapter
33
+ compatibility belongs to maintainer CI; additional live-host trials require an
34
+ explicit acceptance requirement. If the available host denies a needed action,
35
+ report that limitation once and continue independent authorized work. Do not retry
36
+ an unchanged denial or seek another host merely to obtain a passing result.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbiterforge/ca-pi",
3
- "version": "0.18.4",
3
+ "version": "0.20.0",
4
4
  "private": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -12,25 +12,25 @@ not both merely to repeat the same procedure. This index lists what each skill O
12
12
 
13
13
  | Skill | Routed to by | Owns |
14
14
  |---|---|---|
15
- | [tdd](tdd/SKILL.md) | `/feature` (after spec approval), `/fix`, `/refactor` | The test-first gate: six phases — obligation scan → red → green → obligation verify → coverage → lint. No implementation before Phase 1; no path to `commit-gate` until all six gates are green. |
15
+ | [tdd](tdd/SKILL.md) | `/feature` (with its selected spec), `/fix`, `/refactor` | Scoped verification: regression-first fixes, behavioral feature checks, characterization baselines, coverage and lint; return observed evidence to the commit owner. |
16
16
  | [commit-gate](commit-gate/SKILL.md) | `/commit` | The commit gate: nine phases — permission, branch, classification, impact-bounded local verification under the shared [verification boundary](../includes/verification-boundary.md), behavioral proof, diff review, selective stage, message, commit. No commit while an applicable check is red, the behavior unproven, or secrets/cruft present; exhaustive exact-head proof remains a hosted-CI merge gate. |
17
17
  | [decision-variance](decision-variance/SKILL.md) | Architectural reconciliation or variance report; explicit `/reconcile` retained | One SMARTS arbitration owner; report-only is non-mutating. Analysis card loads on demand; only explicit user choices enter the append-only log. |
18
18
  | [debug](debug/SKILL.md) | Diagnosis intent or `/debug` | Investigate-then-decide root-cause analysis: five phases. Investigation only, no code change here; returns one evidence-backed result: confirmed_code_defect, confirmed_noncode_cause, design_question, no_action, or unresolved. Follow-up action retains caller authority; no default task or ADR write. |
19
19
  | [refactor](refactor/SKILL.md) | Behavior-preserving restructure intent or `/refactor` | Behavior-preserving change behind a parity-coverage proof gate; routes to `tdd` Phase 1 for coverage backfill or new test seams. |
20
- | [context-creation](context-creation/SKILL.md) | `/create-context` (brownfield) | Back-fills `.codearbiter/` from existing source via parallel scouts; writes `CONTEXT.md` (`arbiter: enabled` + `stage:`) and locks it `<!--INITIALIZED-->`. |
20
+ | [context-creation](context-creation/SKILL.md) | `/create-context` (brownfield) | Back-fills `.codearbiter/` from bounded source inspection and optional agents; writes `CONTEXT.md` (`arbiter: enabled` + `stage:`) and locks it `<!--INITIALIZED-->`. |
21
21
  | [decompose](decompose/SKILL.md) | greenfield startup, `/decompose` | Six-layer senior-architect interview, compaction-resilient via per-layer disk drafts + DRAFT ADRs; populates `.codearbiter/` and locks it initialized. |
22
- | [brainstorming](brainstorming/SKILL.md) | `/feature` (front), `/sprint` planning | Caller-scoped feature or coherent sprint specification. Initial approval is user-owned; delegated choices require existing authority. Uses the selected artifact format, preserves recorded intent, and returns or forwards to the caller's required planning step before execution. |
23
- | [writing-plans](writing-plans/SKILL.md) | `/feature`, `/sprint` (after the spec) | Decomposes the exact approved spec, or a ready draft through the initial sprint-only pair preflight. Retains same-format criterion/task coverage, paths and verification; combined drafts return for one real spec-and-plan reply before execution. Ordinary sequential binding remains unchanged. |
24
- | [executing-plans](executing-plans/SKILL.md) | `/feature` | Attended coordinator: uses authored HTML checkpoint membership or bounded legacy batches, delegates to `subagent-driven-development`, and retains the user checkpoint. A display batch never changes an HTML acceptance scope; sprint does not inherit these pauses. |
25
- | [subagent-driven-development](subagent-driven-development/SKILL.md) | `/sprint` (engine), `executing-plans` (batch scope) | Fresh subagent per task → spec-compliance then quality review → fresh-run verification; accepts only on proof. A quality failure blocks acceptance; approved sprint recovery owns correction. Security CRITICAL and unresolved `[CONFIRM-NN]` remain stops. |
22
+ | [brainstorming](brainstorming/SKILL.md) | `/feature` (front), `/sprint` planning | Caller-scoped feature or coherent sprint specification. Keeps material user decisions explicit without duplicate artifact approval. Preserves the selected format, recorded intent and handoff to a maintained plan. |
23
+ | [writing-plans](writing-plans/SKILL.md) | `/feature`, `/sprint` (after the spec) | Maintains the selected spec's criterion/task coverage, dependencies and relevant checks in the same format. Typed draft binding requires no special sprint approval or future reviewer adapter. |
24
+ | [executing-plans](executing-plans/SKILL.md) | `/feature` | Assistive feature coordinator: uses authored HTML checkpoint membership or meaningful legacy batches, delegates useful work, and reports results. Pauses for explicit user-requested checkpoints or actual decisions, not routine status reporting. |
25
+ | [subagent-driven-development](subagent-driven-development/SKILL.md) | `/sprint` (engine), `executing-plans` (batch scope) | Work from real task dependencies; implement or delegate coherently, run relevant checks, record DONE separately from verified evidence, and retry affected failures. Real user stops, security controls and unresolved material decisions still apply. |
26
26
  | [dispatching-parallel-agents](dispatching-parallel-agents/SKILL.md) | `subagent-driven-development`, `/sprint`, parallel `/review` | Reusable fan-out primitive: bound concurrency, collect, dedupe, funnel through `finding-triage`→`verdict-aggregator`. Results unused until the read-only funnel runs. |
27
27
  | [finishing-a-development-branch](finishing-a-development-branch/SKILL.md) | PR intent or `/feature` / `/sprint` terminal handoff |Select watch/cleanup before creation preflight. Own PR opening after the current-head gates; sprint opens only. Merge/discard require explicit authority and their own proof. |
28
- | [using-git-worktrees](using-git-worktrees/SKILL.md) | `subagent-driven-development`, `dispatching-parallel-agents` (opt-in) | OPTIONAL per-unit filesystem isolation for parallel work; integrates accepted units back onto the caller's working branch for its single `commit-gate` + finish. Never the default path. |
28
+ | [using-git-worktrees](using-git-worktrees/SKILL.md) | `subagent-driven-development`, `dispatching-parallel-agents` (opt-in) | OPTIONAL per-unit filesystem isolation for parallel work; integrates completed units onto the caller's working branch for independent commit-gate checks. Never the default path. |
29
29
  | [secret-handling](secret-handling/SKILL.md) | changed code reads/writes/passes a secret | The secret-source gate: identify → source → sinks/persistence. Secrets only from the approved store in `security-controls.md`; never in source, log, error, telemetry, image, or LLM prompt. Dispatches `auth-crypto-reviewer`. |
30
30
  | [crypto-compliance](crypto-compliance/SKILL.md) | changed code uses crypto/hashing/signing/TLS/random | The banned-primitive gate: one scan. Rejects broken primitives, disabled TLS verification, home-rolled crypto; approved list lives in `security-controls.md`. Dispatches `auth-crypto-reviewer`. |
31
31
  | [decision-lifecycle](decision-lifecycle/SKILL.md) | Record a decided ADR / inspect ADR health (`/adr`, `/adr-status`) | One owner; select read-only status before authoring prerequisites. User-attributed writing loads its reference on demand. Full-stem identity; Accepted/Planned is not delivery proof. |
32
32
  | [release](release/SKILL.md) | `/release` | Lean declared-policy release, three phases: derive the next identity from Conventional Commits under `version-policy` + roll the changelog; cut the annotated tag and qualify declared assets through either a protected hosted `release-build` or a provenance-bound retained exact-head CI cohort; publish that tag and only those assets on explicit authorization, then verify the remote inventory. SemVer remains the default. No tag on a red suite; no direct-to-main/force-push; nothing published unbidden; a release commit routes through `commit-gate`. |
33
33
  | [security-architecture](security-architecture/SKILL.md) | Requested threat model or `/threat-model` |Read-only STRIDE analysis of a sensitive design. Lesser gaps remain constraints; critical unmitigated threats stop the pass. No ordinary-change auto-entry. |
34
- | [context-check](context-check/SKILL.md) | Drift-audit intent, `/status drift`, or `/context-check` |Report provenance drift; re-scout or re-baseline selected documents only. No staging or commits; routine auto-heal remains with commit-gate. |
34
+ | [context-check](context-check/SKILL.md) | Context refresh, drift-audit intent, `/status drift`, or `/context-check` | Report drift or refresh selected documents under existing authorization. No staging or commits; routine auto-heal remains with commit-gate. |
35
35
  | [post-merge-cleanup](post-merge-cleanup/SKILL.md) | Merged-branch cleanup intent, `/ca-pr --cleanup`, or `/ca-cleanup` |Prove fetched containment, classify residue, confirm each discard, and transition fast-forward-only. Preserve unique work, stashes and remote branches. |
36
36
  | [tribunal](tribunal/SKILL.md) | Deliberate deep-audit intent or `/ca-tribunal` |Cost-approved deep audit with persisted findings and resumable triage. Separate approval for issue filing and telemetry; never a required gate. |