Lightweight item metadata available without authentication.
Walks .joy/items/, peeks each file: if it is a JOYCRYPT blob,
reads the zone name from the header without decrypting; if it is
plaintext YAML, parses just enough to extract the id and
crypt_zone fields. Used by joy crypt status / joy crypt ls /
joy auth to count and locate Crypt content without prompting
the user for a passphrase.
Lightweight placeholder for an encrypted item the caller cannot
decrypt. ID is read from the filename, zone from the JOYCRYPT magic
header; nothing is decrypted. Used by joy ls to render a [Crypted in zone <name>] row instead of failing the whole listing. See
JOY-0174-D3.
Find the file path for an item by its ID.
Accepts both full IDs (JOY-0042-A3) and short-form (JOY-0042).
Short-form returns an error if ambiguous (multiple matches).
Load all items from .joy/items/. Inaccessible-encrypted items are
silently skipped (the caller treats them as not present). For
surfacing locked-item placeholders, use
load_items_with_locked.
Load all items from .joy/items/, separating decryptable ones from
encrypted blobs the caller has no zone-key for. Plaintext items and
items whose zone key is currently active are returned as Item;
items in zones without an active key are returned as
LockedItem placeholders. See JOY-0174-D3.
Generate the next item ID by scanning existing files.
Returns “ACRONYM-0001” for the first item, increments the highest found.
All items share one number space regardless of type.
Remove references to a deleted item from other items’ deps and parent fields.
updated_by is recorded on each touched item so the audit trail names
the actor who triggered the dereference.
Record an attribute-level mutation on an item. Sets updated /
updated_by for sort recency AND appends an entry to history for
the audit footer. Use this whenever you mutate an item attribute
(status, priority, deps, assignee, edit, …). Do NOT use it for
comment add / edit / rm; those use touch_for_comment_change
instead, because per-comment audit lives on the comment itself.
Bump an item’s updated / updated_by for sort recency without
appending to its attribute history. Use this for comment add / edit
/ rm: the item is touched but no attribute changed, so the audit
trail of comment activity lives on the comment itself (its edits
list, plus the item’s comments Vec membership) rather than in the
item’s attribute history.