session-orchestrator
Session-level orchestration — wave planning, VCS integration, quality gates, persistence, and safety checks
pinned to #42d8250updated 3 weeks ago
Ask your AI client: “install plugins/session-orchestrator”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install plugins/session-orchestratormetahub onboarded this repo on the author's behalf.
If you own github.com/Kanevry/session-orchestrator on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
44
Last commit
3 weeks ago
Latest release
published
- #agent-orchestration
- #agentic-ai
- #ai-agents
- #ai-coding
- #anthropic
- #claude
- #claude-code
- #claude-code-plugin
- #claude-code-plugins
- #claude-code-skills
- #code-review
- #codex
- #cursor
- #developer-tools
- #github
- #gitlab
- #mcp
- #quality-gates
- #session-management
- #subagents
What's bundled
Items extracted from this plugin's manifest + directory tree.
Skills (43)
skills/_sharedskills/architectureUse when the user asks to improve architecture, find refactoring opportunities, surface deepening opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigab…skills/autopilot>skills/bootstrap>skills/brainstormUse when you have a feature idea but the scope or UX is still ambiguous — runs a lightweight Socratic design dialogue (3-5 AUQ rounds) and writes a spec markdown file. Use BEFORE /plan feature when…skills/claude-md-drift-checkUse when detecting drift between CLAUDE.md (or AGENTS.md, the Codex CLI alias) / _meta narrative and live repository state. Nine checks: absolute-path resolution, 01-projects/ count claims, issue-r…skills/convergence-monitoring>skills/daily>
Commands (8)
/autopilot-multiPhase D `--multi-story` autopilot orchestrator. Runs N parallel issue pipelines in isolated git worktrees with per-loop kill-switches. v1 thin-slice — dry-run plan + basic apply mode. The user has …/autopilotYou are entering autonomous session-orchestration mode. The user has invoked `/autopilot` with arguments: **$ARGUMENTS**/bootstrap**TL;DR — for first-time users:** Run `/bootstrap` with no flags. The skill auto-detects the right tier (fast/standard/deep) from your repo, recommends one with a one-line reason, and asks **a sing…/brainstormInvokes the `brainstorm` skill. Produces `docs/specs/YYYY-MM-DD-<slug>-design.md` after the user approves a design approach. HARD-GATE prevents any code or implementation work until the design is u…/closeThe user wants to end the current session./debugInvokes the `debug` skill. Runs 4 phases (Root Cause → Pattern → Impact → Solution) and writes an artifact to `.orchestrator/debug/<session>-<n>.md` before any fix code is written./discoveryThe user wants to run systematic quality discovery. Invoke the discovery skill with scope: **$ARGUMENTS** (if empty, default to `all`)./dispatcherEnumerates candidate repos below the confinement root, resolves free/busy from each repo's `session.lock` lease, ranks the FREE ones by backlog priority × staleness × readiness, recommends the sing…
Subagents (8)
schemasanalystUse this agent for read-only PRD-quality review. Checks acceptance-criteria specificity, scope drift detection, and completeness of /plan output. <example>Context: /plan feature produced a PRD. use…architect-reviewerUse this agent for read-only architectural audits between waves. Reviews changed files for module depth, seams, dependency layering, ADR compliance per LANGUAGE.md vocabulary. <example>Context: Aft…code-implementerUse this agent for feature implementation, API development, refactoring, and general code changes. Handles backend logic, API routes, service layers, and cross-cutting concerns. <example>Context: W…db-specialistUse this agent for database work — schema design, migrations, queries, indexes, and database functions. Handles SQL, ORMs, and database architecture decisions. <example>Context: New feature require…dialectic-deriverUse this agent when reasoning over top-N learnings + last-K sessions + existing peer cards to derive updates to USER.md / AGENT.md. Called via /evolve --dialectic mode by the evolve skill. Reads in…docs-writerUse this agent when documentation needs to be generated or updated as part of a session — user-facing READMEs, dev-focused CLAUDE.md sections, or vault narratives (context.md, decisions.md, people.…memory-proposal-collectorReference documentation (NOT a dispatchable agent) for the coordinator-direct AUQ rendering flow at session-end Phase 3.6.3. The coordinator collects proposals from `.orchestrator/metrics/proposals…
Hooks (4)
- _lib
- hooks-codex
- hooks-cursor
- hooks-pi
Evaluation report
PassingAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.42d8250· 3 weeks ago
Select a category above to see its individual checks.
Release history
1- releasecurrent42d8250pass3 weeks ago
Contents
Turn ad-hoc agent sessions into a repeatable loop with verification gates — loop engineering for software work. You design the loop (research → plan → execute in waves → close); Session Orchestrator runs it on top of your existing agent, with the guards, telemetry, and cross-session memory that keep a long agent run honest. Inter-wave reviews catch regressions before they ship; carryover issues mean loose ends get tracked, not lost.
Works with Claude Code, Codex CLI, Cursor IDE, and Pi — the same skills and commands across all four, with platform-adapted hooks and enforcement (see Platform support). Community plugin (MIT, community-maintained) for solo devs and small teams.
A session in three commands
/session feature # research + Q&A — inspect git, issues, history, then agree on scope
/go # execute in five typed waves (fixed roles), with a quality gate between each
/close # verify every item, commit cleanly, file carryover issues for the rest
That is the whole loop. /plan and /evolve extend it (see Lifecycle), but you can start with just these three.
Install
Prerequisite: Node.js 24 or later (
node --version). v3.x runs as ES modules and needs a real Node runtime. Install Node.js.
The two paths below differ only by install mechanism, not capability or tier: Claude Code pulls from the plugin marketplace; every other platform clones the repo. The same skills and commands ship to all four.
Claude Code (plugin marketplace)
Run these two slash commands inside Claude Code (not in a shell):
/plugin marketplace add Kanevry/session-orchestrator
/plugin install session-orchestrator@kanevry
Then install Node dependencies once (hooks import zx) and restart Claude Code:
cd "$(claude plugin dir session-orchestrator 2>/dev/null || echo ~/.claude/plugins/session-orchestrator)"
npm install
Codex CLI, Cursor IDE & Pi (git clone)
git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator
cd ~/Projects/session-orchestrator && npm install
node scripts/codex-install.mjs # Codex CLI
node scripts/cursor-install.mjs /path/to/your/project # Cursor IDE
node scripts/pi-install.mjs /path/to/your/project --settings-only # Pi
Setup guides: Codex · Cursor IDE · Pi. Per-IDE notes on CLAUDE.md vs AGENTS.md: instruction-file-resolution.
Quick Start
Add a ## Session Config section to your project's CLAUDE.md (Claude Code and Cursor IDE) or AGENTS.md (Codex CLI and Pi) — see instruction-file-resolution for which file each platform reads. The smallest valid config is seven fields:
## Session Config
test-command: npm test
typecheck-command: npm run typecheck
lint-command: npm run lint
agents-per-wave: 6
waves: 5
persistence: true
enforcement: warn
Everything else is opt-in. See docs/session-config-template.md for the full template and docs/session-config-reference.md for the canonical type and default reference.
What you get
- 42 skills for the session lifecycle (start, plan, execute, close, evolve), discovery, vault sync, MCP authoring, debugging, brainstorming, plan grilling, persona panels, cross-repo dispatch, learning→rule reconciliation, audits, and more
- 22 slash commands (
/session,/go,/close,/discovery,/plan,/grill,/evolve,/autopilot,/dispatcher,/reconcile,/test,/debug, …) - 14 typed subagents (code-implementer, test-writer, security-reviewer, session-reviewer, qa-strategist, architect-reviewer, …)
- 10 hook event types enforcing scope, blocking destructive commands, gating templates-first, capturing telemetry — full on Claude Code; experimental, post-hoc, or bridged on the other platforms (Platform support)
- 10,000+ vitest tests run on every commit (telemetry methodology)
Full component inventory: docs/components.md.
Lifecycle at a glance
flowchart TD
A["/plan [feature|retro]"] -->|optional, defines WHAT| B["/session [type]"]
B -->|research + Q&A| C["/go"]
C -->|5 waves with quality gates| D["/close"]
D -->|verifies + commits| E["/evolve [analyze]"]
E -->|extracts cross-session learnings| B
style C fill:#1f6feb,color:#fff
style D fill:#238636,color:#fff
/plan is optional — you can create issues manually and jump straight to /session. /evolve runs deliberately after 5+ sessions, not automatically.
How it works
Most agentic-coding tools jump straight into writing code. Session Orchestrator adds a structured loop on top: research first, agree on scope, then execute in five typed waves with verification gates between them.
flowchart LR
W1["1·Discovery<br/>read-only audit"] --> G1{Gate}
G1 --> W2["2·Impl-Core<br/>primary code"]
W2 --> G2{Gate}
G2 --> W3["3·Impl-Polish<br/>integration, edges"]
W3 --> G3{Gate}
G3 --> W4["4·Quality<br/>simplify + tests"]
W4 --> G4{Full Gate}
G4 --> W5["5·Finalization<br/>commit + close"]
style G4 fill:#d29922,color:#000
When you type /session feature:
- Phase analysis runs in parallel — git state, open issues, recent commits, SSOT freshness, resource health, and prior-session memory are all inspected, then distilled into a structured Session Overview with a recommendation, not a wall of raw data.
- You agree on scope — through a tool-rendered picker (Claude Code) or a numbered list (Codex / Cursor / Pi). The orchestrator has an opinion and tells you what it would do.
- The plan is decomposed into five waves — Discovery (read-only), Impl-Core, Impl-Polish, Quality, Finalization. Each wave has a defined purpose and a deliverable; agent counts scale by session type.
/goexecutes — agents work in parallel within a wave. A session-reviewer audits the output between waves on eight dimensions; only findings at confidence ≥ 80 reach you./closeships it — every planned item is verified, quality gates run full, and unfinished work becomes carryover issues. Files are staged individually, so parallel sessions can't stomp each other.
Two complementary commands round out the loop: /plan runs before a session when you need a PRD or retrospective; /evolve runs occasionally to surface patterns across sessions and feed them back at the next start.
The system is markdown-driven config plus a thin Node runtime — skills, commands, and agents are Markdown with YAML frontmatter; scripts/lib/*.mjs and hooks/*.mjs handle dispatch, validation, and telemetry. Everything is plain text: if something goes wrong, you can read every file and see what happened.
Why this design
- Five typed waves, not one big batch. Discovery first, so implementers start with shared context. Impl-Core before Impl-Polish, so architecture lands before integrations. Quality runs a simplification pass on AI-generated code before tests are written — otherwise tests pin the AI patterns into place.
- Inter-wave reviews, not just end-of-session. Catching regressions between waves — not only at the end — stops a bad pattern from propagating into later work; the confidence floor filters speculative criticism so only high-signal findings reach you.
- State persists across crashes.
STATE.mdrecords wave progress and deviations; the next/sessionoffers to resume from the last completed wave. - Hooks enforce, not just warn. A pre-Bash guard blocks destructive shell commands, and pre-Edit scope enforcement blocks writes outside an agent's allowed paths — in main sessions and subagent waves alike (specifics in Safety). This hard enforcement is full on Claude Code; it degrades to experimental / post-hoc / bridged on Codex CLI, Cursor IDE, and Pi (see Platform support).
- Cross-session learning is opt-in and inspectable. Every session writes a record; after 5+ sessions
/evolve analyzeextracts confidence-scored patterns you can read and prune. Nothing is hidden. - VCS dual support, no lock-in. Auto-detects GitLab or GitHub from your remote and drives the full lifecycle for both.
Recent highlights (v3.11.0)
Every release is additive and backward-compatible. Highlights of the v3.11.0 line:
- Self-healing session ledger — a crashed session no longer leaves an orphaned lock or a hole in the session history: the SessionEnd hook backfills an
abandonedledger entry and releases the session lock deterministically, and a host-wide reaper (dry-run by default) cleans up whatever is left. - Learning-store safety — every learning rewrite snapshots a backup first and can be validated without writing; dialect normalization and a mechanical expiry sweep keep the cross-session learning store readable and lean instead of silently rotting.
- Vault mirroring hardened — readable note slugs, per-record crash resilience, zero dangling wiki-links, and a host-local pseudonym map so private repo names never reach shared notes.
- Hardened CI — the GitHub mirror can no longer report a silent green (fail-closed test verifier on every run), the CI toolchain is pinned with checksums, and a package-manager guard catches lockfile/store drift before it corrupts a run.
- Leaner instruction surface — tier-aware rule loading lets wave agents skip coordinator-only rules, and instruction-surface trims cut the always-on directive budget by ~8%.
Previous line (v3.10.0): cross-repo /dispatcher, learning → rule /reconcile, opt-in skill self-evolution, named multi-vault routing, instruction-budget guard.
Full version history: CHANGELOG.md.
Comparison
| Capability | Session Orchestrator | Manual CLAUDE.md | Other orchestrators |
|---|---|---|---|
| Session lifecycle (start → plan → execute → close) | Full, automated | Manual | Partial |
| Typed waves with quality gates | 5 roles, progressive verification | None | Batch execution |
| Session persistence and crash recovery | STATE.md plus memory files | None | Partial |
| Scope and command enforcement hooks | PreToolUse with strict / warn / off | None | None |
| Circuit breaker and spiral detection | Per-agent, with recovery | None | Partial |
| Cross-session learning | Confidence-scored learnings | None | None |
| VCS integration (GitLab + GitHub) | Dual, auto-detected | Manual CLI | Usually GitHub only |
| Session close with carryover | Verified, with issue creation | Manual | Partial |
The design goal is engineering quality: every wave exits verified, every unfinished issue gets a carryover ticket, every session closes with a clean commit. A detailed head-to-head vs. maestro-orchestrate is in docs/components.md.
Platform support
| Feature | Claude Code | Codex CLI | Cursor IDE | Pi |
|---|---|---|---|---|
| All 22 commands | Native slash commands | Native plugin commands | Rules-based (.mdc) | Prompt templates |
| Parallel agents | Agent tool | Multi-agent roles | Sequential only | Sequential (parallel planned) |
| Session persistence | .claude/STATE.md | .codex/STATE.md | .cursor/STATE.md | .pi/STATE.md |
| Scope enforcement | PreToolUse hooks | Hooks (experimental) | afterFileEdit (post-hoc) | tool_call bridge |
| AskUserQuestion | Native tool | Numbered-list fallback | Numbered-list fallback | Numbered-list fallback |
| Quality gates | Full | Full | Full | Full |
All platforms share the same skills, commands, hooks, and scripts; platform-specific adaptation lives in scripts/lib/platform.mjs. OS: macOS and Linux are first-class and run in CI (ubuntu-latest, macos-latest). Windows runs natively (all paths via path.join, tmp via os.tmpdir()) but is not covered by CI — treat it as best-effort and run smoke tests locally when changing OS-sensitive code. Cursor and Pi have known event-coverage caveats — see docs/cursor-setup.md and docs/pi-setup.md.
Safety
hooks/pre-bash-destructive-guard.mjs blocks destructive shell commands (git reset --hard, rm -rf, git push --force, and more) in the main session and in subagent waves. Policy lives in .orchestrator/policy/blocked-commands.json. Bypass per session only for intentional maintenance:
allow-destructive-ops: true
The rule source of truth is .claude/rules/parallel-sessions.md (PSA-003), vendored to consumer repos via /bootstrap.
Development
git clone https://github.com/Kanevry/session-orchestrator.git && cd session-orchestrator
npm install
npm test # vitest
npm run lint # ESLint v10 + Prettier
npm run typecheck # node --check on every .mjs file
.npmrc ships with ignore-scripts=true (supply-chain defence), so Husky git hooks don't auto-wire on install — run npx husky once after cloning. git commit then runs gitleaks → owner-privacy scan → lint-staged → commitlint. CI re-runs everything, plus more.
Contributor docs: Plugin Architecture (v3) · CONTRIBUTING.md · agent authoring spec.
Support & scope
Session Orchestrator is provided as-is — a community project with no SLA, no commercial support contract, and no guaranteed response time. Maintenance is best-effort.
- Questions, ideas, show-and-tell → GitHub Discussions
- Bugs and feature requests → Issues
What it is not:
- Not an official product of any agent vendor. An independent, community-maintained project — not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, Cursor, or any agent it integrates with. (It is distributed through the Claude Code plugin marketplace, but is not an Anthropic product.)
- Not a replacement for Claude Code / Codex CLI / Cursor / Pi. It is a workflow layer that runs on top of your existing agent — you still need one of those installed.
- Not a hosted service. Runs locally — no server, account, or cloud component.
- No guarantee that telemetry numbers transfer to your repo. Reported test counts and metrics describe this repository under its own conditions (details). Your results will vary by stack, project size, and configuration.
Documentation
- User Guide — installation, config reference, workflow walkthrough, FAQ
- Components & Reference — full skill/command/agent/hook inventory, repository anatomy, comparisons
- Plugin Architecture (v3) — contributor guide, layering, hook anatomy, testing
- Migration to v3 — upgrade path from v2.x, known issues, rollback
- Telemetry claims — how reported metrics are measured, and why they may not transfer
- Example Configs — Session Config examples for Next.js, Express, Swift
- CHANGELOG.md — version history
We follow Conventional Commits — see CONTRIBUTING.md.
Learn the method behind it
This plugin is a methodology turned into code. If you want the reasoning behind it — why execution runs in waves, why every wave ends at a verification gate, how to make an autonomous loop that actually finishes — those playbooks are taught hands-on at agenticbuilders.at:
- Multi-Agent Orchestration — leading several agents in coordinated waves: when parallelism pays, briefing subagents cleanly, turning failures into firm gates.
- Loop Engineering — designing autonomous loops that finish verifiably: done-conditions, verification gates, kill-switches.
The plugin is free and MIT. The courses are for going deeper, not a requirement for using it.
Links
License
Reviews
No reviews yet. Be the first.
Related
before-you-build
Production-ready workflow orchestration with 91 marketplace plugins, 199 local specialized agents, and 162 local skills - optimized for granular installation and minimal token usage
espalier-engineering
Train your AI coders the way you'd train a vine — discover your codebase's actual patterns, then encode them as rules, skills, agents, hooks, and a guided pipeline so generated code lands inside your conventions on the first try, not the fifth
superloopy
Lightweight loop harness with strict evidence gates — Claude Code edition.
mh install plugins/session-orchestrator