An engineering practice for Codex and Claude Code

Your agents forget.
Your repo won't.

greenline makes your coding agent ask before it edits, write down every change and show its work.

The second line puts greenline on your PATH, where the git hooks run it; without it they let every commit through.

  • Free and open source, MIT
  • Works offline, no account
  • Any Git repository
  • Node 22 or newer
  • Version 0.2.1

127.0.0.1:7433/changes/2026-10-30-saved-views

A change at frame waiting on its owner: the banner asks the open question with the proposed answer as a tile to copy, above the questions already answered.A change at frame waiting on its owner: the banner asks the open question with the proposed answer as a tile to copy, above the questions already answered.
Captured from greenline inspect 0.2.1 on the sample workspace.

01 The modes and the line

It asks before it edits.

A mode is how sure a change must be: quick, regular or careful. Before it touches a file, the agent proposes one with its cost in agents, says why, and waits for your yes.

The steps, the wait and where the work goes

The steps

Every change runs the same eight steps in order: frame, design, plan, anticipate, build, review, verify and close. The mode sets how deep each one goes: skipped, done in one line by the agent at work, written up as its own section, or handed to a fresh agent that sees the plan but never the builder's reasoning. design runs only when a change touches a page or a screen.

When it does not wait

Name the mode in your request, "fix this in quick", and the agent states it and starts. A proceed setting can let it go ahead at the modes you allow; by default it allows none. "Go ahead" is not a yes: the agent still proposes and waits. For secrets, security, a data migration, concurrency, a public contract or behaviour no check could catch, it proposes careful. Your choice is final, and the record says who made it.

Where the work goes

On a repository with a remote, the agent proposes a branch of its own, or a worktree. Every commit names the change and the agent that made it. It pushes, opens a pull request or merges only on your words.

Read the guide: The pipeline

line.json · greenline 0.2.1

  1. frameinlinewrittenwritten
  2. designinlinewrittenindependent 1 agent
  3. planinlinewrittenwritten
  4. anticipateskippedskippedindependent 1 agent
  5. buildinlinewrittenwritten
  6. reviewskippedindependent 1 agentindependent 2 agents
  7. verifyinlinewrittenindependent 1 agent
  8. closeinlinewrittenwritten

How deep a step runs

none
skipped, its section says so
inline
one line, by the working agent
written
a section, by the working agent
independent
a report, by a fresh agent
How deep each step runs in each mode
Stepquickregularcareful
frameinlinewrittenwritten
designinlinewrittenindependent, 1 agent
planinlinewrittenwritten
anticipateskippedskippedindependent, 1 agent
buildinlinewrittenwritten
reviewskippedindependent, 1 agentindependent, 2 agents
verifyinlinewrittenindependent, 1 agent
closeinlinewrittenwritten
Drawn from the line greenline 0.2.1 ships. By default, nothing moves until you answer the proposal.

02 The change record

It writes every change down.

Every change leaves one record: a Markdown file in your repository, opened before the first edit, with a section for each step. If a session dies, the next one reads the record and picks up where it stopped.

What a record holds

Checks run through greenline check, which records the command, the result and the commit, never the output. Every commit carries the change's id, so git log leads back to the record. Lasting decisions go into a decisions book the next agent reads before it reopens one, and the inspector shows it in its Knowledge place.

.greenline/ledger/2026-10-08-retry-deadline.md

---
mode: regular
choice: accepted
yes: "Yes, go ahead."
why: "Keep the caller's deadline across retries."
floors: none
state: done
next: none
ground: branch
agent: claude-code/opus
interface: no
skills: [frame, plan, build, tdd, review, verify, close]
agents: 2
rounds: 1
starts: ["review 1"]
outcome: "Each retry now stops at the caller's deadline."
reviewed: independent
---

An example change record, for the change on the guide's pipeline page; no workspace holds it.

While a change is stopped, this line names the step reached and the action that resumes it. A finished change, like this one, says none.

frame

Retries reset the deadline; the caller's deadline must hold for the whole call.

design

none, no interface

plan

Carry the deadline in the retry context and stop retrying once it passes.

anticipate

none at regular

build

The context now holds the deadline; a test covers three retries.

review

FindingSeverityWhat was done
The last retry could start after the deadline.majorFixed: each attempt checks the time first.

At regular, a fresh agent does the review. This section links its report and says what was done about each finding.

verify

The suite passed on the final code through greenline check: the three-retry test and the two-second deadline test pass, and no other test changed.

greenline check records each check's command, commit and outcome beside the record. No output is stored.

close

Done in two commits, each with the trailer Greenline-Change: 2026-10-08-retry-deadline. One fix round was used.

The example record greenline 0.2.1 exports for the change on the pipeline guide's page, in the skeleton a regular change installs.

Read the guide: The change record

127.0.0.1:7433/changes/2026-10-27-status-index

A careful change, done: its head with the mode, the agents and the floor, the line of what landed, and the card of what changed, was checked and was decided.A careful change, done: its head with the mode, the agents and the floor, the line of what landed, and the card of what changed, was checked and was decided.
Captured from greenline inspect 0.2.1 on the sample workspace.

03 The inspector

It shows its work.

Run greenline inspect and your repository opens as a local app in your browser. The desk says what the agent is doing and what waits on you. Every change has a page: your decisions, the diff, each check.

The five places, and what the app never does

Five places sit in its bar: Desk, Changes, Interface, Knowledge and Practice.

Desk
what is moving, what waits on you and what changed since you last looked.
Changes
every change with its page, the plans and the discussions.
Interface
your app's pages, their captures and your marks.
Knowledge
the decisions book, the house rulings, the glossary and the map.
Practice
greenline's health here, the skills and what each loaded, and the settings.

The page copies your answer for you to paste into your session; it writes nothing. It reads the repository as it stands and contacts no service, and it fits a phone with no sideways scrolling.

Read the guide: The inspector

Desk

127.0.0.1:7433/

The desk of greenline inspect: two changes wait on their owner, one with the answer the agent proposes as a tile, above the last changes closed.The desk of greenline inspect: two changes wait on their owner, one with the answer the agent proposes as a tile, above the last changes closed.
Captured from greenline inspect 0.2.1 on the sample workspace.

Changes

127.0.0.1:7433/changes

The changes list: the two waiting on their owner first, then the finished ones by the day they closed, each with its size, its files and its lines.The changes list: the two waiting on their owner first, then the finished ones by the day they closed, each with its size, its files and its lines.
Captured from greenline inspect 0.2.1 on the sample workspace.

Interface

127.0.0.1:7433/interface/notes

The owner's notes on the captured pages: a mark on the New issue button, answered, its capture before and after side by side, closed on the owner's word.The owner's notes on the captured pages: a mark on the New issue button, answered, its capture before and after side by side, closed on the owner's word.
Captured from greenline inspect 0.2.1 on the sample workspace.

Knowledge

127.0.0.1:7433/knowledge/decisions

The decisions book read in the Knowledge place: the toolchain, the tracker's settled choices and the interface rulings, with the root statement as a card.The decisions book read in the Knowledge place: the toolchain, the tracker's settled choices and the interface rulings, with the root statement as a card.
Captured from greenline inspect 0.2.1 on the sample workspace.

Practice

127.0.0.1:7433/practice/roster

The roster in the Practice place: the steps, the starts and the habits, each skill with what it is for and how often the changes loaded it.The roster in the Practice place: the steps, the starts and the habits, each skill with what it is for and how often the changes loaded it.
Captured from greenline inspect 0.2.1 on the sample workspace.

04 The index

Everything else it does.

One tile for each part of greenline, in the order it acts in a change's life. Open one to see it.

Before a change

Think before it is work.

Explore an idea with the agent without writing code, kept as a record of its own.

127.0.0.1:7433/discussions/2026-10-29-offline-mode

A discussion explored before any work: its idea, its state, the questions answered, the one still open and the research it drew on.A discussion explored before any work: its idea, its state, the questions answered, the one still open and the research it drew on.
Captured from greenline inspect 0.2.1 on the sample workspace.

A discussion moves from state to state only on your words, and it never becomes code by itself. When it settles, you promote it into one change or several, each with its own proposal and its own record.

Read the guide: Discussions

At frame

It reads before it asks.

Before it asks anything, the agent reads the code your request touches and names those files.

127.0.0.1:7433/changes/2026-10-30-saved-views

A change at frame waiting on its owner: the banner asks the open question with the proposed answer as a tile to copy, above the questions already answered.A change at frame waiting on its owner: the banner asks the open question with the proposed answer as a tile to copy, above the questions already answered.
Captured from greenline inspect 0.2.1 on the sample workspace.

It opens only the subjects your request touches and settles purpose and scope in the first round. Where your harness shows question cards, the questions arrive as cards; elsewhere each question is numbered in the reply, the recommended answer first. A change waiting on you shows its question in the inspector, the proposed answer as a tile you can copy.

Read the guide: The pipeline

At design

Pick the look you can see.

When a change touches a page, the agent shows three directions to pick from, each drawn on a page.

127.0.0.1:7433/changes/2026-10-30-sign-up-page/deal?register=site&job=sign-up&tone=calm&material=copy&seed=1876087347

Three design directions dealt for a sign-up page, each drawn on a sample page, with a button to pick one.Three design directions dealt for a sign-up page, each drawn on a sample page, with a button to pick one.
Captured from greenline inspect 0.2.1 on the sample workspace.

It settles how the page looks before the plan. At verify each page the change touched is read in a browser at 1440, 768 and 390 pixels wide, and a floor finding holds the close until you rule on it. The checks in a browser need a Chrome or Chromium you already have; without one, the floor is checked in code alone.

Read the guide: The interface practice

At every commit

Git holds the record's promises.

greenline's git hooks refuse a commit that no open change record allows, and say why.

$ git commit

no change is open on <branch>, so nothing is committed there yet; open the change's record under .greenline/ledger/ first, once the owner has said yes
The pre-commit hook's refusal while no change is open, in the words the pipeline guide quotes.

They also refuse a change set done while a check is red, and a push, a merge or a rewrite your words in the record have not cleared. On Claude Code, and on Codex once you trust the project, a command that throws work away is refused before it runs. Each refusal says what stopped and how to go on. Git's own --no-verify still gets past the hooks, and greenline status reports what it let through.

Read the guide: The pipeline

At verify

Point at what is wrong.

Click an element on a captured page, or draw round it, and say what you want.

127.0.0.1:7433/interface/notes

The owner's notes on the captured pages: a mark on the New issue button, answered, its capture before and after side by side, closed on the owner's word.The owner's notes on the captured pages: a mark on the New issue button, answered, its capture before and after side by side, closed on the owner's word.
Captured from greenline inspect 0.2.1 on the sample workspace.

The agent fixes it by that element and shows you the page before and after, and the mark closes only when you say so. The inspector's Interface place keeps every mark with its captures.

Read the guide: Marks

At any step

It draws when words are not enough.

A small picture in the reply where a shape explains better, and a lasting one kept when you ask.

127.0.0.1:7433/knowledge/map

The repository's map in the Knowledge place: the web app over the server and its store, each with its files and its journeys, both fresh.The repository's map in the Knowledge place: the web app over the server and its store, each with its files and its journeys, both fresh.
Captured from greenline inspect 0.2.1 on the sample workspace.

A lasting picture says how stale it is, counted in commits. The map of your repository, its subsystems and the journeys through them, sits in the inspector's Knowledge place.

Read the guide: The pictures

At every step

Methods, with their sources shown.

47 skills in three kinds: steps, starts the agent picks from how a request begins, and habits.

127.0.0.1:7433/practice/roster

The roster in the Practice place: the steps, the starts and the habits, each skill with what it is for and how often the changes loaded it.The roster in the Practice place: the steps, the starts and the habits, each skill with what it is for and how often the changes loaded it.
Captured from greenline inspect 0.2.1 on the sample workspace.

A habit loads when its situation comes up: a test being written, a key in reach. Every sentence a skill takes from a source is accounted for, with the reason for every change, on the skill's own page. The inspector's Practice place shows which skills each change loaded.

See every skill and where it came from

Read the guide: The skills

In every session

Codex and Claude Code, one practice.

Both read the same skills and write the same record; eight more harnesses get the hooks.
example session, greenline 0.1.0
$ cd ~/tracker
$ npx greenline init
Workspace initialized. ok
Youthe sidebar says "1 issues". fix the plural
ClaudeA one-line fix with nothing left to decide, so I'd run it in quick mode: 1 agent, 0 fix rounds, no review. Nothing in it calls for more care, though I can start a second agent if you'd rather have regular. I'll wait for your answer.
Youyes
+ .greenline/ledger/2026-10-09-issue-plural.md mode: quick (accepted)
ClaudeFrame: the label says "1 issues" when the count is one. Only that label changes.
ClaudePlan: pick the noun from the count, and test 0, 1 and 2.
ClaudeBuild: the label now picks "issue" or "issues", with a test for 0, 1 and 2.
ClaudeVerify: I ran the test through greenline check. It fails without the fix and passes with it.
ClaudeClose: the record holds all five steps that quick runs, and the commit carries the record's id.
$ greenline status --change 2026-10-09-issue-plural
greenline status
change 2026-10-09-issue-plural (.greenline/ledger/2026-10-09-issue-plural.md)
mode: quick (accepted)
why: The sidebar says 1 issues when the count is one.
state: done
next: none
step reached: none
review depth: none
cost: 1 agent, 0 rounds
1 commit, 2 files
e6b337257c69
files: label.js, label.test.mjs
checks:
node label.test.mjs (step verify): passed, exit 0, started 2026-10-10T04:38:05.179Z, latest of 2 runs
ran on the final code
findings: 0; notices: 0
ok
Two example sessions of greenline 0.1.0, written out by hand at that release. Codex and Claude Code follow the same steps and write the same kind of record; the record stays in your repo. Sessions of the current release take their place once its runs supply them.

Questions come as cards where the harness shows them, and in the reply where it does not. On Codex the project's event hooks run once you trust the project; git's hooks hold either way. The sessions here rest whole; press replay to watch one typed.

Read the guide: The pipeline

When you enable it

Engineering knowledge, if you want it.

garden is a separate Fernworks product; greenline reaches it only through a connector that stays off until you enable it.

127.0.0.1:7433/practice/receipts

A garden consultation's receipt: the publication it read and each call's operation, outcome and units, never the text it received.A garden consultation's receipt: the publication it read and each call's operation, outcome and units, never the text it received.
Captured from greenline inspect 0.2.1 on the sample workspace.

A consultation reads one publication for its whole request, and its receipt records what the request received, never what was applied. Without garden, greenline works offline with its installed skills.

Read the guide: The garden connector

Built in the open.

Questions before you run it

What does greenline install?

One command writes instructions into AGENTS.md and CLAUDE.md, skills into your harness's folders, and git hooks under .greenline/. Your own text outside greenline's markers stays unchanged. You keep your editor and your agent. For the hooks to run, install it on your PATH too: npm install --global greenline. On Codex, the project's event hooks run once you trust the project; git's hooks hold either way.

Will it slow me down?

Yes, on purpose. A project with a second day and a second contributor, where being careful is the point, is its case. The practice costs agent time: by default every change waits for your yes, runs its steps and is written down. What that buys is a repository a teammate can clone and pick up, with every change's reason and every check on record. A toy built in an afternoon is not its case; there the cost buys little.

Does any of my code leave my machine?

No code or repository policy is uploaded. Your agent still talks to its own model, as it does today, and greenline adds no telemetry. The agent reads the web itself where a fact needs it and names its source. At careful, a question that needs a reading of its own may be proposed as research; only on your yes does a fresh agent read papers, the web or other projects' code for it, and it calls services anonymously and copies no code. garden's connector sends labels for what a question needs, never your code. Without it, skills work locally.

What happens when the session dies?

Nothing written down is lost: the change's record is in your repository, and its "next" line says where to pick up. Ask a fresh session "what were we doing?" and it reads the open records, then tells you where each change stands and what comes next. Or run greenline status to see the same thing yourself.

Start in your repository.

Run it in any Git repository. It needs no account, no key and no service, and the same skills serve Codex and Claude Code.

The git hooks run greenline from your PATH, which the second line puts it on. Then open the quickstart.