本文へ移動
cccskills
無料GitHub で公開

memory-bank

Agent-agnostic long-term project memory through `.memory-bank/` + RULES (TDD/SOLID/Clean Architecture/FSD/Mobile) + dev-toolkit commands. Use when working in a project with a `.memory-bank/` directory or when the user explicitly asks for memory-bank workflow, code rules, or dev-toolkit commands (`/mb`, plan, spec, verify, done; «память проекта», «контекст проекта», «план», «продолжай по плану»).

インストール方法を見る

含まれるファイル(200)

  • SKILL.md20.3 KB
  • .coveragerc1.8 KB
  • .github/workflows/pages.yml1.2 KB
  • .github/workflows/publish.yml3.0 KB
  • .github/workflows/test.yml3.2 KB
  • .gitignore2.4 KB
  • .memory-bank/.mb-config27 B
  • .memory-bank/.migration-backup-20260422-174417/BACKLOG.md15.7 KB
  • .memory-bank/.migration-backup-20260422-174417/plan.md3.8 KB
  • .memory-bank/.migration-backup-20260422-174417/RESEARCH.md2.8 KB
  • .memory-bank/.migration-backup-20260422-174417/STATUS.md11.3 KB
  • .memory-bank/.pre-migrate-20260421-163107/BACKLOG.md12.6 KB
  • .memory-bank/.pre-migrate/20260421_091115/BACKLOG.md12.5 KB
  • .memory-bank/.pre-migrate/20260421_091115/checklist.md31.1 KB
  • .memory-bank/.pre-migrate/20260421_091115/plan.md3.9 KB
  • .memory-bank/.pre-migrate/20260421_091115/STATUS.md10.4 KB
  • .memory-bank/adr.md13.0 KB
  • .memory-bank/agreements.md52.3 KB
  • .memory-bank/backlog.md168.0 KB
  • .memory-bank/checklist.md6.2 KB
  • .memory-bank/codebase/ARCHITECTURE.md5.6 KB
  • .memory-bank/codebase/CONCERNS.md4.3 KB
  • .memory-bank/codebase/CONVENTIONS.md4.2 KB
  • .memory-bank/codebase/god-nodes.md5.9 KB
  • .memory-bank/codebase/graph.json5.8 MB
  • .memory-bank/codebase/STACK.md2.8 KB
  • .memory-bank/context/adapter-parity.md12.9 KB
  • .memory-bank/context/agreements.md9.3 KB
  • .memory-bank/context/composable-work-pipeline.md7.7 KB
  • .memory-bank/context/mb-donor-evolution.md3.4 KB
  • .memory-bank/context/openspec-adapter.md15.0 KB
  • .memory-bank/context/pi-native-integration.md16.1 KB
  • .memory-bank/context/quality-track.md16.9 KB
  • .memory-bank/context/sdd-openspec-parity.md13.9 KB
  • .memory-bank/context/sdd-vision-pipeline-interview.md17.9 KB
  • .memory-bank/context/sdd-vision-pipeline.md35.9 KB
  • .memory-bank/context/svp-adapt-escalation-interview.md1.7 KB
  • .memory-bank/context/svp-adapt-escalation.md17.4 KB
  • .memory-bank/context/svp-brief-interview.md1.6 KB
  • .memory-bank/context/svp-brief.md11.1 KB
  • .memory-bank/context/svp-contract-test-loop-interview.md9.9 KB
  • .memory-bank/context/svp-contract-test-loop.md23.8 KB
  • .memory-bank/context/svp-docs-wiki-interview.md1.6 KB
  • .memory-bank/context/svp-docs-wiki.md14.3 KB
  • .memory-bank/context/svp-interview-upgrade-interview.md3.0 KB
  • .memory-bank/context/svp-interview-upgrade.md21.9 KB
  • .memory-bank/context/svp-parallel-engine-interview.md2.0 KB
  • .memory-bank/context/svp-parallel-engine.md15.7 KB
  • .memory-bank/context/svp-roadmap-backlog-db-interview.md1.7 KB
  • .memory-bank/context/svp-roadmap-backlog-db.md27.2 KB
  • .memory-bank/context/svp-sdd-core-interview.md2.1 KB
  • .memory-bank/context/svp-sdd-core.md16.6 KB
  • .memory-bank/context/svp-spec-review-loop.md6.2 KB
  • .memory-bank/context/tier1-graph-memory.md11.5 KB
  • .memory-bank/COORDINATION.md249.2 KB
  • .memory-bank/goal.md2.0 KB
  • .memory-bank/index.json28.9 KB
  • .memory-bank/lessons.md12.0 KB
  • .memory-bank/notes/2026-04-20_03-36_cross-agent-research.md19.5 KB
  • .memory-bank/notes/2026-04-21_06-39_docs-codebase-folder-surfaced.md1.5 KB
  • .memory-bank/notes/2026-04-21_06-59_landing-website.md1.2 KB
  • .memory-bank/notes/2026-04-21_07-30_commands-audit-refactor.md1.6 KB
  • .memory-bank/notes/2026-04-21_11-54_plan-review-hardening-installer-boundaries.md1.6 KB
  • .memory-bank/notes/2026-04-21_15-42_agents-quality-plan-completed.md3.2 KB
  • .memory-bank/notes/2026-04-21_16-58_release-v312-and-plan-closures.md1.7 KB
  • .memory-bank/notes/2026-04-22_20-30_sprint3-vs-phase2-priority.md2.7 KB
  • .memory-bank/notes/2026-04-25_11-42_skill-v2-released.md2.5 KB
  • .memory-bank/notes/2026-04-26_23-36_repo-remote-cleanup.md1.4 KB
  • .memory-bank/notes/2026-04-27_01-04_v4-audit-remediation-closeout.md4.2 KB
  • .memory-bank/notes/2026-05-21_08-16_graph-rag-lite-closeout.md1.4 KB
  • .memory-bank/notes/2026-05-23_03-49_sdd-task-model.md970 B
  • .memory-bank/notes/2026-05-23_05-00_sdd-work-engine.md1.3 KB
  • .memory-bank/notes/2026-05-23_05-30_sdd-unification-phase-done.md2.5 KB
  • .memory-bank/notes/2026-05-23_20-32_parallel-pipeline-non-goals.md2.4 KB
  • .memory-bank/notes/2026-05-27_20-35_ci-baseline-wave-0.md891 B
  • .memory-bank/notes/2026-05-28_16-56_session-closeout.md815 B
  • .memory-bank/notes/2026-05-29_ears-validator-hardening.md2.9 KB
  • .memory-bank/notes/2026-06-09_21-20_mb-research-tooling-core-feature.md2.2 KB
  • .memory-bank/notes/2026-06-28_1610_claude-code-statusline-integration-stdin-json-cont.md864 B
  • .memory-bank/notes/2026-07-06_1515_pipeline-model-tier-convention-opus-planjudge-sonn.md1.0 KB
  • .memory-bank/notes/2026-07-15_0551_disown-detached-codex-exec-fakes-completion.md954 B
  • .memory-bank/notes/2026-07-15_1218_code-graph-underuse-root-cause-agent-routing-fix.md897 B
  • .memory-bank/notes/2026-07-15_1218_copilot-cli-requires-quoted-argument-hint-yaml-val.md758 B
  • .memory-bank/notes/2026-07-15_adapter-parity-host-api-research.md1.3 KB
  • .memory-bank/notes/2026-07-15_session-memory-graph-hardening.md1.8 KB
  • .memory-bank/notes/2026-07-17_1125_red-anchor-pitfalls-output-signatures.md2.6 KB
  • .memory-bank/notes/2026-07-17_1300_spec-generation-needs-consumer-battery.md1.6 KB
  • .memory-bank/notes/2026-07-19_1602_hooks-silent-fail-by-design-manual-invocation-must.md807 B
  • .memory-bank/notes/2026-07-19_1602_semantic-recall-oom-root-cause-disable-decision.md963 B
  • .memory-bank/notes/2026-07-27_2319_partial-fix-in-one-file-finding-closed-across-a-sp.md903 B
  • .memory-bank/notes/2026-07-27_2319_verify-eval-against-the-original-scope-text-not-yo.md903 B
  • .memory-bank/notes/2026-07-28_0049_stop-hook-full-test-suite-hang-i-131-root-cause.md1.0 KB
  • .memory-bank/notes/2026-07-28_0217_graphvector-adoption-gap-cold-start-index-never-bu.md1.4 KB
  • .memory-bank/notes/2026-07-28_0217_mb-flow-closure-guard-has-no-retry-cap-can-block-s.md1.2 KB
  • .memory-bank/notes/2026-09-13_16-17_mb-work-cost-diet-sprint1-close.md1.9 KB
  • .memory-bank/notes/2026-09-14_00-40_audit-boundary-regressions.md1.6 KB
  • .memory-bank/notes/2026-09-30_mutation-testing-stale-pyc.md850 B
  • .memory-bank/pipeline.yaml11.4 KB
  • .memory-bank/plans/2026-05-23_feature_cost-multi-model.md10.6 KB
  • .memory-bank/plans/2026-05-23_feature_skill-improvements-anthropic-audit.md23.3 KB
  • .memory-bank/plans/2026-05-24_fix_cursor-compatibility-remediation.md3.6 KB
  • .memory-bank/plans/2026-05-24_fix_pi-compatibility-remediation.md2.6 KB
  • .memory-bank/plans/2026-06-23_feature_dispatcher-wiring-transports.md32.0 KB
  • .memory-bank/plans/2026-06-23_fix_config-validation-docs.md27.9 KB
  • .memory-bank/plans/2026-06-23_SEQUENCE_codex-remediation.md6.0 KB
  • .memory-bank/plans/2026-07-05_SEQUENCE_long-running-sessions.md11.4 KB
  • .memory-bank/plans/2026-07-15_feature_mb-donor-evolution-v5-4-baseline.md3.4 KB
  • .memory-bank/plans/2026-07-28_fix_graph-semantic-adoption.md49.0 KB
  • .memory-bank/plans/2026-09-05_fix_mb-work-cost-diet-sprint2.md21.3 KB
  • .memory-bank/plans/2026-09-05_fix_mb-work-cost-diet-sprint3.md16.2 KB
  • .memory-bank/plans/2026-09-24_fix_command-skill-root-paths.md4.6 KB
  • .memory-bank/plans/2026-09-24_fix_opus55-prompt-fit.md20.1 KB
  • .memory-bank/plans/2026-10-05_feature_pi-native-integration.md29.3 KB
  • .memory-bank/plans/2026-10-07_fix_proportional-effortsprint2-execution-economy.md12.5 KB
  • .memory-bank/plans/done/2026-04-19_refactor_skill-v2.md21.6 KB
  • .memory-bank/plans/done/2026-04-20_bugfix_install-idempotency.md6.0 KB
  • .memory-bank/plans/done/2026-04-20_feature_cursor-global-parity.md7.2 KB
  • .memory-bank/plans/done/2026-04-20_refactor_skill-v2.1.md51.1 KB
  • .memory-bank/plans/done/2026-04-21_feature_landing-website.md5.1 KB
  • .memory-bank/plans/done/2026-04-21_refactor_agents-quality.md22.0 KB
  • .memory-bank/plans/done/2026-04-21_refactor_commands-audit-fixes.md11.3 KB
  • .memory-bank/plans/done/2026-04-21_refactor_core-files-v3-1.md25.8 KB
  • .memory-bank/plans/done/2026-04-21_refactor_docs-codebase-folder.md12.4 KB
  • .memory-bank/plans/done/2026-04-21_refactor_review-hardening-installer-boundaries.md20.7 KB
  • .memory-bank/plans/done/2026-04-22_refactor_skill-v2-phase1-sprint1-rename.md44.4 KB
  • .memory-bank/plans/done/2026-04-22_refactor_skill-v2-phase1-sprint2-autosync.md51.5 KB
  • .memory-bank/plans/done/2026-04-25_feature_i004-auto-commit.md3.8 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase2-sprint1-discuss-ears.md8.6 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase2-sprint2-sdd-and-plan-lite.md6.5 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase3-sprint1-config-pipeline.md9.3 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase3-sprint2-work-engine.md11.8 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase3-sprint3-review-loop.md11.3 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase4-sprint1-critical-hooks.md8.0 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase4-sprint2-slim-and-context-guard.md8.7 KB
  • .memory-bank/plans/done/2026-04-25_feature_phase4-sprint3-installer-and-release.md3.5 KB
  • .memory-bank/plans/done/2026-04-25_refactor_checklist-prune-i033.md4.3 KB
  • .memory-bank/plans/done/2026-04-25_refactor_sprint3-multi-active-fix.md8.3 KB
  • .memory-bank/plans/done/2026-04-25_refactor_v4-audit-remediation.md33.7 KB
  • .memory-bank/plans/done/2026-05-21_architecture_graph-rag-lite-code-context.md14.4 KB
  • .memory-bank/plans/done/2026-05-21_feature_global-storage-agent-support.md16.5 KB
  • .memory-bank/plans/done/2026-05-21_feature_global-storage.md18.7 KB
  • .memory-bank/plans/done/2026-05-21_feature_rule-profiles-and-stack-presets.md18.7 KB
  • .memory-bank/plans/done/2026-05-21_refactor_sdd-task-model.md17.6 KB
  • .memory-bank/plans/done/2026-05-21_refactor_sdd-traceability-docs.md20.3 KB
  • .memory-bank/plans/done/2026-05-21_refactor_sdd-work-engine.md19.2 KB
  • .memory-bank/plans/done/2026-05-23_feature_handoff-v2.md12.3 KB
  • .memory-bank/plans/done/2026-05-23_feature_reviewer-v2.md19.0 KB
  • .memory-bank/plans/done/2026-05-23_feature_work-loop-v2.md11.0 KB
  • .memory-bank/plans/done/2026-05-24_fix_ci-baseline-wave-0.md6.8 KB
  • .memory-bank/plans/done/2026-06-02_refactor_subagent-strengthening.md15.5 KB
  • .memory-bank/plans/done/2026-06-06_feature_codegraph-analytics.md3.3 KB
  • .memory-bank/plans/done/2026-06-06_feature_codegraph-cochange.md10.1 KB
  • .memory-bank/plans/done/2026-06-06_feature_graph-wiki-semantic.md15.2 KB
  • .memory-bank/plans/done/2026-06-07_refactor_rules-context-economy.md26.0 KB
  • .memory-bank/plans/done/2026-06-08_feature_session-memory-gaps.md7.5 KB
  • .memory-bank/plans/done/2026-06-09_feature_mb-research-tooling-core.md13.3 KB
  • .memory-bank/plans/done/2026-06-23_fix_logic-correctness-portability.md26.8 KB
  • .memory-bank/plans/done/2026-06-23_fix_security-hardening.md22.3 KB
  • .memory-bank/plans/done/2026-06-23_fix_verification-gates.md18.8 KB
  • .memory-bank/plans/done/2026-07-04_feature_code-graph-activation.md44.3 KB
  • .memory-bank/plans/done/2026-07-04_fix_install-and-cross-agent-parity.md138.0 KB
  • .memory-bank/plans/done/2026-07-04_fix_mb-work-parallel-runs.md43.5 KB
  • .memory-bank/plans/done/2026-07-04_fix_mb-work-resilience.md39.3 KB
  • .memory-bank/plans/done/2026-07-04_fix_session-capture-and-mb-hygiene.md44.2 KB
  • .memory-bank/plans/done/2026-07-13_feature_update-notify.md7.7 KB
  • .memory-bank/plans/done/2026-07-15_feature_docs-site-and-landing-refresh.md22.7 KB
  • .memory-bank/plans/done/2026-07-15_feature_session-memory-graph-hardening.md26.7 KB
  • .memory-bank/plans/done/2026-07-18_fix_spec-group-round3-remediation.md19.0 KB
  • .memory-bank/plans/done/2026-09-05_fix_mb-work-cost-diet-sprint1.md37.5 KB
  • .memory-bank/plans/done/2026-09-13_fix_skill-audit-data-safety.md5.2 KB
  • .memory-bank/plans/done/2026-09-13_fix_skill-audit-runtime.md7.0 KB
  • .memory-bank/plans/done/2026-09-13_fix_sprint1-review-blockers.md23.9 KB
  • .memory-bank/plans/done/2026-09-16_fix_i208-test-battery.md34.0 KB
  • .memory-bank/plans/done/2026-10-06_feature_key-rules-onboarding.md14.6 KB
  • .memory-bank/plans/done/2026-10-06_fix_adr-registry.md8.0 KB
  • .memory-bank/plans/done/2026-10-06_fix_agents-md-diet.md10.2 KB
  • .memory-bank/plans/done/2026-10-06_fix_anthropic-skill-guide-compliance-sprint1-skill.md20.5 KB
  • .memory-bank/plans/done/2026-10-06_fix_anthropic-skill-guide-compliance-sprint2-instructions.md14.4 KB
  • .memory-bank/plans/done/2026-10-07_feature_adapt-lite.md8.9 KB
  • .memory-bank/plans/done/2026-10-07_feature_pipeline-presets-cost-tiers.md19.1 KB
  • .memory-bank/plans/done/2026-10-07_feature_project-quality-settings.md15.5 KB
  • .memory-bank/plans/done/2026-10-07_fix_proportional-effortsprint1-routing-rules.md17.1 KB
  • .memory-bank/plans/done/2026-10-07_fix_upgrade-safe-install.md13.1 KB
  • .memory-bank/plans/done/2026-10-08_fix_ordinary-pi-mb-dispatch.md15.0 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-phase.md7.8 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-sprint-1-prompt-overlay.md10.1 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-sprint-2-mb-debugger.md2.7 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-sprint-3-worktree.md2.1 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-sprint-4-atomic-commit.md2.2 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-sprint-5-parallel-waves.md2.5 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-sprint-6-goal-layer.md2.6 KB
  • .memory-bank/plans/superseded/2026-05-23_feature_goal-driven-autopilot-sprint-7-autopilot.md3.3 KB
  • .memory-bank/plans/superseded/2026-05-24_feature_opencode-first-adaptation.md19.2 KB
  • .memory-bank/plans/superseded/2026-05-24_feature_parallel-pipeline.md24.4 KB
  • .memory-bank/plans/superseded/SUPERSEDED.md2.0 KB
  • .memory-bank/progress.md442.1 KB
  • .memory-bank/project.md2.1 KB
  • .memory-bank/reports/2026-04-21_review_full-repo-v3-1-1.md15.0 KB
  • .memory-bank/reports/2026-05-21_review_graph-rag-lite-uncommitted.md6.1 KB
  • .memory-bank/reports/2026-05-23_anthropic-best-practices-audit.md24.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Memory Bank Skill

Three-in-one skill for code agents:

  1. Memory Bank — long-term project memory through .memory-bank/ (status.md, checklist.md, roadmap.md, research.md, backlog.md, adr.md, progress.md, lessons.md, notes/, plans/, experiments/, reports/, codebase/).
  2. RULES — global engineering rules: TDD, Clean Architecture (backend), FSD (frontend), Mobile (iOS/Android UDF), SOLID, Testing Trophy.
  3. Dev toolkit — 34 commands: /mb, /start, /done, /plan, /brief, /discuss, /groom, /sdd, /work, /drive, /config, /pipeline, /profile, /rules, /commit, /pr, /review, /test, /refactor, /doc, /changelog, /catchup, /adr, /contract, /security-review, /api-contract, /db-migration, /observability, /roadmap-sync, /traceability-gen, /analyze-task, /flow, /goal, /agree.

Design contract. Memory Bank rests on one inviolable promise — agents remember — and a stack of fully configurable, token-economical layers above it. Default behaviour never changes without explicit opt-in; user customisations survive upgrades; expensive paths are off by default. See references/design-principles.md for the full contract.

Details live in one-level reference files read on demand — see References at the end.


Development flow — stages a code agent should expect

Work in a Memory Bank project follows this order. Depth scales with task complexity — every stage except development itself can be skipped for trivial work; review and judge are opt-in.

#StageCommandNotes
1Interview/mb discuss <topic> (alias /mb ask_me)Grilling interview → decisions + EARS-validated requirements draft in context/<topic>.md
2Spec or plan/mb sdd <topic> · /mb plan <type> <topic>Pick by complexity: feature/multi-task → spec triple (specs/<topic>/requirements+design+tasks.md, executable <!-- mb-task:N -->); smaller bounded change → plan (plans/*.md, <!-- mb-stage:N -->); trivial fix → no artifact (rules still apply)
3Development/mb work <target>Executes spec tasks / plan stages one by one through an implement → verify loop with role subagents (TDD, contract-first)
4Verification/mb verifyplan-verifier audits diff vs plan/spec DoD; mandatory before /mb done when work followed a plan/spec
5Review (optional)/mb work <target> --reviewReviewer verdict (subagent ensemble or external codex) + severity gate; off by default
6Judge (optional)/mb work <target> --judgemb-judge decides GO / GO_WITH_BACKLOG / NO_GO and terminates the review loop
7Close/mb doneActualize bank: progress append, checklist/status update

Grooming (any stage). /mb groom <topic> (also grooming) runs a critical grooming session outside the fixed order — for a raw idea, a task that already has a spec, or a decision worth revisiting. Unlike /mb discuss, the goal is not a spec: the agent challenges necessity and approach, proposes its own solutions, covers white spots; the summary lands in context/<topic>-groom.md, confirmed decisions go to agreements.md / backlog (ADR/Ideas), and the session ends with proposed next steps (e.g. /mb sdd).

Pipeline. The whole chain can be encoded in <bank>/pipeline.yaml as a named workflow (steps, per-role model/thinking, severity gates, protected paths, budget). When present, /mb work resolves it automatically (mb-workflow.sh) and follows the configured steps — e.g. governed implement → verify → review → judge → fix → done — without per-run flags. Manage with /mb pipeline / /mb config; validate with /mb config validate. Defaults never change without opt-in: no pipeline and no flags = simple implement → verify.

Command index — all /mb subcommands (know these exist; suggest them to the user when relevant; details per subcommand → commands/mb.md or /mb help <sub>):

  • Session & context: context (default, empty arg) · start · done · update · tasks · note <topic> · index
  • Requirements & decisions: discuss <topic> (alias ask_me) · groom <topic> (alias grooming) · sdd <topic> · openspec <import|list|status|sync> · plan <type> <topic> · idea <title> · idea-promote <I-NNN> · adr <title> · agree <sub> · goal
  • Execution: work [target] · verify · config <sub> · pipeline <sub> · flow <route> · analyze-task
  • Codebase intelligence & memory: map [focus] · graph · wiki · research <query> · search <query> · recall <query> · recap <sid> · conflicts · consolidate · tags
  • Setup & maintenance: init · install · profile <sub> · rules <sub> · doctor · compact · migrate-structure · import · upgrade · deps · statusline · help [sub]

Beyond /mb, the toolkit ships standalone commands (see the list in the intro above): /commit, /pr, /review, /test, /refactor, /doc, /changelog, /catchup, /contract, /security-review, /api-contract, /db-migration, /observability, /roadmap-sync, /traceability-gen.

Plan hierarchy: Phase → Sprint → Stage. See references/templates.md § Plan decomposition for size thresholds, terminology, and when to use which level. Cyrillic «Этап / Спринт / Фаза» — legacy alias, allowed only in plans/done/*.md.


Task routing

Before starting, size the task — trivial / small / standard / large / extra — and match plan, tests, docs and checks to the tier: references/effort-tiers.md. An explicit user request beats the estimate. Independent tasks go to parallel subagents. Plan coarse; decompose only when stuck (ADaPT).

Workspace resolution — agent-agnostic storage

Memory Bank resolves its active bank through scripts/_lib.sh::mb_resolve_path. The precedence is fixed and explicit:

  1. Explicit argument — mb-*.sh <mb_path> always wins.
  2. MB_PATH env override — for ad-hoc redirection in shell sessions.
  3. Local mode — <project>/.memory-bank/ (default of /mb init, team-shared, committable).
  4. Global mode — registered in <agent_config>/memory-bank/registry.json. Requires --storage=global --agent=<name> on init (or $MB_AGENT env). Per-agent paths: references/structure.md § Global storage paths.
  5. Legacy .claude-workspace — old pointer mode, see references/structure.md § Old patterns.
  6. Fallback — relative .memory-bank (compat with existing scripts).

Active-state semantics

  • [MEMORY BANK: ACTIVE] — when the resolver returns an existing bank (local or registered global).
  • [MEMORY BANK: ABSENT] — when no bank exists for the current project. Surface this and stop the Memory Bank lifecycle — do not silently initialize.
  • [MEMORY BANK: INITIALIZED] — only after a successful explicit /mb init.

Rules-only mode

A project may intentionally have no Memory Bank ([MEMORY BANK: ABSENT]). In that case:

  • /mb lifecycle commands stay inactive until the user explicitly runs /mb init.
  • The engineering rules baseline still applies: TDD, SOLID, Clean Architecture / FSD, DRY/KISS/YAGNI, Testing Trophy, protected files, no placeholders, verification before completion. Global skill installation never auto-enables Memory Bank state.

When invoking MB Manager or scripts, always pass the resolved mb_path.


Tools — shell scripts

All scripts live in scripts/ next to this SKILL.md. In global installs, the bundle is typically available through host aliases:

  • Claude Code: ~/.claude/skills/memory-bank/
  • Codex: ~/.codex/skills/memory-bank/
  • Cursor: ~/.cursor/skills/memory-bank/

Scripts work with .memory-bank/ in the current directory or through the mb_path argument.

GraphRAG-lite retrieval routing

code_context is the default for ambiguous code-understanding questions such as "where is the logic for X?" or "find similar implementation". Exact structural questions route directly to graph tools: "who calls/imports/defines X?" → graph_neighbors, "reverse deps" or change impact → graph_impact, and "what tests cover this file/symbol?" → graph_tests. User explicitly asks "semantic search" → search_code because explicit tool intent wins.

Fail open: missing graph, stale graph, missing semantic provider, or unavailable native extension must not block the agent. Optional dependencies (tree-sitter, networkx, fastembed) are not assumed installed: bash "$SKILL_DIR"/scripts/mb-deps-check.sh --install-hints prints the exact install command. Use bash "$SKILL_DIR"/scripts/mb-graph.sh who-calls|impact|tests <Symbol> / search "<query>" / status (SKILL_DIR="${MB_SKILLS_ROOT:-${SKILL_DIR:-$HOME/.claude/skills/memory-bank}}", i.e. this skill's directory) and scripts/mb-code-context.py as the universal CLI fallback; Pi and OpenCode may expose native tool wrappers, while Claude Code, Codex, and generic AGENTS.md agents can call the scripts directly.

Entry points agents call (full grouped table incl. internal libraries → references/scripts.md):

  • mb-context.sh [--deep] — load bank context (status, checklist, active plan, codebase summary)
  • mb-graph.sh who-calls|impact|tests <Symbol> / search "<query>" / status — graph + semantic code search front door
  • mb-search.sh <q> [--tag t] — keyword search across the bank
  • /mb recall <query> (hooks/mb-recall.sh) — hybrid semantic + lexical recall (RRF) over sessions, notes, agreements, progress
  • mb-plan.sh <type> <topic> / mb-plan-sync.sh <plan> — create a plan with <!-- mb-stage:N --> markers, sync it to checklist/roadmap
  • mb-spec-validate.sh <topic> — validate a spec triple (EARS, executable <!-- mb-task:N --> tasks, REQ coverage)
  • mb-workflow.sh / mb-work-resolve.sh / mb-work-plan.sh — resolve the /mb work workflow, target, and per-item JSON plan
  • mb-agree.sh add|question|list … — single writer for agreements.md
  • mb-coord.sh active / append — read/write the cross-session board without loading it
  • mb-idea.sh / mb-adr.sh — capture an idea (I-NNN) in backlog.md or an ADR (ADR-NNN) in adr.md
  • mb-profile.sh — rule profiles (init, show, validate, set)
  • mb-drift.sh / mb-done-gates.sh — deterministic drift checkers; mandatory /mb done gates

Quick start

# Storage modes — pick one per project:
/mb init                                      # local mode (default) — bank in repo (.memory-bank/)
/mb init --storage=local                      # explicit local mode — same as above
/mb init --storage=global --agent=claude-code # global mode — bank in ~/.claude/memory-bank/...
                                              # (personal, NOT committed to the repo)
# Rules-only mode: no /mb init at all — [MEMORY BANK: ABSENT] state;
# /mb lifecycle stays inactive; all TDD/SOLID/Clean Architecture/DRY/KISS/YAGNI rules still apply.

# Initialization flags
/mb init --full          # same as /mb init (stack auto-detect + CLAUDE.md generation)
/mb init --minimal       # only the .memory-bank/ structure

# Session flow (basic)
/mb start                # load context
# ... work, checklist.md updates as tasks complete ...
/mb verify               # verify plan alignment (if there was a plan)
/mb done                 # actualize + note + progress

# Unified SDD flow (spec-driven features)
/mb discuss <topic>      # EARS-validated requirements → context/<topic>.md
/mb sdd <topic>          # spec triple: requirements / design / tasks.md (executable)
# specs/<topic>/tasks.md is a first-class executable artifact with <!-- mb-task:N --> markers,
# NOT a scaffold — each block is resolved by /mb work <topic> as a work item.
/mb work <topic>         # execute spec tasks one by one (reads <!-- mb-task:N --> blocks)
/mb verify               # verify against spec + plan
/mb done                 # actualize + progress

# Personalize rules for your stack (optional):
/mb profile init --scope=project --role=backend --stack=go --architecture=microservices --delivery=contract-first
# or user-global (works even without a project Memory Bank):
/mb profile init --scope=user --role=frontend --stack=typescript

If the host does not support native slash commands, use:

  • commands/mb.md as the workflow entrypoint;
  • the memory-bank ... CLI for install/init/doctor flows;
  • bundled scripts and agent prompts from this skill bundle.

Agents — subagents

Full roster (when to invoke each agent, prompt files, compose: partials) → references/agents.md.

Plan authoring and ML-result evaluation stay with the main agent: it holds the user's context and decisions. mb-architect executes the architecture items of an approved plan. Bugs, failing or flaky tests, and unexplained behaviour go to mb-debugger (root cause before fix).

Invocation

Dispatch agents by name — Agent(subagent_type="mb-manager", description="…", prompt="action: <action>\n\n<context>"). Model, reasoning effort, and tools come from the installed agent definition or pipeline.yaml, not from the call. The commands write this Claude Code form; other hosts dispatch the same installed role with their own tool:

HostDispatch by nameWhere the role is installed
Claude CodeAgent(subagent_type=<name>, prompt=…) (older builds: Task)~/.claude/agents/<name>.md
OpenCodetask(subagent_type=<name>, prompt=…).opencode/agent/<name>.md
Codexspawn_agent(agent_type=<name>, message=…); a pipeline thinking goes to reasoning_effort~/.codex/agents/<name>.toml
Pimb_dispatch_subagent(role=<name>, task=…) or pi-subagents subagent(agent=<name>, task=…); thinking passes through~/.pi/agent/agents/<name>.md

A host without named dispatch reads the role file and its compose: partials and does the work inline.


Hooks, hosts, privacy and capture

  • Lifecycle hooks (inventory + per-host wiring): references/hooks.md § Hook inventory.
  • Host-specific notes (Claude Code native memory, Codex, Cursor): references/hosts.md.
  • <private> content, auto-capture (MB_AUTO_CAPTURE), session logging, PreCompact handoff: references/privacy-and-capture.md. /mb done can auto-commit the bank (MB_AUTO_COMMIT=1, scripts/mb-auto-commit.sh).

Cross-session coordination — .memory-bank/COORDINATION.md

When two or more sessions work in the same working tree in parallel (two agent CLIs, or agent + human), they coordinate through a single append-only board file at the bank root — COORDINATION.md. Opt-in by nature: the first session that learns about a parallel session creates it; no board file → no protocol overhead.

  • Read it with scripts/mb-coord.sh active, never cat — the board is append-only and reaches hundreds of KB; the command prints active FREEZEs, HANDOVERs with no ACK, the last 3 entries and a totals line. Write entries with mb-coord.sh append --type <T> --title <t>.
  • Full protocol (entry conventions, race handling, trust rules, hookup prompt for a new session): references/coordination.md.

Running list of agreements — .memory-bank/agreements.md

The canonical registry of confirmed decisions currently in force, distinct from progress.md (narrative history) and ADRs (rationale for the hard-to-reverse subset). Every mutation goes through scripts/mb-agree.sh (add | supersede | defer | reject | question | resolve | list | sync) — never a direct model edit — and auto-syncs a managed block (<!-- mb-agreements:start/end -->) into project-root CLAUDE.md/AGENTS.md so a fresh session sees every active agreement without being reminded.

  • Full protocol (what is/isn't an agreement, anti-examples, statuses, ADR routing): references/agreements.md. Command reference: commands/agree.md.

References

  • Rule profiles schema (dimensions, immutable baseline, precedence, validation): references/rules-profile.schema.md
  • Design principles (inviolable memory promise + configurable layers): references/design-principles.md
  • Metadata protocol + index.json + 8 key rules: references/metadata.md
  • Plan decomposition (Phase / Sprint / Stage), templates, drift checks: references/templates.md
  • Planning + Plan Verifier workflow: references/planning-and-verification.md
  • Effort tiers (sizing a task to trivial … extra and matching plan/tests/docs/checks): references/effort-tiers.md
  • ADaPT-lite — decompose only a stuck item, complexity_escalation: references/adapt.md
  • /mb work reference material (workflow modes, JSON schema, examples, scripts, parallel runs): references/work-reference.md
  • /mb work sprint contracts, progress trend, strategic pivoting: references/work-loop-v2.md
  • Structure of .memory-bank/: references/structure.md
  • Code graph cookbook (jq library, graph.json schema, intelligence layer, semantic-search routing): references/code-graph.md
  • Workflow (session lifecycle): references/workflow.md
  • Session memory (cross-chat capture, /mb recall, session-doctor): references/session-memory.md
  • Cross-session coordination board (COORDINATION.md protocol): references/coordination.md
  • Running list of agreements (agreements.md protocol, statuses, anti-examples): references/agreements.md
  • Command file template: references/command-template.md
  • Hooks (per-host wiring + lifecycle): references/hooks.md
  • Scripts — full grouped table (bank core, plans & specs, /mb work, graph, session memory, internal libraries): references/scripts.md
  • Agents — full subagent roster: references/agents.md
  • Debugging techniques for mb-debugger (adapted from superpowers, MIT): references/debugging/root-cause-tracing.md · references/debugging/defense-in-depth.md · references/debugging/condition-based-waiting.md
  • Host-specific notes (Claude Code, Codex, Cursor): references/hosts.md
  • Privacy and capture (<private>, auto-capture, session logging, PreCompact handoff): references/privacy-and-capture.md
  • Codex native hooks adapter: references/codex-native-hooks.md
  • Pi native integration: references/pi-native-integration.md
  • Adapter manifest schema: references/adapter-manifest-schema.md
  • Tags vocabulary: references/tags-vocabulary.md
  • CLAUDE.md auto-generation template: references/claude-md-template.md
  • Global rules (installed as ~/.claude/RULES.md): rules/RULES.md; always-on core block: rules/CLAUDE-GLOBAL.md
  • Key-rules catalog (one-line code/process rules, defaults, locked principles; selection via /mb rules / mb-rules.sh): rules/key-rules.json
  • Reviewer calibration examples per stack: references/rubric-examples/common.md · references/rubric-examples/backend.md · references/rubric-examples/frontend.md · references/rubric-examples/go.md · references/rubric-examples/mobile.md · references/rubric-examples/python.md · references/rubric-examples/typescript.md
  • Flow routes: flow-templates/arch.md · flow-templates/bugfix.md · flow-templates/code-change.md · flow-templates/migration.md · flow-templates/research.md
  • Flow patterns: flow-templates/patterns/adversarial-verify.md · flow-templates/patterns/classify-and-act.md · flow-templates/patterns/fanout-synthesize.md · flow-templates/patterns/generate-filter.md · flow-templates/patterns/loop-until-done.md · flow-templates/patterns/tournament.md
  • CHANGELOG: CHANGELOG.md
  • Migration v1→v2: docs/MIGRATION-v1-v2.md
  • Primary entrypoint:
    • /mb — if the host supports native commands
    • commands/mb.md / memory-bank CLI — if native command surface is unavailable

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

このスキルの問題を報告する