Back to Projects

AI Agent Training System (Ouroboros Method)

Built a persistent knowledge layer enabling AI coding assistants to operate independently on complex codebases

Zero productivity loss during AI tool migration

80% autonomous implementation by week 2

12+ hours saved per epic through mistake prevention

Replicable framework documented for team adoption

Enabled 474+ tests delivered in 20 days on first full project

Prompt Engineering
Knowledge Systems
Markdown
TypeScript
Monorepo Architecture

Overview

When an org policy change forced a switch from one AI coding assistant to another mid-project, I faced losing weeks of accumulated context. Instead of starting over, I pioneered the "Ouroboros" method — having the existing AI generate its own training manual for the new tool. Within days, the new assistant operated independently on a complex banking monorepo (15+ packages, widget engine architecture, 3 languages).

Problem

  • Context Loss: Switching AI tools meant losing weeks of learned patterns, conventions, and codebase knowledge
  • Repetitive Onboarding: Every new session started from zero — re-explaining the monorepo structure, widget patterns, API conventions, git workflow
  • Inconsistent Output: Without persistent rules, the AI made the same mistakes repeatedly (wrong imports, invented mock data, hardcoded locales)
  • No Institutional Memory: Corrections given in one session were forgotten by the next

Solution — The Persistent Knowledge Layer

Built a structured file system that any AI reads on startup:

  • Steering files: Hard rules the AI must follow (coding standards, code review checklist, git workflow, project management process)
  • Context files: Living state (project structure, team info, gotchas from real mistakes, session history, active epic details)
  • Gotchas file: Every mistake the AI makes gets recorded with the fix — the most valuable file in the system
  • Session history: Append-only log enabling the AI to pick up exactly where the last session left off

The Ouroboros Method

  • Had the existing AI (which had weeks of context) generate the initial training files for the new AI
  • The AI wrote its own rules, patterns, and conventions into structured markdown files
  • Reviewed and refined over 3 days of corrections — each correction became a new rule
  • By week 2, the new AI handled 80% of implementation without corrections
  • By week 3, operating in "YOLO mode" — state requirement, AI implements, test, commit

Measurable Impact

  • Zero productivity loss during tool migration (delivered payments epic immediately after switch)
  • 80% autonomous implementation by week 2 — AI handles coding without corrections
  • 12+ hours saved per epic by eliminating repeated mistakes (tracked via retrospective)
  • 5 enforced rules added from real failures, preventing entire categories of bugs
  • Replicable framework documented for team adoption across projects
  • 474+ tests delivered in 20 days — the payments epic was the first project using this system at full capacity

Key Learnings

Corrections beat instructions: Rules written after a real mistake stick better than upfront documentation.

Gotchas beat standards: What NOT to do (from real failures) is more valuable than what TO do.

Session continuity is everything: Without persistent history, every conversation starts from zero. With it, the AI picks up exactly where you left off.

The AI should review its own work: Self-review against a checklist before pushing catches issues before human review.