Skip to content

Commit 5b633d9

Browse files
committed
docs(ai-pipeline): describe 3-agent harness architecture
1 parent efdf724 commit 5b633d9

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

docs/ai-pipeline.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,27 @@ Trigger: `check_run` or `workflow_run` with `conclusion=failure` on a PR branch.
111111

112112
---
113113

114-
## 3. GitHub Actions workflow
114+
## 3. GitHub Actions workflow — 3-agent harness
115115

116-
The workflow is defined in [`.github/workflows/ai-dev.yml`](../.github/workflows/ai-dev.yml).
116+
The workflow is defined in [`.github/workflows/ai-dev.yml`](../.github/workflows/ai-dev.yml) and split into three jobs that communicate via the `.harness/<issue_number>/` directory committed to the AI branch:
117117

118-
- Trigger: `workflow_dispatch` only. It cannot be invoked by an issue/comment event directly.
119-
- Inputs: `issue_number`, `task_type`, `prompt`.
120-
- Branch: always `ai/issue-{issue_number}` cut from `develop`.
118+
| Job | Role | Reads | Writes |
119+
| ----------- | ------------- | ----------------------------------- | ---------------------------------------------- |
120+
| `plan` | **Planner** | issue/PR context + repo (read-only) | `.harness/<n>/plan.md` (artifact + commit) |
121+
| `implement` | **Generator** | `plan.md` | code edits, `.harness/<n>/plan.md` (commit) |
122+
| `evaluate` | **Evaluator** | `plan.md` + git diff vs develop | `.harness/<n>/review.md` (commit + PR comment) |
123+
124+
Key rules:
125+
126+
- Trigger: `workflow_dispatch` only. Cannot be invoked by an issue/comment event directly.
127+
- Inputs: `issue_number`, `task_type`, `prompt`, optional `head_branch`.
128+
- Branch: `ai/issue-<issue_number>` by default; if `head_branch` is passed, that exact branch is updated (used by `/ai-apply-review`).
129+
- `task_type=plan` runs only the Planner; the PR contains only the plan markdown.
130+
- Any other `task_type` runs Planner + Generator + Evaluator in sequence. Generator commits code, Evaluator posts a verdict as a PR comment.
131+
- Evaluator can only return text; any incidental file edits the model attempts are reverted.
121132
- Target: PR is opened against `develop`, never `master`.
122-
- Permissions are scoped to `contents: write`, `pull-requests: write`, `issues: write`. The workflow has no `id-token` and no `NPM_TOKEN`, so it cannot publish.
133+
- Permissions scoped to `contents: write`, `pull-requests: write`, `issues: write`. No `id-token`, no `NPM_TOKEN`, so the workflow cannot publish.
134+
- Each Gemini call uses [`.github/actions/gemini`](../.github/actions/gemini/action.yml), a composite action that retries through a model fallback chain (`GEMINI_MODELS` variable) and, where allowed (`plan`/`evaluate` only), falls back to a direct REST API call when the CLI hits quota.
123135

124136
---
125137

0 commit comments

Comments
 (0)