Skip to content

Commit 066d88b

Browse files
committed
docs(monorepo): refresh current runtime references
1 parent 2ed7952 commit 066d88b

File tree

3 files changed

+52
-45
lines changed

3 files changed

+52
-45
lines changed

docs/01-overview.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# System overview
22

3-
This document describes the current AILSS runtime and the transition baseline established by
4-
issue #175.
3+
This document describes the current AILSS runtime established through issues #175, #179,
4+
and #181.
55

6-
Today, the implemented system is split into **three parts**. The next baseline keeps those
7-
parts in place while adding a Python-first local backend surface for retrieval, agent
8-
orchestration, evaluation, and lightweight observability.
6+
Today, the implemented system is split into **three current runtime parts** backed by the
7+
Python service app in `apps/api`: the indexer, the localhost MCP service, and the
8+
Obsidian plugin shell. `packages/core` remains a shared TypeScript utility package, not a
9+
launched runtime service.
910

1011
## 1) Indexer
1112

@@ -71,7 +72,8 @@ Transport / client integration:
7172
- Drop cached session ID
7273
- Send a fresh `initialize` request to obtain a new `Mcp-Session-Id`
7374
- Retry the original request once with the new session ID
74-
- Local dev still supports running the MCP server over stdio (CLI).
75+
- Local dev can run the Python MCP service directly from the CLI
76+
(`uv run --directory apps/api ailss-mcp-http`).
7577
- Optional shutdown endpoint (disabled by default):
7678
- If `AILSS_MCP_HTTP_SHUTDOWN_TOKEN` is set (or `startAilssMcpHttpServer({ shutdown: { token } })` is used), the server exposes `POST /__ailss/shutdown`.
7779
- This endpoint requires the shutdown token (separate from the normal MCP request token) and shuts down the HTTP server + all MCP sessions.
@@ -110,11 +112,11 @@ Write tools are gated and not exposed by default:
110112
Responsibilities:
111113

112114
- Display recommendations in a UI.
113-
- Center the local runtime around the Python backend for health, retrieval, agent, eval,
114-
and status flows.
115+
- Center the local runtime around the Python backend, Python MCP service, and Python
116+
indexer in `apps/api`.
115117
- Keep the local index DB up to date (manual reindex and optional debounced auto-index).
116-
- Treat the MCP transport and existing indexer as transition components while the current
117-
migration remains in progress.
118+
- Keep explicit launch overrides available for users who need custom `uv run --directory
119+
... apps/api` paths.
118120
- Only perform vault writes when explicitly requested (for example an MCP write tool call with `apply=true`).
119121
- Applying changes can be implemented either via the Obsidian Vault API or via direct filesystem writes (but must remain gated and auditable).
120122

@@ -124,19 +126,20 @@ Responsibilities:
124126
- Recommendation = DB read
125127
- Apply = file write; requires an explicit action (Obsidian UI or MCP write tool with `apply=true`, including `capture_note`/`edit_note`).
126128

127-
## Transition baseline (issue #175)
129+
## Current runtime baseline
128130

129131
- Obsidian plugin remains the local UX shell and launcher.
130-
- Existing Node/TypeScript packages remain the transition baseline for indexing, MCP
131-
transport, and gated vault writes.
132-
- The Python-first backend surface now owns the local API contracts for retrieval, agent
132+
- `apps/api` owns the shipped local runtime for indexing, MCP transport, retrieval, agent
133133
orchestration, evaluation, and lightweight observability.
134-
- Plugin startup, status, and troubleshooting flows should center on that Python backend
135-
surface while the Node-owned components remain explicit transition layers.
134+
- `packages/core` remains the shared TypeScript utility/schema package, not an
135+
independently launched service.
136+
- Plugin startup, status, and troubleshooting flows center on the Python-owned runtime.
136137
- The current backend contract is `GET /health`, `POST /retrieve`, `POST /agent/run`, and
137138
`POST /eval/run`, with plugin-managed lifecycle plus a guarded shutdown path for stale
138139
local processes.
139140
- Local-first, single-user scope remains the project boundary for this phase.
140141

141142
See `docs/architecture/python-first-local-agent-backend.md` for the service boundaries,
142-
contract details, and acceptance criteria.
143+
contract details, and acceptance criteria. See
144+
`docs/architecture/legacy-node-typescript-runtime-removal.md` for the retirement record of
145+
the removed Node runtime path.

docs/03-plan.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
This document lists an implementation sequence that starts small and then expands.
44
It also records a few **hard decisions** so code and docs stay consistent.
55

6+
> Status note (2026-03-22): the migration to a Python-owned local runtime is complete.
7+
> `apps/api` now owns the indexer CLI, localhost MCP service, retrieval, agent flow, and
8+
> eval path. Historical sections below preserve the staged implementation record and may
9+
> mention retired Node runtime paths; use `Current status`, `docs/01-overview.md`, and
10+
> `docs/architecture/python-first-local-agent-backend.md` for the live architecture.
11+
612
## 0) Confirm assumptions / decisions
713

814
- Primary goal: **JD-aligned portfolio strengthening** for backend/agent roles (closest to the Sendbird/Socra profile), not a cloud SaaS launch.
@@ -16,48 +22,46 @@ It also records a few **hard decisions** so code and docs stay consistent.
1622
- Codex can trigger explicit write tools over MCP (no per-edit UI flow) once enabled.
1723
- Connection is configured globally once (e.g. `~/.codex/config.toml`) via a URL + token.
1824
- Vault path: the vault is **external** and provided via configuration (e.g., `AILSS_VAULT_PATH`).
19-
- Architecture direction for the next phase:
25+
- Architecture direction for the current phase:
2026
- Keep the Obsidian plugin as the local UX shell / launcher.
21-
- Keep the current Node/TypeScript packages as the working baseline during transition.
22-
- Add a **Python-first backend surface** for retrieval, agent orchestration, and evaluation.
27+
- `apps/api` owns the local runtime for indexing, MCP, retrieval, agent orchestration,
28+
and evaluation.
29+
- `packages/core` remains the shared TypeScript utility/schema package.
2330
- Non-goals for this phase:
2431
- multi-user SaaS / remote hosting
2532
- heavy cloud-first infra for its own sake
2633
- Samsung-specific manufacturing, optimization, or embedded scope
2734

2835
## Current status
2936

30-
- Indexer MVP exists (`packages/indexer`)
31-
- Supports full-vault indexing and path-scoped updates (`--paths`)
32-
- Supports explicit DB reset (`--reset-db`) when switching embedding models
33-
- Validates DB embedding identity (model/dimension) and fails fast on mismatch
34-
- Full-vault runs prune DB entries for deleted files
35-
- Has a deterministic wrapper test (stubbed embeddings; no network)
36-
- MCP server MVP exists (`packages/mcp`)
37-
- Read-first tools: `get_context`, `expand_typed_links_outgoing`, `find_typed_links_incoming`, `resolve_note`, `read_note`, `get_vault_tree`, `frontmatter_validate`, `find_broken_links`, `search_notes`, `list_tags`, `list_keywords`, `list_typed_link_rels`, `get_tool_failure_report`
38-
- Explicit write tools (gated; `AILSS_ENABLE_WRITE_TOOLS=1`): `capture_note`, `canonicalize_typed_links`, `edit_note`, `improve_frontmatter`, `relocate_note`
39-
- Transport: stdio + streamable HTTP (`/mcp` on localhost; supports multiple concurrent sessions)
37+
- Python runtime now owns the shipped local services in `apps/api`
38+
- `ailss-indexer` supports full-vault indexing, path-scoped updates (`--paths`), and
39+
explicit DB reset (`--reset-db`) when switching embedding models
40+
- `ailss-mcp-http` is the active localhost MCP surface
41+
- Read-first tools: `get_context`, `expand_typed_links_outgoing`, `find_typed_links_incoming`, `resolve_note`, `read_note`, `get_vault_tree`, `frontmatter_validate`, `find_broken_links`, `search_notes`, `list_tags`, `list_keywords`, `list_typed_link_rels`, `get_tool_failure_report`
42+
- Explicit write tools (gated; `AILSS_ENABLE_WRITE_TOOLS=1`): `capture_note`, `canonicalize_typed_links`, `edit_note`, `improve_frontmatter`, `relocate_note`
4043
- Obsidian plugin MVP exists (`packages/obsidian-plugin`)
4144
- UI: status modals for indexing and the localhost MCP service
42-
- Indexing: `AILSS: Reindex vault` command + optional auto-index on file changes (debounced; spawns the indexer process)
45+
- Indexing: `AILSS: Reindex vault` command + optional auto-index on file changes (debounced; spawns the Python indexer process)
4346
- MCP service: optional localhost MCP server for Codex (URL + token; can expose gated write tools)
4447
- Supports multiple concurrent MCP sessions (multiple Codex processes)
45-
- Python backend baseline exists (`apps/api`)
48+
- Python backend exists in `apps/api`
4649
- FastAPI app with `GET /health`, `POST /retrieve`, `POST /agent/run`, and `POST /eval/run`
4750
- Semantic retrieval over the existing SQLite + `sqlite-vec` index, plus explicit lexical baseline mode
4851
- LangGraph workflow for `retrieve -> decide -> read -> answer -> validate`
4952
- Eval dataset runner + local run/eval artifacts
50-
- Obsidian plugin now manages the local Python backend
51-
- Lifecycle: start, stop, restart, readiness wait, guarded shutdown reclaim
52-
- Commands: backend health, retrieval, grounded agent run, eval run
53+
- Shared TypeScript utilities remain in `packages/core`
5354
- Gap relative to the portfolio goal:
5455
- strong local MCP + retrieval + Obsidian integration already exist
55-
- Python backend baseline, explicit workflow orchestration, and reproducible eval now exist
56-
- remaining gaps are full LLM reasoning quality, deeper lifecycle recovery, richer eval/cost trending, and transition cleanup
57-
- transition cleanup is now split explicitly across:
58-
- issue #182 parity verification for the current MCP tool surface
59-
- issue #180 plugin runtime re-centering around the Python backend
60-
- issue #181 staged removal planning for the legacy Node/TypeScript path
56+
- Python runtime, explicit workflow orchestration, and reproducible eval now exist
57+
- remaining gaps are full LLM reasoning quality, deeper lifecycle recovery, and richer eval/cost trending
58+
- legacy runtime cleanup completed through issues #179 / #181; historical notes remain below for traceability
59+
60+
Historical note:
61+
62+
- Sections below preserve the staged implementation record. When they mention retired Node
63+
packages or transition-only runtime ownership, treat those references as historical
64+
context rather than the current architecture.
6165

6266
## 1) Design the index schema
6367

@@ -245,7 +249,7 @@ Plan:
245249
- DX: make the MCP server runnable like `npx … --vault <path>` (CLI args + published package/wrapper)
246250
- Upgrades: document schema/model change behavior (when a full reindex is required)
247251

248-
## 10) Codex integration via plugin-hosted MCP service (localhost)
252+
## 10) Codex integration via plugin-hosted MCP service (historical implementation record)
249253

250254
Goal:
251255

@@ -392,7 +396,7 @@ Fallback approach (acceptable, higher overhead): per-session subprocess
392396
- Pros: strongest isolation, simplest correctness story.
393397
- Cons: more processes, more ports, more restart surface.
394398

395-
## 11) Portfolio-aligned transition plan (Python-first, local-first)
399+
## 11) Portfolio-aligned transition plan (historical record)
396400

397401
Goal:
398402

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ This folder is organized so you can read the AILSS system docs in order: **Conte
2323
## Architecture
2424

2525
- Package structure: [architecture/packages.md](./architecture/packages.md)
26-
- Python-first local agent baseline: [architecture/python-first-local-agent-backend.md](./architecture/python-first-local-agent-backend.md)
26+
- Python-owned local runtime architecture: [architecture/python-first-local-agent-backend.md](./architecture/python-first-local-agent-backend.md)
2727
- Python parity for MCP tool surface: [architecture/python-mcp-parity.md](./architecture/python-mcp-parity.md)
28-
- Staged removal of the legacy Node/TypeScript runtime path: [architecture/legacy-node-typescript-runtime-removal.md](./architecture/legacy-node-typescript-runtime-removal.md)
28+
- Legacy Node/TypeScript runtime removal record: [architecture/legacy-node-typescript-runtime-removal.md](./architecture/legacy-node-typescript-runtime-removal.md)
2929
- Data & database: [architecture/data-db.md](./architecture/data-db.md)
3030

3131
## Ops

0 commit comments

Comments
 (0)