diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 15:05:37 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 15:05:37 -0500 |
| commit | 421b17a15219c7061ee92c07451993965fad88ea (patch) | |
| tree | 20cb0fe6f7bfc7ad2c4b0d46d93ccf8d5551728f | |
| parent | 7dd10e23cc78fab028b9ad27f0aaca0b8ec783c9 (diff) | |
| download | rulesets-421b17a15219c7061ee92c07451993965fad88ea.tar.gz rulesets-421b17a15219c7061ee92c07451993965fad88ea.zip | |
docs: codify depth-based completion rule + DRY the skill reference
Todo-format.md gets a "Completion — depth-based" section that
codifies what was implicit before: top-level (* and **) DONE tasks
stay task-shaped (DONE + CLOSED line), sub-tasks (*** and deeper)
flip to dated event-log entries, and VERIFY is the documented
exception (always dated-rewrite regardless of depth). The section
includes worked examples and the rationale for depth-based over
keyword-based.
The cj-comments skill's completion section now references the
canonical rule instead of restating the depth-based rules inline.
The three-bullet recap in the skill stays as a quick scan, but the
details and examples live in one place.
| -rw-r--r-- | .claude/commands/respond-to-cj-comments.md | 10 | ||||
| -rw-r--r-- | claude-rules/todo-format.md | 57 |
2 files changed, 57 insertions, 10 deletions
diff --git a/.claude/commands/respond-to-cj-comments.md b/.claude/commands/respond-to-cj-comments.md index 6d5caa1..67e0497 100644 --- a/.claude/commands/respond-to-cj-comments.md +++ b/.claude/commands/respond-to-cj-comments.md @@ -140,11 +140,11 @@ For **instructions**: 4. **Surface URLs.** If the subagent's output includes URLs, file paths, or external references, list them under the updated task content. After applying the edit, offer to convert them into explicit org-mode links (`[[url][label]]` or `[[file:path][label]]`) at the location where the cj comment originated, or elsewhere in the task if that fits better. -5. If the comment is inside an org-mode `TODO` heading, mark that `TODO` as `DOING` when work begins. **When the work is complete, the form depends on heading depth *and* keyword:** +5. If the comment is inside an org-mode `TODO` heading, mark that `TODO` as `DOING` when work begins. **When the work is complete, follow the depth-based rule in [todo-format.md → Completion](../../claude-rules/todo-format.md):** - - **`TODO` / `DOING` at top-level (`*`) and second-level (`**`)** advance to `DONE` with a `CLOSED: [YYYY-MM-DD Day HH:MM]` line under the heading. The keyword and original task name stay visible so the task remains in the agenda. - - **`TODO` / `DOING` at third-level (`***`) and deeper** get the dated-heading rewrite: replace the heading line with `*** YYYY-MM-DD Day @ HH:MM:SS -ZZZZ <what was decided / done>` (generate the timestamp with `date "+%Y-%m-%d %a @ %H:%M:%S %z"`); drop the keyword and CLOSED line. The body/sub-headers stay as the record of what was done. These deeper tasks become an in-place event log under their parent. - - **`VERIFY` at any depth** gets the dated-heading rewrite *and* a body replacement: rewrite the heading to `<depth> YYYY-MM-DD Day @ HH:MM:SS -ZZZZ <what was answered or done>` (same timestamp generator); replace the body with either the information Craig provided (when the VERIFY was a question) or a description of the action taken (when it was an instruction / pending-decision marker). VERIFYs at `**` follow this dated-rewrite rule even though regular `**` DONE tasks stay task-shaped — a resolved VERIFY is an answered question, not a finished task. Canonical rule: [todo-format.md § VERIFY tasks → Completion](../../claude-rules/todo-format.md). + - **Regular `TODO`/`DOING` at `*` or `**`** — advance to `DONE` + `CLOSED:` line; the keyword and original heading stay visible in the agenda. + - **Regular `TODO`/`DOING` at `***` and deeper** — rewrite the heading to `<depth> YYYY-MM-DD Day @ HH:MM:SS -ZZZZ <past-tense description>`; drop the keyword/priority/tags. + - **`VERIFY` at any depth** — dated-heading rewrite *and* a body replacement: replace the body with either the information Craig provided (when the VERIFY was a question) or a description of the action taken (when it was an instruction / pending-decision marker). VERIFYs at `**` follow this rule even though regular `**` DONE tasks stay task-shaped — a resolved VERIFY is an answered question, not a finished task. **VERIFY-answer pattern.** When a cj annotation's `parent_heading_chain` ends with a `VERIFY ...` heading (i.e., the cj sits directly inside a VERIFY task), the cj is Craig's answer to the question that VERIFY held open. The cj content is the source for the dated-rewrite body. Two shapes: @@ -160,7 +160,7 @@ For **instructions**: Detection signal from `cj-scan`: a cj block whose `parent_heading_chain[-1].heading` starts with `VERIFY`. - Craig's convention for `todo.org` and prep docs: regular tasks at top and second-level remain task-shaped on completion so they stay visible in the agenda; deeper sub-tasks flip into a dated log; VERIFYs always flip to a dated log regardless of depth. (Feedback memory: `feedback_done_tasks_become_dated_log_headings`.) Leave a still-in-progress task as `DOING` for the user; only the *completed* ones get the `DONE`-or-dated-rewrite. + Leave a still-in-progress task as `DOING` for the user; only the *completed* ones get the `DONE`-or-dated-rewrite. (Feedback memory: `feedback_done_tasks_become_dated_log_headings` mirrors the rule.) 6. Remove the cj comment from the file. **Prefer the script:** diff --git a/claude-rules/todo-format.md b/claude-rules/todo-format.md index 24b5ca2..a8df76a 100644 --- a/claude-rules/todo-format.md +++ b/claude-rules/todo-format.md @@ -57,6 +57,53 @@ When adding a new task: When restructuring an existing entry that's already sentence-shaped, split it: keep the topic as the heading, move the rest to the body. +## Completion — depth-based + +How a finished `TODO` / `DOING` task is closed depends on its depth in the outline. The rule is *depth-based*, not keyword-based, because the agenda truncates beyond level-2 and the visibility tradeoff flips at that boundary. + +### Top-level tasks (`*` and `**`) — stay task-shaped + +A completed `*` section or `**` task keeps its `TODO`/`DOING`-shape so it remains visible in the agenda as a record of what shipped: + +1. Change the keyword to `DONE` (or `CANCELLED` if the task was abandoned rather than completed). +2. Add a `CLOSED: [YYYY-MM-DD Day]` line directly under the heading. Use `date "+%Y-%m-%d %a"` to generate. +3. Leave the original heading text, priority cookie, and tags intact. +4. Optionally add a one-line resolution note in the body. + +The entry is then a candidate for `--archive-done` in the wrap-up cleanup, which moves level-2 `DONE`/`CANCELLED` subtrees from the project's "Open Work" section into "Resolved." + +**Example:** + + ** TODO [#B] Convert <cj structure template to universal yasnippet + +becomes + + ** DONE [#B] Convert <cj structure template to universal yasnippet + CLOSED: [2026-05-15 Fri] + +### Sub-tasks (`***` and deeper) — rewrite to a dated event-log entry + +A completed sub-task disappears as a task and becomes an in-place event-log entry under its parent. The parent's subtree organically grows into a chronological history of what landed without the agenda being cluttered by a long tail of nested `DONE` lines. + +1. Replace the heading with `<same depth> YYYY-MM-DD Day @ HH:MM:SS -ZZZZ <past-tense description>`. +2. Generate the timestamp with `date "+%Y-%m-%d %a @ %H:%M:%S %z"`. +3. Reword the original imperative title into the past-tense action that landed. Trim or restate if the original wording doesn't fit the action. +4. Drop the `TODO`/`DOING` keyword, the priority cookie, and the tags. The body stays as the record of what was done (if useful). + +**Example:** + + *** TODO [#B] Wire yasnippet for universal availability :refactor: + +becomes + + *** 2026-05-15 Fri @ 12:58:08 -0500 Wired yasnippet for universal availability + +### Why depth-based + +The agenda view (`org-agenda`) shows entries at the section + top-task level. Letting `**` tasks stay task-shaped preserves their visibility as "things that recently shipped." Letting `***+` sub-tasks flip to dated entries keeps the agenda from being clogged with a long list of completed sub-tasks at every depth — those become history within their parent instead. + +`VERIFY` is the documented exception: it follows the dated-rewrite rule at **all** depths (including `**`), because a resolved VERIFY is an answered question rather than a finished task. See the VERIFY section below. + ## VERIFY tasks `VERIFY` is the keyword for "waiting on Craig's input" — open questions, @@ -142,11 +189,11 @@ The completed VERIFY becomes an in-place event log entry. The original question is preserved by the dated heading + body shape; anyone scanning the agenda or `git log` can see what was asked and what landed. -**Note on the top-level case.** Regular `**` DONE tasks normally stay -task-shaped with a `DONE` keyword + `CLOSED:` line (so they remain visible -in the agenda). VERIFYs at `**` are the exception — they convert to dated -log entries on completion because a resolved VERIFY isn't a "done task," -it's an answered question. The dated-rewrite rule wins for VERIFYs at all +**Note on the top-level case.** Regular `**` DONE tasks stay task-shaped +with a `DONE` keyword + `CLOSED:` line per *Completion — depth-based* +above. VERIFYs at `**` are the exception — they convert to dated log +entries on completion because a resolved VERIFY isn't a "done task," it's +an answered question. The dated-rewrite rule wins for VERIFYs at all depths. ### Don't leave stale placeholders |
