Diagrams, slides, and the documents you hand out all come out of text and code.
2-12: Build an API — Expose Core Logic with FastAPI gave you the vocabulary for looking at a screen and naming what is off (proximity, alignment, repetition, contrast), and the habit of fixing the design rules onto a single page. The same move works outside the screen as well.
This chapter walks the tools in order — the structural diagram in a chapter, the slides in a pitch, the documents you hand out, and on to 3D and CAD.
Purpose decides the tool
The diagrams and documents you make day to day fall into three kinds.
to convey (words)"] Intent --> MM["structural diagram
Mermaid"] Intent --> UI["screen draft
ask the AI for HTML"] Intent --> MP["slides
Markdown + Marp"] MM --> Out[("PDF / HTML / PNG")] UI --> Out MP --> Out classDef good fill:#e8f5e9,stroke:#7a9a6d,color:#3a4d34 classDef bad fill:#fef3e7,stroke:#c89559,color:#5a3f1a class MM,UI,MP good
What unites them: save the text and code that produced it, not the final PDF or PNG. The output can be rebuilt at any time.
Write structural diagrams in Mermaid
System layouts, organizations, data relationships — any diagram that conveys structure can be written in Mermaid. Every diagram in this series is Mermaid.
graph TD
A[User] --> B[Web Server]
B --> C[(Database)]
B --> D[Cache]
C -.->|slow| B
Four nodes and the arrows between them, in plain text.
Mermaid is text. A one-place edit to a diagram shows up in Git as one line added and one line removed, and the review is a glance. The AI reads it and rewrites it directly. A renderer years from now produces the same diagram.
The range is wide.
- Flowcharts (process flow)
- Sequence diagrams (APIs and human interactions)
- ER diagrams (data relationships)
- Class diagrams (object relationships)
- Gantt charts (planning)
- State diagrams (screen and data state changes)
- Mind maps
- Architecture diagrams (system layout)
There is little to remember about writing it.
- Two directions suffice:
flowchart TB(top to bottom) andLR(left to right) - The node shape carries the kind —
[box]is a step,[(cylinder)]is data,{diamond}is a branch - Break a label with
<br/> - Pick two colors with
classDefand apply them to nodes in one go - Keep a diagram to about ten nodes; past that, split it in two
GitHub, Forgejo (2-06), Notion — most places render Mermaid as it is. There is no need to memorize the syntax. Ask "draw this structure in Mermaid" and it comes back. Reading it is enough.
Ask the AI for the screen draft, as HTML
"Screen drafts" and "UI mockups" belonged to Figma and Sketch. They take time to learn and carry a monthly fee.
The AI changes that. Ask "make a login form" and HTML + CSS + (if needed) JavaScript come back. Open it in a browser and there is a working screen. "More whitespace." "Use a blue palette." "Left-align it." Say it in words, and the code rewrites itself. Some AIs carry a dedicated screen-design feature; ordinary conversation is enough.
You: Make an inventory management screen UI. Product list, search box, add button.
AI: (HTML+CSS returns)
You: More whitespace, three columns.
AI: (revised version returns)
It is faster than Figma, and what comes back is code, so it can go straight to development. Hand it the rules page from 2-12 (12-column grid, spacing in multiples of 8, three colors, the type-size steps) and every screen gets the same rules applied.
In business, this is how it is used.
- Show "here is the screen" on the spot during a customer pitch
- Put a working HTML mockup in the spec, instead of an image
- Line up several candidates and compare them before development starts
- Use the finished mockup as the development starting point
- Rework it live in a meeting as comments come in
If a specialist designer is involved, make the draft and hand it over: "this direction, polished further." Fewer round trips, and the designer's time goes to brand consistency, print accuracy, and photo selection — the parts that need the expertise.
Write slides in Markdown and let Marp assemble them
Presentation decks, too, are written in Markdown. Marp converts Markdown into HTML
slides or a PDF. Marp ships as a standalone binary, so no npm is needed (2-10). To stay
inside apt, pandoc (in Debian 13) turns the same Markdown into reveal.js slides and a
PDF. One slide is one section separated by ---.
# AI-Native Software Development
The toolkit of the Independence part
---
## Why now
The premises under the tools have inverted
---
## Conclusion
One person plus AI keeps the work running
That is three slides, exportable to PDF, HTML, and PNG.
The gap comes from whether prose and layout are mixed. In PowerPoint, every slide means deciding placement and text at the same time. In Markdown you write only the text; the template decides the placement. Fixing it is fixing the Markdown.
For the few slides that need a complex layout, have the AI write the HTML for that slide. Base in Markdown; decoration by the AI.
The side effects are large too.
- Past slides are all text, so they are searchable
- The proposal document and the deck come out of the same manuscript
- A 30-minute talk travels as 30 lines of Markdown
The tools with steep learning curves are driven by code too
Mermaid, the AI's HTML, and Marp are everyday design. What follows are the specialist tools you had left alone because the learning curve was steep. Because the AI writes the scripts, code, and JSON, these tools drop into the hands of office workers, sole proprietors, and on-the-floor staff.
What follows (D3 / Blender / ComfyUI / CAD) is a preview of what becomes possible later. To start, Mermaid and the AI's HTML are enough. Once the everyday diagrams and documents are in your hands, come back to this section as needs arise. The skill of reading is all you ever need to enter.
(described in words)"] Want --> D3["data visualization
D3.js"] Want --> BL["3D and video assets
Blender (bpy)"] Want --> CF["image generation
ComfyUI (JSON)"] Want --> CAD["mechanical CAD / 3D print
CadQuery / Build123d
OpenSCAD / FreeCAD"] D3 --> Out2[("HTML / SVG / PNG
STL / video")] BL --> Out2 CF --> Out2 CAD --> Out2 classDef good fill:#e8f5e9,stroke:#7a9a6d,color:#3a4d34 classDef bad fill:#fef3e7,stroke:#c89559,color:#5a3f1a class D3,BL,CF,CAD good
What unites the four: every one of them is driven by a script, code, or JSON. The AI writes that language, so the route through memorizing a GUI can be skipped.
Build elaborate visualizations with D3.js
D3.js is a visualization library that runs in the browser. Hierarchy trees, force layouts, map-based views, hover-reactive diagrams, zoomable timelines — the elaborate graphics you see in newspapers and investigative reporting are usually D3.
It takes time to learn. It has its own concepts, data binding and selections, and self-taught it is a long road.
Through AI, that shrinks. Ask "draw this JSON as a D3 force layout, color the nodes, show info on hover, zoom enabled" and JavaScript you can paste into a page comes back. The grammar need not be memorized.
Everyday aggregation charts are covered by matplotlib or Altair. D3 suits elaborate custom visualization. Pick by purpose.
Drive Blender from Python
Blender is a free, open-source 3D production suite. Models, animation, rendering, and video editing are all in it, but the menu is vast and the shortcuts alone are a long road. It is in Debian 13's apt.
That same Blender exposes every feature to Python (bpy). Without touching the GUI, a script
can build a 3D scene. Ask for "a cube with a sphere on top, light from the upper left, camera
slightly below front, render to PNG" and a bpy script comes back.
Uses in business run about here.
- Product promotion imagery (virtual shoots of prototypes)
- Quick architectural and interior layout visualization
- Educational animation (explaining how a mechanism moves)
- Assembly and exploded views for manuals
- Final-check renders before 3D printing
Hand ComfyUI its workflow as JSON
ComfyUI treats generative AI such as Stable Diffusion as connected nodes. Beyond writing a prompt, it builds high-end workflows: combining several models, conditional generation, video generation, keeping a character consistent.
Wiring nodes by hand is easy to get lost in. A workflow is really a JSON file, so that is what the AI writes. Ask for "a ComfyUI workflow as JSON: take a product photo as input, replace the background with white, overlay the logo bottom-right" and loadable JSON comes back.
Uses in business run about here.
- Product image variations (e-commerce, catalogs)
- Illustrations for blog and social posts
- Explainer illustrations for decks
- Assets for manuals and instructional video
Image work that used to go to agencies and production houses now finishes in your own hands. ComfyUI needs a GPU, so it stands up not on the 2-02 machine but on the AI server of 2-16. Publish its web UI inside the company from there, and the team can use it together.
CAD can be written as code
Mechanical design runs on dedicated CAD software (SolidWorks, Inventor and the like), with cost in both learning and licensing. Alongside it runs another path: CAD written as a script or as code. The AI writes the code, so the CAD's own controls need not be learned.
| Tool | Language | Notes |
|---|---|---|
| OpenSCAD | Its own scripting language | Long-standing, simple, one of the 3D-printing community's standards |
| CadQuery | Python | Written in Python; close to industry dimensioning concepts |
| Build123d | Python | Successor lineage to CadQuery; more natural Python expression |
| FreeCAD | GUI + Python | Full parametric CAD, scriptable in Python |
Take a bracket with screw holes. "A bracket 50mm wide × 30mm tall × 3mm thick. Two ø4mm holes 10mm from the top edge, symmetric left and right. In Build123d." Run the Python that comes back and an STL file is produced. Feed it to a 3D printer and the part prints.
Uses in business run about here.
- Designing prototypes for 3D printing
- Jigs and fixtures (small parts for production lines)
- Mechanical parts (motor mounts, sensor housings)
- Architectural models and exhibition pieces
- Teaching materials
The side that used to contract it out becomes the side that builds
"It drops into your hands" is quicker to see in cases.
White backgrounds for the product photos, the same day
A small retailer photographed dozens of seasonal items. The backgrounds are cluttered and cannot go into the web catalog as they are.
- Old: reshoot, or hire a photo studio or retouch shop, and wait for delivery
- AI-native: a ComfyUI workflow (the AI writes the JSON) replaces every background with white and overlays the logo across all of them — done the same day, at no extra cost
A factory sensor housing, prototyped on the floor that day
A floor engineer at a small manufacturer wants a housing to protect a temperature sensor on the line.
- Old: contract a design firm → wait → prototype → fix → contract again
- AI-native: the floor engineer tells the AI the sensor dimensions, mounting screw holes, cable pass-through, and cooling slits → Build123d Python comes back → STL output → 3D-printed on the factory floor the same day
If it does not fit, change the dimensions and the next prototype follows at once. The floor person, on the floor, runs the design cycle.
Video assets for a tourism campaign, in your own hands
A regional tourism board makes a video explaining its relocation program.
- Old: contract a video production house and wait for delivery
- AI-native: the AI builds a 3D scene from the area's map and building layout with
bpy(houses, fields, station, community center), varies the lighting by season, plans a drone-camera path, and the exported assets are composed in an ordinary video editor. The only added cost is AI usage
A population chart in the paper, by the reporter
A local-paper reporter wants population-decline data inside an article.
- Old: hire a data journalist (a separate specialty) from outside, and contract a web shop to embed it
- AI-native: the reporter loads the population data into SQLite, asks the AI for "a force layout of population by town, color by year, hover for detail" → D3 code comes back → pasted into the paper's web
Reporters, tourism-board staff, floor engineers, small-shop owners — the people who used to be the side that contracts a production house become the side that builds.
You don't need to become a specialist. You need to become someone who handles specialist tools with AI alongside.
Keep content and design apart in business documents
Proposals, reports, specifications, internal documents, press releases — the body is the manuscript, diagrams are Mermaid, screens are HTML, the cover is SVG.
proposal-2026/
├── ja.adoc # Body (manuscript)
├── architecture.mmd # Structural diagram (Mermaid)
├── ui-mockup.html # Screen example (HTML the AI wrote)
└── cover.svg # Cover page (SVG)
Python assembles these into a PDF (pandoc and weasyprint both work). Each component
stands on its own and can be turned to other uses.
- The same manuscript also produces the internal-wiki HTML
- The same structural diagram goes into another document
- The UI mockup goes straight to the development side
- The same sources convert by purpose — PDF, HTML, print, input to an AI
Design and content are separate. Fix one place and every output reflects it. What goes into git is the manuscript and the diagram text; the assembled PDF is kept separately as a build output — the same thinking as 2-07: Take Documents Back — Prose in AsciiDoc, Working Tables in a Grid, Printed Pages from Templates and its "hold the manuscript as text, and commit only the manuscript."
The AI draws; the human judges
What all these tools share: there is almost no point where a person has to draw.
- No need to memorize Mermaid syntax. Ask for "this structure, in Mermaid"
- No need to learn CSS. Ask for "a screen like this"
- No need to work out slide layout. Ask for "this content as five Marp slides"
What the human does is three things: put the intent into words, judge what comes back, and name the place to fix. The vocabulary for judging is the four principles from 2-12, used as they are. In a diagram: put related elements near each other (proximity), keep the arrows running the same way (alignment), use the same shape for nodes with the same role (repetition), make the main path heavier than the rest (contrast). Slides work the same way.
Don't memorize design symbols and rules. Acquire the ability to convey intent. That is the new literacy.
Held as text, it still opens years from now
An old PowerPoint file may come back with substituted fonts, shifted shapes, or not open at
all. Old Adobe Illustrator .ai files may not open in current versions. A Figma
design leaves your hands when the service ends.
Mermaid, Markdown, SVG, HTML+CSS are text. Their notations have barely changed since their first editions (2-10), so an old file renders in today's renderer and will go on rendering. Text is also the easier thing for an AI to read.
Formatting decorates display. Structure crosses time.
How to check you are done
This chapter is done when these five hold.
- A chapter's structural diagram is written in Mermaid, and GitHub or Forgejo renders it as a diagram
- A one-line edit to that diagram shows in git as one line added and one line removed
- The AI returns a screen draft, and the HTML runs in the browser when opened
- Markdown slides passed through Marp produce a PDF whose pages match the
---separators - A business document is split into body, diagram, and screen files, and fixing the diagram in one place and rebuilding updates the PDF
What the human holds
Values the human supplies
- The structure the diagram must convey (what connects to what, and in which direction)
- The items on the screen draft, and the rules page from 2-12 (12-column grid, spacing steps, three colors)
- The number of slides, and the heading on each one
- The dimensions handed to CAD (measured from the real object), with the material and tolerance assumptions
- How far the generated images and video may be published
Actions the AI states before performing
- Overwriting an existing document or diagram file
- Sending in-house photos, drawings, or customer data to an outside generation service
- Placing generated images or video on a public destination
- Sending a job to the 3D printer, consuming material (dimensions checked by a person first)
Versions checked, and when
- Marp CLI 4.5 (the standalone binary from GitHub Releases); pandoc 3.1, Blender 4.3, FreeCAD 1.0, OpenSCAD (Debian 13 packages)
- Mermaid, D3.js, ComfyUI (on the 2-16 server), CadQuery, Build123d,
weasyprint— no version pinned - The procedure was written on 2026-09-21 and reviewed on 2026-10-06
- If a version has moved, have the AI confirm the official procedure before proceeding
Summary
Diagrams and documents, produced from text and code.
The everyday tools:
- Structural diagrams: Mermaid — Git diffs work, and it still reads years from now
- Screen drafts: ask the AI for HTML — HTML+CSS comes back, ready for development
- Slides: Markdown + Marp (standalone binary) or pandoc — the deck and the proposal come from one manuscript
- Business documents: the manuscript is the body, diagrams and screens are separate files — one fix reaches every output
Specialist territory that AI brings within reach:
- Elaborate data visualization → D3.js
- 3D modeling and video assets → Blender (Python
bpy) - Image and video generation → ComfyUI (JSON workflows)
- Mechanical design and 3D printing → CadQuery / Build123d / OpenSCAD / FreeCAD
The principle is one. Instead of learning the GUI, have the AI write the code, look at the result, and adjust. The vocabulary for judging is the four principles from 2-12; the place the manuscript lives is 2-07 — both apply here unchanged.
The next chapter carries what you drew here — the diagrams and the enclosure — down into things you can touch, from electronics to IoT.
Related articles
- 2-12: Build an API — Expose Core Logic with FastAPI
- 2-07: Take Documents Back — Prose in AsciiDoc, Working Tables in a Grid, Printed Pages from Templates
- 2-11: Publish the Web — Your Own Machine, or Cloudflare Pages
- 2-15: Make Your Knowledge Legible — Preparation Is the Main Body, AI the Last Move
- 2-01: Becoming Independent from Microsoft and Google — The Whole Map