DEV Community

Nirjhar Sarkar
Nirjhar Sarkar

Posted on

I Built a Go Control Plane That Stops AI Agents From Drowning in Context

Every AI coding agent has the same bad habit: dump the whole repo into the prompt and hope.

The result? Slow runs, burned tokens, and confident edits to the wrong files.

I got tired of it, so I built AI Workflow V3: a single Go binary that decides how much context an agent actually needs, before it writes a line of code.

The one rule: escalate capability, not context volume.

๐Ÿง  How it works

Give it a task, and it runs a deterministic pipeline:

Task
 โ†’ lane + risk classification   (Answer / Small / Full)
 โ†’ hard context budget
 โ†’ repo-aware retrieval         (index, BM25, structural, semantic)
 โ†’ evidence check               (sufficient / requires_exploration / abstain)
 โ†’ bounded context โ†’ agent
 โ†’ verification โ†’ compact handoff
 โ†’ verified memory only
Enter fullscreen mode Exit fullscreen mode

Your agent gets a tight brief instead of a haystack:

ai-workflow setup
ai-workflow brief "refactor payment retry" --format prompt
# agent works...
ai-workflow verify --check "go test ./..." --strict
ai-workflow memory add --type verified-fix --keywords "payment retry" \
  --summary "retry uses jittered backoff" --file svc/retry.go
Enter fullscreen mode Exit fullscreen mode

โšก What makes it different

๐Ÿ“ฆ One native binary No Python env. Windows, Linux, macOS, WSL.
๐Ÿ”Œ Built-in MCP server Plug into Claude Code, Cursor, Codex, Windsurf.
๐Ÿ—‚๏ธ Multi-repo discovery Finds nested Git roots and routes retrieval across them.
๐Ÿšฆ "Should I even edit yet?" Evidence states stop agents from guessing when context is thin.
๐Ÿ”’ Hardened by design No shell execution, bounded output, timeouts, constrained env.
๐Ÿงพ Replayable runs Hash-chained run journals show why every decision was made.
โœ… Memory you can trust Only verified fixes are saved. No junk in, no junk out.
๐Ÿ›ก๏ธ Supply-chain safe SHA-256 verified installs + GitHub build-provenance attestations.

๐Ÿ”Œ Connect your agent in one line

claude mcp add ai-workflow -- ai-workflow --root /path/to/project mcp
Enter fullscreen mode Exit fullscreen mode

Your agent then calls brief, context, route, search, memory_search, verify, and more natively, with no shelling out.

๐Ÿ” Why a V3?

V2 was Python and proved the idea. V3 is a clean Go rewrite, and it doesn't get to call itself compatible just because features were reimplemented. Every V2 behavior counts as migrated only after a differential fixture proves the same input gives an equivalent result.

๐Ÿš€ Try it in 10 seconds

curl -fsSL https://raw.githubusercontent.com/Taki7980/Ai-workflow-V3/main/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

Windows:

irm https://raw.githubusercontent.com/Taki7980/Ai-workflow-V3/main/install.ps1 | iex
Enter fullscreen mode Exit fullscreen mode

โญ Repo: https://github.com/Taki7980/Ai-workflow-V3

MIT licensed. Stars, issues, and brutal feedback welcome.

How do you keep your agents' context under control? Drop your approach below ๐Ÿ‘‡

Top comments (0)