---
name: memory
description: Record and read durable Omagy project facts, directives, and working notes.
argument-hint: "<read|note|directive|priority|working|manual> <fact or note>"
---

# Memory

Use this skill when the user asks to remember project facts, record durable
conventions, update working notes, or inspect Omagy memory.

## Runtime Contract

- Use `omagy memory ... --json` for all writes to `.omagy/project-memory.json`
  and `.omagy/notepad.md`.
- Do not edit `.omagy/project-memory.json` or `.omagy/notepad.md` directly.
- Keep MCP memory tools read-only; mutation belongs to the CLI.
- Store durable project facts in project memory, and short-lived current-focus
  notes in the notepad.

## Commands

Read durable memory:

```bash
omagy memory read --json
```

Add a categorized note:

```bash
omagy memory add-note --input '{"category":"build","content":"npm test is the full regression gate"}' --json
```

Add a directive:

```bash
omagy memory add-directive --input '{"directive":"Keep MCP memory tools read-only","priority":"high","context":"plugin architecture"}' --json
```

Replace priority notepad content:

```bash
omagy memory notepad-write-priority --input '{"content":"Finish artifact-backed deep-interview handoff"}' --json
```

Append working or manual notepad entries:

```bash
omagy memory notepad-write-working --input '{"content":"Investigating review workflow"}' --json
omagy memory notepad-write-manual --input '{"content":"User prefers long-term design over compatibility shims"}' --json
```

Read notepad or stats:

```bash
omagy memory notepad-read --json
omagy memory notepad-stats --json
```

## Write Policy

Project memory shape:

- `techStack[]`
- `build[]`
- `conventions[]`
- `structure[]`
- `notes[]`
- `directives[]`

Prefer specific, reusable facts over raw transcript. If a note only matters for
the current active task, use `notepad-write-working`; if it should influence
future Omagy behavior in this repo, use `add-note` or `add-directive`.
