Repository navigation
Conversation
Silthus
marked this pull request as ready for review
October 12, 2026 12:11
An adopter's agent asked them which invariants to declare before anything had said what an invariant is. The adopt practice now has the agent walk the user through docs/how-coherence-works.md (one page, a diagram and the words they will hear) before its first question, and propose each invariant in plain words: the rule, what breaks if it goes false, and how it would be checked. The page ships in the package, and a test keeps every doc a kernel practice sends an adopter to in package.json's files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t, and what a spec gap spares A chokepoint bypass is reported at the edit; a totality oracle runs with coherence run and on each pull request. An invariant also needs its checklist answered. A spec gap counts unknown trust and spares an entrance with a recorded reason it needs no control. The package test now reads nested docs paths too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus
force-pushed
the
adopt-explains-coherence
branch
from
October 26, 2026 08:59
582812d to
fd6f782
Compare
This branch has not been deployed
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.
Problem
An adopter handed their agent the repository and asked it to set up Coherence. The agent's first questions were which invariants to declare. Nothing had said what an invariant, a chokepoint or a refutation is, how Coherence uses them, or why a short set of them helps. The adopt practice only asked the agent to report findings at the end, in words the person was never taught.
Merge Danger
Note
🔵 Merge risk: low · two-way door (merge-risk rubric)
adopt Coherencepractice on the next release: a new step 2, and step 9 now asks the agent to propose each invariant in plain words. Adoptions already under way see a renumbered practice.Summary
The adopt practice now explains Coherence before it asks the user anything:
docs/how-coherence-works.mdin its own words, within one screen. It says it will propose the invariants for the user to confirm, and invites questions.df-729d4e68, the recorded defect.docs/how-coherence-works.mdis one page:The README quick setup and Further reading point to the page.
Before and after: a real adoption
Same repository (Silthus/next-session at
d2b0eaf), same prompt, same model (Claude Opus 5.5, high effort), two fresh worktrees. The only difference: before installed@posthog/coherence1.7.2 from npm, after installed this branch packed as a tarball. Each excerpt is the agent's first message to the human. Both runs predate the rebase onto 1.10.1; the adopt practice has not changed upstream since, and its steps keep the same numbers.Before (npm 1.7.2)
The first message goes straight to decisions, in words the human was never given:
Question card: "Which invariants should I declare first?", with options like "Access seam: Groups reached by id only via convex/model/access.ts".
After (this branch)
The first message opens with the explanation, then proposes each invariant in plain words:
Question card: "Which invariants should I declare and witness?", with options like "1 Identity seam: chokepoint on getAuthUserId through currentGm; no test to write, Coherence refutes it itself".
Observed: the explanation arrives with the first question, as the step says. The agent did about ten minutes of work it needed no input for (config, lexicon, specs) before that first message, so a person watching sees progress lines, not the explanation, until then.
Evidence
What an adopter's agent now receives (
node src/cli.ts query practice "adopt Coherence"):The page ships (
npm pack --dry-run):mainat1aef204(1.10.1). The only conflict was the packagefileslist, where upstream addeddocs/enforcement.md,docs/plugins.mdandplugins; the page now follows them. Upstream also added a pitfall to the adopt practice (df-f3826eaa), which merged beside this one. The explainer's claims still hold on 1.10.1:run,refute,ci installand the lexicon's definitions it relies on are unchanged. The journal moved to sealed shards upstream; this PR's flat journal file stays as committed, since the store is append-only and readers still read flat files.every doc a kernel practice sends an adopter to ships in the package(src/spec/practice.test.ts). It reads every kernel practice step throughkernelPractices()and checks eachdocs/*.mdit names againstpackage.jsonfiles. It went red with[ 'docs/how-coherence-works.md' ]before the doc was added tofiles, and green after.npm run lexicon:check: 0 rejected names, 0 unknown nouns. The first draft used "promise", a rejected name for invariant, and was reworded.npm run spec:check: exit 0, with 0 spec problems. Defectdf-729d4e68is closed by decisiond-618a16da. It reports 3 guard failures in the dead-trigger check, and the untouched base reports the same 3.src/spec/practice.test.tspasses 23 of 23. All of these were re-run on the rebased head.adversarial-review, GPT-6.1 Sol, high): three findings and one nit, all fixed.coherence runand on pull requests. The diagram now shows both.docs/paths too.no tag message?, the node reporter output doesn't match, and a socket test hits an EPIPE. This session's run file is left out of the commit so it doesn't grade those as structural defects (d-941135c0).🤖 Generated with Claude Code