Reference: Memory

Reference for the "Memory" group of qargi commands: every verb with its arguments, options and examples, generated from the release.

Updated

qargi memory #

Check a memory store, list its tiers, read a note, split, merge or copy stores.

split, merge and copy work between two stores, each a directory of notes, a .jsonl dump (read-only: a source, never a target) or a memstore_ id. A note with a name starting with a dot, or that a store cannot hold, makes the plan refuse and name it. Nothing is deleted: what a split moves out of a store goes to /_archive/<date>/ and a collision to /_conflicts/<date>/, and the origin of every note written is added to its Sources: line, so each change can be undone. Without --approved they print the plan and its token and change nothing; a store whose notes changed since the plan is refused.

VerbWhat it does
lintCheck a store against the canon
getPrint one note
tiersList the project's memory tiers (repo, cloud, project, shared, system): where each is, whether it exists, its notes
checkCheck every existing memory tier against the canon, and that no note lives in two tiers
initCreate a memory tier (repo, project, shared or system) as an empty store of the standard layout
moveMove notes from one tier to another, with the original archived in the first
splitCopy the notes a selector picks into another store, optionally archiving the originals
mergeAdd every note of FROM that TO lacks
copyCopy notes into another store, leaving the source as it is

qargi memory lint #

qargi memory lint STORE_ID [OPTIONS]

Check a store against the canon.

OptionArgumentWhat it does
--kindKINDrecipes or reference (for a store before the canon)

qargi memory get #

qargi memory get STORE_ID PATH

Print one note.

qargi memory get memstore_01ABC /shared/INDEX.md

qargi memory tiers #

qargi memory tiers [OPTIONS]

List the project's memory tiers (repo, cloud, project, shared, system): where each is, whether it exists, its notes.

A tier is one memory store of the standard layout at a fixed rank, highest first: repo > cloud > project > shared > system. Where they are comes from the project's answers (memory.tiers; each key is optional and has a default). The reference store is not a tier. Reads only; nothing is created or changed.

OptionArgumentWhat it does
--projectPROJECTthe project, instead of the one inferred from here
--jsonmachine-readable

qargi memory check #

qargi memory check [OPTIONS]

Check every existing memory tier against the canon, and that no note lives in two tiers.

Runs the canon check on each tier that exists, then reports a note path present in two or more tiers (structural files such as README.md and INDEX.md repeat per tier and are fine). A tier that does not exist (memory init creates it) or cannot be reached is information, not a failure. Exit 1 when anything failed.

OptionArgumentWhat it does
--projectPROJECTthe project, instead of the one inferred from here

qargi memory init #

qargi memory init TIER [OPTIONS]

Create a memory tier (repo, project, shared or system) as an empty store of the standard layout.

Without --approved it shows what would be created and a plan token and changes nothing. It refuses a tier that holds files that are not a standard store, one whose place overlaps another tier, a repo tier outside the checkout, and the cloud tier (provision creates that). The repo tier is written inside your repository checkout: qargi never commits it, so review it and commit or ignore it yourself. A tier that is already set up says so and exits 0.

OptionArgumentWhat it does
--projectPROJECTthe project, instead of the one inferred from here
--planTOKENthe plan token printed by the same command without --approved
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log

qargi memory move #

qargi memory move PATH [OPTIONS]

Move notes from one tier to another, with the original archived in the first.

PATH is one note (ending in .md) or a folder prefix under shared/ or roles/ROLE/. Only notes move, never indexes. A note must live in one tier, so it refuses a path that is also in another tier. Nothing is deleted: the original goes to /_archive/<date>/ of the first tier and each copy records its origin. Without --approved it prints the plan and its token and changes nothing; a tier whose notes changed since the plan is refused.

OptionArgumentWhat it does
--projectPROJECTthe project, instead of the one inferred from here
--fromTIERthe tier the notes are in
--toTIERthe tier they go to
--planTOKENthe plan token printed by the same command without --approved
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log

qargi memory split #

qargi memory split FROM TO [OPTIONS]

Copy the notes a selector picks into another store, optionally archiving the originals.

At least one of --prefix, --role and --note-kind is needed; a note must match every one given. Notes already in TO are left; a different one goes to /_conflicts/<date>/ in TO.

OptionArgumentWhat it does
--prefixPATHpick the notes under this path (repeat for several)
--roleROLEpick the notes under /roles/ROLE/
--note-kindKINDpick the notes whose Kind: header is KIND (setup, gate, rule, ...)
--archivemove the originals to /_archive/<date>/ in FROM (with their origin in Sources:)
--planTOKENthe plan token printed by the same command without --approved
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log
qargi memory split ./memory ./build --role build --archive
qargi memory split ./memory ./build --role build --archive --plan TOKEN --approved "go"

qargi memory merge #

qargi memory merge FROM TO [OPTIONS]

Add every note of FROM that TO lacks.

FROM is only read. A note whose original sits in TO's archive is moved back from it, so merging what a split wrote undoes the split.

OptionArgumentWhat it does
--policyPOLICYwhat to do when a note differs: conflicts (put the incoming one in /_conflicts/<date>/, default) or keep (leave it and report)
--planTOKENthe plan token printed by the same command without --approved
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log
qargi memory merge ./build ./memory

qargi memory copy #

qargi memory copy FROM TO [OPTIONS]

Copy notes into another store, leaving the source as it is.

Without a selector every note is copied except /CANON.md. Each copy records its origin in Sources:.

OptionArgumentWhat it does
--prefixPATHpick the notes under this path (repeat for several)
--roleROLEpick the notes under /roles/ROLE/
--note-kindKINDpick the notes whose Kind: header is KIND (setup, gate, rule, ...)
--policyPOLICYwhat to do when a note differs: conflicts (put the incoming one in /_conflicts/<date>/, default) or keep (leave it and report)
--planTOKENthe plan token printed by the same command without --approved
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log

qargi canon #

Bring a project's two memory stores to the standard layout and keep them there.

The canon fixes the layout and the note format of both stores (shared/ and roles/<role>/, a header on every note, an index with a Load column). plan and apply set up an empty store and keep a current one current; a store of an older layout or canon version is reported as unknown and not changed.

VerbWhat it does
checkReport conformance and the version of each store
planPrint every step needed to reach the current canon (changes nothing)
applyRun the plan
seed-roleWrite a role's baseline notes without overwriting anything
promoteMove a role's note to shared/
auditReport a session that wrote under another role's folder

qargi canon check #

qargi canon check [PROJECT] [OPTIONS]

Report conformance and the version of each store.

PROJECT can be left out inside the project's repository, or set QARGI_PROJECT.

OptionArgumentWhat it does
--kindKINDwhich store: memory or reference (default: both)

qargi canon plan #

qargi canon plan [PROJECT] [OPTIONS]

Print every step needed to reach the current canon (changes nothing).

PROJECT can be left out inside the project's repository, or set QARGI_PROJECT.

OptionArgumentWhat it does
--kindKINDwhich store: memory or reference (default: both)

qargi canon apply #

qargi canon apply [PROJECT] [OPTIONS]

Run the plan.

PROJECT can be left out inside the project's repository, or set QARGI_PROJECT.

OptionArgumentWhat it does
--kindKINDwhich store: memory or reference (default: both)
--planTOKENthe plan token printed by the same command without --approved
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log

qargi canon seed-role #

qargi canon seed-role [PROJECT] [OPTIONS]

Write a role's baseline notes without overwriting anything.

PROJECT can be left out inside the project's repository, or set QARGI_PROJECT.

OptionArgumentWhat it does
--roleROLEthe role, or shared
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log

qargi canon promote #

qargi canon promote [PROJECT] [OPTIONS]

Move a role's note to shared/.

PROJECT can be left out inside the project's repository, or set QARGI_PROJECT.

OptionArgumentWhat it does
--kindKINDwhich store: memory or reference (default: both)
--pathPATHthe note, /roles/<role>/...
--approvedWORDSyour go-ahead for exactly that plan, in your words; recorded in the audit log

qargi canon audit #

qargi canon audit [PROJECT] [OPTIONS]

Report a session that wrote under another role's folder.

PROJECT can be left out inside the project's repository, or set QARGI_PROJECT.

OptionArgumentWhat it does
--kindKINDwhich store: memory or reference (default: both)