## docs · machine-rendered from the repo at every sync
How to use chug effectively — the quickstart and every runbook on one page, never stale: rendered from README.md and runbooks/ by scripts/site-sync.sh at every wrap.
on this page
## 01 · quickstart
The repo's own quickstart, verbatim from README.md — re-rendered at every sync.
One command installs the binary — platform detected, sha256 verified, no Rust toolchain, no sudo:
curl -fsSL https://chug.sh/install.sh | sh
Then, in a repo of yours (no clone of chug needed), start the continuous loop:
cd <your-repo> chug loop init # scaffold LOOP-SPEC.md + TODO.md + .chug/ (idempotent; --force backs up) chug loop run # exec the loop supervisor against THIS repo
Wire up a model provider with --profile <name> at install time — the profile exports the provider contract (base URL, key, per-phase models); see docs/install-profiles.md. Zero setup also works if you have Claude Code configured: chug reads ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN / ANTHROPIC_API_KEY from ~/.claude/settings.json when the process env doesn't have them (process env always wins; default base URL is api.anthropic.com).
Single runs need no scaffolding: chug run takes a spec file with a check: line plus a goal and drives a fixed loop until the check exits 0.
chug run --spec SPEC.md --goal "Build X and make the check pass" \ --model claude-sonnet-4-6 --max-iters 40 --max-minutes 120 # --model takes any name your provider resolves; provider-specific ids # belong in a profile — see docs/install-profiles.md chug run --tui ... # same, with the live dashboard chug run --resume # continue an aborted run from .chug/transcript.jsonl chug run --auto-spec --validate # force FULL adversarial validation on this run (T189) chug run --auto-spec --no-validate # force the gates-only lane (operator override, recorded) chug chat # interactive mode (TUI) chug ledger # print current LEDGER.md chug capabilities # print the capability contract — features + versions this build supports (T339) chug daemon --status # the judge daemon's lifecycle; T340 also serves GET /status/loop + /status/items on its socket (observation only)
Put a check: <shell command> line in your spec — goal_complete is only accepted when the check exits 0. The check (like every shell chug spawns) runs with CARGO_TARGET_DIR/CARGO_BUILD_TARGET_DIR scrubbed from its environment, so a bare cargo test builds the run cwd's own target/ — set the variable inside the check: line itself if you want a shared build cache (an explicit choice, never an inheritance accident).
No spec yet? chug run --goal "Fix the flaky login test" --auto-spec (or chug quick) drafts one for you: one read-only model call (plan mode's loop) writes .chug/auto-spec.md — concern, requirements, tests, acceptance, plus the check: and estimate: lines — and the draft's check is dry-run executed before the run starts. A check that can't exit 0 on the current tree is refused and redrafted once; a second refusal aborts with the draft and the failing output, never a loosened check. In chat mode the same flow is /auto-spec <request> then /auto-spec-approve (the approve gate re-runs the dry-run; editing the check to something vacuous is refused). Auto-spec is for task-class work — chores, small features; adversarial and loop work keeps hand-written specs. Auto-spec'd runs default to the low-stakes validation lane (T189): per item, a mechanical predicate computed from the diff (no core-list file touched, ≤ ~150 changed lines, no new tool/command surface, no CI/check:-line change) routes gates-only — the kimi validation child is skipped, never the gates (build + clippy + the full suite in the worktree, byte-clean review, and the scope check stay required). --validate forces full adversarial validation; --no-validate forces the gates-only lane; either operator override is recorded.
## runbook · README.md
One-page recipes for the recurring chug uses. Each names when to reach for it, gives copy-pasteable commands (real flags; <goal> and <N> are the only slots), and states its expected wall-clock arc so you can budget. Pick the line that sounds like your situation:
## runbook · adversarial-review.md
Use when you want a second pair of eyes: correctness bugs in a snapshot or on a diff/commit — read-only work whose deliverable is a findings report. Arc: ~20–60 minutes. The reviewer is chug itself, or an external reviewer (the codex-review arc); intake is the same either way.
chug run --spec review-spec.md \ --goal "Source-level adversarial review per the spec: find correctness bugs; write findings-report.md; change nothing but that file" \ --model anthropic-system.ai.kimi-k3 --max-iters 40 --max-minutes 60
Run it in the repo or worktree under review. The review spec pins shape, not scope creep: requirement 1 = graded findings with file:line evidence; a non-negotiation = no edits outside the report; the check: gates the report's existence and structure:
check: test -f findings-report.md && grep -q '^## 1\.' findings-report.md estimate: ~1 changed line (the report)
Scope goes in the goal, concretely: "review HEAD", "review the last 3 commits", "review git diff main..HEAD". Start from a clean tree (or a dedicated worktree) so the nothing-else-changed constraint is auditable with git status afterwards.
The codex-review shape (reviews/CODEX-REVIEW-20260928.md is the worked example):
## 1. CORRECTNESS BUGS → ### HIGH — <title>.src/foo.rs:817-style references), a concrete Trigger (or interleaving), and a suggested test when the bug is testable.Triage before filing: drop duplicates and out-of-scope nits, keep correctness bugs and integrity gaps.
<finding> (<reviewer> review) — exactly how T140–T143 landed from the codex review (e.g. "goal_complete denial bypass (codex review)").specs/t<N>-<reviewer>-<slug>.md, with a check: line that pins the fix's test and an estimate: line.## runbook · feature.md
Use when the change is a real feature — behavior worth pinning with tests, a check gate, and adversarial validation. Arc: 1–2 h per item (implementation, validation, a fix-up round if needed).
Hand-written specs live in specs/t<N>-<slug>.md; T191's own is a worked example:
# T<N> — <one-line what> check: <command that exits 0 exactly when this work is verifiably done> estimate: ~<lines> changed lines ## Concern <why this exists> ## Requirements 1. ... ## Tests - <named behaviors that must pass> ## Out of scope - <explicitly not this item>
Gate rules: goal_complete is accepted only when the check: line exits 0 (it runs with CARGO_TARGET_DIR scrubbed from the env — set the variable inside the check line itself for a shared cache), and a spec on a todo TODO row carries estimate: ~N changed lines (T150).
chug run --spec specs/t<N>-<slug>.md \ --goal "Implement this item ONLY per the spec; commit in this worktree; \ you own LEDGER.md bookkeeping" \ --model anthropic-system.ai.kimi-k3 --max-iters 80 --max-minutes 120
The goal should say: which item ONLY, any env to export before cargo, and where to commit. The spec is re-read every iteration — you can sharpen it mid-run.
Core-logic items get adversarial validation — an independent run that re-derives requirements, re-runs gates, attacks with mutants. Handling:
--resume attempt on the same worktree (T63); a second death: finish by hand from LEDGER.md.## runbook · laya-hf-hosting.md
When to reach for this: you are hosting or consuming a laya judge fine-tune for an internal machine fleet — the daemon's risk-gate model. One-page contract here; the code pins are src/hf_hosting.rs, src/judge_model.rs, and tests/no_secret_spill.rs.
A PRIVATE repo in the org's HF org: org-membership-gated, machines pull via a read-scoped HF_TOKEN. NOT HF's "gated" feature (public + approval workflow — wrong tool). Three artifact classes, three postures:
| class | where | gating |
|---|---|---|
base laya (convaiinnovations/laya, Apache 2.0) | public, upstream | none — the chug default stays public so no public user hits an auth wall; mirroring to org/laya-base is OPTIONAL (availability pinning only) |
stop-completion judge (tampajohn/…, trained on the operator's personal Claude Code transcripts) | personal org today | migrating it to the org's HF org is the operator's IP call — flagged, not decided here |
F13 loop-decision fine-tunes (trained on chug decisions.jsonl) | org-private from day one | public-repo work is fine only while chug loops against public repos; against internal monorepos the logs encode internal structure/doctrine |
NO org-side work (repo creation, membership, Vault tokens) happens before this. Ranked from the 2026-10-02 analysis:
HF_ENDPOINT at the Artifactory repo URL). VERIFY first: Artifactory version + HF repo type enabled. If present, it displaces the HF org.Interim hosting (works today, no org steps): a LOCAL DIRECTORY (CHUG_LAYA_CHECKPOINT=<path>) or a PRIVATE tampajohn/* HF repo behind HF_TOKEN. New fine-tune repos are created PRIVATE at inception (contract below). The loop-side machinery in this runbook is required for the interim too — only the org steps wait.
The judge daemon (T204) resolves its checkpoint from CHUG_LAYA_CHECKPOINT:
# local dir (interim; T204 req 2) export CHUG_LAYA_CHECKPOINT="$HOME/models/laya/finetune/out" # hub repo, pinned revision — REQUIRED SHAPE for policy-affecting artifacts export CHUG_LAYA_CHECKPOINT="org/laya-stop-judge@9c6af39cdce45b570f0b7f8fad2b311c96019804" export HF_TOKEN="<read-scoped-token-with-access-to-the-repo>" # name only in this repo # non-huggingface.co hosts (Artifactory or any HF-compatible endpoint): export CHUG_HF_ENDPOINT="https://artifactory.example.com/hf" # wins export HF_ENDPOINT="https://artifactory.example.com/hf" # fallback
Verified against hf-hub 0.4.3 (do not trust the crate to do this): it reads NEITHER HF_TOKEN from the env (only ~/.cache/huggingface/token, huggingface-cli login) NOR HF_ENDPOINT via Api::new(). chug applies both itself (hf_hosting::build_hub_api): CHUG_HF_ENDPOINT > HF_ENDPOINT > https://huggingface.co; a non-empty HF_TOKEN overrides the cached token file. Default stays public — public chug never requires a token.
Auth failure is honest: a 401/403 from a private repo produces ONE stderr line naming the fix — set HF_TOKEN to a read-scoped token with access to <repo> (missing) or HF_TOKEN is set but was rejected: check scope/expiry/membership (insufficient) — plus one judge_checkpoint_auth_error note in .chug/events.jsonl, then the daemon dies, the client latches, and the loop continues fail-open (T190 shape). No retry storm: one fetch attempt, max_retries=0.
The supervisor loads ONE env file at startup and every cycle (orchestrator, delegate children, spawned judge daemon) inherits the exports:
$HOME/.chug/loopd.env # default; override with CHUG_LOOPD_ENV
Format: KEY=VALUE lines, # comments, optional export prefix and one pair of quotes. Values are LITERAL (no $() expansion — the file is parsed, never eval'd). ONLY three keys are applied — CHUG_LAYA_CHECKPOINT, HF_TOKEN, CHUG_HF_ENDPOINT — and only when the operator has not already exported them (explicit env wins). Rotation = edit the file + restart loopd (the T47 lesson: no env mutation inside the cycle loop).
Hygiene: the file lives OUTSIDE any repo (never committed), and its CONTENTS are never echoed or logged — loopd logs only the path and a skipped-line count. This is the hard rule from the operator's env-dump spill history; tests/no_secret_spill.rs pins the whole repo to the same rule (HF_TOKEN appears as a NAME, never a value).
Degrade: absent file → silent no-op (public base laya); unauthed daemon → the 401 line above + fail-open; the loop never stalls on the judge.
org/model@REV in every env file.org/laya-base is OPTIONAL (availability pinning only)..chug/*.json in git).Out of scope here: training/publishing the F13 fine-tunes (F13 phases), HF Enterprise/SSO, re-hosting base laya unless the mirror proves necessary.
## runbook · loop-ops.md
Use when you run the continuous self-improvement loop — start it, read its state, stop it, recover from a HALT, clean up worktrees. Arc: a daemon (cycles of ~1–4 h each); the ops commands below are seconds.
nohup ./loopd.sh > /dev/null 2>&1 & # start (detached; plain ./loopd.sh = foreground) ./loopd.sh routing # what the NEXT cycle would run: mode + orchestrator model (launches nothing) ./loopd.sh status # liveness + recent activity + last cycle tail ./loopd.sh stop # graceful: touches .chug/STOP-LOOP, exits after the current cycle
State lives in gitignored .chug/loopd/: loopd.pid, loopd.log (supervisor events — routing decisions, build gate, verdicts), cycle-<UTC-timestamp>.log (one per cycle; raw orchestrator and child output), and HALTED when it gave up.
Two triggers write .chug/loopd/HALTED and exit 1: 3 consecutive build failures (launching a stale binary is refused) and 3 consecutive cycles without goal complete.
cat .chug/loopd/HALTED # names the trigger + the last cycle log tail -30 .chug/loopd/loopd.log # the failures leading up to it cargo build --release # build trigger: fix the tree first grep -c "verdict: no goal complete" .chug/loopd/cycle-*.log # cycle trigger: read the last cycle log nohup ./loopd.sh > /dev/null 2>&1 & # restart — startup clears the HALTED marker
A restart re-runs the release build gate; a still-broken tree halts again after three tries, so fix before restarting.
Children work in /tmp/chug-loop-t<N> worktrees. git worktree remove deletes a worktree's untracked .chug/ silently — harvest first:
ls -d /tmp/chug-loop-t* # what exists cp /tmp/chug-loop-t<N>/.chug/events.jsonl .chug/events-t<N>-impl-$(date -u +%Y%m%d-%H%M%S).jsonl cp /tmp/chug-loop-t<N>/LEDGER.md .chug/LEDGER-t<N>-impl-$(date -u +%Y%m%d-%H%M%S).md git worktree remove /tmp/chug-loop-t<N> # then `git worktree prune` for stale rows LOOP_REAPER_DRY_RUN=1 scripts/orphan-reaper.sh # list leftover loop processes; kills nothing
The reaper also runs automatically before every cycle (SIGTERM only, fail-closed); LOOP_REAPER=0 opts out.
The risk gate's judge (CHUG_JUDGE=daemon, the default) is a host-scoped daemon: one per box, serving every run over ~/.chug/daemon.sock. On loop hosts it comes from the installed release binary — the release workflow builds --features daemon into ~/.local/bin/chug. The repo dev builds are CLIENTS ONLY (T204 keeps them feature-lean): their daemon subcommand is the fail-open stub, so never point the ensure at a repo build.
loopd.sh resolves the daemon binary ONCE per run (one startup line in .chug/loopd/loopd.log) and ensures it at every cycle start, best-effort:
$CHUG_DAEMON_BIN — explicit override (wins when executable);~/.local/bin/chug — when chug daemon --help exits 0 (a pre-T204 release refuses the subcommand: the dogfood upgrade hasn't landed — upgrade the install; loopd never self-upgrades);else the ensure is skipped for the whole run behind that one log line (fail-open: the judge client degrades per command exactly as it did when layad was down). LOOP_DAEMON_ENSURE=0 opts out entirely.
First run — pre-warm the weights (the pinned remedy, T215): the daemon loads the ~650 MB checkpoint BEFORE the socket binds, and the ensure's wait budget stays bounded, so a cold first load exceeds it: the first cycle runs fail-open while the detached daemon finishes downloading, and later cycles find it warm. To pay the download outside a cycle, pre-warm once:
~/.local/bin/chug daemon # foreground; Ctrl-C after "judge model warm"
The HF cache then serves every later spawn in seconds. chug daemon --status reports running/starting/absent; chug daemon --stop stops the lock holder. Diagnostics: ~/.chug/daemon.log.
## runbook · quick-task.md
Use when you have a single chore — a failing test, a missing helper, a rename — and don't want to write a spec by hand. Arc: ~5–20 minutes. Headless only (for interactive use, chug chat).
Before you start: the chug binary on PATH (cargo install --path . from a checkout), model credentials in the env (ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN, or the ~/.claude/settings.json fallback), and your shell sitting in the repo you want changed.
chug quick --goal "<goal>" --model anthropic-system.ai.kimi-k3 \ --max-iters 40 --max-minutes 60
What happens (T188): chug drafts the spec for you — one read-only plan session writes .chug/auto-spec.md (concern, requirements, tests, acceptance, check:, estimate:) — then dry-runs the draft's check: line. A check that can't pass on the current tree is refused and redrafted once; a second refusal aborts with the draft and the failing output. The check is never loosened to pass.
Budget flags (all optional; defaults 40 iters / 120 min / unlimited tokens): --max-iters 40 --max-minutes 60 --max-tokens 2000000 are all real values you can pass. Validation lane (T189): small diffs run gates-only by default — the adversarial-validation child is skipped, the gates are not. Override for this run: --validate forces full validation, --no-validate forces gates-only; either is recorded as an operator decision.
LEDGER.md — the model's external memory, ## Done / ## Next / ## Blockers; chug ledger prints it anytime..chug/transcript.jsonl — every message, append-only..chug/events.jsonl — the forensics surface, jq-mineable: jq -r '.type' .chug/events.jsonl | sort | uniq -cchug: goal complete block: summary: …, token cost, then the ledger dump). Exit 1 = budget or abort — stderr says chug: abort: <reason>, and stdout ends with a ready-to-paste resume: chug run … --resume hint. Exit 2 = stuck (repeated errors) — read the ledger and the transcript tail.Same directory, ONE resume attempt:
chug run --auto-spec --resume --goal "<goal>"
--resume reloads .chug/transcript.jsonl and continues where it died; with --auto-spec it reuses the existing draft, never redrafts. Note the command: quick has no --resume, so the resume path is run. If the resume also dies at budget, stop resuming — read LEDGER.md; the work is usually complete-but-uncommitted, so finish the last gate by hand and commit.
## runbook · repo-eval.md
Use when you want to know whether a loop harness can drive some other repository before committing one to it: build system, test gates, layout, and what would trip the harness up. This is the internal-monorepo pattern. Arc: ~30–90 minutes.
--cwd is the whole sandbox — every file/bash tool lands inside it — so the eval reads the external repo and writes its deliverable there, never touching your own checkout:
git clone --depth 1 https://github.com/owner/repo /tmp/eval-target chug run --spec eval-spec.md \ --goal "Evaluate this repo for loop-driven work per the spec; write CHUG-FEASIBILITY.md; change no file but it" \ --cwd /tmp/eval-target \ --model anthropic-system.ai.kimi-k3 --max-iters 40 --max-minutes 60
The eval spec is ~15 lines, written by hand in the repo that runs chug: requirement 1 = produce the deliverable; a non-negotiation = no writes outside it; tests = the deliverable names the build system, the test command, and measured gate cost. The check: gates the deliverable's existence and verdict line:
check: test -f CHUG-FEASIBILITY.md && grep -q '^verdict:' CHUG-FEASIBILITY.md estimate: ~1 changed line (the deliverable)
One file, first line machine-greppable:
verdict: FEASIBLE blockers: none # or the named gaps, each with evidence build: <command + observed wall-clock> test gate: <command + pass count + wall-clock> layout: <where things live, one screenful> risks: <what a loop would trip on — cold build times, flaky gates, ...>
FEASIBLE means a loop could run here with a sane cycle budget; NOT-FEASIBLE names the blockers precisely. Skim .chug/events.jsonl in the clone (jq -r '.type' .chug/events.jsonl | sort | uniq -c) to see where the eval's time actually went.
One loop per repo is the repo-level lever (the dashboard/internal-monorepo pattern): give the repo its own TODO.md, specs/, and ./loopd.sh — don't merge it into another repo's cycle.
## risk gate · docs/risk-gate.md
The question this page answers is the one every engineering-leadership review asks first: what stops it from doing something bad? The answer here is not a promise. It is an inventory of mechanisms that already run, each cited by the file, feature id, or gate name that implements it — follow any citation to its source; the repo is public. Where a mechanism has a known hole (a fail-open leg, a lane that skips review), the hole is named next to the citation, because the reviewer looking for it will find it anyway.
This file is the source of truth; scripts/site-sync.sh renders it as a section of the docs page at every sync (T331, the T241 docs-page pipeline), and the adopt page's safety FAQ (docs/adopt/faq.md) links that section.
What runs on loop-written code before it lands. The implementation child is launched with "keep cargo build and cargo test green" in its goal text (the META-SPEC.md §6 round-protocol template), and the gates below are then re-run independently — "never trust a claim of green without seeing it" (LOOP-SPEC.md step 3).
| Gate | Command | When |
|---|---|---|
| Full suite | cargo nextest run --release when cargo nextest is on PATH, else cargo test --release -- --test-threads=4 — the T82 gate runner, whose fallback is unconditional (nextest is a host tool, never a hard dependency) | every item's worktree (LOOP-SPEC.md step 3), again post-merge (step 5) |
| Lint | cargo clippy --all-targets --release -- -D warnings | beside the suite, never through it (LOOP-SPEC.md step 3) |
| Python battery | python3 -m unittest scripts/test_wrap_assert.py and python3 -m unittest scripts.test_todo_flip — the unittest batteries behind scripts/wrap_assert.py (T273) and scripts/todo_flip.py (T279) | each script's own check line; re-run beside the cargo gates on landing (the T289 row records "gates independently re-run python 56/56") |
| TODO row guard | cargo test --release --test todo_consistency | after every TODO.md edit (tests/todo_consistency.rs; the row-flip path itself goes through scripts/todo_flip.py, which asserts the row invariants before writing — the three-fire todo-flip census, LOOP-SPEC.md) |
| Docs-only floor | the same todo_consistency run, plus the affected pin file's tests | when the diff is *.md-only — the T80 classification is mechanical (git diff --name-only main...<branch> | grep -qvE '\.md$'), and any ambiguity defaults to full gates |
Two properties of the lint leg are load-bearing, not incidental:
nextest compiles cfg(test) code but never lints it, so a narrower clippy form lets test-only warnings through — the T176 semantics that define the bar (LOOP-SPEC.md step 3).--release (T78): the first build into a cold cache pays compile time, every later run is faster — the shared target dirs (T47/T52) amortize it.set -o pipefail; — a piped gate whose filter exits 0 reports green on a red guard (the c06a555 lesson, LOOP-SPEC.md's todo_consistency rule).scripts/site-sync.sh, which accepts only provably-full-suite shapes — an equal-operand N/N pair at or above the 500 floor, or a "full suite N unit" label adjacent to the number. The T238 rule exists because a mid-run census ("nextest 113/1402") was once published as if it were the suite total.TODO.md missing, .chug/loopd absent, or empty git log is one named error and exit 4, nothing written (the T217 letter, scripts/site-sync.sh). Fallback zeros are byte-identical to a genuinely empty repo's first run, so they are never published with real data's authority.tests/loop_spec_*.rs, tests/shared_target_dir.rs, tests/nextest_gate_runner.rs — so an edit that breaks a pinned clause goes red in the suite, not just in review (the T80 floor names them because that is the risk surface of a docs-only diff).The author model never validates its own work. Implementation children run on glm; validation children run on kimi — different model families (META-SPEC.md §6) — and a glm-orchestrated cycle still launches the kimi validator (the T81 family-independence rule, LOOP-SPEC.md step 4: "glm implements, so a glm-orchestrated cycle never lets glm validate glm").
META-SPEC.md §6 step 6): the validator child reviews the diff against the spec for correctness bugs, missing spec requirements, and weak tests, and must end with a typed verdict — VERDICT: PASS or VERDICT: FAIL plus a numbered findings list. It writes the verdict to .chug/verdict.md in its worktree BEFORE any wrap-up, so a budget death loses nothing (the T209 doctrine: a written verdict IS the verdict). PASS merges; FAIL feeds the findings into the fix-up child's goal verbatim.META-SPEC.md §6 goal text): the validator deliberately breaks the new code — flip a condition, drop a check, corrupt a value — and confirms the tests catch it, because "green tests that survive mutations are vacuous (round 1 shipped dead code with 245/245 green until mutations exposed it)". Mutants run in parallel throwaway worktrees, one role-keyed target dir per leg, capped at 3 in flight; serial stays the default when mutants touch overlapping files; the main worktree must be byte-clean before the verdict (T79, META-SPEC.md §6).LOOP-SPEC.md step 4). Mutation legs for RED-proofs are applied inside the worktree via bash, because the confined file tools would silently produce false survivors (LOOP-SPEC.md step 4)..chug/decisions.jsonl, classes validation-routing / validation-verdict — LOOP-SPEC.md step 4), and survivors kept as weak-test findings get named individually in the landing record (e.g. the T316 row: "6 mutants 4 killed, 2 low-impact survivors ... documented as weak-test findings").src/driver.rs, src/api.rs, src/tools.rs, src/events.rs, or the loop/spec doctrine. The low-stakes lane (T189) can skip the validator child — but the predicate is mechanical, computed from the diff and never the model's say-so: no core-list file, ≤ ~150 changed lines, no new tool/command surface, no CI or check: line change; any single flip forces full validation, and the lane skips the kimi child, never the gates (LOOP-SPEC.md step 4).Consequential actions pass typed verdicts before they execute — the Laya/Jev precedent (F13/F15):
bash command is classified destructive/risky/safe by a Laya judge before executing; destructive p≥0.5 is blocked with an error the model can see and route around; verdicts are logged to .chug/risk_verdicts.jsonl (README.md, ## Risk gate (--risk-gate); src/riskgate.rs). The hole, stated: the gate fails OPEN when the judge is down, and an allow destructive steering note disables it for the run — both pinned in that README section, which is why the policy layers below it exist..chug/permissions.json deny rules are evaluated in-process before every tool call: a rule match fails closed (it always denies), while a malformed rule is skipped with a warning (README.md, ## Permissions (.chug/permissions.json)). .chug/hooks.json PreToolUse hooks veto with [hook veto] — programmable, and therefore fail-open (README.md, ## Hooks (.chug/hooks.json)). Policy order is permissions → hooks → risk gate; a denied call never executes.scripts/judge-parity.sh) measured Laya against the kev-0.8b and openJev-verdict-2.0 challengers over golden fixtures and a decision-log holdout; the recorded verdict is "Laya stays" with the honest gaps named — kev is candle-blocked (T222) and openJev's id returns 401 — rather than a fabricated comparison.CHUG_JUDGE=daemon serves the same model over a 0600 unix socket at ~/.chug/daemon.sock — no TCP port, no network listener; filesystem permissions gate the policy surface (FEATURES.md F15, src/daemon.rs)..chug/decisions.jsonl — decision class, compact inputs, options considered, choice, model, confidence — with outcome labels backfilled from git (landed-clean / fixed-up / reverted). The triage layer (T259) records every would-be-launch classification the same way (class laya-triage, plus the backfilled outcome), so "the loop decided correctly" is a queryable corpus, not an anecdote.check: line — re-run by goal_complete verification — passes, never when a model claims done (src/driver.rs: "the spec's check: line still decides DONE"; LOOP-SPEC.md's check-line doctrine, including the T67 class: a spec check: line IS executable text and gets validated like code).The loop cannot spend unboundedly while idle. Three mechanisms, all supervisor-computed from git and .chug/loopd/loopd.log — never from an LLM's say-so (LOOP-SPEC.md):
TODO.md rows since the last evaluation, no child deaths, a bookkeeping-only delta (every commit an eval: commit touching nothing outside EVALUATION.md and TODO.md), and EVALUATION.md fresh (same UTC day). When all four hold it writes a one-line disposition and skips the cycle entirely — no LLM call. The disposition records the predicate inputs in .chug/loopd/loopd.log.empty_wrap_streak, loopd's git walk) for the supervisor's gate — and the cycle-118 divergence (machine read 4 vs TRUE 3) is the recorded reason both readings exist (LOOP-SPEC.md, "The empty-delta chain (T247)").TODO.md rows only on observed breakage, exactly one row each, zero on green, and MUST NOT file loop-tooling meta-work — "an empty backlog must make the loop nearly free; it must never make the loop invent meta-work" (LOOP-SPEC.md, "Dormant mode (T325)"; tests/loopd_dormant_mode.rs pins the battery).--max-iters 40 --max-minutes 35 (META-SPEC.md §6 step 4); validators at 60/50 — the LOOP-SPEC.md step-4 override, raised after 4 of 4 validator children died at budget in cycles 66–69. A wedge dies at budget, and the T237 backoff paces the skipped-eval chain. The T259 triage sits between the mechanical layer and System Two, fail-open to the T258 routing, with its one threshold (TRIAGE_HIGH 0.85) in one place in loopd.sh.The repo is public, and it has already failed this review once.
specs/t249-internal-info-lint.md records the derivation).tests/internal_info_lint.rs (T249) walks every tracked file (git ls-files) line by line against seven word-bounded pattern classes derived from that diff; any hit fails the suite, so the class cannot regrow through loop-authored content. The lint's own source composes its literals from pieces at runtime, so no tracked line carries a whole redaction literal. The site sync runs the same pattern classes over the composed adopt page before it may publish — a hit blocks the render and the previously published page rides (t249_scan in scripts/site-sync.sh, T329).tests/no_secret_spill.rs (T205 req 5) is the credential-side twin of the same doctrine.README.md, ## Risk gate (--risk-gate)). The cwd confinement of the file tools (README.md, "All file-tool paths are sandboxed to --cwd") and the deny-rule layer above are the structural bounds; the gate is one policy source among several.README.md sections cited above). The claim is not "nothing can fail"; it is that each failure mode is named, cited, and tested where this page says it is.## shipped · TODO.md done rows
Every item the loop has flipped done (359 items), newest first — auto-fed from TODO.md at every sync. The curated feature grid on the home page is the flagship list; this feed is the complete shipped record.
T364 · release workflow apt resilience: pin archive.ubuntu.com fallback + retry/backoff on DNS failure…T363 · T361 flush cut v0.26.0 but never pushed (local-only 9h, silent success claim) — flush must push +…T362 · orchestrator grind delegation: fixture/gate iteration to glm children; inline bash budget +…T361 · dormant release flush: tags must not wait on a dormant queue (release-only mechanical cycle when…T360 · OSC 7501 blocked leg: emission scans newest cycle-*.log for failure patterns (blocked+msg, clears on…T359 · loop verbose streaming: CHUG_LOOP_VERBOSE levels 0-3 (silent/compact/turn-detail/full-trace) for the…T357 · pin the site-sync cycles leg-2 subject anchor (eval: commits counted by SUBJECT only, never body)…T351 · README entry-path cleanup: install-first quickstart, chug loop leads continuous mode, generic model…T353 · profile contract: CHUG_LANGFUSE_PROJECT is a no-op (0 consumers) — remove + document per-lane…T358 · OSC 7501 emission in loopd-pilot.sh (the embedded supervisor spawned loops actually run) — T354…T356 · loop terminal heartbeat: compact live status lines on stdout (TTY-gated, same source string as the…T354 · loopd emits OSC 7501 status natively (TTY-gated, env-killable, blocked carries msg) — kills the…T350 · STATS cycles counter on durable source (cycle-*.log count, not rotating loopd.log lines) — site…T352 · chug update: self-update with version-floor protection + source-build fallback (T347-era) + opt-in…T355 · chug loop init/run --goal: seed the queue from the spawn goal (empty-queue spawns go uselessly…T349 · features list auto-feed: site renders shipped work from TODO done rows + F17-F23 backfill (grid is…T348 · install.sh: release-staleness detection (--allow-stale gate) + --with-daemon/--with-loopd launchd…T347 · release pipeline: every run since v0.17.28 cancelled; GitHub releases stuck at v0.17.27 — pilots…T346 · RED-proven guard: every loopd-spawning test harness pins CHUG_LOOPD_ENV/CHUG_PROFILE_ENV to ABSENT…T343 · usage events emitter + model-identity stamping (model_served distinct from requested; additive)T342 · session-status mod: typed status file per session for harnesses (no scraping); no-op when unwatchedT345 · chugd: wedged-listener degrade leg (t340 validator finding 2 — pin the 2s read bound)T341 · permission-broker hook pack: meta-harness as approver-of-record; opt-in install, fail-open <5ms…T340 · chugd typed status endpoints: status enum + blocked-reason + children enumeration (observation only)T339 · meta-harness capability contract: chug capabilities subcommand + versioned feature docT338 · README Tools headline enumeration gains `mcp_resource` — the 2026-W46 weekly cold-read audit's…T337 · wrap_assert T324 live-corpus smoke: the own-anchor probe over-reads T316-leg QUOTE mentions (the…T331 · risk-gate story page: gates + validators + decision gate + cost guardrails, written for a skeptical…T335 · goal-gate check extraction: parse_check_command's first-match-wins loses to markdown-wrapped prose…T334 · `chug loop` subcommand (init + run in ANY repo, no clone): scaffolds generic…T333 · the T324 battery's 3 stale live-corpus legs (the kept-full window advanced past the fixtures'…T332 · decision-model provider abstraction: proxy Jev alongside local Laya; pilot boxes need no daemonT330 · install.sh profiles: --profile contract for LLM-proxy config (company values ship out-of-band)T329 · chug.sh Adopt page: quickstart + mental model + first-feature walkthrough + FAQ (training content,…T326 · Ideation mode: dormant loop proposes outward-facing features to a Proposed lane; operator flips,…T327 · chug.sh cost dashboard: daily Langfuse spend in a COST region (tile + sparkline + 14-day table)T325 · Dormant mode: empty queue = cheap-exit always + weekly read-only audit eval; no manufactured…T324 · wrap_assert one-liner anchor skip-rule (the T316 extractor first-occurrence coverage gap) — the…T323 · wrap_assert fill eval-state-untracked leg (assert_fill_eval_state_untracked) — the cycle-1427…T322 · wrap_assert trim-streak leg: identity-check corpus scoping + boundary fixtures (the T321 validator's…T321 · wrap_assert trim-streak leg (assert_fill_trim_streak) — the carried-figure class's TWELFTH…T320 · rotation-filename citation compose-time ls-verification (the filename-ts-misquote family)T319 · wrap_assert fill enumeration count-word leg (the corridor-figure falsification class's FIFTH…T318 · T316 survivor fixture pair (the T316 kimi validator d1793798848-4's 2 low-impact survivors m1…T317 · wrap_assert fill trim-enumeration leg (the corridor-figure falsification class's FOURTH committed…T316 · wrap_assert Outcomes one-liner figure-audit leg (the corridor-figure falsification class's guard row…T315 · eval-delta.sh splice-check: accept the corpus-tail identity for the all-records carry-0 ring (the…T314 · scripts/scoped-find.sh — the canned scoped-find helper (the T293 6th-fire re-weigh LAND: the…T313 · LOOP-SPEC T311 paragraph narrates the pre-T312 opt-in marker shape (the eval-commit probed "when…T312 · the on-disk state-marker leg goes always-on + self-probing (the T306 composed-marker class's second…T311 · the fill pre-commit assert gains the on-disk state-schema leg (the 2515 false FACADE-GREEN class;…T310 · Fill-enumeration mechanical guard (wrap_assert enumeration leg) — the T272 false-at-write class's…T309 · Fill-datum mechanical guard (wrap_assert datum leg) — the corridor-figure falsification class's…T308 · eval-delta eval-commit marker: first-token extraction (prose-tolerant hash — the T304 drift-field…T307 · wrap_assert validate_state: state-drift first-token `none` leg (the facade refuses a drift field…T306 · wrap_assert validate_state: eval-commit probed-equality leg (the state-write call site passes the…T305 · wrap-corridor stream-datum helper (scripts/stream_datum.py — mechanical at-stamp datum generation;…T304 · eval-delta.sh state-drift verdict first-token compare (prose-tolerant none; the 2nd mis-flag…T303 · release-notes.sh caps the GitHub release body under the 125,000-char limit (per-subject truncation +…T302 · LOOP-SPEC wrap-corridor commit subjects stay eval:-prefixed (the wrap-fill subject-shape census's…T301 · LOOP-SPEC T258 names the supervisor's delta-anchor (newest EVALUATION.md-touching commit) — the…T300 · wrap-side handoff text quotes the eval body's committed figures (copy-don't-derive doctrine…T299 · LOOP-SPEC compose-time BSD/GNU portability rule (bsd-flag-compose family, the 2nd-fire trigger)T298 · wrap_assert ring-splice gate: refuse the zero-carry full-ring write (T192 one-prior-line-survives)T297 · META-META-SPEC probe-hygiene: name the PYTHON accessor-shape variant (python-probe-shape census, 4…T296 · loopd T259 park-discharge probes the corpus before appending (the double-discharge guard)T295 · wrap_assert validate_state facade — one-call state-write gate owning the surface conversionsT294 · F13 phase 2b round 2: the distillation re-measurement on the grown corpus (the GO lane's pull —…T293 · repo-root recursive-walk remedy: prune-first/scoped-probe doctrine + pin (the 300s-kill census's 5th…T292 · the T257-color exemption narrowed to stamped mechanical whole-stream reads (the pre-stamp-leg…T291 · fill-time value-channel clause joins the T282 paragraph (the name-from-memory class's 3rd fire…T290 · python read-shape inspect-first clause joins the T270/T273 paragraph (the class's 6th fire executes…T289 · wrap_assert learns ring-id uniqueness + position-aware ring-splice assert (the cycle-520 state-ring…T288 · wrap_assert learns probe-deriving, section-scoped count assertions (T270/T273 fire 4)T287 · eval-delta splice_verdict learns the ring's prepend convention (close the two-gate contradiction)T286 · probe hygiene: name the error-visible jq variant (META-META-SPEC clause extension)T285 · spec-quality bar: probe the pin surface before mandating needles (META-META-SPEC clause)T283 · eval-routing joins SEED_CLASSES in src/decisions.rs (schema names the class the convention already…T284 · probe hygiene: exit codes and accessor shapes (META-META-SPEC clause)T282 · Outcomes-entry figures probed at write time against their mechanical source (META-META-SPEC clause)T281 · corpus-count clause extends to wrap-side recordings: wc -l at that write, composed after the last…T280 · mut-e survivor pin: (e) one-physical-line assert non-\n splitlines boundary caseT279 · checked todo-flip helper: rebuild-from-cells structural flip (scripts/todo_flip.py + LOOP-SPEC…T278 · wrap_assert fill-phase shapes: window-scoped substitution count + bare-token scanT277 · wrap_assert call-shape ergonomics: mapping-accepting assert_fields_non_empty + signature cribsT275 · children-never-decision_log goal-template line (LOOP-SPEC step 2 + META-SPEC §6)T276 · release-count method id-list anchor + flip-subject hygiene (LOOP-SPEC COUNT METHOD clause)T274 · scripts/test_wrap_assert.py assert_byte_carry reorder fail-case pinT273 · scripts/wrap_assert.py probed-assertion helper + META-META-SPEC pointer clause (the T270 clause's…T272 · META-META-SPEC enumeration-by-flag clause: whole-stream failed-leg enumerations from the events own…T271 · META-META-SPEC deferred-equality clause: scope-or-re-probe for digest-final predictions in wrap textT270 · META-META-SPEC verification-helper clause: probe-then-assert-delta, never the hardcoded constantT268 · LOOP-SPEC eval-read-path pointer clause (name .chug/eval-delta.md + .chug/eval-state.md)T267 · LOOP-SPEC loopd-log pointer clause (name .chug/loopd/loopd.log)T266 · eval-state rewrite: structural self-check + LINE-ANCHORED splices clauseT269 · LOOP-SPEC release-count method clause: mechanical distinct flip-id count in tag..HEAD, never…T265 · eval-text corpus-count method clause: mechanical count + shell-derived arithmetic, never mental…T264 · Scoped-scan pointer: unscoped recursive walks die at the bash capT263 · loopd laya_backfill must mint a fresh id for the outcome record (never the triage id)T262 · README Continuous-mode: integrate T258 cheap-exit + T259 laya triage + fix build-cache countT261 · doctrine prune: triage records on disposition-change only, outcome backfills batch at wrap, README…T260 · eval prompt slimming: eval-state file + mechanical delta replaces the 1.7M-token full-corpus re-read…T259 · loopd Laya triage: judge daemon gates non-trip eval launches (confident-empty skips at $0, work…T258 · empty-eval cheap exit: mechanical predicate short-circuits the kimi stream (loopd writes the…T257 · LOOP-SPEC doctrine: a real-eval (TRIP) wrap's notes carry the trip stream's whole-stream iteration…T256 · T252 done-row notes lack a resolvable commit ref — site-sync timeline skips the entry (62 standing…T255 · LOOP-SPEC doctrine: final todo flips BEFORE goal_complete + completed-recovery cycle PROCEEDS, never…T254 · loopd test fixtures self-terminate: LOOPD_MAX_LOOPS honored by loopd.sh + exported by every fixture…T253 · Gate/guard doctrine names the profile: T242 known-warm profile-exact + --release on guard-floor and…T252 · load-fence composition test: guard the double-read race (goal-gate flake fix)T251 · LOOP-SPEC mutation-checkpoint ordering + read-first recovery rule (the ctx-edit casualty clauses)T250 · machine-codename class: operator rules the internal-info lint's one open scope boundaryT249 · internal-info lint: pattern-list scan of tracked files (org-identifying literals: org name, fleet…T248 · LOOP-SPEC Phase 3: the empty-delta token verbatim ONLY in a true disposition wrap subject +…T247 · LOOP-SPEC Phase 1: codify the empty-delta chain (disposition rule + eval-trip valve + human-counted…T246 · outcome-backfill audit at wrap: malformed-chain check + wrap audit step (2-cycle defect class)T245 · release reconcile-after-tag must MERGE never rebase (v0.17.4 orphaned)T244 · docs.html markdown renderer: pipe tables, lists, inline code (T241 inline-level gap)T242 · wrap gates: the cold-scale first cargo leg runs as a bounded background window (doctrine, SOLO)T243 · mcp_serve stub-spawn test: poll events.jsonl instead of point-asserting after argv.txtT241 · DOCS section on chug.sh: runbooks/ + README Quickstart rendered into the page at wrapT240 · RELEASE region on chug.sh: latest v* tag + date + top bullets, regenerated per wrapT239 · site-sync gate-count guard: pin the three surviving-mutant legs (runner-word, in-message…T238 · site-sync stats reads subset gate counts as the suite total (113 vs ~1500) — equal-operand + floor…T237 · loopd empty-cycle backoff: scale the cycle-OK sleep on consecutive empty-delta dispositions…T235 · Clippy-form gate-surface pin: orchestrator gates must run `cargo clippy --all-targets -- -D…T236 · loopd_orphan_reaper timing-fence reds under full-suite load (the fence class, not timeout bumps)T234 · delegate status goal latch is outcome-blind: terminal wake-set stale-latches on a goal-gate…T233 · Socket-teardown gate flakes: daemon UDS transient-success leg + mcp_http probe-retry exhaustionT232 · T225 real-clock timing pins flake under host load — synthetic-clock conversionT231 · LOOP-SPEC step 5 TODO-edit guard floor names the T57 main-dedicated target dir (doctrine, SOLO)T230 · ctx-edit trigger calibration: loopd orchestrator launch carries --ctx-warn-at-tokens 100000…T229 · Close the T225 validator's pin-strength findings (M7 fingerprint mtime-arm, BACKSTOP_FACTOR upper…T227 · LOOP-SPEC: the TODO.md-edit gate must not swallow a red guard through a pipe (doctrine, SOLO)T228 · META-META-SPEC: verify the indictment before filing a bug row (doctrine, SOLO)T226 · Close the T217+T215 validators' left-behind survivors (m4 git-log guard pin, daemon-probe…T225 · Progress-reset liveness fences for child-spawn test surfaces (delegate bin-tests + the three loopd…T224 · Close the T222 validator's pin-strength findings (m8 daemon kev-routing Dir arm, m9 AUROC…T220 · Kev parity bake-off: kev-0.8b in the daemon vs Laya over stop-judge goldens + decision-log holdout,…T223 · judge-parity bake-off RUN + verdict doc (T220 acceptance half)T222 · kev-0.8b loader + judge-parity harness (T220 code half)T221 · Close the T219 validator's actionable findings: parse_rfc3339 day-0 fail-open + age_sec value pin +…T219 · daemon /sessions registry: chug runs register TTL heartbeats on the 0600 socket — per-host…T218 · features_generate preserves card bodies forever — stale fragments never heal (F15 "http\" survived…T217 · site-sync fails CLOSED on unreadable repo inputs — a rogue sync with no repo access published…T213 · Close the T205 validator's 3 LOW survivors (token canary pin, loopd env-loader pin, retry-knob…T214 · Load-scaled liveness fences for the spawn-heavy loopd families (reaper + spoof_guard 30s verdict…T216 · site-sync: escaped pipes (escaped-pipe) in FEATURES.md cells break the awk field split — F15…T215 · daemon ensure spawns the stub: resolve daemon-capable binary (CHUG_DAEMON_BIN / installed release…T212 · delegate drift advisory reads the worktree spec copy (the T197 false-positive class)T210 · Launch-template placeholder guard: glm literalized <N> 4x in cycle-94 seg-3T209 · Dispatch-time spec-size gate: estimate re-check at dispatch + split by acceptance surface + T173…T205 · HF org hosting for laya checkpoints: org-gated laya checkpoint hosting (Artifactory HF repo…T211 · loopd_orphan_reaper Sandbox::new() scripts copy must filter to regular files (the __pycache__…T207 · Wrap-window doctrine: stop-dispatch 15 -> 30 iterations + ledger wrap-state note at the boundaryT208 · F13 phase 2b: first distillation experiment (measure-first — export -> train -> held-out accuracy…T206 · Deflake daemon tests under the libtest threaded harness (flock fork-inheritance race) — lock…T204 · baked-in Laya judge phase 1 (F15): `chug daemon` Rust inference server (candle, /judge over 0600…T203 · DEPENDENCIES.md: audited external-dependency inventory (9 crates, env-optional services, failure…T200 · F13 phase 2a-ii: scripts/decisions-export.sh — decisions joined with outcome labels to training…T199 · F13 phase 2a-i: outcome-choice enum at decision_log write time + scripts/decisions-audit.sh…T197 · delegate launch warns on CARGO_TARGET_DIR drift across spec check-line / goal export / env (74d3331…T202 · T192 completion: genuinely-free-turn budget leg (carried weak test) + digest ctx-edit fires…T201 · Validator verdict-first: VERDICT + findings land in .chug/verdict.md at decision time…T198 · loopd cycle budget --max-minutes 240→360 (cycle-88 died AT the 240 wall mid-arc; 3 of 6 delta…T196 · Impl-goal template bans tree-wide formatters (T188 fmt-noise class: 83 files +12.6k/-9.2k stripped…T195 · Gate source-touch guard: shared-dir gates rebind artifacts to the local checkout (T55-class closer,…T187 · META-SPEC bounded-gates alarm 600 → below-the-bash-cap rule (280 under the fleet 300)T192 · Live-context editing: model-edited .chug/LIVE_CTX.md with shrink gate + free compaction turns (F14…T186 · LOOP-SPEC step 5: harvest ALL worktree events segments + never remove a worktree while a child pid…T191 · runbooks/ directory: per-use-case operator runbooks (quick-task, feature, repo-eval, loop-ops,…T190 · completion notifications: .chug/notify.json (osascript or layad sink) for goal/abort/verdict/release…T189 · low-stakes validation lane: mechanical gates-only predicate for small diffs (no core file, <=150…T194 · fan-out phase 2: 3rd impl slot + 2nd validator slot (target-validate-a/b split), T161 cap amendmentT188 · auto-spec: chug drafts its own spec from a bare goal (--auto-spec, dry-run check validation,…T193 · site-sync in-flight classifier counts done TODO rows — F6/F12 stuck "in-flight" on chug.sh despite…T184 · Context-economy telemetry: cache tokens on iteration events + a Trim event + digest surfacing (F14…T185 · bash reader-grace discards already-read output when a grandchild holds the pipeT181 · bash tool description: BSD sed has no GNU ,+N range formT183 · delegate launch gains optional allowlisted env map (+ LOOP-SPEC adoption)T182 · decision_log validation errors always carry the full contractT180 · web_search tool (F12 phase 1: provider seam + DuckDuckGo HTML provider)T178 · loopd exports CHUG_BASH_TIMEOUT=300 for the whole fleetT179 · build.rs: worktree .git-file case rebuilds the crate on EVERY cargo callT176 · LOOP-SPEC impl goal template: clippy runs with -D warningsT175 · LOOP-SPEC: overlap dispatch re-keys the spec check-line target dirT171 · MCP resources+prompts legs over the HTTP transport (F11 1b-iii)T174 · Pin the resources/list error-reply message surface (T162 survivor)T170 · MCP prompts/list+get consume legs on stdio (F11 1b-ii)T177 · shell_segments &&& slice-panic in the todo_consistency lintT169 · mcp_resource tool: model-facing MCP resource list/read (F11 1b-i)T172 · Deflake the nextest-parallel load families (loopd harness + mcp_serve stub-spawn)T173 · LOOP-SPEC child budgets: impl max_minutes 35→50, validator 40→50T168 · decision_log tool description names its required fields (glm options/choice fumble)T167 · Orchestrator RED-proofs apply mutants in the worktree cwd, never the main tree (LOOP-SPEC sentence +…T166 · Eval template must carry forward ALL existing Outcomes sections (META-META sentence + pin)T165 · Pin the T129 weak-test survivors (M7 CLI plumbing flag-OFF, M8 launch-failure isError arm)T162 · MCP resources consume legs phase 1a (F11): resources/list+read on stdio + capability catalogT164 · Spec check-line lint: no --lib, no failure-masking pipes, no main-repo cd (+legacy sweep)T163 · Goal-gate check timeout vs real check walls (CHECK_TIMEOUT_SECS 600→1200 + check-wall doctrine)T160 · Pin the two T153 kimi weak-test survivors (needle --special row + escalation-effect pin)T158 · Harden spawn-failure-under-resource-pressure test family (invalidation seams)T159 · Bring the loopd_orphan_reaper family into the shared timing-lock domainT157 · F10 phase 3: MCP write verbs — chug_abort + chug_steer (operator consumer)T161 · Two-impl overlap (T44 extension: ≤2 children incl. 2 disjoint impls)T156 · T63 doctrine: name the complete+committed budget-death variantT155 · Pin the two T149 unpinned-text gaps (doctrine-pin breadth, tests-only)T153 · F10 phase 3a: chug_cancel MCP write leg (flag-gated)T154 · Split src/mcp_serve.rs test module (byte-identical move, T104/T109 class)T152 · loopd pre-cycle orphan-process reaper (fail-closed)T151 · Serialize/isolate default-parallelism load-flake test families (mechanism, not timeouts)T150 · Pin: every todo-status TODO row's spec carries an estimate lineT149 · Validator child budgets 50/30 to 60/40 (LOOP-SPEC doctrine)T148 · chug_launch wire e2e over real stdio (T129 descoped follow-up, kills M7+M8)T147 · Pin the four carried validator weak-pin survivors (tests-only)T146 · F2 phase 2a: chug run --approve plan.md gate + web_fetch in plan mode (ROADMAP PULL)T145 · update_ledger writes through fsatomic::write_atomic (completes T136 crash-safety class)T144 · Goal-gate check + driver-spawned shells must not inherit CARGO_TARGET_DIR (cross-worktree…T131 · eval-digest reader staleness check excludes the reader's own live streamT129 · F10 phase 2b: chug_launch MCP write leg, flag-gated by mcp-serve --allow-launch (default-deny)T139 · Editable spec check: bypasses bash deny + risk gate (codex review §2)T143 · max_tokens too small for thinking models (GLM truncation class)T138 · mcp.json executes before permission enforcement (codex review §2)T137 · loopd launches stale binary after failed build (codex review §1)T136 · Crash mid-tool-batch leaves unresumable transcript (codex review §1)T135 · driver.lock acquisition race — two starters can both own it (codex review §1)T134 · Sandbox escape: file tools follow symlinks; bash has no confinement (codex review §2)T142 · loopd grep spoofing (codex review)T141 · SSE truncation acceptance (codex review)T140 · goal_complete denial bypass (codex review)T128 · F10 phase 2a: chug_collect MCP tool (read-only structured child result over mcp-serve)T130 · chug_status weak pin: missing-.chug leg asserts its distinctive phrase (T124 M3 survivor)T126 · META-SPEC §6 validator template: write /tmp helper scripts via bash heredocT124 · F10 phase 1: chug mcp-serve stdio MCP server skeleton + chug_status toolT125 · META-META-SPEC estimate calibration: all-in counts, test/doc density ~1.5-3x, ~400 should-split bandT127 · README Install: first release IS published (staleness fix)T122 · site-sync timeline: curated entries sort by display date, not bottom-pinT123 · release v0.2.0 workflow failure record (locked-leg + aarch64 cross)T118 · F9 phase 2b: pack frontmatter (description:) + /help descriptions + Tab completion of pack namesT120 · LOOP-SPEC doctrine: verify-then-kill SEQUENTIAL + assert-after-sedT119 · T115 weak-test pins: multibyte goal_tail leg + run_start call-site wiring pinsT117 · F9 phase 2a: run-side goal expansion (chug run/plan --goal "/name args") + goal_pack in run_startT121 · loopd orchestrator cap --max-iters 160 → 200T116 · todo_update accepts empty/whitespace-only title (symmetry with todo_add)T115 · Goal-integrity surface: delegate launch echoes + run_start goal_sha256T114 · META-META-SPEC spec bar: check: lines must see tests the change can BREAKT113 · F9 phase 1: slash-command packs (.chug/commands/*.md, chat invocation)T112 · Streaming path reported input_tokens=0 (message_delta usage merge)T111 · F8 phase 1: structured todo tool (todo_add/update/list + .chug/todos.json + prompt injection)T110 · Filing-time spec-size estimate ceiling (~500 lines) — T102 measure clause resolvedT109 · delegate.rs test-module family split (T104-shaped, pre-emptive)T108 · F7 phase 1: streaming responses + console text deltasT107 · LOOP-SPEC child goal template: worktree-discipline commitment clauseT106 · README Install names the pending first release (quickstart truth)T104 · driver.rs test-module family split (pre-declared trip line crossed again)T105 · F6 phase 1: session fork slots (chug fork save/list/restore)T103 · delegate launch asserts spec + cwd exist (fail-fast on corrupted fields)T102 · LOOP-SPEC impl-child template --max-iters 65→80T101 · site-sync timeline ordering + curation bugsT100 · GitHub releases: tag-triggered prebuilt binaries + notesT99 · site-sync v2: timeline + feature-grid regions (deterministic)T97 · README delegate paragraph → per-action sub-bulletsT96 · META-META-SPEC spec quality bar: check filter must run every test the change addsT95 · README Development layout gains permissions + module set-equality guardT98 · site-sync: chug.sh stats update at wrap (deterministic)T94 · get_str error names received keys (alias self-correction)T91 · F5 phase 1: read_file image input (base64 content blocks + endpoint-reject degrade)T93 · permissions mcp__ matcher-fit canary accepts server-specific globsT92 · LOOP-SPEC impl-child template --max-iters 50→65T90 · F4 phase 1: .chug/permissions.json deny-list (in-process, fail-closed on match, before…T89 · delegate status terminal-wait mode (wake only on goal/abort/liveness/deadline) + LOOP-SPEC adoptionT88 · decision_log validation errors name every bad field + the received shapeT87 · Docs-only guard floor: remove unreachable bash -n leg + fix the go-red overclaimT86 · README Development layout omits plan.rs + tgrep.rsT85 · Cross-tree read friction: LOOP-SPEC step 3 + META-SPEC §6 goal template name the bash escape hatchT83 · F3 hooks phase 1: .chug/hooks.json PreToolUse veto + PostToolUse advisoryT84 · driver.rs trim-machinery extraction to src/trim.rs (pre-declared ~4500 trip line crossed)T75 · LOOP-SPEC wrap checklist gains the decision-records sentence (zero-call adoption gap)T82 · cargo-nextest for gatesT81 · Per-phase model routing (glm routine, kimi judgment)T79 · Parallel mutation testing for validatorsT80 · Docs-only rounds skip the cargo gatesT78 · Release builds for the loop (binary + gates)T77 · Cache-stable transcript trimming (segment-frozen prefix)T76 · tgrep: token-budgeted ranked context retrievalT73 · chug plan: read-only planning mode (F2 phase 1)T74 · api.rs body_watchdog cold-parallel timing flake (2 sightings one day)T72 · LOOP-SPEC §2 step 4 FAIL arc gains the sweep-the-family directiveT71 · Extract the delegate surface from src/tools.rs into src/delegate.rs (pure move)T70 · decision_log tool: structured loop decision records (.chug/decisions.jsonl) + LOOP-SPEC adoption —…T69 · delegate gains a collect action: structured child result (verdict + goal summary + check cmd +…T68 · delegate status wait_secs wakes on significant change only, not per-tool-call churnT67 · Spec check lines never invoke cargo test --lib (binary-only crate) + todo_consistency lint legT66 · dead_port_probe drop→probe leg: bounded theft-retry (T59 coverage gap)T65 · README Continuous-mode target-cache paragraph de-accretionT64 · Pin the two validator survivor classes (t57 ALWAYS-form + t58 max_iters/last_iteration over-reset)T63 · LOOP-SPEC adopts delegate resume:true as the standard child budget-death recoveryT60 · Docs drift pass: driver_lock comment pin location + README src/ layout lineT61 · resolve_safe error string names the bash fallback at fire timeT62 · eval-digest golden-section pin test (T46 validator survivor class)T58 · delegate launch gains resume:true + status summarizes the latest run segmentT59 · mcp_http dead_port tests: bounded retry on port-theftT57 · Post-merge gates use a main-dedicated target dir (target-shared-main)T56 · README: document loopd self-re-exec + dedupe output_truncated glossT55 · .chug/driver.lock — same-cwd mutual exclusion for concurrent chug runsT53 · loopd single-driver check: ps-based, not pgrep (fails open on this host)T54 · loopd_reexec.rs exact-count SELF_CKSUM pins (additive-mutant survivor)T51 · README delegate paragraph: stale one-exception phrasing + spec-grade trimT50 · loopd re-execs itself between cycles when its own script changedT52 · T44 overlap x target-shared: role-keyed target dirs (cross-checkout artifact race)T49 · api.rs LLM client gains a connect timeout const + value pinsT48 · Test code resolves repo root at runtime, not env!(CARGO_MANIFEST_DIR)T43 · EVALUATION.md Outcomes pruning rule (last 6 cycles full) + first compaction of cycles 5-13T42 · Pin webfetch connect/total timeout const valuesT41 · Sandbox-candor pass: filesystem tool descriptions name the refusal + bash escape; README Tools intro…T47 · Shared CARGO_TARGET_DIR for worktree buildsT40 · LOOP-SPEC step-5 doctrine: TODO notes cells must contain no pipe char + run todo_consistency after…T39 · delegate launch gains optional max_tokens passthroughT45 · Bundle trivial same-area rows into one roundT46 · Eval digest: pre-computed Phase-1 corpus summaryT44 · Pipeline overlap: item N+1 impl runs while item N validatesT38 · Truncated-response advisory: stop_reason=max_tokens names the chunking remedyT37 · web_fetch tool: read-only HTTP(S) GET, boundedT36 · loopd cycle budget --max-iters 120→160T35 · README quickstart: cargo install --path . so commands work as writtenT34 · LOOP-SPEC: Outcomes entries written per-item at landing, not deferred to wrapT33 · META-META-SPEC priority line: align with LOOP-SPEC amended doctrineT32 · LOOP-SPEC validation-child template --max-iters 40→50T31 · Deflake the parallel-load test family (mechanism, not timeouts)T30 · META-META-SPEC spec-bar: check: lines must be worktree-relativeT29 · delegate status gains optional wait_secs long-pollT28 · delegate status reaps zombie children (waitpid WNOHANG)T27 · loopd cycle budget --max-iters 80→120T26 · `read_file` gains `offset`/`limit` paginationT24 · LOOP-SPEC adopts the `delegate` tool for child launches + pollingT25 · Failure-aware event previews: error tool results keep a tail windowT22 · Bash tool description: macOS `timeout` mirage noteT23 · `delegate` tool: launch + status for bounded child chug runsT21 · LOOP-SPEC impl-child template --max-iters 40→50T20 · Startup banner + run_start gain cwd worktree HEAD (branch@commit)T19 · Codify the child events-harvest step in LOOP-SPEC (K2)T18 · Widen budget-low iteration warning margin (WARN_REMAINING_ITERS 5→8)T17 · Budget telemetry in events.jsonl: warning injections + configured budgetsT16 · mcp_http test pins (SPEC-9 R4 carried gaps)T15 · Token-denominated budget (--max-tokens)T14 · Cumulative tokens in console abort/goal outputT13 · Budget-low warning before abortT12 · Budget-abort output names model + fallback hintT11 · Startup banner: version/commit/cwd/modelT10 · Append-only .chug/events.jsonlT6 · HTTP stub tests must not hang gatesT9 · goal_rejected message states check envT8 · TODO↔spec consistency guard + t1-t6 backfillT7 · Fresh run rotates .chug/transcript.jsonlT3 · Fresh run detects spec/ledger mismatchT1 · API retry survives endpoint restartsT2 · Per-request activity timeout on LLM callsT4 · Bash tool prepends ~/.cargo/bin to PATHT5 · edit_file non-unique match returns match line numbers## cost · Langfuse daily spend, chug project — baked at sync time by scripts/site-sync.sh
| date | calls | kimi | glm | total |
|---|---|---|---|---|
| 2026-11-18 | 131 | $3.44 | $0.00 | $3.44 |
| 2026-11-14 | 18 | $0.00 | $0.06 | $0.06 |
| 2026-11-11 | 2052 | $15.92 | $1.16 | $17.08 |
| 2026-11-10 | 6751 | $16.01 | $7.61 | $23.63 |
| 2026-11-09 | 9870 | $28.15 | $9.02 | $37.18 |
| 2026-11-08 | 7980 | $0.53 | $13.04 | $13.57 |
| 2026-11-07 | 6259 | $15.42 | $4.89 | $20.31 |
| 2026-11-06 | 5660 | $76.17 | $2.53 | $78.70 |
| 2026-11-05 | 4296 | $109.73 | $0.24 | $109.97 |
| 2026-11-04 | 1249 | $26.86 | $0.15 | $27.02 |