Agent ID: repo-manager
Category: Meta
Type: Meta Agent
Version: 2.0.0
Status: Stable
The Repository Manager is a meta agent specifically designed for managing development work on the OpenAgents repository itself. It provides lazy context loading, smart delegation, and automatic documentation updates with intelligent subagent coordination.
context-retriever for dynamic context discoveryWhile openagent is a universal agent for any project, repo-manager is specialized for OpenAgents repository development. It understands the repository's structure, conventions, and standards, ensuring all work follows established patterns.
context-retriever subagent for dynamic discovery.tmp/sessions/{timestamp}-{task-slug}/ for complex tasksUse repo-manager for:
Don't use repo-manager for:
openagent instead)Every task follows the same predictable workflow:
┌─────────────────────────────────────────────────────────────┐
│ STAGE 1: ANALYZE │
│ - Classify task type (agent, eval, registry, docs, etc.) │
│ - Determine complexity (simple vs complex) │
│ - Decide execution path (question vs task) │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ STAGE 2: PLAN & APPROVE │
│ - Create implementation plan │
│ - List files to create/modify │
│ - Identify context needed (don't load yet) │
│ - Request approval │
│ - ✅ Wait for user approval │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ STAGE 3: LOAD CONTEXT (Lazy Loading) │
│ - Load quick-start.md (always) │
│ - Delegate to context-retriever for discovery │
│ - Load discovered context files │
│ - Extract key requirements │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ STAGE 4: EXECUTE │
│ - Decision: Complex → Session file + delegate │
│ - Decision: Simple specialist → Inline context │
│ - Decision: Direct → Execute with loaded context │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ STAGE 5: VALIDATE │
│ - Run validation scripts │
│ - Run tests if applicable │
│ - On failure: STOP → REPORT → PROPOSE → APPROVE → FIX │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ STAGE 6: COMPLETE │
│ - Update affected documentation │
│ - Summarize all changes │
│ - Confirm user satisfaction │
│ - Cleanup session files (if created) │
└─────────────────────────────────────────────────────────────┘
Instead of hardcoding context file paths, repo-manager uses context-retriever for dynamic discovery:
Load quick-start.md (always - orientation file)
Read: .opencode/context/openagents-repo/quick-start.md
Delegate to context-retriever for discovery
task(
subagent_type="subagents/core/context-retriever",
description="Find context for {task-type}",
prompt="Search for context files related to: {task-type}
Return:
- Exact file paths
- Brief summaries
- Priority order"
)
Load discovered files in priority order
FOR EACH file in discovered_files:
Read: {file-path}
Extract requirements from loaded context
Repo-manager uses three delegation strategies based on task complexity:
When: 4+ files, >60min, complex dependencies, task breakdown needed
Subagents: task-manager, documentation
Process:
.tmp/sessions/{timestamp}-{task-slug}/context.md with:
Example:
task(
subagent_type="subagents/core/task-manager",
prompt="Load context from .tmp/sessions/20250114-143022-parallel-tests/context.md
Break down this feature into atomic subtasks.
Follow all requirements in context file."
)
When: Simple delegation to specialists (tester, reviewer, coder-agent)
Subagents: tester, reviewer, coder-agent, build-agent
Process:
Example:
task(
subagent_type="subagents/code/tester",
prompt="Context to load:
- .opencode/context/core/standards/tests.md
Task: Write tests for {feature}
Requirements:
- Positive and negative test cases
- Arrange-Act-Assert pattern
Files to test:
- {file1}
- {file2}"
)
When: 1-3 files, straightforward, <30min
Process:
| Subagent | Purpose | Context Strategy |
|---|---|---|
| task-manager | Break down complex features into atomic subtasks | Session file |
| context-retriever | Find and retrieve relevant context files | None (discovery) |
| documentation | Generate/update comprehensive documentation | Session file |
| Subagent | Purpose | Context Strategy |
|---|---|---|
| coder-agent | Execute simple coding subtasks | Inline |
| tester | Write tests following TDD | Inline |
| reviewer | Code review, security, quality checks | Inline |
| build-agent | Type checking, build validation | Inline |
When creating session files for complex tasks:
.tmp/sessions/{timestamp}-{task-slug}/
├── context.md # Shared context for all subagents
└── .manifest.json # Track session metadata
# Task Context: {Task Name}
Session ID: {timestamp}-{task-slug}
Created: {ISO timestamp}
Status: in_progress
## Current Request
{Original user request}
## Context Files to Load
- .opencode/context/openagents-repo/quick-start.md
- {other context files discovered in Stage 3}
## Key Requirements (Extracted from Context)
- {requirement 1}
- {requirement 2}
## Files to Create/Modify
- {file 1} - {purpose}
- {file 2} - {purpose}
## Technical Constraints
{Any technical constraints}
## Exit Criteria
- [ ] {criteria 1}
- [ ] {criteria 2}
## Progress Tracking
- [ ] Context loaded and understood
- [ ] Implementation complete
- [ ] Tests passing
- [ ] Documentation updated
---
**Instructions for Subagent**:
{Specific instructions}
User: "Create a new data analyst agent"
Workflow:
Context Flow: ✅ Lazy loaded, ✅ No session files, ✅ Direct execution
User: "Build parallel test execution for eval framework"
Workflow:
.tmp/sessions/20250114-143022-parallel-tests/context.mdContext Flow: ✅ Lazy loaded, ✅ Session file created, ✅ Shared memory, ✅ Clean coordination
| Scenario | Context Loading | Session File? | Delegation |
|---|---|---|---|
| Simple agent creation | Lazy (context-retriever) | ❌ No | None (direct) |
| Complex feature (4+ files) | Lazy (context-retriever) | ✅ Yes | task-manager |
| Write tests | Lazy (context-retriever) | ❌ No | tester (inline) |
| Code review | Lazy (context-retriever) | ❌ No | reviewer (inline) |
| Simple implementation | Lazy (context-retriever) | ❌ No | coder-agent (inline) |
| Comprehensive docs | Lazy (context-retriever) | ✅ Yes | documentation |
| Find context files | None (discovery agent) | ❌ No | context-retriever |
Eval Tests: evals/agents/meta/repo-manager/
Test Suites:
smoke-test.yaml - Basic functionalitycontext-loading-test.yaml - Lazy context loadingdelegation-test.yaml - Delegation decisions and session filesRun Tests:
cd evals/framework
npm run eval:sdk -- --agent=meta/repo-manager
Run Specific Test:
cd evals/framework
npm run eval:sdk -- --agent=meta/repo-manager --pattern="smoke-test.yaml"
| Aspect | v1.0 | v2.0 |
|---|---|---|
| Context Loading | Upfront (hardcoded paths) | Lazy (context-retriever) |
| Session Files | Always creates bundles | Only for complex tasks |
| Context Passing | Always via files | Smart (inline vs session) |
| Workflow Stages | 8 stages | 6 stages |
| Lines of Code | 763 lines | ~650 lines |
| Adaptability | Hardcoded paths | Dynamic discovery |
| Clarity | Over-specified | Clear decision trees |
Last Updated: 2025-01-14
Maintainer: opencode
Status: Stable
Version: 2.0.0