chore: install openagent opencode
Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
402
.opencode/context/openagents-repo/lookup/commands.md
Normal file
402
.opencode/context/openagents-repo/lookup/commands.md
Normal file
@@ -0,0 +1,402 @@
|
||||
<!-- Context: openagents-repo/lookup | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
|
||||
|
||||
# Lookup: Command Reference
|
||||
|
||||
**Purpose**: Quick reference for common commands
|
||||
|
||||
---
|
||||
|
||||
## Registry Commands
|
||||
|
||||
### Validate Registry
|
||||
|
||||
```bash
|
||||
# Basic validation
|
||||
./scripts/registry/validate-registry.sh
|
||||
|
||||
# Verbose output
|
||||
./scripts/registry/validate-registry.sh -v
|
||||
```
|
||||
|
||||
### Auto-Detect Components
|
||||
|
||||
```bash
|
||||
# Dry run (see what would change)
|
||||
./scripts/registry/auto-detect-components.sh --dry-run
|
||||
|
||||
# Add new components
|
||||
./scripts/registry/auto-detect-components.sh --auto-add
|
||||
|
||||
# Force update existing
|
||||
./scripts/registry/auto-detect-components.sh --auto-add --force
|
||||
```
|
||||
|
||||
### Validate Component Structure
|
||||
|
||||
```bash
|
||||
./scripts/registry/validate-component.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Testing Commands
|
||||
|
||||
### Run Tests
|
||||
|
||||
```bash
|
||||
# Single test
|
||||
cd evals/framework
|
||||
bun --bun run eval:sdk -- --agent={category}/{agent} --pattern="{test}.yaml"
|
||||
|
||||
# All tests for agent
|
||||
bun --bun run eval:sdk -- --agent={category}/{agent}
|
||||
|
||||
# All tests (all agents)
|
||||
bun --bun run eval:sdk
|
||||
|
||||
# With debug
|
||||
bun --bun run eval:sdk -- --agent={agent} --debug
|
||||
```
|
||||
|
||||
### Validate Test Suites
|
||||
|
||||
```bash
|
||||
./scripts/validation/validate-test-suites.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Installation Commands
|
||||
|
||||
### Install Components
|
||||
|
||||
```bash
|
||||
# List available components
|
||||
./install.sh --list
|
||||
|
||||
# Install profile
|
||||
./install.sh {profile}
|
||||
# Profiles: essential, developer, business
|
||||
|
||||
# Install specific component
|
||||
./install.sh --component agent:{agent-name}
|
||||
|
||||
# Test with local registry
|
||||
REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh --list
|
||||
```
|
||||
|
||||
### Collision Handling
|
||||
|
||||
```bash
|
||||
# Skip existing files
|
||||
./install.sh developer --skip-existing
|
||||
|
||||
# Overwrite all
|
||||
./install.sh developer --force
|
||||
|
||||
# Backup existing
|
||||
./install.sh developer --backup
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Version Commands
|
||||
|
||||
### Check Version
|
||||
|
||||
```bash
|
||||
# Check all version files
|
||||
cat VERSION
|
||||
cat package.json | jq '.version'
|
||||
cat registry.json | jq '.version'
|
||||
```
|
||||
|
||||
### Update Version
|
||||
|
||||
```bash
|
||||
# Update VERSION
|
||||
echo "0.X.Y" > VERSION
|
||||
|
||||
# Update package.json
|
||||
jq '.version = "0.X.Y"' package.json > tmp && mv tmp package.json
|
||||
|
||||
# Update registry.json
|
||||
jq '.version = "0.X.Y"' registry.json > tmp && mv tmp registry.json
|
||||
```
|
||||
|
||||
### Bump Version Script
|
||||
|
||||
```bash
|
||||
./scripts/versioning/bump-version.sh 0.X.Y
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Git Commands
|
||||
|
||||
### Create Release
|
||||
|
||||
```bash
|
||||
# Commit version changes
|
||||
git add VERSION package.json CHANGELOG.md
|
||||
git commit -m "chore: bump version to 0.X.Y"
|
||||
|
||||
# Create tag
|
||||
git tag -a v0.X.Y -m "Release v0.X.Y"
|
||||
|
||||
# Push
|
||||
git push origin main
|
||||
git push origin v0.X.Y
|
||||
```
|
||||
|
||||
### Create GitHub Release
|
||||
|
||||
```bash
|
||||
# Via GitHub CLI
|
||||
gh release create v0.X.Y \
|
||||
--title "v0.X.Y" \
|
||||
--notes "See CHANGELOG.md for details"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Validation Commands
|
||||
|
||||
### Full Validation
|
||||
|
||||
```bash
|
||||
# Validate everything
|
||||
./scripts/registry/validate-registry.sh && \
|
||||
./scripts/validation/validate-test-suites.sh && \
|
||||
cd evals/framework && bun --bun run eval:sdk
|
||||
```
|
||||
|
||||
### Check Context Dependencies
|
||||
|
||||
```bash
|
||||
# Analyze all agents
|
||||
/check-context-deps
|
||||
|
||||
# Analyze specific agent
|
||||
/check-context-deps contextscout
|
||||
|
||||
# Auto-fix missing dependencies
|
||||
/check-context-deps --fix
|
||||
```
|
||||
|
||||
### Validate Context References
|
||||
|
||||
```bash
|
||||
./scripts/validation/validate-context-refs.sh
|
||||
```
|
||||
|
||||
### Setup Pre-Commit Hook
|
||||
|
||||
```bash
|
||||
./scripts/validation/setup-pre-commit-hook.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Run Demo
|
||||
|
||||
```bash
|
||||
./scripts/development/demo.sh
|
||||
```
|
||||
|
||||
### Run Dashboard
|
||||
|
||||
```bash
|
||||
./scripts/development/dashboard.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Maintenance Commands
|
||||
|
||||
### Cleanup Stale Sessions
|
||||
|
||||
```bash
|
||||
./scripts/maintenance/cleanup-stale-sessions.sh
|
||||
```
|
||||
|
||||
### Uninstall
|
||||
|
||||
```bash
|
||||
./scripts/maintenance/uninstall.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Debugging Commands
|
||||
|
||||
### Check Sessions
|
||||
|
||||
```bash
|
||||
# List recent sessions
|
||||
ls -lt .tmp/sessions/ | head -5
|
||||
|
||||
# View session
|
||||
cat .tmp/sessions/{session-id}/session.json | jq
|
||||
|
||||
# View events
|
||||
cat .tmp/sessions/{session-id}/events.json | jq
|
||||
```
|
||||
|
||||
### Check Context Logs
|
||||
|
||||
```bash
|
||||
# Check session cache
|
||||
./scripts/check-context-logs/check-session-cache.sh
|
||||
|
||||
# Count agent tokens
|
||||
./scripts/check-context-logs/count-agent-tokens.sh
|
||||
|
||||
# Show API payload
|
||||
./scripts/check-context-logs/show-api-payload.sh
|
||||
|
||||
# Show cached data
|
||||
./scripts/check-context-logs/show-cached-data.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Workflows
|
||||
|
||||
### Adding a New Agent
|
||||
|
||||
```bash
|
||||
# 1. Create agent file
|
||||
touch .opencode/agent/{category}/{agent-name}.md
|
||||
# (Add frontmatter and content)
|
||||
|
||||
# 2. Create test structure
|
||||
mkdir -p evals/agents/{category}/{agent-name}/{config,tests}
|
||||
# (Create config.yaml and smoke-test.yaml)
|
||||
|
||||
# 3. Update registry
|
||||
./scripts/registry/auto-detect-components.sh --auto-add
|
||||
|
||||
# 4. Validate
|
||||
./scripts/registry/validate-registry.sh
|
||||
cd evals/framework && bun --bun run eval:sdk -- --agent={category}/{agent-name}
|
||||
```
|
||||
|
||||
### Testing an Agent
|
||||
|
||||
```bash
|
||||
# 1. Run smoke test
|
||||
cd evals/framework
|
||||
bun --bun run eval:sdk -- --agent={category}/{agent} --pattern="smoke-test.yaml"
|
||||
|
||||
# 2. If fails, debug
|
||||
bun --bun run eval:sdk -- --agent={category}/{agent} --debug
|
||||
|
||||
# 3. Check session
|
||||
ls -lt .tmp/sessions/ | head -1
|
||||
cat .tmp/sessions/{session-id}/session.json | jq
|
||||
```
|
||||
|
||||
### Creating a Release
|
||||
|
||||
```bash
|
||||
# 1. Update version
|
||||
echo "0.X.Y" > VERSION
|
||||
jq '.version = "0.X.Y"' package.json > tmp && mv tmp package.json
|
||||
|
||||
# 2. Update CHANGELOG
|
||||
# (Edit CHANGELOG.md)
|
||||
|
||||
# 3. Commit and tag
|
||||
git add VERSION package.json CHANGELOG.md
|
||||
git commit -m "chore: bump version to 0.X.Y"
|
||||
git tag -a v0.X.Y -m "Release v0.X.Y"
|
||||
|
||||
# 4. Push
|
||||
git push origin main
|
||||
git push origin v0.X.Y
|
||||
|
||||
# 5. Create GitHub release
|
||||
gh release create v0.X.Y --title "v0.X.Y" --notes "See CHANGELOG.md"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Patterns
|
||||
|
||||
### Find Files
|
||||
|
||||
```bash
|
||||
# Find agent
|
||||
find .opencode/agent -name "{agent-name}.md"
|
||||
|
||||
# Find tests
|
||||
find evals/agents -name "*.yaml"
|
||||
|
||||
# Find context
|
||||
find .opencode/context -name "*.md"
|
||||
|
||||
# Find scripts
|
||||
find scripts -name "*.sh"
|
||||
```
|
||||
|
||||
### Check Registry
|
||||
|
||||
```bash
|
||||
# List all agents
|
||||
cat registry.json | jq '.components.agents[].id'
|
||||
|
||||
# Check specific component
|
||||
cat registry.json | jq '.components.agents[] | select(.id == "{agent-name}")'
|
||||
|
||||
# Count components
|
||||
cat registry.json | jq '.components.agents | length'
|
||||
```
|
||||
|
||||
### Test Locally
|
||||
|
||||
```bash
|
||||
# Test with local registry
|
||||
REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh --list
|
||||
|
||||
# Install locally
|
||||
REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh developer
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## NPM Commands (Eval Framework)
|
||||
|
||||
```bash
|
||||
cd evals/framework
|
||||
|
||||
# Install dependencies
|
||||
bun --bun install
|
||||
|
||||
# Run tests
|
||||
bun --bun test
|
||||
|
||||
# Run eval SDK
|
||||
bun --bun run eval:sdk
|
||||
|
||||
# Build
|
||||
bun --bun run build
|
||||
|
||||
# Lint
|
||||
bun --bun run lint
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Related Files
|
||||
|
||||
- **Quick start**: `quick-start.md`
|
||||
- **File locations**: `lookup/file-locations.md`
|
||||
- **Guides**: `guides/`
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-12-10
|
||||
**Version**: 0.5.0
|
||||
312
.opencode/context/openagents-repo/lookup/file-locations.md
Normal file
312
.opencode/context/openagents-repo/lookup/file-locations.md
Normal file
@@ -0,0 +1,312 @@
|
||||
<!-- Context: openagents-repo/lookup | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
|
||||
|
||||
# Lookup: File Locations
|
||||
|
||||
**Purpose**: Quick reference for finding files
|
||||
|
||||
---
|
||||
|
||||
## Directory Tree
|
||||
|
||||
```
|
||||
opencode-agents/
|
||||
├── .opencode/
|
||||
│ ├── agent/
|
||||
│ │ ├── core/ # Core system agents
|
||||
│ │ ├── development/ # Dev specialists
|
||||
│ │ ├── content/ # Content creators
|
||||
│ │ ├── data/ # Data analysts
|
||||
│ │ ├── product/ # Product managers (ready)
|
||||
│ │ ├── learning/ # Educators (ready)
|
||||
│ │ └── subagents/ # Delegated specialists
|
||||
│ │ ├── code/ # Code-related
|
||||
│ │ ├── core/ # Core workflows
|
||||
│ │ ├── system-builder/ # System generation
|
||||
│ │ └── utils/ # Utilities
|
||||
│ ├── command/ # Slash commands
|
||||
│ ├── context/ # Shared knowledge
|
||||
│ │ ├── core/ # Core standards & workflows
|
||||
│ │ ├── development/ # Dev context
|
||||
│ │ ├── content-creation/ # Content creation context
|
||||
│ │ ├── data/ # Data context
|
||||
│ │ ├── product/ # Product context
|
||||
│ │ ├── learning/ # Learning context
|
||||
│ │ └── openagents-repo/ # Repo-specific context
|
||||
│ ├── prompts/ # Model-specific variants
|
||||
│ ├── tool/ # Custom tools
|
||||
│ └── plugin/ # Plugins
|
||||
├── evals/
|
||||
│ ├── framework/ # Eval framework (TypeScript)
|
||||
│ │ ├── src/ # Source code
|
||||
│ │ ├── scripts/ # Test utilities
|
||||
│ │ └── docs/ # Framework docs
|
||||
│ └── agents/ # Agent test suites
|
||||
│ ├── core/ # Core agent tests
|
||||
│ ├── development/ # Dev agent tests
|
||||
│ └── content/ # Content agent tests
|
||||
├── scripts/
|
||||
│ ├── registry/ # Registry management
|
||||
│ ├── validation/ # Validation tools
|
||||
│ ├── testing/ # Test utilities
|
||||
│ ├── versioning/ # Version management
|
||||
│ ├── docs/ # Doc tools
|
||||
│ └── maintenance/ # Maintenance
|
||||
├── docs/ # Documentation
|
||||
│ ├── agents/ # Agent docs
|
||||
│ ├── contributing/ # Contribution guides
|
||||
│ ├── features/ # Feature docs
|
||||
│ └── getting-started/ # User guides
|
||||
├── registry.json # Component catalog
|
||||
├── install.sh # Installer
|
||||
├── VERSION # Current version
|
||||
└── package.json # Node dependencies
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Where Is...?
|
||||
|
||||
| Component | Location |
|
||||
|-----------|----------|
|
||||
| **Core agents** | `.opencode/agent/core/` |
|
||||
| **Category agents** | `.opencode/agent/{category}/` |
|
||||
| **Subagents** | `.opencode/agent/subagents/` |
|
||||
| **Commands** | `.opencode/command/` |
|
||||
| **Context files** | `.opencode/context/` |
|
||||
| **Prompt variants** | `.opencode/prompts/{category}/{agent}/` |
|
||||
| **Tools** | `.opencode/tool/` |
|
||||
| **Plugins** | `.opencode/plugin/` |
|
||||
| **Agent tests** | `evals/agents/{category}/{agent}/` |
|
||||
| **Eval framework** | `evals/framework/src/` |
|
||||
| **Registry scripts** | `scripts/registry/` |
|
||||
| **Validation scripts** | `scripts/validation/` |
|
||||
| **Documentation** | `docs/` |
|
||||
| **Registry** | `registry.json` |
|
||||
| **Installer** | `install.sh` |
|
||||
| **Version** | `VERSION` |
|
||||
|
||||
---
|
||||
|
||||
## Where Do I Add...?
|
||||
|
||||
| What | Where |
|
||||
|------|-------|
|
||||
| **New core agent** | `.opencode/agent/core/{name}.md` |
|
||||
| **New category agent** | `.opencode/agent/{category}/{name}.md` |
|
||||
| **New subagent** | `.opencode/agent/subagents/{category}/{name}.md` |
|
||||
| **New command** | `.opencode/command/{name}.md` |
|
||||
| **New context** | `.opencode/context/{category}/{name}.md` |
|
||||
| **Agent tests** | `evals/agents/{category}/{agent}/tests/` |
|
||||
| **Test config** | `evals/agents/{category}/{agent}/config/config.yaml` |
|
||||
| **Documentation** | `docs/{section}/{topic}.md` |
|
||||
| **Script** | `scripts/{purpose}/{name}.sh` |
|
||||
|
||||
---
|
||||
|
||||
## Specific File Paths
|
||||
|
||||
### Core Files
|
||||
|
||||
```
|
||||
registry.json # Component catalog
|
||||
install.sh # Main installer
|
||||
update.sh # Update script
|
||||
VERSION # Current version (0.5.0)
|
||||
package.json # Node dependencies
|
||||
CHANGELOG.md # Release notes
|
||||
README.md # Main documentation
|
||||
```
|
||||
|
||||
### Core Agents
|
||||
|
||||
```
|
||||
.opencode/agent/core/openagent.md
|
||||
.opencode/agent/core/opencoder.md
|
||||
.opencode/agent/meta/system-builder.md
|
||||
```
|
||||
|
||||
### Development Agents
|
||||
|
||||
```
|
||||
.opencode/agent/subagents/development/frontend-specialist.md
|
||||
.opencode/agent/subagents/development/devops-specialist.md
|
||||
```
|
||||
|
||||
### Content Agents
|
||||
|
||||
```
|
||||
.opencode/agent/content/copywriter.md
|
||||
.opencode/agent/content/technical-writer.md
|
||||
```
|
||||
|
||||
### Key Subagents
|
||||
|
||||
```
|
||||
.opencode/agent/subagents/code/test-engineer.md
|
||||
.opencode/agent/subagents/code/reviewer.md
|
||||
.opencode/agent/subagents/code/coder-agent.md
|
||||
.opencode/agent/subagents/core/task-manager.md
|
||||
.opencode/agent/subagents/core/documentation.md
|
||||
```
|
||||
|
||||
### Core Context
|
||||
|
||||
```
|
||||
.opencode/context/core/standards/code-quality.md
|
||||
.opencode/context/core/standards/documentation.md
|
||||
.opencode/context/core/standards/test-coverage.md
|
||||
.opencode/context/core/standards/security-patterns.md
|
||||
.opencode/context/core/workflows/task-delegation-basics.md
|
||||
.opencode/context/core/workflows/code-review.md
|
||||
```
|
||||
|
||||
### Registry Scripts
|
||||
|
||||
```
|
||||
scripts/registry/validate-registry.sh
|
||||
scripts/registry/auto-detect-components.sh
|
||||
scripts/registry/register-component.sh
|
||||
scripts/registry/validate-component.sh
|
||||
```
|
||||
|
||||
### Validation Scripts
|
||||
|
||||
```
|
||||
scripts/validation/validate-context-refs.sh
|
||||
scripts/validation/validate-test-suites.sh
|
||||
scripts/validation/setup-pre-commit-hook.sh
|
||||
```
|
||||
|
||||
### Eval Framework
|
||||
|
||||
```
|
||||
evals/framework/src/sdk/ # Test runner
|
||||
evals/framework/src/evaluators/ # Rule evaluators
|
||||
evals/framework/src/collector/ # Session collection
|
||||
evals/framework/src/types/ # TypeScript types
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Path Patterns
|
||||
|
||||
### Agents
|
||||
|
||||
```
|
||||
.opencode/agent/{category}/{agent-name}.md
|
||||
```
|
||||
|
||||
**Examples**:
|
||||
- `.opencode/agent/subagents/development/frontend-specialist.md`
|
||||
- `.opencode/agent/subagents/code/test-engineer.md`
|
||||
|
||||
### Context
|
||||
|
||||
```
|
||||
.opencode/context/{category}/{topic}.md
|
||||
```
|
||||
|
||||
**Examples**:
|
||||
- `.opencode/context/core/standards/code-quality.md`
|
||||
- `.opencode/context/ui/web/react-patterns.md`
|
||||
- `.opencode/context/content-creation/principles/copywriting-frameworks.md`
|
||||
|
||||
### Tests
|
||||
|
||||
```
|
||||
evals/agents/{category}/{agent-name}/
|
||||
├── config/config.yaml
|
||||
└── tests/{test-name}.yaml
|
||||
```
|
||||
|
||||
**Examples**:
|
||||
- `evals/agents/core/openagent/tests/smoke-test.yaml`
|
||||
- `evals/agents/development/frontend-specialist/tests/approval-gate.yaml`
|
||||
|
||||
### Scripts
|
||||
|
||||
```
|
||||
scripts/{purpose}/{action}-{target}.sh
|
||||
```
|
||||
|
||||
**Examples**:
|
||||
- `scripts/registry/validate-registry.sh`
|
||||
- `scripts/validation/validate-test-suites.sh`
|
||||
- `scripts/versioning/bump-version.sh`
|
||||
|
||||
---
|
||||
|
||||
## Naming Conventions
|
||||
|
||||
### Files
|
||||
|
||||
- **Agents**: `{name}.md` or `{domain}-specialist.md`
|
||||
- **Context**: `{topic}.md`
|
||||
- **Tests**: `{test-name}.yaml`
|
||||
- **Scripts**: `{action}-{target}.sh`
|
||||
- **Docs**: `{topic}.md`
|
||||
|
||||
### Directories
|
||||
|
||||
- **Categories**: lowercase, singular (e.g., `development`, `content`)
|
||||
- **Purposes**: lowercase, descriptive (e.g., `registry`, `validation`)
|
||||
|
||||
---
|
||||
|
||||
## Quick Lookups
|
||||
|
||||
### Find Agent File
|
||||
|
||||
```bash
|
||||
# By name
|
||||
find .opencode/agent -name "{agent-name}.md"
|
||||
|
||||
# By category
|
||||
ls .opencode/agent/{category}/
|
||||
|
||||
# All agents
|
||||
find .opencode/agent -name "*.md" -not -path "*/subagents/*"
|
||||
```
|
||||
|
||||
### Find Test File
|
||||
|
||||
```bash
|
||||
# By agent
|
||||
ls evals/agents/{category}/{agent}/tests/
|
||||
|
||||
# All tests
|
||||
find evals/agents -name "*.yaml"
|
||||
```
|
||||
|
||||
### Find Context File
|
||||
|
||||
```bash
|
||||
# By category
|
||||
ls .opencode/context/{category}/
|
||||
|
||||
# All context
|
||||
find .opencode/context -name "*.md"
|
||||
```
|
||||
|
||||
### Find Script
|
||||
|
||||
```bash
|
||||
# By purpose
|
||||
ls scripts/{purpose}/
|
||||
|
||||
# All scripts
|
||||
find scripts -name "*.sh"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Related Files
|
||||
|
||||
- **Quick start**: `quick-start.md`
|
||||
- **Categories**: `core-concepts/categories.md`
|
||||
- **Commands**: `lookup/commands.md`
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-12-10
|
||||
**Version**: 0.5.0
|
||||
40
.opencode/context/openagents-repo/lookup/navigation.md
Normal file
40
.opencode/context/openagents-repo/lookup/navigation.md
Normal file
@@ -0,0 +1,40 @@
|
||||
<!-- Context: openagents-repo/navigation | Priority: critical | Version: 1.0 | Updated: 2026-02-15 -->
|
||||
|
||||
# OpenAgents Lookup
|
||||
|
||||
**Purpose**: Quick reference and lookup tables for OpenAgents Control
|
||||
|
||||
---
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
openagents-repo/lookup/
|
||||
├── navigation.md (this file)
|
||||
└── [lookup reference files]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Routes
|
||||
|
||||
| Task | Path |
|
||||
|------|------|
|
||||
| **View lookups** | `./` |
|
||||
| **Guides** | `../guides/navigation.md` |
|
||||
| **Core Concepts** | `../core-concepts/navigation.md` |
|
||||
|
||||
---
|
||||
|
||||
## By Type
|
||||
|
||||
**Quick Reference** → Fast lookup tables and commands
|
||||
**Checklists** → Verification and validation checklists
|
||||
|
||||
---
|
||||
|
||||
## Related Context
|
||||
|
||||
- **OpenAgents Navigation** → `../navigation.md`
|
||||
- **Guides** → `../guides/navigation.md`
|
||||
- **Core Concepts** → `../core-concepts/navigation.md`
|
||||
@@ -0,0 +1,78 @@
|
||||
<!-- Context: openagents-repo/lookup | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
|
||||
|
||||
# Lookup: Subagent Framework Maps
|
||||
|
||||
**Purpose**: Quick reference for adding subagents to eval framework
|
||||
**Last Updated**: 2026-01-09
|
||||
|
||||
---
|
||||
|
||||
## Critical: THREE Maps Must Be Updated
|
||||
|
||||
When adding a new subagent, update these THREE locations:
|
||||
|
||||
### 1. Parent Map (run-sdk-tests.ts ~line 336)
|
||||
**Purpose**: Maps subagent → parent agent for delegation testing
|
||||
|
||||
```typescript
|
||||
const subagentParentMap: Record<string, string> = {
|
||||
'contextscout': 'openagent', // Core subagents → openagent
|
||||
'task-manager': 'openagent',
|
||||
'documentation': 'openagent',
|
||||
|
||||
'coder-agent': 'opencoder', // Code subagents → opencoder
|
||||
'tester': 'opencoder',
|
||||
'reviewer': 'opencoder',
|
||||
};
|
||||
```
|
||||
|
||||
### 2. Path Map (run-sdk-tests.ts ~line 414)
|
||||
**Purpose**: Maps subagent name → file path for test discovery
|
||||
|
||||
```typescript
|
||||
const subagentPathMap: Record<string, string> = {
|
||||
'contextscout': 'ContextScout',
|
||||
'task-manager': 'TaskManager',
|
||||
'coder-agent': 'CoderAgent',
|
||||
};
|
||||
```
|
||||
|
||||
### 3. Agent Map (test-runner.ts ~line 238)
|
||||
**Purpose**: Maps subagent name → agent file for eval-runner
|
||||
|
||||
```typescript
|
||||
const agentMap: Record<string, string> = {
|
||||
'contextscout': 'ContextScout.md',
|
||||
'task-manager': 'TaskManager.md',
|
||||
'coder-agent': 'CoderAgent.md',
|
||||
};
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Messages
|
||||
|
||||
| Error | Missing From | Fix |
|
||||
|-------|--------------|-----|
|
||||
| "No test files found" | Path Map (#2) | Add to `subagentPathMap` |
|
||||
| "Unknown subagent" | Parent Map (#1) | Add to `subagentParentMap` |
|
||||
| "Agent file not found" | Agent Map (#3) | Add to `agentMap` |
|
||||
|
||||
---
|
||||
|
||||
## Testing Commands
|
||||
|
||||
```bash
|
||||
# Standalone mode (forces mode: primary)
|
||||
bun --bun run eval:sdk -- --subagent=contextscout
|
||||
|
||||
# Delegation mode (tests via parent)
|
||||
bun --bun run eval:sdk -- --subagent=contextscout --delegate
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- `guides/testing-subagents.md` - Full testing guide
|
||||
- `guides/adding-agent.md` - Creating new agents
|
||||
@@ -0,0 +1,194 @@
|
||||
<!-- Context: openagents-repo/lookup | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
|
||||
|
||||
# Subagent Testing Commands - Quick Reference
|
||||
|
||||
**Purpose**: Quick command reference for testing subagents
|
||||
|
||||
**Last Updated**: 2026-01-07
|
||||
|
||||
---
|
||||
|
||||
## Standalone Mode (Unit Testing)
|
||||
|
||||
### Run All Standalone Tests
|
||||
```bash
|
||||
cd evals/framework
|
||||
bun --bun run eval:sdk -- --subagent=ContextScout --pattern="standalone/*.yaml"
|
||||
```
|
||||
|
||||
### Run Single Test
|
||||
```bash
|
||||
bun --bun run eval:sdk -- --subagent=ContextScout --pattern="standalone/01-simple-discovery.yaml"
|
||||
```
|
||||
|
||||
### Debug Mode
|
||||
```bash
|
||||
bun --bun run eval:sdk -- --subagent=ContextScout --pattern="standalone/*.yaml" --debug
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Delegation Mode (Integration Testing)
|
||||
|
||||
### Run Delegation Tests
|
||||
```bash
|
||||
bun --bun run eval:sdk -- --agent=core/openagent --pattern="delegation/*.yaml"
|
||||
```
|
||||
|
||||
### Test Specific Delegation
|
||||
```bash
|
||||
bun --bun run eval:sdk -- --agent=core/openagent --pattern="delegation/01-contextscout-delegation.yaml"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Verification Commands
|
||||
|
||||
### Check Agent File
|
||||
```bash
|
||||
# View agent frontmatter
|
||||
head -30 .opencode/agent/subagents/core/contextscout.md
|
||||
|
||||
# Check tool permissions
|
||||
grep -A 10 "^tools:" .opencode/agent/subagents/core/contextscout.md
|
||||
```
|
||||
|
||||
### Check Test Config
|
||||
```bash
|
||||
cat evals/agents/ContextScout/config/config.yaml
|
||||
```
|
||||
|
||||
### View Latest Results
|
||||
```bash
|
||||
# Summary
|
||||
cat evals/results/latest.json | jq '.summary'
|
||||
|
||||
# Agent loaded
|
||||
cat evals/results/latest.json | jq '.meta.agent'
|
||||
|
||||
# Tool calls
|
||||
cat evals/results/latest.json | jq '.tests[0]' | grep -A 5 "Tool"
|
||||
|
||||
# Violations
|
||||
cat evals/results/latest.json | jq '.tests[0].violations'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Test Patterns
|
||||
|
||||
### Smoke Test
|
||||
```bash
|
||||
bun --bun run eval:sdk -- --subagent=ContextScout --pattern="smoke-test.yaml"
|
||||
```
|
||||
|
||||
### Specific Test Suite
|
||||
```bash
|
||||
bun --bun run eval:sdk -- --subagent=ContextScout --pattern="discovery/*.yaml"
|
||||
```
|
||||
|
||||
### All Tests for Subagent
|
||||
```bash
|
||||
bun --bun run eval:sdk -- --subagent=ContextScout
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Flag Reference
|
||||
|
||||
| Flag | Purpose | Example |
|
||||
|------|---------|---------|
|
||||
| `--subagent` | Test subagent in standalone mode | `--subagent=ContextScout` |
|
||||
| `--agent` | Test primary agent (or delegation) | `--agent=core/openagent` |
|
||||
| `--pattern` | Filter test files | `--pattern="standalone/*.yaml"` |
|
||||
| `--debug` | Show detailed output | `--debug` |
|
||||
| `--timeout` | Override timeout | `--timeout=120000` |
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting Commands
|
||||
|
||||
### Check Which Agent Ran
|
||||
```bash
|
||||
# Should show subagent name for standalone mode
|
||||
cat evals/results/latest.json | jq '.meta.agent'
|
||||
```
|
||||
|
||||
### Check Tool Usage
|
||||
```bash
|
||||
# Should show tool calls > 0
|
||||
cat evals/results/latest.json | jq '.tests[0]' | grep "Tool Calls"
|
||||
```
|
||||
|
||||
### View Test Timeline
|
||||
```bash
|
||||
# See full conversation
|
||||
cat evals/results/history/2026-01/07-*.json | jq '.tests[0].timeline'
|
||||
```
|
||||
|
||||
### Check for Errors
|
||||
```bash
|
||||
# View violations
|
||||
cat evals/results/latest.json | jq '.tests[0].violations.details'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## File Locations
|
||||
|
||||
### Agent Files
|
||||
```
|
||||
.opencode/agent/subagents/core/{subagent}.md
|
||||
```
|
||||
|
||||
### Test Files
|
||||
```
|
||||
evals/agents/subagents/core/{subagent}/
|
||||
├── config/config.yaml
|
||||
└── tests/
|
||||
├── standalone/
|
||||
│ ├── 01-simple-discovery.yaml
|
||||
│ └── 02-advanced-test.yaml
|
||||
└── delegation/
|
||||
└── 01-delegation-test.yaml
|
||||
```
|
||||
|
||||
### Results
|
||||
```
|
||||
evals/results/
|
||||
├── latest.json # Latest test run
|
||||
└── history/2026-01/ # Historical results
|
||||
└── 07-HHMMSS-{agent}.json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Checks
|
||||
|
||||
### Is Agent Loaded Correctly?
|
||||
```bash
|
||||
# Should show: "agent": "ContextScout"
|
||||
cat evals/results/latest.json | jq '.meta.agent'
|
||||
```
|
||||
|
||||
### Did Agent Use Tools?
|
||||
```bash
|
||||
# Should show: Tool Calls: 1 (or more)
|
||||
cat evals/results/latest.json | jq '.tests[0]' | grep "Tool Calls"
|
||||
```
|
||||
|
||||
### Did Test Pass?
|
||||
```bash
|
||||
# Should show: "passed": 1, "failed": 0
|
||||
cat evals/results/latest.json | jq '.summary'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- `concepts/subagent-testing-modes.md` - Understand testing modes
|
||||
- `guides/testing-subagents.md` - Step-by-step testing guide
|
||||
- `errors/tool-permission-errors.md` - Fix common issues
|
||||
|
||||
**Reference**: `evals/framework/src/sdk/run-sdk-tests.ts`
|
||||
Reference in New Issue
Block a user