---
title: Closed vocabularies
description: "The fixed sets a value must come from: memory types, edge relations, PARA buckets, task statuses, and edge provenance."
---

## 1. The vocabularies

A closed vocabulary is a fixed list, and a value from outside it is refused. There are 9 of them, and each one is restated as a SQL `CHECK` constraint, so the database enforces the same list the code does.

| Constant | Members | Values |
| --- | --- | --- |
| `MEMORY_TYPES` | 10 | `episodic`, `semantic`, `procedural`, `agent_insight`, `user_preference`, `error_pattern`, `verdict`, `precedent`, `arc`, `task` |
| `PARA_BUCKETS` | 4 | `projects`, `areas`, `resources`, `archive` |
| `TASK_STATUSES` | 4 | `todo`, `doing`, `blocked`, `done` |
| `EDGE_CLASSES` | 4 | `memory`, `person`, `provenance`, `task` |
| `MEMORY_RELS` | 9 | `supersedes`, `contradicts`, `caused_by`, `leads_to`, `part_of`, `relates_to`, `example_of`, `supports`, `laterally_related` |
| `PERSON_RELS` | 2 | `about_person`, `authored_by` |
| `PROVENANCE_RELS` | 1 | `from_session` |
| `TASK_RELS` | 2 | `blocks`, `subtask_of` |
| `EDGE_PROVENANCES` | 3 | `authored`, `sleep`, `import` |

## 2. MEMORY\_TYPES

10 values, from `packages/contracts/src/types.ts`: `episodic`, `semantic`, `procedural`, `agent_insight`, `user_preference`, `error_pattern`, `verdict`, `precedent`, `arc`, `task`

The memory type vocabulary, closed. Ten values, restated by the `files.memory_type`
CHECK constraint in SQL.

`arc` is in the vocabulary but absent from `WRITABLE_MEMORY_TYPES`: an arc is
synthesized by the sleep cycle from many memories, so an agent naming one directly
would be asserting a conclusion the corpus has not yet earned.

`task` is ONE axis with the other nine rather than a parallel `kind` column, because
three overlapping type vocabularies is what made
the predecessor memory system's classification unanswerable. A task is a memory type whose
retrieval, dedup, and curation treatment a filter states, not a second axis. Tasks are
default-excluded from search and skipped by sleep. See `@memhtml/index`'s `assembleScope`
and the sleep phases' `excludeTypes`.

## 3. PARA\_BUCKETS

4 values, from `packages/contracts/src/types.ts`: `projects`, `areas`, `resources`, `archive`

PARA's four buckets, closed and ordered. `archive` is a bucket rather than a status
because eviction is a `git mv`. The path itself records the state, so `git log --follow` reads through it and `diff -M` reports the move as `R100`.

## 4. TASK\_STATUSES

4 values, from `packages/contracts/src/types.ts`: `todo`, `doing`, `blocked`, `done`

A task's own status, carried in `memhtml-task-status`, a SEPARATE axis from
`MemoryStatus`, which stays `active | archived` for every type including `task`.

Two axes rather than four `memhtml-status` values because `active`/`archived` is what every
archive, correction, and publish path switches on, and a fifth value there would silently
change the meaning of each of them. Finishing a task stamps `done` AND archives the file
through the same `archiveMemory` machinery, so `done` is not a resting state on its own and
"what did I finish" is answered by the archive tree plus `git log`.

## 5. EDGE\_CLASSES

4 values, from `packages/contracts/src/edges.ts`: `memory`, `person`, `provenance`, `task`

The four non-mixing edge classes. The class is what keeps a person or task edge out of
PageRank, MMR, and the retention bridge count. Every memory-graph query filters
`edge_class = 'memory'`, and the SQL CHECK constraint refuses a rel that belongs to
another class.

## 6. MEMORY\_RELS

9 values, from `packages/contracts/src/edges.ts`: `supersedes`, `contradicts`, `caused_by`, `leads_to`, `part_of`, `relates_to`, `example_of`, `supports`, `laterally_related`

The nine memory rels. `supersedes` and `contradicts` are penalty-bearing: they gate
the retention `contested_status` signal, so sleep promotes a corroborated one into
both files rather than leaving it in the rebuildable index.

## 7. PERSON\_RELS

2 values, from `packages/contracts/src/edges.ts`: `about_person`, `authored_by`

The two person rels, pointing at `resources/people/*`.

## 8. PROVENANCE\_RELS

1 values, from `packages/contracts/src/edges.ts`: `from_session`

The one provenance rel, linking a memory to the session that produced it.

## 9. TASK\_RELS

2 values, from `packages/contracts/src/edges.ts`: `blocks`, `subtask_of`

The two task rels, both between two `task` files.

Their own class for the same reason the person rels have one: task topology is working
state, and a `blocks` edge entering PageRank would let an agent's to-do list reweight the
retention of its knowledge. `@memhtml/store`'s `linkMemories` refuses a task rel unless BOTH
endpoints are tasks, and the `edges` CHECK refuses the rel under any other class.

## 10. EDGE\_PROVENANCES

3 values, from `packages/contracts/src/edges.ts`: `authored`, `sleep`, `import`

Where an edge came from. `derived` edges are only ever `sleep`-provenanced.

## 11. Provenance

A loader generates this page from `packages/contracts/src/types.ts and packages/contracts/src/edges.ts` while the site builds, so no file in the repository holds it: each set is read as the array the schemas and the CHECK constraints are built from. Change the registry and this page changes with it.