Anacreon

AnacreonUnderstand AnacreonThe concept index

A cheat sheet for the code, so agents stop rereading it.

Before an agent can change code, it has to learn its way around. Most do it the slow way, reading file after file until they get the picture, and they do it again every session. The concept index is the cheat sheet a senior engineer would hand a new hire, kept in the repository and updated with the code. Anacreon hands each agent the part of it that its work touches.

Level 3 · The concept index

A cheat sheet for the code, kept in the code. Each part of the code gets a short entry: what it is for, the one rule not to break there, and which files carry it. When an agent takes a piece of work, Anacreon hands it just the entries that piece touches, so it reads a page or two instead of the whole repository.

Three ways to picture it

A new hire's cheat sheet

On day one, a good senior engineer says: "This folder handles gift cards. Never change a balance except through this function. Here's the test that proves you didn't break it. Last time someone broke it, a card got charged twice." Each concept is that note, written down once, for every agent that comes after.

A library's shelf marks

Every book in a library has one shelf mark, though any number of reading lists can mention it. A book with no shelf mark, or two, gets flagged. Every file has one entry responsible for it, and any number of entries can mention it.

Plans with a date stamp

A contractor gets a printed set of plans, dated the day they start. The plans don't change under them while they work, and the inspector checks the job against that same set. An agent's concepts are fixed the same way when it takes a piece.

What one entry looks like

An entry, called a concept, is one short file in the repository. It's written for an agent, so it skips the background and leads with the rule. Wrong is worse than missing here: an agent that trusts an entry stops checking the code, so nothing goes in that nobody has checked against the code.

ConceptUnder: Checkout

Gift cards

the rule
A card's balance changes only through one function, which writes every change to the card's history. A refund goes back to the card it came from.
responsible for
the gift card code, and its tests
leans on
checkout, and the payment provider's client
a past mistake
A payment retried after a timeout charged a card twice. Every charge now carries a key, so a repeat does nothing.

A made-up example: an imaginary bookshop's code, not Anacreon's.

Every entry uses the same few headings, always in the same order, and leaves out any it doesn't need:

HeadingAnswers
What must stay trueThe rules, and what breaks if you break them.
Change togetherWhat else has to change with this that the code won't tell you.
VerifyThe quickest check that proves a change is safe.
TrapsWhat has gone wrong here before.
In the codeWhere to start reading.

Entries form a tree. A big area such as checkout is one entry, with smaller ones like gift cards under it. Each can carry a few labels from the project's own list, such as "payments" or "security".

Every file has one owner

Like a shelf mark, ask "which entry is responsible for this file?" and you always get one answer, or a plain "nobody". Any number of entries can mention a file, the way reading lists mention a book, but only one owns it.

Concepts and the files they own A made-up bookshop. On the left, an index root with three concepts: checkout, gift cards under it, and refunds. On the right, five folders. Checkout owns one, gift cards owns one, refunds owns one, and gift cards also mentions the refunds folder without owning it. A fourth folder is claimed by both gift cards and refunds, so it has no owner and is a gap. A fifth folder is claimed by nobody. Index rootgroups, tags, the guide's place Checkout Gift cards Refunds checkout/ giftcards/ refunds/ shared/ scripts/ owned owned owned, andreferred to two owners:a gap no owner:listed owns refers to
The same made-up bookshop, not a real repository. Solid lines: the entry is responsible for that folder. Dashed: it only mentions it.

If two entries claim the same file, it belongs to neither, so the clash shows up instead of being settled by accident. A file nobody owns shows up as a gap as soon as a piece of work names it.

What the agent is handed: an example

Take a made-up piece of work in the same imaginary bookshop: "Let a customer pay with two gift cards at once."

  1. It says what it touchesThe gift card code, the Gift cards entry, and the label "payments".
  2. The entries are pickedGift cards, which it named and which owns that code. Checkout and Refunds, which mention it. Payment providers, labelled "payments". Four entries out of sixty.
  3. They're stampedTaking the piece fixes the commit and records the list with a fingerprint, a short code anyone can recompute later.
  4. The reviewer gets the sameThe review is handed the builder's exact list, at the builder's commit.
  5. Surprises are notedThe finished work also changed the receipt layout, which the piece never mentioned. The record keeps that.

A made-up example. The steps are the ones Anacreon runs on every piece.

Nobody guesses from the piece's description which parts of the code it needs. It says so, and the same rule always gives the same list. Only the chunk's accountable person can change what a piece says it touches, and only before someone takes it.

Why it matters

The agent starts on the right two pages instead of the whole manual. The reviewer judges the work against what the builder was actually told. And months later, the record still says exactly what the agent was given.

When the agent wants more

The list is a starting point, not a fence. A session can look anything up.

Like askingToolWhat comes back
"Show me the table of contents."index_outlineThe tree of entries, each with its rule, and whether the index passes its checks.
"Tell me about gift cards."index_conceptOne entry in full, or just one of its headings.
"Who's responsible for this file?"index_for_pathThe entries whose code covers that file or folder.

Kept honest

Broken links get caught

If an entry points at a file or function that's been moved or deleted, the check fails and says which. Every outline says whether the index passes.

The words are a person's job

No checker can tell whether an entry still describes the code. The change that moves the code updates its entry, and the reviewer checks it.

Treated as text, not orders

Anyone who can push wrote the index, so agents get it labelled as repository text, trimmed, and with anything that looks like a password withheld.

Anacreon reads the repository through a read-only GitHub app the project installs, never a member's own credentials.

A guide for people, too

The index is the field manual: short, rule first, for agents. People need the textbook: what the project is, why it's built this way, how to find your way around. That can live in a guide beside the index, written however the project likes, and the index's root says where. Agents aren't handed the guide, though an entry can link to it.

Coming next for the index

WhatWhy it mattersStatus
Finished work says what it changed in the indexAn owner can require every submission to name the entries it updated, or say why none, checked against the submitted codeBeing built
A sweep for broken linksOwners are told once when an entry's links stop working on the main branchBeing built
The exact rules: the list an agent is handed Deeper
  • Inputs are declared only: files (a folder or a pattern stands for its folder), concept ids, the accepted plan's file links and tags. With none of the first three, the chunk's scope is used, and flagged.
  • The passes run in order: named concepts, the owners of named files, concepts that refer to them, tags. Ties go by declared order, then by id.
  • The list stops at 8,000 characters of titles and rules. Every entry it cut is named, and the work packet says how to fetch each one.
  • The commit is fixed at the claim. Renewing writes nothing. A new claim, after a release, a lapse or a return, starts a new record.
  • A fixed commit the repository no longer has is reported, never swapped for the head.
  • The fingerprint is SHA-256 of a versioned text of the commit, the budget and every entry, kept or cut.
  • A declared path with no owner, or with two, is a gap, and the list says so.
  • A planning claim gets a list read at the head, not recorded and with no fingerprint.
  • A piece's declared files and concepts are changed only by its chunk's accountable person, while the piece is open.
The exact rules: reading the index Deeper
  • Each concept is one file in the repository, and its path is its id. Ids are stable: a rename that misses a link to it fails the check.
  • A concept's rule and its sections are short by rule, so an outline of the whole map stays small.
  • Membership is checked first. A project with no repository, a repository with no index, or a commit it doesn't have gets a plain answer, not an error.
  • The index is checked once per commit and the answer kept, under limits on time and memory, so a large index can't hold up the server. A read that hits a limit says which one.
  • Reading a new commit fetches only what changed, but what a read sees never depends on what was kept.
  • The server never fetches a page of the guide for people. It checks only that the guide's path exists.
The exact rules: versions of the format Deeper
  • An index says which version of the format it follows. One that says version 2 must meet its rules: the fixed headings, one owner per file, a root of grouped entries and its list of labels.
  • Any other index is read as version 1. The version 2 rules it breaks are shown as warnings that never fail the check, so a project can move over one entry at a time.
  • Anacreon's own index is on version 2.