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.
Read the quickstart See a session Source on GitHub
- Free and open source, MIT
- Works offline, no account
- Any Git repository
- Node 22 or newer
- Version 0.2.1


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.
Show depths for
- frameinlinewrittenwritten
- designinlinewrittenindependent 1 agent
- planinlinewrittenwritten
- anticipateskippedskippedindependent 1 agent
- buildinlinewrittenwritten
- reviewskippedindependent 1 agentindependent 2 agents
- verifyinlinewrittenindependent 1 agent
- 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
| Step | quick | regular | careful |
|---|---|---|---|
| frame | inline | written | written |
| design | inline | written | independent, 1 agent |
| plan | inline | written | written |
| anticipate | skipped | skipped | independent, 1 agent |
| build | inline | written | written |
| review | skipped | independent, 1 agent | independent, 2 agents |
| verify | inline | written | independent, 1 agent |
| close | inline | written | written |
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.
--- 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
[review](2026-10-08-retry-deadline/review-1.md)
| Finding | Severity | What was done |
|---|---|---|
| The last retry could start after the deadline. | major | Fixed: 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.


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.
Desk


greenline inspect 0.2.1 on the sample workspace.Changes


greenline inspect 0.2.1 on the sample workspace.Interface


greenline inspect 0.2.1 on the sample workspace.Knowledge


greenline inspect 0.2.1 on the sample workspace.Practice


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 changeThink before it is work.
Explore an idea with the agent without writing code, kept as a record of its own.


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.
At frameIt reads before it asks.
Before it asks anything, the agent reads the code your request touches and names those files.


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.
At designPick the look you can see.
When a change touches a page, the agent shows three directions to pick from, each drawn on a page.


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.
At every commitGit holds the record's promises.
greenline's git hooks refuse a commit that no open change record allows, and say why.
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
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.
At verifyPoint at what is wrong.
Click an element on a captured page, or draw round it, and say what you want.


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.
At any stepIt 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.


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.
At every stepMethods, with their sources shown.
47 skills in three kinds: steps, starts the agent picks from how a request begins, and habits.


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.
In every sessionCodex and Claude Code, one practice.
Both read the same skills and write the same record; eight more harnesses get the hooks.
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.
When you enable itEngineering 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.


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.
Built in the open.
- On your machine. It needs no account, no key and no service. No code or repository policy is uploaded, greenline adds no telemetry, and the garden connector stays off until you enable it.
- Its sources. greenline's 47 skills are the written methods your agent follows. 37 of them take their text from 17 open-source projects, and greenline credits 33 more it learned from. Every borrowed sentence is accounted for. See where each skill came from
- How it is tested. Every promise a git hook or a harness event holds is a test on a repository with real git, and the inspector's pages are read in a browser at three widths in both looks. Real sessions run before each release; their results stay in greenline's repository.
- Its own record. Each version's release notes, every skill's history, and the source on GitHub. No customers to quote yet. The proof on offer is the text and the record.
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.
Start
How a change runs
See the work
The edition











