> ## Documentation Index
> Fetch the complete documentation index at: https://docs.basemode.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Decisions and recall

> Recording a decision, an insight or a correction, and getting it back later. Which of learn, decision and rule you want, and which search reaches which.

Three commands write things you want remembered, and they are not interchangeable.

| Command             | For                                             | Shape                           |
| ------------------- | ----------------------------------------------- | ------------------------------- |
| `base decision log` | A specific choice, with the reasoning           | A record of what was decided    |
| `base learn`        | An insight, a correction, a commitment, a shift | A record of what you learned    |
| `base rule add`     | A standing instruction                          | A prescription that fires later |

The line that matters: `learn` and `decision log` record what happened. `rule add` changes what happens next. If you want future sessions to actually follow something, it is a rule; if you are writing down what you found out, it is a note or a decision.

## Recording a decision

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base decision log --domain basemode --decision "Docs deploy on a push to main" --rationale "One branch is the live site, so a merge is the release and there is nothing else to remember"
```

**Why it works.** `--rationale` is required, not optional, and that is the whole point of using `decision log` rather than `learn`. A decision without its reasoning can only be obeyed or ignored later. With the reasoning attached it can be revisited, which is what you actually want six months on when the constraint that produced it has changed.

**The gotcha.** The decision gets a stable slug of the form `{domain}.{decision}`. Note it, or find it later with `decision search`, because that slug is how you edit it.

**Next rung.** `--recall` adds extra text to help the decision surface later. Use it for the words you will actually search with, which are rarely the words in the decision itself.

## Fixing a decision you got wrong

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base decision search --keyword "deploy"
base decision update basemode.docs-deploy-on-a-push-to-main --rationale "One branch is the live site, and the preview plan does not cover this repo"
```

**Why it works.** `decision update` edits in place, addressed by the slug or by the exact decision text. The node keeps its address and every edge pointing at it survives.

**The gotcha.** Prefer this over `base decision delete`. Delete is keyword-matched with no preview, and it removes the decision's history rather than correcting it. Search first, update second.

## Recording anything else

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base learn --text "Mint dev does not serve llms.txt; that is generated by the hosted build" --domain basemode --type insight
base learn --text "The bank is one minor version behind the binary" --domain basemode --type correction
base learn --list --domain basemode
```

`--type` takes `insight`, `correction`, `decision`, `commitment` or `shift`, and defaults to `insight`. `--project` and `--entity` add extra edges.

**Why it works.** A note is a graph node with edges to its domain and to anything else you attach it to, so it can be reached from more than one direction later. That is the difference between this and a text file.

**The gotcha.** `--domain` is required unless you are using `--mention`. It is the anchor that keeps notes findable rather than accumulating unattached.

## Editing and removing notes

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base learn --list
base learn --update mint-dev-port --text "Mint dev serves on 3111 here by convention"
base learn --remove mint-dev-port
```

`--list` gives you the slugs. Both `--update` and `--remove` take one.

## Recording that something came up again

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base learn --mention mint-dev-port --context "came up again while writing the reference"
```

**Why it works.** This increments the note's mention count and stamps when it last happened, which is how you find the things you keep bumping into.

**The gotcha.** A mention does **not** protect a note from `base graph purge --stale`. That measures `lastRead`, and mentions write a different timestamp. Verified from source at `4866996`, the commit the shipped 0.13.2 binary was built from.

## Getting it back

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base recall --keyword "mint"
base recall --domain basemode
base decision search --keyword "deploy"
base graph query "why do the docs deploy on a push to main"
```

Which one to reach for:

* **`base recall`** searches notes, literally and quickly. Use it when you roughly know what you are looking for and want the raw hits.
* **`base decision search`** is the same idea, scoped to decisions and their reasoning.
* **`base graph query`** retrieves a subgraph and synthesizes an answer across it. Use it for open questions where the answer is assembled from several facts rather than found in one.

<Note>
  **`base recall` writes, despite being a search.** It stamps `lastRead` on every note it returns, and that is the timestamp `base graph purge --stale` measures. Recalling a note therefore protects it from the next purge.

  Injection during a turn deliberately does not do this, so the hot path never pays for a graph write. Only the explicit command stamps.
</Note>

## People and organizations

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base entity add --name "Mintlify" --entity-type organization --domain basemode
base entity list
base entity get mintlify
base entity update mintlify --description "Hosts docs.basemode.ai"
```

**The gotcha.** `--domain` is required, deliberately, so an entity always has something to be relevant to. An entity with no anchor would never surface.

## Goals and reminders

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base goal add --name "Docs cover every shipped command" --target "120 command paths"
base reminder add --name "Check the Mintlify preview plan" --in 2h
base reminder add --name "Renew the domain" --due 2027-08-25
```

Give a reminder exactly one of `--in`, `--at` or `--due`.

**The gotcha.** A due reminder surfaces at every session start until you remove it, and `base reminder remove` is a hard delete with no preview. It is exempt from both the suppression check and the character budget for the same reason handoffs are: an open loop that stops reminding you is one you have lost.

## Flat-file memories

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
base memory list
base memory purge
```

`base memory list` shows the loose-file memories on this machine with their paths. `base memory purge` removes the ones whose content the graph already holds.

**The gotcha.** There is no preview on purge. Run `list` first and read it, because that is the only look you get.

## Next

<CardGroup cols={2}>
  <Card title="Rules and domains" icon="filter" href="/guides/rules-and-domains">
    Writing something that fires on its own, rather than something you look up.
  </Card>

  <Card title="Graph and memory reference" icon="database" href="/reference/graph-and-memory">
    Every flag on every command here.
  </Card>
</CardGroup>
