@arbiterforge/ca-pi 0.15.1 → 0.15.3

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 (60) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/plugins/ca-pi/CHANGELOG.md +71 -0
  4. package/plugins/ca-pi/COMMANDS.md +3 -9
  5. package/plugins/ca-pi/SKILLS.md +16 -22
  6. package/plugins/ca-pi/agents/coverage-auditor.md +16 -2
  7. package/plugins/ca-pi/generated/command-catalog.json +13 -22
  8. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-amd64 +0 -0
  9. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-arm64 +0 -0
  10. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-amd64 +0 -0
  11. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-arm64 +0 -0
  12. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-amd64.exe +0 -0
  13. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-arm64.exe +0 -0
  14. package/plugins/ca-pi/helpers/artifacts/release.json +6 -6
  15. package/plugins/ca-pi/hooks/_artifactauthoritylib.py +618 -58
  16. package/plugins/ca-pi/hooks/_artifactlib.py +3 -1
  17. package/plugins/ca-pi/hooks/_host.py +1 -1
  18. package/plugins/ca-pi/hooks/artifact-authority-hook.py +4 -21
  19. package/plugins/ca-pi/hooks/artifact-authority.py +11 -0
  20. package/plugins/ca-pi/hooks/hostapi.py +1 -1
  21. package/plugins/ca-pi/includes/artifacts.md +20 -1
  22. package/plugins/ca-pi/includes/command-compatibility.md +31 -0
  23. package/plugins/ca-pi/includes/farm.md +187 -36
  24. package/plugins/ca-pi/includes/maturity-coverage.md +57 -17
  25. package/plugins/ca-pi/includes/routing-table.md +10 -11
  26. package/plugins/ca-pi/includes/safety-core.md +2 -2
  27. package/plugins/ca-pi/package.json +1 -1
  28. package/plugins/ca-pi/routines/INDEX.md +12 -11
  29. package/plugins/ca-pi/routines/context-check/SKILL.md +17 -1
  30. package/plugins/ca-pi/routines/context-creation/SKILL.md +8 -1
  31. package/plugins/ca-pi/routines/debug/SKILL.md +18 -2
  32. package/plugins/ca-pi/routines/decision-lifecycle/SKILL.md +72 -118
  33. package/plugins/ca-pi/routines/decision-lifecycle/references/authoring.md +152 -0
  34. package/plugins/ca-pi/routines/decision-variance/SKILL.md +107 -133
  35. package/plugins/ca-pi/routines/decision-variance/references/analysis.md +136 -0
  36. package/plugins/ca-pi/routines/decompose/SKILL.md +8 -1
  37. package/plugins/ca-pi/routines/finishing-a-development-branch/SKILL.md +85 -7
  38. package/plugins/ca-pi/routines/post-merge-cleanup/SKILL.md +19 -2
  39. package/plugins/ca-pi/routines/refactor/SKILL.md +27 -8
  40. package/plugins/ca-pi/routines/release/SKILL.md +2 -1
  41. package/plugins/ca-pi/routines/security-architecture/SKILL.md +14 -3
  42. package/plugins/ca-pi/routines/tdd/SKILL.md +9 -5
  43. package/plugins/ca-pi/routines/tribunal/SKILL.md +28 -14
  44. package/plugins/ca-pi/skills/ca-adr/SKILL.md +103 -18
  45. package/plugins/ca-pi/skills/ca-adr-status/SKILL.md +6 -24
  46. package/plugins/ca-pi/skills/ca-cleanup/SKILL.md +241 -52
  47. package/plugins/ca-pi/skills/ca-context-check/SKILL.md +87 -24
  48. package/plugins/ca-pi/skills/ca-create-context/SKILL.md +159 -19
  49. package/plugins/ca-pi/skills/ca-debug/SKILL.md +100 -27
  50. package/plugins/ca-pi/skills/ca-decompose/SKILL.md +156 -17
  51. package/plugins/ca-pi/skills/ca-pr/SKILL.md +161 -26
  52. package/plugins/ca-pi/skills/ca-reconcile/SKILL.md +108 -30
  53. package/plugins/ca-pi/skills/ca-refactor/SKILL.md +96 -30
  54. package/plugins/ca-pi/skills/ca-release/SKILL.md +614 -39
  55. package/plugins/ca-pi/skills/ca-status/SKILL.md +1 -1
  56. package/plugins/ca-pi/skills/ca-threat-model/SKILL.md +56 -27
  57. package/plugins/ca-pi/skills/ca-tribunal/SKILL.md +105 -26
  58. package/plugins/ca-pi/routines/skill-author/SKILL.md +0 -129
  59. package/plugins/ca-pi/routines/skill-author/references/skill-template.md +0 -58
  60. package/plugins/ca-pi/skills/ca-new-skill/SKILL.md +0 -129
@@ -13,7 +13,7 @@ A read-only summary of `.codearbiter/` state. No skill is routed to; no file is
13
13
 
14
14
  <!-- command-mode:drift legacy-route:context-check -->
15
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
16
+ `<plugin-root>/routines/context-check/SKILL.md`. The audit begins read-only; re-scout or re-baseline may
17
17
  write only after the user's explicit selection. In drift mode the `context-check` contract governs;
18
18
  the opening summary and Hard gate below apply only to the no-argument snapshot. With no argument,
19
19
  continue with the unchanged read-only snapshot below. Reject other arguments rather than treating
@@ -1,45 +1,74 @@
1
1
  ---
2
2
  name: ca-threat-model
3
- description: Opt-in lightweight STRIDE pass for a sensitive feature before implementation. Not a routine gate — invoke it when a change warrants security thought.
3
+ description: "Threat-model a sensitive design with STRIDE on request. Read-only analysis of threats, controls, and implementation constraints."
4
4
  argument-hint: "<scope description>"
5
5
  ---
6
6
 
7
- # /ca-threat-model — STRIDE pass (opt-in)
7
+ # security-architecture
8
8
 
9
- Optional, lightweight pre-implementation security review for a sensitive change — new external endpoints, new secrets-handling paths, new auth/authz flows. **Opt-in, not a routine gate**: nothing routes here automatically. Invoke it when a change warrants the thought; skip it otherwise. Read-only — modifies no file. Describe what the component does, what data it handles, and which actors interact with it.
9
+ Optional, lightweight threat-modeling pass over a design before it is built. Selected when the user deliberately requests threat modeling of a sensitive design, with or without `/ca-threat-model`. Never forced on an ordinary change. Reviews architectural intent before code exists; for code already written, dispatch `security-reviewer` instead.
10
10
 
11
- ## Routes to
11
+ ## Entry boundaries
12
12
 
13
- `security-architecture` (`<plugin-root>/routines/security-architecture/SKILL.md`). The skill reads:
13
+ Read-only: modify no project file, decision record, control or implementation.
14
+ Optional reviewers inherit this read-only analysis scope. An explanation-only
15
+ security question does not start the pass; mentioning authentication in an ordinary
16
+ change does not opt in. The user need not repeat a slash command to request it.
17
+ Missing required security-controls input is a prerequisite failure, separate from
18
+ the severity of a finding. A lesser gap is a constraint, not blanket denied clearance.
14
19
 
15
- - `<project-root>/.codearbiter/security-controls.md` — compliance requirements.
16
- - `<project-root>/.codearbiter/decisions/` — existing security-relevant ADRs.
20
+ ## Pre-flight
17
21
 
18
- ## Output
22
+ - Read `<project-root>/.codearbiter/security-controls.md` — approved primitives, declared security boundaries and their permitted crossings, what is and is not allowed. If it cannot be read, STOP and surface the gap; do not guess the boundary model.
23
+ - Establish the scope from the user's request: the feature, component, or design under review.
24
+ - Read relevant security ADRs under `<project-root>/.codearbiter/decisions/`; do not invent decisions or interpret their absence as approval.
19
25
 
20
- ```
21
- ## Scope
22
- <what is being analyzed>
26
+ ## Phase 1 — Attack surface · gate: BLOCK
23
27
 
24
- ## STRIDE findings
25
- | Threat | Category | Likelihood | Impact | Control |
26
- |--------|-------------|------------|--------|------------------------------|
27
- | ... | S/T/R/I/D/E | H/M/L | H/M/L | <control or NONE — needs one> |
28
+ Map what the change exposes. Name, for the scope:
28
29
 
29
- ## Recommended controls before implementation
30
- - <control 1>
30
+ - New or changed entry points — routes, endpoints, message consumers, CLI surfaces.
31
+ - New egress — outbound calls, external dependencies, new data sinks.
32
+ - Security boundaries crossed, as declared in `security-controls.md` (trust transitions, privilege changes, data leaving a controlled zone).
33
+ - The data handled and its sensitivity.
31
34
 
32
- ## Clearance
33
- CLEAR TO IMPLEMENT | BLOCKED — resolve findings first
34
- ```
35
+ A boundary crossing not described in `security-controls.md` is a finding, not a silent pass. A finding outside this scope gets one line with an inline `[NEEDS-TRIAGE]` marker.
35
36
 
36
- ## When NOT to use
37
+ Gate: the attack surface and every boundary crossing in scope are enumerated.
37
38
 
38
- - Reviewing already-written code → `/ca-review`.
39
- - A full cross-cutting review → `/ca-checkpoint`.
40
- - A security question → `/ca-btw`.
39
+ ## Phase 2 — STRIDE pass · gate: STOP
41
40
 
42
- ## Hard gate
41
+ Walk the surface from Phase 1 through STRIDE. For each relevant category, name the concrete threat and the control expected to mitigate it:
43
42
 
44
- Read-only — modifies no file. This is an advisory pass, not a routine gate; it never runs unless
45
- invoked.
43
+ - **Spoofing** — identity/authentication of the actor at the boundary.
44
+ - **Tampering** — integrity of data in transit and at rest.
45
+ - **Repudiation** — whether actions are attributable.
46
+ - **Information disclosure** — exposure of sensitive data, including in logs and errors.
47
+ - **Denial of service** — exhaustion or availability impact.
48
+ - **Elevation of privilege** — privilege gained across the boundary.
49
+
50
+ Mark each threat's mitigation `PRESENT`, `PLANNED`, or `GAP`. Skip a category only with a one-line reason it does not apply.
51
+
52
+ If the threat depends on auth, crypto, key handling, or secrets, MAY dispatch `<plugin-root>/agents/auth-crypto-reviewer.md`. For broader boundary or surface concerns, MAY dispatch `<plugin-root>/agents/security-reviewer.md`. Both govern by `security-controls.md`.
53
+
54
+ Gate: STOP only on a genuinely critical unmitigated threat — a `GAP` that is exploitable now with high impact. Lesser gaps are surfaced as constraints, not stops.
55
+
56
+ ## Phase 3 — Report · gate: BLOCK
57
+
58
+ Produce a terse report:
59
+
60
+ - **Surface** — entry points, egress, boundaries crossed.
61
+ - **Threats** — the STRIDE findings; lead with `GAP`s, then `PLANNED`, summarize `PRESENT` in one line.
62
+ - **Verdict** — `PROCEED` (no open gap), `PROCEED-WITH-CONSTRAINTS` (gaps listed with owner), or `STOP` (a critical unmitigated threat is present; name it).
63
+
64
+ A decision-worthy gap is escalated to the user or to `<project-root>/.codearbiter/decisions/` via `/adr` — never authored as an ADR by this skill.
65
+
66
+ Gate: report delivered with a stated verdict; every STOP-level threat from Phase 2 is reflected in it.
67
+
68
+ ## Hard rules
69
+
70
+ - MUST NOT force this pass on an ordinary change. It is invoked deliberately for sensitive features only.
71
+ - MUST NOT guess the boundary model — read `security-controls.md` or STOP.
72
+ - MUST NOT silently pass an undeclared boundary crossing — surface it.
73
+ - MUST NOT STOP on anything short of a critical, exploitable, unmitigated threat; lesser gaps are constraints.
74
+ - MUST NOT author an ADR — escalate decision-worthy gaps to the user or `/adr`.
@@ -1,44 +1,123 @@
1
1
  ---
2
2
  name: ca-tribunal
3
- description: Deep, rarely-convened whole-codebase audit — eleven specialist lenses, a resumable on-disk audit log, findings filed as GitHub issues on approval. Expensive; estimates cost and STOPs before running. Never a required gate.
3
+ description: "Run an opt-in deep codebase audit with persisted findings. Confirm cost before dispatch; filing and telemetry need separate approval."
4
4
  argument-hint: "[scope-path] [--tag <label>]"
5
5
  ---
6
- # /ca-tribunal — deep codebase audit
7
6
 
8
- The deepest, most expensive review codeArbiter offers, convened rarely and on demand. Routes to the tribunal skill. Eleven lenses judge the codebase; every finding persists to its own file (plus append-only triage/run logs) under `.codearbiter/reports/<run-id>/`, so an interrupted run resumes from disk. Never a required gate — critical/high are blocking-severity findings, not a pipeline halt.
7
+ # tribunal
9
8
 
10
- Cost first — this lane routinely costs millions of tokens on a large repo. Phase 0 sizes the codebase, prints a token-cost band, recommends the highest-reasoning model, and STOPs for your acknowledgement before dispatching anything. Nothing runs unacknowledged.
9
+ The deepest, most expensive review codeArbiter offers — convened rarely, on demand, never as a gate. Selected by a deliberate request for a deep codebase audit, including `/ca-tribunal`. Eleven specialist lenses judge the codebase; every finding persists to its own file (plus append-only triage/run logs) under a run dir that survives compaction and disconnects, so the run resumes from disk.
11
10
 
12
- ## Flow
11
+ ## Entry boundaries
13
12
 
14
- Load and follow the tribunal skill (`<plugin-root>/routines/tribunal/SKILL.md`). In brief:
13
+ A direct audit request is sufficient routing intent; do not ask the user to repeat a
14
+ command. An explanation-only question does not start an audit. Ordinary diff review,
15
+ periodic checkpoints and a single-feature threat model retain their separate owners.
16
+ Cost acknowledgment, issue filing and telemetry authorization remain separate below.
15
17
 
16
- Phase 0 (STOP) — cost estimate, model recommendation, resume check.
17
- Phase 1 (BLOCK) — map the codebase; risk-rank and mark trust boundaries; record AI-authorship markers and iteration depth.
18
- Phase 2 (BLOCK) — dispatch `tribunal-lens-reviewer` once per active lens in priority waves (≤5 in flight); each dispatch writes one file per finding under its own `findings/<lens>/` dir.
19
- Phase 3 (BLOCK) — triage per wave from disk: dedup, independent calibration, decision vocabulary.
20
- Phase 4 (BLOCK) — project the human-readable report from the logs.
21
- Phase 5 (BLOCK) — on explicit selection, file findings as GitHub issues; idempotent against the tracker.
22
- Phase 6 (STOP) — optional, opt-in KPI telemetry to the public codeArbiter repo.
18
+ `[scope-path]` limits the audit to that subtree (default: repository root). Evaluate
19
+ applicability across the full roster; skip a lens only when its concern is absent and
20
+ record the launched/skipped set. A smaller scope does not require irrelevant lenses.
21
+ `--tag <label>` supplies the optional freeform run label governed by the telemetry card;
22
+ it is not authorization to transmit anything.
23
23
 
24
- ## Arguments
24
+ ## Pre-flight
25
25
 
26
- `"scope-path"` — focus the audit on a subtree (default: repository root). The full lens roster still runs; only the scope narrows.
26
+ Read these, or STOP and surface the gap — never guess a command or a path:
27
27
 
28
- `--tag <label>` — freeform run label recorded in telemetry (see `references/telemetry.md`).
28
+ - `<project-root>/.codearbiter/tech-stack.md` — stack, async model, concurrency primitives, test/lint/secrets commands, and, when documented, the tracker command. Stop if the test/lint/secrets commands are missing; do not guess.
29
+ - `<project-root>/.codearbiter/CONTEXT.md` — the `stage:` maturity value and domain vocabulary.
30
+ - `<project-root>/.codearbiter/coding-standards.md` — the conventions lenses judge against.
31
+ - `<project-root>/.codearbiter/security-controls.md` — trust boundaries, approved crypto/secret stores; feeds the appsec and secrets lenses. Absent on some repos — proceed without the security lenses' control-file checks if so.
32
+ - A git repository must be present.
33
+ - The reference set under `<plugin-root>/routines/tribunal/references/` — each is cited at its phase, loaded on demand. Do not preload them.
29
34
 
30
- ## Routes to
35
+ ## Phase 0 — Cost, model & resume · gate: STOP
31
36
 
32
- `<plugin-root>/routines/tribunal/SKILL.md` — dispatches `tribunal-lens-reviewer` once per active lens (and, on a large repo, the optional map-structure / map-deps mappers).
37
+ This lane is expensive. Orient and get explicit go-ahead before dispatching anything.
33
38
 
34
- ## When NOT to use
39
+ - **Resume check.** Scan `.codearbiter/reports/` for the most recent run dir matching the current scope-slug, any date — never just today's. If none, skip to sizing. If found, check completion: incomplete (no `report-written` event in its `run.jsonl`) means either resumable or stale, judged by that run dir's latest `run.jsonl` timestamp. A run whose `run.jsonl` carries `run-aborted` is terminal — never offered for resume; a fresh run starts. Younger than 7 days → recover position with the cheap cursor scan in `<plugin-root>/routines/tribunal/references/schemas.md` (grep the last `wave-triaged`, do not read finding bodies) and offer to resume at the first un-triaged wave instead of restarting; skip the estimate. Older than 7 days → STOP and ask the user to resume anyway or start fresh — the codebase may have drifted under the findings, and stale-tree findings must not silently merge with fresh ones. Complete → start a fresh run.
40
+ - **Abandon.** If the user tells the orchestrator to abandon the run, log a `run-aborted` event to `run.jsonl` before stopping.
41
+ - **Cost acknowledgment.** Size the job, compute the token band, recommend the model (highest-reasoning available, high effort), and offer the cost-control levers. Present the band plainly; nothing dispatches until the user acknowledges it and confirms the model.
42
+ - Establish `RUN_ID` = `<UTC-date>-<scope-slug>` on a fresh run; create `.codearbiter/reports/<run-id>/`; open `run.jsonl`. On resume, reuse the existing `RUN_ID` as-is — the date is the run's creation date and never changes on resume.
43
+ - Procedure: `<plugin-root>/routines/tribunal/references/cost-and-models.md` — load now.
35
44
 
36
- - A review of the current diff → `/ca-review` (gate-blocking, fast).
37
- - A lean periodic sweep → `/ca-checkpoint` (cheap, frequent; tribunal is its rare, deep counterpart).
38
- - An adversarial STRIDE pass on one sensitive feature → `/ca-threat-model`.
39
- - A governance packet for a window → `/ca-audit`.
40
- - Anything on a schedule or in a hot loop — tribunal is a rare, deliberate, expensive convening, not a routine gate.
45
+ Gate: the user has acknowledged the estimated cost and confirmed the model. An unacknowledged run does not pass.
41
46
 
42
- ## Hard gate
47
+ ## Phase 1 — Map + judgment overlay · gate: BLOCK
43
48
 
44
- MUST NOT dispatch any lens before you acknowledge the Phase 0 cost estimate. MUST NOT act as a required gate or block a merge/commit. MUST NOT file an issue or send telemetry without explicit authorization. Read-only on project code until the filing gate; findings file as GitHub issues, never the task board.
49
+ Map before reviewing; the map decides what gets scrutiny.
50
+
51
+ - Produce the inventory (inline, or on a large repo dispatch the optional cheap mappers per `<plugin-root>/routines/tribunal/references/cost-and-models.md`): file tree, language breakdown, entry points/routes, core-logic and shared-utility locations, dependency and integration surface. Write `inventory.md`.
52
+ - Apply the judgment overlay in `<plugin-root>/routines/tribunal/references/ai-markers.md`: risk-rank directories (untrusted input, money, auth, PII, churn = highest), mark trust boundaries, record AI-authorship markers and an iteration-depth estimate. High-marker / high-iteration areas carry a scrutiny boost and a small severity prior.
53
+ - Choose the active lenses — the roster IS the set of cards under `<plugin-root>/routines/tribunal/references/lenses/`; the active set is that roster minus any lens whose concern is absent from scope (no migrations → drop the migration lens). Record launched/skipped as `run.jsonl` events.
54
+ - Choose the wave partition — the default in `<plugin-root>/routines/tribunal/references/cost-and-models.md`, or a repartition for cause — and record it in the `run-started` event (`<plugin-root>/routines/tribunal/references/schemas.md`); resume reads this recorded partition, never re-derives it.
55
+
56
+ Gate: `inventory.md` written with the risk/boundary/marker overlay, and the active-lens set recorded.
57
+
58
+ ## Phase 2 — Roster dispatch (dual output: finding files + summary) · gate: BLOCK
59
+
60
+ Dispatch one `tribunal-lens-reviewer` per active lens, in the wave partition recorded at Phase 1 (default in `<plugin-root>/routines/tribunal/references/cost-and-models.md`) at the concurrency from `<plugin-root>/routines/tribunal/references/cost-and-models.md` (≤5 in flight). Each dispatch carries the assignment block from the agent's Assignment Format — its FIRST line is the title `Tribunal lens: <lens-slug> — <scope summary>` — naming the lens slug, the scope slice, the run dir, and the findings dir, on the model/effort from `<plugin-root>/routines/tribunal/references/cost-and-models.md`. The agent itself reads its own mandate from `<plugin-root>/routines/tribunal/references/lenses/` (the recorded active lens slug plus `.md`, including that card's Required-reading docs) and the finding contract (`<plugin-root>/routines/tribunal/references/finding-record.md`), and loads neither the other lenses' mandates nor the orchestrator schemas. The orchestrator reads `<plugin-root>/routines/tribunal/references/finding-record.md` to read findings at triage, and consults a lens mandate only to adjudicate that lens's finding.
61
+
62
+ - Each dispatched lens reviewer writes each finding to its own file `findings/<lens>/<finding-id>.json` the moment it is found — one file per finding, never a batched write at the end (write contract: `<plugin-root>/routines/tribunal/references/finding-record.md`).
63
+ - **Evidence-or-drop.** Every finding cites a concrete `path:line` and the minimal snippet. An absence claim — "no handler", "no teardown", "missing validation" — requires reading the whole unit, never a truncated window.
64
+ - Specialists never dispatch further subagents. Update each wave's status in `run.jsonl` as it flushes.
65
+ - When a lens's summary returns, record a `lens-completed` event in `run.jsonl` with `surface_seen`/`findings`/`model` taken from the agent's summary, plus `tokens` when the orchestrator can observe that lens's spend.
66
+
67
+ Gate: every active lens has flushed its `findings/<lens>/` files, and each wave's status is recorded.
68
+
69
+ ## Phase 3 — Triage & per-wave planning · gate: BLOCK
70
+
71
+ Triage per wave from disk as soon as it flushes; do not wait for the whole run.
72
+
73
+ - **Calibrate independently.** Set `final_severity`/`final_confidence` from the evidence yourself — the lens's values are provisional input; every critical/high carries a `counter_argument`.
74
+ - **Decide per finding, logged.** Each finding gets one decision from the vocabulary, appended as one line to `triage.jsonl`. Below the confidence gate after calibration → `investigate` (medium/low) or `decision-required` (critical/high) — never dropped silently.
75
+ - **Plan the wave.** Write `plans/phase-<n>.md` for its kept (`keep`/`combine`) work.
76
+ - Procedure: `<plugin-root>/routines/tribunal/references/triage.md` — load now.
77
+
78
+ Gate: every wave's findings triaged into `triage.jsonl` and a `plans/phase-<n>.md` written for its kept work.
79
+
80
+ ## Phase 4 — Report · gate: BLOCK
81
+
82
+ Regenerate `report.md` and `manifest.yaml` from the two logs per `<plugin-root>/routines/tribunal/references/report.md` — projections, never hand-authored. Task-list-structured (not prose): findings grouped by **calibrated** severity then type, each with id, `path:line`, one-line description, remediation shape, triage decision, and a link to its phase plan; `decision-required` in its own section; a launched/skipped-lens summary; an investigate appendix. Apply `<plugin-root>/includes/anti-slop-design/` (`core` + `medium-documents`) to the prose.
83
+
84
+ State plainly that critical/high are blocking-severity findings — work that should block shipping the affected code — but that this lane is not itself a gate and blocks nothing.
85
+
86
+ Gate: `report.md` regenerated from the logs and presented. No issues created.
87
+
88
+ ## Phase 5 — Approval & issue filing · gate: BLOCK
89
+
90
+ Findings become GitHub issues only on explicit selection and authorization. Silence or ambiguity → file nothing; "looks good" is not authorization.
91
+
92
+ - **Dedup first.** Skip findings already carrying an `issue_ref` in `triage.jsonl`, then dedup against the tracker — this lane reruns over time and will re-find the same issues.
93
+ - **Default is hand-off.** Write and print `issue-commands.sh`; execute only on explicit approval, writing each `issue_ref` back into `triage.jsonl`.
94
+ - Findings file as GitHub issues, never `open-tasks.md` — a periodic-review finding must survive PR abandonment.
95
+ - Procedure: `<plugin-root>/routines/tribunal/references/issue-filing.md` — load now.
96
+
97
+ Gate: either `issue-commands.sh` written and printed, or — on approval — issues filed with the id→result table and `issue_ref` recorded. Nothing filed without explicit selection; no duplicates against the tracker.
98
+
99
+ ## Phase 6 — Telemetry · gate: STOP
100
+
101
+ Optional, opt-in KPI feedback to refine the skill and the estimator — off by default, sent only on explicit per-run authorization.
102
+
103
+ - **Scrub.** The payload is aggregates and per-lens exposure counts only — no code, paths, or finding text; no repo identity unless the user adds `--tag`.
104
+ - **Show before send.** Write the payload to the run dir and show it in full; state plainly that it posts publicly to the codeArbiter repo. Default: hand the user the ready command; post only on explicit approval.
105
+ - Procedure: `<plugin-root>/routines/tribunal/references/telemetry.md` — load now.
106
+
107
+ Gate: the payload is shown, and it is either handed to the user as a command or — on approval — posted. No telemetry leaves without per-run authorization.
108
+
109
+ ## Hard rules
110
+
111
+ - MUST NOT proceed past Phase 0 without the user acknowledging the estimated token cost — this lane can cost millions of tokens.
112
+ - MUST NOT edit, refactor, format, or commit project code — writes are confined to `.codearbiter/reports/<run-id>/` until the filing gate.
113
+ - MUST NOT act as a required gate or block a merge, commit, or other workflow — critical/high are blocking-severity findings, not a pipeline halt.
114
+ - MUST NOT record a finding without a concrete `path:line` and a minimal evidence snippet.
115
+ - MUST NOT assert an absence without reading the whole relevant unit — partial-window absence claims do not pass.
116
+ - MUST NOT let a lens's provisional severity/confidence stand as final — calibrate at triage; every critical/high carries a `counter_argument`.
117
+ - MUST NOT mutate the append-only logs — `manifest.yaml`, `report.md`, and `plans/` are regenerated from them, never hand-edited.
118
+ - MUST NOT file an issue below the confidence gate or without explicit selection and authorization; findings file as GitHub issues, never `open-tasks.md`.
119
+ - MUST NOT create a duplicate issue — skip findings carrying an `issue_ref`, and dedup against the tracker by `dedup_key`/title before filing.
120
+ - MUST NOT author or scaffold an ADR — `decision-required` findings file as a discussion issue; ADRs are authored only via `/ca-adr` with user attribution.
121
+ - MUST NOT send telemetry without explicit per-run authorization, and MUST NOT include code, file paths, finding text, or repo identity (absent an explicit `--tag`) in the payload — KPI aggregates only.
122
+ - MUST NOT guess the test, lint, or secrets-scan command — read `tech-stack.md` or STOP. For the tracker: use `tech-stack.md` if it documents one; else default to `gh issue create` on a GitHub origin; else STOP.
123
+ - MUST NOT dispatch a subagent from within a dispatched specialist — only the orchestrator dispatches.
@@ -1,129 +0,0 @@
1
- ---
2
- name: skill-author
3
- description: Assess a request for a new reusable codeArbiter skill, prove the uncovered gap, agree scope, author and integrate it. Questions and one-off tasks do not authorize adding a skill.
4
- argument-hint: <gap or verb-noun skill name>
5
- ---
6
-
7
- # skill-author
8
-
9
- Author a new skill, the right way. The public entry and natural-language requests route
10
- here; this complete owner is also available as a directly read internal resource.
11
- Use a verb-noun name (for example, `dependency-review`), not a descriptive sentence.
12
- A one-time action belongs to the applicable work procedure. A question about whether a
13
- skill is needed is answered without authoring; an almost-matching owner is reviewed and
14
- extended through the existing change workflow rather than duplicated.
15
-
16
- ## Pre-flight
17
-
18
- Read these, or STOP and surface the gap — never author on assumption:
19
-
20
- - The `<gap>` argument. Absent → STOP and ask: "Describe the gap this skill would fill. What situation does no existing skill cover today?"
21
- - `<plugin-root>/routines/INDEX.md` — the surface scan of every existing skill. This is the gap-overlap check in Phase 1 and the integration target in Phase 5. Never bulk-read the skill bodies.
22
- - `<plugin-root>/routines/commit-gate/SKILL.md` and `<plugin-root>/routines/tdd/SKILL.md` — the canonical v2 format the authored skill must mirror. Read them before Phase 3. The command-backed commit owner also demonstrates the
23
- single-source entry convention. Keep its description and argument hint with the
24
- owning skill; the generator supplies the compatible public spelling per host.
25
- - `<project-root>/.codearbiter/CONTEXT.md` — project context, only if the gap is project-specific. A generic skill needs no project state.
26
-
27
- ## Phase 1 — Gap evidence · gate: BLOCK
28
-
29
- A new skill is permanent surface area. It is not written until the gap is proven real and proven uncovered.
30
-
31
- Restate the gap in one sentence. Then scan `INDEX.md` for overlap: if an existing skill's "Owns" column already covers this, STOP and name it — "The `<name>` skill already owns this; review it before requesting a new one."
32
-
33
- If no skill covers it, demand evidence — one of:
34
-
35
- - **A** — three specific cases where the gap blocked work: what was attempted, what happened with no skill, what it cost.
36
- - **B** — one high-impact case with traceable evidence: a blocked PR, an introduced defect, a compliance finding, a repeated failure pattern.
37
-
38
- Hypothetical cases do not count. Fewer than three (Option A) or no traceable evidence (Option B) → STOP and decline: "Insufficient evidence of a real, recurring gap. A skill adds permanent maintenance cost. Return with evidence and I'll author it."
39
-
40
- Gate: the gap is restated, proven uncovered against `INDEX.md`, and backed by Option-A or Option-B evidence. Speculation does not pass.
41
-
42
- ## Phase 2 — Scope · gate: BLOCK
43
-
44
- Settle scope with the user before any prose is written. Ask, and wait for an explicit answer:
45
-
46
- - **Routed or dispatched?** A *skill* is routed to (gated phases, lives at `<plugin-root>/routines/<name>/SKILL.md`). An *agent* is dispatched by a skill (a reviewer/author, lives at `<plugin-root>/agents/<name>.md`). If the gap is really a reviewer, this is the wrong skill — redirect to agent authoring.
47
- - **Command-invoked or internal?** Does a user type `/<name>` to reach it, or does another skill route to it mid-workflow? A command needs a routing-table entry; an internal skill needs a named parent that routes to it.
48
- - **Single responsibility.** State the one thing the skill owns in a sentence. If it needs "and" to describe its job, it is two skills — split it or pick one.
49
-
50
- Confirm back: "I will write a [command-invoked / internal] skill at `<plugin-root>/routines/<name>/SKILL.md`, owning <one responsibility>. [A `/<name>` command will be added to the routing table. / The `<parent>` skill will route to it.]"
51
-
52
- Gate: explicit user agreement on routed-vs-dispatched, command-vs-internal, and a one-sentence single responsibility. Assumed answers do not pass.
53
-
54
- ## Phase 3 — Authoring · gate: BLOCK
55
-
56
- Write `SKILL.md` to the v2 house style — mirror `commit-gate` and `tdd` exactly. Start from `<plugin-root>/routines/skill-author/references/skill-template.md`. Required shape:
57
-
58
- - **Frontmatter** — `name:` and `description:` as the normal base. Description is terse: the requested outcome, when it applies, and important negative intent. A command-backed owner also records its argument hint and keeps its natural-language description on the owner. The generator suppresses only the redundant Claude command description. No cut doc refs, no trigger disclaimer.
59
- - **`# <name>`** H1, then a one-line intro naming what routes to it (`/<command>` or the parent skill).
60
- - **`## Pre-flight`** — the docs to read or STOP on. Project state cites `<project-root>/.codearbiter/<doc>`; other skills cite `<plugin-root>/routines/<name>`; agents cite `<plugin-root>/agents/<name>.md`. Never guess a command — read it or STOP.
61
- - **`## Phase N — <title> · gate: BLOCK|STOP`** — sequential, each ending in a one-line `Gate:`. A phase with output that could be wrong has a gate; only a purely declarative phase may omit one.
62
- - **`## Hard rules`** — `MUST NOT` lines, one per rule, no duplication.
63
-
64
- Authoring rules:
65
-
66
- - Imperative, terse, no hedging. No "should", no "if it looks wrong". A gate is a concrete, checkable condition.
67
- - Surviving project docs only: `CONTEXT.md`, `tech-stack.md`, `coding-standards.md`, `specs/`, `plans/`, `security-controls.md`, `decisions/`, `overrides.log`. Do not reference cut docs or cut skills.
68
- - Terminology lock: a skill is *routed to*; an agent is *dispatched*. Never "trigger", "fires", or "runs".
69
- - An out-of-scope finding gets one line with an inline `[NEEDS-TRIAGE]` marker.
70
-
71
- ## Phase 4 — Self-review · gate: BLOCK
72
-
73
- Re-read the authored skill against the v2 quality bar. Each line below is a checkable defect, not a vibe:
74
-
75
- - **Single responsibility** — the skill owns one thing. If a phase belongs to a different job, it is the wrong skill; cut it.
76
- - **Concrete gates** — every non-declarative phase ends in a `Gate:` line stating a checkable condition. "Looks good" / "seems right" is not a gate; rewrite it.
77
- - **House-style prose** — terse, imperative, matches `commit-gate`/`tdd`. Strip hedging and filler.
78
- - **No duplicated rules** — a rule stated in a phase is not restated in Hard rules, and Hard rules carry no duplicates. State each rule once.
79
- - **Format conformance** — frontmatter is `name`+`description`, plus `disable-model-invocation: true` on a chain-internal skill (ADR-0028);
80
- a command-backed owner instead remains discoverable and also owns its
81
- `argument-hint`. The generator suppresses the redundant command listing only on
82
- command-native hosts; Codex/Pi entries remain discoverable. Other invocation/tool/model metadata
83
- needs explicit generator support, never silent dropping; H1 matches `name`; phases are numbered with `· gate:`; paths use `<plugin-root>` / `<project-root>` correctly; no cut docs/skills, no legacy `${FRAMEWORK_ROOT}`/`${PROJECT_ROOT}`/`.agents/` paths.
84
- - **Frontmatter scalar quoting** — any frontmatter scalar that starts with `[` or `{`, or contains `": "` or `" | "`, MUST be JSON-quoted (the `_yaml_safe_scalar` predicate the surface generator applies to codex/pi wrappers; the claude surface ships frontmatter verbatim, so the author quotes it at the source).
85
- - **No trigger language** — "routed to" / "dispatched" only, and no `## Trigger` disclaimer block.
86
- - **Evidence lenses** (issue #612) — each checked where the skill's shape triggers it, skipped where it does not:
87
- - A gate an agent is tempted to skip carries a rationalization guard AT the decision point — the known excuses paired with rebuttals. The best rebuttal carries its own instrument: a check the agent can run that falsifies the excuse either way. A tempting gate with no guard is a defect.
88
- - An acceptance or verification step names what is READ, never what is claimed — "the subagent reports green" is a defect; "the runner's output shows green" is not.
89
- - A user-facing ask leads with a recommendation AND its strongest counter-consideration.
90
- - A rule a tested helper could enforce is mechanized rather than accreted as prose — the helper enforces, the prose explains.
91
- - A rule whose literal reading has an exploitable edge names what it protects.
92
- - **Behavior-changing gate revisions are validated, not assumed** — an A/B pass (fixed scenarios, rubrics written before any output exists, both versions run under identical conditions) scaled to the change's blast radius, with results recorded in the PR (issue #612's method).
93
-
94
- Compile the findings, fix each, and re-read once. Present the corrected skill and the findings list to the user.
95
-
96
- Gate: zero open self-review defects, and the user has seen the corrected skill. An unaddressed defect blocks Phase 5.
97
-
98
- ## Phase 5 — Routing integration · gate: BLOCK
99
-
100
- A skill no one routes to is dead code. Wire it in.
101
-
102
- - Add a row to `<plugin-root>/routines/INDEX.md`: skill name (linked), "Routed to by", and "Owns" (the one-sentence responsibility from Phase 2).
103
- - Add the skill to the routing table — the invocation cue (the `/<command>` or condition), the primary route, any dispatched agents, the hard gate. For a command-invoked skill, also register the `/<command>` in the command reference.
104
- - For an internal skill, update the named parent so it routes to the new skill explicitly.
105
- - Before adding a command wrapper, check whether it would only repeat the skill's
106
- description and route back here. In codeArbiter source, use the existing generator's
107
- whole-file SKILL_ENTRY declaration for a genuinely command-backed owner; keep its
108
- argument hint and procedure in that one discoverable owner. On Claude the generated
109
- command remains explicitly usable without a duplicate model listing; Codex/Pi use
110
- their generated entry skill for discovery and keep the owner in private routines.
111
- Do not register another public operation solely for an implementation step. A
112
- directly referenced information card can remain outside discovery roots, owned by
113
- its existing caller; it does not need fabricated skill frontmatter or an INDEX row.
114
-
115
- Verify no broken references: every path the skill cites resolves. `INDEX.md` row parity and routing-table dangling-route freedom are no longer a hand-check here — `.github/scripts/check_routing_index_parity.py` enforces both mechanically in CI (issue #592); a missing row, an orphan row, or a route to a name that does not exist fails the build.
116
-
117
- Hand off to `commit-gate` — never `git commit` directly. The skill change ships only through the commit gate.
118
-
119
- Gate: `INDEX.md` and the routing table updated, no broken references, and the change handed to `commit-gate`. CI's routing-parity check is the authority on row/route correctness, not a self-report.
120
-
121
- ## Hard rules
122
-
123
- - MUST NOT author a skill before the gap is proven uncovered against `INDEX.md` and backed by Option-A or Option-B evidence.
124
- - MUST NOT begin authoring without explicit user agreement on scope (routed-vs-dispatched, command-vs-internal, single responsibility).
125
- - MUST NOT emit a skill whose phases lack concrete `Gate:` lines, or whose Hard rules duplicate phase rules.
126
- - MUST NOT use trigger language ("trigger", "fires", "runs") or a `## Trigger` disclaimer — a skill is routed to, an agent dispatched.
127
- - MUST NOT reference a cut doc, cut skill, or a legacy `.agents/` / `${FRAMEWORK_ROOT}` / `${PROJECT_ROOT}` path in an authored skill.
128
- - MUST NOT ship a skill without an `INDEX.md` row and a routing entry.
129
- - MUST NOT commit the new skill directly — hand off to `commit-gate`.
@@ -1,58 +0,0 @@
1
- ---
2
- name: <skill-name>
3
- description: <One terse sentence: what routes to this skill, the phase count, and the hard gate. No doc refs, no trigger disclaimer. JSON-quote the whole scalar if it starts with `[`/`{` or contains `": "` or `" | "`. Example: "The only path to X. Routed to when the user invokes /foo. Three gated phases — A, B, C. Nothing ships until every gate clears.">
4
- ---
5
- <!-- Chain-internal skill (never user-typed, reached only via routing-table path loads)?
6
- Add `disable-model-invocation: true` as a third frontmatter line — ADR-0028. -->
7
-
8
- # <skill-name>
9
-
10
- <One-line intro naming what routes to it: `/<command>` (user-invoked) or the parent skill (internal).>
11
-
12
- ## Pre-flight
13
-
14
- Read these, or STOP and surface the gap — never guess a command:
15
-
16
- - `<project-root>/.codearbiter/<doc>.md` — <what it provides>. Stop if missing; do not guess.
17
- - `<plugin-root>/routines/<other-skill>/SKILL.md` — <only if a sibling skill must clear first>.
18
- - `<plugin-root>/agents/<agent>.md` — <only if this skill dispatches an agent>.
19
-
20
- ## Phase 1 — <title> · gate: BLOCK
21
-
22
- <Imperative description of what this phase does. Terse, no hedging.>
23
-
24
- Gate: <a concrete, checkable exit condition>. A partial result does not pass.
25
-
26
- ## Phase 2 — <title> · gate: BLOCK
27
-
28
- <...>
29
-
30
- Gate: <...>.
31
-
32
- ## Phase N — <title> · gate: BLOCK
33
-
34
- <Final phase. If the skill ends by persisting, hand off to `commit-gate` — never `git commit` directly.>
35
-
36
- Gate: <...>.
37
-
38
- ## Hard rules
39
-
40
- - MUST NOT <invariant, stated once — not duplicated from a phase>.
41
- - MUST NOT <invariant>.
42
- - MUST NOT guess a command — read the cited `.codearbiter/` doc or STOP.
43
-
44
- <!--
45
- House-style reminders (delete before shipping):
46
- - Frontmatter is `name:` + `description:` only.
47
- - H1 matches `name`. One-line intro names what routes to it.
48
- - Each non-declarative phase ends in a one-line `Gate:`.
49
- - Paths: project state -> `<project-root>/.codearbiter/<doc>`;
50
- skills -> `<plugin-root>/routines/<name>`;
51
- agents -> `<plugin-root>/agents/<name>.md`.
52
- - Surviving project docs only: CONTEXT.md, tech-stack.md, coding-standards.md,
53
- specs/, plans/, security-controls.md, decisions/, overrides.log.
54
- - Terminology lock: a skill is *routed to*; an agent is *dispatched*.
55
- Never "trigger", "fires", "runs". No `## Trigger` block.
56
- - Out-of-scope finding -> one line with inline `[NEEDS-TRIAGE]`.
57
- - Terse, imperative. No "should", no "if it looks wrong".
58
- -->
@@ -1,129 +0,0 @@
1
- ---
2
- name: ca-new-skill
3
- description: Assess a request for a new reusable codeArbiter skill, prove the uncovered gap, agree scope, author and integrate it. Questions and one-off tasks do not authorize adding a skill.
4
- argument-hint: <gap or verb-noun skill name>
5
- ---
6
-
7
- # skill-author
8
-
9
- Author a new skill, the right way. The public entry and natural-language requests route
10
- here; this complete owner is also available as a directly read internal resource.
11
- Use a verb-noun name (for example, `dependency-review`), not a descriptive sentence.
12
- A one-time action belongs to the applicable work procedure. A question about whether a
13
- skill is needed is answered without authoring; an almost-matching owner is reviewed and
14
- extended through the existing change workflow rather than duplicated.
15
-
16
- ## Pre-flight
17
-
18
- Read these, or STOP and surface the gap — never author on assumption:
19
-
20
- - The `<gap>` argument. Absent → STOP and ask: "Describe the gap this skill would fill. What situation does no existing skill cover today?"
21
- - `<plugin-root>/routines/INDEX.md` — the surface scan of every existing skill. This is the gap-overlap check in Phase 1 and the integration target in Phase 5. Never bulk-read the skill bodies.
22
- - `<plugin-root>/routines/commit-gate/SKILL.md` and `<plugin-root>/routines/tdd/SKILL.md` — the canonical v2 format the authored skill must mirror. Read them before Phase 3. The command-backed commit owner also demonstrates the
23
- single-source entry convention. Keep its description and argument hint with the
24
- owning skill; the generator supplies the compatible public spelling per host.
25
- - `<project-root>/.codearbiter/CONTEXT.md` — project context, only if the gap is project-specific. A generic skill needs no project state.
26
-
27
- ## Phase 1 — Gap evidence · gate: BLOCK
28
-
29
- A new skill is permanent surface area. It is not written until the gap is proven real and proven uncovered.
30
-
31
- Restate the gap in one sentence. Then scan `INDEX.md` for overlap: if an existing skill's "Owns" column already covers this, STOP and name it — "The `<name>` skill already owns this; review it before requesting a new one."
32
-
33
- If no skill covers it, demand evidence — one of:
34
-
35
- - **A** — three specific cases where the gap blocked work: what was attempted, what happened with no skill, what it cost.
36
- - **B** — one high-impact case with traceable evidence: a blocked PR, an introduced defect, a compliance finding, a repeated failure pattern.
37
-
38
- Hypothetical cases do not count. Fewer than three (Option A) or no traceable evidence (Option B) → STOP and decline: "Insufficient evidence of a real, recurring gap. A skill adds permanent maintenance cost. Return with evidence and I'll author it."
39
-
40
- Gate: the gap is restated, proven uncovered against `INDEX.md`, and backed by Option-A or Option-B evidence. Speculation does not pass.
41
-
42
- ## Phase 2 — Scope · gate: BLOCK
43
-
44
- Settle scope with the user before any prose is written. Ask, and wait for an explicit answer:
45
-
46
- - **Routed or dispatched?** A *skill* is routed to (gated phases, lives at `<plugin-root>/routines/<name>/SKILL.md`). An *agent* is dispatched by a skill (a reviewer/author, lives at `<plugin-root>/agents/<name>.md`). If the gap is really a reviewer, this is the wrong skill — redirect to agent authoring.
47
- - **Command-invoked or internal?** Does a user type `/<name>` to reach it, or does another skill route to it mid-workflow? A command needs a routing-table entry; an internal skill needs a named parent that routes to it.
48
- - **Single responsibility.** State the one thing the skill owns in a sentence. If it needs "and" to describe its job, it is two skills — split it or pick one.
49
-
50
- Confirm back: "I will write a [command-invoked / internal] skill at `<plugin-root>/routines/<name>/SKILL.md`, owning <one responsibility>. [A `/<name>` command will be added to the routing table. / The `<parent>` skill will route to it.]"
51
-
52
- Gate: explicit user agreement on routed-vs-dispatched, command-vs-internal, and a one-sentence single responsibility. Assumed answers do not pass.
53
-
54
- ## Phase 3 — Authoring · gate: BLOCK
55
-
56
- Write `SKILL.md` to the v2 house style — mirror `commit-gate` and `tdd` exactly. Start from `<plugin-root>/routines/skill-author/references/skill-template.md`. Required shape:
57
-
58
- - **Frontmatter** — `name:` and `description:` as the normal base. Description is terse: the requested outcome, when it applies, and important negative intent. A command-backed owner also records its argument hint and keeps its natural-language description on the owner. The generator suppresses only the redundant Claude command description. No cut doc refs, no trigger disclaimer.
59
- - **`# <name>`** H1, then a one-line intro naming what routes to it (`/<command>` or the parent skill).
60
- - **`## Pre-flight`** — the docs to read or STOP on. Project state cites `<project-root>/.codearbiter/<doc>`; other skills cite `<plugin-root>/routines/<name>`; agents cite `<plugin-root>/agents/<name>.md`. Never guess a command — read it or STOP.
61
- - **`## Phase N — <title> · gate: BLOCK|STOP`** — sequential, each ending in a one-line `Gate:`. A phase with output that could be wrong has a gate; only a purely declarative phase may omit one.
62
- - **`## Hard rules`** — `MUST NOT` lines, one per rule, no duplication.
63
-
64
- Authoring rules:
65
-
66
- - Imperative, terse, no hedging. No "should", no "if it looks wrong". A gate is a concrete, checkable condition.
67
- - Surviving project docs only: `CONTEXT.md`, `tech-stack.md`, `coding-standards.md`, `specs/`, `plans/`, `security-controls.md`, `decisions/`, `overrides.log`. Do not reference cut docs or cut skills.
68
- - Terminology lock: a skill is *routed to*; an agent is *dispatched*. Never "trigger", "fires", or "runs".
69
- - An out-of-scope finding gets one line with an inline `[NEEDS-TRIAGE]` marker.
70
-
71
- ## Phase 4 — Self-review · gate: BLOCK
72
-
73
- Re-read the authored skill against the v2 quality bar. Each line below is a checkable defect, not a vibe:
74
-
75
- - **Single responsibility** — the skill owns one thing. If a phase belongs to a different job, it is the wrong skill; cut it.
76
- - **Concrete gates** — every non-declarative phase ends in a `Gate:` line stating a checkable condition. "Looks good" / "seems right" is not a gate; rewrite it.
77
- - **House-style prose** — terse, imperative, matches `commit-gate`/`tdd`. Strip hedging and filler.
78
- - **No duplicated rules** — a rule stated in a phase is not restated in Hard rules, and Hard rules carry no duplicates. State each rule once.
79
- - **Format conformance** — frontmatter is `name`+`description`, plus `disable-model-invocation: true` on a chain-internal skill (ADR-0028);
80
- a command-backed owner instead remains discoverable and also owns its
81
- `argument-hint`. The generator suppresses the redundant command listing only on
82
- command-native hosts; Codex/Pi entries remain discoverable. Other invocation/tool/model metadata
83
- needs explicit generator support, never silent dropping; H1 matches `name`; phases are numbered with `· gate:`; paths use `<plugin-root>` / `<project-root>` correctly; no cut docs/skills, no legacy `${FRAMEWORK_ROOT}`/`${PROJECT_ROOT}`/`.agents/` paths.
84
- - **Frontmatter scalar quoting** — any frontmatter scalar that starts with `[` or `{`, or contains `": "` or `" | "`, MUST be JSON-quoted (the `_yaml_safe_scalar` predicate the surface generator applies to codex/pi wrappers; the claude surface ships frontmatter verbatim, so the author quotes it at the source).
85
- - **No trigger language** — "routed to" / "dispatched" only, and no `## Trigger` disclaimer block.
86
- - **Evidence lenses** (issue #612) — each checked where the skill's shape triggers it, skipped where it does not:
87
- - A gate an agent is tempted to skip carries a rationalization guard AT the decision point — the known excuses paired with rebuttals. The best rebuttal carries its own instrument: a check the agent can run that falsifies the excuse either way. A tempting gate with no guard is a defect.
88
- - An acceptance or verification step names what is READ, never what is claimed — "the subagent reports green" is a defect; "the runner's output shows green" is not.
89
- - A user-facing ask leads with a recommendation AND its strongest counter-consideration.
90
- - A rule a tested helper could enforce is mechanized rather than accreted as prose — the helper enforces, the prose explains.
91
- - A rule whose literal reading has an exploitable edge names what it protects.
92
- - **Behavior-changing gate revisions are validated, not assumed** — an A/B pass (fixed scenarios, rubrics written before any output exists, both versions run under identical conditions) scaled to the change's blast radius, with results recorded in the PR (issue #612's method).
93
-
94
- Compile the findings, fix each, and re-read once. Present the corrected skill and the findings list to the user.
95
-
96
- Gate: zero open self-review defects, and the user has seen the corrected skill. An unaddressed defect blocks Phase 5.
97
-
98
- ## Phase 5 — Routing integration · gate: BLOCK
99
-
100
- A skill no one routes to is dead code. Wire it in.
101
-
102
- - Add a row to `<plugin-root>/routines/INDEX.md`: skill name (linked), "Routed to by", and "Owns" (the one-sentence responsibility from Phase 2).
103
- - Add the skill to the routing table — the invocation cue (the `/<command>` or condition), the primary route, any dispatched agents, the hard gate. For a command-invoked skill, also register the `/<command>` in the command reference.
104
- - For an internal skill, update the named parent so it routes to the new skill explicitly.
105
- - Before adding a command wrapper, check whether it would only repeat the skill's
106
- description and route back here. In codeArbiter source, use the existing generator's
107
- whole-file SKILL_ENTRY declaration for a genuinely command-backed owner; keep its
108
- argument hint and procedure in that one discoverable owner. On Claude the generated
109
- command remains explicitly usable without a duplicate model listing; Codex/Pi use
110
- their generated entry skill for discovery and keep the owner in private routines.
111
- Do not register another public operation solely for an implementation step. A
112
- directly referenced information card can remain outside discovery roots, owned by
113
- its existing caller; it does not need fabricated skill frontmatter or an INDEX row.
114
-
115
- Verify no broken references: every path the skill cites resolves. `INDEX.md` row parity and routing-table dangling-route freedom are no longer a hand-check here — `.github/scripts/check_routing_index_parity.py` enforces both mechanically in CI (issue #592); a missing row, an orphan row, or a route to a name that does not exist fails the build.
116
-
117
- Hand off to `commit-gate` — never `git commit` directly. The skill change ships only through the commit gate.
118
-
119
- Gate: `INDEX.md` and the routing table updated, no broken references, and the change handed to `commit-gate`. CI's routing-parity check is the authority on row/route correctness, not a self-report.
120
-
121
- ## Hard rules
122
-
123
- - MUST NOT author a skill before the gap is proven uncovered against `INDEX.md` and backed by Option-A or Option-B evidence.
124
- - MUST NOT begin authoring without explicit user agreement on scope (routed-vs-dispatched, command-vs-internal, single responsibility).
125
- - MUST NOT emit a skill whose phases lack concrete `Gate:` lines, or whose Hard rules duplicate phase rules.
126
- - MUST NOT use trigger language ("trigger", "fires", "runs") or a `## Trigger` disclaimer — a skill is routed to, an agent dispatched.
127
- - MUST NOT reference a cut doc, cut skill, or a legacy `.agents/` / `${FRAMEWORK_ROOT}` / `${PROJECT_ROOT}` path in an authored skill.
128
- - MUST NOT ship a skill without an `INDEX.md` row and a routing entry.
129
- - MUST NOT commit the new skill directly — hand off to `commit-gate`.