agentic-workflows-blueprint.workflow.html-manual
Goal
Generate standalone, single-file interactive HTML visual manuals (README.html for skills/workflows and <filename>.html for references/runbooks) that mirror markdown contracts using Tailwind CSS CDN, Light/Dark mode theme switcher (persisted via sessionStorage), recursive sidebar file tree explorer, and organic Mermaid graph network mesh for maximum human readability and navigation.
Scope
- Applies to: Any skill (
SKILL.md), workflow contract, reference document (.md), or runbook (.md) in any agentic workflow skill system. - Does not cover: Building full web applications or dynamic client-side JS SPAs.
Triggers
- Explicit Invocation ONLY: This workflow MUST ONLY be executed when invoked explicitly by the user (e.g., "Generate HTML manual", "/html-manual"). It should never be run automatically.
- "Generate HTML manual"
- "Create HTML documentation for skill"
- "Build visual documentation"
- "Generate HTML version of runbook or reference"
- "/html-manual [target path]"
Inputs
targetPath: Path to the source markdown file (SKILL.md,routing-matrix.md,agent-role-system.md, etc.).projectTitle: Human-readable name of the project or workflow.
Invariants (Guardrails)
- Single-File Self-Contained HTML: Output must be 100% self-contained in one
.htmlfile using Tailwind CSS CDN (<script src="https://cdn.tailwindcss.com"></script>). - Light/Dark Mode Theme Switcher (
sessionStorage): Every page MUST feature an interactive Theme Toggle button (☀️ Light Mode/🌙 Dark Mode) in the header that persists the user's preference insessionStorage.getItem('apix_theme')across page navigations. - Ultra-Minimalist Aesthetic (Light & Dark Tones): Light mode uses clean light tones (
bg-gray-50 text-gray-800), white cards (bg-white border-gray-200/80 shadow-2xs). Dark mode uses sleek dark tones (dark:bg-gray-950 dark:text-gray-100), dark cards (dark:bg-gray-900 dark:border-gray-800). - 1 Card Per Row (Full Width Stack): Every card (Overview, Triggers, Guardrails, Procedures, Review Gate) MUST occupy 100% width (
w-full/ single column) so long descriptions, lists, and tables have maximum room without squeezing. - Overview & Contextual Sub-Graph Open by Default (
<details open>): TheGoal & System OverviewandContextual Dependency Sub-Graphcards MUST open automatically (<details open>) when any manual is loaded so the user gets instant context. All other detail sections remain closed by default (<details>). - Flat Unnested Hierarchy (No Card Inside Card): Content inside sections (tables, code, lists) MUST render directly on the flat card background without adding extra nested card borders.
- Recursive Sidebar File Tree Explorer: Every page MUST include an interactive left sidebar file tree (
w-80 border-r border-gray-200 bg-white dark:bg-gray-900) with collapsible folder nodes (📁 reference/,📁 workflows/) and file links (📄 SKILL.md). The folder containing the active file auto-expands (open) and the active document is highlighted. - Organic Skill Mesh Graph (
GRAPH.html): The.html-manual/<nome-skill-principal>/directory MUST include a dedicatedGRAPH.htmlpage rendering a pure organic network mesh map based strictly on true direct markdown cross-links between skills (no artificial hub nodes, no subgraph boxes). - Compact Horizontal Flow (
graph LR) with Close-up Zoom & RankSpacing: Diagrams MUST use a horizontal flow (graph LR) with reduced canvas height (h-[600px]forGRAPH.html,h-[340px]for sub-graphs), tightrankSpacing, close-up initial zoom (zoom(1.25)/zoom(1.35)), andsvg-pan-zoomso nodes are projected forward smoothly without vertical waste. - Mermaid Diagram Sanitization: Any ```mermaid block MUST have diacritics/accents removed from node labels/identifiers, and unquoted labels enclosed in double quotes (e.g.
node["Label Text"]) to prevent syntax parsing errors. - Syntax Highlighting (Prism.js): Code blocks MUST use Prism.js for clean syntax highlighting across Ruby, TypeScript, JSON, Bash, and HTML.
- Visual File Trees: Folder/file tree outputs (
├──,└──, paths) MUST be parsed into clean interactive file tree components with folder📁and file📄icons. - Exact Filename Convention:
- Output HTML files MUST be placed in a
.html-manual/<nome-skill-principal>/root directory, replicating the original source directory structure. - For skill/workflow directories: Output filename MUST be
README.html(e.g.,.html-manual/<nome-skill-principal>/workflows/html-manual/README.html). - For reference or runbook files (
<name>.md): Output filename MUST be<name>.htmlmatching the exact base name (e.g.,routing-matrix.md➔.html-manual/<nome-skill-principal>/reference/routing-matrix.html).
- Reference Link Back: Every source
.mdfile MUST link to its.htmlcompanion under## References(e.g.[Interactive HTML View](./README.html)or[Visual HTML Version](./routing-matrix.html)).
Procedure
Parse Source Markdown:
- Read the target
.mdfile (SKILL.md, runbook, or reference file). - Extract title, goal, scope, invariants, procedure steps, tables, metadata frontmatter, and references.
- Read the target
Build Theme Switcher & Head Scripts:
- Add inline theme script in
<head>readingsessionStorage.getItem('apix_theme'). - Add Tailwind CDN script with
darkMode: 'class'. - Add Prism.js and Mermaid +
svg-pan-zoomscripts.
- Add inline theme script in
Construct UI Component Stack:
- Build Theme Toggle button (
☀️ Light Mode/🌙 Dark Mode) in header. - Build Recursive Sidebar File Tree Explorer with auto-expanding active folder.
- Construct
Goal & System Overviewcard (<details open>). - Construct
Contextual Dependency Sub-Graphcard (<details open>) withsvg-pan-zoomcontrols. - Construct flat full-width cards for Triggers, Guardrails, Procedures, and Review Gate (
<details>closed by default).
- Build Theme Toggle button (
Sanitize Diagrams & Code Blocks:
- Run accent transliteration on Mermaid diagram labels.
- Wrap unquoted node labels in double quotes (
node["Label Text"]). - Render ASCII directory trees into visual file tree components.
Generate System Graph (
GRAPH.html):- Extract real cross-reference links between all markdown files in the skill tree.
- Generate
GRAPH.htmlwith an organic Mermaid network mesh (graph LR,svg-pan-zoom).
Link HTML in Source Markdown:
- Add
[Interactive HTML View](./README.html)(or./<name>.html) under## Referencesin source.mdfiles.
- Add
Outputs
- Single-file
<filename>.htmlorREADME.htmlsaved in the.html-manual/<nome-skill-principal>/directory, matching the source folder structure. GRAPH.htmlin.html-manual/<nome-skill-principal>/with organic mesh map.- Updated source
.mdfile with reference link.
Review gate
- Output HTML is self-contained single file with Tailwind CSS CDN?
- Theme toggle switches between Light and Dark mode and persists in
sessionStorage? - Overview and Contextual Sub-Graph are open by default?
- Recursive sidebar file tree auto-expands active folder?
- Organic
GRAPH.htmlgenerated with real link connections andsvg-pan-zoomcontrols? - Source
.mdfile updated with link under## References?