Skip to content

feat(memdir): port the Searching-past-context prompt section; keybindings placeholder truth - #639

Merged
ericleepi314 merged 1 commit into
mainfrom
memdir/searching-past-context
Jul 4, 2026
Merged

feat(memdir): port the Searching-past-context prompt section; keybindings placeholder truth#639
ericleepi314 merged 1 commit into
mainfrom
memdir/searching-past-context

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

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 in my-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 _openBuildDefaults table 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, the omission reached every system prompt). Ported as always-emit: 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 search + the port's saved-session store (~/.clawcodex/sessions/ *.json) as the transcript-search target. Wired at both 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, 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 at src/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 _openBuildDefaults consultation 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

  • 4 new pins in tests/test_memdir_memdir.py: section content (both Grep forms + the narrow-terms line), 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; test_porting_workspace (placeholder pin) green.
  • Full suite at the 6-failure baseline (7766 passed).
  • Critic loop: five dispositions reviewed (2 APPROVE first-pass, 3 REVISE→fixed); implementation reviewed on the revision round.

🤖 Generated with Claude Code

…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
ericleepi314 merged commit c8272ef into main Jul 4, 2026
@ericleepi314
ericleepi314 deleted the memdir/searching-past-context branch July 4, 2026 15:16
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant