mb-sync

A command for reconciling already-decided task and Memory Bank information at a lasting project checkpoint. The Memory Bank is the repository’s stored record of task state, decisions, and evidence.

In plain words
What is it for?
Use it at the end of a work wave, after task statuses and evidence links have been recorded. It can also be used earlier when an explicit dependency or owner request requires synchronization.
Why use it?
It keeps durable project records aligned with completed, failed, or blocked work. This prevents task files and project notes from drifting apart.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/nicelight/devrails-26/mb-sync
Clone the repo
git clone --depth 1 https://github.com/nicelight/DevRails-26
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,189 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01189
Opus 5 $0.00009 $0.00594
Sonnet 5 $0.00004 $0.00238
Haiku 4.5 $0.00002 $0.00119

Measured 2d ago against content hash fabd431afa9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mb-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/_shared/references/commands/mb-sync.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/mb-sync - Reconcile durable Memory Bank state

<input_contract> Read and follow .memory-bank/workflows/mb-sync.md plus only the changed or referenced Memory Bank/task/evidence surfaces needed for this boundary.

Normal boundary is once at the end of the current wave, after the scheduler or explicit owner has written every closure/failure/blocking decision, final task status, and evidence link to indexed .task.json records. Early sync requires a recorded current-wave dependency on reconciled RTM/index/spec/contract/ changelog state or an explicit owner request; it does not replace the final wave-boundary sync.

In manual flow, the invocation or its durable context identifies the explicit top-level caller/owner that will own applicable post-sync gates and the next handoff.

Do not require full sync for a local manual T0/T1 closure when only task status, task verify, and compact .protocols/<TASK>/run.md changed. </input_contract>

<hard_invariants>

  • JSON task records remain authoritative for task status, dependencies, tier, gates, verification targets, and evidence markers.
  • Status/closure/promotion ownership comes from .memory-bank/workflows/tier-policy.md#tier-obligations, .memory-bank/workflows/tier-policy.md#closure-authority, and .memory-bank/workflows/mb-sync.md.
  • /mb-sync never infers or writes closure/failure/blocking/promotion, planned -> ready, dependent unblock, or dependent block when the explicit owner decision is absent.
  • In scheduler mode, sync only state already written by /autopilot or /autonomous. In manual mode, require an already-recorded explicit owner decision or a direct instruction for this sync.
  • spec-index.md remains a pure registry; no decision bodies, feature status maps, ownership, or reverse usage are added.
  • Do not create a new task/status/boundary/design lifecycle or guess stale product/design state. </hard_invariants>

<operator_decisions> If authoritative artifacts disagree, or reconciliation exposes a new product, design, canonical-path, contract/state/data/storage/security/compatibility, task-boundary/tier/dependency/verification, closure, or promotion decision, stop with a consistency gap.

Interactive flow asks the operator/explicit owner and requires the answer to be written to the existing owning artifact before sync resumes. Unattended flow returns the gap to the scheduler for HALT_CLARIFICATION_REQUIRED, HALT_BLOCKING_QUESTIONS, or HALT_QUALITY_GATES as applicable. A recommendation/default is not an owner decision. </operator_decisions>

<agent_discretion> Within the canonical sync checklist, the agent chooses inspection order, tools, and the minimum changed surfaces needed to prove consistency. It may repair mechanical links/routers and reconcile already-decided state, but may not create missing product/design/lifecycle decisions. </agent_discretion>

<required_outputs> As applicable, reconcile:

  • task index/records and evidence links;
  • requirements RTM and REQ lifecycle;
  • epic/feature lifecycle separately from document status;
  • truthful existing spec-backbone, spec-index, feature design links/status, and changed canonical specs without inventing design;
  • accepted boundary-map.md links after path/heading changes;
  • behavior-spec links as optional examples only;
  • Memory Bank/root/subfolder routers;
  • .memory-bank/changelog.md for the current wave/change.

Report consistency gaps and promotion eligibility without applying scheduler-owned promotion or final lifecycle transitions. </required_outputs>

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 115 lines · 18 tokens per session scan A fabd431afa9d

Subscribe to this mod's changes

mb-sync is a command published in the GitHub repository nicelight/DevRails-26 (22 stars, last pushed 5d ago), licensed MIT. It adds 18 tokens to every session and 1,189 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.