v5.3.0
Fixed — a broken main reached PyPI; this release is the repair
templates/were missing from the published 5.2.0 wheel
(#2): a fresh
pipx/pipinstall could not run/mb initat all —mb-init-bank.shexited
3 (missing template bundle) for every locale, blocking the very first
onboarding step. The packaging fix landed onmainafter 5.2.0 was cut, so it
never reached users; 5.2.0 cannot be re-uploaded to PyPI. This release is the
first one that actually ships the locale bundles. Guarded by
tests/pytest/test_wheel_ships_templates.py, which asserts the built wheel
containstemplates/locales/<lang>/.memory-bank/.scripts/_lib.shshipped with a bash syntax error — an unterminated
heredoc quote (<<'PYinstead of<<'PY')._lib.shis sourced by every
mb-*.sh, so the whole toolchain was dead:mb-adr.shexited 2,mb-review.sh --emit-payloadfailed, and the install/calibration suites went red.hooks/mb-session-turn.shshipped with raw merge-conflict markers —
unparseable, so every turn-capture path was dead and each deploy re-installed
the broken copy. Resolved by merging both sides: the Live-log splice + bullet
cap + stale-summary invalidation, andsc_strip_private(the I-082 control
that keeps<private>…</private>spans off disk — picking either side alone
would have silently reverted a shipped security fix).- Repeat installs were not idempotent: the paired-marker branch backed up a
CLAUDE.mdthatinstall.shitself had written, minting a fresh
.pre-mb-backup.*on every re-run and making the install manifest'sbackups
list differ run to run. A backup is now taken only when real user content lives
outside the managed block (A13's guarantee is unchanged). - Capture test suites were not hermetic: they inherited
MB_AUTO_CAPTURE
from the developer's shell, so a dev with it exported tooffsaw six false
reds that were written off as a "known baseline".setup()now normalizes the
MB_*environment.
Added — cross-session coordination
references/coordination.md— the append-onlyCOORDINATION.mdboard
protocol for two or more agent sessions sharing one working tree (read the
board before stages/commits/shared-file edits, scopedgit addonly, FREEZE
entries need an ACK). Wired intoCLAUDE.md,rules/,agents/, and
commands/{start,commit,work}.md. The docs referenced this file before it
existed; it now ships.
Added — Reviewer 2.0 (calibrated, tests-aware review)
scripts/mb-review.sh— a deterministic review-payload orchestrator
(--emit-payload): assembles the single markdown payload the reviewer
judges (plan context, diff, calibration examples, prior test evidence, and
an auto-generatedtestsblocker when touched-file tests are red) without
ever dispatching an LLM itself. Supports--input <case-dir>so the same
production code path can run offline against a fixture (see the calibration
suite below).scripts/mb-review-cache.sh— the touched-file test-evidence cache
(.memory-bank/tmp/last-tests.json): TTL-bounded HIT/MISS keyed on a
touched-files sha, with--refresh-testsas the manual force-MISS escape
hatch.- Layered calibration examples —
scripts/mb-review-examples.shresolves
few-shot rubric examples fromreferences/rubric-examples/{common,python, go,typescript,frontend,mobile,backend}.md, with an optional project
override at.memory-bank/rubric-examples/taking precedence on
example_idcollision. Every stack ships >=3 examples per category
(logic/code_rules/security/scalability/tests). --require-tests-blocker(scripts/mb-work-review-parse.sh) — the
REQ-103 "cannot drop" safety net: if a reviewer output drops or downgrades
the auto-injectedtests/blockerfinding for a known-red touched-file
test run, the parser restores it and forcesCHANGES_REQUESTED. Opt-in —
only ever passed when touched-file tests are already known to be failing.- Golden calibration suite (
tests/calibration/) — a runnable regression
harness against reviewer verdict drift: 5 case fixtures (one red-tests
case), an offline--emit-payloadsmoke path (no LLM/network, exercised by
tests/bats/test_calibration_suite.bats), the full PASS/WARN/FAIL match
metric, and a documented (not yet added — seetests/calibration/README.md)
non-blocking weeklyworkflow_dispatch/scheduleCI job.
Compatibility. Additive and opt-in throughout — default /mb work
behavior is unchanged unless a project explicitly wires the new review
orchestrator or opts into --require-tests-blocker (REQ-105). Existing
pipeline.yaml files without the new keys keep working via resolver
defaults.
Migration. None required. Projects that want project-specific calibration
examples may optionally add .memory-bank/rubric-examples/{common,<stack>}.md
overrides (same example_id/stack/category/severity front-matter +
### Bad / ### Expected verdict fragment block format as the bundled
references/rubric-examples/ baseline); everything else keeps using the
skill-bundled baseline unchanged.
Added — work-loop-v2: sprint contracts, progress trend, strategic pivoting (REQ-110/111/112/114)
scripts/mb-work-contract.sh— per-work-item sprint contract:createscaffolds
<bank>/contracts/<plan-topic>_stage-<N>.md(idempotent — never clobbers an existing draft),
read/pathresolve it,validatechecks all 7 frontmatter keys and 6 body sections (In scope /
Plan of attack / Test plan / DoD checkpoints / Out of scope / Open risks) are present. Paired with
templates/contract.mdand a newreview_mode: contracttoggle documented inagents/mb-reviewer.md
(4-category rubric:scope/dod/test_plan/out_of_scope; a silent/empty out-of-scope section is a
blocker). Opt-in —/mb work --contractfor one run, or a project's own
pipeline.yaml:review.require_contract: trueto make it mandatory; capped at 3 contract-review cycles
before a hard stop for human. Off by default; existing/mb workruns are unaffected.scripts/mb-work-trend.sh—keyderives a stable sha256 item key from(plan, stage, item);
computereads a normalized reviewer verdict (mb-work-review-parse.shoutput) and prints this
cycle'sprogress_trend(improving/stagnant/regressing/nullon the first cycle),
maintaining the previous-cycle cache at<bank>/tmp/last-verdict-<item-key>.json
(weighted_score = 10*blocker + 3*major + 1*minor). This is the signalmb-work-pivot.shconsumes
to decide whether the loop is actually making progress.scripts/mb-work-pivot.sh—decideturns a trackedconsecutive_stagnantcount and the current
cycle number intorefine/pivot_in_role/pivot_via_architect, thresholds resolved from
pipeline.yaml:review.pivot_after_cycles(default 2) andreview.pivot_escalate_to_architect_on
(default 4, both already present inreferences/pipeline.default.yaml).prompt-prefixemits the
re-dispatch instruction text (discard-and-restart forpivot_in_role; the two-step
architect-then-role-agent escalation forpivot_via_architect). Every non-refinedecision appends
one JSONL telemetry line (ts/item_id/cycle/mode/rationale_hash) to
<bank>/tmp/pivot-log.jsonl(not git-tracked — local analysis data only).commands/work.md— new "Sprint contracts, progress trend, and strategic pivoting" section wires
all three scripts into the existing implement→verify→review→judge→fix loop: the contract phase runs
before the implement step, trend is computed every review cycle from the normalized verdict, and a
stagnant trend routes the fix-cycle into a pivot dispatch instead of an indefinite refine loop. All
three scripts only emit decisions/strings — dispatch stays the host agent's job (agent-native, same
as the rest of/mb work).
Compatibility. Fully additive and opt-in. A project that never sets --contract /
require_contract never runs the contract phase; trend/pivot only change behavior once a review cycle
actually reports CHANGES_REQUESTED with a stagnant trend for pivot_after_cycles consecutive cycles —
until then the loop's existing refine behavior is unchanged byte-for-byte.
Known gap (backlog I-099). scripts/mb-review.sh reserves a last_verdict_cache_path() hook for the
same cache file but does not yet write to it and derives the key differently from
mb-work-trend.sh key; callers must always derive the item key through mb-work-trend.sh key until the
two are reconciled.
Changed — work-loop-v2: fail-fast on_max_cycles default (REQ-113)
on_max_cyclesnow defaults tostop_for_human(was
continue_with_warning) in the bundledreferences/pipeline.default.yaml
review:block. When a project'spipeline.yamlomitson_max_cycles
entirely, the resolver (scripts/mb-workflow.sh) falls back to this new,
stricter default instead of quietly continuing past an exhausted fix loop.
Migration. Existing <bank>/pipeline.yaml files are never rewritten by
install/upgrade — the only writer, scripts/mb-pipeline.sh init, creates the
file solely when absent and refuses to overwrite an existing one without
--force. Projects that already explicitly set on_max_cycles: continue_with_warning keep that behavior untouched. Projects that prefer
the old soft behavior — including any relying on the previous default rather
than an explicit setting — must add on_max_cycles: continue_with_warning to
their pipeline.yaml explicitly.