Practically since the dawn of digital, product leads used some form of flowcharts or sitemaps to plan out what we wanted to build. Sometimes we’d start with rough high-level charts. Other times with just a rough idea we’d hand to a designer or information architect. Now, many of us are immediately starting with prototypes. Whether this will turn out to be a good idea or not, (despite the current gushing), remains to be seen.
In any case, there can be a usefulness to having a larger scale picture of the whole deal. Perhaps even especially so when you start with much less of a plan. Maybe you want every screen. Maybe just main screens. The idea is that if we’re barreling ahead at high speed and sometimes skipping deeper thought on everything from UI to UX to IA to just about anything, it can be valuable to pause and see if what we’ve slapped together actually makes sense. Do there need to be some adjustments? Yes, we may now have a real prototype in working code; not just step along the way. You can still lack a wide scale view while clicking into every corner.
This might be especially useful for product folks who may now feel whipsawed wildly between high-level strategy and product ops building. It depends on your level, but it seems right now folks at every level are doing more individual contributor build work. Maybe not as their core day-to-day, but at least sometimes. If somehow the pressure to build, Build, BUILD has you prompting like a maniac before the more thoughtful work, you may find it especially valuable to pause and review at a high level. And a sitemap? Such artifacts can provide that proverbial forest for the trees view. Especially if you’ve been furiously focused on just some twigs at the ends of branches recently. (Yes, weak metaphor.)
So, how can we go back and create a site map?
Our traditional tools, from cocktail napkin scribbles to PowerPoint to Omnigraffle, Visio, LucidChart, Miro, Figma and whatever do their various things. Sometimes such tools are wielded by product managers, then handed to designers. Other times they start with Information Architects and wind their way through Design. Wonderful. Whatever. We’re often skipping all of that now.
If we’re starting from code though, how do we go back the other way? I’m not really sure in terms of offering an abstract guide for everywhere, but I can tell you what I’ve found useful with Claude Code.
So Should We Just Make Boxes Again?
An obvious first thought might be which drawing tool is easiest? Lucidchart, Miro, FigJam, draw.io. Pick one, start placing boxes. Same as it ever was. Of course, today’s more likely instinct is more like, “Why would I put mouse miles on my poor wrist when I can burn a few more measly tokens to have Claude – or someone – do this for me?” Another question might be, “Where does the truth live anyway?” Once upon a time, if built properly, you sorta kinda knew the structure because the boxes and flowcharts came first. Now it’s probably in a file system. In a lot of modern frameworks, the app structure lives in the folder structure. To show this, I’ll use a demo site of mine, SarcasmWithoutBorders.com It’s a joke site I built when I just needed a throwaway for a production system design. So there’s nothing client proprietary or anything and I can use real examples.
This site happens to be built as a Next.js app. In Next.js, every folder under /app that holds a page file is a page on the site. (Some have some funky placeholder variable names, but essentially this is how it works.) The folder path is the URL. So the sitemap already exists. It’s just shaped like a directory listing instead of a diagram. Here’s a selected sample:
app/
├── page.tsx → /
├── about/page.tsx → /about
├── annual-report/page.tsx → /annual-report
├── careers/
│ ├── page.tsx → /careers
│ └── apply/page.tsx → /careers/apply
├── shop/
│ ├── page.tsx → /shop
│ └── [slug]/page.tsx → /shop/[slug] (6 products)
└── ...
Here’s what it looks like in the WebStorm app. WebStorm is just my personal favorite Integrated Development Environment (IDE). A lot of folks like VS Code. As a Product person who just delves into this area, I want the most help I can get from such tools because this isn’t really where my primary role is.

When you read the structure top to bottom you already have a rough sitemap. And it’s already raising questions. The folder list has annual-report and careers. The top navigation on the home page has neither. Are they in the footer? Linked from somewhere else? Orphaned? I built this thing from rough prompts and I’d have to go look to see how it’s structured.
What the folder list doesn’t tell you is what’s inside each page, what links to what, or who is allowed to see it. That’s in the code. Which is exactly the kind of thing an AI coding agent can go read for you.
So the plan is three steps. Have the agent build a list of every page from the code. Turn that list into a quick diagram. Then, if you need it to look good, generate a nicer one from the same list. The code is the source. The diagram is just an output.
Step 1: Ask the agent for a route inventory
A route inventory is a table with one row per page: its URL, its parent, and who can see it. This is the real deliverable. Everything after it is presentation.
Here’s the prompt I gave Claude Code, sitting in the project folder:
READ-ONLY TASK. Do not edit, create, or delete any file inside this
repository. Do not commit, push, switch branches, or install anything.
1. Build a route inventory from the code on the current branch.
2. For every page route under the app folder, list:
- URL path
- Parent page
- Access: public / signed-in / admin (use the levels the code
actually has)
- Notable child surfaces (modals, tabs, multi-step forms,
email-link landing pages)
- Whether the main navigation or footer links to it
3. Write these files OUTSIDE the repo:
- ~/Desktop/swb-sitemap-routes.md (the full table, plus the app/
folder tree showing only folders and page files)
- ~/Desktop/swb-sitemap.mmd (the same structure as a
Mermaid flowchart)
4. Report: the route count, anything you could not classify, and
anything that looked odd, such as pages nothing links to.
Here you go boy… Fetch! (Though I don’t say it like that. Just in case a handful of years from now I’m working for it in some lithium mine somewhere.)
Three things in there…
- Read-only, stated first. The agent is told what it may not do before it’s told what to do. You’re asking for a map, not a renovation.
- It writes only outside the repo. The output lands on the Desktop. Nothing shows up as a surprise change in the project. (Stray files can be a hassle.)
- It has to report what it couldn’t classify. Without that line, an agent might just happily guess. With it, you find out where the guesses would have been. Ideally. Remember, we should always be in a “trust, but verify mode” with these things.
One variation to mention. If an agent is already busy making changes in the repo, tell this one to read the published code instead of the working folder. You could add “read from origin/main using git, without switching branches.” Then the map reflects what’s shipped, not what’s half-finished. Or just do one thing at a time.
What Comes Back?
This site has 17 page routes. Two of them are templates, one for blog posts and one for products, with six of each. So that’s 27 real URLs. I’d asked the agent to label each page as public, signed-in or admin. It came back and said the site has no login of any kind, so every page is public and the other two labels don’t apply. That’s what the “use the levels the code actually has” line in the prompt is for. It told me what was there, not what I’d asked to see. Which is fine in this case. For a more complicated site, it can do the right thing, or at least it has in my own projects.
Here’s a selected sample of the table:
| URL | Parent | What’s on it | Linked from |
|---|---|---|---|
| / | none | Hero, mission, testimonials, featured programs and merch, newsletter form | Header, footer |
| /programs | / | 6 program cards, not clickable | Header, footer |
| /shop | / | Notice banner, links out to an external storefront | Header, footer |
| /shop/[slug] | /shop, nominally | Product detail: size, color, quantity (6 products) | Nothing |
| /membership | / | Membership levels, 3 calls to action | Header, footer |
| /annual-report | / | PDF download | Footer only |
| /careers/apply | /careers | “Applications are paused” notice, no form | /careers |
| /verify | /membership, in practice | Member ID form | Footer, /membership |
Raw sitemap routes md files example.
Then came the findings, and this is where it got interesting:
- Six live pages that nothing links to. At some point the shop page was changed to send people to an external storefront. The six product detail pages never got removed. They still build, they’re still publicly reachable, and no link anywhere on the site leads to them. The component and images that only they use are still sitting in the repo too.
- My navigation question, answered.
/annual-report,/careersand/verifyare in the footer and not the header. The two menus are driven by two separate lists in the code. The header links 9 of the 17 routes. The footer links 12. - Data pointing at pages that don’t exist. Each program has a URL slug in the data, but there’s no program detail page and the cards aren’t links.
- Stale documentation. The project’s own notes for the AI describe a piece of data under a name the code no longer uses. This was likely on me. This is what happens when you’re moving so fast your docs don’t keep up. And that’s maybe ok. The question is “are the decisions you’re making along the way well thought out or just quick fixes in the moment?” And maybe “are you feature creeping just because it’s easy? Do we really need that?”
It also showed some judgment. The page called “apply” has no application form, just a notice that applications are paused. The agent noted that this reads as deliberate satire, not a bug. Correct. The credential checker that approves everyone got the same benefit of the doubt. If this was a real app, that would have been a good bug catch. Though for a real app, other tests, maybe using things like Playwright, would be in order.
None of this is a crisis on a joke site. On a real product, six orphaned live pages is exactly the kind of thing you’d want to know about. This is the pause-and-review payoff, and it showed up before a single box was drawn.
Step 2: The quick diagram
The prompt also asked for a Mermaid file. Mermaid is a way to describe a diagram in plain text that a tool then draws. You never have to write it yourself. The agent does. It looks like this:
flowchart TD
HOME["/ Home"]
SHOP["/shop"]
CAREERS["/careers"]
PRODUCT["/shop/[slug]"]
HOME --> SHOP
HOME -.-> CAREERS
ORPHAN(["no inbound link"]) -. nothing links here .-> PRODUCT
That’s a small sample of the real file. The agent made some sensible choices on its own: solid arrows for normal links, dotted arrows for footer-only links, and the orphaned product pages flagged in their own color. Is it as pretty as what you can do in some other tools? Maybe not. And it may be nice in some cases to directly manipulate and customize things. This is one of the things you give up, at least for now, with some of these tools. My guess is over time we’ll see more manual edit features. Apparently, there’s also Mermaid plugins for IDEs, including JetBrains WebStorm, though I haven’t tried that yet.
To see it as a picture, I first used draw.io. It’s free, it needs no account, it imports Mermaid text, and its files can live in the repo next to the code. Plus it’s easy to integrate with Atlassian’s Confluence, which I like.
Here’s the file in draw.io format.
Or… just ask Claude AI to create the sitemap!
In this case, Claude Code can hand something for Claude AI to build it its very own little canvas. You can save them in an Artifacts area. Along with Docs and Slides and Sheets. It’s almost as if they’re trying to out Google the ole’ Google Docs. Except, you know, not “almost.” That’s pretty much what they’re trying to do. Anyway…
The import may look great. Or be a bit all over the place. Expect the automatic layout to get worse as the page count goes up. A dozen boxes will probably look fine. Eighty will not. In the case of draw.io. there’s auto-layout options under Arrange that can pull things into a vertical tree, though they may fight the group boxes Mermaid creates. With a canvas design in Claude, you can just ask it for what you want to change.
For a small site, or a quick gut check at any size, this step may be all you need. The broader lesson? Text diagram formats are easy for an agent to write, but writing a diagram and laying one out well are different jobs.
Step 3: The presentable version
If you grew up on Visio or OmniGraffle sitemaps, you know the look. Little page-thumbnail cards with IDs like HOME.1, dark title bars, big flow arrows. I wanted that, from this data.
I haven’t been able to find a converter that can convert Memaid files into all of these traditional formats. Many of those styles are custom hand-built or from stencils. The nearest off-the-shelf tools are visual sitemap builders such as Octopus.do, FlowMapp and Slickplan. Several import by crawling a URL or reading a sitemap.xml file. For a mostly public site like this one, that might be enough. For an app, it likely isn’t. A crawler can’t log in, so every page behind a sign-in is invisible to it and has to be added by hand.
In this case, I just handed the inventory file to Claude in a regular chat and asked it to build the sitemap directly. The approach:
- Treat the route table as data.
- Write a short script that computes the position of every card and every connector line.
- Output an image and a PDF.
No box gets placed by hand, by me or by the AI.
Each card shows an ID, a page-type thumbnail, a page name, the URL and a short note. Every page on this site is public, so color doesn’t mark access. It marks how you reach the page: header nav, footer only, through its parent page, or not at all. On an app with logins, I’d use color for access level. Lines connect parents to children, and a legend sits at the bottom.
A few issues to consider:
- Some output may be judgment, but not fact. The URLs, parents and links come from the code. Friendly page names, groupings and thumbnails are the AI’s choices. The thumbnails are generic glyphs by page type, not pictures of real screens.
- Check the rendered result. An AI can generate a layout without ever having looked at it. Ask it to render the image and check for clipping and overlap, or look yourself.
- It’s a picture, not a drawing file. What comes back is an image, a PDF and the script that made them. To change it, change the data and rerun. If you need it inside a drawing tool, there are export options below, with caveats.
That last limit matters less than it sounds, because of the best property of the whole approach. The diagram is regenerable. When routes change, rerun the inventory and rebuild. A hand-drawn sitemap starts going stale the day you finish it. This one is only ever one prompt behind.
Keeping it somewhere
I haven’t found AI chats to be good filing cabinets. If you build the sitemap in Claude’s chat app, you can have it saved as an Artifact. An Artifact gets its own link, stays private until you share it, and lives on an Artifacts page where you can sort things into folders. So the sitemap sits next to your other project documents and doesn’t scroll away with the conversation. The inventory file itself belongs in the repo, in a docs folder, next to the code it describes.
If you really need it in your drawing tool
You can export. It may be sloppy. (OK, it’s highly likely it will be sloppy.) Ask the AI to generate the file format your tool imports, from the same route data:
| Target | What to ask for | What you get |
|---|---|---|
| draw.io | A native .drawio file | Real boxes with connectors attached, so lines follow when you drag a card. The cleanest route. |
| Figma | SVG | Editable shapes and text layers, but the lines are plain vectors, not smart connectors. |
| OmniGraffle | SVG, or a Visio file | Depends on your version. Newer ones import SVG, and Visio import has been a Pro feature. |
| Miro | CSV or an image | The weakest route. Check what your plan can import before expecting editable boxes. |
| Anything else | The PDF | Vector and printable, but the boxes arrive as loose shapes. |
My advice is to resist the urge unless someone downstream truly needs it. The moment you hand-edit an exported copy, you have two versions, and only one of them regenerates. And maybe that’s fine too. Maybe that gets you jump started on a fuller option than you’d otherwise have that will now be your master planning tool. Then you’d just do it the old-fashioned way from there.
If you’re not using Claude Code, or not using Next.js
I’ve only done this with Claude, so treat this section as directions, not a tested recipe.
Other AI coding tools. Nothing in Step 1 is specific to Claude Code. The prompt asks for some basic abilities: read files in a repo, and write files to a folder you name. Any agent-style coding tool that works inside your repository should manage that, whether it’s Cursor, OpenAI’s Codex, Gemini CLI or GitHub Copilot’s agent mode. Keep the read-only rules and the “report what you couldn’t classify” line whichever one you use. For Step 3, any assistant that can run code can write a layout script. What you get back will differ: a design canvas in Claude, more likely an HTML, SVG or PDF file elsewhere. (Again, I have not tested this in these other platforms. But it should work.)
Other frameworks. Where the truth lives depends on the stack:
| Stack | Where the routes live | What to ask the agent |
|---|---|---|
| Next.js, SvelteKit, Nuxt, Astro | The folder structure | Walk the routes folder |
| Rails, Laravel | A routes file, with a built-in command to list them | Run the route-listing command and read the result |
| Django | URL configuration files | Follow the URL config from the root |
| React Router and similar | Route definitions in code | Find the router setup and read it |
| No-code and low-code builders | The builder’s own page list | You may be back to doing it by hand |
In each case the prompt changes in one place, the line that says where to look. The rest carries over. (Or should anyway.)
The traditional tools. If you need a sitemap for a workshop where people will drag things around and argue, Miro or FigJam is still the right room, (my opinion), and you’d rebuild from the inventory table by hand or paste in the quick diagram as a starting point. The inventory is still the valuable part.
What this won’t do
- A route is not a screen. Modals, tabs and multi-step flows don’t have their own URLs, so a route-based sitemap misses them unless you ask the agent to list them as child surfaces. That’s what that line in the prompt is for.
- It shows structure, not flow. You’ll see what exists and what sits under what. You won’t see the path a user actually takes. That’s a different diagram.
- It describes what you built, not what you should have built. The map makes the questions visible. That’s the whole point of taking a pause at some point and building it. Choosing what to do next is still up to you.
- Be careful what you publish. I can show you everything here because it’s a joke site. For a real product, a full route table with access levels, and especially an admin map, might also be a description of your security setup. Share the method. Keep the real map inside the team.
So, was it worth the pause?
In my example case here, not really. However, for real projects? Yes. I think so. The big picture has helped me to see some possible holes. To think about new product values and how and where features could work, plan where something could maybe be optimized a bit, and more.
The diagram is nice. The real value is being made to look. Even on a seventeen-page joke site, looking turned up six live pages that nothing links to. (Which is maybe because it just got built in a day and was never critical, but still. It found something wrong.) If you’ve been building at full tilt, try it. Ask your coding agent where the truth already lives, have it write the inventory, and read the table before you draw anything. You may find the table is all you needed.
The main thing I believe a fuller map can give you is just taking that moment to think. Even with AI builds, there’s ideally some kind of basic PRD or sitemap. But if not, if you’re just madly prototyping away, this is potentially a very helpful pause.




