@arbiterforge/ca-pi 0.8.1 → 0.10.2
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/README.md +29 -90
- package/package.json +1 -1
- package/plugins/ca-pi/CHANGELOG.md +89 -0
- package/plugins/ca-pi/COMMANDS.md +141 -64
- package/plugins/ca-pi/SKILLS.md +137 -28
- package/plugins/ca-pi/agents/INDEX.md +3 -2
- package/plugins/ca-pi/agents/checkpoint-aggregator.md +8 -7
- package/plugins/ca-pi/agents/finding-triage.md +31 -14
- package/plugins/ca-pi/agents/verdict-aggregator.md +64 -0
- package/plugins/ca-pi/arbiter.md +12 -3
- package/plugins/ca-pi/extensions/codearbiter.js +137 -15
- package/plugins/ca-pi/generated/command-catalog.json +386 -186
- package/plugins/ca-pi/generated/roles.json +9 -0
- package/plugins/ca-pi/hooks/_bashguardlib.py +33 -16
- package/plugins/ca-pi/hooks/_gitexec.py +23 -0
- package/plugins/ca-pi/hooks/_githooks.py +50 -23
- package/plugins/ca-pi/hooks/_hooklib.py +94 -7
- package/plugins/ca-pi/hooks/_host.py +9 -1
- package/plugins/ca-pi/hooks/_modelib.py +173 -55
- package/plugins/ca-pi/hooks/_protectedlib.py +13 -4
- package/plugins/ca-pi/hooks/_releaselib.py +278 -48
- package/plugins/ca-pi/hooks/_updatelib.py +230 -50
- package/plugins/ca-pi/hooks/doctor.py +56 -8
- package/plugins/ca-pi/hooks/git-enforce.py +10 -3
- package/plugins/ca-pi/hooks/hostapi.py +220 -22
- package/plugins/ca-pi/hooks/session-start.py +8 -6
- package/plugins/ca-pi/hooks/statusline.py +1 -1
- package/plugins/ca-pi/hooks/wire-statusline.py +13 -8
- package/plugins/ca-pi/includes/command-compatibility.md +16 -0
- package/plugins/ca-pi/includes/routing-table.md +13 -5
- package/plugins/ca-pi/routines/INDEX.md +1 -1
- package/plugins/ca-pi/routines/decision-lifecycle/SKILL.md +54 -2
- package/plugins/ca-pi/routines/decision-lifecycle/references/adr-template.md +9 -1
- package/plugins/ca-pi/routines/dispatching-parallel-agents/SKILL.md +4 -4
- package/plugins/ca-pi/routines/release/SKILL.md +1 -1
- package/plugins/ca-pi/skills/ca-checkpoint/SKILL.md +5 -4
- package/plugins/ca-pi/skills/ca-cleanup/SKILL.md +6 -0
- package/plugins/ca-pi/skills/ca-context-check/SKILL.md +6 -0
- package/plugins/ca-pi/skills/ca-create-context/SKILL.md +6 -0
- package/plugins/ca-pi/skills/ca-decompose/SKILL.md +6 -0
- package/plugins/ca-pi/skills/ca-doctor/SKILL.md +4 -0
- package/plugins/ca-pi/skills/ca-init/SKILL.md +18 -1
- package/plugins/ca-pi/skills/ca-pr/SKILL.md +17 -1
- package/plugins/ca-pi/skills/ca-review/SKILL.md +3 -4
- package/plugins/ca-pi/skills/ca-status/SKILL.md +13 -1
- package/plugins/ca-pi/skills/ca-watch/SKILL.md +6 -0
|
@@ -6,6 +6,12 @@ argument-hint: (none)
|
|
|
6
6
|
|
|
7
7
|
# /ca-cleanup — post-merge branch transition
|
|
8
8
|
|
|
9
|
+
<!-- catalog-compatibility-notice:start -->
|
|
10
|
+
> Compatibility route. Prefer `/ca-pr --cleanup` for new usage. This installed route remains
|
|
11
|
+
> functional under the command-route compatibility policy at <plugin-root>/includes/command-compatibility.md;
|
|
12
|
+
> continue with the unchanged cleanup workflow below.
|
|
13
|
+
<!-- catalog-compatibility-notice:end -->
|
|
14
|
+
|
|
9
15
|
Your PR merged. You are still standing on the branch, with build output, worktree
|
|
10
16
|
residue, and scratch files around you. This command owns the ordinary walk back:
|
|
11
17
|
prove the branch actually landed, decide what the leftovers are, get to a clean
|
|
@@ -6,6 +6,12 @@ argument-hint: (none)
|
|
|
6
6
|
|
|
7
7
|
# /ca-context-check — manual drift audit
|
|
8
8
|
|
|
9
|
+
<!-- catalog-compatibility-notice:start -->
|
|
10
|
+
> Compatibility route. Prefer `/ca-status drift` for new usage. This installed route remains
|
|
11
|
+
> functional under the command-route compatibility policy at <plugin-root>/includes/command-compatibility.md;
|
|
12
|
+
> continue with the unchanged drift workflow below.
|
|
13
|
+
<!-- catalog-compatibility-notice:end -->
|
|
14
|
+
|
|
9
15
|
An optional, on-demand audit for bypass cases: a merge or external edit
|
|
10
16
|
changed a tracked source file you are not about to commit, so commit-gate's
|
|
11
17
|
auto-heal did not fire. Routes to the `context-check` skill.
|
|
@@ -6,6 +6,12 @@ argument-hint: (none)
|
|
|
6
6
|
|
|
7
7
|
# /ca-create-context — brownfield populate
|
|
8
8
|
|
|
9
|
+
<!-- catalog-compatibility-notice:start -->
|
|
10
|
+
> Compatibility route. Prefer `/ca-init --brownfield` for new usage. This installed route remains
|
|
11
|
+
> functional under the command-route compatibility policy at <plugin-root>/includes/command-compatibility.md;
|
|
12
|
+
> continue with the unchanged brownfield workflow below.
|
|
13
|
+
<!-- catalog-compatibility-notice:end -->
|
|
14
|
+
|
|
9
15
|
Wraps an existing codebase in project state without guessing. Dispatches parallel scouts to read the repository, synthesizes their findings into the surviving `.codearbiter/` doc set, resolves gaps via a targeted interview, and locks the project initialized. No arguments — the skill reads the repo and asks only what it cannot determine.
|
|
10
16
|
|
|
11
17
|
The only permitted path to populate `.codearbiter/` when meaningful source code already exists. For a greenfield project with no source, use `/ca-decompose`.
|
|
@@ -6,6 +6,12 @@ argument-hint: (none)
|
|
|
6
6
|
|
|
7
7
|
# /ca-decompose — greenfield populate
|
|
8
8
|
|
|
9
|
+
<!-- catalog-compatibility-notice:start -->
|
|
10
|
+
> Compatibility route. Prefer `/ca-init --greenfield` for new usage. This installed route remains
|
|
11
|
+
> functional under the command-route compatibility policy at <plugin-root>/includes/command-compatibility.md;
|
|
12
|
+
> continue with the unchanged greenfield workflow below.
|
|
13
|
+
<!-- catalog-compatibility-notice:end -->
|
|
14
|
+
|
|
9
15
|
Stands up project state for a greenfield project — one with no meaningful source code yet. A senior-architect persona drives a six-layer interview eliciting purpose, scope, primary users, domain vocabulary, and architectural constraints, persisting each layer to disk so a context reset loses nothing, then writes the surviving `.codearbiter/` doc set and locks the project initialized. No arguments — the skill interviews the user (a handoff summary may be supplied freely during the interview).
|
|
10
16
|
|
|
11
17
|
The only permitted path to populate `.codearbiter/` when no meaningful source exists. For an existing codebase, use `/ca-create-context`.
|
|
@@ -42,3 +42,7 @@ remediation.
|
|
|
42
42
|
Read-only. MUST NOT create markers, stage files, grant trust, weaken a block, or retry the
|
|
43
43
|
wrapper self-test with different spelling. MUST preserve the degraded active-dispatch diagnosis until
|
|
44
44
|
supported-version real-host promotion/CI evidence closes PI-AC-28.
|
|
45
|
+
|
|
46
|
+
For an arbiter-enabled repository, the mechanical report treats the Git backstop as healthy only
|
|
47
|
+
after exact managed-shim and live-enforcer validation, plus a harmless selected-Git
|
|
48
|
+
`git hook run pre-push` probe with empty input. It never executes a foreign hook.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ca-init
|
|
3
3
|
description: Opt this repo into codeArbiter — scaffold the root-level .codearbiter/ state store.
|
|
4
|
-
argument-hint: "
|
|
4
|
+
argument-hint: "[--stage N] [--greenfield|--brownfield] | --check"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /ca-init — first-run scaffold
|
|
@@ -15,6 +15,23 @@ the SessionStart persona injection. The scaffolded
|
|
|
15
15
|
`CONTEXT.md` is a **stub** (no initialization sentinel), so after scaffolding the project still needs
|
|
16
16
|
populating before normal operation.
|
|
17
17
|
|
|
18
|
+
<!-- catalog-command-modes:start -->
|
|
19
|
+
## Explicit population strategies
|
|
20
|
+
|
|
21
|
+
<!-- command-mode:--greenfield legacy-route:decompose -->
|
|
22
|
+
`--greenfield` selects the exact `<plugin-root>/skills/ca-decompose/SKILL.md` workflow.
|
|
23
|
+
|
|
24
|
+
<!-- command-mode:--brownfield legacy-route:create-context -->
|
|
25
|
+
`--brownfield` selects the exact `<plugin-root>/skills/ca-create-context/SKILL.md` workflow.
|
|
26
|
+
|
|
27
|
+
The two flags are mutually exclusive and neither may combine with `--check`. `--stage N` may
|
|
28
|
+
accompany one only while `.codearbiter/CONTEXT.md` is absent: scaffold at that stage, then enter the
|
|
29
|
+
selected workflow. When an uninitialized stub already exists, skip the refusing scaffolder and enter
|
|
30
|
+
the selected workflow directly. An initialized marker or source-shape mismatch retains the selected
|
|
31
|
+
legacy workflow's BLOCK. Without an explicit strategy, continue with the unchanged auto-detection
|
|
32
|
+
procedure below.
|
|
33
|
+
<!-- catalog-command-modes:end -->
|
|
34
|
+
|
|
18
35
|
## Procedure
|
|
19
36
|
|
|
20
37
|
1. Run the scaffolder against the repo's git toplevel (resolved by the script):
|
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ca-pr
|
|
3
3
|
description: Open a pull request the only sanctioned way — clear every BLOCK-level review finding, then stage the PR. Never a direct write to the default branch.
|
|
4
|
-
argument-hint:
|
|
4
|
+
argument-hint: "[\"title\"] | --watch [PR] | --cleanup"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /ca-pr — open a pull request
|
|
8
8
|
|
|
9
9
|
The only permitted path to a pull request. Every change lands through a PR — never a direct write or force-push to the default branch. No PR is drafted while any BLOCK-level review finding stands.
|
|
10
10
|
|
|
11
|
+
<!-- catalog-command-modes:start -->
|
|
12
|
+
## Compatibility modes
|
|
13
|
+
|
|
14
|
+
<!-- command-mode:--watch legacy-route:watch -->
|
|
15
|
+
`--watch [PR number | URL | branch]` loads and follows
|
|
16
|
+
`<plugin-root>/skills/ca-watch/SKILL.md` with the remaining arguments. This is an internal resource
|
|
17
|
+
handoff to the exact watcher contract, not a second host-command invocation.
|
|
18
|
+
|
|
19
|
+
<!-- command-mode:--cleanup legacy-route:cleanup -->
|
|
20
|
+
`--cleanup` loads and follows `<plugin-root>/skills/ca-cleanup/SKILL.md` with no remaining argument. It
|
|
21
|
+
retains the cleanup route's containment proof and per-item confirmations.
|
|
22
|
+
|
|
23
|
+
The flags are mutually exclusive. A bare or quoted title named `watch` or `cleanup` is not a mode;
|
|
24
|
+
without either flag, continue with the unchanged PR flow below.
|
|
25
|
+
<!-- catalog-command-modes:end -->
|
|
26
|
+
|
|
11
27
|
## Flow
|
|
12
28
|
|
|
13
29
|
Routes to the `finishing-a-development-branch` skill, open-PR path. The orchestrator reads the current
|
|
@@ -6,7 +6,7 @@ argument-hint: "[path | #<pr> | <pr-url>] (defaults to the current diff)"
|
|
|
6
6
|
|
|
7
7
|
# /ca-review — diff review
|
|
8
8
|
|
|
9
|
-
Read-only review of a change. Routes to `dispatching-parallel-agents` (`<plugin-root>/routines/dispatching-parallel-agents/SKILL.md`): dispatches the reviewer fleet by path matrix, dedupes, then funnels through `finding-triage` → `
|
|
9
|
+
Read-only review of a change. Routes to `dispatching-parallel-agents` (`<plugin-root>/routines/dispatching-parallel-agents/SKILL.md`): dispatches the reviewer fleet by path matrix, dedupes, then funnels through `finding-triage` → `verdict-aggregator` to a single in-memory verdict. No code is modified.
|
|
10
10
|
|
|
11
11
|
**The change under review does not have to be yours.** `/ca-review #123` reviews an inbound pull request through the same fleet, the same matrix, and the same triage. That is the point of issue #80: a tool that only reviews the diff you just wrote is a linter for authors, not a gate for a team, and reviewing code you did NOT write is where a governance gate earns its keep.
|
|
12
12
|
|
|
@@ -38,7 +38,7 @@ It is an ARGUMENT, not a second command. The scope resolver already took one, th
|
|
|
38
38
|
|
|
39
39
|
3. Route to `dispatching-parallel-agents` with that unit list (read-only batch — no collision check).
|
|
40
40
|
It dedupes overlapping findings, then funnels through `finding-triage` (severity + inline
|
|
41
|
-
`[NEEDS-TRIAGE]` on out-of-scope items) → `
|
|
41
|
+
`[NEEDS-TRIAGE]` on out-of-scope items) → `verdict-aggregator` (single read-only verdict).
|
|
42
42
|
4. Surface the aggregated verdict: findings by severity, file:line, remediation, and the applicable
|
|
43
43
|
control from `<project-root>/.codearbiter/security-controls.md` for security findings.
|
|
44
44
|
5. **For a PR target, posting the verdict is a separate, confirmed step.** Report locally first; post only on explicit instruction, with `gh pr review <number> --comment --body-file <file>`. A review comment on someone else's PR is outward-facing and effectively public the moment it lands — it notifies subscribers and cannot be un-sent. Never `--request-changes` or `--approve` from here: those carry merge authority, and this command produces a finding list, not a maintainer's decision.
|
|
@@ -52,8 +52,7 @@ It is an ARGUMENT, not a second command. The scope resolver already took one, th
|
|
|
52
52
|
|
|
53
53
|
## Hard gate
|
|
54
54
|
|
|
55
|
-
Read-only — MUST NOT modify a file, and MUST NOT check out, merge, or otherwise move the repository to the PR's branch: reviewing an inbound PR means reading its DIFF, not adopting its code, and a checkout would run its content through hooks that trust the working tree. BLOCK on any CRITICAL or HIGH finding on your OWN change: it must be resolved before `/ca-pr`. On an inbound PR there is nothing local to block — the verdict is the deliverable. MUST NOT consume raw reviewer output — only the `finding-triage` → `
|
|
56
|
-
verdict. MUST NOT resolve a `[CONFIRM-NN]` surfaced during review by guessing.
|
|
55
|
+
Read-only — MUST NOT modify a file, and MUST NOT check out, merge, or otherwise move the repository to the PR's branch: reviewing an inbound PR means reading its DIFF, not adopting its code, and a checkout would run its content through hooks that trust the working tree. BLOCK on any CRITICAL or HIGH finding on your OWN change: it must be resolved before `/ca-pr`. On an inbound PR there is nothing local to block — the verdict is the deliverable. MUST NOT consume raw reviewer output — only the `finding-triage` → `verdict-aggregator` verdict. MUST NOT resolve a `[CONFIRM-NN]` surfaced during review by guessing.
|
|
57
56
|
|
|
58
57
|
## When NOT to use
|
|
59
58
|
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ca-status
|
|
3
3
|
description: Show the project's current state at a glance — stage, open tasks, open questions, overrides since the last checkpoint, current branch. Read-only.
|
|
4
|
-
argument-hint: (none)
|
|
4
|
+
argument-hint: "(none) | drift"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /ca-status — state snapshot
|
|
8
8
|
|
|
9
9
|
A read-only summary of `.codearbiter/` state. No skill is routed to; no file is modified.
|
|
10
10
|
|
|
11
|
+
<!-- catalog-command-modes:start -->
|
|
12
|
+
## Drift mode
|
|
13
|
+
|
|
14
|
+
<!-- command-mode:drift legacy-route:context-check -->
|
|
15
|
+
With the exact argument `drift`, load and follow
|
|
16
|
+
`<plugin-root>/skills/ca-context-check/SKILL.md`. The audit begins read-only; re-scout or re-baseline may
|
|
17
|
+
write only after the user's explicit selection. In drift mode the `context-check` contract governs;
|
|
18
|
+
the opening summary and Hard gate below apply only to the no-argument snapshot. With no argument,
|
|
19
|
+
continue with the unchanged read-only snapshot below. Reject other arguments rather than treating
|
|
20
|
+
them as drift mode.
|
|
21
|
+
<!-- catalog-command-modes:end -->
|
|
22
|
+
|
|
11
23
|
## Flow
|
|
12
24
|
|
|
13
25
|
The orchestrator reads and presents:
|
|
@@ -6,6 +6,12 @@ argument-hint: "<PR number | url | branch>"
|
|
|
6
6
|
|
|
7
7
|
# /ca-watch — PR CI babysitter
|
|
8
8
|
|
|
9
|
+
<!-- catalog-compatibility-notice:start -->
|
|
10
|
+
> Compatibility route. Prefer `/ca-pr --watch` for new usage. This installed route remains
|
|
11
|
+
> functional under the command-route compatibility policy at <plugin-root>/includes/command-compatibility.md;
|
|
12
|
+
> continue with the unchanged watcher workflow below.
|
|
13
|
+
<!-- catalog-compatibility-notice:end -->
|
|
14
|
+
|
|
9
15
|
Watch a pull request's checks to completion without babysitting them by hand. The
|
|
10
16
|
wait happens server-side, so it costs nothing while CI runs; arbiter wakes once, on
|
|
11
17
|
the verdict — diagnoses a red, or offers you the merge on a green. Arbiter never
|