Repository navigation
Closed
Labels
ready-for-agentDecision-complete and ready for an AFK agentDecision-complete and ready for an AFK agent
Description
Parent
Part of #1.
What to build
Add the Assistance Policy foundation and first-party local Ollama discovery. A Workspace starts Manual. The thinker can select Local AI, connect only to http://localhost:11434, fetch and refresh models from Ollama's native tags endpoint, search the returned list, select a model, and understand unavailable or missing-model states.
This slice proves provider configuration and discovery but does not organize Notes yet.
Decisions
- Assistance Policy is per Workspace: Manual, Local AI, or Cloud AI. This slice implements Manual and Local AI behavior plus the durable enum needed later.
- New Workspaces default to Manual.
- Local host is fixed to
http://localhost:11434; no custom host field. - Local Ollama requires no credential.
- Use Ollama's native
/api/tagsresponse, not OpenAI compatibility. - Treat model identifiers as opaque strings. Do not hard-code a catalog or infer capability from brand names.
- Recognize cloud-capable models returned by the locally signed-in Ollama host without special authentication in Nodepad.
- Persist selected endpoint kind and model identifier as non-secret preferences.
- If a saved model disappears, show a typed missing-model state and require another selection; do not silently choose.
- Switching to Manual stops future provider calls and invalidates outstanding discovery work.
Acceptance criteria
- Every new Workspace displays Manual Assistance Policy.
- The thinker can select Local AI and return to Manual.
- Nodepad fetches, displays, searches, refreshes, and selects models returned from local
/api/tags. - The selected model and policy survive restart.
- Unavailable host, timeout, malformed response, empty list, and missing selected model have distinct actionable states.
- Cloud-capable model names returned locally are selectable without a Nodepad cloud key.
- No Note content is sent and no organization prompt exists in this slice.
- No custom URL, credential, model management, or hard-coded provider catalog is introduced.
Testing decisions
- Use controlled HTTP fixtures for tags success/failure; no live Ollama requirement in automated tests.
- Test stale refresh cancellation, policy switch, missing model after restart, opaque identifiers, Unicode model names, and response validation.
- UI integration covers Manual -> Local AI -> refresh/search/select -> restart -> Manual.
Blocked by
Scope fence
Do not call chat/generate, organize Notes, manage models, add direct Ollama Cloud, custom hosts, OpenRouter, OpenAI, Z.ai, or other providers.
Delivery workflow
Run prd-simplicity-audit, use a fresh implement session, then code-review, scoped fallow, focused tests and repository gates, and one PR against main.
Metadata
Metadata
Assignees
Labels
ready-for-agentDecision-complete and ready for an AFK agentDecision-complete and ready for an AFK agent
Activity
kiran-brahma commentedon Jul 23, 2026
PRD SIMPLICITY AUDIT
Feature: V0-09 Add Assistance Policy and local Ollama discovery
Date: 2026-07-23
Gate: PROCEED
MODULE MAP
src/workspace-client.ts: TypeScript facade; defines workspace/note types and invokes Tauri commands.src/workspace-snapshot.ts: React hook that loads snapshots and submits commands.src/App.tsx: Root UI orchestrator; hosts the new assistance section.src-tauri/src/workspace.rs: Rust durable state,ThinkingWorkspaceInterfacetrait, schema, snapshots.src-tauri/src/lib.rs: Tauri command registration andAppState.src-tauri/src/thinking_graph.rs: Relationship rules; untouched.src-tauri/migrations/*.sql: Schema evolution.INTERROGATION FINDINGS
thinking_workspacescolumn; owned by the workspace module.localhost:11434host, no credential: CLEAN. Constant in the new provider module./api/tagsdiscovery: CLEAN. Newollamaprovider module with an HTTP client trait seam.thinking_workspaces.selected_modelcolumn.(snapshot.selected_model, discovered_models)rather than storing a computed flag.COMPLEXITY SCORECARD
State Surface: Medium (new durable columns + transient discovery UI state)
Seam Quality: Preserved (provider module is a new seam; workspace module stays the durable-state seam)
Module Cohesion: Cohesive (provider owns HTTP+tags parsing; workspace owns persistence; UI owns selection display)
Change Blast Radius: Medium (schema, workspace trait, provider module, TS client, App UI, tests)
Incidental Complexity Load: Mostly Problem (some incidental from Tauri HTTP setup and cancellation plumbing)
Summary: The PRD introduces one cleanly separated concern—model discovery and assistance policy selection. Keeping the provider adapter behind a trait seam and the discovery state transient in the UI avoids tangling it with the durable workspace module. With the two cautions above handled as boundary rules, the plan is structurally sound.
GATE DECISION: PROCEED