How dreamrunnermoshi/gru_minion works
Gru & Minion is a two-tier agent harness for benchmark tasks: a frontier-model planner can reason, independently run checks, finish, or delegate bounded work to a cheaper model. The session wires the models and shared test environment; benchmark-specific adapters define task setup, submission and scoring. Results include per-role usage, cost, cache and localization analysis, with a separate Claude Code plugin path. The README documents benchmark and plugin capabilities not present in the supplied tree, and excerpts do not expose every runtime call; those links are omitted or marked unverified rather than inferred.
Main entry points: session.py Session wiring · gru/model.py Gru model · environment.py Action environment · minion/model.py Minion model
Components 20
Entry and session
- Session CLI
orchestrator/run_session.py - Session wiring
orchestrator/session.py - Config loading
orchestrator/configs.py
Gru planning
- Gru model
orchestrator/gru/model.py - Action parsing
orchestrator/gru/toolcall.py - Action environment
orchestrator/gru/environment.py - Gru prompts
orchestrator/gru/prompts.py
Minion execution
- Delegation runner
orchestrator/minion/runner.py - Minion model
orchestrator/minion/model.py
Benchmarks and analysis
- Benchmark adapters
orchestrator/benchmarks - Cost context
orchestrator/metrics/cost_context.py - Token and cache metrics
orchestrator/metrics/token_usage.py - Real cost accounting
orchestrator/metrics/real_cost.py - Localization coverage
orchestrator/metrics/coverage.py - Run analysis
orchestrator/analyze_run.py
Plugin integration
- Gru Minion skill
plugins/gru-minion/skills/gru-minion - Delegate CLI
orchestrator/delegate.py
Other components
- Task operator
- Claude Code user
- Model provider
Connections 22
- Task operator → Session CLI: starts run
README.md - Session CLI → Session wiring: builds session
orchestrator/run_session.py - Session wiring → Config loading: loads configs
orchestrator/session.py - Session wiring → Gru model: constructs
orchestrator/session.py - Session wiring → Delegation runner: constructs
orchestrator/session.py - Session wiring → Action environment: constructs
orchestrator/session.py - Session wiring → Benchmark adapters: uses benchmark
orchestrator/session.py - Gru model → Action parsing: parses actions
orchestrator/gru/model.py - Action environment → Delegation runner: runs delegation
orchestrator/gru/environment.py - Action environment → Benchmark adapters: submits result
- Session wiring → Cost context: provides context
orchestrator/session.py - Session wiring → Token and cache metrics: extracts usage
orchestrator/session.py - Gru model → Real cost accounting: prices response
orchestrator/gru/model.py - Minion model → Real cost accounting: prices response
orchestrator/minion/model.py - Delegation runner → Minion model: builds model
orchestrator/minion/runner.py - Claude Code user → Gru Minion skill: invokes skill
README.md - Gru Minion skill → Delegate CLI: drives delegate
- Task operator → Delegate CLI: runs delegate
README.md - Gru model → Model provider: requests completions
- Minion model → Model provider: requests completions
- Benchmark adapters → Localization coverage: scores localization
- Run analysis → Localization coverage: uses coverage
orchestrator/analyze_run.py