diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-11 14:59:09 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-11 14:59:09 -0500 |
| commit | 73cae49c464d157aeedfedd108ee20bd19816140 (patch) | |
| tree | 49b302b37fdfc57353eed9963af9bbb72d2e72fe /.ai | |
| parent | 6f575e64b1e9f5d9332db73b1e6427d500f90f48 (diff) | |
| download | rulesets-73cae49c464d157aeedfedd108ee20bd19816140.tar.gz rulesets-73cae49c464d157aeedfedd108ee20bd19816140.zip | |
chore: archive session record, reflow todo table, file done work
The wide voice-pass table in todo.org reflows to the 120-column standard (the new lint check's first real catch), and the two tasks closed today move to Resolved.
Diffstat (limited to '.ai')
| -rw-r--r-- | .ai/sessions/2026-06-11-14-58-daily-prep-screenshot-hooks-org-tables.org | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/.ai/sessions/2026-06-11-14-58-daily-prep-screenshot-hooks-org-tables.org b/.ai/sessions/2026-06-11-14-58-daily-prep-screenshot-hooks-org-tables.org new file mode 100644 index 0000000..50831f2 --- /dev/null +++ b/.ai/sessions/2026-06-11-14-58-daily-prep-screenshot-hooks-org-tables.org @@ -0,0 +1,80 @@ +#+TITLE: Session Context — 2026-06-11 04:39 +#+DATE: 2026-06-11 + +* Summary + +** Active Goal +Process the startup inbox (5 items), then work the task list: the daily-prep template rewrite and the screenshot.py --launch crash fix (Craig's picks, no-approvals), the SessionStart-on-clear hook (which became a make-install distribution fix), the statusline adoption (mid-session archsetup handoff), the session-title hook for remote sessions (Craig's feature ask), and the wide org-table handling (standard + lint + helper, Craig picked all three). + +** Decisions +- Daily-prep canonical rewritten to Craig's strict three-section template (Heads-Up / Day's Priorities / Meetings / Focus Blocks); Create/Update run modes with a mandatory priorities gate in Create (disagreement = todo.org staleness signal); retired Standup Briefs / Upcoming Deadlines / Anchor Tasks sections, standup-only mode, and the thin-link convention. Four refinements from Craig's review folded in. +- screenshot.py --launch: both archsetup fix directions plus an --x11 escape hatch, because ratio's emacs is GTK3+X11 (not pgtk) and the safe Wayland-forced default would have killed the primary use case. Error message hints at the flag so the flow self-heals. +- Token-rotation helper: held per Craig's own 2026-05-31 decision in the task body (can't verify without revoking a live token; write-and-verify in one pass when imminent). Flagged instead of building unverifiable code. +- SessionStart-on-clear hook: the feature had already shipped 2026-06-02; the real bug was make install not covering hooks. Fixed the distribution gap (DEFAULT_HOOKS now linked by make install), closing the whole class. +- Session titles: "host project" (ratio rulesets, velox work) via a SessionStart(startup|resume) hook using hookSpecificOutput.sessionTitle (Claude Code 2.1.152+); silent when a title exists so /rename isn't clobbered. +- Org-table standard promoted from work's notes.org to claude-rules/org-tables.md; lint check is judgment-only by design (reflow is a visible layout change); helper reflows mechanically and is idempotent via continuation-group merging. + +** Data Collected / Findings +- The org-table "standard" the todo task referenced was never written in rulesets — it lived only in work's .ai/notes.org. Render-width semantics (links measure at visible label, never split) preserved in the promotion. +- ratio environment: emacs is GTK3+X11 (no pgtk); hostname isn't installed (Arch/inetutils) — uname -n instead; bash tilde-expands an unquoted replacement ~ back to $HOME (broke the statusline cwd abbreviation); the shell env carried a stale HYPRLAND_INSTANCE_SIGNATURE from before yesterday's compositor crash. +- elisp: split-string clobbers the global regex match data — capture match bounds before calling it inside a string-match loop (bit wot-tokenize). +- Idempotent table reflow needs hline-aware logical-row grouping: merge a rule-delimited group only when each trailing line has an empty cell (continuation heuristic), so plain multi-row tables keep line-per-row meaning. +- rg -rn 'pat' replaces matches with literal "n" (-r is --replace) — mangled the first read of the work standard. + +** Files Modified +- claude-templates/.ai/workflows/daily-prep.org (full rewrite) + INDEX.org (new modes) + mirrors; spec + decisions handoff preserved in docs/design/ (2ffb01c). +- claude-templates/.ai/scripts/screenshot.py + tests (+6, 30 total) + mirrors: wayland_cmd, clients_on_workspace, teardown unmap-wait, --x11 (7095d62). Verified live on ratio incl. 3x emacs -Q repro. +- Makefile: make install links DEFAULT_HOOKS + .claude/*.sh; scripts/tests/install-hooks-link.bats (d576fc2); .claude/statusline-command.sh adopted with uname -n + escaped-tilde fixes + statusline-command.bats (3df14fc). +- hooks/session-title.sh + settings.json + settings-snippet.json + session-title-hook.bats (bdc9a5d). +- claude-rules/org-tables.md (new rule); .ai/scripts/wrap-org-table.el (+23 ERT); lint-org.el org-table-standard check (+5 ERT, 32 total) + mirrors (8d790f3). +- todo.org: SessionStart hook + wide org-table tasks closed DONE with resolutions; /clear manual test filed. +- Handoffs: work x3 (rewrite landed, org-tables FYI), archsetup x2 (screenshot fix, statusline adoption + install-hooks note). All inbox items processed; inbox empty. + +** Next Steps +- Next session (Craig's standing instruction at wrap): build the monthly session-harvest workflow AND /update-skills, both in no-approvals mode. +- Craig's quick manual tests: /clear mid-session should reply "flushed." + goal restatement (todo.org test entry); session titles should read "ratio rulesets"-style on web/mobile for new sessions. +- Still open for Craig: memories DOING manual tests + other-machine roam setup; runtime-spec phases 2-6 go/no-go; token-rotation stays held until a rotation is imminent. + +KB: promoted 0 / consulted no + +* Session Log + +** 2026-06-11 04:39 Startup + inbox inventory + +Startup ran clean: rulesets and project repo current, nothing new to link, .ai/ synced from templates (no churn — only a cosmetic key-reorder in .claude/settings.json from the harness). No crash-recovery anchor, no active reminders, no pending decisions, 0 stale tasks, 0 cross-agent pending. + +Craig picked option 1, then amended: implement the screenshot fix too, both in no-approvals mode. + +** 2026-06-11 ~04:50 Daily-prep rewrite + screenshot fix implemented + +Rewrote claude-templates/.ai/workflows/daily-prep.org wholesale per the work handoff spec + four refinements: strict three-section template (Heads-Up / Day's Priorities / Meetings / Focus Blocks), Create/Update run modes with triage-freshness check, mandatory priorities review gate (Create), retired Standup Briefs / Upcoming Deadlines / Anchor Tasks sections and standup-only mode and the thin-link convention, per-event-type content rules, calendar writes after the gate, Living Document history kept with supersession notes + a full 2026-06-11 entry. INDEX.org daily-prep entry updated to the new modes. + +screenshot.py --launch fix (TDD: 6 new tests red, then green, 30/30 passing): wayland_cmd() wraps the launched command with env -u DISPLAY GDK_BACKEND=wayland QT_QPA_PLATFORM=wayland so no XWayland surface can exist to race the headless-output teardown (the Hyprland 0.55.2 SIGABRT root cause from archsetup's coredump analysis); teardown now polls clients_on_workspace() until the launched clients actually unmap (5s cap + 0.2s grace) before removing the output. Module docstring documents that X11-only apps now fail to map under --launch. + +About to live-test --launch on ratio (the crash machine): foot first, then the exact repro emacs -Q. If this session dies, the compositor crashed — the fix needs direction-1-only (teardown wait) re-examined. + +** 2026-06-11 05:08 Verified, committed, pushed, replied + +Live verification on ratio (stale HYPRLAND_INSTANCE_SIGNATURE in the shell env — Hyprland restarted after yesterday's crash; probed the live socket): foot capture clean under the Wayland-forced default. Discovery: ratio's emacs is GTK3+X11 (not pgtk), so forcing Wayland breaks emacs capture entirely — added an --x11 opt-in flag (XWayland allowed, protected by the teardown unmap-wait) with a self-healing hint in the no-window error. The exact crash repro (emacs -Q under --x11) ran 3x: capture correct (verified the PNG shows emacs on the headless output), compositor alive, teardown clean. + +Full suite green (409+54+12 pytest, ERT, bats — the 3 grep hits were test names containing "error"). sync-check --fix synced mirrors. /review-code --staged: Approve, no Critical/Important (2 Minors noted, no action). Inbox filed: spec → docs/design/2026-06-10-daily-prep-template-spec.org, rewrite handoff → docs/design/2026-06-11-daily-prep-rewrite-handoff.org, crash analysis → docs/design/2026-06-10-screenshot-launch-crash-analysis.org; refinements + FYI deleted. Inbox empty. + +Commits (voice-passed, gate skipped per tracked-.ai/ + no-approvals): 2ffb01c feat(workflows) daily-prep rewrite (+ INDEX.org modes update), 7095d62 fix(scripts) screenshot --launch crash. Pushed cf95763..7095d62. Replies sent: work (rewrite landed, project-extension notes, offer to fold worked-example corners) and archsetup (fix landed, --x11 discovery, retire the unsafe-on-live-sessions memory). Inbox pass tally: 5 processed, 4 accepted (2 implement, 1 fold, 1 file-then-implement per Craig), 1 FYI deleted, 0 rejected. notes.org LAST_INBOX_PROCESS already stamped 2026-06-11. + +** 2026-06-11 11:36 Task picks: token-rotation held, SessionStart hook became an install fix, statusline adopted + +Craig asked for top tasks + top solo tasks, then picked token-rotation and the SessionStart hook. Token-rotation: the task body carries Craig's 2026-05-31 hold ("write and verify in one pass when a rotation is imminent" — the OAuth re-grant can't be triggered without revoking a live token), so I respected the hold and flagged it. SessionStart hook: investigation showed the feature already shipped 2026-06-02 (hooks/session-clear-resume.sh + settings.json entry) — the todo task duplicated it. The real bug: make install didn't cover hooks, so the symlink never reached ratio and the hook errored silently on every /clear. Fixed by folding DEFAULT_HOOKS linking into make install (bats: scripts/tests/install-hooks-link.bats, 4 tests), startup.org docs updated (canonical + mirror), task closed DONE with a one-keystroke manual test filed (/clear should yield "flushed." + goal restatement). Commit d576fc2. + +Mid-session inbox (3 arrived): work ack (daily-prep canonical synced, extension updated, first real Create run is Friday's prep — deleted), home memory-sweep ack (12 promoted/7 local, roam 89f068f — deleted), archsetup statusline heads-up (acted on: settings.json statusLine entry committed; statusline-command.sh adopted into .claude/ + make install linking via CLAUDE_CONFIG *.sh; fixed hostname→uname -n and the unescaped-tilde re-expansion; 5 bats tests; ratio's standalone file replaced with the managed symlink; verified rendering "[date] cjennings ratio:~/code/rulesets on main"). Commit 3df14fc. Both pushed (7095d62..3df14fc). Reply sent to archsetup. Inbox empty. + +** 2026-06-11 ~11:45 Session-title hook for remote sessions + +Craig asked whether Claude Code can now name remote sessions. claude-code-guide agent + docs fetch confirmed: SessionStart hooks can set hookSpecificOutput.sessionTitle since 2.1.152 (applied on startup/resume sources, ignored on clear/compact). Craig wants "host project" titles (ratio chime, velox work). Built hooks/session-title.sh (TDD, 6 bats tests in scripts/tests/session-title-hook.bats): uname -n + git-toplevel basename (cwd basename fallback), silent when session_title already set so /rename isn't clobbered. Wired settings.json + settings-snippet.json with matcher startup|resume. Linked via make install (the hooks linking from d576fc2 made that automatic). Verified through the symlink: cwd ~/projects/work/deepsat → "ratio work". Full suite green. Commit bdc9a5d, pushed. Takes effect from the next session start on each machine; visible check is the session list on web/mobile. + +** 2026-06-11 14:26 Wide org-table handling — all three pieces shipped + +Craig picked option 2 (standard + lint + helper in one pass). Found the actual written standard in work's .ai/notes.org "Org Table Standard" (120-col render-width budget, links measure at visible label and never split, continuation rows, rule under header + every logical row) — the rulesets task had assumed it was written here; it wasn't. Shipped: (c) claude-rules/org-tables.md (generalized, linked into ~/.claude/rules by make install); (a) .ai/scripts/wrap-org-table.el (TDD, 23 ERT tests — two real bugs caught mid-build: split-string clobbering regex match data in tokenize, and idempotence requiring hline-aware logical-row grouping with the continuation-group heuristic: merge a rule-delimited group only when its trailing lines each have an empty cell); (b) lint-org.el org-table-standard judgment check reusing the helper's parsing (5 new ERT tests, 32 total). End-to-end demo verified: 150-col table → budget shape, idempotent, lint-clean. Full suite green. Commit 8d790f3 pushed. Task closed DONE. FYI handoff sent to work (their notes.org copy can stay or become a pointer; arch-NN set named as first wrap target). + +** Inbox detail (from startup) + +Inbox: 5 items. (1) work daily-prep template spec (22KB source-of-truth doc) + (2) work daily-prep rewrite handoff (settled decisions, supersedes the 2026-06-10-1011 note) + (3) work four-template-refinements (folds into the rewrite) — together one substantive task: rewrite canonical daily-prep.org. (4) archsetup screenshot.py --launch crash root cause (XWayland configure-request races headless-output teardown; two fix directions; harness fix is rulesets'). (5) archsetup memory-sweep FYI (broadcast ack, no action). Dispositions being surfaced to Craig. |
