Skip to content

v5.3.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 07:46
· 208 commits to main since this release

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/pip install could not run /mb init at all — mb-init-bank.sh exited
    3 (missing template bundle) for every locale, blocking the very first
    onboarding step. The packaging fix landed on main after 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
    contains templates/locales/<lang>/.memory-bank/.
  • scripts/_lib.sh shipped with a bash syntax error — an unterminated
    heredoc quote (<<'PY instead of <<'PY'). _lib.sh is sourced by every
    mb-*.sh, so the whole toolchain was dead: mb-adr.sh exited 2, mb-review.sh --emit-payload failed, and the install/calibration suites went red.
  • hooks/mb-session-turn.sh shipped 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, and sc_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.md that install.sh itself had written, minting a fresh
    .pre-mb-backup.* on every re-run and making the install manifest's backups
    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 to off saw 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-only COORDINATION.md board
    protocol for two or more agent sessions sharing one working tree (read the
    board before stages/commits/shared-file edits, scoped git add only, FREEZE
    entries need an ACK). Wired into CLAUDE.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-generated tests blocker 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-tests as the manual force-MISS escape
    hatch.
  • Layered calibration examplesscripts/mb-review-examples.sh resolves
    few-shot rubric examples from references/rubric-examples/{common,python, go,typescript,frontend,mobile,backend}.md, with an optional project
    override at .memory-bank/rubric-examples/ taking precedence on
    example_id collision. 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-injected tests/blocker finding for a known-red touched-file
    test run, the parser restores it and forces CHANGES_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-payload smoke 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 — see tests/calibration/README.md)
    non-blocking weekly workflow_dispatch/schedule CI 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: create scaffolds
    <bank>/contracts/<plan-topic>_stage-<N>.md (idempotent — never clobbers an existing draft),
    read/path resolve it, validate checks 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.md and a new review_mode: contract toggle documented in agents/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 --contract for one run, or a project's own
    pipeline.yaml:review.require_contract: true to make it mandatory; capped at 3 contract-review cycles
    before a hard stop for human. Off by default; existing /mb work runs are unaffected.
  • scripts/mb-work-trend.shkey derives a stable sha256 item key from (plan, stage, item);
    compute reads a normalized reviewer verdict (mb-work-review-parse.sh output) and prints this
    cycle's progress_trend (improving / stagnant / regressing / null on 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 signal mb-work-pivot.sh consumes
    to decide whether the loop is actually making progress.
  • scripts/mb-work-pivot.shdecide turns a tracked consecutive_stagnant count and the current
    cycle number into refine / pivot_in_role / pivot_via_architect, thresholds resolved from
    pipeline.yaml:review.pivot_after_cycles (default 2) and review.pivot_escalate_to_architect_on
    (default 4, both already present in references/pipeline.default.yaml). prompt-prefix emits the
    re-dispatch instruction text (discard-and-restart for pivot_in_role; the two-step
    architect-then-role-agent escalation for pivot_via_architect). Every non-refine decision 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_cycles now defaults to stop_for_human (was
    continue_with_warning) in the bundled references/pipeline.default.yaml
    review: block. When a project's pipeline.yaml omits on_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.