Show HN: Turri – a coding agent with the power of regenerative software

github.com

7 points by ponoru 8 hours ago

Coding agents let me move fast. To keep up, I stopped reading the code, and with it I stopped understanding my own software. I lost my sense of engineering along with it. I was still the one accountable for software I didn't understand. No workflow or better model fixed that, so I built turri.

turri is based on Pi and the concept of regenerative software introduced by Chad Fowler. The ability to regenerate the same piece of code multiple times and always get the same results in terms of functionality is called the deletion test and proves that your coding agent completely understands you. The idea is that every time part of the software needs to be changed, you regenerate a new version of the code based on the durable information you have about the system.

The durable system information includes specs, tests, ADRs, and other types of documents, and it is written in ***plain. You write these with the help of an agent, and Turri starts partial regeneration of the software you're changing. You can repeat this process as many times as you want until you're happy with the change you're implementing. The regeneration also includes proofs that the generated code completely conforms to the system knowledge on which it was based (it implements all the tests that are part of the definition and automatically adds additional tests).

You can try this by cloning the repo or by installing it from my landing page. I created a desktop app to improve usability. Currently, it's only suitable for new projects, but I'm working on adding support for existing projects.

I also wrote the full story in case you're interested: https://turri.dev/blog/why-i-built-turri/

mariusziskra 7 hours ago

How does regeneration deal with persistent state? If a **plain change leads to a different DB schema, does turri generate migrations, or is the data layer treated as something that can’t just be thrown away? This has been the hardest part for me with spec-first generation.

  • ponoru 6 hours ago

    Yes, turri will generate migrations with every change, so if you need to deploy a new version it will check against the current schema and generate it properly.

    Honestly, I haven't used it on some reasonable scale to fell the real issues of migrations yet. I consider this to be one of the biggest problems with the approach, but I think it's addressable.

    How do you approach this problem?

radanskoric 5 hours ago

How do you enforce the deletion check? I understand that it is important to make sure the regeneration can be trusted but do I really need that?

  • ponoru 5 hours ago

    I consider this to be the most important concept of the regenerative software approach. Basically, if you can regenerate a certain module multiple times you are certain that you nailed down every detail that are describes that module.

    If this is true, it means that each new change in the system can be reliably described with a small change in the system knowledge (usually it includes some small update in specs and tests) and regenerate with very high certainty that the produced code will be correct.

    Basically, the regeneration test is putting a solid ground for all future improvements.

    • radanskoric 5 hours ago

      Ok, that makes a lot of sense. But how do you do it in practice? How do you test if the spec passes the deletion check?

      • ponoru 4 hours ago

        Through multiple steps I would say.

        First, it automatically confirms that all defined tests are passing but it's hard to say if the defined tests are covering all the edge cases that are important.

        It will also write a bunch of mutation tests and do the automatic tests based on the type of application.

        At the end, you would still need to manually check to confirm the functionality (unless until you are confirming inital deletion test for a certain module).

jurglic 8 hours ago

Really interesting idea. We need more tools like this to see if regenerative software actually works in practice. Nice to see someone trying it.

  • ponoru 7 hours ago

    While building turri, I build quite some internal tools that I'm still using. I'm planning to open-source some of them.

    Please, try it yourself and let me know what you think.