skills/workflows/forge-orchestrate/SKILL.md
# Forge Orchestrate — Intelligent Build Orchestration You are a build planner, not a build executor. Your job is to look at a project, figure out what's left to build, decompose the work into parallel streams, assign the right intelligence level to each stream, estimate cost, and hand the user a set of terminal commands they can run. You plan. They execute. --- ## Stream Decomposition The unit of parallelism is a **stream** — a self-contained bundle of tasks that one Claude session handles e
npx skillsauth add 33prime/rtg-forge skills/workflows/forge-orchestrateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a build planner, not a build executor. Your job is to look at a project, figure out what's left to build, decompose the work into parallel streams, assign the right intelligence level to each stream, estimate cost, and hand the user a set of terminal commands they can run. You plan. They execute.
The unit of parallelism is a stream — a self-contained bundle of tasks that one Claude session handles end to end.
Rules:
Match intelligence to ambiguity. The goal is cost efficiency — use the cheapest model that won't get stuck.
| Model | When to use | Signals | |-------|------------|---------| | Opus | Architectural decisions, complex refactors, security-critical code, novel integrations, 10+ files across 3+ directories | High ambiguity, no established pattern to follow, design decisions required | | Sonnet | Standard feature work, API endpoints, UI components, established patterns, 3–9 files | Clear requirements, existing patterns to follow, moderate complexity | | Haiku | Tests, docs, boilerplate, config files, type definitions, ≤3 files | Templates exist, copy-and-adapt, low ambiguity, mechanical work |
The stream gets the highest model needed by any task in it. Claude CLI uses one model per session. If a stream has nine Haiku tasks and one Opus task, the stream runs on Opus. This means grouping matters — don't contaminate a Haiku stream with one complex task.
Always overestimate. Hitting a budget ceiling mid-task is catastrophically worse than spending 80% of a generous budget.
Formula per task:
tokens = iterations × (context_tokens + output_tokens)
cost = (input_tokens × input_rate × cache_discount) + (output_tokens × output_rate)
Complexity tiers:
| Complexity | Iterations | Context | Output | |-----------|-----------|---------|--------| | Low | 3 | 20K | 4K | | Medium | 8 | 40K | 8K | | High | 15 | 80K | 12K |
Model rates (per 1M tokens):
| Model | Input | Output | |-------|-------|--------| | Opus | $15 | $75 | | Sonnet | $3 | $15 | | Haiku | $0.80 | $4 |
Apply 60% prompt cache discount on input tokens (conservative — real cache rates vary). Apply 1.5× safety factor to the final estimate. Recommend --max-budget-usd at conservative × 1.2.
.forge/ DirectoryThe orchestrator creates a .forge/ directory in the target project as the orchestration control plane:
.forge/
├── orchestrator.toml # Master state: streams, models, budgets, status
├── work-inventory.md # All discovered tasks with details
├── stream-1-plan.md # Per-stream plan (ralph-compatible checkboxes)
├── stream-2-plan.md
├── ...
├── progress.md # Cross-stream progress tracker
└── manifest.toml # (existing — module installations)
Each stream plan includes file ownership constraints so the Claude session knows which files it may and may not touch.
Running all streams on Opus "because it's smarter." This wastes 5–15× the budget on streams that are pure boilerplate. Most real projects have at most 1–2 Opus-grade streams.
Decomposing into 8 parallel streams for a medium project. Each stream needs a worktree, a terminal, mental overhead to monitor, and a merge phase. Past 5 streams, you're spending more time coordinating than building.
Letting two streams modify the same files and hoping merge will sort it out. It won't. Overlapping file ownership is the #1 cause of orchestration failure. If you can't give a file to exactly one stream, restructure the streams.
Estimating costs assuming everything goes right on the first try. Real-world sessions hit edge cases, retry, refactor, and debug. The 1.5× safety factor exists because tasks always take longer than the happy path.
Putting "all tests" in one stream and "all components" in another. This creates maximum cross-stream dependencies because tests depend on the components they test. Group by domain so each stream owns its slice of the stack.
development
# Parallel Execution > This skill is under development. Workflow patterns for running independent tasks in parallel to improve performance and throughput. ## Topics to Cover - Identifying independent tasks suitable for parallel execution - `asyncio.gather()` with `return_exceptions=True` - `asyncio.TaskGroup` for structured concurrency (Python 3.11+) - Semaphores for bounded concurrency - `Promise.all()` and `Promise.allSettled()` in TypeScript - Handling partial failures (some tasks succeed
development
# Module Extraction > This skill is under development. Workflow for identifying and extracting reusable modules from existing codebases. Extract when a pattern is used in 3+ places and has stabilized. ## Topics to Cover - Identifying extraction candidates (rule of three) - Defining module boundaries and public interface - Dependency analysis: what does the module need? - Interface design: protocols, abstract base classes - Step-by-step extraction process - Testing strategy: tests before, dur
development
# Code Review > This skill is under development. Workflow for conducting effective code reviews that catch real issues and improve code quality. ## Topics to Cover - Review priorities: correctness > design > performance > style - What to check in every review (checklist) - How to give constructive feedback - Automated checks that should run before human review - Review scope: how big is too big? - Patterns for reviewing database migrations - Patterns for reviewing API changes - When to reque
development
# Vite + React Architecture > This skill is under development. Patterns for building Vite+React SPAs: project structure, routing, data fetching, state management, build optimization. ## Topics to Cover - Project structure conventions (`src/`, `pages/`, `components/`, `hooks/`, `lib/`) - React Router v6+ with lazy-loaded routes - Data fetching patterns (TanStack Query integration) - State management tiers (local, shared, server) - Vite configuration: path aliases, env variables, proxy, build