261b230be8
Independent agent review of PHASE6 (manifest + baseline + plan at
4407029). Status header: Plan -> Plan + review fold-in.
BLOCKERs (RESOLVED in-place):
R1. §4 fence detector's `outside`-state dropped the leading `'``'`
chunk of a split fence — contradicted B2's local-model
split-fence requirement (4-char median chunk size). Algorithm
rewritten: outside-state now holds a tail (up to 10 chars) when
the chunk's suffix could be a fence prefix; flushes on next push.
Same accumulator pattern as the secrets streaming rehydrator.
R2. `highlighted()` file placement was ambiguous (§3 vs §12). Lives
in repl.lua (where _shq and executor are accessible);
renderer.lua exposes set_highlight(enabled, detected, highlight_fn)
and calls back. Keeps renderer.lua free of the executor require.
CONCERNs (FOLDED):
R3. PTY raw-mode toggle on every code-block render — smoke-test for
cursor flicker / SIGWINCH races before locking in. Risk row 5.
R4. tree-sitter highlight --lang X grammar is UNVERIFIED — upstream
CLI canonically takes a path with extension. Implement-time
check required; fallback path documented (extension-based
tmpfile + path arg). Added to risk row 5 + open-at-plan.
R5. :tree off semantics clarified — one-shot clear of ctx.project
+ ctx._project_opts; no "disabled" flag.
R6. cwd-coupling difference between :diff (call-time) and :tree
(scan-time) now documented in §5.
R7. :tree refresh opts caching specified — caches ctx._project_opts;
`:tree refresh` reuses last explicit opts.
R8. :reset preserves ctx.project (parity with memory_items per
Phase 4). §12 commit 1 smoke updated.
R9. Status-bump duplication between §12 commits 5e and 6 resolved
— commit 6 owns the bump.
NITs (APPLIED):
N1. §4 algorithm pseudocode now includes SOL/post-newline anchor
(mid-line backticks in prose don't open a fence).
N2. _detect_treesitter() gained a comment explaining the popen
pattern doesn't gate on exit code (B3).
N3. :diff staged shorthand dropped — meta is a thin pass-through
to git's own grammar.
N4. _scan_project_tree switched from `cd && git ...` to
`git -C <dir> ...` — no subshell, more idiomatic.
N5. Open-at-plan dir-arg bullet dropped (already decided in §6);
replaced with R3 + R4 implement-time verification items.
N6. §11 wording on #52 left as-is (cosmetic only).
PHASE6.md now 896 lines (was 701 after plan). +264/-69. Ready for
implementation phase 6 of the inner loop pending user gate.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>