Add a repo-local archive for retired whys and decouple notes from park - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.todo/archive/, a repo-local home for retired whys, and decouples todo's note contract frompark/schema. A completed task is retired withtodo archive, which asserts the note's one-line relevance why and moves it into the repo where the work happened, so a how-did-we-fix-this search lands in the right place and relevance is inherited from the repo.What's new
todo archive <ref>retires a completed[x]task: it asserts the note'ssynopsis(existing, or--synopsis), rewrites the note as a todo-native record, writes.todo/archive/<ID>.md(--nameoverrides the basename), and removes the task line and the source note entry.todo list --archiveprints a compactNAME/SYNOPSISview of the archive;--jsonemits a versioned{schema_version, archived[]}envelope;--allaggregates across registered repos. Defaultlistnever shows archived content.kind: recordpluscreated/source/synopsis) and no longer importsgithub.com/polymorcodeus/park/schema.add -nwithout a disposition flag now stamps a native record.--categorystill emits a park-shaped record, rendered locally and byte-compatible with park'sWriteTemplate, andNoteDispositionstill recognizes a park note by the barecategory:key.clear- a completed task whose note is a native record has its line removed but the note preserved, reported separately from parked notes.Usage
todo archive <ref> [--synopsis ...] [--name ...].todo/archive/todo list --archive [--all] [--json]Behavior changes / guardrails
archiveonly accepts a completed[x]task with a companion note; a failed guard mutates nothing.synopsispre-fills it and--synopsisoverrides it.NoteDispositionprecedence iskind: work-order>category:(park) >kind: record> float.add -ndefault output changes from a park record (category: areas) to a native record (kind: record); existing park-shaped notes keep working throughcategory:.Testing
NoteDisposition, the archive happy path, the synopsis gate, the done/note guards, synopsis override plus--name,ListArchivedsorting and the missing-directory case, andclearpreserving record notes.archive,list --archive,list --archive --json, and the error path when a work-order note is archived without a synopsis.make checkruns fmt, vet, lint, and tests; all green.