# MM3 pattern playbook

> https://mm3lab.dev/patterns . Index: https://mm3lab.dev/llms.txt

A pattern is a small, named way of using a verb. The same six verbs do more as you climb: you start by using them, then share them, chain them, join them to your other tools, and finally let them run on a schedule. Multipliers are a mental model, not a benchmark. "Anticipate" means reading your own history early: MM3 records and reports, and does not forecast. Live version: https://mm3lab.dev/patterns

How a sweep decomposes: loop, scan and drill share one shape. (1) decompose: over: part -> story, you write the tree; (2) ask one checklist per layer, asked of every item; (3) sweep, one call per layer, a verdict per item; (4) read the next: line, which points at the worst item; (5) go down with drill --from <item>, listing the next layer yourself for ideas (over: call: [a, b, c]) or using each for code; (6) repeat until you reach code, then class and replay. loop works on ideas you write, scan on code MM3 reads (file, function, call), drill goes one layer down from one flagged item.

## 1× Coding agent / Vibe coder (Use): "It runs. Ship it."
Finds value in the first use, and again in every reuse.

- view / Memoize: Ask the ledger before you ask a model. The same question on unchanged code comes back free.
  ```
  mm3 view src/handlers
  ```
- class / Smoke test: One quick verdict on what the agent just wrote, before you accept it.
  ```
  mm3 template class > review.yaml
  mm3 class review.yaml
  ```
- replay / Regression test: After a fix, re-ask the same questions and see whether it held.
  ```
  mm3 replay --parent MM3-0042 \
    --compare main..HEAD --expect injection
  ```
- scan / Census: Same questions across every file, so the answers are comparable.
  ```
  mm3 template scan > scan.yaml
  mm3 scan scan.yaml
  ```
- drill / Root cause: Don't guess at a failure. Go down into the one thing that flagged.
  ```
  mm3 template drill --parent MM3-0060 \
    --from src/handlers/user.ts/findUser
  ```
- loop / Decompose: Break an idea into parts and stories, then check every one in a single run. Add --dry-run to count the questions first.
  ```
  mm3 template loop > plan.yaml
  mm3 loop plan.yaml --dry-run
  ```

## 5× Senior engineer (Standardize): "Show me."
Sees that the pattern matters as much as the tool: how checks are shared between people and between runs.

- view / Provenance: Every claim carries its run id, so anyone can follow it back to the evidence.
  ```
  mm3 view MM3-0042
  # cite MM3-0042 in the PR description
  ```
- class / Quality gate: The same checklist before every merge. Keep the request file in the repo.
  ```
  mm3 class review.yaml
  # read the failing category, then the next: line
  ```
- replay / Golden master: Pin a verdict you trust and compare every later change against it.
  ```
  mm3 replay --parent MM3-0042 \
    --compare v1.2.0..HEAD --expect injection
  ```
- scan / Triage: Add a scale question so findings rank by severity, worst first, instead of an unordered map.
  ```
  decisions:
    severity:
      pass: [none, low]
      10:
        scale: How severe is {function}?
        levels: [none, low, medium, high, critical]
  ```
- drill / Runbook: Write down which flag leads to which drill, so the next person doesn't improvise.
  ```
  access fails  ->  mm3 template drill \
    --parent <id> --from access
  ```
- loop / Architecture review: Make the parts the components and ask each one the same questions: responsibility, dependency, testability. A whole design reviewed before code.
  ```
  over:
    part: [gateway, payments, ledger]
  ask:
    part:
      concerns:
        responsibility:
          pass: yes
          1: Does {part} own one clear responsibility?
  ```

## 10× Agentic engineer (Chain): "I direct. I verify."
Links the patterns and the calls together, so the output of one becomes the input of the next.

- view / Cross-check: A helper agent says it did the work. Check its report against the ledger instead of taking its word.
  ```
  mm3 agent delegate    # give helpers the rules
  mm3 view MM3-0042     # verify each cited run
  ```
- class / Escalate: A fail is not the end. Follow the next: line straight into a drill.
  ```
  mm3 class review.yaml
  # next: mm3 template drill --parent MM3-0001 --from access
  ```
- replay / Suite: Replay a whole sweep, not one question. You get fixed, still and regressed for every item.
  ```
  mm3 replay --parent MM3-0060 \
    --compare main..HEAD --expect injection
  # MM3-0060 is a scan: fixed / still / regressed per item
  ```
- scan / Fan-out: Give each agent its own folder. Merge what they find by run id.
  ```
  mm3 scan scan-api.yaml     # agent A
  mm3 scan scan-web.yaml     # agent B
  mm3 report hits           # worst first
  ```
- drill / Closed loop: Class finds it, drill pins it, replay proves the fix. One loop, three verbs.
  ```
  class  ->  drill  ->  (fix)  ->  replay
  ```
- loop / Stepwise refinement: A loop inside a loop. Drill into the weakest story and list its sub-steps yourself: the next layer, checked the same way.
  ```
  mm3 loop plan.yaml
  mm3 template drill --parent MM3-0003 \
    --from "gateway/guest checkout"
  # then in drill.yaml:
  #   over: {call: [cart-form, payment-token, receipt]}
  ```

## 25× Forward Deployed Engineer (Integrate): "Drop me in anywhere."
Brings in more data and more tools, so decisions across a complex system get easier to make.

- view / Join: Walk one run's lineage and see every drill, replay and outcome that hangs off it, in one place.
  ```
  mm3 view MM3-0001
  # lineage: scan, the drill below it,
  # the replay that proved the fix
  ```
- class / Decision record: A choice question turns a verdict into a decision among named options, kept with its evidence.
  ```
  decisions:
    route:
      pass: [ship]
      5:
        choice: Where should this go?
        options: [ship, fix, block]
  ```
- replay / Contract test: Replay the other team's checklist against your branch before you hand it over.
  ```
  mm3 replay --parent MM3-0091 \
    --compare main..worktree --expect auth
  # MM3-0091 holds their questions
  ```
- scan / C4 map: Tag each request with the layers it touches. The report draws the architecture for you.
  ```
  mdl:
    uses:
      - container:api -> component:auth -> code:verify
  # then: mm3 report graph component:auth
  ```
- drill / Postmortem: Drill the failure, then record the outcome and the bug it belongs to.
  ```
  mm3 drill drill.yaml
  mm3 outcome MM3-0042 held --by the-owner
  # someone other than the asker confirms it
  ```
- loop / Fitness function: Turn the design's key claims into questions on the real code, and rerun them every release.
  ```
  mm3 loop plan.yaml             # the claims
  mm3 class claims-on-code.yaml  # each release, on the real code
  ```

## 50× Growth hacker (Anticipate): "Make the loop run itself."
Automates all of the above and reads the history early, so trouble is seen coming and not only handled after.

- view / Hotspot: Let history show where trouble clusters. A place that keeps failing is where the next problem will be.
  ```
  mm3 report web
  # writes .mm3/viewer.html: heat map and consensus map
  ```
- class / Calibrate: Record whether verdicts held. Trust the kinds of verdict that do, and doubt the ones that don't.
  ```
  mm3 outcome MM3-0002 held --by the-owner
  mm3 report history
  ```
- replay / Canary: Replay on every commit and watch the trend. A drift toward regressed is the early warning.
  ```
  # in CI, on every commit
  mm3 replay --parent MM3-0042 \
    --compare main..HEAD --expect injection
  mm3 report history
  ```
- scan / Drift watch: Re-sweep on a schedule against a baseline scan, and see what is moving before it breaks.
  ```
  # weekly: MM3-0060 is the baseline scan
  mm3 replay --parent MM3-0060 \
    --compare main..HEAD --expect injection
  ```
- drill / Pareto: A few weak spots cause most of the failures. Rank them and fix those first.
  ```
  mm3 report hits       # worst first
  mm3 report patterns   # what keeps failing
  ```
- loop / Pre-mortem: Before building, assume it failed and ask why. Healthy answers are no.
  ```
  failure:
    pass: no          # a healthy answer is no
    1: Could "{story}" fail silently in production?
    2: Could "{story}" lose a customer's money?
  ```

Last updated 2026-10-06.
