agentleFS
sledtoolssledtools/pika/.agents/skills/orchestrate/SKILL.md

orchestrate

Skill45 starsChanged 8 months agoMITView on GitHub

Orchestrate multi-step cleanup, migration, or refactor work across pika worktrees using one integration branch, bounded subagents, explicit write ownership, forge-native landing, and project-specific safety rules for staged Linux remote runs.

161 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use define-requirements, orchestrate-plan and 10 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.
  • sson0-erSkill

    define-requirements

    Work with the user, one question at a time, to complete the requirements document (docs/claudex/<slug>/01-requirements.md). Run by the orchestrator (parent). Stays out of design and implementation.

    Also in 3 projects that use this

  • EternallLightSkill

    orchestrate-plan

    Use when executing a locked, reviewed PLAN.md by delegating the implementation to visible worker agents in Orca, herdr, or cmux ONE PHASE at a time — splitting the plan into context-window-sized phases, giving every phase a pristine worker context, and (when the plan touches INDEPENDENT repos) running one worker per repo IN PARALLEL. Triggers on "run the plan with a worker", "execute the plan in the other pane", "split the plan into phases and build it with workers", "build the backend and frontend in parallel panes". Not for edits you can finish inline; outside Orca, herdr, or cmux use tgc-skills:orchestrate.

    Also in 3 projects that use this

  • sson0-erSkill

    record-evidence

    How to record external facts (docs, command output, codebase findings) as evidence and design choices as decisions. Used by the researcher, designer and reviewer agents.

    Also in 3 projects that use this

  • PinkneyJiangSkill

    improve-architecture

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

    Also in 4 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 4 projects that use this

  • xfstudioSkill

    reverse-engineer

    Expert reverse engineer specializing in binary analysis,

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

34 rules. 0 are common, 25 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 144 edited versions we read keep these.

  • 25

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

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

    Use this skill when running a multi-chunk implementation program in pika where you need to sequence work, delegate bounded subtasks, and …

    line 8
  2. Distinctive:

    Keep one integration worktree/branch for the active program.

    line 12
  3. Distinctive:

    Use one implementation worker on the critical path.

    line 13
  4. Distinctive:

    Use one explorer/reviewer in parallel to audit assumptions, stale usage, and regressions.

    line 14
  5. Distinctive:

    Add a second implementation worker only when the write sets are clearly disjoint.

    line 15
  6. Very specific:

    Run ./scripts/agent-brief once per new worktree session before substantial work.

    line 19
  7. Distinctive:

    Do not keep doing large cleanup work on a shared scratch branch.

    line 20
  8. Distinctive:

    If two chunks may conflict, put them in separate worktrees immediately instead of hoping the merge will be easy.

    line 21
  9. Very specific:

    Keep a local untracked JOURNAL.md in the worktree for simplification opportunities, abstraction ideas, and cleanup candidates noticed in …

    line 22
  10. Distinctive:

    Do not widen the active chunk just because the journal grew.

    line 25
  11. Distinctive:

    Before declaring the broader project done, review the journal and explicitly decide what to land now vs leave for later.

    line 27
  12. Distinctive:

    Prefer deleting migration scaffolding over layering more compatibility code on top.

    line 32
  13. Distinctive:

    Keep prompts aggressive, but scoped to one architectural seam at a time.

    line 33
  14. Distinctive:

    do targeted live validation when the change affects hosted or remote CI paths

    line 37
  15. Distinctive:

    Do not run multiple staged Linux remote lanes concurrently from the same worktree if they share the default remote prepared-output root.

    line 42
  16. Distinctive:

    If parallel staged Linux remote validation is required, isolate it first:

    line 44
  17. Distinctive:

    should avoid editing files unless explicitly asked

    line 63
  18. Distinctive:

    Prefer forge-native flow for real checkpoints.

    line 67
  19. Distinctive:

    ensure the branch is dedicated, not a shared scratch branch

    line 70
  20. Very specific:

    After a chunk is locally green, push a dedicated branch immediately and use forge/ph status as the canonical checkpoint before starting the …

    line 72
  21. Distinctive:

    If a remote scratch branch has moved independently, do not fight it.

    line 74
  22. Distinctive:

    Treat migration-only env knobs and selector logic as debt.

    line 80
  23. Distinctive:

    When a review finds “the real runtime works, but CI reconstructs it differently,” make aligning CI to the real runtime the next chunk.

    line 81
  24. Very specific:

    When a hosted/forge flow runs tooling from a temporary worktree, check whether the tool’s state root is implicitly anchored to cwd before …

    line 82
  25. Distinctive:

    If the worktree is ephemeral, persist the tool state outside it first.

    line 83
  26. Very specific:

    When a producer already emits structured events and has loadable run metadata, inspect the consumer seam before inventing a new protocol.

    line 84
  27. Very specific:

    If a tool already emits stable run IDs, make run_id plus that shared state root enough to reload run records, logs, and artifacts after …

    line 88
  28. Distinctive:

    When parity is green, remove stale exclusions immediately and prove the normal default path.

    line 89
  29. Distinctive:

    When guest/runtime behavior moves into an Incus image, refresh/import the remote image before live validation.

    line 91
  30. Very specific:

    When replacing writeShellScript/store-backed wrappers with guest-local scripts, inspect the realized store object on pika-build:

    line 93
  31. Distinctive:

    verify the shebang is at byte 0

    line 95
  32. Distinctive:

    verify the mode is still executable

    line 96
  33. Distinctive:

    do not assume a script generated inside a Nix build stayed runnable just because the source text looked right

    line 97
  34. Very specific:

    After deleting a host-store seam, validate a low-risk control lane first (pre-merge-rmp is a good default) before burning time on heavier …

    line 98

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

Orchestrate

Use this skill when running a multi-chunk implementation program in pika where you need to sequence work, delegate bounded subtasks, and keep checkpoints landable.

Default Shape

  • Keep one integration worktree/branch for the active program.
  • Use one implementation worker on the critical path.
  • Use one explorer/reviewer in parallel to audit assumptions, stale usage, and regressions.
  • Add a second implementation worker only when the write sets are clearly disjoint.

Worktree Rules

  • Run ./scripts/agent-brief once per new worktree session before substantial work.
  • Do not keep doing large cleanup work on a shared scratch branch. Create a dedicated branch per chunk or per program.
  • If two chunks may conflict, put them in separate worktrees immediately instead of hoping the merge will be easy.
  • Keep a local untracked JOURNAL.md in the worktree for simplification opportunities, abstraction ideas, and cleanup candidates noticed in the weeds.
    • Capture the note quickly and keep moving.
    • Capture abstraction opportunities too, especially when you deliberately choose a smaller tactical seam over a larger redesign.
    • Do not widen the active chunk just because the journal grew.
    • Triage the journal at the end of the broader project or migration once the primary seams are landed.
    • Before declaring the broader project done, review the journal and explicitly decide what to land now vs leave for later.

Chunking Rules

  • Make each chunk end in a truthful, landable state.
  • Prefer deleting migration scaffolding over layering more compatibility code on top.
  • Keep prompts aggressive, but scoped to one architectural seam at a time.
  • After each chunk:
    • review the result
    • validate locally
    • do targeted live validation when the change affects hosted or remote CI paths
    • upstream or checkpoint before starting the next risky chunk

Staged Linux Remote Safety

  • Do not run multiple staged Linux remote lanes concurrently from the same worktree if they share the default remote prepared-output root.
  • The default remote work dir (/var/tmp/pikaci-prepared-output) is collision-prone for parallel runs from one worktree.
  • If parallel staged Linux remote validation is required, isolate it first:
    • separate worktrees
    • separate remote work dir roots
    • or separate snapshot/request ids with guaranteed non-overlap

Delegation Pattern

For each chunk:

  1. Local orchestrator:
    • identify the architectural seam
    • inspect the current code enough to write a concrete prompt
    • decide what should stay local vs delegated
  2. Worker:
    • owns the implementation write set
    • runs required checks
    • reports exact live validation, not just local tests
  3. Explorer/reviewer:
    • searches for stale usages, hidden consumers, rollout regressions, and misleading docs/comments
    • should avoid editing files unless explicitly asked

Landing Pattern

  • Prefer forge-native flow for real checkpoints.
  • Land or checkpoint before opening the next risky branch.
  • Before pushing:
    • ensure the branch is dedicated, not a shared scratch branch
    • inspect divergence from origin/master and the tracked remote branch
  • After a chunk is locally green, push a dedicated branch immediately and use forge/ph status as the canonical checkpoint before starting the next risky chunk in a new worktree or branch.
  • If a remote scratch branch has moved independently, do not fight it. Push a dedicated branch instead.
  • Land early; otherwise collapse to one integration branch.

Project-Specific Heuristics

  • In CI/runtime work, prefer Nix-declared runtime contracts over imperative bash assembly in Rust.
  • Treat migration-only env knobs and selector logic as debt. Hard-cut them once the default path is real.
  • When a review finds “the real runtime works, but CI reconstructs it differently,” make aligning CI to the real runtime the next chunk.
  • When a hosted/forge flow runs tooling from a temporary worktree, check whether the tool’s state root is implicitly anchored to cwd before you design API/log/artifact integrations around it. If the worktree is ephemeral, persist the tool state outside it first; otherwise every “structured” run contract will collapse back into flattened subprocess output.
  • When a producer already emits structured events and has loadable run metadata, inspect the consumer seam before inventing a new protocol. In this repo, pikaci already had JSONL lifecycle events and log metadata; the real gap was that pika-git flattened and discarded the durable state.
  • For temp-worktree CI in particular, prefer a single service-owned persistent state root over per-worktree .state trees. If a tool already emits stable run IDs, make run_id plus that shared state root enough to reload run records, logs, and artifacts after worktree cleanup.
  • When parity is green, remove stale exclusions immediately and prove the normal default path.
  • Validate remote-authoritative paths.
  • When guest/runtime behavior moves into an Incus image, refresh/import the remote image before live validation. Otherwise image drift can masquerade as a runtime regression.
  • When replacing writeShellScript/store-backed wrappers with guest-local scripts, inspect the realized store object on pika-build:
    • verify the shebang is at byte 0
    • verify the mode is still executable
    • do not assume a script generated inside a Nix build stayed runnable just because the source text looked right
  • After deleting a host-store seam, validate a low-risk control lane first (pre-merge-rmp is a good default) before burning time on heavier desktop/OpenClaw lanes.
  • For hosted pika-git CI, prefer one deterministic shared pikaci state root near the forge state directory over per-run scratch dirs. If run_id is the durable key, make the state root stable enough that web/API code can load run records and logs later without requiring a DB migration.

Minimal Output Contract

At the end of each chunk, be able to state:

  • what architectural seam changed
  • what migration/scaffolding was deleted
  • what exact validations passed
  • what remains, if anything
  • what the next chunk should attack

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.