Source-anchored workflow for generating accurate standalone biological process-step figures with DashScope Qwen Image.
Structured as atoms → molecules → compounds:
capabilities/— atomic, single-purpose, near-deterministic operationscomposites/— scoped workflows that chain atoms in explicit orderSKILL.md— the compound playbook: mode selection, ordering, invariants
A source-verified mapping card is the only artifact that may introduce scientific claims.
SOURCE
↓ PROJECT ANALYSIS: entity map + Material Bible + style sheet
↓ MAPPING CARD ── Gate 1: human check vs open source (strict) or DRAFT (agent)
↓ PROMPT ASSEMBLY
↓ VERSIONED RENDER ── Gate 2: fixed content/topology probes
↓ ACCEPTED RENDER
↓ LABELS ── Gate 3: label-to-shipped-pixel fit
LABELED STANDALONE FIGURE
- Pixels show schematic instances; labels and metadata carry source-level claims.
- Material Bible and style sheet are separated; style and reference images never decide science.
- Renderer details live in an adapter (
adapters/), keeping the core workflow renderer-agnostic.
| Path | Role |
|---|---|
SKILL.md |
compound playbook (orchestration + invariants) |
composites/ |
molecules: analyze-project, plan-step, render-step, finalize-step |
capabilities/ |
atoms: extract-source-text … build-evidence-package |
schemas/ |
JSON Schema for material bible / mapping card / render metadata / probe |
adapters/dashscope.md |
renderer contract (DashScope Qwen Image) |
scripts/generate_image.py |
generic versioned renderer |
examples/hydrogel_patent/ |
worked example artifacts |
- Python 3.9+
pip install dashscope
# 1. local secret (never committed)
cp .env.example .env # fill in DASHSCOPE_API_KEY
# 2. render one step figure from a prompt file
python scripts/generate_image.py \
--prompt-file step4_prompt.txt \
--step-id step4 \
--verification-status DRAFT/UNVERIFIED \
--output step4_v01.png \
--meta step4_meta.jsonThe renderer refuses to overwrite existing files and writes a sibling metadata JSON that satisfies schemas/render_metadata.schema.json. For verified output, run the playbook molecules in order: analyze-project → plan-step (Gate 1) → render-step (Gate 2) → finalize-step (Gate 3). See SKILL.md and the composites/ docs for the full protocol.
This repo is an agent skill / workflow spec with a working renderer script — the Markdown capabilities (entity analysis, mapping, probes, label fit) are executed by an agent following the playbook. It is not yet a one-command CLI orchestrator (plan / render / verify subcommands); that automation layer is a planned extension.
examples/hydrogel_patent/ ships the committed text artifacts of one complete step-4 walkthrough: material_bible.yaml, step4_mapping.yaml, step4_prompt.txt, step4_probe.yaml. The PNG and its metadata are generated artifacts — regenerate them with the renderer (requires a DashScope key), then run the probe and record the real verdicts.
DASHSCOPE_API_KEY is never committed. Only .env.example is tracked; the real key lives in a local .env, which is gitignored.
MIT — see LICENSE.