5 ms·
Show HN: Nuanced – Help AI understand code structure, not just text
Hi HN! We built Nuanced (https://github.com/nuanced-dev/nuanced https://github.com/nuanced-dev/nuanced), an open-source Python library that makes AI coding tools smarter about code structure.
The problem: current AI coding assistants see code as just text. They don't understand which functions call which, or how code components depend on each other. This is why they often suggest changes that break dependencies they should have known about.
Nuanced solves this by generating call graphs that map these relationships. When you ask "What would break if I change this function?", instead of guessing, the AI can see the actual dependencies.
How it works:
1. Run `nuanced init .` to analyze a Python module in your codebase
2. Use `nuanced enrich app/file.py function_name` to get relationship data
3. Include this data in your AI prompts or integrate it into tools
We're already working with teams building AI coding assistants and security review tools to integrate this capability. Our initial release supports Python with plans for JavaScript/TypeScript next.
I'd love your feedback, especially if you're building dev tools that could benefit from better code structure understanding!
- odysseus 2y agoWould be good to see before & after examples of something Claude got wrong without your enrichment but got right with it included.
- aymandfire 2y agoTotally agree, working on publishing that soon! We're also working on a swe-bench test: https://github.com/nuanced-dev/nuanced/issues/10 https://github.com/nuanced-dev/nuanced/issues/10 In the interim, this is a test I did with Sonnet 3.5 + Cursor, showing how it impacted explanations: https://github.com/nuanced-dev/nuanced/issues/31 https://github.com/nuanced-dev/nuanced/issues/31
- odysseus 2y agoThank you! The latter test was exactly what I was looking for. I think the Purpose statement in the original (sans Nuanced) answer was kind of useful. That’s missing from the after scenario, though I suppose you could easily request it in your prompt though.
- topazas 2y agoTitle misleading - not CODE, just python.
- aymandfire 2y agoHi there! Like I said in the post, we're actively developing support for JS/TS next, and are building toward a language-extensible project. We started with an open-source Python tool. :)
- gaploid 2y agoHmm, probably its better to use yaml or something more token optimized. That output graph for large projects could eat a lot of tokens, I guess.
- asdev 2y agodo you have an eval? how did this actually help?
- aymandfire 2y agoHey! Coming soon. We're also working on a swe-bench test: https://github.com/nuanced-dev/nuanced/issues/10 https://github.com/nuanced-dev/nuanced/issues/10 In the interim, this is a test I did with Sonnet 3.5 + Cursor, showing how it impacted explanations (not solutions): https://github.com/nuanced-dev/nuanced/issues/31 https://github.com/nuanced-dev/nuanced/issues/31
- apetuskey 2y agoThis looks interesting! I want to try it out for a project we are working on, but we would need some of the features like callers, doctoring, and typing What is the timeline on the coming soon features?
- aymandfire 2y agoHey, happy to chat about timeline estimates if you wanna shoot me an email at ayman@nuanced.dev
- ianbutler 2y agoHey this is sweet, we have our own internal version of this including graph search based on the call-graph which we use to great effect in our agent. Glad to see people making something like this more generally available.
- aymandfire 2y agoThanks! If you ever wanna trade notes or if we can be of any help, feel free to reach out at ayman@nuanced.dev!
- deeplyoptional 2y agoThis is awesome. Looking forward to TS support. Soon I hope?