Repository navigation
feat(pipeline): Golden Chain for Cloud Dev — tri pipeline for agent swarm #140
Copy link
Copy link
Closed
Labels
Description
Context
Cloud Dev agent swarm works: issue → container → Claude Code → PR. But the pipeline needs hardening. Currently manual spawn via Railway API, no feedback loop, agents can't verify their own code.
Golden Chain: tri pipeline for creating agents
Phase 1: tri cloud pipeline (автоматизация)
tri cloud pipeline <issue-number>
1. Read issue from GitHub
2. Spawn container on Railway
3. Monitor status via heartbeats
4. If agent STUCK >10min → kill + respawn
5. If agent DONE → verify PR (zig build locally)
6. If PR passes → auto-merge
7. Cleanup container
Phase 2: Self-healing loop
- Agent fails → auto-create fix-issue with review findings
- Fix-issue auto-spawns fix-agent
- Fix-agent pushes to same branch → PR auto-updates
- Max 3 retry loops per original issue
Phase 3: Improvements needed
Entrypoint fixes
- Advisory self-review (zig build removed — too heavy for Railway)
- Informative Telegram messages (issue title + detail)
- Fix heartbeat subshell bug (doesn't see parent vars)
- Add
set -o pipefailfor proper exit code capture - Telegram streaming of Claude Code output (PR feat(cloud): Stream all container logs to Telegram in realtime #133)
- HTML escape for Telegram messages
- Proper exit after "staying alive" phase (don't restart)
Orchestrator fixes
-
tri cloud spawnshould work from CLI (not just Railway API) -
tri cloud status— real-time dashboard in terminal -
tri cloud pipeline— full Golden Chain automation - Service reuse (hit 25 service/day limit — need to recycle)
- Container resource limits (memory, CPU, disk)
CI/CD fixes
-
zig buildin container: needs-Dci=trueflag or lighter build - Pre-cache zig-cache in Docker image for faster builds
- Agent should
git checkoutexisting branch (not create new) for fix-issues
Monitoring
- JSONL event persistence (PR feat(cloud): JSONL event persistence + deduplication + JSON history format (#124) #129)
- ACI protocol (PR feat(cloud): structured ACI protocol (#126) #132)
- Dashboard UI (web page with live container status)
- Cost tracking per agent (Railway API billing)
- Agent solve rate metrics (success/fail/retry counts)
Agent intelligence
- Agent reads CLAUDE.md and follows project conventions
- Agent can run
zig build -Dci=truefor lighter build check - Agent self-reviews diff before pushing
- Agent creates meaningful commit messages (not generic)
- Multi-file awareness (reads related files before editing)
Architecture
tri cloud pipeline <N>
└─ tri cloud spawn <N> # Railway API
└─ agent-entrypoint.sh # Container boot
└─ claude -p "..." # Claude Code via z.ai
└─ git push + gh pr # Result
└─ tri cloud monitor <N> # Watch heartbeats
└─ tri cloud verify <N> # Check PR locally
└─ tri cloud merge <N> # Auto-merge if clean
└─ tri cloud cleanup <N> # Destroy container
Exit criteria
tri cloud pipeline 999spawns agent, monitors, verifies, merges, cleans up- Zero human intervention for simple issues
- Max 3 auto-retries before escalating to human
Reactions are currently unavailable
Activity
gHashTag commentedon Mar 11, 2026
📖 Trinity Agent | 2026-03-11T15:30:24Z
📋 Step: 3/8 — Reading issue #140
🔄 Status: READING
⏱️ Elapsed: 9s
gHashTag commentedon Mar 11, 2026
❌ Trinity Agent Dashboard — Issue #140
gHashTag commentedon Mar 11, 2026
⚡ Trinity Agent | 2026-03-11T15:30:28Z
📋 Step: 4/8 — Claude Code running (timeout: 3600s)
🔄 Status: CODING
⏱️ Elapsed: 13s
feat(pipeline): implement Golden Chain for Cloud Dev — tri cloud pipe…
gHashTag commentedon Mar 11, 2026
🔄 Trinity Agent | 2026-03-11T15:37:52Z
📋 Step: 5/8 — Self-review (advisory)
🔄 Status: REVIEWING
⏱️ Elapsed: 457s
gHashTag commentedon Mar 11, 2026
🧪 Trinity Agent | 2026-03-11T15:37:55Z
📋 Step: 6/8 — Checking/creating PR
🔄 Status: TESTING
⏱️ Elapsed: 460s
gHashTag commentedon Mar 11, 2026
❌ Trinity Agent | 2026-03-11T15:37:58Z
📋 Step: 7/8 — Exit code: 0, Commits: 0
🔄 Status: FAILED
⏱️ Elapsed: 463s
Merge pull request #141 from gHashTag/feat/issue-140
feat(pipeline): implement Golden Chain for Cloud Dev — tri cloud pipe…
feat(golden-chain): Level 11.30 Planning SOTA — bAbI 70/70, CLUTRR Ki…
feat(pipeline): implement Golden Chain for Cloud Dev — tri cloud pipe…
Merge pull request #141 from gHashTag/feat/issue-140