agentleFS
sson0-ersson0-er/claudex/skills/orchestrate/SKILL.md

orchestrate

Skill0 starsChanged 53 days agoMITView on GitHub

Drives a feature end to end. Requirements (interactive), research, design, Codex design review, planning, then per task Codex implementation, deterministic verify gate, four parallel reviews and a bounded fix loop, then a low-findings triage with a fourth gate, then documentation. Waits for the user at four approval gates.

We split this skill into the rules it gives an agent

10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 130 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If AGENTS.md does not exist, ask the user: Codex reads project conventions from AGENTS.md.

    line 34
  2. Distinctive:

    Ask the user each open question from the designer's final message, one at a time (AskUserQuestion).

    line 44
  3. Very specific:

    Write the design-review prompt to docs/claudex/$slug/03-design-review.prompt.md:

    line 45
  4. Very specific:

    Follow the execution order in 04-plan.md.

    line 80
  5. Very specific:

    If status in report.json is blocked, show open_questions to the user and collect answers.

    line 106
  6. Distinctive:

    When all four exist, merge:

    line 144
  7. Very specific:

    When a child reports "unverified", an open question, or blocked, ask the user instead of guessing.

    line 205
  8. Distinctive:

    When the same failure happens twice in a row, tell the user before the third attempt.

    line 206
  9. Distinctive:

    Never skip a gate. Unless the user explicitly approves, treat the gate as not passed.

    line 207
  10. Very specific:

    When claudex-codex exits non-zero, do not read report.json.

    line 208

“Common” is measured: kept by at least 6 in 10 of the 130 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Orchestration: $slug

Your role

You are the orchestrator (parent). You never design, implement or review yourself. You do exactly four things:

  1. Talk to the user and run the approval gates.
  2. Launch children (subagents and Codex) and summarize their final messages.
  3. Decide how to proceed from file existence and exit codes.
  4. Escalate to the user when stuck.

Talk to the user in the user's language. All artifacts are written in English.

Do not read the children's deliverables. You read only: a child's final message (5 lines or fewer), the task table in 04-plan.md, the counts line of *.findings.md, status plus open_questions in report.json, the summary field of report.json, the frontmatter and History section of tasks/<task>.md (which you edit), $T.round-*.snapshot (one line each), 05-low-findings-triage.md in full (it is a summary artifact), and docs/claudex/review-policy.md (which you append to). The history file is for reviewers, not for you. For evidence you read INDEX.md only.

The working directory is the target project root ($PWD); all paths below are relative to it. The plugin's bin/ is on PATH, so claudex-* commands run as is. Skills and agents from this plugin are registered with the claudex: prefix; use those names with the Skill and Agent tools.

Long-running commands: always start claudex-codex (all roles) with the Bash tool's run_in_background option and wait for the completion notification before reading its outputs. Never poll and never run it in the foreground; the foreground Bash timeout would kill Codex mid-task and leave the working tree half-changed. Do the same for claudex-verify when the project's verify script is slow.

Phase 0: initialize

claudex-init $slug

If AGENTS.md does not exist, ask the user: Codex reads project conventions from AGENTS.md. If a CLAUDE.md exists, should its content move to AGENTS.md with CLAUDE.md importing it via @AGENTS.md?

Phase 1: requirements → gate 1

Invoke the claudex:define-requirements skill with $slug. Do not continue until it reports "gate 1 passed".

Phase 2: research, design, design review → gate 2

  1. Launch claudex:researcher with the Agent tool. Prompt: "slug is $slug. Write 02-research.md."
  2. Launch claudex:designer. Prompt: "slug is $slug. Write the design directory 03-design/."
  3. Ask the user each open question from the designer's final message, one at a time (AskUserQuestion). Relaunch claudex:designer with "Apply these answers to 03-design/ (move them to Resolved questions) and record the decisions: ..." so the answers land in the document.
  4. Write the design-review prompt to docs/claudex/$slug/03-design-review.prompt.md:

    You are reviewing a software design. Read these files:
    - docs/claudex/$slug/01-requirements.md
    - docs/claudex/$slug/02-research.md
    - docs/claudex/$slug/03-design/ (read README.md first, then every file its Index lists)
    - docs/claudex/decisions/ (all files)
    - docs/claudex/evidence/INDEX.md (index only; open an evidence file only to check a specific claim)
    Review for: requirement coverage, interface completeness (could an implementer build from this alone?),
    unjustified complexity, missing error handling, claims about external libraries or APIs that lack an
    "(evidence: <id>)" reference, decisions with weak or missing rationale, and index completeness (every
    file in the directory is listed in README.md and every component has an interface file).
    Respond only with the required JSON. Use severity high for anything that would block implementation.
  5. Run:

    claudex-codex design-review --prompt-file docs/claudex/$slug/03-design-review.prompt.md \
      --out docs/claudex/$slug/03-design-review.json --cwd "$PWD"
    claudex-findings-merge --out docs/claudex/$slug/03-design-review.md --fail-on high \
      docs/claudex/$slug/03-design-review.json
  6. If --fail-on high fails (exit 1), launch claudex:designer in revision mode. Prompt: "slug is $slug. Revise 03-design/ to address the findings in 03-design-review.md and append your response to 03-design-review.history.md." Then repeat steps 4 and 5. At most two rounds. If highs remain after two rounds, show the user the counts line and the designer's final message and ask how to proceed. If claudex-findings-merge exits 2 (invalid JSON from Codex), rerun the claudex-codex design-review command once and merge again; if the merge exits 2 a second time, show the user the error and stop.
  7. Show the user the paths of 03-design/README.md and 03-design-review.md with the counts, and ask for approval. This is gate 2. Do not continue without it.

Phase 3: implementation plan → gate 3

  1. Launch claudex:planner. Prompt: "slug is $slug. Write 04-plan.md and tasks/*.md."
  2. Show the user the task table from 04-plan.md and ask for approval. This is gate 3. Do not continue without it.

Phase 4: task loop (sequential)

Follow the execution order in 04-plan.md. For each task, <task> is the task id (for example 01-add-model) and T=docs/claudex/$slug/tasks/<task>. Process only tasks whose status is not done, in the plan's execution order.

4.0 Reading a Codex report

After every claudex-codex implement or claudex-codex fix run, before anything else: if $T.report.json is not valid JSON, treat it exactly like a non-zero claudex-codex exit (see Escalation rules). If status is blocked, follow the blocked procedure in 4.1. The "already 5" stop check in 4.4 applies only to fix attempts triggered by verify failures or review findings, never to a blocked continuation.

4.1 Implement

Write $T.prompt.md:

Implement the task described in docs/claudex/$slug/tasks/<task>.md.
Read AGENTS.md and the design files listed under References in the task file first.
Stay strictly within the task's scope; do not touch anything listed under "Do not touch".
Write tests for every behavior listed in the Definition of Done. Run scripts/verify.sh before finishing.
If something in the task or design is ambiguous or impossible, stop and set status to "blocked"
with the question in open_questions instead of guessing.
Respond only with the required JSON report.

Run:

claudex-codex implement --prompt-file $T.prompt.md --out $T.report.json --thread-file $T.thread --cwd "$PWD"

If status in report.json is blocked, show open_questions to the user and collect answers. Then write $T.fix.prompt.md:

You reported status "blocked" with open questions. Here are the answers:
<one line per question: question, then answer>
Continue the task within its scope using these answers, run scripts/verify.sh, and respond only with the required JSON report.

and run the claudex-codex fix command in 4.4. This continuation does not count as a fix attempt: do not increment attempts. Then go to 4.2.

4.2 Verify gate

claudex-verify --log $T.verify.log --cwd "$PWD"

Branch on the exit code, in this order:

  • Exit 0: go to 4.3.
  • Exit 3 (no verify script): ask the user to create scripts/verify.sh and stop.
  • Any other non-zero exit: write $T.fix.prompt.md as below and go to 4.4.
scripts/verify.sh failed. The log is in docs/claudex/$slug/tasks/<task>.verify.log.
Fix the cause within the task's scope, re-run scripts/verify.sh, and respond with the JSON report.

4.3 Parallel review

Let N be the round number: 1 plus the number of existing $T.round-*.snapshot files. Then record the tree the reviewers are about to see: claudex-snapshot --cwd "$PWD" > $T.round-N.snapshot. (Do not take another snapshot when relaunching a single reviewer after a merge exit 2.)

Launch all four reviewers with the Agent tool in the same message. Prompt for each: "slug is $slug, task-id is <task>, round is N. Write your findings JSON." When N >= 2, append: "Previous findings: $T.findings.history.md. Snapshots: previous round <contents of $T.round-(N-1).snapshot>, current <contents of $T.round-N.snapshot>."

  • claudex:reviewer-quality → $T.findings.quality.json
  • claudex:reviewer-security → $T.findings.security.json
  • claudex:reviewer-spec → $T.findings.spec.json
  • claudex:reviewer-tests → $T.findings.tests.json

When all four exist, merge:

claudex-findings-merge --out $T.findings.md --fail-on medium \
  $T.findings.quality.json $T.findings.security.json $T.findings.spec.json $T.findings.tests.json

Exit 2 means a reviewer wrote invalid findings JSON; the error message names the file. Relaunch only that reviewer once and merge again; if it fails a second time, show the user the error and stop. Exit 0: go to 4.5. Exit 1: append this round to the history so the next round's reviewers can read it, then write $T.fix.prompt.md and go to 4.4:

{ echo "## Round N"; echo; cat $T.findings.md; echo; } >> $T.findings.history.md
Review findings for your implementation are in docs/claudex/$slug/tasks/<task>.findings.md.
Address every high and medium finding. For each one, either fix it or, in the report summary, name the
finding and explain why it should not be changed. Stay within the task's scope. Re-run scripts/verify.sh.
Respond only with the required JSON report.

4.4 Fix

Before running the fix, read attempts in the frontmatter of <task>.md. If it is already 5, stop: show the user the counts line of $T.findings.md, which reviewer each remaining finding came from and its severity, the latest report summary, and what happened, then ask whether to continue, rework the task definition, or abort. Otherwise increment attempts and run:

claudex-codex fix --thread "$(cat $T.thread)" --prompt-file $T.fix.prompt.md --out $T.report.json --cwd "$PWD"

When this fix was triggered by review findings (not by a verify failure), append the implementer's stated reasons to the history: { echo "### Implementer response after round N"; echo; jq -r .summary $T.report.json; echo; } >> $T.findings.history.md. Append the attempt number and the findings counts line (or the verify exit code when the attempt came from a verify failure) to the History section of <task>.md, then apply 4.0 and return to 4.2.

4.5 Task done

Set status in <task>.md to done and move to the next task. When every task whose status is not done has been processed, go to Phase 4.9 (or straight to Phase 5 when these were the follow-up tasks from Phase 4.9 step 4).

Phase 4.9: low-findings triage → gate 4

Runs once, after every task is done and before documentation.

  1. Merge the leftover lows deterministically:
claudex-findings-triage --tasks-dir docs/claudex/$slug/tasks --out docs/claudex/$slug/05-low-findings.md

The command prints raw: <M> merged: <N>. If N is 0, skip to Phase 5.

  1. Launch claudex:triage with the Agent tool. Prompt: "slug is $slug. Read 05-low-findings.md and write 05-low-findings-triage.md."
  2. Show the user the summary table and the "Follow-up task candidates (from A)" and "D. Convention candidates" sections of docs/claudex/$slug/05-low-findings-triage.md, then ask, one question at a time (AskUserQuestion): which A candidates to implement now, which D conventions to adopt. This is gate 4; do not continue without the user's answers.
  3. Act on the answers:
    • A candidates chosen: launch claudex:planner. Prompt: "slug is $slug. Append tasks to 04-plan.md and tasks/ for these follow-up candidates from 05-low-findings-triage.md: <chosen candidates>." Then run Phase 4 for the new tasks (their status is not done) and, when they are done, continue to Phase 5 without a second triage; the lows those tasks leave are reported in the completion report.
    • B items: ask the user each question, one at a time. Relaunch claudex:designer with "Apply these answers to 03-design/questions.md (Resolved questions) and record the decisions: ...".
    • C items, and D items the user declined: append them to docs/claudex/review-policy.md under "## Accepted low findings" (create the file from ${CLAUDE_PLUGIN_ROOT}/templates/review-policy.md if it does not exist), one line each with today's date and $slug.
    • D conventions adopted: append each rule to AGENTS.md and to "## Conventions adopted" in docs/claudex/review-policy.md.

Phase 5: documentation and completion report

  1. Launch claudex:doc-writer. Prompt: "slug is $slug. Update the documentation."
  2. Report to the user: number of tasks, total fix iterations, remaining low findings (with the triage result: merged lows per bucket and conventions adopted), documents updated, evidence and decision entries added. Include the artifact paths.

Escalation rules

  • When a child reports "unverified", an open question, or blocked, ask the user instead of guessing.
  • When the same failure happens twice in a row, tell the user before the third attempt.
  • Never skip a gate. Unless the user explicitly approves, treat the gate as not passed.
  • When claudex-codex exits non-zero, do not read report.json. Retry the same command once; if it fails again, show the user the exit code and stop.

Download now (ZIP)

  • Other versions148 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 2

    1. sson0-er/orchestraude★ 068% same
    2. sson0-er/sonnede★ 072% same

    Wrote their own version · 146

    1. Significant-Gravitas/AutoGPT★ 188ksame name
    2. rohitg00/pro-workflow★ 2.9ksame name
    3. boshu2/agentops★ 452same name
    4. quantumaikr/quant.cpp★ 403same name
    5. Noizefield/audio-plugin-coder★ 334same name
    6. kagenti/kagenti★ 300same name
    7. varun29ankuS/shodh-memory★ 294same name
    8. provencher/codex-skills★ 271same name
    9. first-fluke/fullstack-starter★ 223same name
    10. sd0xdev/sd0x-dev-flow★ 192same name

    136 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use improve-architecture, ticket and 8 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • PinkneyJiangSkill

      improve-architecture

      扫描代码库中的架构摩擦点,识别浅模块并挖掘深模块演进机会。生成可视化交互式 HTML 诊断报告,并在用户确认后闭环实施深度重构。

      Also in 3 projects that use this

    • kjnezSkill

      ticket

      Work on a JIRA/Linear ticket end-to-end: read ticket details, explore codebase, create a branch, implement with TDD, run quality checks, update ticket status, and create a PR. Use when the user provides a ticket ID to implement. Triggers on requests like "/ticket PROJ-123", "work on this ticket", "implement PROJ-123".

      Also in 3 projects that use this

    • xfstudioSkill

      reverse-engineer

      Expert reverse engineer specializing in binary analysis,

      Also in 3 projects that use this

    • danpegSkill

      bug-hunt

      Run adversarial bug hunting on your codebase. Uses 3 isolated agents (Hunter, Skeptic, Referee) to find and verify real bugs with high fidelity. Invoke with /bug-hunt, /bug-hunt [path], or /bug-hunt -b <branch> [--base <base>].

      Also in 3 projects that use this

    • iovisorSkill

      evolve

      Evolve uBPF through a gated spec-first workflow that propagates approved changes through requirements, design, validation, implementation, and RFC alignment artifacts.

      Also in 4 projects that use this

    • pedronauckSkill

      ship-pr

      Deliver implementation-complete work with impact/docs checks, release notes, commits, and a PR; optionally watch CodeRabbit. Excludes unfinished checkpoints, draft-only PRs, merged-PR amendments, and release publication.

      Also in 3 projects that use this

  • In this repository2 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.