Codemaps: Understand Code, Before You Vibe It
Posted2 months agoActiveabout 2 months ago
cognition.aiTechstoryHigh profile
excitedpositive
Debate
60/100
AI-Assisted CodingCode VisualizationDeveloper Tools
Key topics
AI-Assisted Coding
Code Visualization
Developer Tools
Cognition.ai introduces Codemaps, a feature in their Windsurf IDE that generates interactive diagrams to help developers understand complex codebases, sparking discussion on its usefulness and potential applications.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
1h
Peak period
72
0-12h
Avg / period
16.3
Comment distribution114 data points
Loading chart...
Based on 114 loaded comments
Key moments
- 01Story posted
Nov 4, 2025 at 12:47 PM EST
2 months ago
Step 01 - 02First comment
Nov 4, 2025 at 2:00 PM EST
1h after posting
Step 02 - 03Peak activity
72 comments in 0-12h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 11, 2025 at 4:57 AM EST
about 2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45813767Type: storyLast synced: 11/20/2025, 8:56:45 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
As the conversation shifted towards Cursor vs Claude code vs Codex people seem to have stopped mentioning it which is a shame.
Source: user for 12 months - not a shill.
Codemaps was a very pleasant surprise when it showed up.
you might struggle with Windsurf since you're so command line heavy. but pro tip - ask for command line work to be done inside of Windsurf's Cascade agent. they were first to the terminal-inside-aichat pattern and i really like how it's much better at command line stuff than i am (or can do the legwork to specify command line commands based on a few english descriptions)
Their reasoning agent is better than anything else I've used, tbh. The inability to use it in a CLI environment is why I stopped using it. They have a router that they hook into that "intelligently" chooses models for you in a normal "chat" setting. The power comes with their DeepThink (or whatever) mode that has a VM hooked up to it, as well as many, many well designed agents and internal prompts that handle all sorts of interesting things, from planning to front-end dev, to reasoning about requirements and requirements fulfillment.
I know what you're going to say: I need to learn to use this groundbreaking technology that is so easy to use that my product manager will soon be doing my job but also is too hard for me a senior engineer, to find value in.
Kindly: no, I trust my judgement, and the data backs me up.
Have you taken measurements of how many features and bugs you've shipped over the last twelve months or are you just like the engineers in the METR study who self reported an improvement but when measured, had been impaired? What evidence do you have that your attitude is not simply informed by the sunk cost of your subscription?
Please share your data below
Nothing my friends that heavily use AI for is groundbreaking at all. It's stuff they already entirely know how to do, describe in full detail what they want implemented, then double-check all of the results. I'm not convinced at all that they're doing architectural and long-term design thinking in this process. They're just "making the thing". I don't think they really care enough to do any of that hard thinking either. Not that they should be, considering the state of the industry and the lack of loyalty companies have to developers.
I will say, it is extremely important to have a good AGENTS.md file and other .md files that the agent can refer to when it needs to. Also having tests is more important than ever.
And when you notice common hiccups, document it in the AGENTS.md.
Give sst/opencode a go, particularly read about its command, agent, tools feature.
Then go install opencode-skills and opencode-session and read about how to use the `task` tool to fork threads to subagents with skills.
Still like Windsurf though their pricing is what drove me to not roll it out across my company.
1) did you compare codex cloud with devin?
2) how about the new claude code teleport feature from web to cli?
just wanted to pry for more opinions on what matters to you
I have. I tried Devin after the initial release and then again when they did their 2.0 release. Found it to be the worst of the tools I've tried.
More of a tangent but an underappreciated part of Codex is their PR review bot. Just miles ahead of all the competitors we've tried (greptile, charlie, cubic)
>2) how about the new claude code teleport feature from web to cli?
I have not. I rarely use Claude Code these days but I will give it a spin because you just told me it existed.
I've also tried the 3 C's, and it still feels like Windsurf has the net best user experience.
this is brainchild of cognition cto steven who doesn't like the spotlight but he deserves it for this one https://x.com/stevenkplus1/status/1985767277376241827
if you leave qtns here he'll see it
Hopefully we can get codemaps in the main IDE panel sooner rather than later. Feels like the very impressive thing (codemaps) is being held back by a trivial thing (reading them in a 200px panel) to the point it's impractical to use themm
turns out our dev actually had a PR for it but wasnt sure it was valuable
you just helped tip it over the line. see it in next release
making codebases understandable to humans, and LLMs etc, is a better approach
self documenting, interpretable systems would actually solve a lot of dev churn in big companies
plus it's not like artifacts have to be limited to code once that's figured out
That's true only if you don't provide that context. The answer is: Do provide that context. My experience is that LLM output will be influenced and improved by the why's you provide.
https://deepwiki.com/search/vimfnfnname-lets-you-call-neov_e...
but also how much you kinda dont need it when you're just debugging code
https://windsurf.com/codemaps/87532afd-092d-401d-aa3f-0121c7...
a lot of the time, debugging isn't a logic issue, but more of a state exploration issue. hence you need to add logging to see the inputs of what's going on, just seeing a control flow isn't super useful. maybe codemaps could simulate some inputs in a flow which would be super cool, but probably quite hard to do.
There is no reason to believe that at some point in the future AI will know the business context for apps when they are vibecoded (because the prompts should contain the business context).
since when has coding become so trivial that things are only useful if it helps with the "why" and "business context"?
but yes, keeping the human in the loop, in charge, on top of the code, is the way to prevent ai slop code
- Another AI firm building products focused on Fortune 500 scale problems. If you're not at a F500, this tool isn't necessarily a good fit for you, so YMMV.
- static analysis tools that produce flowcharts and diagrams like this have existed since antiquity, and I'm not seeing any new real innovation other than "letting the LLM produce it".
They say it's ZDR, so maybe I don't fully understand what problem they're trying to solve, but in general I don't see the value add for a system like this. Also onboarding isn't necessarily just presenting flow charts and diagrams: one of the biggest things you can do to onboard somebody is level-set and provide them with problem context. You COULD go into a 30 minute diatribe about how "this is the X service, which talks to the Y service, and ..." and cover a whiteboard in a sprawling design diagram, or you could just explain to them "this is the problem we're working on", using simple, compact analogies where/when applicable. If the codebase is primarily boilerplate patterns, like CRUD, MVC, or Router/Controller/Service/DB, why talk about them? Focus on the deviant patterns your team uses. Focus on the constraints your team faces, and how you take the unbeaten path to navigate those constraints.
Inherent limitation of static analysis-only visualization tools is lack of flexibility/judgement on what should and should not be surfaced in the final visualization.
The produced visualizations look like machine code themselves. Advantage of having LLMs produce code visualizations is the judgement/common sense on the resolution things should be presented at, so they are intuitive and useful.
Today I am apparently on of xkcd's "Lucky 10,000".
Does anyone have any recommendations for such tools? Ideally open source, but that's not a hard requirement. (Although "Enterprise - if you have to ask the price you can't afford it" options will not work for me.)
I'm particularity interested tools that work with Python, Java, and Javascript (Angular flavoured Javascript, it if matters)?
After working with the topic for multiple months I can tell you that introductions for new-joiners are not the only use case for this kind of extracted knowledge. Many ppl in the organizations need insights into the software structure as they either impact decisions shaping this structure (e.g. analysts) or depend on the decisions about this structure (e.g. testers, or support agents)
It's all the matter of giving access to reliable architecture knowledge structured by a consistent ontology. Garbage in / garbage out - the higher the knowledge quality, the better the output - both for human and agentic knowledge consumers.
Will evaluate it on a couple of PHP codebases I maintain at work.
Is there a way to contribute to the project?
I wanted to try this out, so I opened Windsurf for the first time in ages and clicked the "Upgrade Available" button, which sent me to: https://windsurf.com/editor/update-linux
Whle `apt-get upgrade windsurf` will technically upgrade Windsurf, instructing users to run a command that will attempt to upgrade all packages on their system is nuts when the command is provided in a context that strongly implies it will only upgrade Windsurf and has no warnings or footnotes to the contrary. Good thing I didn't ask Windsurf's agent to ugprade itself for me, I guess.EDIT - I don't want to detract from the topic at hand, however - after upgrading (with `sudo apt-get install --only-upgrade windsurf` :)) and playing around a bit, the Codemaps feature indeed seems very nifty and worth checking out. Good job!
Especially not an LLM!
That would be a great addendum to an EXAMPLES section! In the meantime, this is documented well and clearly in the tldr page for apt-get².
Fwiw, apt-get not only sucks, but has been known to suck for many, many years (more than a decade at least). Its interface sticks around because it's basically plumbing at this point. But you, as a user, should never use it (or `apt-cache` or `apt-*`, if you can avoid it.
Aptitude is preferable for a whole host of reasons, not least of which being that its upgrade commands have the semantics you'd intuitively expect³. They take packages as an optional list of positional args, and upgrade everything only if you don't pass any. (Aptitude also has a ton of other nice features and I highly recommend it.)
There's also an official new porcelain in APT itself, aptly called "apt". It preserves⁴ the semantics of apt-get's `upgrade` command, but its usage message actually matches that syntactically— hopefully it'll barf if you tell it `apt upgrade windsurf` or whatever.
But automation needs to rely on the ugly, old, disparate APT commands that have been around forever and can't really change. That probably goes, too, for things guides want you to copy and paste, or instructions handed over to LLMs.
(This is one reason that if you only learn to use APT from guides/tutorials whose primary concern is something other than documenting or teaching how to use Debian-based systems, you'll probably never learn to use the correct tools (the nicer, newer ones).)
--
1: https://manpages.debian.org/trixie/apt/apt-get.8.en.html
2: https://tldr.inbrowser.app/pages/linux/apt-get
3: https://manpages.debian.org/trixie/aptitude/aptitude.8.en.ht...
4: https://manpages.debian.org/trixie/apt/apt.8.en.html
My guess is that someone or some LLM hallucinated this command, "apt-get upgrade" is for upgrading your system, not for upgrading a single package, and it takes no extra argument.
For upgrading a single package, just do "apt install $PACKAGE". It is the same command as for installing. The semantics is rather clear to me, upgrading is like installing the new version on top of the old version. It also makes no sense to install a package you already have or to upgrade a package you don't have, but if you want to be sure, for example because you don't know if you already have the package installed or not, there are the --no-upgrade and --only-upgrade options.
On the direct face of it, no, it turns out it doesn't matter: plant cellulose is not toxic to humans, a certain level of it is in many processed foods, and that information isn't secret.
By the time it matters to people, it's at the level where you can tell it's happened: large, pointy chunks, eg, or so much the flavour or texture is ruined. Or toxic contaminants, albeit at the significant risk that one might only be able to tell at the point of suffering from the consequences.
But if we modify the proposition a little, we get a statement about the possibility of a vegan's metaphorical sawdust being cut with ground beef. Now, it's more likely to matter. By and large, dietary choices like that are based on some belief structure, so the presence of the unwanted ingredient could be considered as an attack on the belief system.
When we move the metaphor back to AI generated code, does this reveal a belief system at play? If the resulting program is not poor quality, but the use of AI is objectionable nevertheless, does that make a "no AI in software" stance a sort of veganism for code? (And can we coin a good term for that stance? I vote for hominism, because while I quite like anthropism that leads to anthropic which is obviously not going to work.)
Given there's a regulatory number on acceptable bug parts per million for confectionary, is there a hypothetical acceptable bytes per million for AI-generated code that can still be called hoministic?
I eat meat but I'm one of those people who is ethically opposed to consuming AI content. An AI-vegan you might say.
I've had a shouting fight with someone who tried to spoon feed an AI summary to me in a regular human conversation.
But. I know that people are going to sneak AI content into what I consume even if I do everything within my power to avoid it.
The question is straightforward if immensely complex. Do I have a right to not be fed AI content? Is that even a practical goal? What if I can't tell?
apt is better for interactive use and by people who are not just blindly following instructions.
Here there are arguments for both. As commands intended to be copy-pasted in a terminal, using apt-get makes sense as it is the safest choice. But it is also intended for humans, it is not a script, so maybe apt would be better. To me, both ways make sense.
Are you sure it is better at graphviz?
https://cognition.ai/blog/swe-1-5
https://cognition.ai/blog/swe-grep
https://cognition.ai/blog/devin-agent-preview-sonnet-4-5
I started with go and java (the two languages I was using in my job) and built AST parsers that would extract the relationships between the classes and functions and draw them with graphviz. Then I created a filter syntax based on regex to filter the graphs.
I never followed through on the idea to a production ready version, but it helped massively as a personal tool when working on unfamiliar codebases.
The site is still here, but lots of it is probably broken by now..
https://packagemap.co
But I saw it as next step towards shifting programming from sitting and scanning texts into something more tangible, where developer has broad overview of software, and can work on smaller parts while seeing context of how these parts are connected. Ended up concluding that this stuff should work in VR.
[1] https://divan.dev/posts/visual_programming_go/
I tried Windsurf a while back but I’ll definitely come back ASAP just to play with this and see how it does in a somewhat complex project I’m working on.
Kudos to the team!
example: https://deepwiki.com/search/how-do-react-hooks-work-under_7a...
this does a pretty good job of going in the weeds of how the useState hook works in react
As far as I understand still working with this stuff regularly. None of the actual problems have yet to be solved at all. AI still produces garbage for anything complex. And if it doesn't, it's because you specified in full detail how it should do everything and heavily hand-held it and reviewed the results, taking more time than just doing it yourself.
And it's either that or they are flying by the seat of their pants with the thing and free-balling their way to a broken system.
If you are trying to understand code, then you are not vibe coding by definition.
5 more comments available on Hacker News