the recs files
SKILLS FOR CODING AGENTS · 1.0.0-BETA

Keep a system's decisions in records, and build from them.

The recs files are skills for coding agents. The agent keeps each decision about your system as a short, numbered record, and writes the code from those records. The records persist between sessions; the agent's context does not.

Install the skills How it works
01Example: a lending library

One goal, traced from the actor to the test.

A borrower wants to keep a book longer. These are the records that govern the renewal, and the code and test that cite them.

User workflow · Actor: borrower

UW-3 Renew a loan

Main success scenario
  1. Borrower asks to renew a loan
  2. Library renews it (F-12: A borrower can renew a loan) and shows the new due date
Extensions

2a. The book is reserved

Library refuses with MSG-4: A reserved book cannot be renewed; the use case ends

2b. The loan is overdue beyond the grace period

Library refuses with MSG-5: An overdue loan cannot be renewed; the use case ends

Feature · EARS

F-12 A borrower can renew a loan

  1. When a borrower renews a loan, the library shall set the loan's due date one loan period after the renewal date.
  2. If the book is reserved, then the library shall refuse the renewal with MSG-4: A reserved book cannot be renewed.
  3. While a loan is overdue beyond the grace period, the library shall refuse any renewal of it with MSG-5: An overdue loan cannot be renewed.
  4. Where the library sets a renewal limit, the library shall refuse a renewal past it with MSG-6: This loan has reached its renewal limit.
The code cites the requirement
# F-12 §2: A borrower can renew a loan
return refuse(:msg_4) if loan.book.reserved?

# F-12 §1: A borrower can renew a loan
loan.due_on = Date.today + loan.period
The test asserts the message catalog's text
# F-12 §2: A borrower can renew a loan
assert_equal "A reserved book cannot be renewed",
             renew(reserved_loan).message
02Congruence

Each change brings the code and the records into closer agreement.

Agents write code faster than anyone documents it, and the reasons behind it are the first thing lost. The recs files store those reasons as records. When a new record contradicts existing sentences, in other records, in skills or in code, the agent finds each one, proposes its replacement, and lands the record and the replacements in a single commit.

1
The agent drafts the record and finds every sentence it makes false.
2
The record keeper reviews the draft alongside the proposed replacements, and approves.
3
The record and its replacements land in one commit. Records and code agree again.
03Events and state

A record is an event. A projection is the current state.

If you know event sourcing, you know this shape. Records are appended in order and never rewritten in substance; a new decision on the same question is a new record that supersedes the old one. Fold the records of one category and you get its projection: the titles of every active record. The projection is what the agent reads.

The records, in the order written
F-9
A borrower can renew a loan once
SUPERSEDED BY F-12
F-10
A borrower can borrow a book
F-11
A borrower can reserve a book
F-12
A borrower can renew a loan
SUPERSEDES F-9
features.org: the projection
F-10A borrower can borrow a book
F-11A borrower can reserve a book
F-12A borrower can renew a loan
04Context

The agent reads every title, then opens only the records the task needs.

A projection costs one line per record, so the agent can read all of it at the start of a task. From the titles it picks the records that bear on the work and opens those files, and only those. Context goes to the decisions in play, at the depth each one needs.

TASK · Can a borrower renew a reserved book?
F-10A borrower can borrow a book
F-11A borrower can reserve a book
F-12A borrower can renew a loanOPENED
MSG-4A reserved book cannot be renewedOPENED
1 line
per record, read on every task
1 file
per relevant record, opened on demand
05Inverted pyramid

The most important information comes first, at every level.

Newspapers write in an inverted pyramid: the headline, then the essential facts, then the detail. A reader can stop at any point and still have the story.

Records follow the same structure. A record's title states its decision, so a reader who stops at the projection already knows the substance. The record file holds the detail, and the knowledge base holds the sources the idea came from.

PROJECTION LINEF-12 A borrower can renew a loan
RECORD FILEFour requirements, in EARS
KNOWLEDGE BASEMavin's EARS
“Reversible summarization at multiple zoom levels. Compress context without losing the ability to expand back to full detail.”
StrongDM's software factory arrived at the same idea and calls it Pyramid Summaries.
06Use cases

Work starts from what a person is trying to achieve.

User workflows follow Alistair Cockburn's use cases. Each states one actor's goal, a main success scenario in numbered steps, and extensions keyed to the steps where things can go differently. Each also states two guarantees: what holds even when the workflow fails, and what the actor gets when it succeeds.

Trigger
The event that starts the workflow.
Main success scenario
The steps when nothing goes wrong.
Extensions
Branches keyed to steps. 2a: the book is reserved.
07Hub and spokes

Records connect as hubs and spokes, with the user workflow at the center.

The vision states what the system is for, and the ubiquitous language defines the words of its domain. Each user workflow is a hub: it names the features it reaches, the messages its actor can meet, and the terms it uses. Start from a workflow, follow its references, and you have what the system does for that goal.

Which records may name which
A user workflow
features, messages, terms, other user workflows
A feature
messages, terms, other features
An architectural decision
terms, other architectural decisions
A term
other terms
08Get started

Install the skills, then let kickstart draft your first records.

Claude Codeclaude plugin marketplace add Trevoke/the-recs-files-claude
Codexcodex plugin marketplace add Trevoke/the-recs-files-codex
pipi install git:github.com/Trevoke/the-recs-files-pi@v[VERSION]
Antigravityagy plugin install https://github.com/Trevoke/the-recs-files-agy

Run recs-kickstart in a project that has code but no records. The agent reads the project and proposes records one category at a time, titles first and then bodies. Nothing is written until you approve each batch, and your code is left untouched.