Skip to main content

routegraph

Generate editable PowerPoint technical route diagrams from paper figures, screenshots, sketches, or text descriptions using PowerShell and PowerPoint COM. Use when Codex needs to reproduce or draft research route maps, multi-panel technical workflows, AI/ML method diagrams, counterfactual analysis frameworks, or revise an existing generated diagram from a screenshot with special attention to arrow topology, routing, labels, and editable PPT output.

Quellinformationen

Repository
LY2260789/routegraph-skill
Letzte Quellaktivität
22. September 2026 um 02:13
Erkannte Sprache von SKILL.md
Englisch
Sterne
7
Forks
0

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
routegraph
description
Generate editable PowerPoint technical route diagrams from paper figures, screenshots, sketches, or text descriptions using PowerShell and PowerPoint COM. Use when Codex needs to reproduce or draft research route maps, multi-panel technical workflows, AI/ML method diagrams, counterfactual analysis frameworks, or revise an existing generated diagram from a screenshot with special attention to arrow topology, routing, labels, and editable PPT output.
# RouteGraph ## Purpose Create editable PowerPoint technical route diagrams, not flattened screenshots. Prefer PowerShell + PowerPoint COM scripts that draw native PPT shapes, text boxes, connectors, and grouped visual structure so the user can refine the result in PowerPoint. RouteGraph optimizes for correct scientific and workflow logic first. Visual polish is secondary to arrow topology, readable layout, stable text, and editability. ## Workflow 1. Understand the input. - For an uploaded figure or sketch, identify panels, reading order, text blocks, boxes, model blocks, result blocks, background regions, and arrows. - For a text-only request, infer the same structure before writing code. - If the diagram is complex, read `references/prompts/image_to_structure.md`. 2. Output a structure plan before code. - Always include an arrow topology table before generating a full script. - Use this format: ```text Arrow ID | From | To | Style | Meaning | Priority ``` 3. Generate a PowerShell COM script. - Use native editable PPT elements. - Use absolute coordinates. - Reuse helper patterns from `assets/templates/*.ps1`. - Keep PowerShell special symbols stable, especially Greek letters and subscripts. - Do not paste the entire source figure as a background image unless the user explicitly asks. 4. Provide run instructions. ```powershell Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass .\routegraph_generate.ps1 ``` 5. Iterate from screenshots. - Ask the user to return a screenshot of the generated PPT. - On revision, inspect arrows first, then layout, then text and styling. - If revising from a screenshot, read `references/prompts/screenshot_revision.md`. ## Critical Rules - Arrow logic has highest priority. Wrong source, target, direction, missing critical arrows, or mismatched arrow style are high-severity failures. - Draw each logical arrow as one continuous PowerPoint shape whenever possible. - Use `Add-LineArrow` for direct straight arrows. - Use `Add-ElbowArrow` for simple L-shaped or Z-shaped routes. - Use `Add-PolylineArrow` for controlled multi-bend routes. - Do not build one logical arrow from several independent `Add-LineSegment` calls plus a final arrowhead unless there is a true branching junction. - For dashed arrows, this is mandatory: a dashed route must normally be one shape so the dash pattern is continuous across bends. - Avoid this old segmented pattern for a single logical arrow: ```powershell Add-LineSegment Add-LineSegment Add-LineArrow ``` - Prefer editable plain text for chemical/subscript-heavy labels: - `PM2.5` instead of `PM2.5` with rich text subscripts unless explicitly requested. - `NO2`, `SO2`, and `O3` instead of Unicode subscripts. - Generate standalone special symbols through PowerShell code: ```powershell $Delta = [char]0x0394 Add-TextBox $slide "$Delta PM2.5 air quality" 340 213 190 22 13 $true $black ``` - Use helper functions consistently: `RGB`, `Add-TextBox`, `Add-Box`, `Add-LineArrow`, `Add-ElbowArrow`, and `Add-PolylineArrow`. Use `Add-LineSegment` only for non-arrow helper lines or true branching trunks. - Cast PowerPoint COM line weights and freeform coordinates to `[single]` so generated scripts remain compatible with PowerShell 7. - Keep generated scripts easy to modify. Prefer semantic coordinate variables for complex diagrams. ## Resource Guide Read only the resource needed for the task: - `references/powershell_com_conventions.md`: PowerPoint COM helper conventions, layering, colors, fonts, and coordinates. - `references/text_normalization_rules.md`: text, symbols, chemical labels, and encoding-safe notation. - `references/arrow_topology_review.md`: arrow review checklist and topology failure modes. - `references/second_pass_review.md`: screenshot-based revision process. - `references/prompts/structure_to_powershell.md`: guidance for converting a structure plan into PowerShell. - `assets/templates/four_panel_route_template.ps1`: starter for multi-panel technical route diagrams. - `assets/templates/horizontal_pipeline_template.ps1`: starter for simple horizontal pipelines. - `assets/templates/pm25_counterfactual_framework.ps1`: detailed PM2.5 counterfactual framework example. - `assets/templates/continuous_arrow_regression.ps1`: focused regression deck for straight, elbow, multi-bend dashed, and true-branch routes. - `assets/style_presets/manuscript_clean.json`: restrained manuscript-style colors and typography. - `assets/examples/`: lightweight examples for expected use cases. ## Output Contract When generating a diagram script, include: 1. A brief interpretation of the intended diagram. 2. The arrow topology table. 3. The PowerShell script or a path to the generated `.ps1` file. 4. The run command. 5. A request for the generated PPT screenshot so RouteGraph can perform the second-pass review.
Auf GitHub ansehen