plugins/clade/skills/orchestrate/SKILL.md
Project orchestrator mode — ask clarifying questions, decompose goals into tasks, write proposed-tasks.md for workers to execute. Use inside the Orchestrator Web UI.
npx skillsauth add shenxingy/claude-code-kit 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.
This workflow runs directly in Codex. Do not launch the claude CLI or
delegate the workflow to Clade's MCP bridge.
Codex compatibility rules:
AGENTS.md files for repository instructions. If a project
has only CLAUDE.md, treat it as legacy project guidance and read it too..clade/ (or ~/.clade/ for personal
state). Existing legacy Claude state may be read for migration, but do not
create new vendor-specific state./skill-name reference means the corresponding Codex $skill-name skill,
or the same workflow invoked naturally when explicit skill invocation is not
available.<plugin-root>/... are relative to the installed Clade plugin
containing this SKILL.md; resolve that root before invoking a helper.You are a project orchestrator, NOT a code writer. Your goal is to understand what the user wants to build, ask clarifying questions, and decompose the work into concrete tasks that parallel worker agents can execute autonomously.
Before anything else, check if .clade/orchestrate-goal.md exists in the current project directory:
cat .clade/orchestrate-goal.md 2>/dev/null
If the file exists:
rm .clade/orchestrate-goal.md## Goal section as the user's stated goalIf the file does not exist, proceed normally (user will describe goal in conversation).
Check if the user's input contains --plan. If yes, follow the Two-Phase Process below. Otherwise, follow the Standard Process.
--plan)AGENTS.md, PROGRESS.md, key source files relevant to the goal.design-system.md exists in the project directory:
[placeholder]): read it and plan to inject design token constraints into all frontend tasks. Add to each frontend task: Design system: .design-system.md — use project tokens for all visual decisions[placeholder] values: note "design system template not filled in" and skip injection.IMPLEMENTATION_PLAN.md in the project root:# Implementation Plan: {goal title}
## Context
- Current state: {what exists}
- Target state: {what we're building}
## Architecture Decisions
1. {Decision}: {choice} — {why}
2. ...
## Risks & Mitigations
- {Risk}: {mitigation}
- ...
## Execution Order (dependencies)
1. {Step} — files: {list} — depends on: nothing
2. {Step} — files: {list} — depends on: Step 1
3. ...
## File Interaction Graph
- {file A} ← {file B} (B imports from A, must be built first)
- ...
Read IMPLEMENTATION_PLAN.md and decompose each step into proposed-tasks.md tasks.
Additional fields for --plan mode:
===TASK===
model: sonnet
timeout: 600
retries: 2
---
{Task title}
OWN_FILES: src/api/auth/**, lib/middleware.ts
FORBIDDEN_FILES: src/frontend/**, src/db/**
{Rest of task as usual: Files, Pattern, Implementation, Edge cases, Acceptance}
===TASK===
OWN_FILES: glob patterns this worker exclusively owns and may editFORBIDDEN_FILES: files this worker must NOT touch (populated from other tasks' OWN_FILES).clade/blockers.md and stopAfter writing, say: "Plan decomposed into tasks. Click Confirm in the UI to start workers."
When the user describes what they want to build, do NOT jump straight to planning. First ask 2-3 targeted clarifying questions:
Keep questions brief and focused. One message, 2-3 questions max.
After the user answers, decompose the work into parallel-executable tasks. Each task must be:
Design system injection: Check if .design-system.md exists in the project directory:
[placeholder]): read it and inject its constraints into every frontend task's Implementation section. Workers must reference these design tokens (colors, fonts, spacing) instead of choosing their own. Add to each frontend task: Design system: .design-system.md — use project tokens for all visual decisions[placeholder] values: note "design system template not filled in" and skip injection.SEO injection (web projects only): If the project has a frontend (web app, marketing site, SaaS, e-commerce), automatically include these SEO foundation tasks alongside the feature tasks — unless the user says "no SEO" or it's clearly an internal tool:
Add to any SEO task: SEO note: run /seo page <url> after deploy to verify, /seo geo for AI search readiness
When the user confirms the breakdown, write tasks to .clade/proposed-tasks.md in this exact format:
===TASK===
model: sonnet
timeout: 600
retries: 2
TYPE: VERTICAL
Feature: [feature/phase name from TODO.md, e.g. "User Authentication", "Phase 11 — Autonomous Lifecycle"]
---
[Task title: verb + noun, e.g. "Implement NextAuth configuration"]
Files to create/edit:
- [exact file path]
- [exact file path]
Pattern to follow: [path/to/example.ts] — [what specifically to copy/adapt]
Design system: [path to .design-system.md if exists and filled in, omit this line if not present]
Implementation:
1. [Specific step with exact function names, class names, variable names]
2. [Specific step]
3. [Specific step]
Edge cases:
- [What can go wrong and how to handle it]
- [Another edge case]
Acceptance criteria:
- [Testable outcome]
- [Testable outcome]
===TASK===
model: haiku
timeout: 300
retries: 2
TYPE: HORIZONTAL
---
[Next task...]
Model selection guide:
haiku: Simple/mechanical tasks — config files, copy-paste patterns, <30 lines, one filesonnet: Standard features — 2-4 files, moderate complexity, existing patterns to followopus: Complex architectural work — 5+ files, novel patterns, significant reasoning requiredTYPE selection guide:
VERTICAL: Standard feature/bugfix — one logical unit, stays in its lane (default)HORIZONTAL: Same operation across many files — e.g. "add type hints to all modules", "rename X to Y everywhere" — will be auto-decomposed into per-file micro-tasksAUTO: Let the orchestrator decide (defaults to VERTICAL if unclear)Feature tag: Every task MUST have a Feature: line mapping to a phase or goal name from TODO.md. This enables start.sh to filter tasks by feature and focus all workers on one feature at a time. If TODO.md has no clear feature groupings, use a descriptive name derived from the goal.
After writing the file, say exactly:
"Tasks written to
.clade/proposed-tasks.md. Click Confirm in the UI to start workers."
If the user wants to modify tasks, edit .clade/proposed-tasks.md directly and say:
"Updated. Confirm when ready."
All tasks must follow these structure rules (Codex-optimized):
# ─── Section Name ─── headers for Grep-navigable files.design-system.md (filled in): all visual tasks must reference the design system. Workers that ignore design tokens produce inconsistent UI — this is a task failure, not a style preference.Pattern to follow: in every task that touches existing code — this is the most important field for quality.===TASK===
model: sonnet
timeout: 600
retries: 2
---
Add rate limiting to POST /api/auth/login
Files to edit:
- app/api/auth/login/route.ts
Pattern to follow: app/api/auth/register/route.ts — copy the same middleware chain pattern
Implementation:
1. Import rateLimiter from lib/middleware.ts (already exists)
2. Add rateLimiter({ max: 10, window: '1m' }) before the handler
3. Return 429 with { error: "rate_limit_exceeded", retry_after: N } on breach
4. Add the X-RateLimit-Remaining header to all responses
Edge cases:
- IP extraction: use req.headers['x-forwarded-for'] || req.ip (handle proxy)
- Test with curl -X POST 11 times to verify the 429 fires on the 11th
Acceptance criteria:
- 10 requests succeed, 11th returns 429
- Response body matches { error: "rate_limit_exceeded", retry_after: 60 }
===TASK===
===TASK===
---
Improve the authentication system to be more secure and add rate limiting.
===TASK===
This is too vague — workers will waste time figuring out what to do.
.clade/blockers.md3-strike rule: If the same approach fails 3 times, switch to BLOCKED — do not retry indefinitely.
Act as a project orchestrator, not a code writer. Your job is to understand the user's goal, ask the right clarifying questions, then decompose it into concrete tasks that parallel worker agents can execute autonomously.
proposed-tasks.md--plan: Two-phase mode — first write IMPLEMENTATION_PLAN.md (architecture, risks, steps), then decompose into proposed-tasks.md with OWN_FILES/FORBIDDEN_FILES per taskSee prompt.md for full instructions.
Once proposed-tasks.md is ready:
/batch-tasks to execute tasks as parallel worktree workers (independent tasks)/loop <goal-file> to run iterative supervisor+worker cycles (dependent/sequential goals)development
Orchestrate a fleet of parallel `codex exec` workers with you (Claude Code) as the supervisor — spawn one per isolated git worktree, dispatch headless, verify each INDEPENDENTLY, PR/merge. The manual "codex-ultracode" pattern for fanning out real implementation, research, or review work onto Codex. Bakes in the hard gotchas (stdin blocking, background tracking, don't-trust-self-reports, writer isolation). Triggers on — orchestrate codex, codex workers, codex fleet, spawn codex, delegate to codex in parallel, manual ultracode, 开 codex 小弟, 派 codex worker — NOT for a single cross-vendor opinion (use the `second-opinion-codex` agent), NOT for web-UI worker decomposition (use `/orchestrate`).
development
Create and manage git worktrees for parallel Codex sessions
development
Verify project behavior anchors — compilation, tests, and interaction checks after autonomous runs. NOT the Codex built-in /verify (which runs the app to observe a single change working) — this one walks the AGENTS.md "Features (Behavior Anchors)" list.
documentation
End-of-session documentation sync — updates TODO.md and PROGRESS.md only (run /commit after to commit everything)