English | ็น้ซไธญๆ | Documentation | Updates | Changelog
Cortex AI is an AI collaboration system that transforms AI models into intelligent, learning partners. It solves the core problem of AI inconsistency and lack of memory through prompt injection and real-time preference learning.
The Problem:
- AI models lack stable thinking processes (Chain-of-Thought)
- AI forgets user preferences and repeats the same mistakes
- Different AI platforms behave inconsistently
- No personalization or learning from conversation
The Solution:
- ๐ง Brain - Structured thinking through prompt injection
- ๐ Experience - Real-time learning from user feedback
- ๐ Evolution - Continuous improvement without repeating mistakes
๐ง Brain (MDC/GEMINI/CLAUDE)
โโโ Real-time thinking and decision making
โโโ Structured 5-step thinking process
โโโ User preference learning from conversation
โโโ Cross-platform consistency
๐ Experience (docs)
โโโ Long-term memory and knowledge base
โโโ Project-specific patterns and conventions
โโโ Learning from successful interactions
โโโ Continuous knowledge evolution
๐ ๏ธ Essential Tools
โโโ Prompt injection for AI enhancement
โโโ User preference detection and application
โโโ Cross-platform adapter system
โโโ Simplified CLI for core operations
Cortex AI represents our core philosophy for transforming AI interactions:
-
Few-Shot to Fine-Tune Transformation - We transform simple few-shot examples into comprehensive fine-tune prompts automatically, eliminating the need for manual prompt engineering.
-
Hook-Based Interception System - Our architecture intercepts all user inputs and processes them through a structured pipeline that guarantees consistent quality and behavior.
-
Deterministic Expansion Over Randomness - Rather than relying on emergent behaviors, we systematically expand minimal user inputs into complete, well-structured instructions.
-
Guaranteed Processing Pipeline - Every user input is processed through our complete pipeline with 100% execution rate, ensuring no step is ever skipped.
-
Explicit Reasoning and Documentation - All transformations from few-shot to fine-tune are explicit, documented, and traceable through our workflow.
This philosophy drives our implementation of an intelligent system that transforms simple user inputs (few-shot examples) into comprehensive, production-ready fine-tune prompts through mandatory processing steps.
graph TD
A[User Input] --> B[Cursor Processing]
B --> C{MCP Interceptor}
C -->|Enforced Execution| D[MCP Workflow]
D --> E[Intent Analysis]
E --> F[Task Decomposition]
F --> G[Role Selection]
G --> H[Best Practice Search]
H --> I[Instruction Generation]
I --> J[User Response]
subgraph "MCP Enforcement Mechanism"
C
K[.cursor/rules/cortex.mdc]
L[prompt-injection.ts]
M[thought-interceptor.ts]
end
K --> C
L --> C
M --> C
sequenceDiagram
participant User as User
participant Cursor as Cursor AI
participant Rules as .cursor/rules/cortex.mdc
participant Interceptor as Thought Interceptor
participant MCP as MCP Workflow
participant Tools as MCP Tools
User->>Cursor: Input Message
Cursor->>Rules: Load Rules
Rules->>Cursor: Enforce MCP Rules
Cursor->>Interceptor: Intercept User Input
Interceptor->>MCP: Force MCP Workflow Execution
MCP->>Tools: Execute Intent Analysis
Tools->>MCP: Return Intent Results
MCP->>Tools: Execute Task Decomposition
Tools->>MCP: Return Task Structure
MCP->>Tools: Execute Role Selection
Tools->>MCP: Return Role Assignments
MCP->>Interceptor: Return Complete MCP Results
Interceptor->>Cursor: Inject Structured Thinking
Cursor->>User: Return MCP-Based Response
- 6-Step Thinking Process: Intent Exploration โ Problem Analysis โ Knowledge Integration โ Solution Development โ Implementation Planning โ Quality Validation
- Mandatory Protocol: Forces AI to think systematically, regardless of model capabilities
- Quality Validation: Ensures complete and logical thinking
- User Preference Detection: Learns from keywords like "ไธๅฐ", "ๆๅ็จ", "ไธ่ฆ"
- Immediate Application: Applies learned preferences to current response
- No Repetition: Never repeats corrected mistakes
- Frustration Detection: Recognizes and learns from user frustration
- Cursor Integration: Enhanced MDC with preference learning
- Claude Support: Context-aware system messages
- Gemini Support: Platform-specific prompt engineering
- Unified Behavior: Same learning and thinking across all platforms
# Global installation
npm install -g @rikaidev/cortex
# Or using npx
npx @rikaidev/cortex
# Initialize Cortex AI in your project
cortex init
# Generate IDE configurations
cortex generate-ide
# Start AI collaboration
cortex start
# Show version
cortex version
User: "่จป่งฃๅ้ๅงๅฏซไธญๆไบ๏ผ"
AI: [Learns] Write all comments in English
User: "ๆๅ็จ uv run pytest"
AI: [Learns] Always use uv run for Python commands
User: "ๅไพไบ"
AI: [Learns] Don't repeat the same mistake
๐ ANALYSIS PHASE: [Problem understanding]
๐ KNOWLEDGE INTEGRATION: [Apply learned preferences]
๐ก SOLUTION DEVELOPMENT: [Consider user preferences]
โก IMPLEMENTATION PLAN: [Respect user patterns]
โ
QUALITY VALIDATION: [Ensure preference compliance]
- Same learning across Cursor, Claude, and Gemini
- Same thinking process on all platforms
- Same preferences applied everywhere
- Same evolution through conversation
- Getting Started - Quick setup guide
- AI Collaboration - System architecture and roles
- Experience Learning - Learning and improvement system
- Updates & Notifications - Stay informed about changes
- Roadmap - Future development plans
- Node.js 18+
- TypeScript knowledge
# Clone repository
git clone https://github.com/RikaiDev/cortex.git
cd cortex
# Install dependencies
npm install
# Build project
npm run build
# Run tests
npm run test
# Start development
npm run dev
Cortex (ๅคง่ ฆ็ฎ่ณช) represents the brain's advanced cognitive functions:
- ๐ง Thinking - Structured reasoning and problem-solving
- ๐ Memory - Learning and storing experiences
- ๐ Evolution - Continuous improvement through experience
- ๐ฏ Decision - Making informed choices based on learning
Just like the human cerebral cortex, Cortex AI is the "brain" for AI systems - responsible for thinking, memory, learning, and decision-making.
Transform your AI interactions from frustrating repetitions to intelligent, learning partnerships with Cortex AI.