Skip to content

mcpx: the AI layer and search -- where a model comes from, and everything that would use one (tracker) #1891

Open
2 of 9 issues completed

Description

@dezren39

Relocated from dezren39/darwin-nix#176 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).

Parent: #181

Purpose

Everything in mcpx that would use a model, plus the search that should not.
Nine issues: better tool search, a provider layer mcpx owns, a graded
check/refuse/repair ladder, lifecycle hooks on exec, administration by intent,
composed tool views and generated tool sets, and the servers-and-feedback loop —
plus two small design issues split out because three of the others were each
about to build the same thing: one near-miss matcher (#186) and one settings
ceiling (#185).
The finding that shapes the whole tracker is that every one of these has a
deterministic lower half that ships without a model and a model-backed upper
half that does not
— and in every case the deterministic half is the larger
share of the value. Tags and word-splitting beat embeddings on a catalogue of a
few hundred short identifiers; a schema-change diagnostic beats a model
rewording it; toolViews.from answers the tailscale request outright; /v1/stats
already measures the thing "this server is slow, host it locally" is about. So
the order is: build every deterministic half first, then #110, then the model
halves. #110 is not first despite being the dependency, because nothing above it
is blocked on it until the deterministic work is done. Its decision is another
matter: choosing Approach C (a thin Provider interface) and correcting
docs/consumer.md's "should not be built" sentence is cheap and can be taken
early, which is why #181 places #110 in its design phase.

Children

#181 collisions that touch this tracker

Row Collision Owner Here
2 four hook vocabularies #81 (#173), via a decision record SURFACES is writing under pkgs/mcpx/docs/decisions/ (in flight) #112 adopts it; its phase names are input
3 three autonomy dials #111, via a decision record SURFACES is writing under pkgs/mcpx/docs/decisions/ (in flight) #112's effect and #113's prompt.mode: plan adopt it
4 namespacing and collision rules #83 (#173) #114's views, virtual namespaces and script-backed tools build on it
5 ClampedBy #185 #111, #112, #113 consume it
6 the near-miss matcher #186 #109 and #111 call it
7 the exec frame-order rule #111 #112 adds its hook frame under it

Proposed order

Phase 1 — the free wins, in parallel. #186 first: one normalisation,
distance and threshold, replacing the two that exist
(internal/diagnose/diagnose.go:417-455, internal/launcher/template.go:341-381,
which disagree on transpositions). Then #109's --explain → tags →
normalisation/stemming → typo tolerance, and #111's first items: a call frame
type in the exec stream under the frame-order rule #111 owns (docs/exec.md:137),
and rung 1 near-miss detection. Note rung 1 needs two signals, not one: #186's
closeness for typos, and argument-shape fit for the note's own example —
search→query is edit distance 5, so no typo threshold finds it. Rung 0,
wiring diagnose.CallError, is #116 in the cross-cutting tracker (#177), in
flight with SURFACES; at 05c78b2 it still has no caller outside tests
(internal/diagnose/diagnose.go:483). When it lands, the structured diagnostic
it attaches is the shape #111's rungs read.

Phase 2 — the vocabulary, before any dial is implemented. #111's
repair.level (off | explain | confirm | propose | retry | rewrite) is the
same dial as #112's hook effect (advise | transform | script | retry) and
#113's prompt.mode: plan. Three children independently invented a
policy-with-named-stops. It is decided once, in the autonomy-dial decision
record SURFACES is writing under pkgs/mcpx/docs/decisions/, and carried by
#111; #112 and #113 adopt it. The floor/ceiling clamping (the daemon sets the
maximum autonomy, a caller may lower it and never raise it) is #185 — a
settings-registry feature, not an auth feature. Both precede #111's rungs 2–6,
#112's effects and #113's plan mode. The hook vocabulary (#81's decision
record) likewise precedes #112's per-call hooks.

Phase 3 — #114 and #115, in parallel, both deterministic. #114's view layer
(from, pin, hide) is the one-field change that answers the tailscale
request; script-backed tools are the highest-value missing piece and need no
model. Both sit on #83's tool-source interface, which owns namespaces and
collision rules — script-backed tools are #83's first ship step, recipes as
tools. #115's richer search metadata and the four example declarations are S
(its registry-dedup item is struck: mcpx pins version=latest,
internal/registry/registry.go:158, and never sees duplicates — #179), and
#115 concludes that an adapter spec over the local tailscale CLI is a better
answer than any third-party server — which makes #115 a consumer of #114's
generators and a proof of them. Both also want #109's tags (#115's miss log and
#109's failed-search record are the same record).

Phase 4 — #110. By now the deterministic halves are shipped and it is clear
exactly which five jobs want a model: query expansion (#109 rung 7), explain and
propose (#111 rungs 2–6), prompt hooks (#112), operation routing (#113), and
spec generation (#114). That is five one-shot completions, which is the evidence
for #110's Approach C (a thin Provider interface mcpx owns) over its Approach
B (a Go agent framework) — none of the five is an agent loop.

Phase 5 — #112's prompt half, then #113's router. #112 is the smaller of the
two and its pre/post/onError hooks exercise the provider layer at low
blast radius. #113 comes last because its Approach B (session operations,
force-detach, resume, mcpx install) depends on #76 and on settling what a
session even is (#6, #78), and its router cannot be better than the operation
surface it routes to.

Explicitly deferred, from #113 itself: arbitrary provisioning ("install any
language/tool/framework/library, clone whatever repo" by prompt) is the only
genuinely agentic operation in the theme and #113 defers it pending a
confinement answer. The declared-dependency and managed-provisioning rungs
below it belong with the runtimes-and-dependencies tracker (#103, #104), not
here.

Ease / impact

Issue Ease Impact Note
#186 S med one definition of "close" for search, diagnostics and the launcher; fixing a false positive once fixes it everywhere
#109 M (S for tags + typos alone; M for the full lexical ladder; L if the semantic rung is included) high "search is the entry point to zero-context discovery, and a miss there costs an agent a full catalogue load"
#111 L overall; the first two items (wire diagnose.CallError — now #116's, in flight — and add call frames) are S and should ship independently of everything else here high "the difference between 'it failed' and 'here is what worked, here is exactly what was wrong, here is the one-line fix'"
#185 M med (high once #111, #112 or #113 implements a dial) one clamp in the resolver instead of one per dial
#114 L overall; the tailscale-unblocking toolViews.from/pin/hide is S–M, script-backed tools M, virtual cross-server namespaces M–L, spec generation L high "turns mcpx from a router into a place where a personal tool surface is composed, and script-backed tools alone make recipes first-class"
#115 M (S for richer metadata + the four example declarations — registry dedup struck, see #179; M for mcpx registry add end-to-end and the doctor recommendation; M for the feedback/miss store) medium-high "the doctor recommendation and the miss log are the parts that keep paying; the four servers are a day's config each once adapters are the route"
#110 L (M for the Provider interface + one provider + settings; L including profiles, plugin backend and local sampling answers; XL if mcpx-as-an-OpenAI-proxy is in scope — it should not be, split it) high "every other issue in this theme depends on where the model comes from"
#112 M (S for the deterministic half — much of it already ships as script.* launcher phases, so what remains is exposing them per call with a typed context; M with prompt hooks and effects; L if stop/resume gets its own machinery rather than reusing tasks) medium-high "what makes one script file portable across environments without the script knowing where it runs, which is the same goal #40 had for artifacts"
#113 L overall; the session/detach operations are M, the prompt-routing layer is M given /v1/intent exists, mcpx install is M, and provisioning is L–XL and should be split out medium-high "mostly it makes an existing surface reachable by people who do not have the ops table memorised, which is the actual complaint"

Warnings

Related

Related: #177 (cross-cutting: a promise and a behaviour that disagree), #173 (extensibility), #174 (surfaces). #116 (diagnose.CallError built, tested, never called — rung 0 of
#111, in flight, claimed by the cross-cutting "a promise and a behaviour that disagree"
tracker, referenced here and not a child), #179 (registry search gaps; disproved
#115's dedup premise), #102 (an adapted binary is not script-callable — same
tracker, and the structural reason behind #83 which #114 builds on), #83
(tool sources, namespaces and collision rules — owner of #181 collision 4), #81
(hook vocabulary — owner of collision 2), #6 (event store — the home for #115's
miss records and #113's session resume), #40 (closed, fixed in #57: artifacts
and ExecOptions — the vehicle for #111's proposed scripts and the home for
#112's hooks; "not a new method, an option" is the governing precedent for this
whole tracker), #41 (closed, fixed in #58: diagnose, recipes, /v1/intent,
elicitation defaults — #109, #111, #112 and #113 are all direct continuations
of it), #47 (opencode v2 plugin — ctx.generate.text is one of #110's
backends), #48 (harness-free plugin core), #52 (closed, fixed in #182: e2e
daemons are now stopped via the info files and exit after 60 s idle), #76 (CLI
for /v1-only ops — a hard prerequisite for #113; in flight), #77 (protocol
follow-ups — error-code renumbering in 2026-07-28 affects #111's -32602
catch, and Sampling's deprecation belongs there too), #78 (daemon state and
cache correctness — the schema-cache trap already silently disabled the
destructive-call policy once), #79 (faster CLI and exec — search must stay
instant and hooks must not regress exec latency), #80–#88 (extensibility and
surfaces; #83 in particular is the design #114's script-backed tools and #102
both belong to), #159 (docs that contradict the code — docs/consumer.md's
provider recommendation is now an instance), #172 (undeclared MCPX_*
variables — every model.*, repair.* and hook setting proposed here must go
through the one registry).

Security/auth deferred; see tracker.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    History carried over from dezren39/darwin-nix#176 (verbatim, oldest first):


    @dezren39 · 2026-09-30T11:57:54Z

    Issues pass (2026-09-30, at 05c78b2).

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. 14 remaining items

  6. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: repo-worker-code (lane code-h)
    • Session / ID: queue task 7777
    • Found via: repo-health-code-pilot atomic claim
    • Task: Triage mcpx: the AI layer and search -- where a model comes from, and everything that would use one (tracker) #1891 (mcpx: the AI layer and search — where a model comes from, and everything that would use one; tracker).
    • Fresh state: Issue OPEN; labels carried no hard stops (enhancement, task/triage, source/creator). Claim labels synced by this lane.
    • Handoff: Execution-lane assignment for task 7777 is opencode; the laptop claimant launches the bound opencode session, which drives the triage to its terminal state. This lane does not work the task directly.
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/none). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  10. removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestqueue/claimedQueue worker lifecycle statesource/creatorFiled by the new-issue-creator jobstatus/in-progressQueue worker lifecycle statetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions