feat(memdir): port the Searching-past-context prompt section; keybindings placeholder truth - #639
Merged
Merged
Conversation
…ings placeholder truth Small-folder closes from the get-parity-by-folder sweep (memdir/ + keybindings/), critic round. MEMDIR-1 — the critic caught a live gap behind a flag misread: my close verified GrowthBook call-site DEFAULT ARGS, but the vendored stub's _openBuildDefaults table (growthbook.ts:19-24) sets tengu_coral_fern TRUE, so the reference build emits buildSearchingPastContextSection (memdir.ts:375-407) into every user's memory prompt — and Python's builders omitted it, with load_memory_prompt live in prompt_assembly. Ported as always-emit (no flag system here; open-build behavior is the reference): build_searching_past_context_section in src/memdir/memdir.py — Grep-tool invocation forms (this port always ships the Grep tool; TS's shell-grep branch covers ant-native/REPL modes it doesn't have), memory dir *.md + the port's saved-session store (~/.clawcodex/sessions/ *.json) as the transcript-search target. Wired at the two live TS call sites: build_memory_lines tail (memdir.ts:263) and the combined team prompt after extra guidelines (teamMemPrompts.ts:96). The third TS site (:366) is the KAIROS daily-log builder — deferred with its mode (Slice D), correctly not wired. isExtractModeActive (also _openBuildDefaults-ON) reclassified in the gap doc as a deferred feature with owner (query/stop-hooks docket), not a memdir residual. keybindings/ — placeholder docstring (src/keybindings/__init__.py) restated: it pointed to src/tui/keybindings.py, deleted with the Textual TUI in the UI-consolidation (PR #566), and a superseded ch13 plan. Now states the current truth (defaults live in the kept ui-tui client; customization gate resolves false in open builds — key absent from _openBuildDefaults). Comment-only; the placeholder stays load-bearing for reference_data snapshots (tests/test_porting_workspace.py). tests: 4 new pins (section content incl. both Grep forms; build_memory_lines ends with the section; build_memory_prompt keeps it BEFORE the MEMORY.md block, matching TS :293 composition; combined prompt ends with it exactly once). memdir suites 43 green; full suite at the 6-failure baseline (7766). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ericleepi314
added a commit
that referenced
this pull request
Jul 7, 2026
…ings placeholder truth (#639) Small-folder closes from the get-parity-by-folder sweep (memdir/ + keybindings/), critic round. MEMDIR-1 — the critic caught a live gap behind a flag misread: my close verified GrowthBook call-site DEFAULT ARGS, but the vendored stub's _openBuildDefaults table (growthbook.ts:19-24) sets tengu_coral_fern TRUE, so the reference build emits buildSearchingPastContextSection (memdir.ts:375-407) into every user's memory prompt — and Python's builders omitted it, with load_memory_prompt live in prompt_assembly. Ported as always-emit (no flag system here; open-build behavior is the reference): build_searching_past_context_section in src/memdir/memdir.py — Grep-tool invocation forms (this port always ships the Grep tool; TS's shell-grep branch covers ant-native/REPL modes it doesn't have), memory dir *.md + the port's saved-session store (~/.clawcodex/sessions/ *.json) as the transcript-search target. Wired at the two live TS call sites: build_memory_lines tail (memdir.ts:263) and the combined team prompt after extra guidelines (teamMemPrompts.ts:96). The third TS site (:366) is the KAIROS daily-log builder — deferred with its mode (Slice D), correctly not wired. isExtractModeActive (also _openBuildDefaults-ON) reclassified in the gap doc as a deferred feature with owner (query/stop-hooks docket), not a memdir residual. keybindings/ — placeholder docstring (src/keybindings/__init__.py) restated: it pointed to src/tui/keybindings.py, deleted with the Textual TUI in the UI-consolidation (PR #566), and a superseded ch13 plan. Now states the current truth (defaults live in the kept ui-tui client; customization gate resolves false in open builds — key absent from _openBuildDefaults). Comment-only; the placeholder stays load-bearing for reference_data snapshots (tests/test_porting_workspace.py). tests: 4 new pins (section content incl. both Grep forms; build_memory_lines ends with the section; build_memory_prompt keeps it BEFORE the MEMORY.md block, matching TS :293 composition; combined prompt ends with it exactly once). memdir suites 43 green; full suite at the 6-failure baseline (7766). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
ericleepi314
added a commit
that referenced
this pull request
Jul 21, 2026
…ings placeholder truth (#639) Small-folder closes from the get-parity-by-folder sweep (memdir/ + keybindings/), critic round. MEMDIR-1 — the critic caught a live gap behind a flag misread: my close verified GrowthBook call-site DEFAULT ARGS, but the vendored stub's _openBuildDefaults table (growthbook.ts:19-24) sets tengu_coral_fern TRUE, so the reference build emits buildSearchingPastContextSection (memdir.ts:375-407) into every user's memory prompt — and Python's builders omitted it, with load_memory_prompt live in prompt_assembly. Ported as always-emit (no flag system here; open-build behavior is the reference): build_searching_past_context_section in src/memdir/memdir.py — Grep-tool invocation forms (this port always ships the Grep tool; TS's shell-grep branch covers ant-native/REPL modes it doesn't have), memory dir *.md + the port's saved-session store (~/.clawcodex/sessions/ *.json) as the transcript-search target. Wired at the two live TS call sites: build_memory_lines tail (memdir.ts:263) and the combined team prompt after extra guidelines (teamMemPrompts.ts:96). The third TS site (:366) is the KAIROS daily-log builder — deferred with its mode (Slice D), correctly not wired. isExtractModeActive (also _openBuildDefaults-ON) reclassified in the gap doc as a deferred feature with owner (query/stop-hooks docket), not a memdir residual. keybindings/ — placeholder docstring (src/keybindings/__init__.py) restated: it pointed to src/tui/keybindings.py, deleted with the Textual TUI in the UI-consolidation (PR #566), and a superseded ch13 plan. Now states the current truth (defaults live in the kept ui-tui client; customization gate resolves false in open builds — key absent from _openBuildDefaults). Comment-only; the placeholder stays load-bearing for reference_data snapshots (tests/test_porting_workspace.py). tests: 4 new pins (section content incl. both Grep forms; build_memory_lines ends with the section; build_memory_prompt keeps it BEFORE the MEMORY.md block, matching TS :293 composition; combined prompt ends with it exactly once). memdir suites 43 green; full suite at the 6-failure baseline (7766). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Small-folder closes from the get-parity-by-folder sweep —
memdir/(one live gap ported) +keybindings/(placeholder housekeeping). Five folders were dispositioned in this batch (keybindings/,memdir/,migrations/,moreright/,native-ts/— docs inmy-docs/get-parity-by-folder/); this PR carries the two code changes that fell out.MEMDIR-1 — the "Searching past context" prompt section. The critic caught a flag misread in my close: I verified GrowthBook call-site default args, but the vendored stub's
_openBuildDefaultstable setstengu_coral_ferntrue — so the reference build emitsbuildSearchingPastContextSection(memdir.ts:375-407) into every user's memory prompt, and Python's builders omitted it (withload_memory_promptlive in prompt assembly, the omission reached every system prompt). Ported as always-emit:build_searching_past_context_sectioninsrc/memdir/memdir.py— Grep-tool invocation forms (this port always ships the Grep tool; TS's shell-grep branch covers ant-native/REPL modes it doesn't have), memory-dir*.mdsearch + the port's saved-session store (~/.clawcodex/sessions/*.json) as the transcript-search target. Wired at both live TS call sites:build_memory_linestail (memdir.ts:263) and the combined team prompt after extra guidelines (teamMemPrompts.ts:96). The third TS site (:366) is the KAIROS daily-log builder — deferred with its mode, deliberately not wired.isExtractModeActive(also_openBuildDefaults-ON) is reclassified in the gap doc as a deferred feature with an owner (query/stop-hooks docket), not a memdir residual.keybindings/ housekeeping.
src/keybindings/__init__.py's docstring pointed atsrc/tui/keybindings.py— deleted with the Textual TUI in the UI-consolidation (#566) — and a superseded plan. Restated to the current truth (defaults live in the kept ui-tui client; the customization gate resolves false in open builds — key absent from_openBuildDefaults). Comment-only; the placeholder stays load-bearing for reference_data snapshots.Methodological note recorded in the docs: per-flag
_openBuildDefaultsconsultation is now on the sweep's verification checklist (resolver, not call-site default) — the same table proved one flag ON (coral_fern → this port) and one absent (herring_clock → the existing env-var substitution stands).Verification
tests/test_memdir_memdir.py: section content (both Grep forms + the narrow-terms line),build_memory_linesends with the section,build_memory_promptkeeps it before the MEMORY.md block (matching TS :293 composition), combined prompt ends with it exactly once.test_porting_workspace(placeholder pin) green.🤖 Generated with Claude Code