# Record and recall a useful rule

Source: https://usecns.dev/engram-guide-record-and-recall-a-useful-rule/

[Start here](https://usecns.dev/manual-engram/)
[CLI commands](https://usecns.dev/commands-engram/)
[Configuration & integration](https://usecns.dev/engram-topics/)

Follow [installation and access](https://usecns.dev/install/) to obtain `engram`, then check `engram version` against this reference. Start in an empty test directory with synthetic material:

```
engram init --domain synthetic-demo
engram validate-ote .engram/ote.toml
engram record --key fixture-retry-rule --kind procedure --ring M2 \
  --body 'Inspect pending synthetic work before retrying the fixture.'
engram recall fixture-retry-rule --session synthetic-session
```

Initialization writes `.engram/ote.toml` and `.engram/engram.db`; it refuses an existing manifest unless you pass `--force`. Recording and recall also mutate state: recall can track use and affect evidence, so it is not a write-free search.

The `--ring M2` choice puts this rule in repository/domain memory. A **ring** is a scope for knowledge: M0 is shared canon, M1 role knowledge, M2 repository/domain knowledge, M3 team or mission state, and M4 an individual agent position's overlay. Pass `--ring` explicitly; recording defaults to M4, despite older CLI help saying M2.

Choose a scope whose readers are authorized for the material. Keep secrets, personal activity and client-specific information out of shared rings and public exports. Permission to read source material is not permission to share knowledge derived from it.