Add a /design mode with a persistent architecture canvas

Open 💬 1 comment Opened Jul 24, 2026 by stzoozz

What variant of Codex are you using?

Codex CLI (terminal)

What feature would you like to see?

I often use Codex before I start coding: to understand an unfamiliar codebase, trace its data flow, or decide where a new feature should live.

Right now, all of that happens in the transcript. Codex can explain the design in prose or generate a Mermaid diagram, but after a few turns the useful context has scrolled away. It becomes hard to see the current design, what has changed, and which part we are discussing.

I would like a built-in /design mode that keeps one architecture view pinned above the conversation in the TUI.

Starting /design would create an initial map of the relevant components and data flows. As the discussion continues, Codex would update the same view—highlighting the component being discussed and reflecting agreed changes—instead of generating a new, disconnected diagram each turn.

When the discussion is finished, /design clear could close the view.

Example:

  1. Run /design in a repository.
  2. Codex creates an initial architecture map.
  3. Ask, “Where should this new feature be added?”
  4. Codex highlights or updates the relevant part of the existing map.
  5. Continue discussing while the current design stays visible.
  6. Run /design clear when finished.

This would solve two problems:

  • Architecture and data-flow discussions are difficult to understand through prose alone.
  • The current design state gets lost as earlier messages scroll out of view.

Additional information

Related, but not the same:

  • #24399 asks for live refresh of rendered Markdown in Codex Desktop.
  • #29642 asks for inline HTML artifact previews in Codex Desktop.
  • #23237 proposes rich interactive plugin UI.
  • #32444 proposes configurable, artifact-first workspace layouts.

The view could start as a Mermaid-like or terminal-native graph. The important part is that it stays visible and is updated in place throughout the design discussion.

View original on GitHub ↗

1 Comment

panset · 6 days ago

Not the TUI feature you're asking for — that would have to be Codex's — but the data model and the "same view, updated in place, highlight what we're discussing" loop exist outside the terminal today, and might be a useful reference for what /design could emit.

Cinegram (open source; I maintain it) keeps a Mermaid diagram unchanged and adds a scenario block where each step is one turn: highlight svc, dim the rest, a note with the file path, flow along the edges being traced. Run cinegram preview design.dgm --serve --watch in a browser window beside the terminal, have the agent write the Mermaid once at the start and append one step per turn, and the page reloads about a second after each save — the map stays visible, the current component is lit, and you can scrub back to any earlier turn. Highlights never move the layout; adding a component does re-lay out (it's still Mermaid), which is the honest limit for "reflect agreed changes".

What it looks like — one architecture diagram, two "conversations" on the same canvas (trace a POST, then why is the reports endpoint slow):

Cinegram Link The dropdown besides Play lets you explore alternate paths.

For the agent side there's a skill (SKILL.md + a language reference) and an MCP server — cinegram mcp exposes lint / narrate / mermaid / frame / sheet and serves the language reference as a resource, so a host can teach the model the format without a skill folder; the .dgm itself is text the agent writes.