summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-24 04:02:48 +0900
committerAdam Malczewski <[email protected]>2026-06-24 04:02:48 +0900
commit13eb34133d8fe64f9c73f8d394e0af790b54c6e5 (patch)
treec2f6946e0529a38e94d3d1c0e505711667749213
parentb180cc1e03f90a139c90ef498d1c1fb449508fd7 (diff)
downloaddispatch-13eb34133d8fe64f9c73f8d394e0af790b54c6e5.tar.gz
dispatch-13eb34133d8fe64f9c73f8d394e0af790b54c6e5.zip
docs: task 2 (system-prompt cwd reconstruction) done
-rw-r--r--notes/pending-issues.md2
-rw-r--r--tasks.md19
2 files changed, 19 insertions, 2 deletions
diff --git a/notes/pending-issues.md b/notes/pending-issues.md
index 7dc1022..7e12332 100644
--- a/notes/pending-issues.md
+++ b/notes/pending-issues.md
@@ -16,7 +16,7 @@
## 2. System context builder — referenced files not loaded
-**Status:** PENDING.
+**Status:** DONE (commit `b180cc1`).
**Symptom:** The system context builder does not load referenced files that live
in the conversation's working directory. Concrete reproduction: the orchestrator
diff --git a/tasks.md b/tasks.md
index 1edba70..2a34c18 100644
--- a/tasks.md
+++ b/tasks.md
@@ -5,7 +5,24 @@
> Keep this lean and current; do not let it re-accrete a step-by-step changelog.
## Status (current)
-`tsc -b` EXIT 0 · biome clean · **1405 vitest** green.
+`tsc -b` EXIT 0 · biome clean · **1411 vitest** green.
+
+## System-prompt stale on cwd change (DONE)
+Bug: the system-prompt service constructed the resolved prompt once on the first
+turn and reused it via `get()` on subsequent turns (cache-safe design). But the
+prompt is cwd-sensitive (`[file:AGENTS.md]`, `[prompt:cwd]` variables). When a
+conversation's cwd changed after the first turn, the cached prompt was stale —
+referenced files from the new cwd were not loaded.
+- **Wave 1 — `system-prompt`:** added `getWithMeta(conversationId)` returning
+ `{ prompt, cwd }` — reads both `resolved:<id>` and a new `resolved-cwd:<id>`
+ sibling key. `construct()` now also stores the cwd. All additive, no existing
+ method signature/behavior changed. +5 tests.
+- **Wave 2 — `session-orchestrator`:** subsequent turns call `getWithMeta`,
+ compare stored cwd vs `effectiveCwd ?? process.cwd()`, and `construct` if they
+ differ (or if no stored prompt exists). Compaction path (always constructs)
+ and warm path (no system prompt) unaffected. +1 test.
+- [x] Verified: `tsc -b` EXIT 0, biome clean, **1411 vitest** pass; both in-lane.
+- No FE handoff needed (backend-only fix; no contract version bump).
## Workspace tab issue — conversation.open drops workspaceId (DONE)
Cross-repo additive fix: `conversation.open` / `conversation.statusChanged` WS