Make agents finish THE THING.
Quick Start / The Thing / What It Does / Science / Details
English / 中文
Coding agents love code.
You want the thing.
Not a diff.
Not a status update.
Not "almost done."
The thing.
The PDF.
The website.
The report.
The chart pack.
The app demo.
goal-cli keeps the thing in the center.
It rebuilds the thing.
It checks the thing.
If the thing is not good enough, the agent gets another work pass.
Chat confidence does not count.
The thing does.
Paste one sentence into your coding agent.
Hi, read https://github.com/SiyaoZheng/GEZHI/blob/main/llms.txt and do what it says.
That is it.
The details live in llms.txt.
The agent reads them.
You judge the thing.
Different people.
Different things.
Same rule.
Name it.
Make the agent come back to it.
| Who | What they say |
|---|---|
| "Show me the PDF." | |
| "Show me the poster." | |
| "Does my app run?" | |
| "Do the numbers tie?" | |
| "Does the chart move?" |
One prompt.
One thing.
One heartbeat when the saved schedule says work is due.
| Move | What happens |
|---|---|
| Rebuild the thing. | |
| Check the thing. | |
| Change only allowed source files. | |
| Try again on the next heartbeat. |
The question is not:
"Did the agent change code?"
The question is:
"Is the thing better?"
| You care about | The agent must prove |
|---|---|
| A paper | The PDF is rebuilt and worth reading. |
| A website | The built page opens and looks right. |
| A report | The numbers and narrative are inspectable. |
| A chart pack | The exported charts are current. |
| A demo app | The app runs in the expected state. |
People are calling this loop engineering.
The hype says:
Do not write one perfect prompt.
Build a loop.
Make it run.
Make it check.
Make it try again.
goal-cli is that idea for normal people.
Every heartbeat asks:
Did the thing get better?
If yes, stop.
If no, change source and come back on the next due heartbeat.
Sources: Addy Osmani, LangChain, ADTMAG.
Technical Details
The setup file is goal.toml. It answers a few plain questions:
| Question | In goal.toml |
|---|---|
| What finished output should I inspect? | [artifact].path |
| How do I rebuild it? | [producer].command |
| How should it be checked? | [tik] |
| Which source files count as valid tok edits? | [tok].write_dirs |
| Where may runtime commands produce side effects? | [tok].runtime_write_dirs |
You may see these short names in the config and deeper docs:
| Name | Plain meaning |
|---|---|
artifact |
The finished output you can inspect. |
producer |
The command that rebuilds that output. |
tik |
The reviewer that rejects weak output. |
tok |
The coding agent that changes source files under the audited source scope. |
.goal/ |
The folder where runs, reviews, and state are recorded. |
Example:
name = "paper-ready"
state_dir = ".goal"
runs_dir = ".goal/runs"
[artifact]
path = "outputs/writing/full_paper.pdf"
copy_as = "full_paper.pdf"
[producer]
command = "python3 scripts/orchestrator.py --full"
[tik]
provider = "codex_file"
timeout_seconds = 1800
max_file_size_bytes = 25000000
max_output_tokens = 4096
[tok]
provider = "codex_goal"
write_dirs = ["src", "data"]
run_cwd = "."
runtime_write_dirs = ["outputs", "build", "logs"]
sandbox = "workspace-write"
codex_features = ["goals"]
[safety]
generated_dirs = ["outputs", "build", "logs"]
max_blocker_repeats = 3To run several reviewers at once, move provider-specific fields into
[[tik.providers]]. The heartbeat runs them in parallel and hands tok one
aggregate tik.md containing every provider result.
[tik]
timeout_seconds = 1800
[[tik.providers]]
label = "codex"
provider = "codex_file"
[[tik.providers]]
label = "claude"
provider = "claude_code_file"
[[tik.providers]]
label = "checklist"
provider = "checklist"
command = "python3 scripts/checklist_review.py"Use codex_app_server instead of codex_goal when tok should drive Codex
through codex app-server --stdio rather than codex exec. Swap
codex_file for claude_code_file and codex_goal for claude_code_goal to
run the same loop through Claude Code instead of Codex;
examples/scientificity-claude/goal.toml
is the all-Claude version of this setup.
Use checklist for command-backed checklist reviews that should appear as
their own tik provider in ledgers and state.
The important boundary is simple: the fixing agent edits source, but the final result has to be rebuilt and checked before the work counts as done.
Perpetual mode is explicit opt-in. It keeps one fixed substantive goal alive through bounded heartbeats, sleeps when the artifact is healthy, and applies model or producer changes only through an exact file-operation lease:
[perpetual]
enabled = true
substantive_goal = "Resolve the fixed substantive objections in the paper."
[lease]
version = "paper-v1"
allow_shell = true
allow_network = false
[[lease.rules]]
effect = "allow"
operations = ["create", "modify", "delete", "rename"]
paths = ["manuscript/**", "analysis/**"]
[[lease.rules]]
effect = "allow"
operations = ["create", "modify"]
paths = ["output/paper.pdf"]Healthy inspection defaults to 6 hours, active or blocked work to 30 minutes,
and provider failures to 5 minutes, 30 minutes, then 2 hours capped. The OS
timer wakes every 5 minutes by default for perpetual goals, but next_due_at
short-circuits work that is not due. goal-cli state shows the immutable goal
binding, bounded attempt evidence, and transaction recovery journal. Use
goal-cli stop and goal-cli resume for durable operator control without
terminal completion. See the
full perpetual and lease schema.
If you are working inside the goal-cli repository itself:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -e '.[openai]'
goal-cli --helpUse the basic install without OpenAI support when you only need local checks:
python3 -m pip install -e .| Command | What it does |
|---|---|
goal-cli init |
Create a starter goal.toml. |
goal-cli validate |
Check that the config is shaped correctly. |
goal-cli doctor |
Check whether the local setup is ready to run. |
goal-cli run --dry-run |
Render the prompts and run folder without calling repair agents. |
goal-cli run --max-minutes 600 |
Run one bounded work pass. |
goal-cli heartbeat install --max-minutes 600 |
Install a per-user OS timer; perpetual goals default to a five-minute wake-up. |
goal-cli heartbeat status |
Show the OS timer status and managed paths. |
goal-cli stop / goal-cli resume |
Persistently stop or resume a perpetual goal without completing it. |
goal-cli tik |
Rebuild and review the output without running a repair pass. |
goal-cli state |
Show the current saved state. |
goal-cli cleanup |
Clear stale locks after an interrupted run. |
goal-cli reset |
Remove saved state while keeping run records. |
If your coding agent supports skills, install the setup skill:
mkdir -p "$HOME/.codex/skills"
cp -R skills/goal-cli-project-setup "$HOME/.codex/skills/"Use goal-cli-project-setup for real
projects. Use
goal-cli-template-author only when
you are improving reusable examples or docs in this repository.
| Document | Use it when |
|---|---|
| Installing goal-cli | You need more install details. |
| CLI reference | You want the full command help. |
| goal.toml schema | You are editing config by hand. |
| goal-cli Skills | You want agent-facing setup instructions. |
| Thing-first notes | You want the design rationale. |
| Codex implementation report | You want the Codex /goal integration details. |
| PDF-first example | You want a research-paper example. |
| PDF-first example, Claude Code | You want the same example with both passes run by Claude Code. |
goal-cli is early local tooling, currently version 0.1.0.
The project is distributed under the MIT License. See SECURITY.md for vulnerability reporting and CHANGELOG.md for release notes.

