← Catalog

pi-ritari

Ritari long-term memory for Pi: typed search, read, write, and edit over the rit CLI, plus a session-start brief.

Package

Install

Install with PiG

pig install npm:pi-ritari

Install with Pi

pi install npm:pi-ritari
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/ritari.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 4.3.0 (README.md). PiG does not review it.

pi-ritari

Ritari long-term memory for Pi: four typed tools over the rit CLI, plus the session-start brief.

pi install npm:pi-ritari

Requires rit on your PATH (brew install cndreisbach/ritari/ritari). The package version matches the CLI version it ships with.

What you get

ToolDoes
ritari_searchSearch by words, type, tag, observation category, or relation. Returns IDs, titles, and matching snippets.
ritari_readRead a note (frontmatter, observations, relations, sources, hash) or just its markdown body.
ritari_writeCreate a note, or add observations, relations, tags, and sources to an existing one.
ritari_editReplace a body (with the hash you last read), append to it, change its description or state, or update a cited source by its number.

At the start of a session, and again after a compaction, the extension adds the output of rit brief — recent daily notes and open tasks — to the run. It is read-only and silent if rit is missing.

There are no direct file tools: every write goes through rit, so frontmatter, derived footnotes, indexes, and the log stay correct, and the model never needs to build flag strings or parse YAML.

Which knowledge base

Every call names its project explicitly and reports it back in the result:

  1. RITARI_PROJECT, when set;
  2. the nearest ritari.yaml at or above the working directory, matched against the registry by path;
  3. the registry default.

If a directory declares a ritari.yaml that the registry does not know, the call fails instead of falling back, so a note is never written to a different knowledge base than the directory declares.

Writing safely

ritari_write refuses a title that already exists unless you pass its id, so a match is never a silent append. ritari_edit refuses to replace a body without the expect_hash that ritari_read returned, so a stale edit fails instead of overwriting someone else's change.

Development

npm install
npm test
npm run typecheck