- Update all AGENTS.md watermarks to current HEAD (251d160)
- dev/AGENTS.md: document dev-poll's early direct-merge scan (before lock
check) — approved PRs now merge without waiting for active dev sessions;
chore/gardener PRs merge without issue numbers in branch name
- planner/AGENTS.md: document dispatch-idle-formulas phase (step 4); note
that planner reads both factory and project-specific formulas; clarify
that all planner artifacts use $PROJECT_REPO_ROOT, not $FACTORY_ROOT
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.9 KiB
Dev Agent
Role: Implement issues autonomously — write code, push branches, address CI failures and review feedback.
Trigger: dev-poll.sh runs every 10 min via cron. It performs a direct-merge
scan first (approved + CI green PRs — including chore/gardener PRs without issue
numbers), then checks the agent lock and scans for ready backlog issues (all deps
closed) or orphaned in-progress issues to spawn dev-agent.sh <issue-number>.
The direct-merge scan runs before the lock check so approved PRs get merged even
while a dev-agent session is active on another issue.
Key files:
dev/dev-poll.sh— Cron scheduler: finds next ready issue, handles merge/rebase of approved PRs, tracks CI fix attemptsdev/dev-agent.sh— Orchestrator: claims issue, creates worktree + tmux session with interactiveclaude, monitors phase file, injects CI results and review feedback, merges on approvaldev/phase-handler.sh— Phase callback functions:post_refusal_comment(),_on_phase_change(),build_phase_protocol_prompt()dev/phase-test.sh— Integration test for the phase protocol
Environment variables consumed (via lib/env.sh + project TOML):
CODEBERG_TOKEN— Dev-agent token (push, PR creation, merge) — use the dedicated bot accountCODEBERG_REPO,CODEBERG_API— Target repositoryPROJECT_NAME,PROJECT_REPO_ROOT— Local checkout pathPRIMARY_BRANCH— Branch to merge into (e.g.main,master)WOODPECKER_REPO_ID— CI pipeline lookupsCLAUDE_TIMEOUT— Max seconds for a Claude session (default 7200)MATRIX_TOKEN,MATRIX_ROOM_ID,MATRIX_HOMESERVER— Notifications (optional)
Lifecycle: dev-poll.sh → dev-agent.sh → create Matrix thread + export
MATRIX_THREAD_ID (streams Claude output to thread via Stop hook) → tmux
dev-{project}-{issue} → phase file drives CI/review loop → merge → close issue.