From b244f1e1d036c9e7c132e17b3b38f1119df7e9e1 Mon Sep 17 00:00:00 2001 From: Hare Date: Sat, 30 May 2026 09:45:10 +0900 Subject: [PATCH] plan: semantic nix profiles implementation direction --- .../thread.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/work-items/open/20260529-222850-semantic-nix-profiles/thread.md b/work-items/open/20260529-222850-semantic-nix-profiles/thread.md index e587e993..27548178 100644 --- a/work-items/open/20260529-222850-semantic-nix-profiles/thread.md +++ b/work-items/open/20260529-222850-semantic-nix-profiles/thread.md @@ -7,3 +7,26 @@ Created as a follow-up to the closed manifest profiles work item after reviewing Implementation plan written to `artifacts/implementation-plan.md`. Key recommendation: introduce a typed semantic profile artifact and manifestization step, move/centralize model catalog context-window resolution so compaction can derive from model metadata, and resolve builtin profiles in-process so normal default startup does not require external `nix`. + + + +## Plan + +## Implementation direction + +Use the worktree + sibling coder/reviewer flow. The investigation Pod found the main boundary issue to be concentrated in `crates/manifest/src/profile.rs`: profile artifacts are currently deserialized as `PodManifestConfig`, while built-in Nix files expose a manifest-shaped authoring API. + +Decisions for the implementation pass: + +- Move data-only model catalog resolution to a cycle-free place owned by `manifest` so profile manifestization can derive context-window-dependent settings. Keep live provider/client construction in `provider`. +- Introduce a semantic profile artifact format such as `insomnia.semantic-profile.v1`; top-level semantic artifacts must use `profile` metadata plus `policy`, not `manifest` / `config`. +- Resolve built-in `default` in-process so the normal default startup path does not require an external `nix` command. User/project/path Nix profiles may still require `nix eval` with clear diagnostics. +- Remove `pod.name` from built-in profiles. Direct no-arg `insomnia-pod` should preserve the current effective default Pod name `insomnia` as runtime input, while `--profile-pod-name` remains the explicit fresh-spawn override. +- Do not preserve manifest-shaped Nix profiles as the normal authoring API. `--manifest` remains the low-level concrete manifest escape hatch. +- Keep the initial semantic policy narrow: explicit model ref, explicit reasoning effort, workspace scope policy, compaction ratios/preset derived from effective context window, memory/session/web policy sufficient to reproduce current builtin behavior. +- Update docs and tests so built-in examples no longer recommend `mkManifest` or raw manifest-shaped profiles. + +Implementation should remain narrow: preserve existing profile selection semantics, source-qualified selectors, ambiguity errors, TUI/client profile selection flow, and `SpawnPod.scope` authority. + + +---