vNext architecture from the research doc: replace the noisy multi-rail planner with a closed loop (world truth → invariant check) and a single utility-driven goal authority. The LLM stays entirely off the tick path.
L1 services (fix no_drop / silent pathfinder hang first):
InventoryLedger — diff-based "did I actually get it" verifier; acquire-food now confirms via ledger.gainedSince instead of the unreliable count/playerCollect.
L3 plan — unify the three competing rails (curriculum / manifesto / storyline):
Settlement Contract — ordered M0–M9 milestones, each invariant-checked against an authoritative world view (early steps delegate to the proven curriculum; late game adds farming).
InvariantChecker + predicate library; GoalManager picks the lowest unmet milestone via utility argmax (food-urgency preempts, DEPS-style).
Wired into the scheduler: bot.js precomputes snapshot.contract; reflex.js consumes it in place of the storyline rail. Manifesto L0 (alive emergencies) still preempts.
Eval + robustness:
Village Score — single 0..1 progress metric on the snapshot + TUI build line.
survive.dig-in skill + dusk_dig_in mode (exposed at night, no bed → dig for cover, safety-gated).
## Summary
vNext architecture from the research doc: replace the noisy multi-rail planner with a **closed loop** (world truth → invariant check) and a single utility-driven goal authority. The LLM stays entirely off the tick path.
**L1 services** (fix `no_drop` / silent pathfinder hang first):
- `InventoryLedger` — diff-based "did I actually get it" verifier; `acquire-food` now confirms via `ledger.gainedSince` instead of the unreliable count/`playerCollect`.
- `MotionService.gotoSafe` — wall-clock timeout + progress watchdog + `path_update`(noPath/timeout) → structured `{reached|stuck|timeout|nopath}`.
**L3 plan** — unify the three competing rails (curriculum / manifesto / storyline):
- **Settlement Contract** — ordered M0–M9 milestones, each invariant-checked against an authoritative world view (early steps delegate to the proven curriculum; late game adds farming).
- `InvariantChecker` + predicate library; `GoalManager` picks the lowest unmet milestone via utility argmax (food-urgency preempts, DEPS-style).
- Wired into the scheduler: `bot.js` precomputes `snapshot.contract`; `reflex.js` consumes it in place of the storyline rail. Manifesto L0 (alive emergencies) still preempts.
**Eval + robustness:**
- **Village Score** — single 0..1 progress metric on the snapshot + TUI `build` line.
- `survive.dig-in` skill + `dusk_dig_in` mode (exposed at night, no bed → dig for cover, safety-gated).
- `approach_block` helper (GoalNear + `lookAt`, avoids `GoalLookAtBlock` raycast bug #341).
Deferred (tracked in local `plans/v0.4.0-vnext.md`): explicit Plan4MC skill-graph (contract already is an ordered graph), generic per-skill worldDelta validation, embedding-indexed scenario memory, Baritone fallback (PRD §4.4 rejects it).
> Note: this branch builds on the unmerged `v0.3.1`, so the diff includes its commits.
## Test plan
- [x] `npm test` — 450/450 green (+28 new across ledger, motion, contract/goal-manager, village-score, dig-in, _common, reflex contract path)
- [ ] Live-server smoke: bot reaches the chicken without `no_drop`; TUI shows the contract milestone + Village Score; bot digs in when caught out at night
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
vNext architecture from the research doc: replace the noisy multi-rail planner with a closed loop (world truth → invariant check) and a single utility-driven goal authority. The LLM stays entirely off the tick path.
L1 services (fix
no_drop/ silent pathfinder hang first):InventoryLedger— diff-based "did I actually get it" verifier;acquire-foodnow confirms vialedger.gainedSinceinstead of the unreliable count/playerCollect.MotionService.gotoSafe— wall-clock timeout + progress watchdog +path_update(noPath/timeout) → structured{reached|stuck|timeout|nopath}.L3 plan — unify the three competing rails (curriculum / manifesto / storyline):
InvariantChecker+ predicate library;GoalManagerpicks the lowest unmet milestone via utility argmax (food-urgency preempts, DEPS-style).bot.jsprecomputessnapshot.contract;reflex.jsconsumes it in place of the storyline rail. Manifesto L0 (alive emergencies) still preempts.Eval + robustness:
buildline.survive.dig-inskill +dusk_dig_inmode (exposed at night, no bed → dig for cover, safety-gated).approach_blockhelper (GoalNear +lookAt, avoidsGoalLookAtBlockraycast bug #341).Deferred (tracked in local
plans/v0.4.0-vnext.md): explicit Plan4MC skill-graph (contract already is an ordered graph), generic per-skill worldDelta validation, embedding-indexed scenario memory, Baritone fallback (PRD §4.4 rejects it).Test plan
npm test— 450/450 green (+28 new across ledger, motion, contract/goal-manager, village-score, dig-in, _common, reflex contract path)no_drop; TUI shows the contract milestone + Village Score; bot digs in when caught out at night🤖 Generated with Claude Code