Skip to content
Back to skills

Orchestrator Sequences

ASecurity

Canonical reusable orchestration procedures for the ClosedLoop planning/implementation orchestrators — PLAN_VALIDATION_SEQUENCE and AWAITING_USER_SEQUENCE. Single source of truth shared by prompts/prompt.md (full loop), prompts/plan-prompt.md (/code:create-plan) and prompts/execute-prompt.md (/code:execute-implementation), which each load standalone and cannot reference one another at runtime. Triggers: - An orchestrator phase needs full plan validation (structural + semantic) — run PLAN_VAL...

  • 121 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
ai-agentspythonbash

Works with

  • terminal

Security analysis

A100/100

Scanned August 31, 2026

npx -y skills add closedloop-ai/claude-plugins --skill orchestrator-sequences --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orchestrator Sequences?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orchestrator Sequences
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/closedloop-ai-orchestrator-sequences/badge)](https://www.skillsdirectory.com/skills/closedloop-ai-orchestrator-sequences)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: orchestrator-sequences
description: |
  Canonical reusable orchestration procedures for the ClosedLoop planning/implementation orchestrators — PLAN_VALIDATION_SEQUENCE and AWAITING_USER_SEQUENCE. Single source of truth shared by prompts/prompt.md (full loop), prompts/plan-prompt.md (/code:create-plan) and prompts/execute-prompt.md (/code:execute-implementation), which each load standalone and cannot reference one another at runtime.

  Triggers:
  - An orchestrator phase needs full plan validation (structural + semantic) — run PLAN_VALIDATION_SEQUENCE.
  - An orchestrator reaches a hard stop that requires user action before continuing — run AWAITING_USER_SEQUENCE.
---

# Orchestrator Reusable Procedures

These two procedures are referenced by name throughout the orchestrator prompts (`prompt.md`, `plan-prompt.md`, `execute-prompt.md`). They live here as the single source of truth so a change propagates to all three orchestrators at once. Substitute `$CLOSEDLOOP_WORKDIR` with the literal resolved workdir path in any subagent prompt (never the literal string `$CLOSEDLOOP_WORKDIR`).

## PLAN_VALIDATION_SEQUENCE

Use this sequence whenever a phase needs full plan validation (structural + semantic):
1. Activate `code:plan-validate` skill (runs Python script against $CLOSEDLOOP_WORKDIR)
2. If `FORMAT_ISSUES`: launch @code:plan-writer to fix format issues, then re-activate `code:plan-validate`
3. If `VALID`: launch @code:plan-validator with prompt: "WORKDIR=$CLOSEDLOOP_WORKDIR. SEMANTIC ONLY: Check semantic consistency of $CLOSEDLOOP_WORKDIR/plan.json — verify storage/query alignment and task/architecture decision consistency. Skip structural validation (already passed)."
4. If semantic check finds issues: launch @code:plan-writer to fix, then re-activate `code:plan-validate`

## AWAITING_USER_SEQUENCE

Use this sequence at any hard-stop that requires user action before continuing. The caller supplies the per-site `phase`, `reason`, `file` (path or null), and `command` (the resume command — built from the resolved `CLOSEDLOOP_ORIGINAL_ARGS` value, never the literal string `$ARGUMENTS`):
1. **FIRST** — Write state.json with AWAITING_USER status:
   `echo '{"phase": "<current phase>", "status": "AWAITING_USER", "reason": "<why>", "userAction": {"description": "<what user should do>", "file": "<path or null>", "command": "<resume command>"}, "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > $CLOSEDLOOP_WORKDIR/state.json`
2. Record the native-command terminal iteration once:
   `bash "$CLAUDE_PLUGIN_ROOT/scripts/record_native_iteration_once.sh" "$CLOSEDLOOP_WORKDIR" 2>/dev/null || true`
3. **ONLY AFTER state.json is written** — Output your command's completion promise: `<promise>PLAN_COMPLETE</promise>` for `/code:create-plan`, `<promise>IMPLEMENTATION_COMPLETE</promise>` for `/code:execute-implementation`, or `<promise>COMPLETE</promise>` for the full `/code:code` loop. Use the single promise token defined by your own prompt.
4. Tell the user what to do (review file, fix issues, run command)
5. **HARD STOP** — Do not continue even if the user asks

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.