Context Foundry
A self-hosted build loop that runs AI agents against your codebase and improves them over time.
Rust CLI · MIT License · GitHub
What it does
Context Foundry takes a task queue (TASKS.md) and processes each task through a four-stage pipeline:
After each task, the system extracts patterns -- recurring issues and their solutions -- and injects them into future plans. The more tasks it completes, the fewer mistakes the reviewer catches.
Install
cargo install context-foundry
npm install -g context-foundry
# Run from any project directory
cd ~/my-project
foundry
Why it matters
Pattern learning. Most AI coding tools treat every task as if it's the first. Context Foundry accumulates institutional knowledge -- patterns from past builds feed into future plans.
Dual-model arena. Run two different models against the same task. Compare outputs. Pick the winner automatically or manually.
Self-hosted, CLI-native. Rust binary with a TUI. Your code stays on your machine. No cloud service, no API proxy. Swap providers per pipeline role via config.