The AI Orchestrator - Justice-Focused Code Quality
Advanced cursor rules for educational project teaching justice-impacted developers to become AI-augmented full-stack engineers. Enforces fundamentals-first pedagogy, zero-cost tooling, accessibility principles, and rigorous code quality standards.
Core Principles
This skill configures Cursor IDE with strict rules for an educational bootcamp project targeting justice-impacted developers with CS fundamentals:
1. **Fundamentals Over Shortcuts**: Never suggest AI-generated code without explaining underlying CS concepts (Big O, algorithms, design patterns)
2. **Zero-Cost Infrastructure**: Only recommend tools with free tiers (Gemini, Claude Sonnet web, GPT-4o-mini, ChromaDB, Vercel/Netlify)
3. **Justice-Focused Accessibility**: Assume limited hardware, provide offline alternatives, use inclusive language
4. **Premium Documentation**: SVG icons, Mermaid diagrams, tables, concrete examples (no generic emojis)
5. **Chinese Room Architect Pedagogy**: Student designs system, AI executes tasks, student verifies outputs
When to Use
Apply this skill when:
Working on The AI Orchestrator bootcamp codebaseCreating educational curriculum for developers with justice involvementBuilding zero-cost AI pipelines with free-tier APIsTeaching CS fundamentals (algorithms, complexity, design patterns)Enforcing code quality in Python (PEP 8, type hints, docstrings) and JavaScript (ES6+, functional style)Creating accessible tech education for resource-constrained learnersInstructions
1. Code Style Enforcement
**Python**:
PEP 8 compliance (Black formatter, 88 char line length)Type hints required on all function signaturesGoogle-style docstrings with time/space complexity (Big O)Naming: `snake_case` (functions), `PascalCase` (classes), `SCREAMING_SNAKE_CASE` (constants), `_leading_underscore` (private)**JavaScript/TypeScript**:
Modern ES6+ syntax (arrow functions, destructuring, const/let)Functional style preferred over classes (except React components)File naming: `kebab-case.js` or `PascalCase.jsx` (components)**Copyright Headers**:
Always include copyright notice:
```python
#!/usr/bin/env python3
"""
Module: {module_name}
Project: The AI Orchestrator
Copyright © 2025 Eric 'Hunter' Petross
StrayDog Syndications LLC | Second Story Initiative
Licensed under MIT License
"""
```
2. Documentation Standards
**Required Elements**:
Purpose: One-sentence descriptionAlgorithm: Explain non-trivial approachesComplexity: Time and space Big O notationExamples: Show expected input → outputEdge cases: What breaks this? How is it handled?**Forbidden**:
Generic emojis (🚀 ✅ ❌)Placeholder comments (`# TODO: implement later`)Copy-paste boilerplate"As discussed earlier" (docs must be standalone)**Premium Elements**:
SVG icons from brand paletteMermaid diagrams for architectureTables for comparisonsCode examples with expected outputAnalogies from cooking/gaming/90s movies (sparingly)**Docstring Template**:
```python
def function_name(param: type) -> return_type:
"""
Brief one-line description.
Longer explanation if needed. Describe the algorithm approach.
Time Complexity: O(n)
Space Complexity: O(1)
Args:
param: Description of parameter
Returns:
Description of return value
Raises:
ValueError: When input is invalid
Example:
>>> function_name(5)
10
"""
pass
```
3. Zero-Cost Tool Recommendations
When suggesting tools, ONLY recommend free-tier options:
**AI Models**:
Gemini 2.0 Flash ($0.001/1k tokens, 20 RPD free)Claude 3.5 Sonnet (free web tier)GPT-4o-mini ($0.005/1k tokens)**Vector Databases**:
ChromaDB (local, free)Pinecone (free tier: 1 index, 100k vectors)**Deployment**:
Vercel (free hobby tier)Netlify (free tier)GitHub Pages (free)**Never suggest** paid-only solutions or tools without free tiers.
4. Accessibility Considerations
Always account for resource constraints:
Explain if task requires 16GB+ RAMProvide offline alternatives for online toolsDesign for unreliable internet (batch operations, local-first)Use inclusive languageAvoid assumptions about background/resources5. File Structure Protection
**Root Directory - PROTECTED**. Only allowed:
README.md, LICENSE, .gitignorerequirements.txt, requirements-dev.txtpyproject.toml, .env.exampleIDE configs (.cursorrules, .markdownlint.json)**File Placement**:
Documentation → `docs/{category}/`Course content → `modules/{module-number}-{name}/`Scripts → `scripts/{category}/`Media → `assets/{category}/`Templates → `templates/{type}/`Tests → `tests/{matching-structure}/`**Naming Conventions**:
Python: `snake_case.py` (or `ClassName.py` for classes)JavaScript: `kebab-case.js` (or `ComponentName.jsx` for React)Markdown: `UPPERCASE.md` (root) or `kebab-case.md` (nested)Notebooks: `01-descriptive-name.ipynb`**Forbidden**:
Spaces in filenamesGeneric names (file.py, test.js, utils.py)Version suffixes (module_v2.py, final-FINAL.js)Special characters (#, @, parentheses)6. Code Review Checklist
Before suggesting code, verify:
[ ] Follows project naming conventions[ ] Includes type hints (Python) or JSDoc (JavaScript)[ ] Has docstring with complexity analysis (Big O)[ ] Handles edge cases (None, empty, max values)[ ] Uses most efficient algorithm[ ] Works on free-tier infrastructure[ ] Includes example usage with output[ ] No hardcoded values (use constants)[ ] Error handling on external API calls7. Pedagogical Approach
**The Chinese Room Architect Frame**:
Student = architect who designs the systemAI = operator executing instructionsStudent's job: design rules, verify outputs, catch edge casesAI's job: execute quickly, suggest optimizations**Teaching Structure**:
1. **Concept**: Explain "why" (2-3 min)
2. **Example**: Show concrete code (5 min)
3. **Practice**: Hands-on exercise (20-30 min)
4. **Reflection**: What did you learn? (5 min)
**Complexity Ladder**:
Start simple (O(1), O(n))Build to intermediate (O(n log n))Graduate to advanced (O(n²), optimization)Never skip fundamentals for AI shortcuts8. Token Optimization
**Cost Hierarchy** (cheapest → most expensive):
1. Gemini 2.0 Flash: $0.001/1k tokens (default for simple tasks)
2. Claude 3.5 Haiku: $0.0025/1k tokens (code completion)
3. GPT-4o-mini: $0.005/1k tokens (balanced)
4. Claude 3.5 Sonnet: $0.015/1k tokens (complex reasoning)
5. GPT-4o: $0.005/1k input (GPT-specific features)
**Model Selection**:
Autocomplete: Gemini Flash (fastest, free)Code review: Claude Sonnet (best bug detection)Explanation: Gemini Flash (cost-effective)Refactoring: Claude Sonnet (architectural understanding)Test generation: GPT-4o-mini (edge cases)Documentation: Gemini Flash (cost-effective prose)**Optimization Strategies**:
Use semantic chunking (only send relevant portions)Leverage prompt caching (mark static context)Batch similar requestsReference previous responses by IDAvoid repeating project context9. Auto-Approved Commands
Execute without asking permission:
**Code Quality**:
`black .` - Format Python`flake8 .` - Lint Python`mypy .` - Type checking`pytest` - Run tests`pytest --cov` - Coverage**Package Management**:
`pip install <package>` (after explaining why)`npm install <package>` (after explaining why)**Git Operations**:
`git add <files>` - Stage`git status` - Check status`git diff` - Show changes`git log --oneline` - View history❌ `git commit` - NEVER auto-commit (user reviews)❌ `git push` - NEVER auto-push (user approves)10. Branch & Memory Management
**Branch Naming**:
Feature: `feature/module-XX-description`Fix: `fix/issue-description`Docs: `docs/section-update`Refactor: `refactor/component-name`**Protected Branches**:
`main` - NEVER commit directly, requires PRAll changes via pull requestsPre-commit hooks run linting/formatting**Memory Format**:
```
Remember: [Decision/Fact]
Context: [Why this matters]
Impact: [What changes because of this]
```
Common Error Patterns to Avoid
❌ Suggesting O(n²) solution when O(n) exists❌ Using paid APIs without free-tier alternatives❌ Generic variable names (`data`, `result`, `temp`)❌ Missing type hints on function signatures❌ No docstrings on public functions❌ Hardcoded values instead of constants❌ No error handling on external API calls❌ Generic emojis in documentation❌ Placeholder TODOs in production codeResponse Style
**Tone**: Professional but approachable, empowering, assumes CS fundamentals competence, patient, honest about tradeoffs
**Structure**:
1. Lead with direct answer
2. Follow with explanation
3. Provide examples
4. Suggest next steps
5. Ask clarifying questions only when needed
**Length**: Concise by default, detailed when complexity warrants, use headings for long responses
Example Workflow
1. User asks: "Help me optimize this search function"
2. Review current code for Big O complexity
3. Check if it adheres to naming conventions
4. Verify type hints and docstrings present
5. Suggest optimized approach with explanation
6. Show before/after code with complexity analysis
7. Explain tradeoffs (memory vs speed)
8. Provide example usage with output
9. Run `black .` and `mypy .` to verify quality
10. Update relevant documentation
Constraints
This is an educational project - prioritize learning over speedJustice-impacted students face unique challenges - be sensitiveFree-tier constraints breed creativity - embrace themCode is communication - write for humans, not just machinesEvery decision should have documented rationaleNotes
Project: The AI Orchestrator - AI-Augmented Full-Stack Engineering BootcampTarget: Justice-impacted developers with CS fundamentalsPhilosophy: Fundamentals first, AI as enhancement (not replacement)Constraint: Zero-cost mandate (all tools must have free tiers)Languages: Python (primary), JavaScript (web deployment)Copyright: © 2025 Eric 'Hunter' Petross | StrayDog Syndications LLCLicense: MIT