Biological process-step figures — compound playbook
Generate accurate standalone figures for biological, biomaterials, tissue-engineering, and laboratory process steps.
Trust boundary: Only source-verified mapping cards may introduce scientific claims. Render inspection verifies pixel conformance to the mapping card; it cannot upgrade or create source claims. Style and reference images never decide science.
Structure: atoms → molecules → this playbook
This skill is a compound (playbook). It does not contain the procedure itself — it orchestrates molecules (composites), which explicitly chain atoms (capabilities).
compounds (this playbook): choose mode, run molecules, hold judgment
└─ composites/: scoped workflows, explicit atom order (2-6 atoms each)
└─ capabilities/: single-purpose primitives, near-deterministic
Depth is capped at two levels on purpose: molecules call atoms directly, atoms never call other atoms, the playbook never reaches past molecules. A deeper graph is where agent reliability falls apart.
- Atoms (
capabilities/): one goal, one artifact, mechanical. No judgement calls about orchestration. - Molecules (
composites/): a scoped task with explicit "call atom X, then atom Y" instructions. Minimizes runtime decision-making. - This playbook: mode selection, ordering, escalation, and the invariants that overrule everything.
Molecule map
| Molecule | File | Chains atoms |
|---|---|---|
| analyze-project | composites/analyze-project.md | extract-source-text → analyze-entities → build-material-bible → extract-style-sheet (if reference) |
| plan-step | composites/plan-step.md | write-mapping-card → check-mapping-card → Gate 1 |
| render-step | composites/render-step.md | assemble-prompt → render-image → run-probe (iterate within budget) |
| finalize-step | composites/finalize-step.md | fit-labels (+ build-evidence-package on request) |
Intake — ask before starting
At task start, clarify the user-set options in one round with the question tool (ask), before touching files:
- Task type — routes the workflow (table below).
- Task mode —
quick(exploration, stays DRAFT) orverified(final deliverable). - Gate 1 mode —
strict_verified(human source check) oragent_draft(no human gate). - Source — patent / paper / protocol / DOCX / PDF / pasted text; path or file.
- Reference image — provided (style only) or none.
- Iteration budget per step (default 5 renders).
- Deliverables — PNG only, PNG + labels, or PNG + labels + evidence package.
- Model — default
qwen-image-3.0-pro, or fetch the catalog (capabilities/list-image-models.md,scripts/list_image_models.py) and let the user pick; record choice inmodel_choice.json.
Do not guess options the user can answer in one round. Reuse prior answers when continuing an existing project.
Orchestration
Task type → workflow routing
| Task type | Molecules to run | Notes |
|---|---|---|
| Single new step figure | plan-step → render-step (+ finalize-step if verified) | run analyze-project only if no project bible exists yet |
| Full figure set (multi-step) | analyze-project → per step: plan-step → render-step → finalize-step | full pipeline |
| Revise an existing step render | render-step only | reuse the verified card; re-run Gate 1 only if the card changes |
| Relabel an accepted render | finalize-step (fit-labels only) | no re-render |
| Evidence / audit package | finalize-step (build-evidence-package only) | indexes existing artifacts |
| Style exploration / sketch | plan-step (agent_draft, minimal) → render-step | output stays DRAFT/UNVERIFIED |
Modes
quick— exploration: minimal mapping, agent_draft, no human gates, no labels, no evidence package. OutputDRAFT/UNVERIFIED.verified— final deliverable: full analysis, strict_verified Gate 1, labeling, Gate 3, optional evidence package.
Each molecule ends with a named artifact and a verification state; never skip a molecule's required output. On any DRAFT/UNVERIFIED output: state it explicitly; never present it as verified.
Required inputs
- Scientific source (patent / paper / protocol / DOCX / PDF text or user description) — the authority for operation, identity, and state.
- Optional reference image (style only).
- Task mode and Gate 1 mode.
Required outputs
Per generated step the workflow MUST produce:
| File | Molecule | Content |
|---|---|---|
project_material_bible.yaml | analyze-project | Stage 0 analysis (once per project) |
stepN_mapping.yaml | plan-step | mapping card + verification status |
stepN_prompt.txt | render-step | final prompt verbatim |
stepN_vXX.png + .json | render-step | one candidate per version + metadata |
stepN_probe.yaml | render-step | Gate 2 probe results |
stepN_labeled.png | finalize-step | after Gate 3 (verified mode) |
Gates
| Gate | Location | What it verifies |
|---|---|---|
| Gate 1 | plan-step | mapping card ↔ open source (human, strict mode) |
| Gate 2 | render-step | render ↔ mapping card (fixed probes) |
| Gate 3 | finalize-step | labels ↔ shipped pixels |
No other artifact in this workflow is a truth gate. Everything else is documentation, hygiene, or an executable substrate.
Required invariants
- Source authoritative for operation, identity, state.
- No operation or scientific entity invented for composition.
- Repeated entities: one canonical descriptor per project; identity tokens stable unless a declared transition justifies drift.
- Uncertain properties stay generic or OPEN; never silently resolved.
- Style bible / reference image ≠ scientific evidence.
- Topology comes from the verified mapping card.
- Labels and shipped pixels agree.
- API success ≠ visual or scientific acceptance.
- A skipped source check produces
DRAFT/UNVERIFIED, never a verified claim.
Repository layout
SKILL.md this playbook (compound)
composites/ molecules
capabilities/ atoms
schemas/ JSON Schema for material bible / mapping card / render metadata / probe
adapters/ renderer-specific contract (dashscope.md)
scripts/ generic renderer (generate_image.py)
examples/ worked artifacts (hydrogel_patent/)
.env.example key template; copy to .env locally
Extending
- New single-purpose operation → add a
capabilities/*.md, keep it mechanical, give it one schema or script if it touches one. - New scoped task → add a
composites/*.mdthat chains existing atoms; prefer reusing atoms over new ones. - New top-level job → compose molecules in this playbook (or a new playbook).
- A capability that calls another capability is a molecule by definition; do not deepen the atom layer.