• 2026
  • AI AGENTS · TOOLS AND AUTOMATION
  • Own project · public r4r-spring-ai-rag repository

Development agents with verifiable boundaries

  • Context engineering
  • Agentic engineering
  • Prompt engineering
  • OpenCode
  • Codex
  • MCP
  • Git worktrees
  • CodeGraph
  • Python

AI coding agents struggle with uncontrolled context growth, conflicting parallel work and changes without evidence; this project addressed those issues in a real repository.

Design of the complete workflow—roles, verifiable instructions, permissions, context budgets and validation—with human supervision of every delivery.

Original infographic: AI agents with local models

Key outcomes

  • Multi-agent workflow implemented and documented in the public RAG repository.
  • Isolated tasks and reproducible validation before incorporating changes.
  • Task and commit traceability on GitHub, with human supervision.
View detailsHide details

Context and challenge

Design and experimentation with AI-assisted development workflows on real repositories: agents with separate responsibilities, persistent instructions, context limits, write scopes, entry/exit tests and task coordination.

Model-assisted programming requires more than prompts: controlling the information supplied, decision-making agents, writable files and the evidence supporting each change. The RAG project explored orchestration and context retrieval techniques for real engineering tasks.

Growing contexts, parallel tasks with file conflicts, unproductive retries and unverifiable results can consume resources without producing reliable changes.

Contributions

  • Repository instructions in AGENTS.md and working memory in DEVELOPMENT.md, separating current rules from historical status.
  • Tasks organised in .opencode/task-plan.json and profiles in .opencode/agents/, with one canonical source for assignments.
  • RING configured as a coordinator without implementation permissions, PC and LP as workers in isolated worktrees, and ESCALATION for exceptional decisions requiring deeper reasoning.
  • Scopes defined through allowed_paths, at most one active task per worker, no Git writes by model sessions, and a deterministic controller responsible for validation and commits.
  • Execution and context limits, stopping rules, controlled retries, evidence collection and targeted retrieval with CodeGraph/Code-Graph-RAG where useful.
  • Selective adoption of existing patterns, adaptation to the project and review of test evidence, without assuming complete autonomy from every model or agent.

Technical decisions and architecture

  • AGENTS.md sets a maximum context delta of 64 KiB; a warning at 80,000 tokens; a stop at 120,000 tokens or 30 steps, plus a session limit.
  • The cycle requires validating the assignment, running the gate before editing, fixing one coherent batch and repeating the gate; the controller, not the agent, manages commits.
  • Keep long-running research prompts separate from small-task instructions; prioritise evidence and scoped reading to avoid context saturation.

Other results

  • Agent architecture and policies implemented as configuration and documentation in a real repository, with historical tasks and evidence recorded.
  • AGENTS.md and DEVELOPMENT.md as reusable operating instructions and project context
  • Canonical plans, tasks with permitted paths, test gates and controlled checkpoints

Full stack

Additional technologies:

  • JSON
  • Git
  • Automated testing