/load
Purpose
Section titled “Purpose”Load specific project components into context for focused work. Uses the project index to efficiently load relevant files.
/load [component] [flags]Arguments
Section titled “Arguments”- component: Can be a category name, file path, or pattern
- Category name:
api,models,services,utils,tests, etc. - File path:
src/services/user.ts - Pattern:
src/auth/*
- Category name:
Workflow
Section titled “Workflow”Step 1: Check for Index
Section titled “Step 1: Check for Index”First, checks if PROJECT_INDEX.md exists:
- If exists: Uses index for efficient loading
- If not: Suggests running
/indexfirst, or does quick scan
Step 2: Identify Component
Section titled “Step 2: Identify Component”Parses the requested component:
| Request Type | Action |
|---|---|
| Category name | Load all files in category |
| File path | Load specific file |
| Pattern | Load matching files |
--all | Load key files from all categories |
Step 3: Load Files
Section titled “Step 3: Load Files”Reads the identified files and summarizes:
- File purposes
- Key exports/functions
- Dependencies
- Current state
Step 4: Context Summary
Section titled “Step 4: Context Summary”Provides a brief summary:
## Loaded Context
### Files Loaded (N)- `path/to/file1.ts` - [purpose]- `path/to/file2.ts` - [purpose]
### Key Components- [Component]: [description]
### Ready For- [Suggested actions based on loaded context]Component Categories
Section titled “Component Categories”| Category | What It Loads |
|---|---|
api | API routes and endpoints |
models | Data models and types |
services | Business logic services |
utils | Utility functions |
tests | Test files |
config | Configuration files |
auth | Authentication related |
db | Database related |
| Flag | Description |
|---|---|
--all | Load all key components |
--shallow | Load only file summaries |
--deep | Load full file contents |
--related | Include related files |
Examples
Section titled “Examples”# Load all API routes/load api
# Load all data models/load models
# Load specific file/load src/services/user.ts
# Load auth + related files/load auth --related
# Load all key components/load --all
# Quick overview of everything/load --all --shallowBest Practices
Section titled “Best Practices”- Start Narrow: Load specific components first
- Expand as Needed: Use
--relatedwhen you need more context - Check Index: Run
/indexif loading seems slow - Use Categories: Category names are faster than patterns
After Loading
Section titled “After Loading”The command suggests next actions:
- “Ready to work on [component]. What would you like to do?”
- “I see [patterns/issues]. Want me to address them?”
- “Related files that might be relevant: [list]“
Use Cases
Section titled “Use Cases”Starting Work on a Feature
Section titled “Starting Work on a Feature”# Load the entire authentication system/load auth --related
# Now you can work with full contextBug Investigation
Section titled “Bug Investigation”# Load the specific service and its tests/load src/services/payment.ts/load tests/payment.test.tsCode Review
Section titled “Code Review”# Load all files in a directory/load src/api/orders/Architecture Understanding
Section titled “Architecture Understanding”# Get overview of all components/load --all --shallowRelated Commands
Section titled “Related Commands”- /index - Generate project structure index
- /status - Check project status
- /checkpoint - Save/restore session state