Show HN: Sphinx – A hook that quizzes you on your AI's code before shipping
Posted by critiquebrowser 4 days ago
FOSS, Basically it plugs into your existing coding agent workflow and every time you push to prod it'll throw up a questionnaire that checks if you understand how the code you're pushing works.
Comments
Comment by theParadox42 4 days ago
Not sure if this is the right solution, but I would like to learn/understand/grow more as I pursue reckless efficiency.
Comment by liendolucas 4 days ago
There was an excellent post here on HN that unfortunately went unnoticed. I highly recommend reading it as it exactly points out this problem: understanding.
Here is the link: https://news.ycombinator.com/item?id=50128468
Comment by liendolucas 4 days ago
Comment by 0c3ca83 4 days ago
Comment by layer8 4 days ago
Comment by fn-mote 3 days ago
I thought the flagging was appropriate after I read it.
Comment by 0c3ca83 4 days ago
So, if you want to speed things up with LLMs, the bulk of the speed comes from reducing learning.
Comment by rootnod3 4 days ago
Comment by bootsmann 4 days ago
Comment by LelouBil 3 days ago
But it very often feels like brute forcing the solution, and I'm not a big fan of it.
But maybe I'm using it wrong.
Comment by StilesCrisis 4 days ago
Comment by ceejayoz 3 days ago
"Goal achieved!" "OK, does it work?" "No."
Comment by fwlr 4 days ago
Comment by lecarore 4 days ago
Comment by fwlr 3 days ago
Comment by dawnerd 3 days ago
I’d love to try this project out but I really don’t think it’ll stop anything, and they’d probably just ask their agent to remove the hook anyways like they do with our husky hook.
Comment by elevation 3 days ago
> they still have an ai do it all for them
What recourse do you have when employees do not perform the work you're paying them for?
Comment by dawnerd 3 days ago
Comment by fn-mote 3 days ago
Assuming someone believes the rules are important enough to follow. Otherwise forget it and move on.
Comment by samuelfmedeiros 4 days ago
Comment by samuelfmedeiros 4 days ago
Comment by pjmlp 4 days ago
One would expect the actual answer would be to write the code ourselves.
Comment by chacha-bong 4 days ago
Comment by rDr4g0n 3 days ago
a good PR description should be compact and helpful. describing something complex in a compact and approachable way requires understanding.
the process of writing the description often leads me to understand hidden decisions the LLM made and occasionally uncovers bugs.
my PR descriptions separately answer the following questions:
Why is this change being made? a sentence or two about the problem, objective, etc, and a link to more detail (tickets, docs, etc) if available
What does this change accomplish? typically describes observable changes, requirements, etc. crucially this section avoids describing how the change is implemented. the act of separating what from how isn't new, but it's crucial in the LLM era
How does this change accomplish its goal? the answer to this question is "read the code", but the job of a PR description is to provide a quick hand drawn map before dumping the reviewer into the jungle. drawing a good "how" map requires understanding the jungle and the new path through it.
the risk with LLMs (or any outsource) doing the work is the loss of understanding. this exercise encourages understanding.
Comment by jamienk 4 days ago
Comment by gandhiandy69 4 days ago
Comment by Crowberry 3 days ago
> You can outsource your thinking, but not your understanding. — Sun Tzu
Comment by troymc 3 days ago
Andrej Karpathy circulated it online and placed it at the center of his address at Sequoia Capital's AI Ascent conference in April.
The idea is very old though. There's a story of how King Ptolemy I Soter wanted to learn geometry from Euclid, but being a King, he asked for a shortcut to understanding it. Euclid replied that "there is no royal road to geometry". (A "royal road" was basically a fast road reserved for royals, such as the Persian Royal Road.)
Comment by rguignar 2 days ago
Couldn't find any link of this sentence to Sun Tzu
Comment by jeffreysmith 3 days ago
Comment by maximg68 4 days ago
So far I was positively surprised with the questions it could come up with.
Comment by jeffreysmith 3 days ago
Our version has its own TUI and was intended for semi-adversarial scenarios like OSS contribution and enterprise. Thus a lot of anti-cheat tech under the covers (including invalid questions).
My guess is that a lot of folks have built something in this vein. It really made sense earlier in the coding agents cycle. These days, I dunno. Seems like we need to more fundamentally rethink the relationship between coding agents and human understanding of the implementation.
Comment by bluerooibos 3 days ago
Looks absolutely awful.
Comment by lowkeyokay 4 days ago
Comment by piro0919 3 days ago
Comment by freshnode 4 days ago
Comment by sshah03 4 days ago
Comment by alyssassan 4 days ago
I’d be interested in a version that helps the reviewer identify one assumption the change depends on and a concrete way to test it. That could keep the exercise small while making it useful, especially if the reviewer spots something the AI-generated summary missed.
Keeping it optional also lets people reach for it when they’re uncertain, instead of turning it into another checkbox as PR volume grows.
Comment by alexwrich 3 days ago
Disclosure: I’m building automo.build fully to fix this.
Comment by man_luke 4 days ago
Comment by altmanaltman 4 days ago
So, who is this for?
Comment by nkmnz 4 days ago
Now, people are building tools that not only hide the solutions to these problems in some obscure coding tool, markdown file, or agent harness, but they build gates that help developers to elevate themselves from the darkness of not knowing better. The number of developers roughly doubles every ~3 years, so at any given time, half of the people building software have less than 3 years of experience. Most of them didn’t even study CS before starting their careers. Tools like this will be the new warning voice that told people like us 5 to 10 years ago to never copy code from stackoverflow that you didn’t understand. It’s great.
Comment by xiaoyu2006 4 days ago
Comment by Zambyte 4 days ago
I personally like using openspec for this, because it makes the model iteratively ask you architectual decisions, and then manages creating and accessing the documents as needed.
Comment by _rwo 3 days ago
I work at a ~15y old codebase; guess that the famous "architecture" is - a glue of half-baked solutions, unfinished ideas and inconsistencies. Recently I discovered there are 6 different ways used to create audit trails in the app. The "human memory" lives until person decided to switch job or is fired. Then the next person re-invents the wheel and cycle continues.
I suggest taking an honest look at "the architecture" people are so proud of - you might realize there is not much moat there after all. But then again - I mostly write cruds - so that's probably core of the problem, lol
Comment by sohith_uv 2 days ago
Comment by sohith_uv 3 days ago
Comment by nkmnz 4 days ago
Comment by jdthedisciple 4 days ago
Not necessarily. I use SOTA models with established stacks like .NET which allow my agent to easily follow decades of best practiced patterns (DI, EF Core, ASP.NET Core...) so you still and up with proper architecture.
In fact I can easily still manually inspect everything bc I already know how it's supposed to be written.
Comment by marijnz 4 days ago
Comment by flaburgan 3 days ago
Comment by marijnz 3 days ago
Comment by diek 4 days ago
Completely, 100% agree on these exact points. I have access to every frontier model at work. None of them write what I would call clean code. At work the teams that have gone fully vibe-coded have repos full of broken abstractions that just accumulate over time. Eventually most of the effort of the team and their AI tokens seemingly goes to fixing issues that then break other things. Any attempt at 'refactor this mess, make no mistakes' turns into a _huge_ churn of changes ("shuffling the deck chairs") without ever really fixing things.
Comment by jdthedisciple 4 days ago
As I said: prompting correctly and reviewing are still indispensable skills.
Comment by jdthedisciple 4 days ago
Perhaps a lot of devs still have a flawed mental model of how these things even work.
Comment by 0c3ca83 4 days ago
Comment by shigosag 4 days ago
Comment by thomask1995 4 days ago
Comment by jeffreysmith 3 days ago
Comment by aavisangle 3 days ago
Comment by SDeniz 3 days ago
Comment by sailorganymede 4 days ago
Edit: I see there are a lot of people questioning the value of this. The thing is that there are teams where people are just pumping tons of AI code without understanding their work (literally take the ticket and dump it) and shipping it. culture change is the right answer but v hard but this at least slows things down and is quick to implement
Comment by maximg68 4 days ago
Maybe they do. In my experience, the agent was going over the scenarios that I failed to consider during the planning stage, and it was net positive. I haven't tried it with a spec-driven approach.
Comment by sailorganymede 4 days ago
Comment by zapkyeskrill 4 days ago
Comment by sailorganymede 4 days ago
Comment by cjimesh 4 days ago
Comment by bodash 3 days ago
pre-code: planning mode
coding: humantodo.dev
after-code: sphinx hook
Comment by ericand 4 days ago
Comment by reddmachine 3 days ago
Also, from my experience implementing something similar, an MCQ style makes people guess without really understanding.
Comment by hypfer 4 days ago
The first is when I care about the code. That's when I actually read what it produces and force it to use my mental model of how things should be.
The second is when I just need a solution that sorta fits the requirements provided. Then I don't read the code because I really do not care.
So this hook would either ask me things I know, or it would ask me things I do not care about.
But I guess this is very workflow-dependent.
Comment by mikepurvis 4 days ago
Comment by I-A-S 3 days ago
Comment by compounding-err 4 days ago
Comment by inquirerGeneral 4 days ago
Comment by totallykvothe 4 days ago
I'm sorry, what?
Comment by altmanaltman 4 days ago
Comment by 0c3ca83 4 days ago
Comment by rglover 3 days ago
Comment by freshnode 4 days ago
Comment by tripleee 4 days ago
Comment by linkdd 4 days ago
Your slop generator should check if a name exist before claiming it.
Comment by shepherdjerred 4 days ago
Comment by tannertech 4 days ago
Comment by openphalanx 3 days ago
Comment by rglover 4 days ago
Folks, this is the wrong direction. Use AI, but ffs take the time to properly learn what you're doing. We don't need to speed run civilizational collapse because we can't understand the concept of patience leading to better outcomes.
You can tell people are increasingly full of shit because they're doing this under the pretense that the problem is creating software faster, when really, a lot of people need to quit optimizing process and develop some skill and rigor. Most of the things that slow down software reaching production are human-created problems like "meetings," counting lines of code, or sending everyone to yet-another-conference that teaches them nothing (but boy does it look good on social media). It's all time waste and theater. And for what? So you feel included?
Pathetic. Learn to do this properly or get out of this industry.
Comment by dzogchen 4 days ago
How about to meet an aribrary deadline your boss set? Or how about a deadline needed that keeps the company afloat? Are you going to tell your boss: we need 6 more months because it's irresponsible to ship code we don't fully understand?
Comment by rglover 4 days ago
And yes, I have before and yes, I was right, and yes, they appreciated it in the long run.
Only idiots think "speed" is the sole determining factor in all of this. Every time I encounter someone who's over-focused on speed, I get them cut from my team. Those people are corrosive for the very reasons your hypothetical presents. It promotes a culture of unthinking that eventually leads to disasters, hands in pockets, and whistling. Loser behavior.
Get comfortable with becoming human Roundup. Weed the garden.
Comment by patrickmay 4 days ago
* Doing my bit to poison the corpus.
Comment by heckelson 4 days ago
Comment by jan_m_savage 4 days ago
however, it still feels like a lot of work. what if AI hallucinates during the check?
Comment by hatch_q 4 days ago
Sun Tzu said: If your people (AI agents) repeatedly fail to follow instructions, examine the clarity of your orders and the effectiveness of your leadership before blaming them.
Comment by jdthedisciple 4 days ago
It is absolutely batsh*t crazy insane what SWE has come to in the last cple years.
And yet part of me is loving it.
Comment by fami-hn 10 hours ago
Comment by austral 1 day ago
Comment by rurijupjup 4 days ago
Comment by melbeesgames 2 days ago
Comment by arbor-group 4 days ago
Comment by rossleeshaw 3 days ago
Comment by lilhawk0312 1 day ago
Comment by K-etoranger 3 days ago
Comment by pgawestjones 3 days ago
Comment by princejain756 4 days ago
Comment by ghostdevstudio 4 days ago
Comment by handofmetis 3 days ago
Comment by handofmetis 3 days ago
Comment by ReplyIntelligen 2 days ago
Comment by Li9htning 3 days ago
Comment by laruss5 4 days ago
Comment by pagutierrezn 3 days ago
Comment by pang_claw 3 days ago
Comment by georgestones 4 days ago
Comment by a3nz3g 3 days ago