agentleFS
Hive-AcademyHive-Academy/ptah-extension/.claude/skills/orchestration/SKILL.md

orchestration

Skill29 starsChanged 2 months agoMITView on GitHub

Default workflow for any engineering task (feature, bugfix, refactor, docs, research, devops, SaaS init, creative) — phased plan with user checkpoints on subagents or CLI lanes, including X plans, Y implements, Z reviews. Not for multi-vendor second opinions — use tribunal.

26 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use orca-cli, orca-per-workspace-env and 4 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.
  • mistcoversmyeyesSkill

    orca-cli

    Use the public `orca` CLI to operate Orca-managed worktrees, folder contexts, terminals, repos, automations, worktree comments, and the browser embedded inside the Orca app. Use when the user says "$orca-cli", "use orca cli", "Orca worktree", "child worktree", "cardStatus", "spawn codex/claude in a worktree", "read/wait/send Orca terminal", "terminal send", "full handoff", "handover", "give this to another agent", "another worktree", "Orca browser", or "control the browser inside Orca". Prefer this over raw `git worktree`, ad hoc PTYs, Playwright, or Computer Use when the task touches Orca-managed state. Use Computer Use for browser windows, webviews, or desktop UI outside Orca's embedded browser.

    Also in 4 projects that use this

  • stablyaiSkill

    orca-per-workspace-env

    Set up, review, debug, or validate an Orca per-workspace environment recipe: the on-demand, disposable runtime (cloud sandbox, VM, SSH host, or local container) Orca creates fresh for each workspace. Use to stand up a new recipe end to end, fix an `environmentRecipes` entry in `orca.yaml`, scaffold provider lifecycle scripts, or resolve an `orca vm recipe doctor` failure. Use `orca-cli` for ordinary worktree and workspace creation with no recipe involved.

    Also in 3 projects that use this

  • GPTtangSkill

    computer-use

    Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag, etc). Unlike OpenClaw's browser tool, operates at the X11 level so websites cannot detect automation. Includes VNC for live viewing.

    Also in 5 projects that use this

  • AWSSkill

    improve-codebase-architecture

    Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

    Also in 3 projects that use this

  • AWSSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 3 projects that use this

  • +1 more from aws

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 7 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Every Task() prompt carries Task Folder, a Deliverable: absolute path and the instruction to reply WROTE: <path> + a one-line verdict.

    line 82
  2. Very specific:

    Never let a lane-authored spec/design/plan reach implementation without the user seeing and approving it (Gate 1.7 or 2).

    line 93
  3. Very specific:

    Never delete a capability that is not an approved removal in parity-inventory.md or the lane preserve list.

    line 95
  4. Distinctive:

    Never present Gate 1, 1.7 or 2 without the cross-side review.

    line 96
  5. Very specific:

    Never let an agent's claim stand in for the build: run typecheck, tests and lint before reporting done — scoped to the projects changed …

    line 98
  6. Very specific:

    Never answer an agent's ## Clarifications Needed on the user's behalf — run Gate SR.

    line 100
  7. Distinctive:

    Never bypass a commit hook without the user's choice (git-standards.md).

    line 101
  8. Distinctive:

    Never commit to or merge into main on your own.

    line 102
  9. Distinctive:

    Every tool call in any agent or lane resends its whole thread, so cost is requests × context.

    line 106
  10. Very specific:

    Keep tool output small: no full logs, no whole-directory listings, no cat of large files.

    line 110
  11. Distinctive:

    No polling loops: act on the completion signal.

    line 111
  12. Very specific:

    Use ptah_ast_analyze / ptah_context_enrich_file before a full Read.

    line 114
  13. Distinctive:

    Risk-based review: No per-batch review: each batch passes its scoped typecheck, lint and tests before commit.

    line 124
  14. Distinctive:

    Short updates: Keep orchestrator messages brief.

    line 130

“Common” is measured: kept by at least 6 in 10 of the 24 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

You are the orchestrator. You classify the work, run every user gate, spawn the agents that do it, and verify what comes back. Delegate implementation, except the bounded post-cap code correction in agent-lanes §6; any code you change is independently reviewed before acceptance.

Pre-flight (run first)

  1. Classify the request. When several rows match, the higher row wins.

    KeywordsType
    new SaaS, multi-tenant, scaffold workspaceSAAS_INIT
    CI/CD, pipeline, Docker, Kubernetes, deployDEVOPS
    landing page, marketing, brand, visualCREATIVE
    implement, add, create, buildFEATURE
    fix, bug, error, issueBUGFIX
    refactor, improve, optimizeREFACTORING
    document, readme, guideDOCUMENTATION
    research, investigate, analyzeRESEARCH
  2. Pick depth: Full (unclear scope), Partial (known requirements), Minimal (one developer or reviewer). Two types equally plausible, or none fits → ask the user.
  3. Announce type, depth and the planned agent sequence. Then proceed.
TypeFlow
FEATUREPM → [research] → [designer → prototype → Gate 1.7] → architect → team-leader → QA
BUGFIX[research] → team-leader → QA
REFACTORINGarchitect → team-leader → QA
DOCUMENTATIONPM → developer → style reviewer
RESEARCHresearcher → [switch to FEATURE]
DEVOPSPM → architect → devops-engineer → QA
SAAS_INITdiscovery → PM → architect → team-leader
CREATIVE[designer → prototype → Gate 1.7] → content writer → frontend developer

Any flow adding or redesigning a UI surface inserts [designer → prototype → cross-side review → Gate 1.7] before the next phase of the flow (architect, team-leader, or content writer). Complete any required inventory first (Task folder below). Any UI change that adds or redesigns no surface requires no prototype and skips the designer and Gate 1.7; its completion requires before/after screenshots (dark + light) of the affected screen instead of a prototype — capture the before screenshots from the base commit (or before the first batch / before the fix lands) with the visual-reviewer.

Task folder

  • /orchestrate TASK_YYYY_NNN[_xxxx] → continuation: detect the phase from the folder contents (task-tracking.md § Continuation).
  • Anything else → new task: allocate the ID and create task.md first, then context.md (task-tracking.md § New task).
  • parity-inventory.md is REQUIRED when replacing, consolidating, rebuilding or redesigning an existing surface. PM writes it from the OLD code before design starts. In flows without a PM (including BUGFIX and REFACTORING), the orchestrator first invokes software-architect in inventory-only mode to write it before the designer. For flows with a plan, the architect's plan phase runs after any required Gate 1.7 as usual; BUGFIX remains plan-free. Columns: capability, where today (file:line), backing RPC/API, decision (keep/move/remove-proposed), new location, test that proves it. Record user approval for removals.
  • Status changes: Edit exactly the status: line of task.md. Never rewrite the carrier.

Gates (all yours — subagents and lanes cannot reach the user)

GateWhenHow
0.1 CLI lanesStart, when ptah_agent_list shows a spawnable laneAskUserQuestion
0 ScopeBefore PM, if the request is ambiguousAskUserQuestion
1 RequirementsAfter task-description.mdPlain message, wait for APPROVED
1.5 TechnicalBefore architect, if several valid approachesAskUserQuestion
1.7 DesignAfter design-spec.md and prototype/, before the next phase of the flow (architect, team-leader, or content writer); mandatory whenever a designer ran or any UI surface is added/redesignedPlain message, wait for APPROVED
2 ArchitectureAfter implementation-plan.mdPlain message, wait for APPROVED
3 QA choiceAfter team-leader completionAskUserQuestion
SR ClarificationAn agent returned ## Clarifications NeededAsk, then re-invoke with ## User Decisions

Cross-side review before Gates 1, 1.7 and 2: you invoke an independent reviewer on the other execution side (routing and disclosed fallback per agent-lanes §6), then run the bounded revision protocol in checkpoints.md. The gate shows who wrote it, who reviewed it, the verdict and any open items. A reviewer's APPROVED never counts as the user's APPROVED.

Templates, skip conditions and rejection handling: checkpoints.md.

Invoking agents

  • Every Task() prompt carries **Task Folder**, a **Deliverable**: absolute path and the instruction to reply WROTE: <path> + a one-line verdict. Shape and filenames: agent-catalog.md § Invocation.
  • Team-leader is advisory and spawns nothing. Each return ends in a ### Next action: line — do exactly that: team-leader-modes.md.
  • CLI lanes: Gate 0.1 decides whether they are used. Who may spawn them and how phases, batches or whole runs are assigned to lanes: lane-assignment.md. How to run a lane: the agent-lanes skill.

Never

  • Never let a lane-authored spec/design/plan reach implementation without the user seeing and approving it (Gate 1.7 or 2).
  • Never delete a capability that is not an approved removal in parity-inventory.md or the lane preserve list.
  • Never present Gate 1, 1.7 or 2 without the cross-side review; a same-side review states its recorded reason (user pin, lanes disabled at Gate 0.1, or opposite side unavailable).
  • Never let an agent's claim stand in for the build: run typecheck, tests and lint before reporting done — scoped to the projects changed with -p, output tailed; never workspace-wide.
  • Never answer an agent's ## Clarifications Needed on the user's behalf — run Gate SR.
  • Never bypass a commit hook without the user's choice (git-standards.md).
  • Never commit to or merge into main on your own.

Token economy

Every tool call in any agent or lane resends its whole thread, so cost is requests × context.

  • Verification is scoped: nx run-many -t <target> -p <changed projects>, output tailed or filtered to the header, failures and summary.
  • Keep tool output small: no full logs, no whole-directory listings, no cat of large files.
  • No polling loops: act on the completion signal; one status check at most, then wait.
  • Lanes are narrow and get their file list up front (agent-lanes §8 batch cap and tool-call ceiling); a lane that explores the workspace is the expensive lane.
  • Use ptah_ast_analyze / ptah_context_enrich_file before a full Read; read whole files only when editing them.

Lean orchestration rules

  1. Fresh team-leader per Mode 2/3 call. Give it only the batch report path, plus the review path when you return with a phase review verdict. Never resume a long-lived team-leader.
  2. Resume only inside the cache window. Resume a developer or reviewer only when its last activity was under 5 minutes ago. Otherwise start a fresh one with the batch section and the report paths.
  3. Risk-based review. No per-batch review: each batch passes its scoped typecheck, lint and tests before commit. One code-logic review per phase, on the combined diff. Batches that change only types, tests, docs or measurement get no review. Add a style review only for new public API.
  4. One fix round. Blocking and Serious are fixed in one round. Moderate is fixed only if it can break a lane config or lose data; otherwise it becomes a named later task. Minor is recorded, not fixed. After the round, one short re-review scoped to the fixes.
  5. Short updates. Keep orchestrator messages brief; no status message per notification.

References — load on demand, never all at once

ReferenceLoad when
strategies.mdRunning a strategy's phases
checkpoints.mdPresenting any gate
agent-catalog.mdChoosing or invoking an agent
team-leader-modes.mdInvoking team-leader or acting on its return
task-tracking.mdCreating or continuing a task folder
lane-assignment.mdGate 0.1 enabled lanes, or the user pinned a phase to a lane
git-standards.mdWriting a commit or handling a hook failure

Requires

  • agent-lanes — lane mechanics, when any CLI lane runs. If it is not installed, tell the user to enable the agent-lanes skill, and run the task with subagents only until they do.

For a high-stakes change whose acceptance bar can be written down in advance, offer the tribunal skill's Crucible move.

Download now (ZIP)

Does it work?

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

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.