Repository navigation
Decisions can be recorded as proposed, and the extractor records a proposal's decisions as proposed - #214
Merged
Conversation
zlareb1
force-pushed
the
feat/decision-stage-proposed
branch
6 times, most recently
from
November 3, 2026 14:17
78412bd to
14c9d18
Compare
zlareb1
force-pushed
the
feat/decision-stage-proposed
branch
23 times, most recently
from
November 3, 2026 16:45
811cc01 to
2e25dd5
Compare
zlareb1
force-pushed
the
feat/decision-stage-proposed
branch
4 times, most recently
from
November 3, 2026 21:20
86020e4 to
1138383
Compare
…oposal's decisions as proposed decision.record takes stage: decided (default) or proposed. A proposed decision's statement reads "Proposed <outcome> ..." and its row carries the decision:proposed tag; decision.outcome drops it (an outcome means the decision was acted on), and so does a re-record as decided. context.pack, decision.precedents and decision.chain read the stage from the row that holds the record. The record schema is unchanged, so namespaces that registered it keep writing. loom decisions extract asks the model for each candidate's stage, records anything but a plain "decided" as proposed, and opens each window with the document's title. The stage is the model's reading and flips between runs, so the same words keep a row's stage, also under a reworded key; a changed text is recorded at the stage it reads as. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A module first imported under a patched get_client kept the fake for the rest of the run. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ead of repeating it Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
feat/decision-stage-proposed
branch
from
November 4, 2026 02:01
a150e91 to
9083ba5
Compare
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
decision.recordtakesstage: "proposed"for an option put forward and not yet chosen or built; its statement reads "Proposed …" instead of "Decided …" everywhere a decision is served.loom decisions extractrecords the decisions of proposals, plans and action items as proposed.Why
Design material is full of decisions that were never made: proposals, RFCs, feature requests, action items and options under discussion. The extractor wrote every one of them as
Decided <outcome> because …, and the pre-edit block, search andcontext.packserved them as choices the code follows. An agent then planned against a design that does not exist.Measured on a private corpus of 60 real engineering documents across three components (design decks and docs, meeting notes, RFC issues, incident write-ups, runbooks, chat threads), with gold statuses taken from the code and its merge history, not from people: on
main, 30-32% of extracted rows (two runs, 353 and 367 rows) state something that is not how the code is today, and 9 in 10 of those are proposals or unbuilt plans presented as decided. In a task check (324 questions and change requests answered with and without the served rows), change plans that followed a misleading row rose from 0.20 without Loom to 0.36 with it.What changes
DecisionRecordInput.stage:"decided"(default) or"proposed". A proposed decision's row carries thedecision:proposedtag and its statement readsProposed <outcome> because <reasoning>.;context.packlists it as→ proposed: <outcome>, anddecision.precedentsanddecision.chainanswerstageon each decision.decision.outcomedrops the stage, since an outcome records that the decision was acted on, and so does recording the decision again asdecided. A caller's owndecision:proposedtag never stands in for the stage.context.pack,decision.precedentsanddecision.chaintake the stage from the row that holds the record. The generic record ops (memory.record.query,memory.record.history) return the record as stored, which holds no stage. Why not a record field: adding a field to the built-indecisionschema would makedecision.recordanswerUNKNOWN_FIELDin every namespace that registered the schema already (ensure_schemaleaves an active schema alone).loom decisions extractasks the model for each candidate'sstage; anything but a plaindecidedis recorded as proposed, because a proposal served as a choice misleads more than the reverse. When the document has a title, each window's text opens with a[document: <title>]line (clipped to 200 characters), so a proposal's sentences ("we use …") read as a proposal. For unchanged words a re-run keeps the row's stage and notes a different reading; a changed text is recorded at the stage it reads as.propose(proposed,proposal) for a filler word, so a reasoning that only says the outcome was proposed ("We propose to spill into sorted runs.") is dropped like one that says it was decided.Scope and risk
context.packdecision line.memory.for_fileand search need no change: they serve the statement.constrainttag, somemory.for_filestill ranks it first: a ban a design puts forward is the warning an agent needs before it edits that code, and the statement says "Proposed". The kinds label is unchanged.server.core.ch.get_clientwhilecontext.packimports modules lazily: a module first imported under the patch kept the fake client for the rest of the run (the startup tests' fake made 39test_decision_retirement.pytests fail when they ran first, onmaintoo). Where the patch was not needed (the sections are stubbed) it is gone; the startup tests set the clientget_clientreturns instead.loom.memory, the same shape_LIVE_WRITERSalready runs on everydecision.recordanddecision.outcome(filtered on org, namespace, the keys andmemory_type), for the handful of keys a pack, precedents or chain call reads. Measured withsystem.query_logon a private ClickHouse holding one namespace of 1,000,000 memory rows and 100 decision records, ten keys per read, five reads each: the read went from 100 to about 1,250 rows read and from 9 ms to 39 ms on average (cold first reads included), memory 4.5 MB to 6.2 MB.Compatibility, rollout and rollback
decision.record(stage, defaultdecided), and one output fieldstageon the decisionsdecision.precedentsanddecision.chainreturn. SDKs regenerated; the Python client'sdecision.recordtakesstageand sends it only when it isproposed.stageand records the decision as decided. An N-1decision.outcomeon a proposed row rewrites its statement as "Decided" but keeps the tag (N drops both), and the readers take a decision with a recorded outcome as decided whatever its tag, so it is listed as decided; the next Ndecision.outcomeor re-record drops the tag.loom decisions extractrun that revises one of its own proposed rows (for files or tags) records it without a stage, so the row reads decided until a later run's text change or a person records it as proposed again.context.pack,decision.precedentsanddecision.chainread no stage during the rollout, so they list a proposed decision as decided until every replica runs N.decision:proposedtag (the tag had no meaning then) is listed as proposed bycontext.pack,decision.precedentsanddecision.chainas soon as N serves (unless its outcome is recorded), while its statement still reads "Decided"; its nextdecision.outcomeor re-record drops the tag.memory.updatereplaces a row's tags, so it can add or dropdecision:proposedlike any tag; the readers then follow the tag while the statement keeps its wording until the decision is recorded again.decision.recordis the op that sets the stage.Tests
tests/integration/test_decision_record_source.py, against a server from this branch on its own ClickHouse, auth off): a decision recorded withstage="proposed"reads back tagged and worded "Proposed",decision.precedentsanddecision.chainanswerstage: "proposed", recording it again as decided, or recording its outcome, drops the tag and the wording, compared on the whole row, andcontext.packlists it as→ proposed:; the file andtest_memory_for_file_decisions.pypassed (6) before the rebases over the latest decision changes onmain, whose new integration tests in that file this run did not include.decision.recordtags and words a proposed decision,decision.outcomedrops the stage, a re-record as decided drops it, a caller's tag is ignored, the record carries nostage; extractor stage parsing (only a plaindecidedreads as decided), a reasoning that only says the outcome was proposed restates it, the title line on every read, the same words keep a row's stage in either direction, also under a key the model reworded, and a changed text is recorded at the stage it reads as;context.packrenders→ proposed:;decision.precedentsanddecision.chainanswer each decision's stage; a clickhouse-local test intest_decision_retirement.pypins that the record read takes the stage from the record writer's own live row, not another identity's; a stage change leaves a row with a recorded outcome as it is; the fake model answers a stage; SDK sendsstage. Decision, context-pack and SDK test files pass;tests/analyzer/shapes.txtregenerated for the changed record read andpython -m tests.analyzer.corpus --checkagainst a migrated ClickHouse rejects no shape;make format lint typecheckclean; codegen and docs reference regenerated. Full unit and analyzer suite on the head before the last rebase: 26160 passed, 22 skipped, 1 failed (tests/analyzer/test_corpus.py::test_shapes_file_matches_builders, which fails onmaintoo: itsshapes.txtlacks the current shape of thememory.for_fileread; this branch does not change that read); after rebasing over the latest decision changes onmain, the decision, context-pack,memory.for_file, SDK, contract and gate test files (2109 passed) andtest_decision_retirement.py(42) pass;make typecheckclean; the context-pack and decision test files pass in three random orders and in the order that failed before.maingive the noise):mainrun 1mainrun 2Per component the misleading share fell from 0.375 / 0.400 to 0.143, 0.348 / 0.386 to 0.205 and 0.299 / 0.236 to 0.104. Extraction cost on the corpus: about $0.1 per run of 60 documents. The measurement predates the
propose/proposalfiller words, which can only drop rows whose reasoning restates the outcome.AI assistance in the code (leave one; writing this description with AI is fine):
🤖 Generated with Claude Code