4.8 KiB
Created
Created by LocalTicketBackend create.
Plan
Preflight / implementation intent
Classification: implementation-ready after narrow-yoi-worktree-sparse-exclusions landed.
Intent:
- Keep
.yoias the Yoi project records/workspace marker. - Stop using
.yoialone as the memory root marker. - Resolve repo-local memory through an explicit
memory.workspace_rootor an ancestor.yoi/memorymarker, so child worktrees can contain.yoi/tickets/.yoi/workflowwithout becoming independent memory roots.
Current code map:
crates/memory/src/workspace.rsWorkspaceLayout::resolve(cfg, default_root)currently usescfg.workspace_root.unwrap_or(default_root).memory_dir()is<root>/.yoi/memory;knowledge_dir()andworkflow_dir()are also rooted under<root>/.yoi.- Tests currently assert fallback to default root.
crates/pod/src/pod.rs- Memory extract/consolidation/tools/resident setup call
WorkspaceLayout::resolve(&memory_cfg, &self.pwd).
- Memory extract/consolidation/tools/resident setup call
crates/yoi/src/memory_lint.rs- CLI lint works with explicit workspace path and may need to keep explicit workspace behavior.
manifest::MemoryConfigcurrently usesOption<MemoryConfig>presence as enablement andworkspace_root: Option<PathBuf>as the explicit root. There is not yet a separateenabled = falsefield.
Implementation direction:
- Add a small resolver in
memory::WorkspaceLayoutor nearby that:- honors explicit
memory.workspace_rootexactly as today; - when no explicit root exists, walks ancestors from the default root and selects the nearest ancestor that contains
.yoi/memory; - does not select a directory merely because it contains
.yoi; - if no ancestor
.yoi/memoryexists, uses an explicit, documented fallback that does not silently interpret.yoialone as the memory root. Prefer fail/no-marker behavior for automatic memory operations over creating child-worktree memory; if a lazy-create path is needed, keep it tied to explicit configuration rather than implicit.yoipresence.
- honors explicit
- Preserve
.yoi/knowledge/.yoi/workflowproject-record lookup semantics as much as possible; be explicit if moving memory root also changes knowledge/workflow layout root in a way that needs follow-up. - Do not implement user-data overlay fallback unless it is already supported and clearly smaller.
- If adding a manifest
enabledfield would be broad, do not do it in this slice; document that current explicit disable is represented by absence of[memory]and keep the ticket focused on.yoi/memorymarker resolution.
Tests to add/update:
- Explicit
workspace_rootstill wins. - No explicit root + ancestor
.yoi/memoryselects that ancestor. - Child worktree containing
.yoi/tickets/.yoi/workflowbut no.yoi/memorydoes not select the child as memory root. .yoialone does not select a memory root.- Existing explicit workspace/lint behavior remains sensible.
Validation:
- Run
cargo test -p memory workspace --libor equivalent focused memory tests. - Run relevant
cargo test -p pod memory --libif Pod memory setup tests are affected. - Run
cargo test -p yoi memory --libif memory lint behavior changes. - Run
cargo fmt --check,git diff --check, andtarget/debug/yoi ticket doctor.
Intake summary
Implementation-ready after narrowed worktree sparse exclusions: keep .yoi as project records marker, resolve repo-local memory from explicit memory.workspace_root or nearest ancestor .yoi/memory, and ensure .yoi alone does not make child worktrees independent memory roots.
State changed
Ticket intake complete; workflow_state intake -> ready.
Implementation report
Delegation
Implementation delegated to child Pod memory-root-marker-coder-20260607 in worktree .worktree/memory-root-uses-yoi-memory-marker on branch work/memory-root-uses-yoi-memory-marker.
The worktree uses the new narrowed sparse rules:
.yoiproject records are visible;.yoi/memoryis absent.
Scope:
- Keep
.yoias project records marker. - Resolve memory from explicit
memory.workspace_rootor nearest ancestor.yoi/memory. - Do not treat
.yoialone as memory root. - Do not add broad memory enable/disable redesign.
- Do not change child worktree sparse rules; that has already landed.
The child should commit implementation work in the child worktree and report diff/tests. Merge, review, Ticket closure, and cleanup remain with the parent/human workflow.