Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ Correctness: a safer answer cache, versioned benchmark figures, memory that surv
- French fresh-look words starting with an accent ("vérifie", "à froid") never matched; they do now.
- Bench reports and charts name the TokenForge version, build hash and Claude Code version under every table and figure. A report or chart that mixes versions or builds is refused with the list found; `--mixed-versions` builds it with each row or series labelled. The published benchmark-report.json mixes 3 builds, so rebuilding it needs that flag.
- README: each benchmark figure names the tokenforge and Claude Code versions it was measured with. No figure changed.
- Benchmark of 0.9.2 (Claude Code 2.1.296, 37 tasks, 2 runs per side at the defaults): median −51% tokens and −28% list cost per task, fewer tokens and lower cost on all 37, mean quality per task 98.6 against 98.9. The README, the report and the charts now show these runs; the 0.7.0 and 0.8.0 results stay in git history. Lean levels on 6 tasks: `on` −37%, `balanced` −47%, `max` −44%, `ultra` −55%. With the proxy, `ultra` saves 53.9%: nothing measurable on top of the hooks in one-prompt sessions.
- README charts draw only runs on the Claude Code version under test.
- `tforge version` prints the version and the plugin build hash that benchmark runs record (`--json`).
- Resume: SessionStart now also runs on resume. Claude Code keeps the earlier session-start text in the transcript, so the rules are not sent again; only what changed while the session was away is: a newer handoff, a changed state file, or another session's work in this project since.
- Compaction: this session's own compact checkpoint is reloaded after a compaction (before, the newest snapshots of any session).
- `reloadOn` (`TFORGE_RELOAD_ON`) chooses which of `compact` and `resume` reload anything. Default: both.
- Snapshots include subagents. Claude Code writes each subagent's transcript separately, and tokenforge skipped them, though in delegating sessions most tokens are spent there. Each chunk now lists the agents it ran (type, task, files changed, commands, report), the main transcript's sidechain edits count as changed files, and the checkpoint and automatic handoff carry the newest agent lines.
- Automatic handoffs are no longer deleted at the first snapshot of a later session, nor ignored after 72 hours. One is moved to `.forge/handoffs/` (newest 10 kept) once a session that was given it has saved a snapshot of its own, or after 14 days (`TFORGE_HANDOFF_MAX_AGE_H`, now 336). A resumed session is not given its own handoff back.
- `stateFiles` (`TFORGE_STATE_FILES`): globs of files a skill keeps its state in (a review register). Those changed in the last 72 hours are loaded at startup, `/clear` and compaction (8000 characters each, 16000 in all), and on resume when changed since; the generic checkpoint is then left out. Never in subagents.
- Cache invalidation by content. The `tmap` index (tmap 0.5.2) re-parses a file whose content changed even when its size and modification time did not (an edit within the clock's resolution): size, times and inode are trusted only for entries indexed 2 s after the file's last write, as git does, and a content hash decides otherwise. A file rewritten with the same bytes (a branch switch and back) is not parsed again, and an index from another tmap version is rebuilt. Compacted instruction files are keyed by their content and the parser version instead of size and mtime. The session index behind `tforge recall` and the dashboard notice a transcript replaced at the same size.
- Cache writes are atomic (temporary file, then rename): the instruction cache, session index, answer-cache state, snapshot chunks and the proxy's saved outputs no longer risk a torn file when a hook is killed mid-write.
- `tforge caches` lists every cache tokenforge keeps, of three kinds kept apart (computation, memory, the provider's prompt cache), with what each depends on and when it is reused (README, Caches).
- Forge checks: at the time limit the whole process tree is killed (a check's `sh -c` used to leave background children holding the output open past the limit). Numeric plan settings are bounded: `verifyTimeoutMin: 0` or `"10"` used to turn the limit off and is now refused. A check that writes files in the checkout is reported (`checkWrites` in the ledger).
- `tforge gc`: never deletes through a symlink (a linked project dir under the scratch root used to be followed), only inside real directories you own; session scratch is moved aside, checked again and put back if the session came back, a file was opened or written there; a stale lock is taken over by rename, so two gcs can't both run; leftovers of an interrupted gc are removed.
- `tforge lean` shows what the current level hides. README: lean's deny entries apply to every project, subagent and plugin, and win over project and managed `allow` rules.
- Bash router: `TFORGE_SHOW_REWRITE=1` shows you each rewrite (the command as typed and as run), `=ask` asks before running it, and `tforge route "<cmd>"` prints a rewrite without running anything. Property tests generate commands from quoting, globs, paths with spaces, environment prefixes, substitutions, pipes, redirections and exit-code chains, and check that each rewrite exits, writes files and prints its lines like the original. `tkit test` is compared with `npm test` (and pytest where installed): same exit code, same pass and fail counts, failing tests and load errors named, fewer lines.
- `tkit run` (tmap 0.5.2): when a failed command's output is capped, up to 20 error lines from the omitted middle are kept, not only the head and the tail.
- Proxy pruning: a read of a file that was edited since (also through `tkit edit`, `sed -i`, `tee` or `cat >` in a longer command) goes once the model has not touched the file for 6 calls, in the current turn too; before, only reads from an earlier turn did, and a `claude -p` session is a single turn. Chosen by replaying 90 recorded sessions: 5.6% less re-sent read content, and no file edited again without a fresh read. Bash edits now also count for the earlier-turn rule.
- `bench/scripts/read-replay.mjs` replays recorded benchmark sessions without API calls: size of each `cat`, `sed -n`, `head`/`tail` and Read result, how many later requests re-sent it, whether the same lines were read again, and what happened to reads of files edited later.
- `tforge validate` says whether workers or working inline is likely cheaper for the plan: inline for fewer than 5 files or 3 tasks, a serial chain of up to 5 tasks, or tasks that each need most of the planned context (they would each read it again). A recommendation, never a refusal; the forge skill follows it unless you asked for workers.
- Disabling the plugin now takes its settings out. Claude Code does not tell a plugin it was disabled, so lean's hidden tools, the shorter auto-compact window and the proxy address stayed in `settings.json`. The proxy daemon now checks `enabledPlugins` (at most every 30 s); once `tokenforge@…` is `false`, it removes what tokenforge added, never the user's own entries, and the first session after re-enabling restores it.
- An agent with its own definition (a plugin's or your own, not a built-in one) no longer gets the scope, "infer instead of asking" or planning rules, which contradicted agents such as SpecAudit's arbiters. Its definition decides.
- `subagentSkip` (`TFORGE_SUBAGENT_SKIP`): agent types, with `*` wildcards (`spec-audit:*`), that tokenforge leaves alone: no policy, instruction files, Bash router, code redirect, MCP distill or budget notes.
- `leanKeep` (`TFORGE_LEAN_KEEP`): tools lean levels never deny. A rule tokenforge already added for a kept tool is lifted at the next start; `tforge lean status` still reports the level.
Expand Down
Loading
Loading