agentleFS
my-chiefmindmy-chiefmind/ai-maestro/skills/orchestration-health/SKILL.md

orchestration-health

Skill6 starsChanged 51 days agoMITView on GitHub

Read-only diagnostic for a stuck or suspicious board run: in-progress tickets nothing is actually working on, stale or orphaned worktrees, agent plans with unknown codes, unresolved dependencies, and quietly eligible backlog. Reports findings and remediations without mutating the board, worktrees, or git, and files what the project plan doesn't cover as a plan gap. Run before starting a new run or when a run looks stuck.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run all checks. Classify each finding as ERROR (blocks a safe run) or WARNING.

    line 21
  2. Very specific:

    Every in-progress ticket should have a branch for its id — checked out in some worktree, or with commits newer than the claim.

    line 29
  3. Very specific:

    Every worktree's checked-out branch should map to an active (in-progress) ticket.

    line 42
  4. Very specific:

    Every code in every agent_plan maps to a real agent in agents/ (or the project's overlay) — ERROR otherwise.

    line 63
  5. Very specific:

    Every depends_on id exists on the active board or in archive.json — ERROR if missing.

    line 65
  6. Very specific:

    Every human_gate value is in config.humanGates — WARNING otherwise.

    line 67
  7. Distinctive:

    No errors → safe to start the next run.

    line 91
  8. Distinctive:

    Check first — a project with no plan has nothing to file against:

    line 100
  9. Distinctive:

    If a plan exists, file each uncovered finding once:

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “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 Health

A read-only diagnostic over the orchestration state: the board ({{BOARD}}/data.json + archive.json), every git worktree (git worktree list --porcelain), and their branches. Worktrees are matched to tickets by the branch they have checked out (branch names carry the ticket id, per the git-branch skill), never by directory name: a single-ticket run puts its worktree at ../.maestro-wt/<ticket-id>, but a lane worktree (see maestro lanes) hosts a queue of tickets under one directory, so its path names no ticket. It reports inconsistencies and recommends fixes; it never changes board state, worktrees, or git. Apply remediations through maestro ticket ... (board changes), the worktree-cleanup skill (worktrees), or the tpm skill (anything needing a decision) — not from here, and never by editing the board files.

Checks

Run all checks. Classify each finding as ERROR (blocks a safe run) or WARNING.

1. Claims vs. reality

Work is claimed by status: in-progress, whether by a single run or by one of several lanes running in parallel — so a claim with nothing behind it poisons every later run (the scheduler skips the ticket forever).

  • Every in-progress ticket should have a branch for its id — checked out in some worktree, or with commits newer than the claim. A claim with no branch and no worktree at all is an abandoned run — ERROR; remediation: return it to todo (or blocked with the reason) with maestro ticket ..., never by editing the board file.
  • A claim that looks stale but still has a branch or worktree is not safe to reset: it may hold commits or uncommitted work. ERROR; remediation: hand it to the tpm skill (or the owner) to decide resume, archive, or cleanup. Don't recommend resetting it to todo.
  • An in-progress ticket whose branch has merged to the default branch is a run that landed but never archived — ERROR; remediation: finish the land step (evidence + move to archive.json, see land-and-archive).

2. Orphaned and stale worktrees

  • Every worktree's checked-out branch should map to an active (in-progress) ticket. A lane worktree is valid even between tickets — detached, or on a branch whose ticket just landed — while the lane plan (maestro lanes) or a running swarm still has tickets queued on it; don't flag it as orphaned.
  • A non-lane worktree whose branch belongs to a done/archived ticket is leftover from a landed run — WARNING; clean it up per worktree-cleanup. For a lane worktree the same finding means only the merged branch is left to delete — the worktree stays.
  • A worktree whose branch names no ticket on the board or in the archive is orphaned — WARNING; route it to the tpm skill or its owner rather than removing it.
  • A worktree whose branch has no commits beyond its base is an empty shell — WARNING.

3. Stuck and under-explained tickets

  • An in-progress ticket whose branch has had no new commits for a long stretch is potentially stuck — WARNING; inspect the worktree for a failed stage, then route it to the tpm skill or the owner for a resume/split/cleanup decision rather than resetting it.
  • A blocked ticket with no blocker ticket and no recorded reason is unexplained — WARNING; the next human to read the board can't tell what decision it's waiting on.

4. Plan and dependency integrity

  • Every code in every agent_plan maps to a real agent in agents/ (or the project's overlay) — ERROR otherwise; the dispatch would fail mid-run.
  • Every depends_on id exists on the active board or in archive.json — ERROR if missing; eligibility can never be computed for it.
  • Every human_gate value is in config.humanGates — WARNING otherwise; free-text gates don't match reliably.

5. Quietly eligible backlog

  • A backlog ticket with every dependency done and no recorded reason to wait is a promotion candidate — WARNING, informational; surface it so eligible work isn't invisible to the next run.

Output

=== Orchestration Health ===
Tickets: <n>   Worktrees: <w>   In-progress: <p>

ERRORS (block a safe run):
  <ticket-id | worktree>: <check> — <detail> — <remediation>

WARNINGS (review):
  <id>: <check> — <detail>

SUMMARY: <n> error(s), <m> warning(s)

No errors → safe to start the next run. Any error → fix it first; a run dispatched over a broken state wastes the run at best and double-claims work at worst.

File what's missing as a plan gap

A finding that the project plan doesn't cover belongs in the plan, not only in this report. A report is read once; a gap sits against the plan, holds its completeness percentage down, and has to be answered.

Check first — a project with no plan has nothing to file against:

maestro plan status --board {{BOARD}}/data.json

If a plan exists, file each uncovered finding once:

maestro plan gap-add --board {{BOARD}}/data.json --from "orchestration-health" \
  --need required --text "<what the plan is missing, stated as a gap>"
  • --need required — the plan is genuinely incomplete without it: an unstated requirement the project clearly depends on, a quality bar the work is already being judged against, a deliverable nobody wrote down. These lower the percentage until a human accepts or declines them.
  • --need optional — worth considering. Never affects the percentage.

Rules that keep this from becoming noise:

  • State the gap, not the fix. "No stated availability target for the API" — not "add a health check".
  • Only what the plan is missing. A bug, a stale branch, or a failing test is a report finding and belongs in the report. It is not a plan gap.
  • Be sparing with required. Classify as required only what you could defend to the owner. A wall of required gaps reads as noise and gets ignored wholesale.
  • Re-runs are safe: a gap whose text already exists is skipped, not duplicated.

Name every gap you filed in your summary, with its id and need. Triage happens in /plan-update, never here — you file, a human decides.

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.