Hatch3r adhoc orchestrate

From hatch3r/hatch3r · View interactive version

Hatch3r adhoc orchestrate is an AI agent skill from the GitHub repository hatch3r/hatch3r. Scaffolds the ad-hoc Tier >= 2 orchestration protocol -- Per-Turn Pipeline-State Header, implementer delegation plan, End-of-Turn Delegation Attestation. Use for a multi-phase task with no registered command to avoid inline-implementation bypass mode.

How to use this skill

Skill file

Ad-Hoc Orchestration Scaffold

Quick Start

Task Progress:
- [ ] Step 0: Detect ambiguity (P8 B1)
- [ ] Step 1: Score the task tier (Tier >= 2 gate)
- [ ] Step 2: Emit the Per-Turn Pipeline-State Header
- [ ] Step 3: Build the delegation plan (no inline implementation)
- [ ] Step 4: Emit the End-of-Turn Delegation Attestation template
- [ ] Step 5: Verify the bypass-protection checklist

A multi-phase task driven by hand — research + implement + review, with no registered command running it — is still bound by the mandatory delegation contract in rules/hatch3r-agent-orchestration.md → Mandatory Delegation Directive (No Inline Implementation). The inline-implementation bypass mode is exactly this: running research and review sub-agents while inlining the implementation from the orchestrator turn, escaping the protocol because no command was invoked. This skill is the turnkey scaffold that closes that loophole — it does not perform the work; it emits the three required protocol blocks so the ad-hoc flow stays attributable.

Use this skill at the start of any multi-phase task at Tier >= 2 that is NOT already running under a registered command (which carries these blocks itself). When the work matches a registered intent, prefer the command: a commands/hatch3r-*.md command (e.g. hatch3r-workflow, hatch3r-board-pickup) for a content workflow it already covers.

Step 0 — Detect Ambiguity (P8 B1)

Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target files, or irreversibility. If any are found, ask the user via the platform-native question tool per agents/shared/user-question-protocol.md. Do not proceed under silent assumption. Default path, not an exception. Triggers for THIS skill: the task tier is genuinely uncertain (Tier 1 vs Tier 2 changes whether the protocol even applies), the set of files to mutate is unbounded, or a registered command already covers the intent (route there instead of scaffolding).

Step 1: Score the Task Tier (Tier >= 2 Gate)

The protocol binds at Tier 2 and Tier 3 only. Score the task per the hatch3r-deep-context rule (deep-context score >= 3 → Tier >= 2):

Record the score and the one-line rationale. The tier is the load-bearing input to every block below.

Step 2: Emit the Per-Turn Pipeline-State Header

At the START of every assistant turn that touches the task, emit the single-line header per rules/hatch3r-agent-orchestration.md -> Per-Turn Pipeline-State Header:

[hatch3r-pipeline: phase {1|2|3|4} | last: {agent} → {SUCCESS|PARTIAL|FAILED|BLOCKED|n/a} | next: {agent or "user-confirmation" or "complete"}]

Example first turn: [hatch3r-pipeline: phase 1 | last: n/a | next: hatch3r-researcher]

Phase mapping for an ad-hoc task (mirror the four-phase pipeline):

| Phase | Meaning | Driving agent |

|-------|---------|---------------|

| 1 | Research / context gathering | hatch3r-researcher |

| 2 | Implementation | hatch3r-implementer |

| 3 | Review loop | hatch3r-reviewer ↔ hatch3r-fixer |

| 4 | Final quality + summary | parallel specialists, then iteration summary |

A missing header on a Tier >= 2 turn is a self-detectable drift signal — halt and re-ground rather than continuing blind.

Step 3: Build the Delegation Plan (No Inline Implementation)

The hard constraint: the orchestrator turn MUST NOT call any code-writing tool (Edit, Write, MultiEdit) directly. Code mutation flows ONLY through the Task tool spawning hatch3r-implementer (Phase 2) or hatch3r-fixer (Phase 3) per rules/hatch3r-agent-orchestration.md -> Mandatory Delegation Directive (No Inline Implementation). There is no Tier-1 carve-out here — Tier 1 exits at Step 1.

Produce a delegation plan before touching any file:

Delegation Plan:
  Phase 1 — research:   hatch3r-researcher, modes: {…}, depth: {quick|standard|deep}
  Phase 2 — implement:  hatch3r-implementer × {N}  ({1 per independent module}; correlation_id: {uuid})
  Phase 3 — review:     hatch3r-reviewer ↔ hatch3r-fixer (max 4 iterations)
  Phase 4 — quality:    {applicable specialists per the Phase 4 Specialist Trigger Table}
  sub_agents_spawned:   { count: {N}, rationale: {one-sentence task-decomposition justification}, task_structure: {parallelizable|sequential|mixed} }

Fan-out scales with task decomposition, not token budget (P8 B2 dominates P7): N independent modules → N parallel Phase-2 implementers; serialize only on true dependency edges (shared files, ordered handoffs). Every delegation prompt carries the confidence expression requirement and the correlation_id per the orchestration rule.

Step 4: Emit the End-of-Turn Delegation Attestation Template

Every turn that mutated files at Tier >= 2 emits the attestation block immediately BEFORE the Iteration Summary (beside it, not inside it — the recap contract stays verbatim), per rules/hatch3r-agent-orchestration.md -> End-of-Turn Delegation Attestation:

[hatch3r-delegation-attestation]
files_mutated_this_turn:
  - <relative path>: via <hatch3r-implementer | hatch3r-fixer> (proof: <delegation_proof_id>)
mutating_subagent_invocations: <integer>
inline_edits_by_orchestrator: none

Why it is forgery-resistant: the per-file delegation_proof_id is returned by hatch3r-implementer / hatch3r-fixer in their structured results (agents/hatch3r-implementer.md -> Return Structured Result; agents/hatch3r-fixer.md -> Return Structured Result). Quote it verbatim. A turn that skipped delegation has no delegation_proof_id to quote — its row is unattributable, which is a self-declared P8 B2 violation: halt and queue re-delegation next turn. inline_edits_by_orchestrator: none is the only accepted value in an ad-hoc flow (the hatch3r-quick-change Tier-1 carve-out does not apply outside that command).

Step 5: Bypass-Protection Checklist

Before declaring the turn complete, verify every item — a failed item is the inline-implementation bypass mode:

Error Handling

Definition of Done

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.