Problem
idle-compact.ts and todos.ts resolve todo directories differently:
idle-compact.ts derives path from PI_TODO_PATH or join('.pi','todos'), then applies process.cwd().
todos.ts has its own getTodosDir()/label logic and default semantics.
This can cause idle compaction to think there are no active todos when the todo tool is actually using a different directory.
Proposed solution
- Extract shared todo-dir resolution utility used by both extensions.
- Define one canonical resolution order:
PI_TODO_PATH absolute/relative
- default
.pi/todos relative to canonical runtime cwd (or explicit home-based path)
- Add tests proving both extensions see the same effective todo dir under different cwd/env combinations.
Helpful context
pi/extensions/idle-compact.ts: TODO_DIR, hasInProgressTodos() path resolution via process.cwd().
pi/extensions/todos.ts: TODO_PATH_ENV, TODO_DIR_NAME, getTodosDir(process.cwd()).
Problem
idle-compact.tsandtodos.tsresolve todo directories differently:idle-compact.tsderives path fromPI_TODO_PATHorjoin('.pi','todos'), then appliesprocess.cwd().todos.tshas its owngetTodosDir()/label logic and default semantics.This can cause idle compaction to think there are no active todos when the todo tool is actually using a different directory.
Proposed solution
PI_TODO_PATHabsolute/relative.pi/todosrelative to canonical runtime cwd (or explicit home-based path)Helpful context
pi/extensions/idle-compact.ts:TODO_DIR,hasInProgressTodos()path resolution viaprocess.cwd().pi/extensions/todos.ts:TODO_PATH_ENV,TODO_DIR_NAME,getTodosDir(process.cwd()).