docs(arch): ADR-0027 LLM-driven project discovery (proposed)#6
Merged
docs(arch): ADR-0027 LLM-driven project discovery (proposed)#6
Conversation
Architectural pivot. ADR-0026's drivers (single ONNX, ADR-0008 isolation,
provable cross-project isolation) are preserved; what changes is who decides
project membership and how a request gets scoped to a project.
* Operator-curated registry (ADR-0026 slice 2a/3) → directory IS the source
of truth. The LLM (Claude Code) supplies `working_directory` per tool
call; the daemon walks up to find `schema.toml`, resolves the project,
and lazy-wires a `ProjectInstance` cached for the daemon's lifetime.
* N URL-path mounts (ADR-0026 slice 4) → single `/mcp` endpoint with a
single workstation bearer. Per-tool dispatch.
* N per-project `endpoint.toml` files (ADR-0026 slice 4b) → one global
`endpoint.toml` carrying the workstation URL + bearer.
* Trust model: LLM-supplied paths are trusted because ADR-0008's per-store
layout makes cross-bleed impossible by physical construction. Documented
as an explicit assumption in `## Decision Drivers`.
Slices 1–4b remain on `main` until refactor PRs land — the
operator-facing deployment still defaults to ADR-0019 per-project units,
so no production user is affected by this pivot. Refactor plan in
`## Slice rollback / refactor plan` (4 PRs: deletions, single-endpoint
rewrite, canary fitness function E2E, index/runbook amendments).
Status: `proposed`. Acceptance gated on operator confirmation and on the
canary fitness function (single endpoint, two-tool-call sequence with
distinct `working_directory` parameters, ALPHA-CANARY/BETA-CANARY) turning
green in CI.
Index entry added; ADR-0026's status updated to record the partial
supersession ("drivers preserved; routing/membership specifics partially
superseded by 0027"). Forward-pointing amendment in ADR-0026 itself, plus
the runbook migration update, land in the post-acceptance refactor PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Status flips proposed → accepted. Refactor sequence in §"Slice rollback / refactor plan" remains the merge gate; the canary fitness function E2E (`tests/e2e/test_adr0027_isolation.py`) flips this from "accepted (impl gated)" to "accepted (live)" once green in CI on the cutover PR. Index entry updated to reflect the acceptance. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Architectural pivot. ADR-0026's drivers carry over (single ONNX, ADR-0008 isolation, provable cross-project isolation); what changes is who decides project membership and how a request is scoped to a project.
working_directoryper tool call; daemon walks up toschema.toml, resolves identity, lazy-wiresProjectInstance./mcpendpoint with single workstation bearer.endpoint.tomlfiles → one globalendpoint.tomlat~/Library/Application Support/schema/endpoint.toml(macOS) /~/.local/state/schema/endpoint.toml(Linux).Slices 1–4b remain on
mainuntil the refactor PRs land. Operator-facing deployment still defaults to ADR-0019 per-project units; no production impact today.Test plan
proposed. Acceptance gated on operator confirmation in PR review.## Slice rollback / refactor plan: 4 follow-up PRs (auth + registry deletion; single-endpoint rewrite; canary E2E fitness function; index/runbook amendments).## Fitness function— single endpoint, two-tool-call sequence with distinctworking_directoryparameters, ALPHA-CANARY/BETA-CANARY assertions across every retrieval tool plus reset isolation + lazy-wiring map-size + negative no-schema.tomlpath.lintjob green (docs-only PR — should be trivial)accepted🤖 Generated with Claude Code