Repository navigation
Tooling that reads the specification instead of remembering it - #86
Merged
Merged
Conversation
The .claude/ toolkit encodes fold's own invariants well and the protocol it implements not at all. gateway-reviewer asks whether a change respects fold's architecture; nothing asked whether fold respects MCP. That gap is load-bearing, because the invisibility rule is a claim about a specification, and `make conformance` only checks what its 40 checks happen to cover. Four skills and one agent, split along that seam: - /mcp-spec — the section map for revision 2026-07-28, pinned. Fetch and quote the normative sentence; never answer a protocol question from memory. Names the two traps: MUST vs SHOULD changes whether a gap is a bug or a documented decision, and fold is a shared intermediary and a client, not only a server. - /mcp-inspector — the official Inspector CLI against a local fold. The centrepiece is the invisibility diff: the same method against fold and against the upstream directly, diffed. In passthrough that diff must be empty, which is the invisibility rule made executable for any fixture rather than only the conformance suite's. - /spec-drift — revision-to-revision gap analysis, with a table that forces every gap into code, README "Not implemented", or the roadmap. A gap blocked on the SDK gets a drift canary, on the listen_test.go pattern, so the end of the wait is not something anyone has to notice. - /console-sync — the vendored console had a make target, a CI gate, a weekly workflow and a manifest allowlist, and no skill. Written as supply-chain review, since these assets run same-origin with a page holding a live Bearer token. - mcp-spec-auditor — read-only spec audit over fold's three faces (server, client, shared intermediary), grounding every finding in fetched spec text and separating conformance bugs from forward risk from undocumented gaps. Writing them surfaced findings worth their own issues, which is roughly the point. The 2026-07-28 revision partitions the JSON-RPC server-error range and reserves -32020..-32099 for the specification; fold mints -32040..-32044 there. CacheableResult (ttlMs, cacheScope) binds fold twice over as a Redis-backed shared cache, and neither field is referenced anywhere in the tree. And MRTR replaces server-initiated requests with retry round-trips, which is the thing session-keyed bridging exists to carry — so the SDK dependency behind the subscriptions/listen gap may be shorter-lived than README says. No behavior change; .claude/ only. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
.claude/toolkit encodes fold's own invariants well and the protocol it implements not at all.gateway-reviewerasks whether a change respects fold's architecture; nothing asked whether fold respects MCP.That gap is load-bearing. The invisibility rule is a claim about a specification, and
make conformanceonly checks what its 40 checks happen to cover — which is not the same as covering the spec.Four skills and one agent, split along that seam. No behavior change;
.claude/only./mcp-spec2026-07-28, pinned. Fetch and quote the normative sentence; never answer a protocol question from memory./mcp-inspector/spec-drift/console-syncmcp-spec-auditorTwo ideas do most of the work.
fold has three faces, and only the first gets audited. It is a server to its clients, a client to its upstreams, and — the one that matters — a shared intermediary that merges lists, caches them in possibly-Redis-backed storage across a fleet, rewrites names, and mints errors. Spec rules addressed to caches, proxies, and intermediaries bind fold, and no SDK will implement them for it. That is where real findings live, and the agent is organized around it.
The invisibility diff.
/mcp-inspector's centrepiece: run the same method against fold and against the upstream directly, anddiffthe JSON. In passthrough that diff must be empty. It turns the invisibility rule into something executable against any fixture, not only the conformance suite's everything-server./console-syncfills a plainer gap — the vendored console had a make target, a CI gate, a weekly workflow, and a manifest allowlist, but no skill. Written as supply-chain review, since those assets execute same-origin with a page holding a live Bearer token in memory.Findings, which is roughly the point
Writing these against the
2026-07-28changelog turned up three things worth their own issues:Minted error codes sit in a reserved band. The revision partitions the JSON-RPC server-error range:
-32000–-32019implementation-defined,-32020–-32099reserved for the specification.gateway/upstream.go:29-33mints-32040–-32044. No collision today, but the spec renumbered three of its own codes into that band this revision.codeTaskNotFound = -32002is correctly placed; the other five are not.CacheableResultbinds fold twice over. NewttlMsandcacheScopefields, wherecacheScope: "private"governs whether shared intermediaries may cache — and fold caches lists in shared Redis. Neither field is referenced anywhere in the tree, andcacheTtlMscan silently outlive an upstream's freshness hint. A correctness issue, not just conformance.MRTR may outdate the
subscriptions/listengap. README "Not implemented" says fold cannot use the SDK's stateless mode because session-keyed bridging needs stateful sessions. But this revision replaces server-initiated requests with Multi Round-Trip Requests — retry round-trips — which is the thing requiring bridging. Sampling, roots, and logging are also now deprecated on a twelve-month clock, and fold bridges all three. Worth re-reading that reasoning.None of these are fixed here. They are what the tooling is for.
Depends on nothing; stacks cleanly with #85.
🤖 Generated with Claude Code