Beagle SCM
Context
RULING 2026-07-10 (extends BE-046 "context = cwd AND the argument"): the launch argument's PATH counts too, not just its worktree — jab cat f then :vim must open f, no navigation required.
- Today the pager edge (core/loop.js, BE-046) threads navCwd(ctxDir) — a DIR/worktree context; the CLI arg's file never enters the tracked context, so a bare
:vim on the launch view refuses VIMNONE (BE-047 nuance).
- A nav'd view already carries its file (view.uri via _driveApply); ONLY the launch view lacks it.
Goals
- the initial pager context = navCwd(ctxDir) + the FIRST path-bearing launch arg's wt-relative path (the same context shape a nav to that file would set); authority-only args (
//WT) stay authority-only.
jab cat some/file + :vim opens the file; likewise a bare :diff or :why applies to THAT file — any bare view verb composes over the launch file context (no per-verb plumbing).
jab status //WT + :diff keeps the BE-046 behavior (no phantom path on authority-only launches).
Constraints
- compose via the URI class off the run's resolved slots (argRel/navCwd) — no string surgery; context still NEVER scavenged from rendered hunks (Nav law).
- builds on the BE-047 worktree's loop.js changes (be.context threading) — same worktree, same agent.
WIP
Design decisions
- _launchContext (core/loop.js): context = navCwd(ctxDir); a path-bearing first arg (non-transport, must stat — a
grep pattern word never folds) resolves argRel→wtpath and the context becomes navCwd(<that path>) — byte-identical to navigating there; //WT args stay path-less (authorityRepo already stripped them) — BE-046 preserved.
- the fold alone can't deliver ":diff applies to that file" (diff no-args is whole-wt BY DESIGN, why no-args emits nothing) — so at the context reentry a NO-ARG VIEW verb (never a mutation; vim reads be.context itself) whose context names a regular FILE gets that file pushed as its subject (
/sub/f rooted form).
- side effect of the generic subject rule: EVERY no-arg view from a file-bearing context is file-scoped now (
:log after jab cat f = f's history); reverting to fold-only is deleting one args.push block in _cli.
TODOs
Blockers and bummers
- change sits UNCOMMITTED in work/BE-047 (with BE-047); suite 173/174 = baseline (the 1 red = pre-existing be-js-get-oddname), orchestrator re-ran the 6 context-sensitive cases green.
- NEEDS gritzko's nod: the no-arg-view subject rule generalizes past :diff/:why — any bare view verb after
jab cat f is f-scoped; one-block revert if unwanted.
Outcome