What changed?

I have experimented with a large spec application from scratch, and let the AI go for it. After only a few iterations of corrections, it produced a very good application, coded very nicely, and working as expected.

Unfortunately, it was too much code to review, and it left me unfamiliar with the code. It was like working with a codebase I had inherited and knew nothing about it.

We all know how working in unfamiliar code is time consuming and very difficult. It was so hard to code review, I realised I should have written it in small portions. I.e. my instincts when starting this project (dockb) were bang on target... EXCEPT:

I had started off too hard to one side: the side of not trusting AI, and wanting to write a lot of it myself.

The AI DLC

The AI DLC - Specify, Build, QA and Deployment

Specify

Specify the project well up front. In this project, the User Stories and Business Analysis was already done in my head. I had started with the high level engineering design. You won't always be able to do that, and in most cases, you'll need to do some work before you get to the high level engineering design stage.

The full specification process consists of the following, though from one project to another, you may skip some steps. The one step you can't skip though, is the high level engineering design.

  1. Business Requirements (problem, how it will be solved)
  2. User Stories
  3. Architectural Design
  4. High level Engineering Design - models, API, UI mockups, etc...

Build

The design process is an iterative loop through the components, in the order that you think makes the most sense. In this project, I started with the models.

Design the package, or sometimes a group of packages. Try to choose components that you can create tests for, even if large parts need to be mocked. For each such component, work with the AI as so:

  1. Create a branch
  2. Design it - write a README.md file in the package directory
  3. TDD
    1. Write class skeletons
    2. Write failing tests
    3. Write the code
  4. Cleanup before push
    1. Run tests
    2. Run linters etc
  5. Commit and push
  6. Code Review - repeat until no errors:
    1. By LLM first
    2. Fix and push
    3. By human - without LLM assistance
    4. Fix and push
  7. Merge to main

Then the next component...

Finally, QA and deployment

These will use similar processes as the development, but I'm not going to describe that here, because I'm not an expert. I'll stick to what I know: Development.