Skip to content

/load

Load specific project components into context for focused work. Uses the project index to efficiently load relevant files.

Terminal window
/load [component] [flags]
  • 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/*

First, checks if PROJECT_INDEX.md exists:

  • If exists: Uses index for efficient loading
  • If not: Suggests running /index first, or does quick scan

Parses the requested component:

Request TypeAction
Category nameLoad all files in category
File pathLoad specific file
PatternLoad matching files
--allLoad key files from all categories

Reads the identified files and summarizes:

  • File purposes
  • Key exports/functions
  • Dependencies
  • Current state

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]
CategoryWhat It Loads
apiAPI routes and endpoints
modelsData models and types
servicesBusiness logic services
utilsUtility functions
testsTest files
configConfiguration files
authAuthentication related
dbDatabase related
FlagDescription
--allLoad all key components
--shallowLoad only file summaries
--deepLoad full file contents
--relatedInclude related files
Terminal window
# 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 --shallow
  1. Start Narrow: Load specific components first
  2. Expand as Needed: Use --related when you need more context
  3. Check Index: Run /index if loading seems slow
  4. Use Categories: Category names are faster than patterns

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]“
Terminal window
# Load the entire authentication system
/load auth --related
# Now you can work with full context
Terminal window
# Load the specific service and its tests
/load src/services/payment.ts
/load tests/payment.test.ts
Terminal window
# Load all files in a directory
/load src/api/orders/
Terminal window
# Get overview of all components
/load --all --shallow