knowledge-load¶
Loads and prepares knowledge base context for downstream agents.
Synopsis¶
Description¶
The knowledge-load command ingests the knowledge base from .rp1/context/ and prepares it for use by other agents. It builds an internal knowledge graph, extracts entities and relationships, and optimizes the context for memory constraints.
This command is typically called internally by other KB-aware agents, but can be invoked directly to verify the KB is loadable.
Parameters¶
| Parameter | Default | Description |
|---|---|---|
RP1_ROOT |
.rp1/ |
Root directory for KB artifacts |
PROJECT_PATH |
. |
Project path (for monorepo subprojects) |
FOCUS_MODE |
balanced |
Context allocation strategy |
MEMORY_BUDGET |
Auto | Memory limit for loaded context |
Focus Modes¶
| Mode | Allocation | Use Case |
|---|---|---|
project |
80% project / 20% system | Feature development |
system |
50% project / 50% system | Architecture analysis |
balanced |
60% project / 40% system | General use |
Loading Strategy¶
The command adapts its loading strategy based on repository type:
Single Project:
- Loads: index.md, concept_map.md, architecture.md, modules.md, patterns.md
Monorepo Root:
- Loads: index.md, architecture.md, dependencies.md, patterns.md
- Optional: Project summaries
Monorepo Subproject:
- Loads: dependencies.md, patterns.md, projects/{name}/*.md
- Context: System architecture and shared components
Examples¶
Basic Usage¶
Expected output (single project):
Expected output (monorepo):
Error Response¶
If the KB doesn't exist or is corrupted:
Output¶
The command returns a simple status:
| Response | Meaning |
|---|---|
READY |
Single project KB loaded successfully |
READY [system: N projects] |
Monorepo root KB loaded |
READY [project: name] |
Monorepo subproject KB loaded |
ERROR: message |
Loading failed with reason |
Memory Budget Management¶
If the KB exceeds memory budget, compression is applied in this order:
- Remove tertiary project details (keep interfaces only)
- Compress unused shared code
- Summarize verbose descriptions
- Remove historical information
- Compress target project details (last resort)
Related Commands¶
knowledge-build- Generate the knowledge base
See Also¶
- Knowledge-Aware Agents - How agents use KB context