aboutsummaryrefslogtreecommitdiff
path: root/claude-templates/.ai/workflows/open-tasks.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-28 08:08:20 -0500
committerCraig Jennings <c@cjennings.net>2026-05-28 08:08:20 -0500
commitee7049aaa62d0c38e83f20c0b3796e5eded4ca23 (patch)
treee0d9fc2e44df4bda3e36a06b6c0c4f40076a0eec /claude-templates/.ai/workflows/open-tasks.org
parent4f650f79fb3c426fb4795bb12741b481d8270005 (diff)
downloadrulesets-ee7049aaa62d0c38e83f20c0b3796e5eded4ca23.tar.gz
rulesets-ee7049aaa62d0c38e83f20c0b3796e5eded4ca23.zip
feat(workflows): audit-warranted pre-step + priority and tag enforcement
Two changes land together because each is broken without the other. open-tasks.org gains a new Phase A.1, evaluated only in Next Mode. The phase reads :LAST_AUDIT: from notes.org and walks five state signals (reminder/task mismatch, passed scheduled date, "waiting on X" matches a shipped X, dead file: link, sub-task >75% DONE coverage). If the temporal threshold of 14 days trips, or any signal fires, Next Mode offers a task-audit run before producing the recommendation. Item 1 in the offer is "run task-audit first" per the recommendation-at-item-1 convention. task-audit.org gains two pieces. Phase C now enforces priority and type-tag presence per the project's legend, applies the [#A] dating rule from that legend, and re-assesses :quick: and :solo: from reconciled facts. Unambiguous calls land autonomously. Ambiguous ones flag NEEDS-USER instead of being guessed. A new Phase E stamps :LAST_AUDIT: on completion.
Diffstat (limited to 'claude-templates/.ai/workflows/open-tasks.org')
-rw-r--r--claude-templates/.ai/workflows/open-tasks.org42
1 files changed, 41 insertions, 1 deletions
diff --git a/claude-templates/.ai/workflows/open-tasks.org b/claude-templates/.ai/workflows/open-tasks.org
index 7143aea..e90bc12 100644
--- a/claude-templates/.ai/workflows/open-tasks.org
+++ b/claude-templates/.ai/workflows/open-tasks.org
@@ -25,13 +25,51 @@ Don't route "task review" / "review tasks" here — those trigger the hygiene ha
Issue all source reads as a single batch of parallel tool calls. They're independent:
-1. Read =notes.org= — sections *Active Reminders* and *Pending Decisions* only.
+1. Read =notes.org= — sections *Active Reminders*, *Pending Decisions*, and *Workflow State* (note the =:LAST_AUDIT:= date if present; "unset" or absent is treated as "never run").
2. Read each of the 2-3 most recent files in =.ai/sessions/= — only the *Next Steps* subsection under =* Summary= (those capture recent "next time, do X" items that may still be open).
3. Read =todo.org= — entries under the open-work header (=* $Project Open Work=, e.g. =* Homelab Open Work=). Skip the resolved header (=* $Project Resolved=).
4. Run =date= for an accurate timestamp (used to evaluate deadlines + flag suspected completions).
The phases below work entirely from this in-memory snapshot. The original split-workflow versions issued these reads sequentially in different files; consolidating saves round-trips and prevents the two implementations drifting apart.
+* Phase A.1: Evaluate audit-warranted (Next Mode only)
+
+Before Next Mode produces a recommendation, decide whether a =task-audit= run looks warranted. List Mode skips this phase — it displays the plate as-is and should not trigger a write-side-effect workflow first.
+
+Two triggers; either one trips the warranted flag.
+
+** Temporal threshold
+
+If =:LAST_AUDIT:= is absent / unset, or its date is older than 14 days from today, the temporal trigger trips. (The 14-day default is per-project; tune by editing this workflow if a project churns faster or slower.)
+
+** State-signal scan
+
+Walk the Phase A snapshot for any of these cheap signals — one is enough:
+
+1. *Reminder/task mismatch* — an Active Reminder names a task or completion target that doesn't appear in =todo.org=, or =todo.org= names a reminder not present in *Active Reminders*.
+2. *Passed scheduled date* — a task with =SCHEDULED:= or =DEADLINE:= earlier than today is still =TODO= or =DOING= with no completion log under it.
+3. *"Waiting on X" matches a shipped X* — a task body contains "waiting on", "after X ships", "blocked by", and the recent session *Next Steps* (or *Files Modified*) summaries log the named X as shipped.
+4. *Dead =file:= link* — a task body's =file:= link points to a path that no longer exists (one existence check per linked path).
+5. *Sub-task DONE coverage >75%* — a parent task is still =TODO= or =DOING= while >75% of its sub-tasks are =DONE= or =CANCELLED= (a likely promotion-to-DONE candidate).
+
+** Surface and decide
+
+If neither trigger trips, proceed silently to Phase B.
+
+If one or both trip, surface them inline and ask:
+
+#+begin_example
+Task-audit looks worth running before recommending what's next:
+- Temporal: 23 days since last audit (threshold 14).
+- Signal: "blocked by review of spec X" — sessions show spec X merged.
+
+1. Run task-audit first, then come back to "what's next" (recommended)
+2. Skip the audit — proceed straight to the recommendation
+3. Defer — proceed now, file a TODO to run task-audit later
+#+end_example
+
+If the user picks option 1, hand off to =task-audit.org= and resume Next Mode at Phase B after it stamps =:LAST_AUDIT:=. If option 2, continue. If option 3, file a =** TODO [#B] Run task-audit= entry under =* $Project Open Work= with today's date and continue.
+
* Phase B: Reconcile (both modes)
Compare the open-task signal across sources. For each task in =notes.org= Active Reminders or in a recent session's Next Steps that does NOT have a corresponding =todo.org= entry:
@@ -236,6 +274,8 @@ Key elements:
8. *Re-querying =todo.org= during Phase C* — the snapshot from Phase A is canonical; don't re-read.
9. *Skipping the friction block when the cascade winner isn't actionable.* The friction filter is the override path; don't fall through to lower-cascade-tier tasks if a =:quick:= or =:solo:= task is what's actually needed.
10. *Padding the friction block when a row is empty.* If no task carries both =:quick:= and =:solo:=, omit that row entirely. Don't promote a =:quick:=-only task into the =:quick:solo:= slot.
+11. *Recommending over stale facts in Next Mode.* When =:LAST_AUDIT:= is old or a state signal trips in Phase A.1, offer =task-audit= first. Let the user override — but don't skip the offer.
+12. *Running Phase A.1 in List Mode.* The audit-warranted check is a Next Mode pre-step. List Mode displays the plate as-is and shouldn't trigger a write workflow first.
* Living Document