# Colony

- **Event:** [AIE Code Summit 2026 Hackathon](https://cerebralvalley.ai/e/aie-code-2026-hackathon)
- **When:** Sat, Nov 7 at 9:00 AM – 10:00 PM (PST)
- **Where:** San Francisco, CA
- **Team:** [Lucas Chen](https://cerebralvalley.ai/u/26lucasc), [Ethan Liu](https://cerebralvalley.ai/u/Eliu), [Ethan Li](https://cerebralvalley.ai/u/proteinbar)
- **GitHub:** https://github.com/PandaGrdn/AIE_Hackathon_Project_1
- **Demo video:** https://youtu.be/-uMvEi7hj1U
- **Gallery:** https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/35

Colony: a coding swarm that learns from every fall

Autonomous coding agents stall on long, tightly coupled tasks because one wrong assumption early, like whether “up to N” includes N, cascades through every later step, and a retry records nothing about why, so the mistake recurs. Self-improvement is also easy to claim and hard to verify. Colony completes a long task as ordered subtasks, localizes the exact reasoning step behind each failure, turns it into a versioned change, and keeps the change only if held-out work proves it.

For every subtask an independent author (Gemini) writes hidden pytest modules from the spec and pinned interface alone, before any implementation exists. A swarm of agents from different model families (Gemini, Claude, Meta Muse) implements it independently in git-worktree sandboxes. A run is verified when it passes the hidden tests and the repo’s own regression suite; agents’ own tests never count. The highest-trust verified run is committed.

Agents log each reasoning step as assumption, action and files touched. Steps are embedded, defining a reasoning embedding space shared by paths, lessons and failure regions. Verified runs form a consensus path; a failed run’s divergence is the earliest step that leaves it, corroborated by locality to the failing file and the moment visible tests turned red. SubQ Snap settles it through its decisions API: one state with the spec, the labelled path, consensus assumptions and failing evidence; back come calibrated probabilities over which step is the root cause, bug versus spec ambiguity, and whether a lesson generalizes, at zero output tokens. We route on those numbers.

The reflector writes a lesson from that step. Lessons, trust updates and generated tools are versioned changes, each run on held-out feature slices with and without it and adopted only if held-out accuracy rises or repeat mistakes fall, otherwise rolled back, with both outcomes in the changelog. Lessons also act live: every running agent’s path is tracked in the same space, and when a step enters a known failure region the lesson is injected mid-run. Trust, a smoothed agreement rate with verified outcomes, weights votes and routes work.

Tested on a real feature absent upstream: per-tool rate limits and quotas for the MCP Python SDK, seven coupled subtasks, 2,389 existing tests kept green, with three sibling features as the held-out set. Stack: Python, pydantic, pytest, MongoDB, FastAPI; a no-build UI renders the reasoning space as terrain, agents as beetles, failures as pits and lessons as flags.

## More from AIE Code Summit 2026 Hackathon

- [Labbit](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/32)
- [Dopple](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/33)
- [Bob](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/34)
- [AgentGlass](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/36)
- [rsi_today](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/37)
- [Sisyphus](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/38)

---

Markdown version of https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/35. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
