Stratix Copilot is a VS Code extension that enhances GitHub Copilot with deep knowledge of the Stratix framework. It uses Retrieval Augmented Generation (RAG) to provide accurate, framework-specific code generation.
- Context-Aware AI - Understands your project structure (DDD/Modular)
- Framework Knowledge - Trained on 40+ Stratix documentation sources
- Smart Code Generation - Entities, commands, queries, value objects
- Auto-Updates - Knowledge base stays synchronized with framework
- RAG-Enhanced - Retrieves relevant documentation for accurate responses
- Privacy-First - All processing happens locally
- No API Keys - Uses your existing GitHub Copilot subscription
Open Copilot Chat and use @stratix:
@stratix /entity Product with name, price, stock
@stratix /command CreateProduct with productId, name, price
@stratix /query GetProductById with productId
@stratix /vo Email with validation
@stratix how do I implement a repository?
| Command | Description | Example |
|---|---|---|
/entity |
Generate domain entity | @stratix /entity User with email, name |
/command |
Generate CQRS command | @stratix /command CreateUser |
/query |
Generate CQRS query | @stratix /query GetUserById |
/vo |
Generate value object | @stratix /vo Email with validation |
/repository |
Generate repository | @stratix /repository UserRepository |
/context |
Generate bounded context | @stratix /context Orders |
/refactor |
Get refactoring suggestions | @stratix /refactor [code] |
/explain |
Explain concepts | @stratix /explain aggregate roots |
- Analyze - Understands your project structure
- Search - Finds relevant documentation using semantic search
- Enrich - Adds Stratix patterns and examples to prompt
- Generate - GitHub Copilot creates accurate code
- Use - Copy generated code into your project files
The extension includes a pre-built, versioned knowledge base:
- 40+ Documents - Complete Stratix documentation from the Stratix repository
- Auto-Updates - CI/CD automatically clones the latest docs and rebuilds the knowledge base
- Version Tracking - Matches framework version
- Local Storage - Fast, privacy-first
The knowledge base is built by cloning the Stratix repository and indexing:
- Docusaurus documentation (
docs/website/docs/**) - Package READMEs (
packages/*/README.md) - Code examples (if available)
Check your KB version:
Cmd+Shift+P → "Stratix: Show Knowledge Base Info"
Update manually:
Cmd+Shift+P → "Stratix: Rebuild Knowledge Base"
For developers, you can rebuild the knowledge base locally:
npm run build:knowledgeThis will:
- Clone the Stratix repository from
https://github.com/stratix-dev/stratix - Index all documentation files
- Generate
src/rag/initial-knowledge.json
Configuration (optional environment variables):
STRATIX_DOCS_REPO_URL- Repository URL (default:https://github.com/stratix-dev/stratix)STRATIX_DOCS_BRANCH- Branch or tag to clone (default:main)
Stratix: Open AI Assistant- Open Copilot ChatStratix: Rebuild Knowledge Base- Rebuild KB from docsStratix: Show Knowledge Base Info- Display version & stats
MIT © P. Andrés Carvajal
