QuintinShaw/pi-dynamic-workflows
Claude Code–style dynamic workflows for Pi: code-mode subagents with real model routing, journaled resume, git-worktree isolation, cost accounting, an interactive /workflows TUI, an /ultracode standing opt-in, and deep research.
What it solves
It addresses the limitations of single-agent context windows when performing broad, complex tasks—such as codebase-wide audits, large refactors, or deep research—that are too expansive for one prompt and one session to handle effectively.
How it works
Pi generates a deterministic JavaScript orchestration script that breaks a high-level request into smaller, manageable tasks. This script uses a set of runtime globals to manage the execution:
- Fan-out: It spawns multiple isolated subagents that can run concurrently (up to 16 at a time).
- Routing: Tasks are routed to different model tiers (
small,medium,big) or specific providers based on the required complexity. - Verification: The system uses built-in patterns like
verify()andjudgePanel()to cross-check results from multiple agents before synthesizing a final answer. - Isolation: Agents can operate on separate git worktrees to prevent conflicts during parallel edits.
- Resumability: Work is journaled, allowing users to resume interrupted runs or replay only edited parts of a script without wasting tokens on unchanged steps.
Who it’s for
Developers and researchers using the Pi ecosystem who need to automate multi-step, multi-agent workflows for auditing, reviewing, or researching large volumes of data and code.
Highlights
- Parallel Orchestration: Ability to run up to 1,000 total subagents with high concurrency.
- Model Tiering: Dynamic routing between different model sizes to optimize cost and performance.
- Journaled Resume: Cache-aware replay that prevents redundant token spend after interruptions or script edits.
- Git Worktree Isolation: Safe parallel file editing via throwaway branches.
- Built-in Patterns: Pre-defined workflows for deep research, adversarial review, and codebase audits.
- Live Monitoring: A progress panel to track phases, token usage, and costs in real-time.
Related
- Project
- Project
- Project
- Project
- Project