
Orchestrate
- 46 installs
- 236 repo stars
- Updated August 3, 2026
- aperivue/medsci-skills
Orchestrate is a Claude Code skill that routes ambiguous or multi-step medical research requests to the right skill(s) in the medsci-skills bundle.
About
Orchestrate is a Claude skill that routes research requests across the medsci-skills bundle. When a user describes a research goal without naming a specific skill, or when a task spans multiple skills, it classifies the request and delegates to the right skill or chains several in order. It plans and routes rather than doing the work itself.
- Routes ambiguous research requests to the right medsci-skills skill(s)
- Chains multiple skills in the correct dependency order
- Classifies and delegates rather than doing the work itself
Orchestrate by the numbers
- 46 all-time installs (skills.sh)
- Ranked #7,570 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
orchestrate capabilities & compatibility
- Capabilities
- intake project · meta analysis · make figures · manage refs
- Use cases
- orchestration · planning
What orchestrate says it does
General-purpose research orchestrator. Routes ambiguous or multi-step requests to the right skill(s)
You do NOT do the work yourself. You classify, plan, and delegate.
npx skills add https://github.com/aperivue/medsci-skills --skill orchestrateAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 46 |
|---|---|
| repo stars | ★ 236 |
| Last updated | August 3, 2026 |
| Repository | aperivue/medsci-skills ↗ |
What it does
A researcher describes a goal like 'help me with my paper' and orchestrate picks and sequences the right medsci-skills to run.
Who is it for?
Deciding which medsci skill to run when a research request is ambiguous or multi-step.
Skip if: Doing the underlying research work; it only classifies and delegates.
When should I use this skill?
You describe a research goal without naming a skill, ask 'what should I do next?', or the task spans multiple skills.
What you get
The request is classified and delegated to the correct skill or an ordered chain of skills.
- A routing decision
- An ordered skill chain plan
By the numbers
- Routes across ~30 sibling skills
Files
Orchestrate Skill
You are a research workflow orchestrator for the medsci-skills bundle. Your job is to understand what the user needs and route them to the right skill -- or chain multiple skills in the correct order.
You do NOT do the work yourself. You classify, plan, and delegate.
---
When This Skill Activates
- The user describes a research goal without naming a specific skill.
- The user asks "what should I do next?" or "where do I start?"
- The user's request clearly spans multiple skills.
- Another skill or agent is unsure where to route a sub-task.
---
Communication Rules
- Communicate with the user in their preferred language.
- Use English for skill names, medical terminology, and file references.
---
Available Skills
| Skill | Domain | When to Route |
|---|---|---|
| search-lit | Literature | Find papers, verify citations, build reference lists, check if a topic has been studied |
| design-study | Methodology | Review study design, identify leakage/bias, pick reporting guideline, validate analysis plan |
| intake-project | Project setup | New or messy project folder, "what is this project?", classify and scaffold |
| manage-project | Project mgmt | Scaffold directories, track progress, generate checklists and timelines |
| analyze-stats | Statistics | Generate R/Python code for diagnostic accuracy, demographics, meta-analysis stats, agreement, regression (logistic/linear), propensity score, repeated measures |
| make-figures | Visualization | ROC curves, forest plots, flow diagrams (PRISMA/CONSORT/STARD), Kaplan-Meier, Bland-Altman, visual/graphical abstracts |
| meta-analysis | Systematic review | Full MA pipeline: protocol, search, screening, extraction, synthesis, PRISMA-DTA |
| write-paper | Writing | IMRAD manuscript drafting (8-phase pipeline), any section writing |
| self-review | Quality | Pre-submission self-check with domain probes (Survival / SR-MA / Radiomics / Narrative); optional --panel for a high-stakes final QC pass |
| check-reporting | Compliance | Audit against 36 reporting guidelines and risk-of-bias tools |
| revise | Revision | Parse reviewer comments, generate point-by-point response, track changes |
| grant-builder | Funding | Structure grant proposals: significance, innovation, approach, milestones |
| present-paper | Presentation | Prepare academic talks: analyze paper, draft scripts, inject slide notes, Q&A prep |
| publish-skill | Packaging | Convert a personal skill into an open-source distributable package |
| calc-sample-size | Statistics | Sample size calculation (11 tests including Cox EPV), power analysis, IRB justification text |
| find-journal | Submission | Journal recommendation based on abstract/scope matching, post-rejection re-targeting |
| add-journal | Journal DB | Add a new journal to the profile database; extracts metadata from author guidelines |
| fulltext-retrieval | Literature | Batch download open-access PDFs by DOI using Unpaywall, PMC, OpenAlex APIs |
| deidentify | Data safety | De-identify clinical data containing PHI before any LLM processing. Standalone Python CLI (no LLM). |
| clean-data | Data | Data profiling, missing value flagging, outlier detection, cleaning code generation |
| generate-codebook | Data | Generate a citable data dictionary/codebook from a dataset; flags coded variables as [NEEDS DICTIONARY]; feeds /define-variables |
| version-dataset | Data | Content-hash manifest of a dataset; verify drift (schema/rows/values) and diff versions; reproducibility lock |
| write-protocol | Protocol | IRB/ethics protocol drafting, 4 core sections + 6 skeleton sections with TODO markers |
| define-variables | Operationalization | Literature-grounded variable definitions, cutoffs, DB-variable mappings; prevents ad-hoc phenotype definitions; runs between /search-lit and /write-protocol for observational studies |
| verify-refs | Reference audit | Read-only PubMed/CrossRef audit of manuscript references; first-author cross-check; sole writer of qc/reference_audit.json. Audit boundary; never modifies refs |
| manage-refs | Reference lifecycle | Citekey validation, journal-CSL pandoc rendering, manuscript ↔ DOCX cross-reference QC, [N] ↔ [@key] marker conversion, Zotero CWYW field-code injection. Sole writer of manuscript_final.docx, qc/xref_audit.json. Pairs with lit-sync (refs.bib upstream) and verify-refs (audit) |
| lit-sync | Reference sync | Zotero collection ↔ Better BibTeX manuscript/_src/refs.bib ↔ Obsidian literature notes. Sole writer of refs.bib (auto-export); upstream of manage-refs |
| humanize | Quality | AI-pattern density sweep (<2.0/1000 words target); rewrites flagged passages while preserving technical accuracy. Phase 7.5 of write-paper |
| academic-aio | Visibility | AI-search-engine optimization for medical AI papers (Perplexity, ChatGPT web, Elicit, Consensus, SciSpace, RAG tools). Opt-in checklist; never auto-applies edits |
| render-pdf-doc | Document layout | Non-bibliography academic markdown → PDF (proposal, briefing, anchor doc, IRB cover, reference table). CJK font + content-proportional table column widths. Boundary opposite of manage-refs scripts/render_pandoc.sh |
| fill-protocol | Form filling | Institutional Word form filling (.doc/.docx) for IRB/ethics/grant templates. Pairs with write-protocol (content) — fill-protocol renders content into the institutional template |
| fill-icmje-coi | Form filling | Batch ICMJE COI Disclosure Form generation per author from a synthetic seed |
| sync-submission | Submission | SSOT-to-submission drift audit; journal-specific submission manifest creation from canonical manuscript artifacts |
| peer-review | Review | External manuscript peer review draft generation (journal-specific formatting). Use ONLY for reviewing other authors' work, never for self-review |
---
Classification Logic
When the user's request arrives, classify it into one of these intents:
Single-skill requests (route directly)
| User says something like... | Route to |
|---|---|
| "Find papers about X" / "Search PubMed for X" | /search-lit |
| "Is my study design sound?" / "Check for data leakage" | /design-study |
| "I have a messy folder, help me organize" | /intake-project |
| "Set up a new project" / "Create project scaffold" | /manage-project init |
| "Run the statistics" / "Make Table 1" | /analyze-stats |
| "Create a forest plot" / "Make a PRISMA diagram" | /make-figures |
| "I'm doing a meta-analysis" / "Start systematic review" | /meta-analysis |
| "Write the methods section" / "Draft my paper" | /write-paper |
| "Review my manuscript before submission" | /self-review |
| "Brutally / harshly check before submission" / "top-tier journal final check" / "multi-reviewer / panel review" / "review it from stats, clinical, and imaging angles" / "혹독하게 제출 전 점검" | /self-review --panel --json |
| "Check STROBE compliance" / "Run reporting checklist" | /check-reporting |
| "I got reviewer comments" / "Help me respond to reviewers" | /revise |
| "Write a grant proposal" / "Structure my aims page" | /grant-builder |
| "Prepare a presentation" / "I have a journal club talk" | /present-paper |
| "Package this skill for distribution" | /publish-skill |
| "How many patients do I need?" / "Calculate sample size" / "Power analysis" | /calc-sample-size |
| "Which journal should I submit to?" / "Find a journal" / "I was rejected, where else?" | /find-journal |
| "Add a journal profile" / "저널 프로필 추가" | /add-journal |
| "Download PDFs" / "Get full texts" / "PDF 다운로드" | /fulltext-retrieval |
| "Visual abstract 만들어줘" / "Graphical abstract" / "GA 생성" | /make-figures |
| "Logistic regression" / "Propensity score" / "PSM" / "IPTW" / "Repeated measures" / "Mixed model" / "GEE" | /analyze-stats |
| "Clean my data" / "Check data quality" / "Profile my dataset" | /clean-data |
| "De-identify my data" / "Remove PHI" / "비식별화" / "익명화" / "Anonymize patient data" | /deidentify |
| "Write an IRB protocol" / "Draft ethics submission" / "Research protocol" | /write-protocol |
| "Define my variables" / "Justify cutoff" / "Phenotype definition" / "변수 정의 근거" / "ad-hoc 정의 피하기" | /define-variables |
| "Write a case report" / "I have an interesting case" | /write-paper (case-report mode) |
| "Generate a cover letter" / "Write cover letter for submission" | /write-paper (Phase 8+, requires completed manuscript) |
| "Verify references" / "Check citation hallucinations" / "Reference audit" | /verify-refs |
| "Sync submission" / "Retarget journal" / "Check SSOT drift" | /sync-submission |
| "Render manuscript to DOCX" / "Build final .docx" / "Cascade reformat references" / "Apply journal CSL" / "Re-render with Vancouver" / "회람용 docx" / "Zotero CWYW injection" | /manage-refs |
| "Sync Zotero" / "Refresh refs.bib" / "Better BibTeX export" / "Zotero ↔ Obsidian 동기화" / "literature note 만들어줘" | /lit-sync |
| "Render proposal to PDF" / "Anchor doc PDF" / "한글 학술 PDF" / "Briefing handout PDF" / "IRB cover PDF" / "non-bib markdown → PDF" | /render-pdf-doc |
| "Fill IRB protocol form" / "기관 양식 채워줘" / "심사면제 요청서 채움" / "동의면제 양식" | /fill-protocol |
| "ICMJE COI 양식 일괄 생성" / "공저자 COI 폼 만들기" / "Disclosure form batch" | /fill-icmje-coi |
| "AI search optimization" / "Perplexity-friendly abstract" / "RAG visibility" / "GEO checklist" / "Elicit/Consensus 노출" | /academic-aio |
| "Remove AI patterns" / "AI 티 제거" / "humanize this section" / "GPT 흔적 지워줘" | /humanize |
| "Review someone else's manuscript" / "Journal club critique draft" / "외부 논문 리뷰 답변" | /peer-review |
Multi-skill workflows (plan then execute sequentially)
The Nodes column lists decision forks that should be rendered in interactive mode (see Workflow Execution — Dialogue Protocol). Nodes are numbered N1 – N9 per ${SKILL_DIR}/references/dialogue_nodes.md.
| Scenario | Skill chain | Nodes |
|---|---|---|
| New project, no prior work | intake-project -> search-lit -> design-study -> manage-project init | N1, N2 (if user wants manuscript output), N3 |
| Data ready, need a paper | manage-project init -> analyze-stats -> make-figures -> write-paper | N6 (PHI gate), N3, N4 (journal timing), N2 |
| Draft exists, prepare for submission | self-review -> check-reporting -> verify-refs -> humanize -> academic-aio (opt-in --aio) -> manage-refs (DOCX build + xref QC --strict) -> manage-project checklist | N4 (if not yet locked), N8 (only if self-review returns fatal) |
| Submission rendering & cascade reformat | manage-refs (Workflow A pandoc citeproc, or B Zotero CWYW) -> manage-refs scripts/check_xref.py --strict -> verify-refs -> sync-submission build | N10 (Workflow A vs B selection — see manage-refs SKILL.md decision tree) |
| Cascade rejection re-target | find-journal (exclude rejected) -> manage-refs (re-render with new CSL) -> write-paper Phase 8+ (new cover letter) -> sync-submission build --journal {new} | N4 |
| Non-bibliography academic deliverable (proposal/briefing/anchor doc) | write-protocol -> fill-protocol (institutional form available) ⫶ render-pdf-doc (markdown-only, no form) | N11 (form available vs not) |
| Reference housekeeping cycle | lit-sync (Zotero ↔ refs.bib auto-export) -> manage-refs scripts/check_citation_keys.py -> verify-refs --strict (first-author cross-check) | — |
| ICMJE COI batch (multi-author submission) | fill-icmje-coi (per-author docx generation from synthetic seed) -> manual circulation | — |
| Medical-AI paper, AI-search visibility pass | self-review -> humanize -> academic-aio (title, abstract, summary box, README / CITATION.cff / HF card) | N4, N9 (section entry for re-edit scope) |
| Reviewer comments received | revise -> analyze-stats (if new analyses needed) -> make-figures (if new figures needed) | N1 |
| Meta-analysis from scratch | search-lit -> fulltext-retrieval -> meta-analysis (handles its own pipeline internally) | N2 (MA type), N5 (synthesis scope) |
| Grant writing | search-lit -> grant-builder | N2 (option 5) |
| Conference presentation | present-paper (handles its own pipeline internally) | N1 |
| New study, need IRB protocol | search-lit -> design-study -> calc-sample-size -> define-variables -> write-protocol | N3, N2 (option 4 — protocol) |
| Observational cohort study (retro/screening/registry) | intake-project -> design-study -> search-lit -> define-variables -> write-protocol -> analyze-stats -> write-paper | N1, N2, N3 |
| Data with PHI, need full pipeline | deidentify -> clean-data -> analyze-stats -> make-figures -> write-paper | N6 (mandatory), N3, N4 |
| Data ready, need cleaning first | clean-data -> analyze-stats -> make-figures -> write-paper | N6, N3, N4 |
| Full submission chain | write-paper -> self-review -> check-reporting -> find-journal -> write-paper (Phase 8+ cover letter) -> manage-project checklist | N4, N8 (if recovery triggered), N9 (on re-entry) |
| Post-rejection resubmission | find-journal (exclude rejected journal) -> write-paper (Phase 8+ new cover letter) | N4 |
| Case report pipeline | search-lit (similar cases) -> write-paper (case-report mode) -> self-review -> check-reporting (CARE) -> find-journal | N2 (option 2), N4 |
Panel mode (`/self-review --panel`) is opt-in, never automatic. The submission chains above use single-pass self-review. Add --panel only for a deliberate high-stakes final pass (it spawns several reviewer agents plus an editor, so it costs several times more tokens); do not apply it by default, and do not auto-enable it in --e2e unless the user explicitly asks. A panel diagnoses and prioritizes, so keep it separate from the auto-fix loop — do not call --panel together with --fix.
Ambiguous requests (ask before routing)
If the intent is genuinely unclear, ask ONE clarifying question. Do not ask more than one question at a time. Examples:
- "Help with my paper" -> Ask: "Do you want to start writing, review an existing draft, or respond to reviewer comments?"
- "What should I do next?" -> Check for
project_state.jsonorSTATUS.mdin the working directory first. If found, read it and suggest the next logical step. If not found, ask what they're working on.
---
Workflow Execution — Dialogue Protocol (interactive default)
Multi-skill orchestration uses an RPG-style decision-node protocol. At each major fork, render a decision node (context, numbered options, per-option unlocks / locks / recovery_cost), wait for the user to pick a number, then proceed. This replaces the older "announce plan → shall I proceed?" pattern and prevents silent commitment to paper type, study design, target journal, or recovery branch.
When to load the node reference. Load ${SKILL_DIR}/references/dialogue_nodes.md the first time the pipeline enters a decision fork in the current session. The reference lists 9 primary nodes (N1 entry classification, N2 paper type, N3 study design, N4 journal timing, N5 MA synthesis scope, N6 PHI gate, N7 autonomy flag, N8 audit recovery branch, N9 section entry point) with rendering templates and autonomous defaults. In --autonomous / --e2e mode do not load this reference — apply each node's default and log the choice to qc/_pipeline_log.md.
Per-fork execution sequence:
1. Identify the node that fits the current fork (see the Multi-Skill Workflows table below for the scenario → node mapping). 2. Render the node using the template in dialogue_nodes.md §"Rendering Template". Keep the rendering under ~15 lines; surface unlocks / locks / recovery_cost for each option; announce the autonomous default. 3. Wait for a numeric choice (1 / 2 / ...) or a control word (back, pause, skip). One node at a time — never stack two nodes in the same turn. 4. Echo the lock. Before invoking the downstream skill, confirm in one line what the choice commits ("Locking: CARE reporting guideline; abstract = structured 250w."). 5. Invoke the downstream skill matching the chosen option, then return to step 1 for the next fork or continue the chain. 6. Adapt on skill output. If a skill's result invalidates a prior lock (e.g., /self-review surfaces a Step 7.4a trigger), route to the relevant recovery node (N8) rather than continuing the current chain.
One-question rule. Never ask two clarifying questions in one turn. If the orchestrator has no good inference, render the corresponding node and let the user pick.
Interrupt-safe. back re-enters the previous node. pause halts the pipeline and returns control to the user. skip is only allowed for nodes whose locks scope is empty (rare) — otherwise the orchestrator explains why skipping is not available.
---
Full Pipeline Mode
When the user requests "run the full pipeline," "end-to-end," or similar, execute the complete research-to-manuscript chain.
--e2e Flag
Pre-flight Validation (run once at --e2e entry)
Before invoking any downstream skill in --e2e mode, run the following 4 checks. A failure on any one halts the pipeline and is recorded to manuscript/<id>/REPORT.md (see §"REPORT.md Generation") under Frozen / Version status + Source artifacts checked.
1. STATUS / project_state: read STATUS.md or project_state.json in the working directory and confirm the current phase. If neither exists, halt with STATUS_MISSING unless the user passes --no-status. 2. Frozen artifact: scan manuscript/<id>/v_*_package/. If the latest v_N carries a _FROZEN marker file or INDEX.md::frozen=true, this run is restricted to a v_(N+1)_package/ branch. Any attempt to write directly into v_N halts with FROZEN_VIOLATION (see ~/.claude/rules/manuscript-versioning.md). 3. Required inputs: confirm input artifacts for the requested phase exist. Examples: Phase 4 figure requires analysis/_analysis_outputs.md; Phase 7 self-review requires manuscript/manuscript.md. Missing → halt with REQUIRED_INPUT_MISSING: <path>. 4. Dependency miss: if the user requested phase k but a prior phase is incomplete, halt with DEPENDENCY_MISS: [Phase i, Phase j] by default. Only when the user explicitly passes --auto-extend may the orchestrator prepend the missing phases and continue.
PHI Safety Gate (node N6) remains the only legitimate interrupt of an autonomous run after pre-flight passes. All four pre-flight outcomes are written to REPORT verbatim.
--e2e Pipeline Behavior
When --e2e is passed (or the user says "end-to-end", "Arm A", or "fully autonomous"): 1. Set --e2e mode ON. 2. Pass --autonomous to /write-paper when invoking it. 3. Pass --json to /self-review and /check-reporting when invoking them. 4. Skip all orchestrator-level confirmations ("Shall I proceed?") and do NOT render any Dialogue Protocol nodes. 5. For each node the pipeline would have rendered interactively, apply the node's default and log the choice to qc/_pipeline_log.md as: [orchestrate] N{id}: defaulted to option {n} ({label}) — {autonomous_rationale}. 6. DO still respect data-safety gates (PHI Safety Gate / node N6): if PHI status is unknown, HALT the autonomous run with a single prompt. PHI is the only node that can interrupt autonomous mode. 7. Audit Recovery (node N8): auto-invoke the routed recovery skill. If the route itself fails validation twice, HALT with RECOVERY_HALT_HUMAN_DECISION in the log. 8. AIO (academic-aio) is OFF by default in --e2e: AI-search-engine visibility work is a pre-submission, not a pre-draft, concern — running it on every autonomous iteration would be wasted tokens and would invite silent rewrites that violate the skill's "never edit silently" contract. Enable it only when the user explicitly adds --aio (or the pipeline is preparing a preprint / GitHub README / HF card alongside submission). When enabled, schedule it after /humanize so the checklist anchors on QC-confirmed and human-readable text, and surface the PASS/PARTIAL/FAIL report to the user — never auto-apply its edits. 9. After each skill completes, run post-skill validation (see below).
Without --e2e, the Dialogue Protocol is the default: render one node per fork, wait for a numeric choice, echo the lock, invoke the skill, and respect write-paper's built-in gates (outline approval, discussion planning).
Standard Pipeline: Data → Manuscript
1. /analyze-stats → analysis/tables/*.csv, analysis/figures/*, analysis/_analysis_outputs.md, analysis/analyze.py 2. /make-figures --study-type {type} → reads analysis/_analysis_outputs.md → analysis/figures/*.pdf, analysis/figures/*.png, analysis/figures/_figure_manifest.md 3. /write-paper --autonomous (if --e2e) → reads analysis/ → manuscript/manuscript.md (DOCX rendering delegated to step 7)
- Phase 7.4 internally calls
/self-review --json --fix→qc/self_review.md
4. /check-reporting → reads manuscript/manuscript.md → qc/reporting_checklist.md (called within write-paper Phase 7, but orchestrator verifies output) 5. /verify-refs → reads manuscript/manuscript.md → qc/reference_audit.json (sole output; row-level status in records[]) 6. /self-review --json --fix → reads manuscript/manuscript.md → qc/self_review.md + auto-fix (called within write-paper Phase 7.4, but orchestrator verifies final output) 7. /manage-refs (Workflow A pandoc citeproc, or B Zotero CWYW) → reads manuscript/manuscript.md + manuscript/_src/refs.bib → manuscript/manuscript_final.docx + qc/xref_audit.json. Submission gate: check_xref.py --strict must pass (no MISSING_DOCX / MISSING_BODY / MISMATCH).
Post-Skill Validation
After each skill completes, verify that expected output files exist. If validation fails, report the error and do NOT proceed to the next skill.
| Skill | Expected Outputs | Validation |
|---|---|---|
/analyze-stats | At least one file in analysis/tables/*.csv OR analysis/_analysis_outputs.md | Check file existence and non-empty |
/make-figures | analysis/figures/_figure_manifest.md with at least 1 entry | Parse manifest, verify listed files exist |
/write-paper | manuscript/manuscript.md (required), manuscript/manuscript_final.docx (required in --e2e) | Check file existence and non-empty |
/check-reporting | qc/reporting_checklist.md or inline report | Check file existence |
/verify-refs | qc/reference_audit.json (sole output) | Parse JSON; halt if submission_safe == false (i.e., FABRICATED / MISMATCH count > 0 OR duplicate_findings[] nonempty) |
/self-review | Review report with JSON block (when --json) | Check JSON block is parseable. In --panel mode each issue may carry an additional optional consensus array plus R1/R2/R3 attribution annotations on the M/m comments — these are additive and backwards-compatible; accept them |
/manage-refs | manuscript/manuscript_final.docx, qc/xref_audit.json | DOCX exists and non-empty; xref_audit.json has submission_safe: true (no P0 blocker rows) |
/lit-sync | manuscript/_src/refs.bib (mtime updated), references/zotero_collection.json | refs.bib mtime newer than collection snapshot; refs_bib_refreshed: true in collection JSON |
On validation failure:
- Log the failure: which skill, which output was missing, any error messages.
- In
--e2emode: report the error inqc/_pipeline_log.mdand STOP. Do not proceed to the next skill. Output: "Pipeline halted at {skill}: {missing output}. Check the skill's output and re-run." - In interactive mode: report the error and ask the user how to proceed.
REPORT.md Generation
At the termination of every --e2e invocation — whether the pipeline completed, halted at pre-flight, or halted on post-skill validation — the Worker MUST write manuscript/<id>/REPORT.md using the template at ${SKILL_DIR}/references/report_template.md.
Rules:
- Copy all 11 sections from the template verbatim. Never delete a section. Empty
fields are filled with (none) or (unknown) — never omitted, never collapsed.
- The §"Pipeline log" entry is a 5-line summary of
qc/_pipeline_log.md(Dialogue
node defaults applied, skill invocations, halt reason if any) — not a paste of the full log.
- The §"Tier-3 Blocked Items" hook-vs-prompt-guard split is mandatory — see
§"Tier-3 Worker Guard" below.
- The §"Next safe command" line is the literal command the user can copy to
resume the next phase. Do not editorialize.
- REPORT.md is the single artifact the user reviews; every other QC output is
linked from it.
Tier-3 Worker Guard
The following actions are permanently forbidden inside --e2e autonomous flow. On detection, the Worker halts the pipeline and records the attempt under REPORT.md §"Tier-3 Blocked Items" as tier3_pending: <command>. Hook-confirmed blocks and prompt-only blocks are listed separately so a future hook regression cannot silently re-open a prompt-only block.
Hook-confirmed (`~/.claude/hooks/tier3-confirm.sh` enforces):
gws gmail +send/+reply- YouTube upload
Prompt / skill guard only (no hook coverage — Worker prompt enforces):
git push,gh pr create- MCP Gmail send, MCP Calendar send
- MCP GitHub create-pr
/sync-submission buildexternal publication paths- Phase 8 submission DOCX auto-build / journal submission
- Senior mentor automatic email reply
git commit is allowed; a subsequent git push attempt halts. Circulation emails are written via gws-draft.py to a Gmail Draft only — never sent.
Phase 8 (Post-E2E Journal Selection & Submission Prep, see §"Post-E2E" below) is explicitly outside --e2e and requires explicit user invocation. The Tier-3 guard reinforces that boundary.
Data Flow Contract
| Skill | Reads | Writes |
|---|---|---|
| deidentify | raw data with PHI (CSV/Excel) | *_deidentified.*, mapping.json, audit_log.csv |
| fulltext-retrieval | DOI list (CSV/text) | pdfs/*.pdf, retrieval report |
| analyze-stats | raw data (CSV/Excel) | analysis/tables/.csv, analysis/figures/, analysis/_analysis_outputs.md |
| make-figures | analysis/_analysis_outputs.md, data files | analysis/figures/.pdf, analysis/figures/.png, analysis/figures/_figure_manifest.md |
| write-paper | analysis/figures/, analysis/tables/, manifests, journal profile | manuscript/manuscript.md, manuscript/title_page.md (DOCX rendering now delegated to manage-refs) |
| check-reporting | manuscript/manuscript.md | qc/reporting_checklist.md |
| verify-refs | manuscript/manuscript.md or a bib input | qc/reference_audit.json (sole writer; see skills/verify-refs/SKILL.md §Output Contract) |
| self-review | manuscript/manuscript.md | qc/self_review.md (with JSON block) |
| lit-sync | Zotero collection (live), manuscript/_src/refs.bib (Better BibTeX auto-export) | manuscript/_src/refs.bib (refreshed), references/zotero_collection.json, Obsidian literature notes (sole writer of refs.bib) |
| manage-refs | manuscript/manuscript.md, manuscript/_src/refs.bib, n_to_zotero_key map (optional) | manuscript/manuscript_final.docx (or _cwyw.docx), qc/xref_audit.json (sole writer) |
| render-pdf-doc | non-bib markdown (proposal/briefing/anchor doc/IRB cover) | PDF (same dir, same stem) |
| fill-protocol | content markdown + institutional Word template (.doc/.docx) | filled *.docx preserving original styles, table layouts, fonts, geometry |
| fill-icmje-coi | author roster (JSON), seed coi_disclosure.docx (synthetic shipped) | per-author coi_disclosure_{author}.docx (Date, Name, Manuscript Title replaced) |
| sync-submission | manuscript/, qc/ artifacts, journal profile | submission/{journal}/manifest.md, drift report |
| peer-review | external manuscript (.docx/.pdf), journal scope | review draft (review.md) following the medical imaging peer-review guideline |
Rules
1. After each skill completes, run post-skill validation before proceeding. 2. Pass discovered file paths as context to the next skill. 3. In --e2e mode: do NOT ask "shall I proceed?" between skills — proceed automatically after validation passes. 4. Without --e2e: pause at write-paper's built-in gates (outline approval, discussion planning) and confirm between skills. 5. If a skill fails or validation fails, report the error. In --e2e mode, halt the pipeline.
Post-E2E: Journal Selection & Submission Prep
After the E2E pipeline completes (or when the user requests journal targeting), the following manual-trigger workflow is available:
1. /find-journal → top 5 recommendations based on manuscript/manuscript.md abstract 2. /verify-refs → block fabricated or mismatched references before packaging 3. User selects a journal → create submission/{journal_short}/ directory 4. /sync-submission build --journal {journal_short} → create or refresh the derived manuscript package from the canonical manuscript 5. Generate inside submission/{journal_short}/:
cover_letter.md: via/write-paperPhase 8+checklist.md: journal-specific submission checklistmanuscript_final.docx: reformatted for target journal (if format differs)
6. /peer-review (journal scope-aware) → submission/{journal_short}/peer_review.md
This workflow is NOT part of --e2e. It requires user interaction (journal selection).
---
PHI Safety Gate
Before routing to any data-handling skill (clean-data, analyze-stats, make-figures), check if the data might contain PHI:
1. If CSV/Excel files exist in the working directory AND no *_deidentified.* files exist: Ask (in the user's preferred language): "Does the data contain patient identifiers (PHI)? (names, national ID / RRN, date of birth, contact details, etc.)"
- If yes → Route to
/deidentifyfirst, then continue to the originally requested skill - If no → Proceed directly
- If already de-identified (user confirms or
*_deidentified.*files exist) → Proceed directly
2. De-identification is an INTERACTIVE process requiring the researcher's active participation. Warn (in the user's preferred language): "De-identification requires the researcher's direct review. You must run the script in the terminal and verify each item."
3. After deidentify completes, continue to the originally requested skill using the *_deidentified.* output file.
---
Context Detection
Before routing, check for context clues in the working directory:
| File found | Implies |
|---|---|
project_state.json | Active managed project -- read it to determine current phase |
STATUS.md | Project with status tracking -- read current stage and blockers |
PROJECT.md | Project identity exists -- use for context |
CLAIMS.md | Claims-to-results map exists -- writing is underway |
REVIEW_LOG.md | Revision cycle -- likely needs /revise |
*.qmd or *.tex files | Manuscript drafting in progress |
*.bib files | References exist -- may need verification |
PRISMA_*.md or QUADAS*.md | Meta-analysis or systematic review |
| Decision letter / reviewer PDF | Route to /revise |
| CSV/Excel data files without analysis scripts | Raw data may need cleaning -- suggest /clean-data first |
*_deidentified.* or audit_log.csv | Data already de-identified -- skip PHI Safety Gate |
protocol_draft.md | Protocol drafting in progress -- may need /write-protocol |
sample_size_*.csv or sample_size_*.R | Sample size calculation done -- check if protocol or manuscript next |
---
Guardrails
- Never do the work yourself. Your role is classification and routing, not execution.
- Never invent a skill. Only route to skills listed in the table above.
- Never skip user confirmation for multi-skill workflows.
- One clarifying question max. If you can make a reasonable inference, do so and confirm.
- Respect existing state. If a project scaffold exists, do not re-initialize it.
---
Output Format
For single-skill routing:
I'll route this to **{skill-name}** -- {one-line reason}.
Invoking `/skill-name`...Then invoke the skill.
For multi-skill workflows (Dialogue Protocol):
Render one decision node per fork. Do NOT stack a plain bullet list with "Shall I proceed?" — use the node template. Example rendering:
This looks like a {scenario} workflow. First fork:
▸ N2 — Paper type (locks reporting guideline + abstract template)
Context: analysis outputs exist in analysis/; you want a manuscript.
Which kind of manuscript?
1) Original article (STROBE / CONSORT / STARD per design)
unlocks: /write-paper locks: IMRAD, 300w abstract recovery: high
2) Case report (CARE)
unlocks: /write-paper case-report mode locks: CARE checklist recovery: medium
3) Systematic review / meta-analysis (PRISMA / PRISMA-DTA)
unlocks: /meta-analysis locks: protocol registration recovery: high
4) Protocol (SPIRIT / PRISMA-P)
unlocks: /write-protocol locks: SPIRIT structure recovery: medium
5) Grant proposal
unlocks: /grant-builder locks: internal only recovery: low
Pick 1–5, or type `back` / `pause`. (autonomous default: 1)After the user picks, echo the lock in one line and invoke the matched skill. Return here for the next fork when the skill completes.
For ambiguous requests:
I can help with that. To route you to the right tool, one quick question:
{single clarifying question}Anti-Hallucination
- Never fabricate file paths, URLs, DOIs, or package names. Verify existence before recommending.
- Never invent journal metadata, impact factors, or submission policies without verification at the journal's website.
- If a tool, package, or resource does not exist or you are unsure, say so explicitly rather than guessing.
Orchestrate Dialogue Nodes — RPG-style CLI UX (prototype v0.1)
Status: Load-on-demand. The orchestrator reads this file only when entering interactive mode (default). --autonomous mode skips this file entirely and uses each node's default branch.
Design Principles
1. Present choice, commit downstream. Each node makes explicit what the decision locks in (format, journal scope, analysis plan) so the user sees the cost of a wrong choice now vs. later. 2. Default = safest reversible path. If the user cannot decide, the default is the lowest-commitment option (e.g., "draft first, journal later"), never the highest. 3. Recovery cost is visible. When an option is hard to reverse ("locks journal format, 90-day revision clock"), the node shows this before the user picks. 4. One question at a time. Never render two decision nodes in the same turn. 5. Interrupt-safe. The user can always type back, skip, or pause to re-enter the previous node or stop the pipeline.
Node Structure
id: unique-slug
phase: which orchestrate phase this fires in
context: one-line summary of what orchestrator has observed
question: the user-facing prompt (<=120 chars)
options:
- id: 1
label: short description
unlocks: [downstream-skill-or-phase]
locks: [commitments this creates]
recovery_cost: low | medium | high
default: option id chosen in --autonomous mode
autonomous_rationale: why this default is safe for unattended runsPrimary Decision Nodes
N1. Entry Classification
- phase: activation
- context: user request received, context-detection scan complete
- question: "Is this a single-skill task, a multi-step pipeline, or unclear?"
- options:
1. Single skill — route now (low cost; always reversible) 2. Pipeline — plan then confirm (medium cost; announce plan) 3. Unclear — ask one clarifying question (no cost)
- default: inferred from classification table in SKILL.md; falls back to 3 only when truly ambiguous
- rationale: matches existing classification logic
N2. Paper Type
- phase: before /write-paper or /write-protocol
- context: user wants manuscript-style output
- question: "What kind of manuscript? This locks the IMRAD template and reporting guideline."
- options:
1. Original article (STROBE / CONSORT / STARD per design) — high recovery cost 2. Case report (CARE) — medium cost; easy to escalate to original if series grows 3. Systematic review / meta-analysis (PRISMA / PRISMA-DTA) — high cost; triggers /meta-analysis 4. Protocol (SPIRIT / PRISMA-P) — medium cost 5. Grant proposal (/grant-builder) — low cost; output is internal
- default: 1
- locks: reporting guideline choice, abstract structure, figure count expectations
N3. Study Design (only for N2 option 1)
- phase: before /analyze-stats
- context: original article path chosen
- question: "What study design? This locks the analysis template and reporting guideline."
- options:
1. Diagnostic accuracy (STARD, QUADAS-2) — forces 2x2 + DeLong CI 2. Intervention / RCT (CONSORT) — arm-specific ITT/PP 3. Cohort (STROBE) — Kaplan-Meier / Cox 4. Case-control (STROBE) — conditional logistic 5. Cross-sectional (STROBE) — prevalence + association 6. AI prediction model (TRIPOD+AI) — held-out validation mandatory
- default: inferred from CLAIMS.md / PROJECT.md if present; otherwise ask
- locks: analysis code template, table skeleton, figure roster
N4. Target Journal Timing
- phase: after /analyze-stats, before /write-paper Phase 2 (outline)
- context: analysis complete, manuscript drafting begins
- question: "Commit to a target journal now, or draft journal-neutral and pick later?"
- options:
1. Commit now (/find-journal → pick one) — locks word limit, abstract structure, AI policy, figure format. High recovery cost if rejected. 2. Draft neutral, pick at Phase 8 — medium cost; slightly longer total time but more flexibility after self-review.
- default: 2
- rationale: late commitment preserves option value; Phase 8+ cover letter is cheap to regenerate per journal.
N5. Analysis Scope (MA only)
- phase: /meta-analysis Phase 4–5
- context: extraction complete, synthesis about to begin
- question: "Synthesis depth? Wider scope = longer pipeline but stronger discussion."
- options:
1. Primary outcome only — fastest; default if K small (<6 studies) 2. Primary + predefined subgroups — medium; requires protocol-registered subgroups 3. Primary + subgroups + sensitivity (leave-one-out, risk-of-bias strata) — full depth 4. Primary + meta-regression (requires K ≥ 10 per covariate) — heavy; only if protocol specifies
- default: 2 when protocol specifies subgroups; else 1
- locks: forest plot count, funnel plot requirement, discussion outline
N6. PHI Safety Gate
- phase: before any data-handling skill
- context: CSV/Excel detected, no
*_deidentified.*marker - question: "Does this data contain PHI (names, RRN, DOB, contact)?"
- options:
1. Yes — route to /deidentify first (blocking, interactive script) 2. No — proceed 3. Already de-identified — proceed (user attests)
- default: in
--autonomousmode, HALT if unknown. PHI gate overrides autonomy. - lock: audit trail — once user picks 3, their attestation is logged
N7. Autonomous vs Interactive
- phase: pipeline start
- context: user invoked /orchestrate with or without
--e2eflag - question: inferred from flag — no prompt
- options:
1. Interactive (default) — render every node, pause between skills 2. --e2e / --autonomous — use defaults, skip confirmations, halt only on PHI or validation failure
- default: 1
- lock: affects every downstream node's behavior
N8. Audit Recovery Branch (Step 7.4a trigger)
- phase: after /self-review with fatal finding
- context: self-review returned
accuracy/data_fidelity/protocol_mismatch/numerical_claimfatal - question: "Self-review flagged a fatal structural issue. Which recovery?"
- options:
1. MA manuscript → /meta-analysis Phase 10 (v{N}→v{N+1} rebuild) — high cost, required for MA fidelity 2. Non-MA extraction error → /write-paper Phase 2 re-entry — medium cost 3. Protocol amendment needed → HALT for human decision — recovery off-pipeline 4. Override (user asserts finding is not fatal) — requires written justification in qc/_pipeline_log.md
- default: 1 or 2 based on manuscript type; never 4 in autonomous mode
- lock: Steps 7.5–7.6 blocked until recovery returns clean
N9. Section Entry Point (/write-paper reentry)
- phase: /write-paper reentry after recovery
- context: re-entering the pipeline post-recovery
- question: "Where to resume? Phase 7.3 (re-audit) or Phase 7.1 (re-draft) or Phase 2 (restructure)?"
- options:
1. Phase 7.3 — recovery only touched numbers; audit is the right re-entry (default per Step 7.4a spec) 2. Phase 7.1 — recovery changed claims; re-draft conclusions 3. Phase 2 — recovery changed outline; re-do structure
- default: 1
- lock: later re-entry invalidates later polish; later = expensive
N10. Reference Workflow (manage-refs entry)
- phase: /manage-refs entry (Phase 7.6 of write-paper, or standalone DOCX rebuild)
- context: manuscript ready for DOCX rendering with bibliography; need to choose Workflow A (pandoc citeproc) vs Workflow B (Zotero CWYW)
- question: "Bibliography rendering: pandoc citeproc (single-author / cascade reformat) or Zotero CWYW (co-author Word collaboration)?"
- options:
1. Workflow A — pandoc citeproc + journal CSL (markdown SSOT, regenerable, cascade-friendly) 2. Workflow B — Zotero CWYW field-code injection (Word-tracked-changes-friendly, co-author live edit) 3. Hybrid 3-phase — start A (draft), transition to B (circulation/revision/submission)
- default: 3
- lock: Workflow B
.docxbecomes editable SSOT; markdown re-render requires re-extraction. Hybrid is the documented default per~/.claude/rules/manuscript-references.md - autonomous_rationale: Hybrid 3-phase is the accumulated pattern; A→B transition only happens when circulation begins, so default is safe for solo drafting
N11. Protocol Delivery Format (write-protocol → fill-protocol vs render-pdf-doc)
- phase: /write-protocol Phase final (or standalone protocol rendering)
- context: content drafted; need final deliverable. Institutional Word template availability differs
- question: "Final deliverable: institutional .docx form (use
/fill-protocol) or markdown → PDF (use/render-pdf-doc)?" - options:
1. /fill-protocol — institutional Word template exists (e.g., IRB research protocol, review-exemption, consent-waiver forms) 2. /render-pdf-doc — no institutional template; markdown-driven layout (proposal cover, briefing handout, anchor doc, IRB cover letter)
- default: 1 (when
${institutional_template_path}resolves; else 2) - lock: option 1 inherits institutional layout (immutable styles, table cantSplit, eastAsia fonts); option 2 inherits markdown frontmatter + content-proportional pipe-table widths
- autonomous_rationale: Most institutional submissions require option 1; default to scanning known template paths first (
~/.claude/rules/institutional-form-fill.mdtable) before falling back to option 2
Rendering Template
When presenting a node in interactive mode, use:
▸ {node.id} — {one-line purpose}
Context: {node.context}
{node.question}
1) {option 1 label}
→ unlocks: {...} locks: {...} recovery: {low|med|high}
2) {option 2 label}
→ unlocks: {...} locks: {...} recovery: {low|med|high}
Pick 1–N, or type `back` / `pause` / `skip`.
(autonomous default: {default_option})Keep the rendering under ~15 lines. If the user types the option number, the orchestrator confirms the lock-in and proceeds.
Autonomous Mode Contract
When --autonomous / --e2e is set:
- Do NOT render any node rendering template.
- Do NOT prompt for input.
- For each node, select the
defaultand log the choice toqc/_pipeline_log.mdas:[orchestrate] N{id}: defaulted to option {n} ({label}) — {autonomous_rationale}. - PHI Safety Gate (N6) is the only node that can HALT autonomous mode.
- Audit Recovery (N8) may HALT in autonomous mode if the default recovery route itself fails validation twice.
Future Expansion
- Add recovery-cost accumulator: track how many "medium / high" locks the user has accumulated; surface a warning when cumulative lock debt is high.
- Add
replaycommand to print all nodes and chosen options for post-submission review. - Consider
what-ifsimulation: show downstream path of each option without committing.
/orchestrate --e2e REPORT Template (Korean variant)
Opt-in Korean variant. The default English template is report_template.md. Use this when theuser prefers a Korean-language project report.
# {project_id} Phase {N} 완료 보고
## 한 줄 요약
{무엇을 했고 결과 어땠는지 1문장}
## Frozen / Version status
- Source artifact: {manuscript/<id>/v_N_package/draft.md, mtime, sha256}
- Frozen version: v_{N} (freeze date YYYY-MM-DD, 회람 발송 시점)
- This run wrote to: v_{N+1}_package/ (분기 OK) | OR v_{N} 직접 (**violation — halt**)
- `manuscript-versioning.md` 룰 준수: ✅ / ❌
## Source artifacts checked
- {path1} — read at {timestamp}, sha256 {hash}
- {path2} — ...
- 누락된 expected input: {list, or "(none)"}
- Pre-flight result: PASS | HALT (reason: STATUS_MISSING / FROZEN_VIOLATION / REQUIRED_INPUT_MISSING / DEPENDENCY_MISS)
## 변경 파일 (priority 순)
- {path} — {1줄 변경 요약}
- ...
- (없으면 "(none)")
## Changed claims
- {Methods §X에서 sample size N=68 → N=70 (CSV row count 재집계)}
- {Discussion에서 "primary outcome" → "co-primary outcome" 표현}
- (없으면 "no claim-level changes")
## 검토 포인트 (사용자 우선순위 순)
1. {가장 중요 — 보통 수치·인용·논리 검증 포인트}
2. {차순위}
3. {그 다음}
## 환각 게이트 결과
- citation_safety: PASS / FAIL ({n} refs verified, first-author cross-check applied)
- numerical_safety: PASS / FAIL ([VERIFY-CSV] 잔존 {n}건)
- dictionary_first: PASS / N/A (observational/cohort 컨텍스트만 적용)
- reporting_compliance: PASS / PARTIAL / FAIL ({guideline})
## QC artifact links
- `qc/reference_audit.json` — verify-refs 결과
- `qc/self_review.md` — self-review JSON 블록
- `qc/reporting_checklist.md` — check-reporting 결과
- `qc/xref_audit.json` — manage-refs cross-reference QC
- `qc/_pipeline_log.md` — Dialogue node defaults + halt reasons
## Human-only missing fields
이 항목은 사용자가 직접 채워야 함 (자율 작성 영구 금지):
- Funding grant IDs: ___
- Senior mentor 회람 답신 반영: ___
- Recommended reviewers (또는 "없음"): ___
- Cover letter 인사말 / corresponding 서명: ___
- (해당 없으면 "(none)")
## Tier-3 차단 항목
이 작업들은 `--e2e` 자동 진입 영구 금지. 시도 발생 시 halt + 아래 기록.
**Hook으로 차단 확인 (`~/.claude/hooks/tier3-confirm.sh`)**:
- `gws gmail +send/+reply`
- YouTube upload
**Prompt / skill guard만 (hook 미적용 — Worker prompt가 막음)**:
- `git push`, `gh pr create`
- MCP Gmail send, MCP Calendar send
- MCP GitHub create-pr
- `/sync-submission build` 외부 발행 path
- Phase 8 (submission docx 자동 빌드 / 투고)
- senior mentor 자동 회신
이번 run에서 시도 감지: `tier3_pending: <command or "(none)">`
## 다음 액션
- [ ] APPROVE → 다음 phase 진행
- [ ] REJECT (사유: ___)
- [ ] PARTIAL (수정사항: ___)
## Next safe command
다음 phase 위임 명령 (사용자가 그대로 복사):
`/orchestrate "<id> Phase {N+1} 끝까지" --e2e`
## Pipeline log
{qc/_pipeline_log.md 핵심 5줄 요약 — Dialogue node defaults, skill invocations, halt 사유}/orchestrate --e2e REPORT Template
This is the canonical end-of-run report written to manuscript/<id>/REPORT.md at the termination of every --e2e invocation (whether the pipeline completed, halted at pre-flight, or halted on validation failure). It is the single artifact the user reviews — every other QC output is referenced from here.
The Worker fills every section. Missing or non-applicable information is recorded explicitly as (none), (unknown), or N/A — never omitted.
This is the English default template. For a Korean-language report, use report_template_ko.md.
---
# {project_id} Phase {N} Completion Report
## One-line summary
{what was done and how it turned out, in one sentence}
## Frozen / Version status
- Source artifact: {manuscript/<id>/v_N_package/draft.md, mtime, sha256}
- Frozen version: v_{N} (freeze date YYYY-MM-DD, at the time of circulation)
- This run wrote to: v_{N+1}_package/ (branch OK) | OR v_{N} directly (**violation — halt**)
- `manuscript-versioning.md` rule compliance: ✅ / ❌
## Source artifacts checked
- {path1} — read at {timestamp}, sha256 {hash}
- {path2} — ...
- Missing expected input: {list, or "(none)"}
- Pre-flight result: PASS | HALT (reason: STATUS_MISSING / FROZEN_VIOLATION / REQUIRED_INPUT_MISSING / DEPENDENCY_MISS)
## Changed files (in priority order)
- {path} — {1-line change summary}
- ...
- (if none, "(none)")
## Changed claims
- {in Methods, sample size N=68 → N=70 (re-counted from CSV rows)}
- {in Discussion, "primary outcome" → "co-primary outcome"}
- (if none, "no claim-level changes")
## Review points (in the user's priority order)
1. {most important — usually number / citation / logic verification points}
2. {next}
3. {then}
## Hallucination-gate results
- citation_safety: PASS / FAIL ({n} refs verified, first-author cross-check applied)
- numerical_safety: PASS / FAIL ({n} [VERIFY-CSV] tags remaining)
- dictionary_first: PASS / N/A (applies only in observational/cohort contexts)
- reporting_compliance: PASS / PARTIAL / FAIL ({guideline})
## QC artifact links
- `qc/reference_audit.json` — verify-refs result
- `qc/self_review.md` — self-review JSON block
- `qc/reporting_checklist.md` — check-reporting result
- `qc/xref_audit.json` — manage-refs cross-reference QC
- `qc/_pipeline_log.md` — Dialogue node defaults + halt reasons
## Human-only missing fields
The user must fill these in directly (autonomous authoring permanently forbidden):
- Funding grant IDs: ___
- Senior mentor circulation replies incorporated: ___
- Recommended reviewers (or "none"): ___
- Cover letter greeting / corresponding-author signature: ___
- (if not applicable, "(none)")
## Tier-3 Blocked Items
These actions are permanently forbidden in `--e2e` autonomous flow. On any attempt, halt + record below.
**Hook-confirmed blocks (`~/.claude/hooks/tier3-confirm.sh`)**:
- `gws gmail +send/+reply`
- YouTube upload
**Prompt / skill guard only (no hook — the Worker prompt blocks)**:
- `git push`, `gh pr create`
- MCP Gmail send, MCP Calendar send
- MCP GitHub create-pr
- `/sync-submission build` external-publish path
- Phase 8 (auto-building / submitting the submission docx)
- automatic senior-mentor replies
Attempts detected this run: `tier3_pending: <command or "(none)">`
## Next actions
- [ ] APPROVE → proceed to the next phase
- [ ] REJECT (reason: ___)
- [ ] PARTIAL (fixes: ___)
## Next safe command
The next-phase delegation command (the user can copy it verbatim):
`/orchestrate "<id> Phase {N+1} to completion" --e2e`
## Pipeline log
{5-line summary of qc/_pipeline_log.md — Dialogue node defaults, skill invocations, halt reasons}---
Notes for the Worker
- The fenced block above is the literal template. Copy it verbatim into
manuscript/<id>/REPORT.md and replace {...} placeholders.
- Never delete a section. If empty, write
(none). - The "Tier-3 Blocked Items" hook vs prompt-guard split is mandatory — collapsing them
hides which blocks survive prompt regression. See SKILL.md §"Tier-3 Worker Guard".
- "Pipeline log" is a 5-line summary, not a paste of the full
qc/_pipeline_log.md.
schema_version: 2
name: orchestrate
layer: D
owner_domain: orchestration
maturity: official
when_to_use:
- User describes a research goal without naming a specific skill
- Task spans multiple skills and the right pipeline is non-obvious
- End-to-end (`--e2e`) single-shot run from screening through manuscript draft
- Routing ambiguous "what should I do next" / "where do I start" prompts
when_NOT_to_use:
- The right skill is unambiguous (call that skill directly — no wrapper)
- Direct file authoring (worker outputs) — orchestrate routes, it does not generate
- Bypassing artifact validation gates declared in skill contracts (forbidden)
inputs:
- project.yaml
- artifact_manifest.json
- qc/status.json
outputs:
- qc/_pipeline_log.md
deterministic_scripts:
- scripts/validate_skill_contracts.py
- scripts/validate_project_contract.py
side_effects:
- routes_to_worker_skills
downstream_consumers:
- write-paper
- verify-refs
- sync-submission
forbidden_actions:
- generate_worker_outputs_directly
- bypass_artifact_validation
# v2.1 quality card
purpose: "Single entry point for the bundle: classify a request and route to the right skill, or chain skills for multi-step and end-to-end (--e2e) workflows."
safety_boundaries:
- "Never generates worker-skill outputs directly; routes to and invokes the owning skill."
- "Does not bypass per-skill artifact validation in the chain."
known_limitations:
- "Routing is heuristic; an ambiguous request may need explicit skill selection."
- "--e2e halts on missing expected outputs rather than proceeding with gaps."
validation_commands:
- "python3 scripts/validate_skill_contracts.py"
- "python3 scripts/validate_project_contract.py"
evidence_surface: demo
Related skills
FAQ
Does orchestrate do the work?
No. It classifies, plans, and delegates, routing to the right skill or chaining skills in the correct order.
When does it activate?
When a user describes a research goal without naming a skill, asks where to start, or when a request clearly spans multiple skills.