repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

Repin reviewers to Opus and correct the credential trust prose (#46)

031326029fa0209018a9db92caef79ed2b8f34dc

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Reviewer frontmatter still pinned model: fable, overriding the workflow's
--model opus for the subagent's own turns; repin both to opus so reviews stop
burning Fable. Correct the credential section that justified credentialed Codex
review on a false "members-only" premise: the repo is public and forkable, so
name fork-secret isolation as the real control and document the same-repo build
residual as an accepted, ungated, cross-family symmetric posture.

Closes #47.

Changed files (6)

+53 / −33 text lines

Diff layout

.claude/agents/reviewer.md

Modified

+1 / −1 text lines

22name: reviewer
33description: Adversarially review a PR for correctness and quality against the spec and invariants. Posts a review verdict; edits no code. Runs on a different model than the builder.
44tools: Read, Grep, Glob, Bash
5model: fable
5model: opus
66---
88You are the **reviewer**. Every PR passes your bench before it can merge. You

.claude/agents/security-reviewer.md

Modified

+1 / −1 text lines

22name: security-reviewer
33description: Security-review a PR and triage security alerts — sandbox escape, secrets, unsafe, injection, supply chain. Escalates high severity to the owner; edits no code.
44tools: Read, Grep, Glob, Bash
5model: fable
5model: opus
66---
88You are the **security-reviewer**. Smith runs untrusted Lua plugins, brokers

.github/workflows/adw-codex-build.yml

Modified

+9 / −6 text lines

11# Codex as a first-class BUILDER — not just a reviewer. Route an issue to Codex
22# by adding the `codex` label; it implements the slice on a branch and opens a PR
3# that rides the normal gate (Fable review + merge-gate), exactly like a
4# builder-authored PR. Mix-and-match: some issues to Claude's builder, some to
5# Codex, owner's call per issue.
3# that rides the normal gate (Opus review + merge-gate), exactly like a
4# builder-authored PR. Mix-and-match: the triager routes each issue to Claude's
5# builder or Codex.
66#
7# Trust: applying a label needs repo write, so only a collaborator/owner routes
8# work here — the trigger is privileged, not open. The PR opens via the App token
9# so the reviewers actually run on it.
7# Trust: the triager auto-applies `codex` on issues anyone can open, so this is
8# NOT human-gated — the same shape as Claude's builder on `ready`. Attacker issue
9# text can reach this credentialed build; that residual is accepted symmetrically
10# across both builders (see AGENTIC-DEVELOPMENT.md "Credentialed agents over
11# untrusted input"), not closed by a per-workflow author gate. The PR opens via
12# the App token so the reviewers actually run on it.
1013name: adw-codex-build
1215on:

.github/workflows/adw-codex-review.yml

Modified

+8 / −4 text lines

11# Codex cross-family review — a second opinion from a different model family,
22# advisory (never a gate label; a Codex outage can't wedge a merge).
33#
4# Runs autonomously on every non-draft PR. The repo is members-only (issues and
5# PRs only from repository members), so there is no untrusted external author —
6# the credentialed-agent-over-untrusted-input problem is gone at the source, and
7# no author gate or approval is needed. Fork PRs get no secrets anyway.
4# Runs autonomously on every non-draft PR. The repo is public and forkable, so
5# the enforced control is GitHub fork-secret isolation: this triggers on
6# `pull_request` (never `pull_request_target`), so a fork PR gets an empty
7# CODEX_AUTH_JSON and a read-only token — the credentialed path cannot run on
8# untrusted fork code. That control is permanent; no author gate is needed. See
9# AGENTIC-DEVELOPMENT.md "Credentialed agents over untrusted input" for the
10# same-repo residual (attacker-authored issue → adw-codex-build) — accepted and
11# ungated, symmetric with Claude's builder, not closed by a per-workflow gate.
812name: adw-codex-review
1014on:

AGENTS.md

Modified

+1 / −1 text lines

2828 the project is in the spec/planning phase (SPEC §18 sanctions prototypes only).
2929- **Never weaken a safety mechanism** to move a PR — no faking a green gate, no
3030 deleting/skipping tests, no touching the merge-gate or a required check.
31- **Advisory, not the gate.** Your verdict is weighed by the Fable reviewers and
31- **Advisory, not the gate.** Your verdict is weighed by the Claude reviewers and
3232 the owner; you do not own the labels that gate the merge. Say what you see
3333 plainly; you are not a single point of failure.
3434- **The spec and invariants are the owner's.** If a PR is correct against the code

docs/plans/AGENTIC-DEVELOPMENT.md

Modified

+33 / −20 text lines

6363| Concept | Encoded in | In repo? | Authority |
6464|---|---|---|---|
65| agent persona / model / tool scope | `.claude/agents/<role>.md` | ✅ | the file |
65| agent persona / model / tool scope / charter | `.claude/agents/<role>.md` | ✅ | the file |
6666| which agent runs on which event | `.github/workflows/adw-*.yml` (verb-named; `adw-review` hosts both reviewers) | ✅ | the workflow |
6767| shared rules all agents inherit | `CLAUDE.md` (+ nested) | ✅ | the file |
6868| Claude runtime settings | `.claude/settings.json` | ✅ | the file |
105105| `sweeper` | `schedule` | unstick stalls, enforce WIP, brake runaways | **Issues/PRs/board** labels | Haiku |
106106| `adw-doctor` | `schedule` (weekly) | diagnose the *workflow's own* health — failing/drifting workflows, doc-vs-config drift, gate pathologies — and propose one systemic fix | a **PR** on ADW config, or an **Issue** | Opus |
107107| `pioneer` (skill) | `needs:prototype` | prove/disprove an unproven spec claim with a prototype | `prototypes/*` | Sonnet |
108| `codex` (OpenAI) | `pull_request` (trusted author) **reviews**; issue labeled `codex` **builds** | cross-family second opinion, and a foreign-model builder | a **PR comment** (review) or a **branch + PR** (build) | Codex (ChatGPT sub) |
108| `codex` (OpenAI) | `pull_request` **reviews**; issue labeled `codex` **builds** | cross-family second opinion, and a foreign-model builder | a **PR comment** (review) or a **branch + PR** (build) | Codex (ChatGPT sub) |
110110`codex` is a **first-class but foreign** citizen — it both **reviews and builds**,
111111mix-and-match with Claude's agents per the owner's call. Its "agent file" is
324324 `security-cleared`, and `merge-gate` turns green. The reviewers apply their own
325325 verdict labels directly — they run with full tool access, bounded by their
326326 `.claude/agents/*.md` charters (which forbid the builder from setting a verdict
327 on its own PR), not by a tool allow-list. On a members-only repo the trust is
328 in the instructions, not a permission gate.
327 on its own PR), not by a tool allow-list. The trust is
328 in the charters, not a permission gate.
329329 `required_approving_review_count` stays `0`; the
330330 code-owner rule still forces a **human** approval on CODEOWNERS paths (spec,
331331 workflows, agents, invariants) — touchpoints 1 and 3 — where the author is the
351351| `adw-revise` | review = *changes requested* on a bot PR | `builder` addresses findings on the same branch; re-review fires on the push | a push emits `synchronize`, not a review — never self-triggers; `sweeper` brakes an endless loop |
352352| `adw-docs` | merged PR touching **product code** (not docs/site/prototypes/config) | `docs-writer` updates docs + site to match, or no-ops | doc-only PRs are `paths-ignore`d, so `docs-writer`'s own PR can't re-trigger it |
353353| `adw-release` | `v*` tag (the owner's release touchpoint) | `release-manager` drafts notes, verifies §14, publishes a Release | tag push is owner-made; relayed via dispatch (the action can't serve `push`) |
354| `adw-comment` | **owner** writes `@smith …` on an issue/PR | routes the instruction to the fitting agent, or answers | locked to `author_association == OWNER` — a public-repo stranger's comment does nothing; agents' own comments aren't the owner |
354| `adw-comment` | **owner** writes `@smith …` on an issue/PR | routes the instruction to the fitting agent, or answers | locked to `author_association == OWNER` — a non-owner's comment does nothing; agents' own comments aren't the owner |
355355| `adw-alerts` | Dependabot / code-scanning alert (or daily) | `security-reviewer` sweeps open alerts, escalates real high-severity, ignores prototype-only ones | alert events relay to dispatch (action can't serve them); a schedule backstops missed events |
356356| *CI self-heal* | — | folded into `sweeper` (hourly), not a per-event trigger | avoids the fiddly `check_suite`→PR mapping and its loop risk; fits the predictability dial |
422422| routing & gates | **Labels** (`.github/labels.yml`, as code) | triager / security-reviewer |
423423| grouping | **Milestones** = waves | `planner` opens + assigns; `surveyor` fills the current one; `release-manager` closes |
424424| every change | **PRs** linked to issues, agent-reviewed | builder |
425| review diversity | **Copilot code review** (advisory) + **Codex** (contributor / advisory reviewer) — cross-family second opinions | `reviewer` / `security-reviewer` weigh |
425| review diversity | **Copilot code review** (advisory) + **Codex** (cross-family builder + advisory reviewer) | `reviewer` / `security-reviewer` weigh |
426426| spec protection | **CODEOWNERS** + branch **ruleset** | (owner) |
427427| dependency updates | **Dependabot** (`.github/dependabot.yml`) — bumps as maintenance | dependency-manager |
428428| code scanning | **DevSkim** (`.github/workflows/devskim.yml`, SARIF → Security tab) + **CodeQL** (Rust) + `cargo audit`/`cargo deny` in CI | security-reviewer |
447447- **Copilot code review** — enabled as a repo setting so it auto-reviews each PR.
448448 Its comments are **advisory**: `reviewer`/`security-reviewer` read and weigh them,
449449 but Copilot never sets a gate label.
450- **Codex** — two depths, owner's choice: as a **contributor**, Codex opens PRs
451 (from its ChatGPT cloud agent connected to the repo) that ride the *existing*
452 gate — reviewed, labeled, squash-merged like any PR, no new workflow; and/or as
453 an **advisory reviewer** in CI, which first needs its subscription-auth mechanics
454 proven the way p35 proved Claude's (a `needs:prototype`), since a metered OpenAI
455 API key is off the table.
450- **Codex** is a first-class dual-role citizen — it both **builds** (route an issue
451 with the `codex` label → `adw-codex-build.yml` implements a slice and opens a PR
452 that rides the normal gate) and **reviews** (`adw-codex-review.yml` posts an
453 advisory cross-family read on every PR). Both are CI workflows on the owner's
454 ChatGPT subscription (`CODEX_AUTH_JSON`); the triager routes each build to Claude
455 or Codex. Advisory as a reviewer — it never sets a gate label.
457457**Deliberately advisory, never gating.** External tools stay *out* of the
458458`merge-gate`'s critical path: our own reviewers own the verdict labels, so a
462462### Credentialed agents over untrusted input (the ADW's §6.7)
464464A credentialed agent (holds a reusable token) that reads attacker-controllable
465input and publishes where anyone can read it is an exfiltration shape. On a public
466repo the leak can't be closed at the output — every channel is public — so the
467**trigger** is the control: **gate the credentialed run to a trusted trigger, and
468run it autonomously there.** Codex uses `author_association ∈ {OWNER, MEMBER,
469COLLABORATOR}` (external PRs never get a credentialed run; they still get the
470reviewers) — no per-run approval, so autonomy is intact. This is the ADW analogue
471of **SPEC §6.7**. Residuals are accepted, not hidden: the token is a rotatable
465input and publishes where anyone can read it is an exfiltration shape — Codex
466review is the case: it reads the PR diff, must read its ChatGPT-sub `auth.json`,
467and posts a public comment. The repo is **public and forkable**, so the enforced
468control is **GitHub's fork-secret isolation**: `adw-codex-review` triggers on
469`pull_request` (never `pull_request_target`), so a PR from a fork gets an empty
470`CODEX_AUTH_JSON` and a read-only token — the credentialed path simply cannot run
471on untrusted fork code. That control is permanent and GitHub-enforced; it does not
472depend on who opened the PR. Interaction limits ("contributors only" on issues and
473PRs) are defense-in-depth on top, not the load-bearing control — and they are
474*temporary* (GitHub expires them after at most six months), so nothing security-
475critical rests on them. The remaining same-repo residual is **symmetric across
476families**, not specific to Codex: the triager auto-routes an issue to a builder —
477Claude's on `ready` or Codex's on `codex` — so attacker-influenceable issue text
478reaches a credentialed builder whose same-repo PR then draws a credentialed review.
479Codex gets **no extra gate**, because Claude's builder has none either — same
480shape, same rules. The bound sits on the *input*, not the build: who can open an
481issue at all (repository access, with interaction limits as the temporary layer
482above), and the review jobs merge nothing and post only a redacted comment. It is
483an accepted residual, held equally for both families. This is the ADW analogue of
484**SPEC §6.7**. Other residuals are accepted, not hidden: the token is a rotatable
472485non-GitHub credential on advisory jobs, `@openai/codex` is unpinned, and a
473compromised trusted account is out of scope (see #18).
486compromised member account is out of scope.
475488Two owner-added workflows already sit on `main` and the plan wraps around them
476489rather than replacing them: