Diagram AI
Business descriptions, named flows, a completed diagram and described sub-diagrams. AI that runs only when you ask, and only reads your code.
The diagram itself is built without AI, from the code. On top of it, the Diagram AI menu (top right of the diagram) runs AI actions on the flow you are reading. Its tooltip says what it does: Business descriptions, completing the diagram, naming flows — runs only when you ask.
- Only when you ask. Each action is a button. Nothing runs on its own.
- Sign-in and credits. Every action needs a peekcode sign-in and uses AI credits. Before it spends credits it asks you (Uses AI credits), with Cancel and Run.
- Read-only. The AI reads your code. It never edits it.
| Action | Where | What it does |
|---|---|---|
| Business descriptions | Diagram AI menu | Writes a business title and description for every box. |
| Name the flows | Diagram AI menu | Gives every entry point (flow) a business name. |
| Complete the diagram | Diagram AI menu | Adds calls the engine missed and flags drift, with file:line evidence. |
| Describe sub-diagrams | Diagram AI menu | Writes descriptions for the sub-diagrams under the flow, down to the depth you pick. |
| Find with AI | New entry point dialog | Finds entry points the engine missed. |
| Generate | Simulate | Writes a sample request for the endpoint. |
Run all for this flow runs the actions together. Each job shows its steps, how long it took and the credits it used; Settings → Usage lists the credits per job.
Business descriptions
Business descriptions writes a business title and a short description for every box of the flow. Click a box: its detail shows them under Business description (AI).
Name the flows
Name the flows gives every entry point a name in business words. The Display names toggle switches the whole app between Business and Code names.
Complete the diagram
Complete the diagram (Missed calls · drift · file:line evidence) reads the code around the flow. It adds calls the engine missed and flags boxes that may not match the code, each with the file and line it found.
| Badge on a box | Means |
|---|---|
| Added by AI | A call the engine missed, added by the AI. Check its file:line. |
| May differ from the code (AI) | The AI thinks the box no longer matches the code (drift). |
| May be extra (AI) | The AI thinks this box may be extra. |
A list shows the boxes the AI added. Click one to see it on the diagram. A flow the AI has checked gets a mark in the Flows panel.
Describe sub-diagrams
A box that calls further code has its own sub-diagram. Describe sub-diagrams writes business descriptions for them without opening them. Depth sets how far it goes: a number of levels, or All. Tick Include in Run all to have Run all for this flow do it too.
Find entry points with AI
In the New entry point dialog, Find with AI reads the repo and suggests entry points the engine did not find. Entry points you add are saved in .peekcode/entries.yaml. See Add an entry point.
Language and models
AI response language (Settings → Agents) writes in the interface language or one you choose. Settings → Model picks where AI requests go. See Settings → Model.
For questions about the code, use your coding agent in the terminal: with the peekcode MCP server it reads the same map.