This workflow lets Forge use GitHub Issues and pull requests as the source of truth for agent-assisted work.
GitHub stays in charge of the durable record: the request starts as an issue, the agent request is recorded on that issue, run state is stored as JSON in the repository, and the final code review happens in a pull request.
Forge does not automatically run Claude Code or Codex from GitHub Actions. It prepares a bounded work order and a handoff package. A human then runs the selected tool locally or in another controlled environment.
- Discuss the idea in ChatGPT or another planning surface.
- File a GitHub issue using the Feature, Bug, or Other template.
- Issue intake validates the issue and applies
ready-for-agent, or appliesneeds-clarificationwhen required information is missing. - A maintainer comments
claude implementorcodex implementon the issue. - The command router creates a run record and applies
agent-requested. - A maintainer starts the
Agent Dispatchworkflow manually with the issue number. Dispatch checks the issue and run record, then prepares a bounded work order. - Handoff generates
handoff.md,prompt.md, andmetadata.json. - The user runs Claude Code or Codex locally, or in another controlled
environment, using the generated
prompt.md. - The implementation pull request follows the PR contract.
- The PR contract checker compares the pull request body with the source issue acceptance criteria and posts a review-support comment.
- The user reviews, tests, and merges when satisfied.
Forge uses these labels to show workflow state:
ready-for-agentmeans the issue has enough detail for bounded agent work.needs-clarificationmeans a human must clarify the issue before agent work.agent-requestedmeans a maintainer asked for implementation and a run record exists.agent-runningis reserved for a future runtime adapter that actually starts work.agent-blockedmeans Forge could not continue and posted the reason.agent-pr-openedis reserved for a future step that links a pull request back to the run log. The PR checker does not set it in this slice.
Put one supported phrase on the first non-empty line of an issue comment:
claude implementcodex implementreviewcheckpointhandoff
Today, claude implement and codex implement create implementation run
records. The other phrases are recognized so Forge can give a clear response,
but they do not start implementation in this slice.
The durable run log uses one status field:
requestedmeans the command router accepted the request.handed-offmeans dispatch or handoff prepared bounded work, but no runtime started.runningis reserved for a future controlled runtime adapter.blockedmeans Forge refused to continue and recorded a reason.pr-openedis reserved for a future step that links a pull request to the run.completed,failed, andcancelledare terminal or administrative states.
Issue #144 used the word accepted for dispatch. Forge maps that to
handed-off in the run log so there is not a second status model.
Each accepted request writes one JSON file:
.forge/runs/<issue-number>/<run-id>.json
Those JSON records are committed to the dedicated forge/agent-run-log branch.
Workflows still execute trusted default-branch code. When they need to read or
update run records, they use a temporary worktree for the run-log branch and do
not run code from it.
The run log stores short state and event data. It must not store secrets, credentials, model transcripts, raw prompts, or local auth material.
Handoff generates:
.forge/runs/<issue-number>/<run-id>/handoff.md
.forge/runs/<issue-number>/<run-id>/prompt.md
.forge/runs/<issue-number>/<run-id>/metadata.json
That nested directory is git-ignored. GitHub Actions uploads it as a workflow artifact. Local handoff generation prints the file paths.
The durable run log records only those paths. It does not commit the prompt, handoff, or metadata files.
Implementation pull requests should use the repository template:
## Source Issue
Closes #<issue-number>
## Agent Run
Runtime: claude-code | codex | dry-run | manual
Run ID: <run-id or n/a>
## Summary
## Acceptance Criteria Validation
- [ ] <criterion> — evidence / notes
## Tests / Verification
## Risks / Follow-up
The source issue link can use:
Closes #123Fixes #123Resolves #123Issue: #123
Use Issue: #123 when the PR should link the issue but should not close it.
The checker reads the pull request body, finds the linked source issue, extracts the issue acceptance criteria, and posts one marker-based comment.
It reads the issue link from the Source Issue section only. That avoids
accidentally treating a casual phrase elsewhere in the pull request body as the
source issue.
Each criterion is reported as:
claimedwhen the PR mentions the criterion and includes useful evidence.missingwhen the PR does not mention the criterion.needs-reviewwhen the PR mentions the criterion but the evidence is generic or still looks like a placeholder.
The checker does not block merge by default. It helps reviewers find gaps; it does not prove the implementation is correct.
- Do not run Claude Code or Codex automatically from GitHub Actions.
- Do not execute pull request code in the PR contract checker.
- Do not execute issue comments or generated prompt files.
- Do not run code from the
forge/agent-run-logbranch. - Do not store secrets, credentials, transcripts, raw prompts, or local auth material in the durable run log.
- Keep workflow comments marker-based so reruns update one comment instead of creating duplicates.
If dispatch says no run record exists, make sure a maintainer first commented
claude implement or codex implement and that the command router completed.
If dispatch blocks on labels, remove needs-clarification only after the issue
has been clarified, and make sure ready-for-agent is present.
If handoff artifacts are missing from a GitHub Actions run, check the
Agent Handoff workflow summary and artifact upload step. The files are
git-ignored by design and should not appear in the repository diff.
If the PR checker cannot find a source issue, add a Source Issue section with
Closes #123, Fixes #123, Resolves #123, or Issue: #123.
If the PR checker says the linked issue could not be loaded, check for a typo or for a cross-repository issue link. The current checker expects a same-repository issue.
If the PR checker marks a criterion needs-review, replace generic text like
"done" with a concrete file, test, screenshot, or manual verification note.