Control

Context Curator

The one question every engineer asks an AI tool and rarely gets answered: what will the model see? The curator scores your whole project against the task you type, shows every candidate with its score and why it matched, lets you toggle and pin, and hands exactly that context to the chat. No LLM is involved in any of it.

01

Overview

Type a task, press Score. The curator runs deterministic keyword scoring over the project corpus — code files, IG-XL sheets, VBA modules, PCB designs, requirements, STDF lots, generated outputs and the channel plan — and renders the ranked result as a list of toggleable items, each showing the tokens it matched on. The same engine assembles context for the chat, so the preview is the reality.

Context Curator scored items for a VOH/SIO task
Fig. 1 — The TMP126 project scored against "write a VOH test for the SIO pin using the SPI read pattern": 35 items on, 75 off, kind chips per item, matched tokens shown, both budget meters live.

Scoring is a pure function: same project, same task, same result. Re-scoring costs nothing — it happens as you type, on a short debounce — because there is no LLM call to pay for. The model is only invoked later, in the chat, with the context you approved.

02

The scoring pass

The task text is tokenised — camelCase and underscore-joined identifiers split into their parts, so tfSioVoh matches a task that only says "voh" — and every artefact is scored against those tokens.

KindScored againstWeighting
Code / VBA / sheets Path, exported procedures and imports, then file content. A metadata match counts 2, a body match 1 — a file named for the task beats a file that merely mentions it.
PCB designs Board name and file path, then components, nets, layers and pins. Header matches weigh 10× body matches, so a large board's incidental BOM hits cannot beat the board you named. Naming a part on a design's component list adds a capped boost; older designs lose up to 15 points of recency decay over three years.
Requirements Requirement id, title, description, category and test method. Straight token match; top 50 included per turn.
STDF lots Lot id, device, program name, tester type, then summary statistics. Header matches outweigh body matches — typing a lot id always ranks that lot first.
Reference programs Files from a repo marked as a golden reference. A conventions boost prefers the golden form when the task touches it.

Dependencies ride along: when a scoring module wins a slot, the modules it depends on are pulled in and labelled as dependency pulls, so the model sees a procedure together with the code it calls.

03

Toggles, pins, bulk controls

Every scored item carries a toggle. Flip one and the assembled preview re-emits on a 300 ms debounce — you watch the context change as you change it. Per-kind bulk toggles flip a whole class in one click: all requirements off, all patterns on.

Pins are for the items you always want. A pinned item survives re-scores — a fresh score rebuilds the toggle map, and pins are overlaid back onto it — and if a new task's scoring drops a pinned item from the visible list entirely, its key rides the selection into the assembly anyway. Pins persist per project across reloads. One rule keeps intent unambiguous: an item you explicitly toggled off stays off, pin or no pin.

04

Budgets and the handoff

Two ceilings govern what can actually reach the model, and both render as live meters. The chat context budget is 48,000 characters: when the assembled sections exceed it, the lowest-scoring sections are shrunk or dropped first, and the cut is disclosed — dropped sections are named in the preview, and every trimmed item carries a budget-trimmed badge. An item cut by the budget can never read as included. The handoff cap is 64 KB of UTF-8: an over-cap handoff is refused at the button with the size that has to come out, and the chat route independently rejects oversized overrides.

CORPUS code · sheets · VBA · boards reqs · STDF · channel plan SCORER keyword match · pure fn zero LLM calls PREVIEW toggles · pins · bulk trimmed items badged HANDOFF saved draft CHAT first send task tokens ranked items selection draft BUDGET GATE 48,000-char context · 64 KB handoff the meters read the engine's own ceilings — imported constants, not copies — so the UI cannot drift from what the server enforces
Fig. 2 — Corpus to chat. The budget gate sits on the handoff edge; anything it trims is disclosed in the preview before the model exists in the story.

The handoff itself is one click. The curated selection is saved as a draft the chat picks up on its next mount — it survives a reload and a new tab, expires after 24 hours, prefills the composer with your task, and is consumed only on the first successful send. A send that fails leaves the draft intact.

05

How it works

  1. Type the task.

    Scoring runs as you type on a 700 ms pause — deterministic, in-process, no spend. The result lists every candidate with kind, score and the tokens it hit.

  2. Shape the selection.

    Toggle items, flip whole kinds, pin the artefacts this project always needs. Each change re-assembles the preview within 300 ms.

  3. Read the budgets.

    Both meters update with the selection. Over the chat budget, the preview names the dropped and shrunk sections; over the handoff cap, the button refuses with the overage stated.

  4. Hand off.

    "Use in chat" stores the draft and opens the chat on the right project. What you previewed is byte-for-byte what the chat sends — same engine, same selection, one code path.

06

On the TMP126 demo

Score the TMP126 project against "write a VOH test for the SIO pin using the SPI read pattern" and the ranking is legible at a glance: VBT_Main.bas first on write/voh/sio/pin hits, the SPI read pattern files on their exact names, the Flow and TestInst sheets on their test rows, and the requirements that mention VOH and SIO — with the unrelated 100-odd artefacts scored low and off by default. The selection lands at 35 items on, 75 off. Toggling a large generated output on pushes the meter over the 48,000-character budget and the preview says exactly which section was dropped to fit — before anything is sent.

Honest boundary The scoring is keyword matching, not semantic search — deliberately. It is inspectable (every item shows the tokens it matched), reproducible (same input, same ranking) and free (zero LLM calls). When it ranks something wrong, the toggles and pins exist precisely so you can overrule it, and your explicit selection is never trimmed behind your back.