This file provides guidance for AI assistants working with the Cortex codebase. It describes the project structure, development workflows, and key conventions to follow.
Cortex is a language model project under the CortexLM organization. This repository serves as the core codebase for the Cortex platform.
Note: This is a new repository. Sections marked with
[TBD]should be updated as the codebase develops.
cortex/
├── CLAUDE.md # This file - AI assistant guidance
├── README.md # Project documentation [TBD]
├── src/ # Source code [TBD]
├── tests/ # Test files [TBD]
├── docs/ # Documentation [TBD]
└── scripts/ # Build and utility scripts [TBD]
- Feature branches:
feature/<description> - Bug fixes:
fix/<description> - Documentation:
docs/<description> - AI-assisted development:
claude/<session-id>(auto-generated)
Use conventional commit format:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
- Create a feature branch from
main - Make changes with clear, atomic commits
- Ensure all tests pass
- Submit PR with descriptive title and body
- Address review feedback
- Squash and merge when approved
- Clarity over cleverness: Write readable, self-documenting code
- DRY (Don't Repeat Yourself): Extract common patterns into reusable components
- KISS (Keep It Simple, Stupid): Avoid over-engineering
- Single Responsibility: Each function/class should do one thing well
[TBD - Update based on primary languages used in the project]
- Use explicit error handling rather than silent failures
- Provide meaningful error messages
- Log errors appropriately for debugging
- Never commit secrets, API keys, or credentials
- Use environment variables for sensitive configuration
- Validate and sanitize all user inputs
- Follow OWASP security guidelines
[TBD - Update based on testing framework chosen]
[TBD - Update with actual test commands]
# Example commands (update as needed)
# npm test
# pytest
# cargo test- Aim for meaningful test coverage on critical paths
- Unit tests for individual functions/methods
- Integration tests for component interactions
- End-to-end tests for user workflows
[TBD - Update with setup instructions]
# Example setup (update as needed)
git clone <repository-url>
cd cortex
# Install dependencies
# Configure environment[TBD - Update with actual build commands]
[TBD - Update with deployment procedures]
- Read before modifying: Always read existing code before suggesting changes
- Understand context: Use exploration tools to understand the codebase structure
- Preserve style: Match existing code style and conventions
- Test changes: Ensure modifications don't break existing functionality
- Document appropriately: Update documentation for significant changes
- Use
Globto find files by pattern - Use
Grepto search for code patterns - Use the
Tasktool withExploreagent for complex searches
- Read relevant files before editing
- Make focused, minimal changes
- Avoid introducing unnecessary dependencies
- Test changes before committing
- Read error messages carefully
- Trace the code path to understand the issue
- Use logging/debugging tools as appropriate
- Document the root cause and fix
- Don't make changes without understanding existing code
- Don't over-engineer solutions
- Don't add features beyond what's requested
- Don't commit sensitive information
- Don't break existing functionality
[TBD - Update as the codebase develops]
| File/Directory | Purpose |
|---|---|
CLAUDE.md |
AI assistant guidance (this file) |
README.md |
Project documentation |
| [TBD] | [TBD] |
[TBD - Document required environment variables]
| Variable | Description | Required |
|---|---|---|
| [TBD] | [TBD] | [TBD] |
[TBD - Document key dependencies]
[TBD - Document common issues and solutions]
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Respond to review feedback
Last updated: 2026-01-29
This file should be updated as the project evolves. When making significant changes to the codebase structure, workflows, or conventions, please update this guide accordingly.