agentleFS
grimoire-rsgrimoire-rs/grimoire-vscode/.claude/skills/swarm-execute/SKILL.md

swarm-execute

Skill0 starsChanged 4 months agoApache-2.0View on GitHub

Use to implement a plan artifact from `/swarm-plan`, or a free-text implementation task with contract-first TDD + Review-Fix Loop. Tier (`low | auto | high | max`) scales builder model, loop rounds, review breadth, and Codex code-diff gate.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. dralgorhythm/claude-agentic-framework★ 118same name

    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.

  • In this repository5 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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:

    When plan present, read and parse handoff block for Tier, Scope, Reversibility, Overlays.

    line 53
  2. Very specific:

    Read classify.md. Apply plan-header signals first (primary).

    line 59
  3. Very specific:

    Default: EnterPlanMode with meta-plan path.

    line 83
  4. Very specific:

    One-shot only: never re-enter Review-Fix Loop — prevent two-family thrash.

    line 133
  5. Very specific:

    Use task checkpoint for work-in-progress saves

    line 163
  6. Distinctive:

    NO completing tasks without passing quality gates

    line 177
  7. Distinctive:

    NO leaving work uncommitted locally

    line 178
  8. Distinctive:

    NO exceeding 8 parallel workers

    line 179
  9. Distinctive:

    NO pushing to remote

    line 180
  10. Distinctive:

    NO running stub and test phases concurrently (sequential only)

    line 181
  11. Very specific:

    NO mid-flow AskUserQuestion during classification — ambiguity resolve at meta-plan gate

    line 182
  12. Distinctive:

    ALWAYS report blockers immediately

    line 184
  13. Distinctive:

    ALWAYS validate git status shows clean before commit

    line 185
  14. Distinctive:

    ALWAYS update design record before adding tests for unspecified behaviors

    line 186

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Execution Orchestrator — Tiered

Thin dispatch layer. Phase plans in sibling tier files (tier-low.md, tier-high.md, tier-max.md); this file parse args, classify target (classify.md), resolve overlays (overlays.md), optional gate on meta-plan approval, hand off to matching tier file. Shared content (worker table, loop design principles, constraints, handoff) stay here — phase-by-phase execution in tier files.

Argument syntax

/swarm-execute [tier] <plan-artifact-or-task> [--flags]
  • tier (optional): low | auto | high | max. Default auto.
  • target (one of): plan artifact path (.claude/state/plans/plan_*.md); free-text task description.
  • flags (convention: flags before positional):
    • --builder=sonnet|opus
    • --tester=sonnet|opus
    • --reviewer=haiku|sonnet|opus
    • --doc-reviewer=haiku|sonnet
    • --loop-rounds=1|2|3
    • --review=minimal|full|adversarial
    • --codex / --no-codex
    • --dry-run / --form — meta-plan preview (--form use AskUserQuestion; imply --dry-run)

Workflow

1. Parse arguments and detect plan artifact

Detect target type:

  1. Path ending .md (typically under .claude/state/plans/) → plan-artifact mode
  2. Else → free-text mode

When plan present, read and parse handoff block for Tier, Scope, Reversibility, Overlays; parse phase definitions; extract "Subsystems Touched" from plan body.

2. Classify (only when tier=auto)

Read classify.md. Apply plan-header signals first (primary); fall back to free-text signals (pointer to /swarm-plan's classify.md when no plan artifact) only for axes plan header miss. Produce candidate tier + confidence flag + overlay set.

3. Resolve overlays

Final config = tier defaults (overlays.md per-tier table) + classifier overlays + user flag overrides. User flags always win (except tier=max's mandatory --builder=opus).

4. Meta-plan gate (single consolidated approval point)

Fire when ANY of: --dry-run, --form, tier resolved to max, or classification marked low-confidence. Only user-prompt point — no mid-flow AskUserQuestion during classification.

Write .claude/state/plans/meta-plan_execute_[feature].md with: Classification (tier + rationale + plan-header source), Overlays (+ rationale), Workers per phase, loop-rounds budget, Estimated cost, Whether Codex fires, Not Doing (push, PR creation).

Approval UI (always single interaction):

  • Default: EnterPlanMode with meta-plan path; resume on approve. If skill resume after ExitPlanMode unreliable in practice, fall back to AskUserQuestion with Approve / Edit / Cancel options.
  • --form: ONE AskUserQuestion call with ≤4 batched axis questions (Tier / Builder / Loop-rounds / Codex), first option "Recommended".

On reject: re-draft meta-plan with rejection rationale and re-present once.

5. Announce final config (always)

Print before loading tier file:

Swarm execute
  Tier:        high                                (from plan header)
  Target:      .claude/state/plans/plan_foo.md
  Overlays:    builder=sonnet, loop-rounds=3       (tier default)
               codex=on                            (signal: plan Reversibility=One-Way Door Medium)
  Workers:     stub/impl sonnet, 1 arch reviewer,
               3 review rounds (full breadth)
  Codex diff review: on (after loop converges)
  Proceed? (Ctrl+C to abort; re-run with explicit tier to override)

6. Dispatch to tier file

Read matching tier-{low,high,max}.md and execute its phase plan. No phase content duplicated here.

Review-Fix Loop

Protocol: see canonical Review-Fix Loop in workflow-swarm.md. Protocol auto-load for swarm-skill contexts via workflow-swarm.md path-scoping. Per-tier loop config (rounds, perspectives) set in each tier file.

Cross-Model Adversarial Pass — shared protocol

See overlays.md "codex axis" for when fires per tier. Use codex-adversary skill with scope code-diff against branch diff after Claude loop converges.

  • Preconditions: loop exited, task verify green, working tree clean except intended diff.
  • Invocation: delegate to codex-adversary with --scope code-diff --base main --model <tier model> (high→terra, max→sol; --codex-model=luna|terra|sol overrides — see overlays.md). Codex loads repo context (AGENTS.md when present) automatically — do not inject project context.
  • Triage: Actionable → one-shot worker-builder fix pass, gate task verify. Deferred → summary. Stated-convention / trivia → dropped with count.
  • One-shot only: never re-enter Review-Fix Loop — prevent two-family thrash. If one-shot fix fails task verify, revert and promote findings to deferred.
  • Unavailable path: CLAUDE_PLUGIN_ROOT unset / companion non-zero / empty output → log Cross-model gate skipped: <reason> and continue. Gate, not blocker (at tier=max, surface skip prominently).

Worker assignment (shared across tiers)

See .claude/rules/workflow-swarm.md for worker types, models, tools, focus modes.

PhaseWorkerModel
Stubworker-builder (focus: stubbing)sonnet / opus
Verify arch (high/max)worker-reviewer (focus: spec-compliance, phase: post-stub)sonnet
Verify arch (max)worker-architectopus
Specifyworker-tester (focus: specification)sonnet
Implementworker-builder (focus: implementation)sonnet / opus
Review Stage 1worker-reviewer (spec-compliance + test-coverage)sonnet
Review Stage 2worker-reviewer / worker-doc-reviewer / worker-architect / worker-researcherper role
Cross-modelcodex-adversary (code-diff)—

Max concurrent workers: 8 (per workflow-swarm.md).

Quality Gates & Git Protocol

  • task --list to discover workflows; task verify is final gate (subsystem verify runs during review loop)
  • Stage and commit with conventional commit message; never push
  • Use task checkpoint for work-in-progress saves

Living Design Records

Plan artifacts = living documents. When implementation reveal behavior or edge case not in design record: update plan artifact first, write corresponding test, then implement.

Plan Status block (mutate on phase entry + advance)

Mutate the ## Status block in the plan referenced by .claude/state/current_plan.md: flip Step on phase entry / Stub→Specify→Implement→Review-Fix transitions; increment Active phase on plan-phase advance; set Step: awaiting /swarm-review when the final phase completes (don't clear current_plan.md — /finalize does that). Skip silently when no current_plan.md / no Status block. Full mutation table → plan-status.md.

Constraints

  • NO completing tasks without passing quality gates
  • NO leaving work uncommitted locally
  • NO exceeding 8 parallel workers
  • NO pushing to remote
  • NO running stub and test phases concurrently (sequential only)
  • NO mid-flow AskUserQuestion during classification — ambiguity resolve at meta-plan gate
  • ALWAYS report blockers immediately
  • ALWAYS validate git status shows clean before commit
  • ALWAYS update design record before adding tests for unspecified behaviors

Handoff

  • To /swarm-review: after implementation complete, for adversarial review
  • To /qa-engineer: for acceptance testing

Next Step — copy-paste to continue:

/swarm-review

$ARGUMENTS

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.