Skip to Content
Solution PlaysPlay 51: Play 51 β€” Autonomous Coding Agent

Play 51 β€” Autonomous Coding Agent

Autonomous issue-to-PR pipeline β€” analyzes GitHub issues, indexes codebase, creates implementation plans, generates multi-file code changes, auto-generates tests, self-heals failing CI, and creates PRs with full descriptions. Human-in-the-loop approval gates with optional auto-merge for small bug fixes.

Architecture

ComponentTechnologyPurpose
Code GenerationAzure OpenAI (GPT-4o)Implementation, test generation, self-healing
Codebase IndexCustom (imports/exports/structure)Understand repo before coding
GitHub IntegrationGitHub API + webhooksIssue reading, branch/PR creation
Agent RuntimeAzure Container AppsPipeline orchestration
CI IntegrationGitHub ActionsTest execution, lint verification
SecretsAzure Key VaultGitHub PAT, OpenAI key

πŸ“ Full architecture details

AspectPlay 24 (Code Review)Play 51 (Autonomous Coding)Play 37 (AI DevOps)
DirectionReviews existing codeGenerates new code from issuesIncident response
InputPull request diffGitHub issue descriptionAlert/incident
OutputReview commentsComplete PR (code + tests + description)Runbook execution
TriggerPR createdIssue labeled auto-fixAlert fired
ScopeRead-only analysisWrite: creates branches, commits, PRsRemediation commands
TestingReviews test qualityGenerates tests for changed codeVerifies resolution

DevKit Structure

51-autonomous-coding-agent/ β”œβ”€β”€ agent.md # Root orchestrator with handoffs β”œβ”€β”€ .github/ β”‚ β”œβ”€β”€ copilot-instructions.md # Domain knowledge (<150 lines) β”‚ β”œβ”€β”€ agents/ β”‚ β”‚ β”œβ”€β”€ builder.agent.md # Issueβ†’planβ†’codeβ†’testβ†’PR pipeline β”‚ β”‚ β”œβ”€β”€ reviewer.agent.md # Code quality, test coverage, scope β”‚ β”‚ └── tuner.agent.md # Plan accuracy, iterations, cost β”‚ β”œβ”€β”€ prompts/ β”‚ β”‚ β”œβ”€β”€ deploy.prompt.md # Deploy agent + GitHub webhook β”‚ β”‚ β”œβ”€β”€ test.prompt.md # Resolve sample issue end-to-end β”‚ β”‚ β”œβ”€β”€ review.prompt.md # Audit code quality + scope β”‚ β”‚ └── evaluate.prompt.md # Measure resolution rate + cost β”‚ β”œβ”€β”€ skills/ β”‚ β”‚ β”œβ”€β”€ deploy-autonomous-coding-agent/ # Pipeline + codebase index + webhook β”‚ β”‚ β”œβ”€β”€ evaluate-autonomous-coding-agent/ # Resolution, quality, tests, PRs, cost β”‚ β”‚ └── tune-autonomous-coding-agent/ # Model per task, scope, auto-merge β”‚ └── instructions/ β”‚ └── autonomous-coding-agent-patterns.instructions.md β”œβ”€β”€ config/ # TuneKit β”‚ β”œβ”€β”€ openai.json # Model per task (code=gpt-4o, tests=mini) β”‚ β”œβ”€β”€ guardrails.json # Max files, scope, quality gates β”‚ └── agents.json # Auto-merge, indexing, branch naming β”œβ”€β”€ infra/ # Bicep IaC β”‚ β”œβ”€β”€ main.bicep β”‚ └── parameters.json └── spec/ # SpecKit └── fai-manifest.json

Quick Start

# 1. Deploy agent + configure GitHub webhook /deploy # 2. Resolve a sample issue end-to-end /test # 3. Audit code quality and scope /review # 4. Measure resolution rate and cost /evaluate

Key Metrics

MetricTargetDescription
Resolution Rate> 70%Issues fully resolved to merged PR
Code Compiles> 95%Generated code passes linter
Test Generated> 90%Tests created for changed code
PR Acceptance> 60%PRs approved by human reviewer
Avg Iterations< 2.5Self-healing cycles
Cost per PR< $1.00API + compute cost

Estimated Cost

ServiceDev/moProd/moEnterprise/mo
Azure OpenAI$80$700$2,500
GitHub Actions$0$80$300
Azure Container Apps$10$100$400
Azure Blob Storage$5$30$100
Cosmos DB$5$75$350
Key Vault$1$5$15
Application Insights$0$30$100
Total$101$1,020$3,765

Estimates based on Azure retail pricing. Actual costs vary by region, usage, and enterprise agreements.

πŸ’° Full cost breakdown

WAF Alignment

PillarImplementation
ReliabilitySelf-healing CI (3 attempts), existing test preservation, scope guards
SecurityGitHub PAT in Key Vault, no credential in code, scope-limited PRs
Cost Optimizationgpt-4o-mini for tests+PR descriptions, cached codebase index
Operational ExcellenceWebhook automation, PR labels, auto-assignment to reviewer
Performance EfficiencyOne file at a time with verification, parallel test execution
Responsible AIMax 10 files/PR scope guard, human approval before merge

FAI Manifest

FieldValue
Play51-autonomous-coding-agent
Version1.0.0
KnowledgeO2-Agent-Coding, F4-GitHub-Agentic-OS, T3-Production-Patterns, O3-MCP-Tools-Functions
WAF Pillarssecurity, reliability, operational-excellence, cost-optimization
Groundednessβ‰₯ 85%
Safety0 violations max
Last updated on