Expand description
Workspace storage for jyn.
Jyn reuses joy-core’s generic YAML primitives (store::write_yaml,
store::read_yaml) and ID helpers (item_filename, title_hash_suffix)
to operate on .jyn/ without duplicating IO logic or requiring changes
to joy-core. See docs/dev/Architecture.md.
Constants§
Functions§
- delete_
task - Delete a task by ID. Returns the deleted task.
- ensure_
items_ dir - Create
.jyn/items/if missing. Idempotent. - find_
task_ file - Find the file for a task ID. Accepts the display short form (
#A1,A1), the ADR-027 short form (TODO-00A1), or the full form (TODO-00A1-EA). Returns an error if the ID is ambiguous or missing. - find_
workspace_ root - Walk up from
startto the nearest directory that contains a.jyn/subdirectory, and return that directory (the workspace root). Mirrors how git and joy locate their data dir, so running jyn from a subdirectory still finds the workspace above it. ReturnsNonewhen no.jyn/exists betweenstartand the filesystem root; callers then fall back tostartso a firstjyn addcreates.jyn/there. - items_
dir - jyn_dir
- load_
task - Load a single task by its full or short ID.
- load_
tasks - Load all tasks from
.jyn/items/, sorted by filename. - next_id
- Generate the next ID in the form
TODO-XXXX-YY(ADR-027). - save_
task - Write a task to
.jyn/items/{ID}-{slug}.yaml. - update_
task - Overwrite a task on disk. If the title changed and produced a new filename (slug-derived), the old file is removed.