Start · chosen once, from the situation a request begins in
state-machines
about 830 tokens
state-machines as it installs, every line written by greenline, with no upstream source.
- 2 files
- 0 edits
- 0 sentences left out
- 0 sources
- last changed 2026-11-07
The text
description: "Find the implicit state machines in the app: each flow whose states live in flags or status fields, drawn as a map. Use for \"find all of the implicit state machines in my app\", for states, transitions or a lifecycle the code never names, or when a record's flags contradict each other."
greenlineWhat the start finds and marks, and the page read firstAn implicit state machine is a flow whose states the code holds without naming them: a set of flags, a nullable field, a status string, an order the calls must come in. The start finds each one, names its states and its transitions, and marks the transitions no code names and the states no code means. It draws the map and changes no code; a fix the map suggests is a change of its own, under the mode the owner approves.
Before the first file is read, read [method.md](method.md): where the machines hide, how each one is read, and the map's form.
greenlineWhat the start consumes, produces and hands onConsumes: the request, and the code it names or the whole application
Produces: the map of the machines found, in the reply with no change open, and inside a change as .greenline/ledger/<id>/state-machines.md, which the record's start section cites
Next: frame, under the mode the owner approves, for a fix the map names; otherwise none, the map staying in the reply
SKILL.md as installed, byte for byte SHA-256 37096452d67d82821f76a84b67a7d7adf4ae694c33ed500d13afbb2f9b069ade
method.md
about 560 tokensgreenlineWhere implicit machines hide and what to search for- Flags that travel together on one record, `paid`, `refunded`, `cancelled`, where only some combinations are meant.
- A nullable field whose presence marks a stage, such as a shipped date or a cancellation reason.
- A status string or an enumeration compared in more than one place, each branch listing the values it handles.
- An order the calls must come in: a setup before a start, a callback that must run once, a close after every open.
- A retry, a timeout, a scheduled job or a webhook that moves a record when no user acts.
Search for the fields set in more than one place, the conditions over the same fields, the branches over a status, and the comments that say "must", "before", "after" or "only when".
greenlineHow one machine is read, and what the map marks1. Name it by the thing that changes: an order, a session, a subscription, a connection.
2. List its states as the data can hold them, every combination of its fields, and mark the ones the code means.
3. List each transition: the event that triggers it, its guard and the code that makes it, by file and function.
4. Mark what the map exists for: the states the data allows and no code means, the transitions two places make differently, and the transitions no code names, a state reached only because a flag was left set or a step was skipped.
Read the code each transition runs; a function's name is no evidence of what it does.
greenlineThe map's form, its risk order and each fix offered apartOne map for the application, one entry per machine, each drawn in the state form of the reply's pictures, within 72 columns and twelve nodes:
order: draft ──▶ placed ──▶ paid ──▶ shipped
cancelled cancelled (paid to cancelled: no code names it)
Under each picture, a table: the state or the transition, where the code holds it, whether the code names it, and what goes wrong there. Close the map with the machines in order of risk, the one whose unnamed transitions touch money, stored data, a public contract or who may act first. Offer each fix as a change of its own: a named type for the states, one function for the transitions, and a test for each unnamed transition, red first.
What greenline wrote
The full reason for every passage greenline wrote, in the order of the text.
SKILL.md:6 rename
The skill's title, its name.
SKILL.md:8 method
The start's opening: what an implicit state machine is, what the start finds and marks, and that it draws the map and changes no code. R1
SKILL.md:10 method
The owner's phrase, lifted as written: the words that open the start. R2
SKILL.md:12 method
What an implicit state machine is, what the start finds and marks, that it changes no code, and the method page read before the first file. R1
SKILL.md:16 method
The start's handoff: what it consumes, what it produces and where the work goes next. R1
method.md:1 rename
The method page's title.
method.md:3 method
Where the implicit machines hide in code, and what to search for. R1
method.md:13 method
How one machine is read: its name, its states, its transitions and the marks the map exists for. R1
method.md:24 method
The map's form: a state picture per machine, the table under it, the risk order and each fix as its own change. R1
The ledger entry
greenline's ledger logs how each skill was made and changed, with a reason for each entry.
2026-11-07 2026-11-07-state-machines-references-folded
The map's path folded into the handoff, the references page gone
The references page, which held only where the map lands, folds into the handoff's produces line, so the start installs one page fewer and the viewer's settings stay under their cap.
- Authorised by
- no ruling of its own
- Pages it touched
- SKILL.md, references/greenline.md
Rulings, R1 to R3
- the operator's words of 2026-11-07 on the phrasebook, "we should lift phrases as they are with minimal changes" and "my idea with the phrases is that we implement them in a way into greenline that do get loaded as primitive context": a phrase that demands an artefact enters as a start, its trigger the owner's phrase and its product the artefact
- the operator's words of 2026-11-07: we should lift phrases as they are with minimal changes
- the operator's words of 2026-11-07 on the phrasebook, "there are more such high quality phrases which i believe unlock quality of an llm" and "we should lift phrases as they are with minimal changes": each phrase placed by its type through the phrase mode, a start for an artefact and a sentence on a step's method page for a stance, every change to a phrase an edit recorded with its reason
3 earlier entries
2026-11-07 2026-11-07-state-machines-description-shortened
The description shortened so the settings page stays under its cap
Pages it touched: SKILL.md
2026-11-07 2026-11-07-state-machines-pointer-gist
The pointer's gist names the page read first
2026-11-07 2026-11-07-state-machines-enters
Adds the start state-machines from the operator's phrase
Pages it touched: SKILL.md, method.md, references/greenline.md