aboutsummaryrefslogtreecommitdiff
path: root/.ai
diff options
context:
space:
mode:
Diffstat (limited to '.ai')
-rw-r--r--.ai/sessions/2026-06-28-15-57-inbox-proposals-shipped-and-task-audit.org278
1 files changed, 278 insertions, 0 deletions
diff --git a/.ai/sessions/2026-06-28-15-57-inbox-proposals-shipped-and-task-audit.org b/.ai/sessions/2026-06-28-15-57-inbox-proposals-shipped-and-task-audit.org
new file mode 100644
index 0000000..bf67b8e
--- /dev/null
+++ b/.ai/sessions/2026-06-28-15-57-inbox-proposals-shipped-and-task-audit.org
@@ -0,0 +1,278 @@
+#+TITLE: Session Context
+#+DATE: 2026-06-28
+
+* Summary
+
+** Active Goal
+
+Startup → processed all 11 inbox handoffs (7 shared-asset proposals, skeptical-
+reviewed via parallel subagents, walked A–G with Craig), then two follow-ups
+(code-quality umbrella workflow + a task review), then a full task audit, then
+wrap. Everything shipped is committed + pushed to origin/main.
+
+** Decisions
+
+- A simplification mode added to /refactor, and Craig chose to include it in the
+ default full scan (not own-mode-only).
+- locating-craig.md is a standalone rule (not folded into daily-drivers.md).
+- suspend.org built standalone-but-lean (not folded into flush), always-commit
+ step dropped.
+- Commit gate: prose tightening AND a hard PreToolUse deny on bundled
+ test+commit (Craig picked the hook backstop over prose-only).
+- Bug-priority matrix is BINDING for any project with a codebase (not opt-in);
+ mapping P1→[#A], P2→[#B], P3→[#C], P4→[#D]; home + work notified and work has
+ adopted it.
+- Dot-stripped project names: alias approach (exact match still wins).
+- readability-audit kept separate from /refactor (it feeds /refactor by filing
+ :refactor: tasks).
+- Wrap done as NORMAL wrap, not teardown — the teardown feature is unvalidated
+ (its manual test was deferred this session), so no teardown sentinel dropped.
+
+** Data Collected / Findings
+
+- Task audit verdict: contrary to "many shipped," NONE of the 21 open tasks are
+ fully-done-but-open. The two closest (wrap-teardown, memories-sync) are
+ code-complete, gated only on Craig's manual validation.
+- The git-commit-confirm hook's deny path: `** TODO` is a substring of
+ `*** TODO`, so Edit old_strings on demoted headings need a leading-newline
+ boundary to disambiguate.
+- route_recommend matching: word-boundary literal match avoids home/homeowner
+ false positives; weak matching on common-word names (home, work) can
+ over-route — accepted v1 risk (labeled weak, reject-flow recovers).
+
+** Files Modified (all committed + pushed)
+
+- b621914 .claude/commands/refactor.md — simplification mode (later folded into full scan, 96dfa63 era edits)
+- d4e9d7d claude-rules/locating-craig.md
+- 797c426 suspend.org + readability-audit.org (+ INDEX, protocols)
+- 92dfc35 verification.md + commits.md + hooks/{git-commit-confirm,_common}.py + tests (bundled-test deny)
+- 9753d03 triggers.md + inbox-send.py (+ mirror, tests) — dot-stripped names
+- 798ef02 claude-rules/todo-format.md + docs/design bug-priority bundle — binding matrix
+- 6fb6797 notes.org inbox marker
+- 96dfa63 code-quality.org umbrella workflow (+ INDEX)
+- 5263cd6 todo.org — task review (3 restamped, generic-runtime → [#D])
+- 6be62ae .ai/scripts/route_recommend.py (+ mirror, tests) — wrap-up routing recommendation engine (spec Phases 1+3)
+- 749566c todo.org — task audit reconciliation + flashcard tooling cluster
+
+** Next Steps — PICK UP HERE
+
+Phase D of the task audit was started but only 1 of 5 items handled. Remaining,
+in suggested order:
+
+1. *wrap-teardown (task 42) manual validation — DEFERRED today.* Feature shipped
+ + pushed both sides; only the 5-test checklist remains (in the task body).
+ HAZARDS when running: test 1 tears down whatever session runs it (use a
+ SCRATCH ai-term session, never the live one); test 4 powers off (stub
+ `sudo shutdown now` → echo first); each "wrap" test ends its session so they
+ don't chain. On all-pass close task 42 DONE + CLOSED:; a failure becomes a bug.
+2. *memories-sync VERIFY (task 214).* Implementation fully shipped; can't close
+ until (a) its manual-validation child runs and (b) ratio gets the one-time
+ roam.git clone + roam-sync timer (velox confirmed; ratio still outstanding,
+ can't verify from velox). See daily-drivers.md.
+3. *Spec storage location + lifecycle convention (task 362).* Stalled on one
+ decision: filename-suffix vs org-keyword for lifecycle status. Needs Craig's call.
+4. *"fix speedrun" autonomous-batch (task 383, DOING).* Stalled at spec-review;
+ needs Craig to ratify (or re-park) the 6 open spec decisions before building
+ work-the-backlog.org.
+5. *Tooling-path warn-hook (task 434, [#D]).* Craig chose docs-only before;
+ greenlight building the warn-only hook, or leave [#D].
+
+Also queued (not Phase D):
+- Wrap-up routing feature (task 133, DOING): engine landed (6be62ae). Next
+ sub-tasks under it: :ROUTE_CANDIDATE: marker in inbox process mode, the
+ wrap-it-up router sub-step, the test surface, then manual e2e validation. All
+ call route_recommend.py. Spec: docs/design/wrapup-routing-spec.org.
+- Flashcard tooling cluster (task parent created this session): apkg converter,
+ refutation (generic header-exemption per cj), multi-tag reconcile — build
+ together, same scripts; re-derive against the post-#+TITLE-fix canonical.
+
+KB: promoted 0 / consulted no
+
+* Session Log
+
+** 2026-06-28 Sun — Startup + inbox triage
+
+Ran startup (Phase A.0/A/B). Clean prior wrap (no session-context.org). .ai/
+synced from templates fine. Findings: 11 pending inbox handoffs, 3 top-level
+tasks unreviewed >7 days, roam inbox 2 items, KB 51 nodes (none relevant).
+
+The 11 inbox items resolve to ~7 substantive proposals (some carry a cover
+note):
+- A: Simplification lens for the refactor skill (.emacs.d)
+- B: new rule locating-craig.md (home) + cover note
+- C: new workflow suspend.org (.emacs.d) + cover note
+- D: bug-priority severity×frequency matrix (wttrin) + cover note
+- E: harden commit gate to require green full suite (wttrin)
+- F: generalize readability-audit.org into a template workflow (.emacs.d) + cover
+- G: strip dots from project names .emacs.d→emacsd (.emacs.d roam item)
+
+All are shared-asset/convention changes → skeptical review + Craig approval, none
+self-applies. Dispatching parallel read-only skeptical-review subagents for A-F;
+G is a lightweight file-as-task. Surfacing dispositions to Craig next.
+
+Six skeptical reviews returned (all "do it with named changes"):
+- A: keep only new lenses 1/2/3/4/7; cross-ref 5(dead-code)/6(duplication)/8(dead-code)
+ instead of re-specifying; own mode, NOT in default full scan; state /refactor↔/simplify
+ boundary. Lands in .claude/commands/refactor.md (it's a slash command, no refactor/ dir).
+- B: standalone claude-rules/locating-craig.md. Changes: add whereami-fails fallback
+ (never fabricate), positive gate (velox→run else ask), drop -lts secondary tell,
+ add public-artifact-scope line (geolocated address is personal). whereami confirmed
+ real at ~/.local/bin/whereami; host is velox.
+- C: REAL DESIGN FORK — substantial overlap with the flush skill (suspend ≈ flush's
+ pre-clear checkpoint minus /clear, plus a commit, reframed for departure). Reviewer
+ prefers folding into flush as a "checkpoint-and-stop" variant over a standalone
+ workflow. Also: drop the always-commit-working-files step (.emacs.d-ism; blind commits
+ fight wrap-it-up's leftover discipline). Startup's resume path already exists.
+ Companion: INDEX + protocols triggers if kept standalone.
+- D: fold into todo-format.md as an OPTIONAL opt-in scheme; drop the global
+ letter-mapping mandate (present as template); keep security/privacy carve-out; mark
+ release-vehicle column illustrative. Defer the non-coding companion matrix as a
+ separate task.
+- E: only the new mechanic is load-bearing (run suite as own command, gate on
+ failures==0, never bundle `make test; git commit`). Two-line edits to verification.md
+ #1 and commits.md #5; exact wording provided. Asks #2/#4 already covered.
+- F: generalize Elisp specifics; drop concrete ;;; markers (keep principle); add
+ graceful degradation; add cross-links to /refactor + /simplify + A. Coherent division
+ of labor confirmed (readability = prose/naming clarity; /refactor = structural metrics;
+ /simplify + A = behavior-preserving logic reduction). Lands as a template workflow.
+- G: file-as-task (strip dots from project names; touches triggers.md + inbox-send).
+
+*** Item A — APPLIED (not yet committed)
+Craig approved option 1, then changed his mind: simplification IS part of the
+default full scan. Added Mode:
+Simplification to .claude/commands/refactor.md (frontmatter Six→Seven modes,
+argument-table row, new section after Mode: Dead Code) with the 5 new lenses,
+cross-refs to Dead Code (twin branches, plain deletion) + Duplication (repeated
+literals), verify-all-call-sites rule, and a /simplify boundary note. Harness
+picked up the skill change live mid-session. Confirmed for Craig: Rename mode
+executes renames but doesn't flag bad names; no organization scan exists — both
+gaps are proposal F's territory.
+
+*** Item B — APPLIED (not yet committed)
+Craig approved. Wrote claude-rules/locating-craig.md (standalone) with the four
+review changes: whereami-fails fallback (never fabricate), positive host gate
+(velox→run, any other host→ask), dropped the -lts secondary tell, added a
+keep-out-of-shared-artifacts section. make install linked it into
+~/.claude/rules/locating-craig.md.
+
+*** Item C — APPLIED (not yet committed)
+Craig picked option 1 (standalone, lean). Wrote
+claude-templates/.ai/workflows/suspend.org with the review changes: drop the
+always-commit step (note uncommitted work, leave tree as-is; project-opt-in
+always-commit set only), cross-refs to flush + wrap-it-up, states it's the
+capture half (startup is the resume half), flags "I need to go" breadth.
+Registered in INDEX.org (Session lifecycle, after wrap-it-up) + protocols.org
+trigger section. sync-check --fix synced canonical→mirror; re-verified exit 0,
+suspend.org mirror matches.
+
+*** Item D — REVERTED then RE-APPLIED (binding), not yet committed
+First applied an opt-in version; Craig reverted it ("do it differently"). His
+intent: the matrix is BINDING, not opt-in — any project with a codebase (incl.
+home + work, which have one despite being non-code) must prioritize its codebase
+bugs by the matrix. Re-applied to claude-rules/todo-format.md as a mandatory
+subsection. Mapping per Craig (2a): P1→[#A], P2→[#B], P3→[#C], P4→[#D] (fixed,
+not a per-project knob). Bands defined per codebase; matrix structure + mapping
+fixed. Severity-alone carve-out kept. Sent adoption handoffs to home + work
+(inbox-send, 2026-06-28-1212). Non-coding companion matrix dropped — scope is
+codebase bugs (home/work codebases covered).
+
+*** Item E — APPLIED (not yet committed)
+Craig picked option 1 (prose tightening + bundling-detection hard gate in the
+PreToolUse hook); asked first whether a hard gate existed — it didn't (githooks
+pre-commit only runs sync-check; git-commit-confirm.py only scanned attribution).
+Applied: verification.md "Before Committing" #1 and commits.md #5 rewritten to
+"run the full suite as its own command, gate on zero failures, never bundle the
+run with the commit." Added detect_bundled_test_run() + respond_deny() to the
+hook (hooks/git-commit-confirm.py + hooks/_common.py): denies a test runner
+chained into git commit via any ungated connector (;, &, |, ||, newline, or a
+pipe that masks exit), allows the gated && form, matches the runner only in the
+prefix before git commit so a runner name in the message doesn't trip it. TDD:
+13 new tests red→green; full make test exit 0; end-to-end smoke test confirms
+deny on bundled / pass on gated+plain.
+
+*** Item F — APPLIED (not yet committed)
+Craig asked "should this be part of refactoring?" — concluded separate-but-linked
+(it's a multi-phase workflow that FILES structural work as :refactor: tasks, i.e.
+feeds /refactor rather than being a mode of it; /refactor is structure-only
+scan-and-apply). Craig approved option 1. Wrote
+claude-templates/.ai/workflows/readability-audit.org (generalized from .emacs.d's
+Elisp draft: header convention / public-private naming / doc-linters all
+"the project's X if it has one"; dropped concrete ;;; markers, kept the
+mechanical-applier principle; added graceful degradation for no-suite/no-header/
+no-linter; added the pipeline cross-links to /refactor + /simplify). INDEX entry
+under new "Code quality" section. sync-check exit 0, mirror matches.
+Told Craig the run sequence: /refactor (incl. simplification) + readability-audit
+= existing-code sweep; /simplify = in-flight-diff cleanup. Offered (not built) a
+code-quality umbrella workflow to chain them.
+
+*** Item G — APPLIED (not yet committed)
+Craig picked option 2 (do it now) + alias approach. Implemented dot-stripped
+project-name resolution: inbox-send.py gained display_name() (basename with dots
+stripped), find_target() falls back to a dot-stripped alias after exact match
+(exact wins), print_project_list shows the stripped name. triggers.md launch
+resolution gained the dot-stripped match rule. TDD: 3 new alias tests red→green
+(incl. exact-wins-over-alias), 26 inbox-send tests pass; sync-check exit 0; full
+make test exit 0. .emacs.d→emacsd, .dotfiles→dotfiles now resolve in both ai
+launch and inbox-send.
+
+** Walk complete; inbox close-out done — commits pending
+A,B,C,D,E,F,G all applied + verified, uncommitted. Inbox cleared (0 pending):
+bug-priority proposal + cover preserved to docs/design/2026-06-27-*; 9 other
+handoffs deleted (content in canonical files). :LAST_INBOX_PROCESS: stamped
+2026-06-28. Replies sent: emacsd (4 items, via the new alias), home (locating-craig),
+work (bug-matrix FYI); plus binding-adoption handoffs to home + work.
+Commits DONE — 6 landed on main (publish flow: /review-code over staged diff =
+Approve; /voice personal over all 6 messages; Craig approved all):
+ b621914 feat(refactor): add simplification scan mode (A)
+ d4e9d7d feat(rules): add locating-craig rule (B)
+ 797c426 feat(workflows): add suspend and readability-audit workflows (C+F)
+ 92dfc35 feat(hooks): block bundled test+commit, require full suite before commit (E)
+ 9753d03 feat(inbox-send): resolve dot-stripped project names (G)
+ 798ef02 feat(todo-format): make the bug-priority matrix binding for codebases (D)
+PUSHED to origin/main (ecd33e0..798ef02); in sync (0/0). Pre-push reconcile
+confirmed ahead-only. Working tree: only .ai/notes.org marker +
+.ai/session-context.org (both for wrap-up).
+
+** Post-push follow-ups (Craig: "do both")
+- Task review: 3 stale tasks (reviewed 2026-06-15) re-stamped 2026-06-28; generic
+ agent-runtime spec re-graded [#C]→[#D] (speculative large arc, not committed);
+ memories-sync VERIFY + token-rotation helper kept. Staleness now 0. todo.org
+ uncommitted.
+- Umbrella workflow: created claude-templates/.ai/workflows/code-quality.org — one
+ trigger sequencing /refactor → readability-audit over a scope, surfaces the
+ filed :refactor: backlog, documents the /simplify boundary. INDEX entry under
+ Code quality; sync-check exit 0. Uncommitted.
+Both committed + pushed (publish flow: /review-code Approve, /voice personal on
+the workflow body, Craig approved):
+ 96dfa63 feat(workflows): add code-quality sweep workflow
+ 5263cd6 chore(todo): task review — restamp stale tasks, downgrade generic-runtime to [#D]
+origin/main in sync (0/0). Staleness nudge cleared (0).
+Then committed the notes.org inbox marker (6fb6797 chore) to clean the tree;
+working tree now only .ai/session-context.org (live anchor). 1 ahead of origin
+(the marker commit, unpushed). [Pushed 6fb6797.]
+
+** Next work: wrap-up routing feature (Craig: "1 then 2")
+*** 1 — Recommendation engine (spec Phase 1+3) — BUILT, tested
+Added .ai/scripts/route_recommend.py (canonical+mirror): pure recommend(item,
+projects)→(destination, confidence) — strong/weak/none, word-boundary literal
+match, dot-stripped alias aware, top-tier tie→weak deterministic, empty→none.
+CLI (--item/--exclude) reuses inbox-send discover_projects via importlib. 13
+tests green, full make test exit 0, mirror synced. Sub-task in todo.org rewritten
+to dated entry. UNCOMMITTED — committing via publish flow next.
+*** 2 — wrap-teardown manual validation — DEFERRED (Craig redirected)
+Engine committed + pushed (6be62ae). Then Craig redirected: "many tasks in
+todo.org were shipped — let's do a full task audit." Pivoted to task-audit.
+
+** TASK AUDIT (Craig: many tasks shipped)
+Phase A: 21 open tasks (lines 42-1134 in Open Work). Phase B: dispatched 4
+parallel read-only reconciliation subagents over batches, each checking tasks
+vs git log + repo tree + sessions, returning CURRENT/DONE/STALE/NEEDS-USER.
+Verdict: contrary to "many shipped," NONE are fully-done-but-open. Most CURRENT
+(backlog). The 2 closest (wrap-teardown 42, memories-sync VERIFY 214) are
+code-complete, gated only on Craig's manual validation.
+Phase C autonomous updates applied: task 186 (folded cj generic-header redirect,
+superseded 2-option fix), task 203 (folded cj "document as local-only"; :bug:→
+:chore:, reframed as docs task), task 428 (precondition-landed note + LAST_REVIEWED).
+Phase E: :LAST_AUDIT: stamped 2026-06-28. Phase F: skip task-review chain (ran
+today). NEEDS-USER + clusters surfaced to Craig next. todo.org + notes.org
+uncommitted (audit edits).