Adds _detect_verification_result() to parse QA agent stdout for failure markers. Even if the QA agent exits with code 0, the merge will be blocked if the output contains patterns like "verification failed", "requirements not met", "not actually implemented", etc. Also handles merge failures (e.g., conflicts) by moving to Triage. Resolves: CG-62 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ClearGrow Agent Runner
Automated task orchestration system that monitors YouTrack issues and coordinates Claude Code agents to resolve them across Gitea repositories, with Woodpecker CI verification.
Overview
The Agent Runner automates the software development workflow:
Ready → In Progress → Build → Verify → Document → Review → Done
(Developer) (CI) (QA) (Librarian)
↑ │ ↓
└──────────┘ Merge to main
(on build failure)
Components
| File | Purpose |
|---|---|
runner.py |
Main orchestration engine |
agent.py |
Claude Code subprocess pool management |
youtrack_client.py |
YouTrack API wrapper |
gitea_client.py |
Gitea API wrapper + git CLI operations |
woodpecker_client.py |
Woodpecker CI build monitoring |
webhook_server.py |
HTTP webhook receiver for real-time events |
prompts/ |
Prompt templates for Claude agents |
Agent Types
| Agent | Token | Purpose |
|---|---|---|
| Developer | agent_tokens.developer |
Code remediation and bug fixes |
| QA | agent_tokens.qa |
Code verification and review |
| Librarian | agent_tokens.librarian |
Documentation updates |
| Build | agent_tokens.build |
CI build status comments |
Configuration
Copy the example config and fill in your credentials:
cp config.yaml.example config.yaml
chmod 600 config.yaml
Required configuration:
youtrack.base_urlandyoutrack.tokengitea.base_urlandgitea.tokenwoodpecker.base_urlandwoodpecker.tokenagent_tokens.*for each agent typerepos.*mapping repositories to local paths
Installation
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Configure
cp config.yaml.example config.yaml
vim config.yaml
# Run
python runner.py -c config.yaml
Systemd Service
sudo cp cleargrow-agent-runner.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable cleargrow-agent-runner
sudo systemctl start cleargrow-agent-runner
Workflow
- Ready: Issue waiting for remediation
- In Progress: Developer agent working on fix
- Build: Woodpecker CI building feature branch
- Verify: QA agent reviewing changes → merges to main on success
- Document: Librarian agent updating docs
- Review: Human review (manual)
- Done: Complete
Branch Convention
Feature branches follow the pattern: issue/{ISSUE_ID}
Example: Issue CG-47 → branch issue/CG-47
API Integrations
- YouTrack: Issue tracking and state management
- Gitea: Repository hosting and git operations
- Woodpecker CI: Automated builds on push
License
Proprietary - ClearGrow
Description
Languages
Python
68.3%
Svelte
20.6%
TypeScript
4.6%
HTML
3.3%
Shell
1.9%
Other
1.3%