/oh-my-claudecode-research:orchestratefrom oh-my-claudecode-research
Internal primitive skill providing state-read, dispatch, evaluate, and loop phases for OMCR engines. Not user-invocable; engines like /iterate-revision compose these primitives.
Ships in oh-my-claudecode-research. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill ships the four primitives every OMCR engine depends on. It is
not something a user invokes directly — there is no /orchestrate
command and there should never be one. Engines (the user-facing skills
listed above) import its phase files and compose them.
If you are reading this because Claude Code's skill auto-discovery
surfaced it: please pick the engine you actually wanted to run, e.g.
/iterate-revision for revising a section against a reviewer.
When this skill's phase files are referenced from another skill, follow them exactly as written. Do not re-derive behavior from the primitives doc — that doc is the design source; these phase files are the implementation contract.
| # | Primitive | Purpose | File |
|---|---|---|---|
| 1 | state-read | Read + validate + bootstrap a state JSON under .claude/omcr-state/. | phases/01-state-read.md |
| 2 | dispatch | Invoke a persona subagent via the Agent tool with inlined prompt. | phases/02-dispatch.md |
| 3 | evaluate | Apply an engine-supplied verdict rule to the last output + state. | phases/03-evaluate.md |
| 4 | loop | Drive dispatch → evaluate → repeat with max_iter and budget safeties. | phases/04-loop.md |
Each phase is short by design — engines do the domain work, the primitives just keep state, dispatch, and counters honest.
Five files under .claude/omcr-state/ in the user's project. Layout is
flat — no logs/ subdirectory — per Phase 0 decision §1.
| File | Owner-by-convention | Append-only? |
|---|---|---|
paper.json | engines + /omcr-setup + /start-research | no |
reviews.json | engines that dispatch @reviewer | yes |
citations.json | @literature-curator + verify-citation skill | no |
figures.json | engines that dispatch @figure-descriptor + cropfig | no |
_run-log.jsonl | every engine (every run start + completion) | yes |
schema_version is a JSON string ("1" for now). On mismatch the
primitive warns and proceeds — there is no migration runner yet. See
Phase 0 decision §2 for the rationale and the deferred plan.
Full per-field documentation and populated examples live in:
../../develop/example-state/README.md — schema reference + populated examples../../develop/phase-0-primitives.md — original design docOwnership is convention only — there is no runtime enforcement.
Engines declare what they write via a writes: frontmatter field on
their SKILL.md (see "Composition contract" below).
An engine skill (e.g. skills/iterate-revision/SKILL.md) must:
List the orchestrate phases it imports in its ## Composition
section. Example:
## Composition
This engine imports the following primitives from `skills/orchestrate/`:
- `phases/01-state-read.md` — read `paper.json` + `reviews.json`
- `phases/02-dispatch.md` — dispatch `@paper-writer`, `@reviewer`
- `phases/03-evaluate.md` — verdict rule defined in `phases/04-evaluate.md` of this engine
- `phases/04-loop.md` — `max_iter` default 3, `on_iter_end: git-commit`
Declare writes: in frontmatter — list the state files this
engine mutates (e.g. writes: [paper, reviews]). Reviewers grep
writes: across skills/*/SKILL.md to audit which engines touch
which files. Append-only files (reviews, _run-log.jsonl) still
require declaration if the engine appends.
Declare cost_estimate_tokens: in frontmatter (optional but
recommended for Phase 3 autonomous mode) — a coarse constant the
/supervisor-drive scheduler uses for budget gating. Phase 3
decision §6 adds rolling-median actuals on top.
Provide a verdict rule. The engine's own phase files contain
the verdict-rule spec; orchestrate/phases/03-evaluate.md is the
primitive that applies it. The rule is passed in as data; the
primitive does not know engine-specific logic.
Never call another engine. Engines are leaves (Phase 2 decision
§5, Phase 3 decision §3). If composition between engines is needed,
/supervisor-drive is the only thing that may chain — and it
re-evaluates state between every step rather than invoking engines
from inside engines.
Each dispatch is one Agent-tool invocation. Engines should budget
max_iter * len(dispatch_plan) calls. The loop primitive records
actual tokens_used to _run-log.jsonl after each iteration. There
is no pre-flight tokenizer (Phase 0 decision §6) — budget_tokens is
a post-hoc cap that triggers HALT at the iteration boundary if
cumulative usage exceeds the cap.
max_iter is hard. The loop never silently exceeds it — when
reached without DONE/BLOCKED, the loop emits HALT and exits cleanly..claude/omcr-state/*.json in a consistent state because each
primitive writes atomically (write-tmp + rename).Add a phase to orchestrate/phases/ only when every engine would
benefit. Engine-specific logic (e.g. "scan for [TBD: markers" from
/iterate-revision Phase 0 decision §1.2) goes in that engine's own
phase files. The four primitives here should stay at four for now.
If a fifth primitive looks tempting (e.g. "parallel dispatch fanout"), that is a Phase 3 concern — the autonomous supervisor is the only caller that can benefit, and concurrency is deferred per Phase 0 decision §4.
../../wiki/Orchestration-Model.md — public-facing pattern doc../../develop/decisions-summary.md — all 21 locked decisionswiki/Specializing.md — preset authoring (includes writes: and cost_estimate_tokens: frontmatter conventions)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchestrate, omcr, engine-primitives, state-management, agent-dispatch
npx claudepluginhub youngeun1209/oh-my-claudecode-research --plugin oh-my-claudecode-research18 skills in this plugin
/cropfigThree-step pipeline from a Keynote (.key) or PowerPoint (.pptx) deck to manuscript + outline. Func 1 exports vector PDFs per slide; func 2 crops them (vector preserved) and renders an outline-grade PNG from the same cropped artifact; func 3 copies PDFs into the LaTeX manuscript figures dir and PNGs into the outline.md figures dir, then inserts/updates image links after each result heading./figure-bakeDrive one figure from design idea to manuscript-ready vector PDF + outline-ready PNG. Loops `@figure-descriptor` → `@analysis-implementer` → `@reviewer` against a single fig-id in `figures.json`, with the `cropfig` skill auto-invoked at the end of each implement phase to keep manuscript + outline artifacts in lockstep. The third Phase 2 engine — a 3-agent loop, more complex than `/iterate-revision`'s 2-agent loop, and the only Phase 2 engine that executes real code per iteration. Safe to re-run; safe to resume after BLOCKED or HALT./iterate-revisionRevise one manuscript section against the reviewer team until DONE, BLOCKED, or HALT. Loops `@paper-writer` ↔ `@reviewer` with a venue-specific reviewer brief, recording every iteration's issues + verdict to `reviews.json` and updating `paper.json.sections[name]` status / iter. The first OMCR engine — a worked example of how to compose `skills/orchestrate/phases/*` primitives into a domain-specific loop. Safe to re-run; safe to resume after BLOCKED or HALT./literature-sweepFind, summarize, and verify N papers on a topic, then drop verified entries into `references.bib` and the literature summary CSV. Dispatches `@literature-curator` (one or many instances) over a CrossRef/OpenAlex candidate list, runs every survivor through the `verify-citation` skill, and writes the run summary to `citations.json.last_sweep`. Sequential by default; opt-in `--parallel N` (1 ≤ N ≤ 4) fan-out for speed. Safe to re-run; idempotent against duplicate DOIs (existing BibTeX entries are skipped, not double-added)./manuscript-scaffoldScaffold a LaTeX manuscript directory for a research project — copy the bundled skeleton (main.tex + sections/* + figures/ + references.bib + .gitignore + README), optionally apply a journal-specific documentclass from templates/journal-registry.json, optionally clone an Overleaf project and cache the Git credential helper (token never persisted to tracked files), commit on the default branch, and ask before pushing. Invoked by /start-research phase 6, but also standalone-callable when adding a manuscript dir to an existing project later./omcr-setupInstall OMCR infrastructure in a project — scaffold empty CLAUDE.md marker blocks (`## Project context` / `## Research stack` / `## Language preference`), create `.claude/agent-memory/` for the 6 core agents with canonical-template MEMORY.md, initialize empty `references.bib` + `references.csv`, and install a curated permission allowlist in `.claude/settings.json`. Does NOT ask about the user's research project (no working title / hypothesis / venue / preset interview). For that, run `/start-research` after this completes. Safe to re-run — never overwrites existing user content.Other plugins' skills for the same job