From gir-core
Auto-delegation and task prioritization rules for Claude Code. Determines when to use subagents, which agent to delegate to, and how to break down complex tasks. Apply when planning work, starting new tasks, or when a task involves multiple concerns.
npx claudepluginhub rivit-studio/gir --plugin gir-coreThis skill uses the workspace's default tool permissions.
> Auto-Delegation & Prioritization Rules — Optimal subagent usage
Orchestrates subagents by delegating tasks to role-matched specialists like engineer, reviewer, analyst for multi-agent coding workflows.
Executes development work from plans, tasks, or prompts with optional experimental Codex delegation for token-conserving code implementation. Beta of spec-work; manual invocation for delegation trials.
Share bugs, ideas, or general feedback.
Auto-Delegation & Prioritization Rules — Optimal subagent usage
Goal: Maximize token efficiency via predictable agent delegation.
Benefits: Consistent usage, 60-80% token savings, reduced cognitive load, predictable behavior
When: Complex tasks (>3 steps), architecture, debugging, refactors (3+ files), feature design, optimization, security, migrations
Why: 60-80% token savings, prevents re-planning
"Using sequential-thinking to analyze approach..."
[Reasoning]
"Complete. Key insights: [summary]"
When: Before git commit, completing major tasks, finishing features
Why: Catches issues before git history
"Deploying code-reviewer before commit..."
[Review]
"Complete. 2 suggestions, 0 critical issues."
When: Task involves >5 files, "where is..." / "how does..." questions, mapping codebase
Skip: <5 files, user provided paths, simple codebase (<20 files)
"Task requires 12 files. Deploying Explore agent..."
[Exploration]
"Found 3 relevant modules: auth/, api/, db/"
When: >2 independent tasks, multiple unrelated features, non-overlapping modules, feature + tests simultaneously
Why: Isolated execution, concurrent development, no merge conflicts during work
Limit: Practical limit ~5 parallel tasks (depends on system resources)
Override: "do sequentially", "use single worktree"
"Identified 3 independent tasks. Using Subtask for parallel execution..."
[Draft subtasks]
"Subagents spawned. Monitor with: subtask list"
When: >8 TodoWrite items, multiple approaches, cross-system integration
Override: "skip plan agent"
When: >2 independent tasks within same worktree, quick parallel investigations
Limit: Max 3 parallel agents
Override: "do sequentially"
Note: Prefer Subtask over Parallel Agents when tasks modify files (isolation prevents conflicts)
When: No obvious cause, multi-system issue, specific reproduction conditions
Override: "let me debug"
When: Clear completion criteria (tests pass, build succeeds), iterative work, TDD
Skip: Needs human judgment, ambiguous requirements, unpredictable iterations
Override: "I'll handle iterations"
"Using Ralph loop with criteria:
- Tests pass, build succeeds, integration verified
[Iterations]
Ralph loop complete. Task verified."
Keep in main context:
CRITICAL (Blockers): DB schema, auth setup, type defs, env/config, deps
HIGH (Core): API endpoints, DB queries, business logic, integrations, error handling
MEDIUM (Features): UI components, forms, loading states, feedback, responsive design
LOW (Polish): Animations, optimization, cleanup, extra error messages, docs
Mandatory (Tier 1): Brief announcement, proceed
"Deploying [agent] for [reason]..."
[Work]
"Complete. [Key findings]."
Recommended (Tier 2): Explain why, announce, report
"Feature has 12 steps. Deploying Plan agent..."
[Work]
"Complete. Recommended approach: [summary]"
Add to CLAUDE-project.md:
delegation:
mode: "balanced" # aggressive | balanced | minimal
auto_explore_threshold: 5
auto_plan_threshold: 8
auto_parallel_threshold: 2
max_parallel_agents: 3
always_code_review: true
always_sequential_thinking: true
Modes:
During execution: Escape (stop), Type message (read after), Double-Escape (halt/discard)
Before deployment: "skip that", "I'll handle it", Escape
After completion: "ignore that", "try different approach"
Explore: IF >5 files → AUTO Explore agent, ELSE manual read
Plan: ALWAYS sequential-thinking, IF >8 items → RECOMMENDED Plan agent, IF >2 independent file-modifying tasks → CONSIDER Subtask
Code: IF >2 independent file-modifying → RECOMMENDED Subtask (parallel worktrees), IF read-only/quick → parallel agents, Gemini-CLI for boilerplate
Commit: ALWAYS code-reviewer, then commit in main (or per-subtask commits)
Auto-analyze: task dependencies, independent tasks (parallel-eligible), complexity, priority order
| Agent | Trigger | Tier | Skip? |
|---|---|---|---|
| Sequential-Thinking | Complex planning | Mandatory | Trivial only |
| Code-Reviewer | Before commit | Mandatory | Emergency only |
| Explore | >5 files | Mandatory | <5 files |
| Subtask | >2 independent, file-modifying | Recommended | "do sequentially" |
| Plan | >8 items | Recommended | "skip plan agent" |
| Parallel (in-context) | >2 independent, read-only | Recommended | "do sequentially" |
| Debugger | Complex bug | Recommended | "let me debug" |
| Ralph Loop | Clear criteria | Recommended | "I'll iterate" |
CRITICAL (Dependencies) → HIGH (Core) → MEDIUM (Features) → LOW (Polish)
Version: 1.1 (2026-01-23)