Lessons / Part 10. Coding agents, commands and skills
72 Do the task once, write the corrections as a guide, then save a command
A saved command built from the session's corrections reproduces the finished piece before it touches new data.
What people usually ask
Make a command that does this every time.
What comes back
A command written from the first draft of the calibration summary, so every week it repeats the mistakes that took an hour to correct today.
Ask this instead
The calibration summary we finished today is the reference piece. Save it as reference/cal_summary_2026-10.md.
Write the procedure as a command named cal-summary, built from the corrections made in this session: ISO dates, pressure in mbar not psi, instruments in tag order, the due column computed from the interval, no closing paragraph. Put the output template beside it as template.md and the computing step as make_summary.py.
The command may read three inputs and nothing else on disk: calibration_log.csv, instruments.csv and template.md.
Two verbs: "cal-summary status" reads and reports what would change and creates nothing; "cal-summary make" writes the summary file.
Before first use on new data, run make on this month's log and diff the output against the reference; they must match. Run make again on the same input and show that the second run changes nothing.
Attach: The finished reference piece and the list of corrections made during the session.
Why it works: the corrections are the knowledge, and a command that reproduces the reference exactly has been tested against something real before it meets a new month.
Drafted with Fable 5.1 from my notes; chosen and edited by me.