Spice needed to recognize when an agent had just learned something useful to an open Design. A Design is a question under consideration. When a lane’s recent work matches one, Spice can ask for input before offering another task.
That request interrupts allocation. A loose match creates something else to read and dismiss precisely when the agent was ready to move on. Relevance therefore had to be local, explainable from the words that produced it, and strict enough not to invent work.
My first matcher required three uncommon shared words, including one from the Design title. It was cheap and visible, but its thresholds created cliffs. A term on one side of the common-word cutoff had a full vote; one on the other side disappeared. A fourth shared word counted exactly like the first.
The failures reached the agents. One invitation connected browser error filing to a Design about human short codes. Another connected blocked-tab markers to passive Design seeding. Both agents declined because the shared words did not carry useful shared work.
The comparison
I froze a few hundred completed tasks and six real Designs from the task journal, making about 2,400 possible pairs. I inspected 87: 29 useful, 41 unrelated, and 17 borderline. One assistant labeled the initial examples, examined the first results, and then added harder nearby cases. Thresholds were also explored against those examples. This was engineering evidence for one corpus, not an independent benchmark or an estimate of production accuracy. Both this comparison and the later replay measure historical scorers. They predate the current representation, thresholds, conversation tempering, lane-owned profiles, per-question qualification, and final choice among eligible candidates.
The comparison tested the word gate, plain TF-IDF, and four embedding models over the evidence available then:
| Method | Useful found, of 29 | Unrelated accepted, of 41 | Additional model data |
|---|---|---|---|
| Existing word gate | 22 | 17 | none |
TF-IDF at 0.12, recent 256 statements |
27 | 2 | none |
| Potion 8M, native int8 | 25 | 3 | about 8 MB |
| Potion retrieval 32M | 26 | 9 | about 129 MB |
| BGE small, quantized | 27 | 3 | about 66 MB |
| MiniLM L6 | 25 | 2 | about 90 MB |
A later replay added each Design’s open questions and used its then-current 0.15 floor. It found 25 of the 29 useful pairs and accepted 4 of the 41 unrelated pairs; the word gate still found 22 and accepted 17.
A small embedding remained a credible fallback. It simply had not improved the actual choices enough to earn model weights and another inference runtime. A direct scorer also fit a preference I keep when its useful properties earn the tradeoff: one movable executable. No model asset, service, vector database, or learned runtime had to accompany it.
What the scorer weighs
For lane matching, claim overlap, and duplicate screening, the Rust scorer fits up to the 256 most recently revised task statements. Each statement contributes its title, pitch, description, and acceptance items. A term gains weight when it repeats within one document or appears in few recent statements; a softer third factor lowers terms common across held conversation. Distinctive subject words stay strong while ordinary workflow language loses influence.
For a term , statement document frequency counts how many of the task statements in the fit contain . Conversation document frequency counts how many of the retained whole messages in the conversation background contain . A term that appears three times in one document adds one to its document frequency, not three. Those three repeats do count toward its term frequency within that document.
The scorer weighs only terms present in a document ; absent terms have zero weight. A document with no retained terms has no normalized vector. For documents with terms, the scorer uses:
The conversation factor is one for a term absent from retained conversation and lowest for a term present in every counted whole message. Taking the square root softens the penalty. The scorer normalizes each vector before the dot product, so a larger vector magnitude does not by itself raise the score. New messages alone do not refit the statement window or reweight its vectors.
Tokenization ignores common English filler, command-line options, pure numbers, and short ordinary words while retaining selected technical terms. Sparse vectors remain deterministic. The explanation shown to an agent is the bounded set of strongest shared terms from the same dot product that produced the score.
What counts as lane evidence
Retained evidence belongs to a lane, not one occupant or vendor session. The profile contract keeps one profile as occupants and sessions change. Its bounds are 32 successful task cards and 64 settled assistant-message cards.
A task card offers its statement and its statement plus bounded successful validation. A conversation card keeps authored text while excluding protocol headers, quotations, code blocks, raw HTML, and Spice quote links. Whole messages and a few substantial passages become separate views. The evidence implementation defines those views.
Spice scores every retained view and takes the maximum rather than concatenating a lane’s history, so unrelated old work does not dilute the one task or paragraph that connects. Evidence written because a Design request arrived cannot justify another request for that same Design. During bounded warmup, selection may use partial cards without treating an incomplete empty profile as evidence that the lane knows nothing. The diagnostic below waits for readiness.
This is a bounded record of what a lane recently did or explained, not a biography and not proof of expertise.
Where scores matter
Spice uses TF-IDF in eight decisions. Seven use the weighting described above, but the statements they fit can differ: task next fits only pending statements. Topic placement uses a separate fit.
- Design awareness can ask a lane about an open Design. Whole-Design requests use a
0.08floor before steeping,0.16after steeping, and0.24while a completed pass awaits the operator’s decision. Listed questions must also qualify independently. Need for feedback ranks before cosine. The request creates no claim, assignment, or permission to work. Agreement is not permission to work follows what can happen afterward. - Claim overlap emits a nonblocking warning when two active task statements reach
0.25. A separate exact route catches rare code-shaped identifiers. Neither route prevents the claim. task nextuses the running lane’s score only inside the allocator’s best-match order. Scores below0.08become zero. Relevance cannot admit ineligible work or outrank the allocator’s stronger boundaries.- Vacant-lane wake selection lets each eligible lane’s retained profile score the task it would take. Match breaks ties only within the automatic work trigger; inbox and held-claim wakes do not use it.
- Task invitation recipient selection ranks eligible teammates within the vacant and occupied classes by retained match, then stable operational tie-breaks. The selector still tries launchable vacant lanes before occupied ones.
- Topic placement uses a separate TF-IDF fit over the newest 256 eligible statements across the board, not lane conversation or the topics those tasks already have. It weights title, pitch, description, and acceptance separately. Cosine links similar statements into a hierarchy of groups; each level names its group from words that carry weight in that level’s fit. Public topics with authored descriptions hold fixed seats outside the 256 statement seats. The resulting topic is a proposal, not permission to file it. Complete or inherited topics bypass inference; a relative tail is joined by removing the longest exact overlap at the boundary, so
/app/renderplusrender/cssyields/app/render/css. Team policy can refuse an inferred destination. - Unaddressed operator steering compares the message with retained lane evidence. Occupied lanes without a claim come first, then vacant lanes without a claim, then lanes holding work. Relevance only orders lanes within one group. An explicit recipient bypasses this choice.
- Duplicate screening at task creation runs on
task addandtask oops. It checks other actors’ pending tasks and their settled tasks among the 256 most recently revised nondeleted statements. It skips dependencies and tasks on the new task’s parent or preparation chain. Unlike claim overlap, it can refuse the write. For independent tasks, cosine at0.32can warn;0.48is treated as the same work. Outputs prepared under the same parent or controller use0.48and0.72instead, because they are expected to share wording. A same-work match born at most one minute before the new task blocks creation outright. A match with the same or a later creation timestamp also counts as fresh. For a same-work match more than a minute old and at most 15 minutes old,task addrefuses unless--relatednames every such match.task oopshas no such override. Older matches can warn but do not block. A declared relation also suppresses the warning for the task it names.
Inspect a live score
The read-only room score command exposes the same machinery for research and diagnosis. It reports the strongest current evidence view, cosine, shared terms, fit generation, and the floors the score clears. It refuses an incompletely warmed profile rather than returning a misleading zero. It records no evidence or notice and does not predict which Design would win.
List the lanes and copy the address= value of one seated lane. Then compare text drawn from that lane’s recent work with an unrelated sentence:
spice lane list
spice room score ADDR "words from one lane's recent work"
spice room score ADDR "an unrelated sentence"Each result names the resolved lane and session, the strongest retained evidence view, its score and fit generation, the shared explanation terms, and the floors it clears. A related query can produce a nonzero score and named terms. Weightable text with no terms in common reports zero and (none); text with no weightable terms is refused. Exact numbers are not fixtures because the lane profile changes as work settles. Clearing a displayed floor does not grant possession or predict admission.
A separate historical live-journal probe exposed the scale of the old gate. It looked at about 81,000 pairs of claims by different lanes within six hours. The word gate warned on more than a third of them, often through generic workflow words. TF-IDF at 0.25 warned on under 5%. Those pairs were not exhaustively labeled, so this is not a precision measurement; it shows why generic intersections needed less influence.
What the words cannot say
TF-IDF is lexical. It cannot connect arbitrary synonyms, infer causality, decide whether a contribution will be novel, or establish that an agent understands a subject. Its score is not a probability.
Similarity can stop a duplicate write; it cannot authorize one. A model would be worth revisiting if useful matches were repeatedly missed because the same idea arrived in different language, and a small embedded model then improved actual routing enough to pay for its data and runtime. Until that evidence exists, the words are enough: not to understand the work, but to make the next bounded choice better.