Skip to content

docs(arch): ADR-0027 LLM-driven project discovery (proposed)#6

Merged
farchanjo merged 2 commits intomainfrom
docs/adr-0027-llm-driven-discovery
Apr 27, 2026
Merged

docs(arch): ADR-0027 LLM-driven project discovery (proposed)#6
farchanjo merged 2 commits intomainfrom
docs/adr-0027-llm-driven-discovery

Conversation

@farchanjo
Copy link
Copy Markdown
Owner

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.

  • Operator-curated registry → directory IS the source of truth. LLM (Claude Code) supplies working_directory per tool call; daemon walks up to schema.toml, resolves identity, lazy-wires ProjectInstance.
  • N URL-path mounts → single /mcp endpoint with single workstation bearer.
  • N per-project endpoint.toml files → one global endpoint.toml at ~/Library/Application Support/schema/endpoint.toml (macOS) / ~/.local/state/schema/endpoint.toml (Linux).
  • Trust model: ADR-0008 per-store physical layout makes cross-bleed impossible regardless of LLM-supplied path.

Slices 1–4b remain on main until the refactor PRs land. Operator-facing deployment still defaults to ADR-0019 per-project units; no production impact today.

Test plan

  • Status: proposed. Acceptance gated on operator confirmation in PR review.
  • Refactor plan documented in ## Slice rollback / refactor plan: 4 follow-up PRs (auth + registry deletion; single-endpoint rewrite; canary E2E fitness function; index/runbook amendments).
  • Canary fitness function shape redefined in ## Fitness function — single endpoint, two-tool-call sequence with distinct working_directory parameters, ALPHA-CANARY/BETA-CANARY assertions across every retrieval tool plus reset isolation + lazy-wiring map-size + negative no-schema.toml path.
  • ADR-0026 driver-preservation explicit (single ONNX, ADR-0008 isolation, provable isolation).
  • ADR-0026 status updated in index to "partially superseded by 0027 (routing/membership specifics)". Forward-pointing amendment in ADR-0026 itself lands in the refactor PRs.
  • CI lint job green (docs-only PR — should be trivial)
  • Operator confirmation comment on this PR before flipping to accepted

🤖 Generated with Claude Code

farchanjo and others added 2 commits April 26, 2026 23:55
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>
@farchanjo farchanjo merged commit 20051dd into main Apr 27, 2026
1 check passed
@farchanjo farchanjo deleted the docs/adr-0027-llm-driven-discovery branch April 27, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant