Skip to content

Roadmap to v2.0: Deep mode is a coverage feature, and R1 is shipping the backlog - #64

Merged
ojassug merged 3 commits into
mainfrom
claude/tokendamper-v2-roadmap-a92ce2
Sep 9, 2026
Merged

Roadmap to v2.0: Deep mode is a coverage feature, and R1 is shipping the backlog#64
ojassug merged 3 commits into
mainfrom
claude/tokendamper-v2-roadmap-a92ce2

Conversation

@ojassug

@ojassug ojassug commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Docs only. No code changes, no behavioural change, and no test reads any of these files from disk (the filename matches under test/ are comment citations), so the suite is unaffected.

Three commits: the design spec, the roadmap rewritten to match it, and the decision entry plus a CLAUDE.md sync.

What this decides

v2.0.0 is tokendamper-deep — an opt-in tree-sitter backend that makes the supported-language list stop being hand-written. It was "Enterprise Gateway, Remote MCP & Proxy Guardrails".

Elision reduces 4 of 17 probed languages; every other bucket is 0.00%. Each of the four cost a hand-written lexer, a symbol extractor and a region scanner — in that order for the reason §56 measured — and roughly 1,400 lines apiece. One grammar answers all three questions: declaration nodes are the symbols, ERROR/MISSING nodes are the validity check, body node byte ranges are the regions.

Why not the Gateway: that section already contained the argument against itself. A Prometheus endpoint on a pass-through that saves nothing cross-turn instruments nothing, and invariant 8 has not moved. M7 (§54) fixed the half that was fixable. The three ecosystem items are held and listed, not deleted — MCP-over-Streamable-HTTP is named as having no premise problem and being the strongest candidate for the release after 2.0.

Two payoffs rejected, with the measurements that rejected them

Recorded in §75 so the next session doesn't re-derive them and reach the opposite answer.

  • "Deep reduces more on the four we already have." The lexer is not the binding constraint. Go's fallbacks are 18 of 20 CONSTRAINT_DIRECTIVE_LOST; TypeScript's are 15 of 62, the same gate at the same rate. Neither is a parse failure. Built on this argument it would be BM25 and MMR a third time.
  • "Deep makes validation a real syntax guarantee." §46's refusal to wire ts.createSourceFile is not reversed. The Fast path's claim stays bracket/quote integrity and validator-guarantee.test.ts stays as written.

The ordering

R1 → R2 → R3 → v2.0.0, named rather than numbered (§53).

R1 blocks everything, and it is where the project actually is. npm view tokendamper version returns 1.7.2 while tags run to v1.7.3, and [Unreleased] holds the whole 2026-08-30 security remediation including S-04's behavioural change. That is the failure the release skill exists to prevent, live again.

R2 precedes the feature because R4's whole claim is a number. The instrument producing it has a known bias — the constraint gate discards ~24% of files on both measured languages for a reason unrelated to any grammar — and no time axis at all, since stageDurationsMs is per stage and there is no per-file wall clock anywhere. This is §56's ordering argument pointed at measurement instead of safety.

R3 exists because a backend has to be checked where checking is still possible. Its control is staged, and that is a correction to the obvious design: byte-identity is right for the symbol and validator steps and wrong for regions, because a parser legitimately finds better spans than a lexer and demanding identity there forbids the improvement the feature exists for.

Stale facts fixed while auditing

  • CLAUDE.md said "v1.7.3 shipped 2026-09-01". It was tagged and never published — the file carries "a tag in this repo does not imply a registry version" twenty lines below.
  • ROADMAP.md's max_audit.md section still read "Unreleased — holds no number until it ships" for work that shipped as v1.6.0 on 2026-08-16.
  • The "candidates whose preconditions hold" list still named per-item drift (closed unbuilt, §51) and sub-region elision (shipped as v1.4.0, §50).
  • cache_control injection was moved to Milestone 8, not dropped with the section that housed it — it shares that milestone's exact-tokenizer precondition and was being tracked in two places.

What is not established

Stated in §9 of the spec and §75's closing section. The load-bearing ones: no language beyond the four has had its elidable ceiling measured; web-tree-sitter's per-process init cost is unmeasured and could make Deep unusable at the CLI while fine at the Gateway and MCP; and regions are the uncertain seam — that one grammar supplies all three is an argument from node types, not a measurement.

🤖 Generated with Claude Code

ojassug and others added 3 commits September 9, 2026 21:13
Deep mode is scoped as a *language-coverage* feature, not a precision one.
Elision reduces 4 of 17 probed languages and every other bucket is 0.00%;
each of the four cost a hand-written lexer, symbol extractor and region
scanner. One tree-sitter grammar supplies all three, so Deep is the way
that list stops being hand-written.

Two other framings were considered and are recorded as rejected, because
both fail against measurements already in the repo:

- "Deep reduces more on the four we have" — the lexer is not the binding
  constraint. Go's fallbacks are 18 of 20 CONSTRAINT_DIRECTIVE_LOST and
  TypeScript's are 15 of 62, the same gate. Neither is a parse failure,
  so this would be BM25 and MMR a third time.
- "Deep makes validation a real guarantee" — §46 decided against wiring
  ts.createSourceFile on cost, and that decision is not reversed here.

Four releases, named R1-R4 rather than numbered (§53). R1 ships the
backlog: v1.7.3 is tagged, npm has 1.7.2, and [Unreleased] holds the whole
security remediation including S-04's behavioural change. R2 builds the
instrument — the constraint gate's two still-open axes, two-sided so the
retention side gates the merge independently, plus the per-file latency
harness that does not exist. R3 is the seam and a staged negative control
on the four languages we can hand-check. R4 is v2.0.0.

The control is staged rather than uniform: byte-identity is the right
assertion for symbols and validators, and the wrong one for regions,
where a parser legitimately finds better spans than a lexer. §59/§60/§61
staged Go the same way.

What breaks at 2.0 is --mode, which today accepts optimize|bench where
optimize is the identity and bench duplicates the positional command. It
is withdrawn and the name reused for fast|deep.

§8 enumerates every open item from the survey with a disposition,
including the ones not on the spine. An item in no table reads as done —
status-doc §6 and §8, DECISIONS §55.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Matches ROADMAP.md to the design committed in 64d67b2.

Four structural changes.

"AST Code Folding (Fast vs Deep) & Cache Alignment" is replaced by "The
Road to v2.0 — R1 through R4". That section was already carrying its own
correction that Fast mode is substantially shipped in elision/regions.ts;
what replaces it is a different feature wearing the same name. Deep is a
language-coverage feature: 4 of 17 probed languages reduce, each cost a
hand-written lexer plus symbol extractor plus region scanner, and one
tree-sitter grammar supplies all three seams.

v2.0.0 stops being "Enterprise Gateway, Remote MCP & Proxy Guardrails".
That section's own premise note is the reason — the Gateway saves 0 bytes
cross-turn by design, so a Prometheus endpoint on it instruments nothing,
and that has not changed. The three ecosystem items move to *held* and are
listed rather than deleted; MCP-over-HTTP is called out as having no
premise problem and being the strongest candidate for the release after
2.0. What makes 2.0 a major is stated: --mode is withdrawn (it accepts
optimize|bench today, where optimize is the identity and bench duplicates
the positional command) and the name is reused for fast|deep.

The cache-alignment half moves to Milestone 8 rather than disappearing
with the section that housed it. It shares that milestone's exact-tokenizer
precondition, so the two were being tracked in two places.

Baseline moves v1.7.0 -> v1.7.3, and says the thing that matters about it:
the tag is ahead of the registry, npm serves 1.7.2, and [Unreleased] holds
the security remediation. That is R1, and it blocks everything.

Two stale headers fixed while auditing: the max_audit section still said
"Unreleased — holds no number until it ships" for work that shipped as
v1.6.0 on 2026-08-16, and sub-query rehydration is marked held.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DECISIONS §75 records the re-scope before implementation, on §56's
precedent — the ordering argument is the whole value of the entry and it
is worth nothing written afterwards.

What it decides: v2.0.0 is tokendamper-deep, an opt-in tree-sitter backend
that makes the supported-language list stop being hand-written. Not the
Enterprise Gateway, because that section already contained the argument
against itself — a Prometheus endpoint on a pass-through that saves
nothing cross-turn instruments nothing, and invariant 8 has not moved.
The three ecosystem items are held and listed rather than deleted.

It also records the two rejected payoffs with the measurements that
rejected them, so the next session does not re-derive them and reach the
opposite answer: the lexer is not the binding constraint on reduction
(18 of 20 Go fallbacks and 15 of 62 TypeScript are the constraint gate,
not a parse failure), and §46's refusal to wire ts.createSourceFile is not
reversed.

CLAUDE.md changes, all three of which were stale rather than merely
absent:

- "Where the project actually is" now leads with the R1-R4 spine, because
  R1 is literally where the project is: the registry serves 1.7.2, tags
  run to v1.7.3, and [Unreleased] holds the security remediation.
- "v1.7.3 shipped 2026-09-01" was wrong. It was tagged and never
  published. This file has carried "a tag in this repo does not imply a
  registry version" since v1.7.1, and then asserted the opposite about
  v1.7.3 twenty lines later.
- The "candidates whose preconditions hold" list still named per-item
  drift (closed unbuilt, §51) and sub-region elision (shipped as v1.4.0,
  §50). Both stayed on the list after closing, which is the small version
  of what §55 is a monument to: an open item is a claim about the current
  build and it expires like any other.

No CHANGELOG entry: the convention scopes it to behavioural changes, and
nothing here changes behaviour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ojassug
ojassug merged commit fd595c8 into main Sep 9, 2026
3 checks passed
@ojassug
ojassug deleted the claude/tokendamper-v2-roadmap-a92ce2 branch September 9, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant