Automated feature implementation using coordinated AI agents
This is an automated feature development workflow that uses multiple specialized AI agents to plan, implement, review, test, and commit code changes. Simply describe what you want built, and the system handles the entire development lifecycle.
In your GitHub Copilot conversation, invoke the Feature Builder agent:
@Feature Builder: Add user email validation that checks format and blocks disposable email providers
The system will automatically:
- β Create an implementation plan
- β Validate against existing code patterns
- β Write the implementation with tests
- β Review code for quality and security
- β Run tests with coverage checks
- β Commit with proper formatting
When complete, you'll have:
- Working, tested code
- Git commit with conventional message
- Detailed artifacts documenting the process
graph TD
You[You: Describe Feature] --> FB[Feature Builder]
FB --> P[Planner: Break Into Tasks]
P --> PA[Plan Architect: Validate Against Codebase]
PA -->|Needs Changes| P
PA -->|Approved| I[Implementer: Write Code + Tests]
I --> R[Thorough Reviewer: Check Quality]
R -->|Issues Found| I
R -->|Approved| T[Tester: Run Pytest]
T -->|Failures| I
T -->|Passed| GC[Git Committer: Pre-commit Hooks + Commit]
GC --> Done[β
Feature Complete]
| Agent | Role | What It Does |
|---|---|---|
| Feature Builder | Orchestrator | Coordinates all agents, manages workflow |
| Planner | Task Designer | Breaks feature into actionable tasks |
| Plan Architect | Code Reuse Expert | Finds existing patterns to reuse |
| Implementer | Developer | Writes code and unit tests |
| Thorough Reviewer | Quality Checker | Reviews for correctness, security, quality |
| Tester | QA Engineer | Runs pytest, checks 100% coverage |
| Git Committer | Release Manager | Runs pre-commit hooks, makes commit |
The workflow includes a mandatory approval checkpoint after planning. Here's what to expect:
- You submit request β Feature Builder starts planning
- Planning completes β You receive plan for review
- You approve/revise β Implementation begins
- System completes β You receive working code
Good:
@Feature Builder: Create a password strength validator that:
- Requires minimum 8 characters
- Checks for uppercase, lowercase, numbers, special chars
- Returns detailed feedback on what's missing
- Includes tests for edge cases
Too Vague:
@Feature Builder: Add some password checking
Good:
@Feature Builder: Add pagination to the user list endpoint.
Should work with our existing Flask app and return pages
of 20 users. Include page number and total pages in response.
Missing Context:
@Feature Builder: Add pagination
Good:
@Feature Builder: Add CSV export for reports. Must use the
existing ReportGenerator class and work with Python 3.11+.
Export should include headers and handle Unicode properly.
Missing Constraints:
@Feature Builder: Add CSV export
What happens:
- Planner breaks your request into tasks
- Plan Architect searches codebase for reusable patterns
- If architect finds issues, plan is revised
- Maximum 3 iterations, then escalates if stuck
- β PAUSE: Waiting for your approval
You'll see:
β
Phase 1: Planning - approved (2/3 iterations)
π Plan ready for review:
- Plan: .github/artifacts/plans/your-feature.md
- Architecture review: .github/artifacts/reviews/plan-your-feature-review.md
π Please review and respond:
- "approve" or "proceed" β Continue to implementation
- "revise: [your feedback]" β Update plan with your changes
- "cancel" β Stop workflow
Your action required:
- Read the plan artifact to understand what will be implemented
- Read the architecture review to see reuse opportunities
- Respond with one of:
- "approve" or "proceed" - Start implementation
- "revise: [feedback]" - Request plan changes (e.g., "revise: use FastAPI instead of Flask")
- "cancel" - Stop the workflow
Output artifacts:
.github/artifacts/plans/your-feature.md.github/artifacts/reviews/plan-your-feature-review.md
What happens:
- Implementer writes code following the plan
- Creates unit tests for every function (100%+ coverage required)
- Thorough Reviewer checks code quality in parallel:
- Correctness (logic, edge cases)
- Quality (readability, naming)
- Security (validation, injection risks)
- Architecture (pattern consistency)
- If issues found, implementer fixes them
- Maximum 3 iterations, then escalates if stuck
You'll see:
β
Phase 2: Implementation - approved (1/3 iterations)
Output artifact:
.github/artifacts/reviews/code-your-feature-review.md- Source files created/modified
- Test files created
What happens:
- Tester runs
pytest -v --cov - Verifies 100% minimum coverage
- Checks all tests pass
- If failures, implementer fixes issues
- Maximum 3 iterations, then escalates if stuck
You'll see:
β
Phase 3: Testing - passed (1/3 iterations)
Output artifact:
.github/artifacts/test-reports/your-feature-test-report.md
What happens:
- Git Committer runs pre-commit hooks:
- Black (formatting)
- isort (imports)
- Ruff (linting)
- Mypy (type checking)
- Pytest (tests)
- And more (see Pre-commit Hooks)
- If hooks fail, implementer fixes issues
- Creates conventional commit
- Maximum 3 retries, then escalates if stuck
You'll see:
β
Phase 4: Commit - complete
Commit: feat(auth): add email validation with disposable provider blocking
If any phase reaches maximum iterations (3), you'll receive an escalation message:
β οΈ Feature implementation blocked - manual intervention needed
Feature: email-validation
Blocked at: Testing - Pytest failures
Iterations: 3/3
Summary of attempts:
1. Iteration 1: Fixed email regex pattern
2. Iteration 2: Added edge case for internationalized domains
3. Iteration 3: Still failing on Unicode edge case
Current blocker:
Test test_unicode_email_domains is failing with UnicodeDecodeError
when processing emails with emoji in local part.
Suggested manual action:
1. Review test case in tests/test_validation.py:45
2. Decide if emoji emails should be supported
3. Either fix implementation or update test expectations
Relevant artifacts:
- Plan: .github/artifacts/plans/email-validation.md
- Test report: .github/artifacts/test-reports/email-validation-test-report.md
- Code review: .github/artifacts/reviews/code-email-validation-review.mdWhat to do:
- Review the artifacts mentioned
- Understand the blocker
- Make a decision (fix code, update plan, or change requirements)
- Either fix manually or provide clearer guidance to Feature Builder
All process artifacts are stored in .github/artifacts/:
.github/artifacts/
βββ plans/ # Implementation plans
β βββ feature-name-draft.md # Initial plan
β βββ feature-name.md # Approved plan
βββ reviews/ # Quality reviews
β βββ plan-feature-name-review.md # Architecture review
β βββ code-feature-name-review.md # Code review
βββ test-reports/ # Test results
βββ feature-name-test-report.md
These artifacts give you:
- π Traceability: See why decisions were made
- π Debugging: Understand what went wrong
- π Learning: Review best practices applied
- β Verification: Confirm quality checks passed
Your request:
@Feature Builder: Create a Calculator class with add, subtract, multiply, divide methods
Feature Builder response:
Starting feature implementation: calculator
β
Phase 1: Planning - approved (1/3 iterations)
- Planner created 6 tasks
- Plan Architect: No existing patterns found, new implementation approved
π Plan ready for review:
- Plan: .github/artifacts/plans/calculator.md
- Architecture review: .github/artifacts/reviews/plan-calculator-review.md
π Please review and respond:
- "approve" or "proceed" β Continue to implementation
- "revise: [your feedback]" β Update plan with your changes
- "cancel" β Stop workflow
You review the plan (opens calculator.md) and see it's good:
approve
Feature Builder continues:
β
User approved plan - proceeding to implementation
π Phase 2: Implementation - iteration 1/3
- Implementer writing code following TDD approach
- Creating tests/test_calculator.py first
- Implementing app/calculator.py
β
Phase 2: Implementation - approved (1/3 iterations)
- Thorough Reviewer: All checks passed
β
Phase 3: Testing - passed (1/3 iterations)
- All 20 tests passed
- Coverage: 100%
β
Phase 4: Commit - complete
- Pre-commit hooks: All passed
- Commit: feat: add Calculator class with basic arithmetic operations
Feature complete!
Your request:
@Feature Builder: Add user authentication to the API
Feature Builder:
β
Phase 1: Planning - approved (1/3 iterations)
π Plan ready for review:
- Plan: .github/artifacts/plans/user-authentication.md
...
You review and want changes:
revise: Use JWT tokens instead of sessions, and add password reset functionality
Feature Builder:
Sending revision request to Planner...
β
Phase 1: Planning - approved (2/3 iterations)
- Updated to use JWT authentication
- Added password reset flow with email tokens
π Updated plan ready for review:
- Plan: .github/artifacts/plans/user-authentication.md
...
You review again and approve:
proceed
Request:
@Feature Builder: Create a function to slugify strings (convert
"Hello World!" to "hello-world"). Should handle Unicode, remove
special characters, and convert spaces to hyphens.
Result:
- File:
app/utils/text.pywithslugify()function - Tests:
tests/test_text.pywith 15+ test cases - Coverage: 98%
- Time: ~5 minutes
Request:
@Feature Builder: Add a REST API endpoint GET /api/users/{id}/profile
that returns user profile data. Should use existing User model, return
JSON, handle 404 for missing users, and require authentication.
Result:
- File:
src/api/users.pywith endpoint - Tests:
tests/test_user_api.pywith auth, 404, success cases - Uses existing: Authentication middleware, User model
- Coverage: 94%
- Time: ~10 minutes
Request:
@Feature Builder: Implement password reset via email. User submits
email, receives reset token, uses token to set new password. Tokens
expire after 1 hour. Use existing EmailService and User model.
Result:
- Files:
src/auth/password_reset.py,src/auth/tokens.py - Tests: Token generation, expiry, email sending, edge cases
- Database: New token storage table
- Integration: With existing EmailService
- Coverage: 96%
- Time: ~20 minutes
All code follows these guidelines:
- Style: PEP 8, Black formatting (88 char lines)
- Functions: Max 50 lines, ideally 5-20
- Files: Max 500-1000 lines
- Naming:
snake_casefor functions,PascalCasefor classes
- Coverage: Minimum 100%
- Framework: Pytest
- Methodology: Test-Driven Development (TDD) - write tests first, then implement
- Tests: One test file per module (
test_*.py) - Naming:
test_{function}_{scenario} - Cycle: π΄ Red (failing test) β π’ Green (minimal code) β π΅ Refactor (improve)
See Pytest README
- Black, isort, Prettier (formatting)
- Ruff, Mypy (linting, type checking)
- Pytest (tests + coverage)
- Security checks (no secrets, no large files)
See Pre-commit Hooks
Edit .github/guidelines/CODING_GUIDELINES.md and agents will follow the new standards.
Edit .github/templates/.pre-commit-config.yaml to add/remove hooks.
Edit pyproject.toml:
[tool.pytest.ini_options]
addopts = "--cov --cov-fail-under=90" # Change 90 to desired %See agents/README.md for how to create new agents.
- WORKFLOW.md - Detailed agent communication protocol
- agents/README.md - Complete agent registry
- guidelines/CODING_GUIDELINES.md - Code standards
- guidelines/PRECOMMITHOOKS.md - Pre-commit guide
- guidelines/PYTEST_README.md - Testing guide
- templates/ - Configuration templates
Check that:
- You're using
@Feature Builder(case-sensitive) - The agent file exists at
.github/agents/feature_builder.agent.md - Your Copilot has access to workspace agents
Check:
- Git is properly initialized
- You have commit permissions
- No external git hooks interfering
Check:
- All dependencies installed
- Environment variables set
- Database/fixtures properly configured
Run locally:
pytest --cov --cov-report=html
open htmlcov/index.htmlFind uncovered lines and add tests.
This shouldn't happen (max 3 iterations per phase). If it does:
- Check the iteration counter in status messages
- Report as a bug in the agent system
- Manually complete the feature
- Be specific and detailed in feature requests
- Review the plan carefully before approving - it's easier to change now than later
- Mention existing code patterns to reuse
- State constraints and requirements upfront
- Use "revise:" to request specific changes to the plan
- Review artifacts when escalated
- Check test coverage reports
- Read code reviews for learning
- Give vague requirements
- Approve plans without reviewing them - take time to understand what will be built
- Interrupt agents mid-phase (except at approval checkpoints)
- Bypass pre-commit hooks
- Ignore escalation messages
- Skip reviewing generated code
- Assume context without stating it
When Feature Builder pauses for your approval after planning:
| Command | Action | Usage |
|---|---|---|
approve |
Proceed to implementation with current plan | Use when plan looks good |
proceed |
Same as approve | Alternative command |
revise: [feedback] |
Send changes to Planner, stay in planning phase | revise: add error logging to all functions |
cancel |
Stop the workflow completely | Use if you want to abort |
Examples:
approve
revise: Use PostgreSQL instead of SQLite
revise: Add caching layer and reduce database queries
cancel
Before requesting your first feature:
- Pre-commit hooks installed (
pre-commit install) - Pytest configured in
pyproject.toml - Python environment activated
- Dependencies installed (
pip install -r requirements.txt) - Git repository initialized
- Read Coding Guidelines
To improve the agent system:
- Report issues: If agents make bad decisions, document them
- Suggest improvements: Better prompts, new agents, workflow changes
- Update guidelines: Keep coding standards current
- Share learnings: Document edge cases and solutions
- Questions: Ask in Copilot chat
- Agent issues: Check WORKFLOW.md for expected behavior
- Code standards: See guidelines/
- Escalations: Review artifacts in
.github/artifacts/
The system is ready to use. Simply describe your feature and invoke:
@Feature Builder: [Your feature description here]
Happy coding! π