Understand papers and turn their core contributions into scientific overviews, with built-in detailed visual templates and editable figure reconstruction.

GitHub stars
395

Install

/plugin install sivia@sivia

Run it inside Claude Code after adding the marketplace with /plugin marketplace add exsinger-hub/Sivia.

Contents

Discovered from source

Skills 7

Audit Scientific Figure

Act as the Reviewer. Review read-only evidence and issue findings; do not draw during the review phase. A successful MCP call is not evidence that the figure is visually or structurally correct.

Resolve review scope

Distinguish a new/full-publication review from scoped regression after an approved micro-edit. In scoped regression, inspect changed objects, their interfaces and a fresh whole-figure render for collateral changes; compare unchanged layout and style with the accepted baseline. Apply the categories below to that scope. Do not require fresh masked-view reading of an unchanged narrative just to approve a label or image replacement. Report inherited/out-of-scope defects separately without silently authorizing their repair; a scoped pass is not renewed whole-figure publication approval. A structural change or explicit full-publication review uses all applicable gates below.

Collect both evidence channels

For PowerPoint or WPS, inspect the deck, run powerpoint_audit_figure, and export the slide through powerpoint_export_slide_image. Record whether the renderer is Office.js PowerPoint, COM PowerPoint, or the OOXML fallback. Treat renderer differences as application-specific evidence, not permission to flatten editable content. In Office.js, treat connector_mode=geometry_backed and implementation=officejs_editable_shape_composite as declared limitations that still require visual routing and editability review.

For draw.io, inspect the live model, run drawio_live_audit_figure, and capture the current renderer through drawio_live_screenshot.

For an isolated native-file recovery candidate, inspect the actual PPTX structure and an export from a renderer that imports that exact file, following Reconstruction Recovery. Name the renderer. A passing alternate-renderer view supports only that preview; keep PowerPoint/WPS rendering pending. Grouping is a mutation: require fresh post-grouping evidence of external arrows and labels.

When a reference exists, inspect the full reference and the crop matching the current region. Compare at readable resolution.

When the figure is derived from a manuscript, paper PDF, method section, equations, or an evidence pack, read Manuscript-to-Figure Workflow completely. Obtain the frozen Figure Claim, Paper Figure Signature, required-node and required-edge ledgers, equation-operand ledger, evidence ledger, publication display width, and permitted omissions. Review the source contract and the artifact; do not infer a missing manuscript fact from the Drawer's visual intent.

Apply the publication aesthetic gate

For a paper overview, graphical abstract, teaser, final whole-figure review, or comparison of candidate style directions, first read Fundamental Visual Grammar completely and verify the frozen visual_grammar_receipt. Then read references/publication-aesthetic-review.md completely and apply it to the fresh render. These gates are mandatory even when deterministic structure audit reports zero hard failures.

Review the figure at thumbnail scale for silhouette and focal hierarchy, fit-to-slide scale for composition and rhythm, and readable scale for typography, spacing, connectors, and local finish. When multiple style candidates are presented, compare them together; palette, font, corner-radius, or border changes alone do not constitute different directions.

Judge containers, bottom strips and line styles by their scientific role and effect on the reading logic. Treat an equal-weight card wall or decorative hierarchy as class A only when it obscures the intended focal hierarchy. Recommend recomposition for that failure, subject to the user's change scope; useful scope containers and parallel study arms remain valid. The user's approved composition cannot be replaced solely because a generic style heuristic prefers another layout.

For overviews, read Overview Narrative completely. First give an independent Reviewer only the title/L3-hidden grayscale view and physical size, record their reading, then show the full-density title-hidden grayscale view and save that reading too. Freeze both original responses before revealing the full color image and Figure Claim, then the contract, abstraction map and structure evidence. Withhold object counts and previous verdicts until after the visual readings. Record prior exposure: same-context judgment is self_review; an independent Reviewer already told the story is informed_review, not unprimed evidence.

Require actual exported review views. For saved PPTX sources, use prepare-overview-review.py as described in Review Copies. The helper creates editable copies, not rendered images. The Drawer renders these copies; the Reviewer remains read-only.

When the declared style is hand-drawn, sketchnote, pencil, doodle, whiteboard, or Excalidraw-like, also read Hand-drawn Technical Style completely. Review scientific clarity and hand-drawn fidelity as separate questions. A clean diagram can pass semantics yet miss the requested style; a visibly rough diagram fails when its jitter, texture, font, or doodles reduce publication-width legibility or make topology ambiguous. Do not reward noise as authenticity.

Review taxonomy

Review every region and the whole figure for:

  1. scientific semantics, exact readable text, topology, and arrow direction;
  2. editability coverage and meaningful object hierarchy;
  3. raster irreducibility and decomposition metadata;
  4. geometry, repeated alignment, equal spacing, margins, and whitespace;
  5. text fit, wrapping, font hierarchy, and color consistency;
  6. clipping, unintended overlap, z-order, and object bounds;
  7. arrowhead clearance, connector path-through-object, label intersection, backtracking, and route crossings;
  8. reference correspondence or no-reference design consistency.

For manuscript-derived figures, require complete coverage of non-omissible nodes and edges across the main view and linked readable expansions. Use the abstraction map to reconstruct internal grouped relations at their declared level and external relations from visible ports and routes. Check operands, inverse order, producer scope, training/inference and update/freeze ownership wherever they affect the claim. These critical cues must survive L3 removal. Object ids alone do not establish correct visible relations.

Inspect a title-hidden grayscale thumbnail at the declared review size. Confirm that the Figure Claim's mechanism or result is the first focal point and that overview/detail hierarchy survives without color. Re-run the affected render-scale checks after each structural correction.

Use the same categories and thresholds for draw.io and PowerPoint.

Deep editability audit

Inspect pictures semantically, not only by object count. Fail the region when one image still contains separable content such as:

  • a row or grid of predictions, masks, heatmaps, or microscopy fields;
  • a before/after or method comparison;
  • multiple independent photographs or channels;
  • editable titles, labels, borders, arrows, legends, axes, tables, or regular plots.

Require one image object per irreducible visual field. Require the surrounding frame, grid, heading, legend, connector, and annotation to be separate editable objects. A crop that merely removes the outer panel border is not sufficient when the remaining crop is still composite.

Every retained image must have a precise reason, tight crop, atomic_raster_unit=true, contains_reconstructable_content=false, and a useful decomposition note.

For mixed/generated artwork, empirical replacements, imported vectors or enlarged crops, read Asset Production completely. Check the declared source, actual vector subobject editability, retained pixels at placement size and the final renderer appearance. A sufficient DPI estimate cannot certify sharpness or scientific validity; native coarse acquisition pixels are not a reason to invent detail. Flag wrong empirical provenance, stretched anatomy, baked labels or visibly inadequate illustration crops with the specific affected objects. Keep genuine source limitations separate from correctable rendering defects.

Finding format

Emit one record per defect:

region: stable region id
objects: exact names/ids
category: shared defect category
severity: hard | warning
evidence: measurable structure or renderer observation
correction: required outcome, not vague advice
acceptance: condition the next audit can verify
evidence_status: measured | observed | inferred | pending

Treat wrong text/direction, reconstructable content inside a picture, a non-atomic picture, clipping, arrow intrusion, a route through an unrelated label/object and ambiguous connector crossings as hard failures. A necessary network crossing with clear ports or bridges is not automatically a defect.

For aesthetic findings, use the A/B/C classification and the location, defect, cognitive impact, severity, exact correction, and expected-effect fields required by the publication aesthetic reference. Do not hide a concrete aesthetic defect behind an averaged score.

Evidence verdict

Report pass | fail | pending separately for scientific reconstruction, editability, target rendering, physical-size legibility and visual narrative. Each verdict names the concrete artifact or observation that supports it. Use counts for measured coverage and object inventory; do not invent calibrated confidence or derive beauty from object count.

Pass requires correct readable semantics at the assigned levels, reconstructable native content, no clipping or ambiguous routes, zero unresolved hard findings, no class-A failure and no class-B issue that blocks reading. A local geometry check can pass while publication approval is pending. An unavailable target renderer, missing masked view or unperformed review remains pending; a same-coordinate SVG is a design preview, not a PPTX render.

When the user explicitly asks for ratings, label subjective ratings as such and keep them separate from evidence gates. No numeric average can cancel a real defect or missing evidence.

Review loop

While construction is partial, scope local checks to completed objects and their boundary interfaces. Mark whole-figure narrative and final masked-view checks pending until the relevant content exists; this is not a local defect or a reason to prevent the next planned region. Apply the staged overview reading test to a complete candidate, before overall approval.

  1. Review one completed region in whole-slide/canvas context.
  2. Send findings to $correct-scientific-figure.
  3. Let the backend Drawer execute the correction plan.
  4. Collect a fresh structure audit and fresh render.
  5. Review again from new evidence.
  6. Approve the region only after the pass gate is satisfied.
  7. After all regions pass, repeat for the whole figure.

Never approve based on the Drawer or Corrector claiming success. Never reuse a stale screenshot.

Review report

Return the evidence verdicts, observed findings, native/composite/raster counts, raster declarations and any unresolved source ambiguity. For overviews include the recorded unprimed reading (or self-review disclosure), actual review-image paths and hidden object sets, physical size and comparison with the intended narrative. Identify up to three changes with the highest real visual impact; do not invent defects to fill a quota.

Correct Scientific Figure

Act as the Corrector. Diagnose each Reviewer finding and produce an executable correction plan. Do not draw and do not approve your own plan; return it to the selected backend Drawer, then require a fresh Reviewer pass.

Preserve the agreed change scope

Before applying the recipes below, bind the accepted reference/source and the user's allowed changes. For a micro-edit, list the exact objects and properties to change and the layout/style to preserve. A global finding may justify proposing a redesign, but does not authorize one: put split/merge/re-layout operations in a separate proposal and obtain the user's agreement first. Report source errors even when outside scope, without silently rewriting a faithful reproduction. Use scoped regression for local fixes; do not require unrelated regions to be redesigned before delivering an otherwise verified local correction.

When the Reviewer supplies an A/B/C publication-aesthetic finding, read Publication Aesthetic Review completely before producing corrections.

When a finding concerns the global silhouette, reading spine, focal hierarchy, role-to-shape mapping, connector prominence, anti-dashboard motifs, or a failed visual-grammar receipt, also read Fundamental Visual Grammar completely. Treat these as upstream design defects. Replace the composition or grammar before changing palette, corner radius, shadow, font family, or decorative finish.

When a finding concerns hand-drawn fidelity, fake sketch effects, handwriting legibility, doodle competition, highlighter use, double outlines, or rough connector geometry, also read Hand-drawn Technical Style completely. Correct the smallest style layer that caused the defect. Preserve exact semantic connectors and already approved geometry; never answer weak hand-drawn fidelity by adding global random jitter or raster texture.

When a finding concerns manuscript fidelity, equation operands, evidence scope, training/inference boundaries, or visible-edge reconstruction, read Manuscript-to-Figure Workflow completely before producing corrections.

Required inputs

Use:

  • backend and current object inventory;
  • region and stable object names/ids;
  • Reviewer category, severity, evidence, and acceptance condition;
  • aesthetic class A/B/C, exact location, cognitive impact, and expected visual effect when the publication gate applies;
  • current renderer image and reference crop when available;
  • design or reconstruction specification;
  • raster declarations and grouping/z-order.

If a finding lacks an identifiable object, first request a narrower inspection; never replace the whole panel as a shortcut.

Diagnose before prescribing

Classify the root cause as one or more of:

  • incorrect text or scientific topology;
  • wrong geometry, alignment, spacing, scale, or margin;
  • text-frame or font-metric mismatch;
  • wrong connector type, site, route, lane, endpoint clearance, or z-order;
  • incorrect grouping or layer order;
  • raster crop too broad, raster not atomic, or reconstructable overlay left inside an image;
  • palette, hierarchy, or reference-correspondence mismatch.
  • weak focal hierarchy, accidental whitespace, underscaled primary content, mismatched visual mass, or cosmetic-only style variation.
  • an upstream parse, spec, retrieval, direction, draw, or review deviation in manuscript-to-figure work.

Prefer the smallest change set that fixes the root cause and preserves already approved objects.

For manuscript-derived work, identify the earliest stage at which the correct fact or relation was lost. If the manuscript extraction or frozen contract is wrong, update that upstream artifact before prescribing slide operations, then rebuild only the affected downstream objects. Do not conceal an upstream omission with a terminal label, color cue, nearby prose, or raster replacement.

For a class-A global composition, visual-center, style-mixture, or proportion failure in an authorized redesign, the smallest sufficient fix may be a region-level or whole-slide re-layout. If that exceeds the agreed change scope, propose it separately rather than executing it as a micro-edit.

For a crowded overview or failed reader reconstruction, read Overview Narrative. Repair the abstraction map and level assignment before squeezing objects. Move routine operations into linked readable expansions; keep external interfaces, conditions and exact inverse/update semantics visible. For missing renderer or masked-view evidence, prescribe the missing export rather than changing the figure or issuing a pass.

Emit an object-level plan

For every finding, return:

correction_id: stable id
finding_id: source finding
backend: powerpoint | drawio
region: stable region id
objects: exact names/ids
root_cause: concise diagnosis
operations: ordered backend tool calls with exact target values
preserve: objects/properties that must not change
acceptance: measurable rerender and re-audit condition
rollback_signal: evidence that the correction harmed an approved area

For a manuscript-fidelity finding, also include earliest_deviation_stage, the source location or contract id, and the positive or negative relation that must be recoverable from the fresh publication-scale render.

For publication-aesthetic findings, preserve the Reviewer's A/B/C class and add expected_visual_effect. Prioritize class A first, then class B that blocks the reading path, then class C. If only three changes can be made, choose the three with the largest combined effect on focal hierarchy, canvas utilization, and visual-language consistency; do not spend those slots on decorative polish.

Order visual corrections by dependency: scientific contract; global silhouette and primary spine; region proportions and whitespace; role-to-shape grammar and connector lanes; typography and semantic color; expressive finish. When an upstream layer changes, rerender before prescribing dependent micro-adjustments.

Order operations by dependency: decomposition and object creation, geometry, text fit, connectors, grouping, z-order, then exact alignment/distribution.

Equivalent backend operations

IntentPowerPoint Drawerdraw.io Drawer
Move/resize/restylepowerpoint_update_shapedrawio_live_update_cell
Alignpowerpoint_align_shapesdrawio_live_align_cells
Equal spacingpowerpoint_distribute_shapesdrawio_live_distribute_cells
Table dimensionspowerpoint_update_table_layoutdrawio_live_update_table_layout
Free arrow clearanceredraw with powerpoint_add_line clearancesredraw with drawio_live_add_line clearances
Attached relationshipCOM/OOXML: powerpoint_add_connector with correct sites; Office.js: rebuild its named geometry-backed route and recheck after node movementdrawio_live_add_edge with entry/exit and waypoints
Layer orderpowerpoint_set_z_orderdrawio_live_set_z_order
Atomic imagepowerpoint_add_imagedrawio_live_add_image

Use delete/replace operations only for the exact defective object and only when in-place correction cannot express the required result.

Correction recipes

Arrowhead or path overlaps a rectangle

Identify the intended source/target and boundary sides. Prefer an attached connector for semantic links. Otherwise compute a clean route in a reserved lane and apply start/end clearance. Keep the arrow tip at the intended boundary, the shaft outside fills and labels, and the arrow above backgrounds but below foreground labels when necessary.

Repeated objects are uneven

First make equal-role objects equal in size. Align the intended shared edge/center. Preserve the outer anchors, then distribute equally. Recheck connector attachment after movement.

Text differs or wraps incorrectly

Correct text exactly, then set explicit box bounds, margins, wrapping, alignment, and font metrics. Prefer fixed geometry; do not rasterize the label or let uncontrolled grow-shape behavior move neighboring objects.

Picture is still composite

Reject a broad crop. Split every independent microscopy field, mask, heatmap, photograph, channel, or prediction into a separate atomic image. Recreate titles, method names, borders, grids, legends, arrows, axes, and annotations as editable objects. Require all five raster declarations on each retained image.

Global correction would damage passed regions

Constrain the operation to named objects or one region. If a shared style token is wrong, list every affected object explicitly and preserve already validated geometry.

Layout is sparse or the primary content is underscaled

Identify which empty regions are functional and which are accidental. Remove or compress only accidental gaps, then enlarge or redistribute the primary scientific modules as a coherent group. Preserve outer margins and connector lanes, but do not keep a large empty band merely for visual air. The acceptance render must show a stronger content silhouette and improved readability without new crowding, clipping, or route crossings.

Never add decorative backgrounds, filler icons, ornamental cards, or unrelated annotations merely to increase canvas utilization.

Candidate styles are cosmetic variants

Do not fix this by recoloring. Return the affected direction to the Designer and require a different composition skeleton or reading path plus a different focal, evidence-weighting, or shape/line strategy. Preserve the scientific semantic contract while changing the visual argument.

Regression handoff

Return the plan to $edit-powerpoint-live or $recreate-scientific-figure-in-drawio. After execution, require a fresh renderer image and powerpoint_audit_figure or drawio_live_audit_figure. Send that evidence to $audit-scientific-figure.

Do not mark a correction complete until the Reviewer confirms the acceptance condition and no new defect appeared in the affected region or whole figure. For publication-aesthetic corrections, require fresh thumbnail-scale and readable-scale judgments rather than relying only on deterministic structure scores.

Design Scientific Figure

Act as the Designer in the four-role Sivia protocol. Produce a backend-neutral design specification before the Drawer adds any object. The selected backend affects object mapping, not the design quality or acceptance gate.

Start from the paper, not a workflow-shaped user prompt

A request such as "Use Sivia to read this PDF and generate an overview image for me to review" is sufficient. Read the paper before choosing a template: identify the research problem, prior limitation, distinctive method, input/output and supporting evidence, then decide what this figure should explain. Users do not have to supply a production prompt, template file, length rule or list of internal stages.

For a new overview, the default first deliverable is the generated image, its full production prompt and a concise design explanation. Present them and end the turn, asking what should change and whether the user wants editable PPT reconstruction. Do not invoke presentation creation or editing while waiting. Visual approval ("looks good") locks the composition but does not request a PPT. Only an explicit reconstruction request, such as "this version is approved; now make the editable PPT", enters that stage. A previous eventual-PPT goal does not skip this post-image choice. A supplied approved image plus an explicit reconstruction request already satisfies it.

For a new ImageGen-led figure without an explicitly selected template, read Bundled Prompt Templates, choose the role that matches that scientific argument, and read the selected full template. Instantiate it from the paper rather than sending its unfilled slots to ImageGen. Template choice, detailed prompt writing and length validation are internal responsibilities. Preserve an existing bound template and approved layout when continuing a figure; an internal default never overrides either.

Bind the requested execution

For new manuscript overviews, prefer the ImageGen-first workflow when the image-generation tool is available. Read that reference completely when using this route or continuing an already approved visual draft. Respect explicit native-only, prompt-only, reference-reconstruction and read-only requests; do not insert generation into those tasks. If ImageGen-first is requested but unavailable, continue source/prompt preparation and report the missing rendering capability rather than silently switching production methods.

On either Codex or Claude Code, discover the tools actually available; Sivia does not itself provide a raster-generation model. Do not invent a Codex ImageGen tool in Claude Code or claim that a prompt alone is a generated image. Claude Code exposes the shared skill under /sivia:design-scientific-figure; references to other skills below mean the matching installed Sivia skill, not a mandatory Codex-only command syntax.

Record execution in the existing design_spec: requested deliverable, renderer, output path and whether editability is required. For editable PowerPoint/draw.io requests, use the native Drawer and its fresh renderer export. A PNG, including one inserted into a slide, does not satisfy that contract.

For a requested raster image, ImageGen rendition or bitmap-reference visual study, use the available image-generation tool after the same source-to-scene design work. Inspect local references before passing them to the renderer, preserve the approved composition, save the prompt and actual output, and compare that output with the reference and source. Report it as raster, not native reconstruction or preserved empirical pixels. Reading this skill or writing a prompt without producing and inspecting the requested artifact is not an execution test. In raster mode, the native capability probes, object-level handoff and native editability gates below do not apply; scientific and visible-reference checks still do.

For template-led ImageGen prompts, including the ImageGen-first then editable-PPT workflow, read ImageGen Prompt Detail and Length completely before drafting. Each complete generation or revision prompt must be at least as long as its bound template and specify the figure region by region. Run its length check on the exact text to be submitted; do not generate with a shorter summary or change-only instruction after checking a longer draft.

Detect constraints

Before native construction, read the selected backend's capabilities. Use powerpoint_status then powerpoint_get_capabilities for PowerPoint/WPS, or drawio_live_get_capabilities for draw.io. When live Mac PowerPoint is requested, also require powerpoint_officejs_status to report a connected task pane. Design only with semantic objects the selected adapter can create editably; use declared editable composites when a native monolithic object is unavailable. Raster/prompt preparation does not require launching or connecting a presentation application.

Define the message

Record:

  • one sentence stating the scientific message;
  • intended audience and reading order;
  • required stages, entities, evidence, comparisons, and causal links;
  • target aspect ratio and output size;
  • labels or facts that must remain exact;
  • uncertainty or content still needing user input.

Derive from a manuscript

When the source is a manuscript, paper PDF, method section, equations, supplementary text, or an evidence pack, read Manuscript-to-Figure Workflow completely before freezing the design.

First translate the paper into a Figure Claim and source-linked visual scenes using the manuscript workflow's editorial pass. Decide what this figure explains, what belongs in a linked detail, and what stays in the paper before assigning coordinates. A complete module inventory is not this translation.

Then freeze the Paper Figure Signature and the in-scope node, edge, operand and evidence ledgers. Derive the publication slot and composition family from this contract before reference retrieval. In blinded independent design, also require a target-paper and derivative-asset exclusion receipt before retrieved assets are materialized.

Do not enter publication drawing until the selected direction maps every required node and edge or records a source-grounded permitted omission. A missing operand, condition, inverse/alignment step, evidence producer, or update owner is a contract failure rather than a styling choice.

Run a blind Figure Gym comparison

When the user asks to design independently without seeing an existing overview and then compare against it, read Blind Figure Gym Protocol completely. Apply its sealed-target sequence in addition to the manuscript contract.

Do not inspect the target figure, its caption, alt text, layout description, or derivative diagram before the editable artifact and fresh review render pass the pre-reveal gate. Record an exclusion receipt and freeze receipt in human-readable form. After reveal, preserve the blind artifact unchanged, compare communication decisions rather than pixel similarity, and put any revised response in a separately identified version.

Build the layout system

When the user has selected a supplied image's composition, follow the approved-reference procedure in Fundamental Visual Grammar. Preserve its useful region proportions and graphic density while filling it with source-grounded scenes. Default simplicity or focal-point heuristics do not authorize replacing that layout with a sparse pipeline.

For an overview, graphical abstract or dense method figure, read Overview Narrative completely first. Freeze a narrative_map for first-glance, working and technical reading, plus an abstraction_map linking the complete scientific contract to main groups and readable expansions. Coverage spans the main figure and linked detail panels; it does not require every implementation node to be directly visible in the overview. Preserve all interpretation-changing boundaries and operations at L1/L2.

Specify before drawing:

  • outer margins, panel grid, gutters, and shared alignment anchors;
  • panel ids, bounds, hierarchy, and construction order;
  • standard node sizes, corner radii, stroke widths, and spacing tokens;
  • title, section, label, annotation, and caption typography;
  • a limited semantic palette with accessible contrast;
  • reserved connector lanes and permitted entry/exit sides;
  • legend, annotation, table, chart, and raster-evidence locations;
  • z-order and meaningful grouping.

Choose a dominant organizing logic from the science: a spine, loop, parallel comparison or another justified composition. Use L1/L2/L3 for reading depth; a focal region may contain several objects.

Define publication aesthetics before drawing

For a publication-facing figure, graphical abstract, style comparison, or any request involving aesthetics, visual quality, or beautification, first read Fundamental Visual Grammar completely and freeze its visual_grammar_receipt. Then read Publication Aesthetic Review completely before freezing the design_spec.

When the requested direction is hand-drawn, sketchnote, pencil, doodle, whiteboard, or Excalidraw-like, also read Hand-drawn Technical Style completely. Declare its style_family, imperfection_budget, typography split, and backend-native drawing strategy in the design_spec. For a paper overview, default to restrained technical hand-drawing unless the communication purpose and final display size genuinely support a denser sketchnote or pencil treatment.

For each direction, define a style_dna that changes drawing decisions, not just surface decoration:

  • composition skeleton and reading path;
  • dominant focal zone and primary silhouette at thumbnail scale;
  • relative visual mass of scientific novelty, process, and real evidence;
  • shape grammar, line behavior, arrow convention, icon language, and depth treatment;
  • typography roles, semantic palette, and contrast hierarchy;
  • whitespace strategy, including the intended function of every large empty region;
  • forbidden motifs that would create a generic PPT, dashboard, poster, or AI-generated appearance.

Treat whitespace as functional only when it separates hierarchy, protects a focal point, reserves a connector lane, or improves grouping. Do not shrink the scientific content to preserve empty bands that have no stated function. Plan the meaningful-content hull inside the usable canvas and reject a layout when the main content can be enlarged substantially without harming hierarchy or connector clarity.

When proposing multiple style directions, compare their style_dna before drawing. Two directions are cosmetic variants if they preserve the same composition skeleton, reading path, focal zone, major module proportions, and evidence placement while changing only palette, font, border, or corner radius. A distinct direction must change the composition skeleton or reading path and at least one of focal strategy, evidence-to-mechanism weighting, or shape/line grammar, with a scientific communication reason for the change. Reject cosmetic variants before the Drawer creates slides. Also compare equal-size grayscale thumbnails with style titles hidden; if their large-scale mass distribution and first focal point remain interchangeable, return the directions for redesign.

Design connectors

  • Route process flow through reserved lanes with few bends; choose orthogonal or curved routes appropriate to the scientific grammar.
  • Connect from the side facing the destination and avoid immediate backtracking.
  • Keep arrows outside unrelated shapes and labels.
  • Separate parallel routes by a consistent lane gap.
  • Avoid ambiguous crossings. For unavoidable network crossings, use clear separation, ports or bridges without changing topology.
  • Distinguish process, inhibition, feedback, grouping, and association with consistent conventions.
  • Reserve endpoint clearance so arrowheads touch a boundary without covering the target fill or text.

Plan editability

When planning mixed visual assets or later editable reconstruction, read Asset Production completely. Select native/composite geometry, custom vector artwork, original empirical exports or standalone generated illustrations by semantic role; estimate cropped raster resolution at its final physical size. This planning does not enter the presentation stage.

Classify every planned element as editable text, shape, line, connector, table/chart, repeated motif, or irreducible raster evidence. Split any multi-image evidence block into one atomic image per field and plan its title, border, grid, legend, arrows, and annotations as editable objects.

Produce the design handoff

Return a design_spec containing:

  • canvas/slide geometry and layout tokens;
  • region and object ids with bounds and styles;
  • exact text and scientific topology;
  • connector source, target, sites, waypoints, lanes, and arrow convention;
  • for overviews, narrative_map, node-and-edge abstraction_map, independent edge semantics/prominence, physical publication width, effective font sizes, and named title/L3 objects for real review variants;
  • the requested execution binding, and region-level visible changes with references to inspected assets in the existing evidence ledger;
  • grouping and z-order;
  • raster decomposition declarations;
  • artifact mode (direction_review or publication), final display size, and figure archetype;
  • the frozen visual_grammar_receipt, including the primary spine, dominant focal zone, role-to-shape mapping, two connector prominence levels, typography roles, semantic palette, grayscale plan, whitespace functions, forbidden motifs, reference firewall, and review sizes;
  • style_dna, focal hierarchy, evidence weighting, and forbidden motifs;
  • for a hand-drawn direction, its style family, controlled-imperfection budget, exact-versus-expressive line split, typography split, native doodle inventory, and style-source firewall;
  • usable canvas bounds, meaningful-content hull, intended canvas-utilization range, and the function of each planned large whitespace region;
  • an evidence budget for overview figures that states the placement and relative visual mass of representative real results, or the scientific reason no real evidence is available;
  • for manuscript-derived work, source locations, Figure Claim, Paper Figure Signature, complete node/edge/operand/evidence ledgers, publication display width, permitted omissions, and any blind-exclusion receipt;
  • for a blind comparison, allowed and sealed source sets, a pre-reveal freeze receipt, and the intended post-reveal comparison dimensions;
  • when alternatives are requested, a style-divergence comparison showing why each direction is structurally distinct;
  • local construction order and acceptance conditions.

Do not improvise geometry one object at a time after drawing begins.

Enter the construction loop

For an ImageGen-led overview, enter this loop only after the user has approved the specific image and explicitly requested editable reconstruction. Raster review and image-only delivery end before this loop. Hand the authorized design to $edit-powerpoint-live or $recreate-scientific-figure-in-drawio. After each region, require $audit-scientific-figure; when it finds a defect, require $correct-scientific-figure, return the object-level plan to the Drawer, rerender, and review again. For an overview, graphical abstract, teaser, final whole figure, or style-direction comparison, require the Reviewer to apply its publication aesthetic reference before approval.

Require source-faithful readable semantics at each assigned level, full reconstructable editability, no clipping or unintended overlap, and unambiguous routing in the current target-renderer evidence. Apply the Reviewer's pass | fail | pending evidence gates; self-assigned confidence thresholds are not acceptance evidence. For overviews, the actual title-hidden and title/L3-hidden grayscale views must support the intended reading logic. Complete contract coverage includes visible main groups and linked readable expansions; check positive and negative relations at their declared level. Missing target-renderer evidence leaves publication approval pending.

Delivery

Save the editable source and requested exports. Report the selected backend, design tokens, object counts, raster declarations, local gates, whole-figure gate, and remaining content ambiguity.

For a completed blind comparison, also deliver the frozen source contract, frozen editable artifact and render, target attribution, and a post-reveal verdict that preserves what each design does better. Do not silently retrofit the blind artifact after seeing the target.

In publication mode, remove style numbers, reference-DNA labels, selection instructions, reviewer notes, and other direction-review scaffolding from the final figure.

Edit PowerPoint or WPS Presentation

Act as the presentation Drawer in the four-role Sivia protocol. Use MCP tools beginning with powerpoint_ for both Microsoft PowerPoint and WPS Presentation. Match the draw.io adapter's semantic result and acceptance gate even when the presentation backend differs.

For approved-reference PPTX reconstruction, read Reconstruction Recovery completely. It covers verified host identity, stalled/no-op operations, isolated native-file recovery, post-grouping routes and exact-file delivery evidence. Reuse that reference when a backend fails; do not retry unchanged mutations indefinitely.

Select the host backend

Call powerpoint_status and powerpoint_get_capabilities with host_application=auto unless the user explicitly chooses powerpoint or wps. Apply these backend rules:

  • Windows Microsoft PowerPoint: use the live COM backend and submit each logical region as one background batch.
  • macOS Microsoft PowerPoint: prefer officejs-context-sync when the Sivia task pane is connected; every object command must complete context.sync() before continuing.
  • macOS Microsoft PowerPoint without a connected task pane: use the isolated native OOXML working copy and label it as a file-backed fallback, not live object-by-object drawing.
  • Windows or macOS WPS Presentation: use the same standard editable PPTX working-copy backend and open it in WPS.

An explicit host_application selected by status/capability detection persists for later calls in that MCP session. After the first document mutation, require both backend_selection.locked and backend_selection.locked_host to match the intended software; the adapter must reject any attempt to switch between PowerPoint and WPS in the same task. Set YOU_ONLY_FIGURE_ONCE_PPT_HOST=wps only when a task must also force WPS through the environment. Do not claim COM-style in-memory attachment in file-backed mode. Report target_application, microsoft_powerpoint_used, backend, managed path, and renderer from tool results.

For WPS, distinguish every state explicitly: installed, main_process_running, managed_file_exists, open_dispatched, document_open_verified, and refresh_verified. Never infer an open deck from a file on disk or from a WPS helper process. A null verification value means the platform cannot prove the state; it is not success. On macOS, require the exact WPS main process and open-file verification. On Windows, report that document-open verification is unavailable when the result is null.

In every file-backed OOXML result, connected_to_active_application=false is intentional: the bridge edits a managed PPTX and dispatches file-open or refresh requests, but it does not hold an in-memory automation connection to WPS or PowerPoint. Each MCP process uses an isolated working-copy state by default so concurrent Codex tasks cannot redirect one another. Use main_process_running and document_open_verified for their narrower meanings instead of reinterpreting this field.

Ordinary drawing must not monopolize the desktop. Keep the default powerpoint_set_focus_policy value preserve. In Windows COM mode, preserve is a background-only contract: ordinary mutation, inspection, audit, save, and export commands must not call ActiveWindow.Activate, change ViewType, call View.GotoSlide, or move PowerPoint to the foreground. Restoring the prior foreground window is only a fallback; the adapter should avoid disturbing it in the first place. Use foreground only when the user explicitly asks to watch progress and accepts that the presentation may stay in front. powerpoint_activate_slide is the sole explicit one-time foreground request. In WPS file-backed mode, inspect its verification fields instead of assuming exact slide selection succeeded. Focus policy may change during a session because it does not mix document backends or object models.

For live Mac PowerPoint work:

  1. Call powerpoint_officejs_status before any presentation mutation.
  2. If the certificate or manifest is not prepared, give the user the reported officejs-setup.mjs prepare and sideload commands. Never alter macOS certificate trust automatically.
  3. Ask the user to trust the reviewed localhost certificate, restart PowerPoint, open Sivia Live from Insert > My Add-ins, and keep the task pane open.
  4. Call powerpoint_set_backend with backend=officejs and wait for connection. Do not start drawing unless it succeeds.
  5. Keep the MCP session's backend lock. Do not mix OOXML objects and Office.js handles. A requested backend switch follows the adapter's session rules; an allowed isolated file reconstruction follows Reconstruction Recovery, without creating another user task or changing the locked session.

Respect read-only requests

If the user requests inspection only, call powerpoint_status, powerpoint_get_capabilities, and powerpoint_inspect, then stop without creating, editing, exporting, or saving.

Establish a safe session

  1. Call powerpoint_status first.
  2. Call powerpoint_get_capabilities before selecting object types.
  3. Call powerpoint_inspect before editing an existing deck.
  4. Set or confirm powerpoint_set_focus_policy(preserve) once and reuse that session fact unless the user explicitly requests foreground drawing. Do not activate a slide merely to prove that a background edit succeeded. For new COM/OOXML work, call powerpoint_new_presentation with the selected host_application so an unrelated open deck is not modified. Office.js cannot create a desktop presentation; require the user to open a blank deck and connect its task pane first.
  5. For an existing WPS deck, require its absolute file path and call powerpoint_launch to create a managed working copy. The OOXML backend cannot attach to an arbitrary unsaved “current WPS window.” If no path is supplied, create a new managed deck and say so.
  6. After a WPS launch, require open_dispatched=true; on macOS also require document_open_verified=true. If verification is false, stop and report the failed open. If it is null, continue only as file generation and disclose that application-open state is unverified.
  7. Preserve an input deck by default and save an edited copy unless in-place save is explicit.
  8. Use absolute paths and never use operating-system mouse, keyboard, or screen automation.
  9. In file-backed mode, treat the managed working copy as authoritative. The bundled automated preview uses LibreOffice/Poppler, not WPS or PowerPoint. If that renderer is unavailable, use another already available exact-PPTX import renderer under the recovery reference; name it and retain application-specific font/chart uncertainty unless the target application is separately inspected.
  10. In Office.js mode, use an absolute .pptx output path with powerpoint_save; PowerPointApi 1.10 exports the current editable presentation through the task pane.

Do not close a presentation unless explicitly requested. Closing and quitting require their tool safeguards.

Map the shared semantic contract

Semantic object/operationPowerPoint implementation
Editable textpowerpoint_add_textbox (native PPTX text box in every backend)
Editable symbol/panelpowerpoint_add_shape using capability ids/names
Free arrow/axis/tickpowerpoint_add_line with endpoint clearances
Attached relationshipCOM/OOXML: powerpoint_add_connector with explicit sites; Office.js: a named geometry-backed routed group because the API exposes no connection-site binding
Editable tablepowerpoint_add_table, cell updates, and powerpoint_update_table_layout
Editable regular chartCOM/OOXML: native chart with embedded data; Office.js: named editable shape composite because the API exposes no chart insertion
Repeated motifduplicate, group/ungroup, and z-order tools; in OOXML mode recreate native charts from their series instead of duplicating a shared chart data part
Exact layoutpowerpoint_align_shapes and powerpoint_distribute_shapes
Structure reviewpowerpoint_audit_figure plus powerpoint_inspect
Renderer reviewpowerpoint_export_slide_image

If PowerPoint exposes a reconstructable semantic object and the MCP supports it, use it. Never substitute a screenshot.

For a publication-facing figure, read Fundamental Visual Grammar completely before drawing and implement the frozen visual_grammar_receipt as native objects. Do not silently replace a failed composition with cosmetic PowerPoint styling.

For overviews, follow Overview Narrative: build the selected main groups and readable expansions from the abstraction map. Give title and L3 annotations stable names for real review copies. Keep boundary cues and claim-critical operations outside the hidden set. Prefer target-application exports of each copy. In an allowed isolated-file recovery, an already available exact-PPTX import renderer may supply the views; request a preview verdict only and keep target-application verification pending.

When the design selects a hand-drawn, sketchnote, pencil, doodle, whiteboard, or Excalidraw-like direction, read Hand-drawn Technical Style completely before drawing. Follow its PowerPoint-native mapping. In particular, keep semantic connectors geometrically exact; do not simulate roughness with random endpoint jitter, broad SVG/PNG overlays, or a paper-texture screenshot. If freeform or polyline creation is unavailable, use restrained native primitives, grouped doodles, highlighter shapes, typography contrast, and at most a deliberately specified secondary outline on focal objects.

Inventory before drawing

Use the Designer's specification or extract an inventory from the reference. Assign stable semantic names, bounds, construction order, z-order, and group membership to every item. Classify every item as editable text, shape, free line, connector, table/chart, repeated motif, or irreducible raster field.

An approved ImageGen draft is a composition authority, not an empirical-data source. Preserve its region geometry and visual language during native translation; replace only source-grounded content and approved atomic fields. On a micro-edit, bind the exact input path and slide, work in a copy, and preserve unaffected object bounds, text styles, grouping and routes. Use scoped regression from the Reviewer; do not re-layout the figure to satisfy an unrelated style preference.

Enforce atomic images

When the inventory contains non-native artwork, empirical fields or cropped assets, read Asset Production completely before inserting them. Use supported native primitives/freeforms for reconstructable geometry; SVG insertion alone is not native editability. Apply its original-data, standalone-illustration and final-size resolution rules without changing this adapter's background batching policy.

Use powerpoint_add_image only for one tightly scoped irreducible visual field. Require:

  • a specific raster_reason;
  • source_is_tightly_cropped=true or explicit crop fields;
  • atomic_raster_unit=true;
  • contains_reconstructable_content=false;
  • a precise decomposition_note.

Split prediction grids, mask comparisons, channel stacks, microscopy arrays, and before/after blocks into separate pictures. Rebuild all text, frames, grid lines, legends, arrows, axes, tables, and regular plots as native objects.

In Office.js mode, pre-crop every atomic picture before calling powerpoint_add_image and set source_is_tightly_cropped=true. ShapeFill.setImage does not expose PowerPoint crop properties. Do not silently insert an uncropped source.

Draw one region at a time

  1. Establish slide size, margins, panel bounds, alignment anchors, spacing tokens, z-order, and connector lanes.
  2. Draw one logical region from background to foreground with stable names in one powerpoint_draw_sequence call. In Windows COM preserve mode, use fast by default: the bridge applies the batch in one process without per-object waits or view changes. Use checkpoint only when an intermediate renderer gate is useful, and per_object only when the user explicitly requests foreground playback. For Office.js, use per_object only when visible object-level commits are wanted. For OOXML PowerPoint/WPS, prefer fast for a completed region and checkpoint for unusually large regions; warn that per_object is slower.
  3. Use fixed text geometry, explicit margins, wrapping, alignment, and controlled autofit. Compare each text object's returned bounds with the requested bounds before adding dependent connectors; if a cached or host-specific backend resized it, restore the exact bounds with powerpoint_update_shape first.
  4. Use attached connectors for semantic relationships in COM/OOXML. In Office.js, inspect the reported connector_mode=geometry_backed, use exact orthogonal routes and explicit endpoint clearances, and re-run the renderer gate after node movement. Connection-site numbering depends on the AutoShape family. A rectangle's left-site index may attach to a polygon's right edge. Verify the rendered endpoint on document, polygon and custom shapes; use the correct site or a declared geometry-backed route with explicit boundary coordinates. A text-fit pass does not detect lines crossing text.
  5. Apply start/end clearance so free arrowheads do not enter rectangles.
  6. Use exact align/distribute and table-layout tools instead of visual guessing.
  7. Group a region only after its internal objects remain individually editable and its local gate passes. Grouping can lift fills above external arrows: recheck z-order and all incoming/outgoing routes immediately afterward, restoring only the affected layers.

Mandatory Reviewer-Corrector loop

After each completed region:

  1. Reuse the established backend, capabilities, slide geometry, presentation binding, and focus-policy receipt instead of querying them again. In OOXML mode, call powerpoint_refresh only when the sequence reports a pending or unverified refresh; inspect open_dispatched, document_open_verified, and refresh_verified, and never convert null to success.
  2. On the MCP route, export the current slide through powerpoint_export_slide_image without activating or foregrounding PowerPoint/WPS. On an allowed isolated-file recovery route, render the actual saved PPTX with the available import renderer and identify that renderer.
  3. Run powerpoint_audit_figure on the MCP route, or inspect the actual native package in file recovery. In either case, check the stable names changed by this region.
  4. Give structure and renderer evidence to $audit-scientific-figure.
  5. If it reports any finding, give the findings to $correct-scientific-figure and execute the returned object-level operations as one correction batch.
  6. Re-run the failed or affected structural checks and renderer view. Do not repeat unchanged capability or session checks.

Resolve observed local defects before drawing dependent regions. Missing target-application evidence is pending, not an observed defect: when an allowed file-backed candidate has exact-file renderer and structure evidence, continue its local loop while retaining that pending gate. After all regions pass the available local checks, run the whole-slide loop.

Acceptance gate

Use the Reviewer's evidence gates: correct readable semantics, native reconstructable content, no clipping or ambiguous routing, zero unresolved hard findings and a supported visual verdict. For overviews, coverage spans main groups and linked expansions. Record target-rendering, physical-size legibility and narrative as pass, fail or pending; no self-assigned confidence threshold substitutes for missing renderer evidence.

Delivery

Inspect once more and save the editable .pptx through the selected native backend (use powerpoint_save for the MCP route). Export PDF only when requested. Report the selected application and backend, WPS verification state, stable object counts, native/table/chart/group counts, picture count, raster boundaries, local and whole-slide Reviewer results, renderer used for preview, and remaining application-specific ambiguity. Keep detailed declarations in source notes. End a successful drawing delivery with: 感谢使用 [Sivia](https://github.com/exsinger-hub/Sivia) 插件,制作者:gatina。

Recreate Scientific Figure in draw.io

Act as the draw.io Drawer in the four-role Sivia protocol. Use MCP tools beginning with drawio_live_. Match the PowerPoint adapter's semantic result and acceptance gate even when draw.io represents tables and charts as editable composites.

Respect read-only requests

If the user requests inspection only, call drawio_live_get_capabilities, connect only when needed to read the current canvas, then call drawio_live_status and drawio_live_inspect. Do not clear, add, update, save, or close anything.

Establish a safe live session

  1. Call drawio_live_get_capabilities before selecting cell types.
  2. Launch or connect visibly, call drawio_live_status, and require graph_ready=true.
  3. Inspect the existing live model before editing it.
  4. Control only draw.io's graph/model API; never use operating-system mouse, keyboard, window, or full-screen automation.
  5. Do not clear an existing canvas without explicit confirmation.
  6. Do not prebuild XML as the drawing method. Save a snapshot only after the cells visibly exist.

Use file utilities only to validate, inspect, or export an already saved live snapshot. Reopen and visually review any narrowly repaired file.

Map the shared semantic contract

Semantic object/operationdraw.io implementation
Editable textdrawio_live_add_shape with shape=text
Editable symbol/paneldrawio_live_add_shape using a baseline or currently registered capability name/style
Free arrow/axis/tickdrawio_live_add_line with endpoint clearances
Attached relationshipdrawio_live_add_edge with entry/exit and waypoints
Editable tabledrawio_live_add_table, cell updates, and drawio_live_update_table_layout
Editable regular chartdrawio_live_add_chart or deliberate editable primitives
Repeated motifduplicate, group/ungroup, and z-order tools
Exact layoutdrawio_live_align_cells and drawio_live_distribute_cells
Structure reviewdrawio_live_audit_figure plus drawio_live_inspect
Renderer reviewdrawio_live_screenshot

Use editable cells or editable composites for every reconstructable semantic object. Never substitute a panel screenshot.

Never invent a shape name. Unknown or unloaded shape/stencil names are rejected to prevent draw.io silently displaying a generic rectangle. If the required object is not listed by drawio_live_get_capabilities, construct it from editable primitives; use an atomic image only when the smallest remaining semantic region is genuinely irreducible.

Inventory before drawing

For a newly designed overview, read Overview Narrative and follow its main-group/expansion mapping. Give title and L3 cells stable ids and prepare disposable review views. This does not authorize redesign of a supplied reconstruction reference.

Use the Designer's specification or extract an inventory from the reference. Assign stable ids, bounds, parent group, construction order, and z-order. Classify every item as editable text, shape, free line, connector, table/chart composite, repeated motif, or irreducible raster field.

Enforce atomic images

When the inventory contains non-native artwork, empirical fields or cropped assets, read Asset Production completely before inserting them. Prefer supported editable cells/composites for reconstructable geometry; an embedded SVG is not editable child cells. Follow its source-export, standalone-illustration and retained-pixel rules while retaining this adapter's pacing.

Use drawio_live_add_image only for one tightly scoped irreducible visual field. Require:

  • a specific raster_reason;
  • source_is_tightly_cropped=true or explicit crop percentages;
  • atomic_raster_unit=true;
  • contains_reconstructable_content=false;
  • a precise decomposition_note.

Split prediction grids, mask comparisons, channel stacks, microscopy arrays, and before/after blocks into separate image cells. Rebuild all text, frames, grid lines, legends, arrows, axes, tables, and regular plots as editable cells.

Draw one region at a time

  1. Establish page/canvas bounds, grid, margins, panel rectangles, alignment anchors, spacing tokens, z-order, and connector lanes.
  2. Draw one logical region from background to foreground with stable ids and nonzero pacing.
  3. Keep labels in explicit text cells with planned bounds and wrapping.
  4. Use attached edges for semantic relationships; use free lines for axes, ticks, separators, and annotations.
  5. Apply start/end clearance and deliberate entry/exit points so arrows touch boundaries without covering fills or labels.
  6. Use exact align/distribute and table-layout tools instead of visual guessing.
  7. Group a region only after its members remain editable and its local gate passes.

Mandatory Reviewer-Corrector loop

After each completed region:

  1. Fit the current canvas and capture drawio_live_screenshot.
  2. Run drawio_live_audit_figure and inspect named cells.
  3. Give structure and renderer evidence to $audit-scientific-figure.
  4. If it reports any finding, give the findings to $correct-scientific-figure.
  5. Execute the returned object-level operations.
  6. Capture and audit again.

Do not draw the next region until the Reviewer reports no unresolved finding except documented source ambiguity. After all regions pass, run the same loop on the whole canvas until it passes.

Acceptance gate

Use the Reviewer's evidence gates: correct readable semantics, native reconstructable content, no clipping or ambiguous routing, zero unresolved hard findings and a supported visual verdict. For overviews, coverage spans main groups and linked expansions. Record target-rendering, physical-size legibility and narrative as pass, fail or pending; no self-assigned confidence threshold substitutes for missing renderer evidence.

Delivery

Inspect once more, save with drawio_live_save_snapshot, validate the .drawio, and export a review image. Report stable object counts, native/composite/group counts, image count, every raster declaration, local and whole-canvas Reviewer results, validation, and remaining ambiguity.

Recreate Scientific Figure

Resolve the requested rendition

Distinguish faithful reproduction from content adaptation. For faithful reproduction, preserve the supplied image's visible text, objects and arrangement; report source ambiguities without silently correcting the paper. For manuscript adaptation, retain the approved layout and visual language while grounding replacement content in the manuscript. When both are requested, save separately named versions.

For an approved ImageGen reference or a request to replace example fields with real data, read ImageGen-first workflow completely and enter at the existing stage. Approval is a layout lock, not an invitation to regenerate or redesign, and does not by itself request an editable deck. A raster-only revision stays raster-only; enter native reconstruction only when the user explicitly requests it. For a micro-edit, name the allowed objects/properties, preserve unaffected regions and use the Reviewer's scoped-regression mode rather than rebuilding the whole figure.

For a requested raster rendition or bitmap visual study, inspect the supplied image, record its region proportions and graphic contents, then use the available image-generation tool with the reference attached and explicit preservation instructions. Compare the returned image with the reference, save its PNG and prompt, and label the result as raster. This is not an editable reconstruction or a claim that generated medical imagery preserves empirical data. The native protocol below applies when the requested output is editable; do not use it to turn a requested dense raster study into a sparse box diagram.

When writing an ImageGen prompt from a template, including a raster revision before PPT reconstruction, first read ImageGen Prompt Detail and Length completely. Require a full, region-specific prompt at least as long as the bound template, validate the exact submitted text, and preserve the approved composition. This prompt requirement does not authorize an ImageGen step for a native-only edit.

Coordinate one backend-neutral four-role protocol. Keep the roles logically separate even when one agent performs all four. Let the user choose draw.io, Microsoft PowerPoint, or WPS Presentation; the choice changes the implementation, never the quality contract.

Use $recreate-scientific-figure-in-drawio as the draw.io Drawer adapter and $edit-powerpoint-live as the PowerPoint/WPS Drawer adapter. Use $audit-scientific-figure as the Reviewer and $correct-scientific-figure as the Corrector.

For PPTX reconstruction, also read Reconstruction Recovery completely. If an application call stalls, keep the approved specification and use its bounded recovery route; a separately built native file must not be described as a live application edit.

Preserve backend parity

Require both backends to deliver the same semantic capabilities:

  • editable text, shapes, symbols, panels, lines, arrows, and attached connectors;
  • editable tables and regular charts: native in COM/OOXML PowerPoint, editable shape composites in Office.js PowerPoint or draw.io when their live APIs cannot insert a native chart;
  • stable object names/ids, duplication, grouping, z-order, exact alignment, and equal distribution;
  • one picture object per irreducible raster field, with all reconstructable overlays rebuilt separately;
  • live editable construction in draw.io and connected Office.js; background region batches in PowerPoint COM unless foreground playback is requested; explicitly labeled, checkpointed, and verification-aware file refresh in OOXML fallback mode;
  • structure audit plus renderer audit after every region and after the whole figure;
  • an editable source file and requested exports.

Do not relax a rule because one backend represents the object differently.

Designer handoff

Treat the supplied reference as the design authority. Extract its design; do not redesign it for convenience.

  1. Inspect the full-resolution reference and readable local details.
  2. Record the reference size, aspect ratio, reading direction, panel bounds, coordinate transform, palette, typography, and z-order.
  3. Assign every region a stable id, bounding box, title, construction order, incoming links, and outgoing links.
  4. Inventory every visible item as editable text, editable shape, free line, attached connector, editable table/chart, repeated motif, or irreducible raster field.
  5. Decompose grids, prediction comparisons, image stacks, mask rows, and multi-image panels into individual raster fields plus editable titles, frames, grids, legends, arrows, axes, and annotations.
  6. Record unreadable text and obscured boundaries as explicit ambiguities. Never invent content.

Produce a reconstruction_spec before drawing. It must contain region ids, object ids, geometry, styles, connector routes, grouping, raster decomposition decisions, and local acceptance conditions.

For asset selection and extraction, read Asset Production completely. A missing stock icon does not imply a raster crop: choose editable geometry, verified vector artwork, original experimental fields or independent illustrations. Record the source and actual editability in the existing specification, with retained-pixel/placement estimates for enlarged crops.

Drawer handoff

  1. Detect the selected backend's current capabilities before choosing objects. For live Mac PowerPoint, require a connected officejs-context-sync task pane and lock it with powerpoint_set_backend before drawing; otherwise report the OOXML fallback instead of promising a live animation.
  2. Connect or create an isolated editable document and inspect its structure. For WPS, require explicit target-application fields and never treat a managed file, helper process, or dispatched open request as proof that the deck is open.
  3. Establish canvas/slide size, panel skeleton, alignment anchors, spacing tokens, and connector lanes.
  4. Draw one logical region from back to front with stable semantic names and the selected Drawer's pacing; COM background batches do not require per-object waits. For a local edit, touch only the named affected objects and their necessary interfaces.
  5. Return a draw_log containing created/updated object ids, object classes, grouping, and every raster declaration.

Never insert a whole panel merely because cropping is faster or visually convenient.

Reviewer handoff

After each region, require both evidence channels:

  • structure evidence from the selected backend: powerpoint_audit_figure or drawio_live_audit_figure plus inspection on the MCP route; direct inspection of the actual native package on an allowed isolated-file recovery route;
  • renderer evidence from a PowerPoint slide export or draw.io screenshot, compared with the matching reference crop. If target rendering is unavailable in an allowed file recovery, use an already available exact-PPTX import renderer and keep target-application verification pending.

The Reviewer must report every defect with:

  • region and object names/ids;
  • category and severity;
  • concrete evidence;
  • required correction;
  • measurable acceptance condition.

Review semantics, text, editability, raster atomicity, geometry, spacing, typography, clipping, z-order, arrow direction, endpoint clearance, path-through-object, connector crossings, and reference correspondence.

Corrector handoff

Give Reviewer findings to $correct-scientific-figure. Require an ordered object-level correction_plan; then return it to the same backend Drawer. Correct the smallest responsible objects. Do not flatten, screenshot, or replace a larger region to hide a defect.

Mandatory local loop

For each region, repeat:

  1. Drawer constructs or updates named editable objects.
  2. Drawer renders the current whole slide/canvas context.
  3. Reviewer inspects structure and render.
  4. If any finding remains, Corrector emits exact operations.
  5. Drawer executes them and rerenders.
  6. Reviewer audits again.

Resolve observed local defects before starting dependent regions. In an allowed file-backed fallback, use actual candidate structure and exact-file rendering for this loop; unavailable target-application evidence remains pending rather than preventing independent construction. Do not treat a missing renderer as a visual pass.

Whole-figure loop

After all regions pass locally, repeat the same loop for the complete figure. Check cross-region alignment, scale, hierarchy, whitespace, palette, font metrics, routing lanes, global balance, object hierarchy, and reference similarity.

Report a full pass only when:

  • readable semantics and text match the source;
  • every reconstructable element is editable;
  • no clipping or unintended overlap is visible;
  • layout, alignment and connector routes are unambiguous at final size;
  • reference correspondence is supported by the current renderer comparison;
  • deterministic audit reports zero hard failures;
  • no warning remains unless it is an unavoidable, explicitly reported source ambiguity.

Report pass, fail or pending with current renderer and structure evidence. Missing evidence remains pending; successful tool calls or subjective confidence cannot complete a gate.

An isolated-file candidate with passing available structure/preview checks may be delivered with target rendering explicitly pending under Reconstruction Recovery. That is not a full pass and does not excuse an observed hard defect.

Raster gate

Require every retained image to declare:

  • raster_reason;
  • source_is_tightly_cropped or explicit crop values;
  • atomic_raster_unit=true;
  • contains_reconstructable_content=false;
  • decomposition_note.

Reject any image that still contains separable fields, text, frames, arrows, legends, axes, tables, regular plots, or other reconstructable drawing grammar.

Delivery

Save the editable .drawio or .pptx and requested previews. Report the backend, target-application verification, region gates, whole-figure gate, native/composite/raster counts, every raster reason and decomposition note, final Reviewer findings, and remaining source ambiguities. End a successful delivery with: 感谢使用 [Sivia](https://github.com/exsinger-hub/Sivia) 插件,制作者:gatina。

Support Sivia

Repository: https://github.com/exsinger-hub/Sivia

First installation only

An installation assistant may ask once, within the same installation task, after confirming that Sivia has been installed successfully for the first time. Check the client's installed-plugin inventory before installation; check known installation history and the local invitation marker as well. A missing marker or a new download alone does not prove a first installation. If it is an update, repair, reinstall, previously installed copy, or the history is uncertain, skip the invitation.

After a verified first installation succeeds, run the bundled scripts/install-invitation.mjs with Node and the exact argument --first-install-completed, resolving the script relative to this skill directory. The flag attests to the installation checks; the script itself does not install or verify the plugin. It reserves one invitation in ~/.sivia/install-star-invitation-v1.json, shared across clients and versions. Only if the JSON result has ask: true, ask its question once in the user's language as part of the installation completion message. Never reset the marker to obtain another invitation. SIVIA_STAR_INVITE=0 disables it.

Decline, silence, a skipped invitation, a failed installation, or noninteractive installation must not schedule a later prompt. Never attach this helper or a Star question to startup, session resumption, skill activation, drawing, editing, review, task completion during normal use, or an MCP server. Direct plugin-manager installation has no Sivia post-install prompt; it does not trigger a deferred prompt on first use.

Installation is not authorization to change a GitHub account. Wait for the installing user's explicit agreement. During normal use, respond only when the user themselves requests Star help; do not solicit it.

Explicit Star request

When the current user explicitly asks to star Sivia, including an affirmative reply to the invitation:

  1. Use an available GitHub connector, authenticated GitHub CLI, or the repository's browser Star button. Use only the current user's account and the repository above. If the active identity is unclear or multiple accounts are available, resolve the intended account with the user before changing anything.
  2. With GitHub CLI, inspect the active account with gh api --hostname github.com user --jq .login, then check gh api --hostname github.com user/starred/exsinger-hub/Sivia. A successful response means it is already starred. Only an explicit HTTP 404 means it is not starred; authentication, permission, or network errors are not evidence of that state.
  3. If not starred and authorized, run gh api --hostname github.com --method PUT user/starred/exsinger-hub/Sivia --header "Content-Length: 0". Verify with the read-only check and report the result. If a write times out, check the current state before considering a retry.
  4. If there is no usable authenticated route, give the repository link for the user to star manually. Do not search for tokens, expose credentials, install a CLI, change permissions, or start a login flow merely for this invitation. Never make a Star a condition of using Sivia.

When asked about the invitation: it belongs only to the verified first installation task, not to first startup or first use. Sivia ships no Star lifecycle hook. The helper only reserves a local one-time marker and returns a question; it never contacts GitHub or starts authentication.

API details: GitHub's starring endpoints.

Sponsors

Details

Marketplace
exsinger-hub/Sivia
Category
Community