feat: support codex and claude reviewers
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://nodejs.org)
|
||||
|
||||
**Codex-hosted autonomous implementation loop with Reasonix, Claude Code, and Agy executors.**
|
||||
**Codex or Claude hosted autonomous implementation loop with Reasonix, Claude Code, and Agy executors.**
|
||||
|
||||
`agent-workflow` orchestrates a stateful implement-review-fix cycle where:
|
||||
|
||||
- **Codex** acts as the host planner, reviewer, and final acceptance authority
|
||||
- **Codex or Claude** acts as the host planner, reviewer, and final acceptance authority
|
||||
- **Reasonix, Claude Code, or Agy** executes implementation and fixes in the same session
|
||||
- The workflow maintains atomic state, VCS baseline gates, scope enforcement, and convergence limits
|
||||
- Supports both **Git** and **SVN** working copies with strict validation
|
||||
@@ -30,6 +30,24 @@ Or use locally in a project:
|
||||
npm install --save-dev agent-workflow
|
||||
```
|
||||
|
||||
## Host Skill Installation
|
||||
|
||||
The `agent-workflow-host` skill provides the instructions for Codex or Claude to act as the workflow host.
|
||||
|
||||
### Codex
|
||||
Codex uses `~/.codex/skills/agent-workflow-host`.
|
||||
```bash
|
||||
mkdir -p ~/.codex/skills/agent-workflow-host
|
||||
cp node_modules/agent-workflow/skills/agent-workflow-host/SKILL.md ~/.codex/skills/agent-workflow-host/
|
||||
```
|
||||
|
||||
### Claude Code
|
||||
Claude uses `~/.claude/skills/agent-workflow-host`.
|
||||
```bash
|
||||
mkdir -p ~/.claude/skills/agent-workflow-host
|
||||
cp node_modules/agent-workflow/skills/agent-workflow-host/SKILL.md ~/.claude/skills/agent-workflow-host/
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Create a plan (WorkflowPlanV1 JSON):
|
||||
@@ -61,13 +79,13 @@ agent-workflow start --plan plan.json --executor reasonix
|
||||
3. Review the implementation:
|
||||
|
||||
```bash
|
||||
agent-workflow review --run <run-id>
|
||||
agent-workflow review --run <run-id> --reviewer <codex|claude>
|
||||
```
|
||||
|
||||
4. Submit a decision (fix, accept, or needs_human):
|
||||
|
||||
```bash
|
||||
agent-workflow decide --run <run-id> --input decision.json
|
||||
agent-workflow decide --run <run-id> --input decision.json --reviewer <codex|claude>
|
||||
```
|
||||
|
||||
## Commands
|
||||
@@ -77,7 +95,7 @@ agent-workflow decide --run <run-id> --input decision.json
|
||||
Start a new workflow run. Requires a clean working tree.
|
||||
|
||||
```bash
|
||||
agent-workflow start --plan <plan.json|-> --executor <reasonix|claude|agy> [--vcs <git|svn|none>] [--max-cycles <n>] [--new-task]
|
||||
agent-workflow start --plan <plan.json|-> --executor <reasonix|claude|agy> [--reviewer <codex|claude>] [--vcs <git|svn|none>] [--max-cycles <n>] [--new-task]
|
||||
```
|
||||
|
||||
- `--vcs` - Explicitly specify VCS kind (`git`, `svn`, or `none`). If omitted, auto-detects from the working directory. If neither Git nor SVN is detected, it automatically falls back to `none` (snapshot mode).
|
||||
@@ -91,30 +109,30 @@ agent-workflow start --plan <plan.json|-> --executor <reasonix|claude|agy> [--vc
|
||||
|
||||
### `agent-workflow review`
|
||||
|
||||
Generate a Codex review bundle after executor completion. Checks HEAD stability and scope compliance.
|
||||
Generate a host review bundle after executor completion. Checks HEAD stability and scope compliance.
|
||||
|
||||
```bash
|
||||
agent-workflow review --run <run-id>
|
||||
agent-workflow review --run <run-id> --reviewer <codex|claude>
|
||||
```
|
||||
|
||||
Once the run is at or past the guidance threshold — the executor cycle about to start is `>= 3` (i.e. reviewing cycle 2, so the next fix cycle would be the third round) — the bundle sets `detailedGuidanceRequested: true` and includes a `reviewerInstructions` string. This asks Codex, if it decides `fix`, to return a concrete step-by-step implementation plan so the executor can converge quickly.
|
||||
Once the run is at or past the guidance threshold — the executor cycle about to start is `>= 3` (i.e. reviewing cycle 2, so the next fix cycle would be the third round) — the bundle sets `detailedGuidanceRequested: true` and includes a `reviewerInstructions` string. This asks the host, if it decides `fix`, to return a concrete step-by-step implementation plan so the executor can converge quickly.
|
||||
|
||||
### `agent-workflow decide`
|
||||
|
||||
Submit a Codex decision (fix, accept, or needs_human). A fix decision resumes the same executor session.
|
||||
Submit a host decision (fix, accept, or needs_human). A fix decision resumes the same executor session.
|
||||
|
||||
```bash
|
||||
agent-workflow decide --run <run-id> --input <decision.json|->
|
||||
agent-workflow decide --run <run-id> --input <decision.json|-> --reviewer <codex|claude>
|
||||
```
|
||||
|
||||
A `fix` decision may include an optional `implementationGuidance` string (up to 20000 characters). When present, it is injected verbatim into the executor's fix prompt under a `## Detailed Implementation Guidance` section, and the frozen plan's `planMarkdown` and acceptance criteria are re-sent alongside it so the executor has full context. This is the channel Codex uses to answer the bundle's `detailedGuidanceRequested` signal, and it flows through the normal fix, `retry-execute`, and `extend` paths.
|
||||
A `fix` decision may include an optional `implementationGuidance` string (up to 20000 characters). When present, it is injected verbatim into the executor's fix prompt under a `## Detailed Implementation Guidance` section, and the frozen plan's `planMarkdown` and acceptance criteria are re-sent alongside it so the executor has full context. This is the channel the host uses to answer the bundle's `detailedGuidanceRequested` signal, and it flows through the normal fix, `retry-execute`, and `extend` paths.
|
||||
|
||||
### `agent-workflow retry-review`
|
||||
|
||||
Retry review after the executor has removed approved out-of-scope artifacts.
|
||||
|
||||
```bash
|
||||
agent-workflow retry-review --run <run-id>
|
||||
agent-workflow retry-review --run <run-id> --reviewer <codex|claude>
|
||||
```
|
||||
|
||||
### `agent-workflow retry-execute`
|
||||
@@ -276,7 +294,7 @@ Any active state → completed | needs_human | blocked | budget_exhausted | abor
|
||||
|
||||
## Scope Gates
|
||||
|
||||
All file modifications must stay within the approved scope. Out-of-scope changes trigger `awaiting_scope_resolution`, where Codex inspects each violation and decides whether to remove it or escalate to `needs_human`.
|
||||
All file modifications must stay within the approved scope. Out-of-scope changes trigger `awaiting_scope_resolution`, where the host inspects each violation and decides whether to remove it or escalate to `needs_human`.
|
||||
|
||||
## VCS Support
|
||||
|
||||
|
||||
Reference in New Issue
Block a user