v0.4.0 vNext — closed-loop world model + settlement contract #29

Merged
halofourteen merged 2 commits from v0.4.0 into main 2026-05-28 11:29:40 +03:00
halofourteen commented 2026-05-28 10:53:40 +03:00 (Migrated from github.com)

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

  • 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

## 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)
Sign in to join this conversation.