The "Self-Managing" Memory Protocol for GitHub Copilot.
Cortex is a single-prompt protocol that transforms your GitHub Copilot into a context-aware partner. It establishes a persistent memory structure, enforces project-specific rules, and adopts user-centric versioning logic autonomously.
In brain anatomy, the Cerebral Cortex is the outer layer responsible for high-level functions like memory, attention, and decision-making.
This protocol is named Cortex because it adds a "thinking layer" to your AI assistant:
- Spinal Cord (Reflexes): GitHub Copilot's base code completion.
- Cortex (Memory/Consciousness): The
.github/contextstructure that remembers why decisions were made (DECISION_LOG) and how you prefer to work (WORKFLOW).
- Copy the prompt from
genesis-prompt.md. - Open Copilot Chat in your IDE (VS Code, JetBrains, etc.).
- Paste the prompt and press Enter.
- Done. Your project now has a brain.
- Autonomous Setup: Analyzes your project (Languages, Git history, Architecture) to populate its own memory.
- User-Centric SemVer: Intelligently decides between PATCH, MINOR, and MAJOR based on user impact, not just code changes.
- Active Learning: "Learn this" or "Don't do that" commands automatically update the
WORKFLOW.mdfile. - Safety First: Enforces
git statuschecks and prevents committing sensitive data.
The protocol creates a smart .github/ structure:
.github/copilot-instructions.md: The Router (Reflexes & Logic)..github/context/PROJECT_DNA.md: Technical Identity & Tech Stack..github/context/WORKFLOW.md: Rules, Preferences & Anti-Patterns..github/context/DECISION_LOG.md: Architecture Decision Records (ADR)..github/context/SESSION_JOURNAL.md: Session Memory & Next Steps.
Contributions are welcome! Please check CHANGELOG.md to understand the evolution and philosophy behind Cortex before submitting changes.
MIT License.