/project-new - Create New CODITECT Project
Create a new project in ~/PROJECTS/ with full CODITECT integration: symlinks to framework, component inventory registration, activation, and MoE classification.
System Prompt
EXECUTION DIRECTIVE: When the user invokes this command, you MUST:
- Check CODITECT installation - Verify
~/.coditectexists and is properly configured - Create project directory - Under
~/PROJECTS/<project-name>/ - Setup symlinks - Create
.coditectand.claudesymlinks - Initialize project structure - Create standard directories
- Run component inventory - Register and activate components
- Classify project - Run MoE classification on initial files
- Report results - Show project path, symlinks, and next steps
REQUIRES CONFIRMATION: This command creates directories and modifies project structure.
Usage
/project-new <project-name> # Create with default structure
/project-new <project-name> --description "..." # With description
/project-new <project-name> --template api # From template
/project-new <project-name> --with-git # Initialize git repo
What It Does
Step 1: Verify CODITECT Installation
# Check installation status
if [ -L ~/.coditect ] || [ -d ~/.coditect ]; then
# Check if protected location exists
PROTECTED_LOC="$HOME/Library/Application Support/CODITECT/core"
if [ -d "$PROTECTED_LOC" ]; then
echo "✓ CODITECT Core installed (protected location)"
fi
# Log machine reference
if [ -f ~/.coditect/machine-id.json ]; then
MACHINE_UUID=$(cat ~/.coditect/machine-id.json | grep machine_uuid | cut -d'"' -f4)
echo "✓ Machine ID: ${MACHINE_UUID:0:8}..."
fi
else
echo "⚠ CODITECT Core not installed - running setup..."
python3 scripts/CODITECT-CORE-INITIAL-SETUP.py
fi
Step 2: Create Project Directory
PROJECT_DIR=~/PROJECTS/<project-name>
mkdir -p "$PROJECT_DIR"
cd "$PROJECT_DIR"
Step 3: Create Symlinks
# Create .coditect symlink to framework
ln -sf ~/.coditect "$PROJECT_DIR/.coditect"
# Create .claude symlink for compatibility
ln -sf .coditect "$PROJECT_DIR/.claude"
Step 4: Initialize Project Structure
# Standard CODITECT project structure
mkdir -p docs/{guides,reference,adrs}
mkdir -p src/{components,services,utils}
mkdir -p tests/{unit,integration}
mkdir -p scripts
mkdir -p config
# Create initial files
touch README.md
touch PROJECT-PLAN.md
touch .gitignore
Step 5: Component Inventory & Activation
# Register project components (if any)
python3 ~/.coditect/scripts/update-component-counts.py
# Ensure all components are registered and activated
python3 ~/.coditect/scripts/core/ensure_component_registered.py
# Index components for search
python3 ~/.coditect/scripts/component-indexer.py -i
Step 6: MoE Classification
# Classify initial project files
python3 ~/.coditect/scripts/moe_classifier/classify.py "$PROJECT_DIR" --update-frontmatter
Step 7: Self-Improvement Discovery
# Find relevant agents for the project type
/which "project setup"
/which "component creation"
# Provide guidance on component creation
echo "To create new components, use: /component-create <type> <name>"
Project Templates
| Template | Description | Includes |
|---|---|---|
default | Basic project | docs/, src/, tests/ |
api | REST API project | routes/, models/, middleware/ |
cli | CLI application | commands/, lib/ |
library | Reusable library | src/, examples/ |
fullstack | Full stack app | frontend/, backend/, shared/ |
Symlink Architecture
After /project-new my-project:
~/PROJECTS/my-project/
├── .coditect → ~/.coditect # Framework access
├── .claude → .coditect # Compatibility alias
├── docs/
├── src/
├── tests/
├── scripts/
├── config/
├── README.md
├── PROJECT-PLAN.md
└── .gitignore
Full symlink chain:
~/PROJECTS/my-project/.coditect
→ ~/.coditect (backward compat symlink)
→ ~/Library/Application Support/CODITECT/core/ (protected installation)
Examples
# Create a new API project
/project-new my-api --description "REST API service" --template api --with-git
# Create a simple project
/project-new experiments
# Create with full stack template
/project-new my-app --template fullstack --with-git
Success Output
======================================================
New CODITECT Project Created Successfully!
======================================================
Project: my-project
Location: ~/PROJECTS/my-project
Template: default
Structure Created:
✓ ~/PROJECTS/my-project/
✓ .coditect → ~/.coditect
✓ .claude → .coditect
✓ docs/, src/, tests/, scripts/, config/
✓ README.md, PROJECT-PLAN.md, .gitignore
Framework Integration:
✓ Component inventory updated
✓ Framework registration complete
✓ MoE classification applied
Machine Reference:
Machine UUID: a1b2c3d4... (hal-mbp-2024)
Installation: Protected location verified
Next Steps:
1. cd ~/PROJECTS/my-project
2. Run `/orient` to start working
3. Use `/component-create` to add custom components
4. Use `/which <task>` to find relevant agents
Quick Commands:
/component-create agent my-agent # Create new agent
/component-create skill my-skill # Create new skill
/which "my task" # Find best agent
/classify . # Classify all files
Prerequisites
- CODITECT Core installed (run
CODITECT-CORE-INITIAL-SETUP.pyif not) - Write access to
~/PROJECTS/ - Python 3.10+ for registration scripts
Related Commands
| Command | Purpose |
|---|---|
/component-create | Create new agents, skills, commands |
/which <task> | Find agents for a task |
/classify path/ | MoE document classification |
/orient | Session orientation |
/cx | Capture session context |
Completion Checklist
Before marking complete:
- CODITECT installation verified
- Project directory created
- Symlinks created and verified
- Project structure initialized
- Component inventory updated
- MoE classification applied
- Success output displayed
Failure Indicators
This command has FAILED if:
- ❌ CODITECT Core not installed and setup fails
- ❌ Project directory cannot be created
- ❌ Symlinks fail to create
- ❌ Component registration errors
- ❌ MoE classification fails
When NOT to Use
Do NOT use when:
- Project already exists (use
/project showinstead) - Working in existing non-CODITECT project (manual symlink setup)
- Only need CODITECT for one-time task (no project overhead)
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Skip installation check | Broken symlinks | Always verify CODITECT first |
| Create outside ~/PROJECTS | Inconsistent paths | Use standard location |
| Skip component registration | Undiscoverable components | Complete all steps |
Principles
This command embodies:
- #3 Complete Execution - All steps automated, no manual intervention
- #5 Search Before Create - Check installation before proceeding
- #6 Clear, Understandable - Obvious project structure
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Action Policy
<default_behavior> This command requires confirmation before:
- Creating new project directory
- Setting up symlinks
- Modifying component registrations
Shows a preview of the structure to be created. </default_behavior>
Version: 1.0.0 Created: 2026-01-06 Author: CODITECT Team ADR: ADR-057-coditect-core-initial-setup.md