Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

stratix-dev/stratix-copilot

Repository files navigation

Stratix Logo

stratix-copilot

AI-powered coding assistant for Stratix framework

VS Code GitHub Copilot License

What is Stratix Copilot?

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.

Key Features

  • 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

Usage

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?

Slash Commands

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
  1. Analyze - Understands your project structure
  2. Search - Finds relevant documentation using semantic search
  3. Enrich - Adds Stratix patterns and examples to prompt
  4. Generate - GitHub Copilot creates accurate code
  5. Use - Copy generated code into your project files

Knowledge Base

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)

Version Information

Check your KB version:

Cmd+Shift+P → "Stratix: Show Knowledge Base Info"

Update manually:

Cmd+Shift+P → "Stratix: Rebuild Knowledge Base"

Building Knowledge Base Locally

For developers, you can rebuild the knowledge base locally:

npm run build:knowledge

This will:

  1. Clone the Stratix repository from https://github.com/stratix-dev/stratix
  2. Index all documentation files
  3. 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)

VS Code Commands

  • Stratix: Open AI Assistant - Open Copilot Chat
  • Stratix: Rebuild Knowledge Base - Rebuild KB from docs
  • Stratix: Show Knowledge Base Info - Display version & stats

License

MIT © P. Andrés Carvajal

Support

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published