Repository navigation
Remove backend capability claims and phrase skill branches capability-conditionally - #229
Conversation
|
|
||
| ### Backend capability claims | ||
|
|
||
| Never commit a statement about what a specific agent backend can or cannot do — in skills, adapter configs, or docs. "Tool X does not support sub-agents" is true the day it is written and wrong within months; nothing fails when it goes stale, so it stays wrong until someone happens to notice. |
There was a problem hiding this comment.
[low] This rule ("never commit a statement about what a specific agent backend can or cannot do — in skills, adapter configs, or docs") is already violated by files this PR leaves untouched, so the repo is inconsistent with its own policy on merge:
config.schema.yaml:84—REVIEW_EFFORTdescription still says "(e.g. Claude Code's /code-review)"; the same parenthetical was removed fromsetup/SKILL.mdandreview-agent/SKILL.mdhere.templates/codecannon.yaml:48— "native review engine (Claude Code /code-review)", shipped to every consumer project.docs/index.md:148-158— "Cursor does not prompt for shell commands by default", Codex--full-auto/ sandbox behaviour, Gemini--auto-approve. This is the exact claim deleted from setup Phase 2.5 ("Cursor doesn't prompt, and Codex/Gemini permission systems vary"), and the rewritten skill now points agents at these docs ("the docs cover them separately").
Scenario: an agent or contributor following the new section greps for the reference phrasing, finds the schema/template still naming Claude Code as the backend with a native reviewer, and either copies that pattern back into a skill or trusts a stale claim the PR set out to remove.
| Check whether the agent's permission configuration covers the shell commands Code Cannon skills use. Read the `commands:` list in `CodeCannon/permissions.yaml` for the required command prefixes. Use **only** the `commands:` key — commands under `validate_only:` (e.g. `cd`) are deliberately never emitted as allow rules, so they must not be reported as missing. | ||
|
|
||
| **Claude Code:** Read `.claude/settings.local.json` (if it exists) and `.claude/settings.json` (if it exists). Collect all `Bash(...)` entries from the `permissions.allow` arrays in both files. For each prefix in `commands:`, check whether an allow rule covers it (e.g. `Bash(git:*)` or `Bash(git *)` covers `git`). | ||
| **If your harness reads its permission allowlist from `.claude/settings.json`:** Read `.claude/settings.local.json` (if it exists) and `.claude/settings.json` (if it exists). Collect all `Bash(...)` entries from the `permissions.allow` arrays in both files. For each prefix in `commands:`, check whether an allow rule covers it (e.g. `Bash(git:*)` or `Bash(git *)` covers `git`). |
There was a problem hiding this comment.
[low] The new condition is answerable from the wrong evidence. "If your harness reads its permission allowlist from .claude/settings.json" asks the agent a fact about its own harness, but the file it names is one the claude adapter commits into the repo (permissions_file), so it exists in any project that lists both claude and agents.
Scenario: a multi-adapter project, /setup run from a non-Claude harness on a smaller model. The agent sees .claude/settings.json present, takes this branch instead of Otherwise, and either prints Agent permissions: all skill commands pre-approved (false for that harness — it will still prompt) or tells the user to add Bash(<cmd>:*) rules to .claude/settings.local.json, which that harness never reads. The old **Claude Code:** label could not be mis-taken this way.
Phrasing the condition on the harness rather than the file's presence closes it, e.g. "If your harness's own permission allowlist is the permissions.allow array in .claude/settings.json (the file existing in the repo is not evidence of this)".
Code Cannon reviewSensitive-area gate: not triggered — the diff is prose in docs, adapter notes, and skill bodies; no authentication, payment, secrets, production-config, or destructive-operation surface is touched. [WARNING] The new "Backend capability claims" rule in [WARNING] Verdict: APPROVE |
…n-audit condition
| Otherwise, review this PR. **Separate the labor from the policy:** the *labor* (finding issues) uses the best review engine available on your harness; the *policy* (the sensitive-area gate and the finding contract) is owned by Code Cannon and applied identically on every harness. Whichever path runs, it must end by posting a PR comment in the **CC review contract** — `[CRITICAL]` / `[WARNING]` / `[NOTE]` findings plus a `Verdict: APPROVE` or `Verdict: REQUEST CHANGES` line — so Step 8 can route on it. | ||
|
|
||
| **If the native `/code-review` skill is available** (Claude Code): run it, then apply the CC policy yourself. | ||
| **If a native `/code-review` skill is available**: run it, then apply the CC policy yourself. |
There was a problem hiding this comment.
[medium] Dropping the (Claude Code) anchor widens this branch to any harness that has something called /code-review, but the body of the branch is still written for one specific implementation: /code-review {{REVIEW_EFFORT}} --comment, the low/medium/high positional, and "that positional is only for the ultra cloud path".
Scenario: an agent on another harness has a user-authored or vendor /code-review skill with a different argument contract. It truthfully takes this branch, passes medium --comment, and the skill either ignores the effort arg, treats medium as a review target, or does not post findings to the PR. The inline fallback (which is the path that harness should have taken) is skipped, so the review labor is degraded while Step 8 still routes on an APPROVE verdict.
The condition should test the contract, not the name — e.g. "If a native /code-review skill is available that accepts an effort level and --comment", with anything else falling through to the inline path.
| ### Gemini CLI | ||
|
|
||
| Configure via `.gemini/settings.json` or the `--auto-approve` flag. Consult Gemini CLI documentation for the latest permission options. | ||
| Permission and approval systems differ by agent and change often, so this page does not describe them. If your agent prompts for shell commands, pre-approve the same prefixes listed above (`git`, `gh`, `make`, `python3`, `./sync.py`, `mkdir`, `mktemp`) using whatever mechanism its current documentation describes, and make sure `gh` has network access if the agent runs sandboxed. |
There was a problem hiding this comment.
[low] The hardcoded prefix list (git, gh, make, python3, ./sync.py, mkdir, mktemp) does not match what the skills actually run. permissions.yaml commands: is cp, gh, git, gpg, grep, make, mkdir, mktemp, python3, test, which — so cp, gpg, grep, test, and which are missing here (and ./sync.py is not in the canonical list).
Scenario: a user on a non-Claude agent pre-approves exactly these seven prefixes as instructed and still gets prompted mid-skill on grep/test/which/cp/gpg. This is the only permission guidance left for those agents after this PR removed the per-agent sections, so it should point at CodeCannon/permissions.yaml (commands: key) rather than restating a list that has already drifted. (The Claude Code JSON example above has the same pre-existing drift.)
| If any are missing, report them as `Bash(<cmd>:*)` allow rules the user can optionally add to `.claude/settings.local.json` (git-ignored) or `.claude/settings.json` (shared with team) — pointing at `docs/index.md` for a full example — and note that commands can also be approved individually when prompted. Do not modify any settings file. This is advisory only. | ||
|
|
||
| **Other agents (Cursor, Codex, Gemini):** Skip this phase silently — Cursor doesn't prompt, and Codex/Gemini permission systems vary. The docs cover these agents separately. | ||
| **Otherwise:** Skip this phase silently — permission systems vary by harness, and the docs cover them separately. |
There was a problem hiding this comment.
[low] "the docs cover them separately" is no longer true after this same PR. docs/index.md replaced the Cursor / Codex / Gemini sections with "Other agents", which says "this page does not describe them".
Scenario: an agent on a non-.claude/settings.json harness skips the audit silently on the strength of this clause; if the user asks where the permission guidance is, the skill points at docs that explicitly decline to give it. Either drop the clause or reword it to match what the docs now offer (pre-approve the commands: prefixes from CodeCannon/permissions.yaml using the agent's own mechanism). Regenerate with make sync after editing.
Code Cannon review (second pass)Sensitive-area gate: not triggered — the diff is prose in docs, adapter notes, config comments, and skill bodies; no authentication, payment, secrets, production-config, or destructive-operation surface is touched. [WARNING] [WARNING] [WARNING] [NOTE] Backend-naming lines outside this diff remain: the auto-mode classifier note in the deploy skill and its doc page, the "works without prompts across Claude Code, Gemini CLI, Cursor, and Codex" sentence in the prompt-avoidance blocks of the start and submit-for-review skills, and the Cursor trigger line in Verdict: APPROVE |
…on docs at permissions.yaml
Code Cannon review (third pass)Sensitive-area gate: not triggered — the diff is prose in docs, adapter notes, config comments, and skill bodies; no authentication, payment, secrets, production-config, or destructive-operation surface is touched. [NOTE] The submit-for-review skill now takes the inline review path when a Verdict: APPROVE |
What changed
Removes committed claims about which agent backends can or cannot do something, and replaces backend-naming branches in skills with capability-conditional phrasing.
docs/adapters.md— dropped the "can spawn a review sub-agent natively" sentence and the "Limitation: these tools do not support sub-agent spawning" paragraph. Added a short "Feature availability" section explaining why the docs do not say which agent has which feature. The "Adding a new adapter" step now asks for invocation mechanics only.adapters/agents/config.yaml— notes cut to the trigger sentence; a comment abovenotes:states the mechanics-only rule.review,submit-for-review,review-agent,setup) — removed the "(e.g. Claude Code)" / "(Codex, Cursor, Gemini)" parentheticals; the bare conditionals remain.setupPhase 2 now branches on whether the harness reads its allowlist from.claude/settings.jsonrather than on agent name.AGENTS.md— new "Backend capability claims" subsection: the rule, the mechanics-vs-availability split for adapter notes, and no capability matrix..claude/skills/and.agents/skills/via./sync.py --force.Why
The claims were accurate when written and went stale without anything in this repo changing. Conditional phrasing does not decay: the running agent takes whichever branch is true for it at the time.
Notes
cursor,codex, andgeminiadapter configs; those are now bare aliases, so the claim lived once inadapters/agents/config.yaml.docs/index.md(outside the sub-agent scope of the issue), and file-location mentions such as the "read natively by" table.Test plan
make checkpassesmake testpasses (212 tests)docs/,adapters/,skills/for sub-agent claims tied to a named backend returns noneCloses #217