Repository navigation
Use the REPL session workspace for Sidekick entries - #979
Conversation
PR #979: Use the REPL session workspace for Sidekick entries32 files, +1539 / -234 Scope🔴 PR has 1773 lines changed. Split into focused PRs. 🟡 1773 lines changed. PRs under 400 receive more thorough review. 🟡 32 files changed. Are all changes related? StructuralOxlint structural signals:
Slop✅ Slop indicators look low. Static AnalysisOxlint: 102 diagnostics across 14 files (15 rules) no-shadow (29): packages/cli/tests/fixtures/repl/issue-883/mounted-program.ts, packages/cli/tests/fixtures/repl/issue-883/recovery-phase.ts, packages/cli/src/repl/repositories/deno/provider.ts (+6) CorrectnessNo extraneous code patterns detected. |
Why
Files the Sidekick creates need to stay with their conversation. Writing
components/Greeting.mdshould make<Greeting />available to a later entry without an include option or restart.What changes
Before: Sidekick responses and submitted entries inherited project cwd, and component lookup did not include the session directory.
After: Sidekick responses and their submitted entries start beside the session journals. Relative files stay there, and session
components/follows the invocation's configured component directories in lookup. Manual entries and legacy unmarked entries keep project cwd.Bootstrap and the Environment/Entries guides teach writing a literal component definition, checking the write's output, inspecting its selected origin and invoking it in a later entry.
How it works
Placement is matched before cold startup can resume an entry and remains available after Submit reconciliation. Fresh publication and legacy first-message publication establish
components/; passive reopening creates nothing. Repository discovery and native agent placement retain the original project context.Review guide
Start with:
packages/cli/tests/repl-sidekick-journey.test.ts, the shipped session component journey.Then review:
repl-profile.tsandrepl/program.tsfor captured paths, finalization and cold placement matching.repl/session.tsandrepl/sidekick/owner.tsfor validation, entry and held-response cwd ownership.repl/sidekick/{history,model,admission}.tsandrepl/repositories/deno/{provider,files}.tsfor compatibility and replay.specs/repl-spec.mdand the corresponding architecture amendments.Look carefully at: the second cold reopen after reconciliation, replay before live I/O, and checkout routing taking precedence over workspace-only recording.
What must stay true
How to verify it
Retained focused receipts apply to signed head
2d3e698cee270a02af2b61b5791779430c9eead8: the tested candidate's patch hash matches the commit. Both original Planner and Architect independently PASS that SHA.These are existing implementation-feedback receipts; this metadata edit runs no tests. Required CI and main-health remain delivery blockers. Main is reported red at the accepted base
00f05aa9678f82fc8aa54c10230313117218523e, tracked by #978. This PR remains a draft and makes no merge-readiness claim.Scope
Included
Intentionally unchanged
xmd replsession directory as its workspace #975. Journal relocation and generic component-authoring work remain outside this slice, so the broader story stays open.New abstractions
Generated or mechanical changes
Existing profile-only test callers explicitly finalize the captured assembly. Those call-site adjustments are mechanical; the journey, storage, recovery and recorder assertions exercise the behavior. No generated artifacts change.
Risks and limitations
Scope confirmation