Hacker Newsnew | past | comments | ask | show | jobs | submit | CraigJPerry's commentslogin

I've had good success with something along these lines but perhaps a bit more raw:

    - claude takes a -p option
    - i have a bunch of tiny scripts, each script is an agent but it only does one tiny task
    - scripts can be composed in a unix pipeline
For example:

    $ git diff --staged | ai-commit-msg | git commit -F -
Where ai-commit-msg is a tiny agent:

    #!/usr/bin/env bash
    # ai-commit-msg: stdin=git diff, stdout=conventional commit message
    # Usage: git diff --staged | ai-commit-msg
    set -euo pipefail
    source "${AGENTS_DIR:-$HOME/.agents}/lib/agent-lib.sh"
    
    SYSTEM=$(load_skills \
        core/unix-output.md \
        core/be-concise.md \
        domain/git.md \
        output/plain-text.md)
    
    SYSTEM+=$'\n\nTask: Given a git diff on stdin, output a single conventional commit message. One line only.'
    
    run_agent "$SYSTEM"
And you can see to keep the agents themselves tiny, they rely on a little lib to load the various skills and optionally apply some guard / post-exec validator. Those validators are usually simple grep or whatever to make sure there were no writes outside a given dir but sometimes they can be to enforce output correctness (always jq in my examples so far...). In theory the guard could be another claude -p call if i needed a semantic instruction.

Do you have examples of these commit messages? I have yet to see an AI write a good commit message. At least when compared to good commit messages -- if it just does better than "wip" or "fix stuff" that's not a high bar.

My skills/domain/git.md looks like this:

    Context: You are working with Git repositories.
    - Commit messages follow Conventional Commits: type(scope): description
    - Types: feat, fix, docs, refactor, test, chore, ci, perf
    - Subject line max 72 chars, imperative mood, no trailing period
    - Reference issue numbers when relevant
So it produces messages like:

    $ git diff HEAD~1 | bin/ai-commit-msg
    fix(guards): pass input to claude and tighten verdict handling

My issue with this kind of message is that it doesn't convey intent well enough. This kind of commit message will always be like "remove check from handleUser" instead of "fix authorization in xyz case". But I assume these are different schools of commits -- I prefer commits which convey WHY, not WHAT, much like source code comments.

I was looking at something similar. What does your agent-lib.sh look like?


Bump.

Would love to see your tiny agents project. But understand that it might contain something sensitive and will therefore stay private.


That is probably a private repo? 404, so not something I can access

I'm pretty happy with build123d these days https://github.com/gumyr/build123d


Yep. I am doing all my CAD work with build123d. I think it is much more capable than OpenSCAD due to BREP and Python. A shame that it is still relatively unknown.


Wow this looks awesome! Thanks for the link.


There's an extended thinking mode for GPT 5.2 i forget the name of it right at this minute. It's super slow - a 3 minute opus 4.5 prompt is circa 12 minutes to complete in 5.2 on that super extended thinking mode but it is not a close race in terms of results - GPT 5.2 wins by a handy margin in that mode. It's just too slow to be useable interactively though.


Interesting, sounds like I definitely need to give the GPT models another proper go based on this discussion


>> Coding is like

That description is NOT coding, coding is a subset of that.

Coding comes once you know what you need to build, coding is the process of you expressing that in a programming language and as you do so you apply all your knowledge, experience and crucially your taste, to arrive at an implementation which does what's required (functionally and non-functionally) AND is open to the possibility of change in future.

Someone else here wrote a great comment about this the other day and it was along the lines of if you take that week of work described in the GP's comment, and on the friday afternoon you delete all the code checked in. Coding is the part to recreate the check in, which would take a lot less than a week!

All the other time was spent turning you into the developer who could understand why to write that code in the first place.

These tools do not allow you to skip the process of creation. They allow you to skip aspects of coding - if you choose to, they can also elide your tastes but that's not a requirement of using them, they do respond well to examples of code and other directions to guide them in your tastes. The functional and non-functional parts they're pretty good at without much steering now but i always steer for my tastes because, e.g. opus 4.5 defaults to a more verbose style than i care for.


It's all individual. That's like saying writing only happens when you know exactly the story to tell. I love open a blank project with a vague idea of what I want to do, and then just start exploring while I'm coding.


I'm sure some coding works this way, but I'd be surprised if it's more than a small percentage of it.


This levels concept resonates with me: https://www.lorenstew.art/blog/progressive-complexity-manife...

There are cases where you need more than htmx / datastar, but i like the explicit calling out of when these boundaries occur (e.g. you've exceeded what "islands" can give you), and i like the gravitational pull to lower levels.


The limitations of HTMX are not the same as the limitations of Datastar. Datastar is a whole other beast with only a few at most vestigial similarities to HTMX.

You can't do virtual scroll over a billion checkboxes in HTMX (I've yet to see anyone manage in react for that matter either), yet you can do it easily in Datastar. [1]

[1] https://checkboxes.andersmurphy.com


that is an amazing demo anders!


Thanks Carson. Although honestly it's pretty mid compared to what's actually possible in hypermedia.

The only reason I wheel it out is when people say you can't do X (often meaning react like things) with hypermedia.

Honestly, you could probably do it in HTMX if you are prepared to only use out of bounds swaps, morph and SSE. But, that approach has always felt second class, unfinished and against the grain. So stuff like that isn't done.

Always made me sad that you wrote idiomorph (thanks for sharing it with the world) but didn't make it part of HTMX. I guess HTMX 4 will change that?


yep, it was an extension in htmx 2, but we are gonna include in htmx 4 (i'm old and move slow)


>> are you ready to be first in line to accept accountability

I'm accountable for the code i push to production. I have all the power and agency in this scenario, so i am the right person to be accountable for what's in my PR / CL.


That is the policy I set up for our team as well—when you push, you declare your absolute responsibility for any changes you made to the repository, regardless of the way they were conceived.

That is really about the least confusing part of the story.


I, a foreign entity, have sold something to an american and now have 10 dollars and zero treasuries.

I purchase a treasury. I have zero product, zero dollars and one treasury.

At some point in future i have zero product, maybe 12 dollars and zero treasuries. Presumably i now either repeat the cycle or use my winnings to spend on us output.

GP’s version checks out, your assertion about dollars staying abroad doesnt track? What am i misunderstanding - How did these dollars get abroad, how did they repatriate to buy treasuries, how did a treasury become a reserve, how did the dollars still exist abroad after being exchanged for treasuries?


> I, a foreign entity, have sold something to an american and now have 10 dollars and zero treasuries.

Or you sold something to a non-American entity in a dollar-based market, eg. oil. The dollars do come from America to begin with, but once they get "out there" they work as a medium of exchange for whoever wants to use them for that purpose.


Which is why the US historically bombed any country that sold oil for other currencies, but now china is negotiating the petroyuan and it's working.


Interesting - The petroyuan was not on my radar at all.

https://ipr.blogs.ie.edu/2025/06/27/geopolitics-of-oil-how-c...: This article explores case studies such as Russia, Iran, and Venezuela, illustrating how the petroyuan has been implemented to bypass sanctions and reduce dependence on US financial systems.


It's ironic, isn't it? After going to war so many times to protect the petrodollar, the US deleted the petrodollar itself.


The petroyuan faces a big problem, which is lack of trust in the CCP to preserve its value.

As mentioned, there’s also mounting dissatisfaction and distrust in the petrodollar, but the devil you know…


> Presumably i now either repeat the cycle or use my winnings to spend on us output.

What you are missing is that these dollars can be circulated indefinitely in the global economy without ever repatriating, because they are valuable and useful as actual currency. They may never come back to the US.


They also don't have to circulate - they can be used as collateral for debts.


Indeed, everyone should be familiar with the "eurodollar" system - it's critical to how the world economy works.


Because the world trades using US dollars. Country A needs to buy something from Country B. Country A needs to buy/get dollars to buy stuff from Country B. Country B will not accept anything but dollars or gold for its products because it also needs to buy other stuff like oil in dollars from other countries.


It could accept any credible currency if it was connected enough. Euros, yuan, rupees and yen aren't going anywhere for at least 20 years. Each one is a separate system and countries mostly connect to just one, which is USD, but that doesn't have to be the case forever.

India won't accept euros because it's not part of the ECB, not because it doesn't believe in their value. But India has accounts at US banks in dollars.

Banks do this, not countries. Most banks in the world have accounts at US banks to accept dollars with, they don't have accounts at eurozone banks to accept euros with, or Japanese banks to accept yen with. It doesn't matter in everyday practice because it's easy to exchange euros in eurozone banks or yen in yenzone banks with dollars in dollarzone banks. There's plenty of infrastructure for that. It matters in long–term economic trajectories because all those banks are holding US dollars and the US exports inflation to them and they're not holding euros and then ECB can't.


> Presumably i now either repeat the cycle

Most of the time this is exactly (foreign or not) institutions do.

Think about it, if the 10-dollar treasury is due and you got your money back, the US debt will go down by 10 dollars. However, in our reality, the total amount of US debt almost never goes down.

Of course some interest will be used in other ways, like spending on the US goods or staying as cash to provide liquidity. But at the end of the day, the most popular way to spend the money got from due treasuries is... to buy more treasuries.


>> EV have far more tire wear because they are heavier

Is this true?

If an EV were 30% heavier than an ICE, would it produce 30% more tyre wear emissions? Or would it produce more or less than 30%? Is the primary factor in tyre wear weight and is the relationship linear?

The types of tyres appear to be quite different, the EVs seem to have smaller contact patches (narrower wheels) and they're made of different "less grippy" compounds that drag less. Does this change the equation at all?


in cold weather an ice is not close to 30%, that's an achievable warm weather figure when everything's working efficiently. Many ice journeys are so short in cold weather that efficiency never peaks above 10%


Well, EVs also lose a lot of efficiency in cold weather as well. You'll also note that the 70% figure I gave for power plants is more or less a best case scenario for modern, well designed plants. A lot of currently existing power plants do much worse than 70%


True, system thermal efficiency for the UK's CCGT generation is about 50%. Obviously that's with a varying throttle (the UK goes from say 5GW of CCGT to 25GW of CCGT in an hour if the wind drops just as everybody wakes up) and you'd do better than 50% if you were baseload running 24/7 at peak performance - but that's not a realistic place for CCGT to be when nuclear fuel is basically free and the two new big sources (solar and wind) aren't even running on actual fuel anyway.


Revealed preferences suggest otherwise and that matters because he says a lot of things, often contradictory.

Is it just another Epstein diversion maybe?

Oil story doesn't stack up though:

    - it's heavy sour oil, the tar like substance isn't economically extractable without an almost doubling in barrel price
    - cheaper (existing infra) sour supply chain with Canada already meets US shale light sweet oil blending needs for a long time
    - decided on maintaining stability of existing Venezuelan regime over supporting regime change
One thing that lines up so far is it does seem to be disproportionately effective at displacing column inches spent on the pending bringing to justice of Epstein entangled elites. Disproportionately because that pursuit of justice seems quite resilient in resisting partisanship breakdown.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: