SKILL.md spec for a coding agent — a prompt pack, not a shipped product.
orchestrate-flow
Coordinates plan, issues, implementation, and review as a skill graph
The zip contains SKILL.md, the reference notes, and the scripts.
Unzip it into the folder your agent loads skills from. For Grok, that is ~/.grok/skills/.
Keep the folder name so SKILL.md stays at the top of that folder, then start a new chat and use the command above.
- ✓ When executing an entire software development lifecycle autonomously from idea to production-grade code.
- ✓ When coordinating multiple specialized skills (planning, issue generation, implementation, deep research, and code review) into a unified graph.
- ✓ When managing parallel subagents working across independent GitHub issues without context pollution.
- ✓ When progress.json must survive a stopped chat so a later run can continue unfinished issues.
Trigger: Manual activation only (`invoke_subagent('orchestrate-flow')`). Never triggered autonomously without explicit user instruction. One named issue is execute-issues.
"Orchestrate the development flow for our new microservice feature."
Directed Acyclic Skill Graph (DAG) with Dynamic Subagent Spawning
Handoff at the earlier of 40% of the reported window and 250,000 tokens. The run's own usage report is the measurement.
issues-graph.json is the DAG. progress.json and progress/<id>.md are the memory a fresh run reads.
Reference Specifications (`references/`)
Defines the full skill dependency graph, node roles (root, mid, leaf, support), and edge data flows.
Contains deterministic decision trees routing user requests to the optimal entry point in the skill graph.
Pool, phases, and the commands that advance every ready issue.
Handoff shape and the context rule shared with execute-issues.
Which file each skill writes, and who reads it next.
Tester, implementer, reviewer, and elevator. Commit shape lives here.
Executive Overview
In real-world software engineering, naive monolithic AI prompts fail as systems scale: single-prompt contexts overflow, hallucinations compound, and debugging automated changes becomes impossible.
orchestrate-flow is an autonomous meta-skill designed to treat the entire software development lifecycle as a Directed Acyclic Graph (DAG) of specialized subagents. Instead of asking a single model instance to write an entire system, orchestrate-flow coordinates specialized skill nodes:
[hunt-feature / navigate-compass] --> Strategy & Architectural Planning
↓
[split-plan] --> Plan to GitHub Issue DAG Compilation
↓
[orchestrate-flow] --> Every ready issue, layer by layer
[execute-issues] --> One named issue, same phase scripts
↙ ↓ ↘
[Tester] [Implementer] [Reviewer] --> One phase at a time, fresh chat
↓ ↓
[dig-deep] [elevate-code] --> On-Demand Research & Quality Gatekeeping
The 4-Node Skill Graph Topology
The orchestration graph models development stages as distinct node types with explicit data dependencies:
1. Root Nodes (Strategy & Planning)
navigate-compass: Conducts adaptive consultant interviews to map user intent, technical constraints, and data models intodocs/plan/plan.mdandplan-graph.json.hunt-feature: Reads the repo against a gap checklist and cites docs and engineering blogs. A job ad can illustrate hiring language. It is not a source the skill scans.
2. Mid Node (Decomposition & Compilation)
split-plan: Consumesdocs/plan/plan.md, analyzes task complexity, and compiles the plan into actionable, self-contained GitHub issues with topological layers.
3. Execution
orchestrate-flow: Walks every ready issue.progress.py nextchooses the work.execute-issues: The same phase scripts for one id. It does not callnext. Dependencies must already be accepted.
4. Support Nodes (On-Demand Lifecycle Subagents)
dig-deep: Runs in this conversation when a worker handoff saysBLOCKED:.elevate-code: An optional pool slot, requested at pool init. In auto-apply it commits each finding on its own. It is not a check before every commit.
Context handoff
The skill does not estimate file size, and it does not stop a job before the job finishes. After the job, it uses the context use that run reports.
Hand off when that use passes the earlier of:
- 40% of the reported window. Coding-agent sessions start dropping instructions from the start of the chat around there. The line moves with the task. It is not a fixed 10% or 20% slice.
- 250,000 tokens. Measured task quality drops at that length, including answers pulled from an earlier turn. On a million-token window, length rot is already visible around 300,000 to 400,000, so the cap stops the 40% line from waiting until 400,000.
A 200,000 token window hands off at 80,000. A 1,000,000 token window hands off at 250,000. If the run reports use but not a window, the window is context_tokens in pool.json. If it reports neither, the work continues.
Past the line, progress/<id>.md is the handoff. The chat stops. The same skill starts again and reads progress.json. Accepted issues stay accepted.
Each planning node, the tester’s tests, and each implementer sub-task is its own commit. The message has a subject, How, and Why. Those commits are not squashed and not rolled back.
Interruption & State Recovery
- Completed issue states are saved in
docs/plan/issues/progress.jsonbyprogress.py. - A later run reads that file and continues unfinished phases. It does not redo an accepted issue.