How we orchestrated AI coding agents across 3 repositories to deliver a full-stack healthcare SaaS feature for COEUS — from requirements to working demo.
Agentic programming is a development methodology where a developer drives an AI coding agent as a collaborative partner — not just an autocomplete tool. Instead of writing code line-by-line, the developer operates at a higher level of abstraction.
Requirements, constraints, design decisions, and domain context.
Architecture, database design, feature interactions, and implementation strategy.
Generates code, creates files, runs commands, self-reviews.
Every task's output is spot-checked, every design decision is human-approved.
| Component | What We Used |
|---|---|
| AI Agent | GitHub Copilot (Enterprise license) |
| Primary Model | Claude Opus 4.6 |
| Secondary Models | Gemini, Codex — used for second-opinion code reviews |
| IDE | VS Code |
| Agent Harnesses | copilot-instructions.md (~450 lines), 5 specialized Skills |
| Repositories | 3 — Backend (FastAPI), Frontend (React), AI Microservice |
The developer's role shifts — from writing every line of code to operating at a higher level of abstraction.
Phased approach, module boundaries, authorization design. Collaborated with agent on system architecture and database design.
Took raw client requirements, enriched with pharma/P&T domain knowledge, identified gaps.
Spot-checked every task's output, directed agent self-reviews and multi-model reviews, caught edge cases the agent missed.
Coordinated work across 3 repos — decided what backend agent generates for frontend and AI service agents.
After every task, captured learnings into copilot instructions and skills — building institutional knowledge that compounds.
The agent proposes, the human disposes. Every ambiguity, every trade-off was a human call.
Business problem: Pharma manufacturers share mountains of clinical and economic documents with health-plan payers, then wait — often months — with zero visibility into where things stand.
What we built: A two-sided intelligent workspace giving manufacturers a command center and payers a structured workflow for P&T committee decisions — with AI-powered gap detection and document analysis.
| Area | Description | User |
|---|---|---|
| Command Center Dashboard | Aggregate metrics: tier distribution, milestone progress, stalled accounts | Manufacturer |
| Account Plans | Per-payer plan with objectives, hypotheses, risks, stakeholders, notes, milestones | Manufacturer |
| Payer Universe Management | Segment/tier classification, covered lives, lines of business | Manufacturer |
| Pre-Launch Document Tracker | Track documents through 4 stages: Authoring → Internal Review → Legal/Compliance → Approved | Manufacturer |
| Payer Dashboard | Readiness gauge, workflow progress, needs completion, request & gap summaries | Payer |
| P&T Needs Assessment | Structured needs checklist across 6 clinical/economic categories (33 questions) | Payer |
| P&T Workflow Tracker | 8-stage linear workflow from Intake to Policy Publication (39 checklist items) | Payer |
| Payer Requests | Structured information requests from payer to manufacturer (4 types) | Both |
| AI Gap Detection | Analyze shared documents against payer needs; detect 5 types of evidence gaps | Payer (AI) |
| AI Top 10 Answers | Generate ranked answers to payer's top questions from shared documents | Payer (AI) |
| AI Executive Summary | Generate P&T-ready executive summary from shared evidence | Payer (AI) |
Fed requirements to the agent, directed it to expand with pharma/P&T domain knowledge, identified ambiguities and gaps, took curated gap list to client for clarification, iterated to finalize. The developer drove the analysis while the agent brought domain expertise.
Generated interactive HTML mockups — self-contained, no build step needed. Reviewed each screen, provided feedback on layout. Client was so impressed they showcased the mockups internally before giving the final go-ahead.
Collaborated on architecture — module boundaries, table relationships, authorization strategy. Agent fleshed out API specs, database designs, validation rules, error codes. Every design decision was a developer call.
Broke down into discrete tasks, directed agent one at a time. After each task: agent self-review, developer spot-check, capture learnings. This feedback loop meant every subsequent task benefited from prior lessons.
AI agents coordinated across 3 codebases. Backend agent generated ready-to-execute tasks for frontend and AI service agents, ensuring API contract consistency. Developer orchestration was the key multiplier.
Ran end-to-end on dev environment. For UI issues: screenshots to frontend agent. For API issues: diagnosed from logs, directed agent to fix. Most time was spent on UI styling consistency, not functional bugs.
| Item | Cost |
|---|---|
| Monthly Enterprise subscription | $39 |
| 600 additional requests × $0.04 | $24 |
| Total | $63 |
~1,600 requests total. Of the 1,000 included requests: ~500 went to backend + AI service, ~1,100 to frontend + bug fixes (frontend consumed more due to styling iterations, causing the 600 overage).
Gap Detection, Top 10 Answers, Executive Summary
.github/skills/ (API, review, migrations, mockups, modules)
Developer spot-checks + agent self-review after every task meant the vast majority of features worked on the first end-to-end test. Only ~1-2% functional bugs; ~6-7% UI styling inconsistency.
Backend, frontend, and AI service delivered by orchestrating AI agents across repositories.
Developer-controlled phase gates (doc → mockups → design → code) ensured high quality at every touchpoint.
Curated learnings into instructions and skills after every task, making each subsequent task faster and more accurate.
Built as an MVP prototype for demo purposes. Deliberately deferred for production readiness:
How do you ensure quality and security when AI writes the code?
The developer reviews agent output after every task — checking logic, authorization, and pattern adherence. Not a formal peer code review, but enough to prevent error accumulation in an MVP context.
After implementation, the agent is explicitly asked to review its own code — catching missing error handling, incorrect authorization, or pattern violations.
Write with Claude Opus, review with Gemini or Codex. Different models catch different classes of issues — serving as an automated "second opinion" in lieu of formal peer review for this MVP.
Automated linting (autoflake, black, isort), security scanning (pip-audit), and pre-existing tests (pytest) gate every commit.
Standard GitLab CI/CD with automated tests, security scans, and staged deployments. AI-generated code goes through the same pipeline as hand-written code.
| Concern | Mitigation |
|---|---|
| Does proprietary code go to the AI? | GitHub Copilot Enterprise doesn't retain or train on your code. Enterprise license includes data privacy guarantees. |
| Could the AI introduce vulnerabilities? | Agent self-review + multi-model review + automated scanning (pip-audit, linting) + CI pipeline. Formal peer code reviews are a planned addition for production hardening. |
| Could the AI hallucinate APIs? | Agent operates inside the codebase — hallucinated imports cause immediate linting failures. |
| Regulatory compliance (healthcare)? | AI-generated code follows the same SDLC. The agent is a tool, not an autonomous deployer. |
Does NOT push code — all commits are human-initiated
Does NOT deploy — CI/CD handles deployment after human merge
Does NOT access production data — operates on local codebase only
Does NOT make architectural decisions unilaterally — all trade-offs are human calls
The quality of the agent's output is directly
proportional to the quality of your instructions. Backend had ~450 lines of copilot instructions
+ 5 skills — and it showed. Frontend didn't — and that showed too. Invest in
copilot-instructions.md and Skills. After every task, update instructions.
Requirements → Business Doc → Mockups → Technical Design → Implementation → Cross-repo tasks → Integration. Each phase produces an artifact that feeds the next. No phase is skipped.
Never let the agent batch multiple tasks without a developer spot-check. The “implement one task → spot-check → capture learnings → next task” cycle prevents error accumulation. For production, add formal peer reviews on top of this.
Write with Claude Opus, review with Gemini or Codex. Different models catch different things. A lightweight substitute for peer review in MVP — formal peer reviews remain essential for production.
Cross-repo orchestration effectively multiplied output by directing the backend agent to generate task files for frontend and AI service agents — ensuring perfect API contract alignment.
For frontend issues, passing a screenshot was dramatically more effective than describing the problem. The agent could see exactly what was wrong.
By extracting repeating patterns into Skills (api-patterns, code-review, migrations), we kept copilot-instructions.md focused. Skills load on-demand — preserving the context window for the actual task.
With agentic harnesses now in place across all 3 repositories — copilot instructions finely tuned, 5 Skills for repeatable workflows, and proven cross-repo patterns — future features follow the same playbook but faster. The initial investment in building the harness pays dividends on every subsequent feature. The agent gets smarter, but only because the developer made it smarter.
Two capabilities that would have improved this project and will be adopted for future work:
Automate browser-based integration testing directly from chat. Instead of manually screenshotting and describing UI issues, the agent can navigate to pages, interact with elements, and capture screenshots autonomously.
How it helps:
localhost:8000/v1/docs visually.vscode/mcp.json.agent.md)Define specialized AI personas with restricted
tools and pinned models. Each agent lives in .github/agents/ and is shared with the
team via git — solving the "knowledge stays in one developer's head" problem.
Agents built so far:
Killer feature — Handoffs:
Chain agents in a workflow: Planner → Implementer → Reviewer. Each step uses different tools and models. Formalizes the “write with Claude, review with Gemini” pattern we already practice.
42 endpoints across 3 sub-modules — click to expand each module.