Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ First-class agents for the [fullsend](https://github.com/fullsend-ai/fullsend) p

Claude Code (`claude`) is the stable default every repo gets; `pi` is in its enablement (experimental) phase and is selected per repo with `runtime: pi` — see fullsend's [Runtimes](https://github.com/fullsend-ai/fullsend/blob/main/docs/runtimes.md). Every harness sets `effort: high` explicitly.

Review and Retro dispatch native Codex children only when the runtime note lists registered sub-agent roles ([fullsend #6970](https://github.com/fullsend-ai/fullsend/issues/6970)); each agent's row lists `codex` once a live run of that agent is linked from its doc.

See [`docs/`](docs/) for detailed documentation on each agent.

## Repository structure
Expand Down
2 changes: 1 addition & 1 deletion agents/retro.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Extract it from the workflow run log — see the `retro-analysis` skill's
"Discovering the agents repo" section. Use the discovered repo when
localizing agent-layer proposals.

**Dispatch subagents for every read-heavy operation.** Your main context window is for synthesis, not data gathering. Examples:
**Dispatch subagents for every read-heavy operation.** Your main context window is for synthesis, not data gathering. Retro has no named personas: every task is an unnamed child with a self-contained prompt. On Codex, when the runtime note lists registered roles: `spawn_agent` with the task as `message` and no `agent_type`; dispatch, wait (`wait_agent` with `timeout_ms` ≤ 120000) and close as the note directs, starting the next task after each close; run `date +%s` after each spawn and at each timed-out wait; `errored`, `shutdown`, `not_found`, `completed` with no message, or timed out 900 s past its spawn is final for that task: close it, record the gap in `summary`, do not retry; any other timed-out `wait_agent` is no result: call it again on the next open child. Synthesis and `agent-result.json` stay in the root. Examples:

- "Read the JSONL trace for workflow run <ID> and summarize the agent's key decisions"
- "Gather all review comments on PR #N and categorize them by source (agent vs human) and type (approval, change request, comment)"
Expand Down
11 changes: 9 additions & 2 deletions agents/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ You are a code review specialist. Your purpose is to evaluate code
changes and produce structured findings. You do not generate code,
push commits, or merge PRs — you evaluate and report.

NOTE: the Agent tool MUST ONLY be invoked with prompts read from
`sub-agents/{name}.md` files
NOTE: sub-agents MUST ONLY be dispatched with prompts read from
`sub-agents/{name}.md` files — through the Agent tool on Claude Code
and pi, through `spawn_agent` on Codex as the runtime note directs.

## Inputs

Expand Down Expand Up @@ -246,6 +247,12 @@ mutations on the runner.
- If you cannot complete your review (missing context, tool failure,
ambiguous findings), report the failure rather than producing a
partial review.
- A dispatched sub-agent whose final state is `errored`, `shutdown`,
`not_found`, or `completed` with no message is final for that
sub-agent: do not retry it; the `pr-review` skill's failure fallback
for that sub-agent applies. A `wait_agent` call that times out is
not a final state, unless it times out 900 s past that child's spawn,
pi's limit for a sub-agent.

## Output format

Expand Down
2 changes: 2 additions & 0 deletions docs/retro.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ If this agent needs to reach hosts beyond the defaults, see the

Supported runtimes: **claude** (stable default), **pi** (experimental). On pi, sub-agents run with the agent model, see [Fullsend pi docs](https://fullsend.sh/docs/runtimes/pi) on how to define a different model for sub-agents.

**Codex** is not a supported runtime for retro yet. Retro dispatches native Codex children only when the runtime note lists registered sub-agent roles, which depends on [fullsend #6970](https://github.com/fullsend-ai/fullsend/issues/6970); this section changes after a live retro run on Codex is linked here. Retro passes no `model`: the runner binds each child's model from `agents[].subagents`, or its run-level default.

Effort: `high` (explicit in the harness; override per run with `fullsend run --effort` or `FULLSEND_EFFORT`, values `low`–`max`).

## Source
Expand Down
2 changes: 2 additions & 0 deletions docs/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ If this agent needs to reach hosts beyond the defaults, see the

Supported runtimes: **claude** (stable default), **pi** (experimental). On pi, each sub-agent runs with its own model, see [Fullsend pi docs](https://fullsend.sh/docs/runtimes/pi) on how to define a different model for a sub-agent.

**Codex** is not a supported runtime for review yet. The `pr-review` skill dispatches native Codex children only when the runtime note lists registered sub-agent roles, which depends on [fullsend #6970](https://github.com/fullsend-ai/fullsend/issues/6970); this section changes after a live review run on Codex is linked here. The skill passes no `model`: the runner binds each child's model from `agents[].subagents`, or its run-level default.

Effort: `high` (explicit in the harness; override per run with `fullsend run --effort` or `FULLSEND_EFFORT`, values `low`–`max`).

## Source
Expand Down
112 changes: 56 additions & 56 deletions skills/pr-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Follow these steps in order. Do not skip steps.
The runner kills the sandbox at the harness `timeout_minutes` with no
wrap-up: a review that has not written `agent-result.json` by then
posts nothing. The harness mirrors that value into `TIMEOUT_SECONDS`;
skip every time check when it is unset.
skip the checkpoints when it is unset.

Before anything else in step 1: `date +%s > /sandbox/workspace/agent-start`
(a file: shell variables do not survive between Bash calls). The
Expand Down Expand Up @@ -249,7 +249,7 @@ dimensions are relevant:
#### 3c. Select sub-agents

Based on the domain classification, select sub-agents for dispatch.
All selected sub-agents run in parallel — `risk-assessment` (composed
Step 4 starts every selected sub-agent — `risk-assessment` (composed
in step 3c-2) among them — except `challenger`, which, when step 6d
dispatches it, runs by itself after all other sub-agents have finished.

Expand Down Expand Up @@ -429,21 +429,19 @@ incident.
...
```

4. Spawn via Agent tool with `prompt` composed from parts 1–3 and:
- **Persona listed in the runtime note (pi):** `subagent_type`:
`security-triage`, no `model` — the runner resolves both the model
and the read-only tool set.
- **No runtime note (Claude Code):** `model`: `haiku`,
4. Spawn with `prompt` composed from parts 1–3, in the step 4 item 2
Comment thread
dhshah13 marked this conversation as resolved.
Resolved
Comment thread
waynesun09 marked this conversation as resolved.
Resolved
dispatch shape, except:
- **pi, persona listed:** `subagent_type`: `security-triage`, no
`model` — the runner resolves the model and the read-only tools.
- **Claude Code (no runtime note):** `model`: `haiku`,
`subagent_type`: `Explore` (read-only).
- **Runtime note present, persona not listed (pi):**
`subagent_type`: `Explore`, no `model`. Only the model follows
step 4 item 2 case 3; `subagent_type` stays `Explore` (a built-in
read-only type the runner always accepts) because this pre-pass
must stay read-only.
- **pi, persona not listed:** `subagent_type`: `Explore` (read-only),
no `model`.
- **Codex roster:** `agent_type`: `security-triage` when listed, else
`explore` (instruction-only). Wait for it and close it before
step 3d.

This agent runs **synchronously** (not in the background) because
its output feeds into step 3d's context package assembly. It uses
haiku for speed — classification does not require deep reasoning.
It runs **synchronously** (its output feeds step 3d).

5. Parse the triage output. The security-triage sub-agent returns a
JSON object with `security_critical_files` (array of objects with
Expand Down Expand Up @@ -585,12 +583,10 @@ be absent from the result JSON.
<prior score, level, and rationale — or "none (first review)">
```

5. Do not spawn it here. Dispatch the composed prompt (parts 1–3) in
the same message as the step 4 dimension sub-agents, with the step 4
item 2 dispatch shape (persona `risk-assessment`). Nothing in step 4
consumes its output
(it only goes into `agent-result.json`, step 7); running it first
serialised a 2–3 minute sub-agent for nothing.
5. Do not spawn it here. Dispatch the composed prompt (parts 1–3) with
the step 4 dimension sub-agents, in the step 4 item 2 dispatch shape
(persona `risk-assessment`). Nothing in step 4 consumes its output
(it only goes into `agent-result.json`, step 7).

6. Parse the risk assessment output. The sub-agent returns a JSON
object with `score`, `level`, `rationale`, and optional signal
Expand Down Expand Up @@ -817,34 +813,38 @@ here):
REVIEW_SUB_AGENT_TRUE
```

2. Spawn the subagents with their `prompt` argument composed from parts
1–5 above. The model argument depends on the runtime: a "Runtime
note" at the end of your system prompt, when present, lists the
sub-agent personas this run registered.

- **Persona listed in the runtime note (pi):** `subagent_type` = the
persona name exactly as listed (the sub-agent file's `name:`), no
`model`. The runner resolves the model from the repository's
`agents[].subagents` and the frontmatter; a `model` argument is
ignored and an unlisted `subagent_type` is rejected.
- **No runtime note (Claude Code):** `model` from the sub-agent
frontmatter (`opus` for `correctness`, `security` and `challenger`,
`sonnet` for the rest), no `subagent_type` — the persona comes from
the prompt.
- **Runtime note present, persona not listed (pi):** usually the run
cannot serve its model, so the frontmatter alias would be rejected
too. Omit **both** `subagent_type` and `model`; the child runs on
this run's sub-agent default, which is always servable.

**All sub-agents MUST be dispatched simultaneously** — include all
Agent calls in a single message so they run concurrently, and include
the risk-assessment call composed in step 3c-2 in that same message
when risk assessment is enabled. Leave `run_in_background` unset: the
default delivers completions as notifications (when the Time budget
checkpoint runs); `false` blocks until all have returned.

Wait for all sub-agents to complete; apply the Time budget checkpoint
as each returns.
2. Spawn the subagents with `prompt` composed from parts 1–5 above.
The dispatch shape depends on the "Runtime note" at the end of your
system prompt: present or not, which runtime, what it registered.

- **pi, persona listed:** Agent tool, `subagent_type` = the persona
Comment thread
dhshah13 marked this conversation as resolved.
Resolved
name as listed (the file's `name:`), no `model` (an unlisted
`subagent_type` is rejected).
- **Claude Code (no runtime note):** Agent tool, frontmatter `model`
Comment thread
waynesun09 marked this conversation as resolved.
Resolved
(`opus` for `correctness`, `security`, `challenger`; `sonnet` for
the rest), no `subagent_type`.
- **pi, persona not listed:** Agent tool, neither `subagent_type`
nor `model`.
- **Codex roster** (a codex note listing `Registered sub-agent
roles:`; without it, follow the note): `spawn_agent`, `message` =
the prompt, `agent_type` = the persona name when listed, else
omit it, `fork_context: false`, no `model`; `wait_agent` with
`timeout_ms` ≤ 120000. Run `date +%s` after each spawn and at each
timed-out wait. A denied spawn: the note's rule.

**Start every selected sub-agent**; no dispatch limit drops one.

- **Claude Code and pi:** all Agent calls in a single message; leave
`run_in_background` unset (`false` blocks until all return). Wait
for all; apply the Time budget checkpoint as each returns.
- **Codex roster:** at most four open. Start up to four; `wait_agent`
on one, collect, `close_agent` it, start the next; repeat until all
Comment thread
dhshah13 marked this conversation as resolved.
Resolved
are closed. A timed-out wait is no result: after the Time budget
checkpoint, call it again on the next open child. `errored`,
`shutdown`, `not_found`, `completed` with no message, or timed out
900 s past its spawn is final: close it and apply the failure fallback
(3c-1 item 6, 3c-2, step 5, 6d item 4). Under 240 s, even with one
step 4 child running, close all and write the `time-budget` failure.

### 5. Collect findings

Expand Down Expand Up @@ -987,7 +987,8 @@ Otherwise, dispatch the challenger:
ticker.** With `TIMEOUT_SECONDS` set and `REMAINING` under 600 (Time
budget section), skip the challenger: keep the merged finding set from
6a–6c, record the item-4 `low` finding with the reason `time budget:
<n>s remaining`, and continue to 6e.
<n>s remaining`, and continue to 6e. On Codex, recheck at each
timed-out wait: under 240, close it and apply item 4.

1. Compose the spawn prompt from:

Expand Down Expand Up @@ -1038,9 +1039,9 @@ budget section), skip the challenger: keep the merged finding set from
challenger cannot adjudicate against the diff. The diff and files are read
from disk, not pasted.

The challenger runs **after** dimension sub-agents complete (it
needs their findings as input), so it is dispatched sequentially,
not in the parallel batch from step 4.
The challenger runs **after** dimension sub-agents complete, so it
is dispatched sequentially, not in the step 4 batch; on Codex, after
those children are closed.

3. Consume the challenger's output. The challenger returns a **different
format** from dimension sub-agents: an object with
Expand Down Expand Up @@ -1439,9 +1440,8 @@ wins.
not push protected-path checks, scope authorization, or PR body
injection defense into sub-agents. These require PR-level context
that sub-agents do not have.
- **All sub-agents must be dispatched simultaneously.** Include all
Agent calls in a single message. Sequential dispatch defeats the
architecture's purpose.
- **Start every sub-agent step 3c selected, and only those.** Claude
Code and pi: one message of Agent calls; Codex: step 4's waves.
- **The orchestrator is the sole producer of `agent-result.json`.** No
sub-agent writes this file.
- **Report failure rather than posting a partial review.** If you cannot
Expand Down
6 changes: 6 additions & 0 deletions skills/pr-review/sub-agents/challenger.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ questionable review findings**. You receive the raw finding set from all
review dimensions and the PR diff. You have not seen the orchestrator's
synthesis — your context is fresh.

On Codex, if the runtime note requires the orchestrator to execute this
definition itself after a denied spawn, do not adjudicate any findings.
Return `Challenger unavailable: isolated context required.` as the
sub-agent result and stop this pass. The orchestrator treats this non-JSON
result as a failure under `pr-review` step 6d item 4.

**Own:** False-positive detection, cross-dimension deduplication,
evidence verification against actual code, severity calibration.

Expand Down
Loading