Compile scientific content into an acceptable diagram. This is the sole entry point for design and prompt compilation; do not treat prompt rhetoric as a second round of scientific design.
Select output by request
| User intent | Action and stopping point |
|---|---|
| Construct a drawing prompt / write prompt only | construct: design brief and complete prompt; does not generate images |
| Inspect or diagnose an existing prompt | diagnose: locate the problem, its impact, and the minimal fix; does not alter files or generate images without authorization |
| Revise the prompt based on feedback | revise: changes, retained items, and the complete new prompt; does not automatically generate images |
| Create a figure / modify an image | After construct or revise, hand off to workflow for rendering and visual inspection |
| Consult only on color scheme or style | Palette Decision; does not require complete topology, does not generate images |
When only asking about a plan, do not start drawing. When drawing directly, do not impose prompt confirmation; follow the user's review preferences.
Read as needed
- Construct, diagnose, or revise decision →
references/prompt-design-logic.md - Compile renderer prompt →
references/json-to-prompt.md - Ready-to-fill construct/revise template →
references/prompt-templates.md - Density, layout, text, or style details →
references/image-prompt-guide.md - Cases and transfer checks →
references/prompt-design-cases.md - Structural contract for actual rendering →
json-schema.mdandfigure-spec.schema.json - Visual anchors →
references/architecture-icons.md, using only elements that match the evidence - Color and optional style library →
references/palettes.md、references/styles/ - Insufficient evidence →
references/missing-info-policy.md - Image acceptance →
references/render-audit.md
Design workflow
- Write out the reader's question and the figure's core answer, distinguishing main content, supporting content, and caption-only.
- Extract stable component IDs, typed connections, permission boundaries, forbidden relations, and evidence from upstream analysis or user input. Do not borrow algorithms from reference images, and do not fill missing evidence in as established fact.
- Determine style after the scientific skeleton is clear and before the layout is finalized. Reuse the style the user has already chosen; when there is a reference image, inspect it first and extract its visual grammar, and when there is none, choose a profile suited to the content. Style participates in subsequent composition, not as a decorative sentence appended after the prompt is written; see
references/prompt-design-logic.md。 - Design the reading order, main areas, semantic groupings, connection channels, and necessary visual anchors by combining scientific meaning with the chosen style. Nest only when real hierarchy requires it; proportion is a compositional aid. Icons, small images, formula cards, robots, or bubbles are all optional, and pure label nodes are legitimate.
- Lock the visible text, semantic colors, and non-color encodings, and check text capacity and readability under the chosen style; close all edges before compilation. For revisions, write the Delta and Invariants first, and color changes must not alter the scientific topology.
- Compile content, layout, and style together into complete, compact natural language, rather than layering style patches onto an old prompt. Deliver prompt-only here; for rendering tasks, complete and validate the FigureSpec, then hand off for execution.
When the user directly describes the architecture, skip unnecessary repository scanning. Record it as sources in user_instruction, with the original request as evidence; component IDs use stable snake_case. Separate execution, suggestion, feedback, storage, and exception connections, and do not infer connections from position.
Style and semantic color scheme
Retain the four canonical style_profile:
classic-technical: technical line diagrams, precise topology, restrained color, clear sans-serif text.pastel-airy-ui: Light boundaries with white cards; color mainly lands on tokens, curves, and highlights, without stacking cards.illustrated-modular: Colored semantic sections, paired light fills/dark outlines, optional hand-drawn line art and character illustrations; do not default to equal density per section.reference-led: Extract layout, line, fill, font, illustration, and whitespace grammar from the reference images that have been viewed; this is not equivalent to a hand-drawn style.
Hues are bound to responsibilities, not color-matched by code directory count. Agentic diagrams can reference reasoning blue, context green, execution peach, advisory purple, memory cyan, output gold, and stop coral red; these are domain presets rather than universal facts. Support rich color schemes, grayscale printing, or dark backgrounds required by the data. Follow the surface and shadow rules determined by the reference/user, and avoid requiring 3D in one place while globally prohibiting 3D in another.
Maintain sufficient contrast between body text and background; double-encode key differences with color plus line style, labels, or shapes. Palette Decision outputs the profile, selection rationale, semantic bindings, background/body/outline, one alternative, and copyable tokens.
Text and compilation
Section headings usually do not exceed 5 words, and labels/edge labels usually do not exceed 3 words; these are abbreviation suggestions and must not compromise scientific meaning. Include only necessary formulas with sources. Remove secondary text first, then consider subfigures or deterministic layout, and do not increase density by endlessly shrinking the font.
Use compact prose for model input, without Markdown headings, bold, lists, or tables surrounding the instructions; preserve approved mathematical symbols and precise labels. By default, place the figure title in an external caption, and show a short figure title only when explicitly required by the user or design. The order is purpose, composition and components, closed-edge list, exact visible text, style and color, defect constraints, and proportions; see the compiler for details.
Render handoff and verification
Actual rendering uses academic-figure/FigureSpec@1, maintaining compatibility with the existing schema. All edges have correct endpoints,visible_text closed; references, output paths, and workspace_root all come from the real runtime environment. prompt-only does not need to fabricate a rendering environment.
Execute immediately before rendering (resolve the script path according to the actual installation location):
python3 <designer>/scripts/validate_figure_spec.py --strict-v1 --render-ready \
--workspace-root <trusted-actual-root> <spec.json>
prompt_review: requested display and stop;confirmed must match the SHA-256 of the reviewed prompt, and re-request review after changes;waived pass parameters internally and do not post them in the response. If validation fails, do not call the renderer.
Hand off to academic-figure-workflow using the currently available native image tools; before each image edit, first look at the baseline image, then save a new version and re-inspect node by node and edge by edge. A FigureSpec PASS does not mean the image PASSes. A prompt-only output does not claim to have passed image acceptance.