Skip to content

Rails, not just instructions

I work with artificial intelligences that write code. Asking them nicely is not enough: what matters is what they cannot skip.

Cover of Galivelop-workflow, the method I work with

· Workshop · Written by: Álvaro García Graña · Reading time: 3 min · Project: Galivelop-workflow

The word: What a “harness” is

A harness is what a climber wears. It does not climb for you or tell you where to go. It only stops one bad step from becoming a fall.

That is my name for everything around the artificial intelligence when it works with me: the rules, the checks, the notes it leaves and the moment a person says yes or no. It is duller than the AI itself, and it is what lets me trust the result.

What went wrong: A written rule is not enough

At first I wrote everything down as rules: do this, do not do that. The AI read them, understood them and, now and then, broke them anyway. Not out of bad faith: halfway through a long job, a rule is one more sentence among thousands.

A small example. I had written that tests may only use fake email addresses, the kind reserved for examples. One day a different one slipped in. I saw it late, just before publishing, and fixing it meant undoing work that was already saved.

Decision

If a rule is broken more than once, it stops being a rule and becomes an automatic check. Whatever can be checked is checked by a machine, the same way every time, and the AI is left with what needs judgement.

My rule about rules

  1. Context grows: Every call reads the whole conversation again: the longer it is, the more it costs. That is why mechanical work goes to subagents and the window has a limit.
  2. Compact: When it reaches the limit, the conversation is compacted. A hook runs recover.py and brings the state back from git: the session carries on from the same step.
  3. Cut-off: The session ends: out of tokens, with the container recycled or handed over to another account. What was only in the conversation is lost; what was pushed is not.
  4. Handover: Another session, maybe on another account, starts, reads the log and picks up at “Siguiente:” without asking where things stood. What is not pushed does not exist.
One example: the handover between two work sessions. What one leaves written down, the next one checks before starting.

The rails: Four things that cannot be skipped

What holds the work up

  • What is not saved does not exist. The AI forgets everything when the session ends, so it saves often and leaves a note for whoever comes next.
  • A test must have failed first. If it has never gone red, I do not know whether it is really watching anything.
  • Nothing is published while the checks are red. Not in a hurry, and not even if I ask for it.
  • Publishing is a person's decision. The AI proposes, a second look reviews, and the last word is human.
Diagram: the work goes through whoever organises, whoever does and whoever reviews, and in the end you decide
The same path, drawn for Galivelop Developer: organise, do, review and, in the end, you decide.

What I learned: The harness takes nothing away

None of this makes the AI infallible. It still gets things wrong, and so do I. The difference is where the mistake ends up: in a check that goes off in time, and not on the website you are reading.

I like to think of it this way: the better the harness, the higher I dare to climb. The method is published and anyone can see it on the Galivelop-workflow page.