A comprehensive multi-tool AI coding assistant configuration system that standardizes software development workflows across OpenCode, Claude Code, and GitHub Copilot.
This repository provides unified AI agent configurations and prompt templates designed to:
- Standardize development workflows across multiple AI coding assistants
- Enforce architectural best practices (Hexagonal Architecture, SOLID, TDD)
- Provide specialized agents for each phase of software development
- Integrate external tools via MCP (Model Context Protocol)
- Support multiple technology stacks (FastAPI, NestJS, React, K3s)
| Tool | Configuration Location | Status |
|---|---|---|
| OpenCode AI | ai-driven/opencode/ |
Full support |
| Claude Code | ai-driven/claude/ |
Full support |
| GitHub Copilot | ai-driven/copilot/ |
Full support |
prompt-rules/
├── README.md # This file
├── .gitignore # Git ignore rules
└── ai-driven/ # Main configuration directory
├── agents/ # Shared agent definitions (source of truth)
│ ├── product-owner.md
│ ├── test-writer.md
│ ├── fastapi-hexagonal.md
│ ├── nestjs-hexagonal.md
│ ├── react-hexagonal.md
│ ├── code-reviewer.md
│ ├── code-simplifier.md
│ ├── documentation-writer.md
│ ├── tester-qa.md
│ └── k3s-devops.md
│
├── claude/ # Claude Code configuration
│ ├── CLAUDE.md # Main workflow instructions
│ ├── .claude.json # MCP server configuration
│ └── .claude/
│ └── skills/ # Claude-specific skills
│ ├── frontend-design/
│ └── webapp-testing/
│
├── copilot/ # GitHub Copilot configuration
│ ├── mcp.json # MCP server configuration
│ └── .github/
│ └── copilot-instructions.md # Main workflow instructions
│
├── opencode/ # OpenCode AI configuration
│ └── .opencode/
│ ├── opencode.json # Agent registry & MCP config
│ ├── AGENTS.md # Workflow documentation
│ ├── package.json # Plugin dependencies
│ └── agents/ # Agent prompt files
│
└── mcp/ # MCP server infrastructure
├── docker-compose.yml # Service definitions
├── env.sonar.example # SonarQube env template
└── env.atlassian.example # Atlassian env template
The system includes 10 specialized AI agents, each designed for a specific phase of development:
| Agent | Purpose | Model | Permissions |
|---|---|---|---|
product-owner |
Requirements analysis, acceptance criteria, user stories | Claude Haiku | Read-only |
test-writer |
TDD unit tests with pytest, test doubles (fakes) | Claude Sonnet | Write, Edit |
fastapi-hexagonal |
FastAPI backend with hexagonal architecture | Claude Sonnet | Write, Edit, Bash |
nestjs-hexagonal |
NestJS backend with hexagonal architecture | Claude Sonnet | Write, Edit, Bash |
react-hexagonal |
React frontend with hexagonal architecture | Claude Sonnet | Write, Edit, Bash |
code-reviewer |
Implementation planning and code review | Claude Sonnet | Read-only |
code-simplifier |
Code refactoring for clarity/maintainability | Claude Sonnet | Edit only |
documentation-writer |
README and API documentation generation | Claude Sonnet | Write, Edit |
tester-qa |
Manual and API testing verification | Claude Sonnet | Edit only |
k3s-devops |
K3s/Flux CD infrastructure management (GitOps) | Claude Sonnet | Write, Edit, Bash |
All agents work together in a structured 5-phase development workflow:
┌─────────────────────────────────────────────────────────────────────────────┐
│ AI-DRIVEN DEVELOPMENT WORKFLOW │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ PHASE 1: REQUIREMENTS │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ product-owner (Claude Haiku) │ │
│ │ - Clarify requirements with stakeholders │ │
│ │ - Define acceptance criteria │ │
│ │ - Create user stories │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ PHASE 2: TEST-FIRST DEVELOPMENT │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ test-writer (Claude Sonnet) │ │
│ │ - Write failing unit tests (TDD) │ │
│ │ - Define test doubles (fakes) │ │
│ │ - Establish coverage targets (80%+) │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ PHASE 3: IMPLEMENTATION │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ fastapi-hexagonal / nestjs-hexagonal / react-hexagonal │ │
│ │ - Implement code following hexagonal architecture │ │
│ │ - Ensure all tests pass │ │
│ │ - Follow SOLID principles │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ PHASE 4: QUALITY ASSURANCE │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ code-reviewer → code-simplifier │ │
│ │ - Review for bugs, security issues, architecture compliance │ │
│ │ - Refactor for clarity without changing functionality │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ PHASE 5: DOCUMENTATION & VERIFICATION │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ documentation-writer → tester-qa │ │
│ │ - Update README, API documentation │ │
│ │ - Manual/API testing verification │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │
│ INFRASTRUCTURE (on-demand) │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ k3s-devops (Claude Sonnet) │ │
│ │ - Kubernetes/GitOps infrastructure changes │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
All implementation agents enforce these architectural patterns and principles:
┌─────────────────────────────────────────────────────────────────┐
│ INFRASTRUCTURE LAYER │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ REST API │ │ Database │ │ External Services │ │
│ │ Adapter │ │ Adapter │ │ (Queue, Cache, etc.) │ │
│ └──────┬──────┘ └──────┬──────┘ └────────────┬────────────┘ │
│ │ │ │ │
│ ┌──────┴────────────────┴──────────────────────┴──────┐ │
│ │ APPLICATION LAYER │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────────┐ │ │
│ │ │ Use Cases │ │ Input/ │ │ DTOs │ │ │
│ │ │ │ │ Output │ │ │ │ │
│ │ │ │ │ Ports │ │ │ │ │
│ │ └─────┬──────┘ └────────────┘ └────────────────┘ │ │
│ └────────┼─────────────────────────────────────────────┘ │
│ │ │
│ ┌────────┴─────────────────────────────────────────────┐ │
│ │ DOMAIN LAYER │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────────┐ │ │
│ │ │ Entities │ │ Value │ │ Domain │ │ │
│ │ │ │ │ Objects │ │ Services │ │ │
│ │ └────────────┘ └────────────┘ └────────────────┘ │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
| Principle | Description |
|---|---|
| Single Responsibility | One reason to change per class/module |
| Open/Closed | Open for extension, closed for modification |
| Liskov Substitution | Subtypes must be substitutable for their base types |
| Interface Segregation | Many specific interfaces over one general interface |
| Dependency Inversion | Depend on abstractions, not concretions |
- Write failing tests before implementation
- Use test doubles (fakes) for internal components
- Use mocks only for external services
- Target minimum 80% code coverage
| Component | Technology |
|---|---|
| Runtime | Python 3.11+ |
| Package Manager | UV |
| Validation | Pydantic V2 |
| Testing | pytest, pytest-asyncio |
| Containerization | Docker |
| Component | Technology |
|---|---|
| Runtime | Node.js 20+ |
| Package Manager | pnpm |
| Validation | Zod |
| Testing | Jest |
| DI | Injection tokens |
| Component | Technology |
|---|---|
| Runtime | Bun |
| Build Tool | Vite or Next.js |
| Styling | Tailwind CSS |
| Data Fetching | React Query |
| Linting/Formatting | Biome |
| Component | Technology |
|---|---|
| Kubernetes | K3s |
| GitOps | Flux CD |
| Auth | Logto |
| Secrets | OpenBao |
| Storage | MinIO |
| DNS/CDN | Cloudflare |
The system integrates with external tools via Model Context Protocol (MCP):
Code quality analysis, issue tracking, and quality gate status.
{
"sonarqube": {
"type": "remote",
"url": "http://localhost:9081/mcp",
"enabled": true
}
}Jira issue management and Confluence documentation integration.
{
"atlassian": {
"type": "remote",
"url": "http://localhost:9000/mcp",
"enabled": true
}
}Browser automation for web application testing.
- Bun runtime
- Docker and Docker Compose
- Access to one of the supported AI tools (OpenCode, Claude Code, or GitHub Copilot)
- Navigate to the MCP directory:
cd ai-driven/mcp- Create environment files from templates:
cp env.sonar.example .env.sonar
cp env.atlassian.example .env.atlassian-
Edit the environment files with your credentials.
-
Start the MCP services:
docker-compose up -d- Copy the
.opencodedirectory to your project root:
cp -r ai-driven/opencode/.opencode /path/to/your/project/- Copy the shared agents:
cp ai-driven/agents/*.md /path/to/your/project/.opencode/agents/- Install plugin dependencies:
cd /path/to/your/project/.opencode
bun install- OpenCode will automatically detect the configuration.
- Copy the workflow instructions to your project root:
cp ai-driven/claude/CLAUDE.md /path/to/your/project/- Copy the MCP configuration:
cp ai-driven/claude/.claude.json /path/to/your/project/- Create the
.claudedirectory and copy agents:
mkdir -p /path/to/your/project/.claude
cp -r ai-driven/agents /path/to/your/project/.claude/- Optionally copy skills:
cp -r ai-driven/claude/.claude/skills /path/to/your/project/.claude/- Create the
.githubdirectory if it doesn't exist:
mkdir -p /path/to/your/project/.github- Copy the workflow instructions:
cp ai-driven/copilot/.github/copilot-instructions.md /path/to/your/project/.github/- Copy the MCP configuration:
cp ai-driven/copilot/mcp.json /path/to/your/project/- Copy the shared agents:
cp -r ai-driven/agents /path/to/your/project/.github/Additional skills are available for enhanced capabilities:
Creates distinctive, production-grade UIs that avoid generic "AI-generated" aesthetics. Focuses on unique visual identity, intentional design choices, and polished user experiences.
Available for: Claude Code, OpenCode (react-hexagonal agent)
Playwright-based web testing toolkit with helper scripts for:
- Element discovery
- Static HTML automation
- Console logging and debugging
- Server lifecycle management
Available for: Claude Code, OpenCode (tester-qa agent)
1. Invoke product-owner:
"I need to implement user authentication with OAuth2"
2. Invoke test-writer:
"Write tests for the authentication use cases defined by product-owner"
3. Invoke fastapi-hexagonal (or nestjs-hexagonal):
"Implement the authentication feature to make all tests pass"
4. Invoke code-reviewer:
"Review the authentication implementation"
5. Invoke code-simplifier:
"Refactor the authentication code for better clarity"
6. Invoke documentation-writer:
"Update the README with authentication documentation"
7. Invoke tester-qa:
"Test the authentication endpoints manually"
1. Invoke k3s-devops:
"Add a new Redis deployment for session caching"
| Type | Convention | Example |
|---|---|---|
| React Components | PascalCase.tsx | UserProfile.tsx |
| React Hooks | camelCase.ts | useUserProfile.ts |
| Utilities | camelCase.ts | formatDate.ts |
| Python modules | snake_case.py | user_repository.py |
| Tests | *.test.ts/tsx or *_test.py | UserService.test.ts |
- Create a new markdown file in
ai-driven/agents/:
---
name: my-custom-agent
description: Description of what the agent does
model: claude-sonnet
tools:
- Read
- Glob
- Grep
- Edit
- Write
---
# My Custom Agent
Instructions for the agent...-
Copy to the appropriate tool configuration directory.
-
For OpenCode, also update
opencode.jsonwith the agent configuration.
Adjust the tools list in the agent's YAML frontmatter:
tools:
- Read # Read files
- Glob # Find files by pattern
- Grep # Search file contents
- Edit # Modify existing files
- Write # Create new files
- Bash # Execute shell commandsUpdate the model field in the agent's frontmatter:
model: claude-sonnet # For complex tasks requiring deep reasoning
model: claude-haiku # For simpler, cost-effective tasks- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT