aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-11 18:44:01 -0500
committerCraig Jennings <c@cjennings.net>2026-05-11 18:44:01 -0500
commit66b92644a69be2c2990c7992a466aaae28102e80 (patch)
tree1776c38aa65b3fa138121290616c60b45661795c
parent7d9554cec5334c065dfe585d588f948187d03203 (diff)
downloadrulesets-66b92644a69be2c2990c7992a466aaae28102e80.tar.gz
rulesets-66b92644a69be2c2990c7992a466aaae28102e80.zip
chore(ai): session record for start-work pre-work + triage-intake fixes
Added a Phase 0 pre-work block to /start-work (fetch-and-reconcile against the base branch, plus a source-code check that the problem the ticket describes still exists). Reviewed and fixed triage-intake.org: Phase 3 now marks all unread INBOX mail across gmail/dmail/cmail, the Overview no longer contradicts the calendar source, and the Linear sweep got a non-GitHub-remote guard. Both shipped in earlier commits this session; this record archives the work.
-rw-r--r--.ai/sessions/2026-05-11-18-43-start-work-prework-and-triage-intake.org71
1 files changed, 71 insertions, 0 deletions
diff --git a/.ai/sessions/2026-05-11-18-43-start-work-prework-and-triage-intake.org b/.ai/sessions/2026-05-11-18-43-start-work-prework-and-triage-intake.org
new file mode 100644
index 0000000..795d4eb
--- /dev/null
+++ b/.ai/sessions/2026-05-11-18-43-start-work-prework-and-triage-intake.org
@@ -0,0 +1,71 @@
+#+TITLE: Session Context — /start-work pre-work phase + triage-intake review/fix
+#+AUTHOR: Craig Jennings & Claude
+#+DATE: 2026-05-11
+
+* Summary
+
+** Active Goal
+
+Two pieces of workflow-definition work this session. (1) Added a Phase 0 pre-work block to =/start-work= — fetch-and-reconcile against the base branch, plus a source-code check that the problem the ticket describes still exists, before any state change. (2) Reviewed Craig's new =triage-intake.org= workflow and fixed the issues found: the =maxResults= caps in Phase 1 bounded what Phase 3 marked read (so "do a triage intake" left an over-cap inbox partially unread despite the Overview promising "marks every email touched as read"); reworked Phase 3 to run its own full unread query across all three local Maildirs (gmail/dmail/cmail) and mark the lot; fixed the Overview's "no calendar" line vs the actual calendar source; explained the cmail-via-mu / Google-via-MCP asymmetry; added a non-GitHub-remote guard to the Linear Dev-Review sweep.
+
+** Decisions
+
+- Existence check reads the *source code*, not =git log=. A grep over commit messages catches the obvious "shipped last week" case but misses behaviors made unreachable by sibling commits or features already implemented under a different name. The code is the truth; the log is a hint.
+- New work fits as Phase 0 sub-sections (0.1 eligibility, 0.2 reconcile, 0.3 existence check) rather than renumbering Phases 1-7 — keeps all existing cross-references intact.
+- Reconcile mirrors =commits.md= Step 0 (fetch, ff-only on clean, surface drift / dirty / diverged, no auto-stash, no auto-merge).
+
+** Data Collected / Findings
+
+- =~/.claude/commands/start-work.md= is a *hardlink* to =~/code/rulesets/.claude/commands/start-work.md= (same inode 13284979). Edits to the canonical reflect immediately in the installed copy — no =make install= round-trip needed.
+- File grew 24995 → 29941 bytes (about 5 KB of new content).
+- No claude-templates copy of start-work.md — commands live in rulesets directly, not in =.ai/= templates.
+
+** Files Modified
+
+- =.claude/commands/start-work.md= (rulesets) — frontmatter description updated; top-level phase list grew 7→8 (added Phase 0); =## Phase 0: eligibility= renamed to =## Phase 0: pre-work= with three sub-sections (0.1 Eligibility unchanged, 0.2 Pre-flight reconcile new, 0.3 Existence check new); two new anti-patterns. Committed =a9ef07d docs(start-work): add Phase 0 pre-work (reconcile + source check)= and pushed.
+- =.ai/workflows/triage-intake.org= (claude-templates, rewritten; rsync'd into rulesets) — Phase 3 reworked to query all unread INBOX across gmail/dmail/cmail Maildirs and mark via =maildir-flag-manager= in one call; Overview rewritten (dropped the "no calendar" contradiction, lists actual sources, accurate mark-read promise); Phase 1 step 3 note corrected; Phase 1 step 6 + Phase 2 Linear sweep got "skip if no GitHub-family remote" guards; Phase 3 explains the cmail-via-mu / Google-via-MCP split; Principles + Living Document tweaked.
+- =.ai/workflows/INDEX.org= (claude-templates + rulesets) — triage-intake entry wording updated to match the rewrite.
+- =.ai/workflows/wrap-it-up.org= (rulesets) — caught up to claude-templates (Craig had already removed the stale line-125 triage-intake reference there during the pause).
+- Commits: claude-templates =ac2fd5d..1d5f489 fix(triage-intake): mark all unread INBOX mail, not just surfaced messages=; rulesets =921b298..7d9554c chore(ai): sync triage-intake workflow from claude-templates=. Both pushed. (rulesets =921b298 docs(todo): plan daily-prep delegation to triage-intake= was Craig's own commit during the pause, already on the remote.)
+
+** Next Steps
+
+- Open carryover from prior sessions: =/update-skills= skill, =create-documentation= skill, the 2026-05-04 audit review pass, =[#B]= fold-claude-templates-into-rulesets, =[#B]= =make audit=.
+- Planned: =daily-prep.org='s triage section eventually delegates to =triage-intake.org= (Craig filed =921b298= for this).
+
+* Session Log
+
+** Startup (16:53 CDT)
+
+Clean startup — no interrupted session, inbox empty, no cross-agent messages, no reminders. Surfaced top open todos and asked Craig for priorities.
+
+** Question: does /start-work pull + validate?
+
+Craig asked whether =/start-work= pulls the repo and validates the need before working on a ticket. Read the file (=.claude/commands/start-work.md=, 270 lines). Answer: no to both. Phase 0 (eligibility) only checks ticket status; Phase 1 (Claim) moves straight to assign/label/in-progress; Phase 4 step 1 cuts the branch with no =git fetch= preceding it. Phase 2 (Justify) reads the ticket and skims code but the framing is "where will the fix go," not "is the fix already there."
+
+Proposed two fills: a pre-flight reconcile (same shape as =commits.md= Step 0) and an existence check (run repro for bugs, search for features). Craig sharpened the second: the check should read the *source code* to validate the problem exists as stated — not just =git log --grep=.
+
+** Drafted into the skill
+
+Three edits to =.claude/commands/start-work.md=:
+
+1. Frontmatter description — added "Pre-work" to the phase list and a sentence summarizing what it covers.
+2. Top-level numbered phase list — added "0. Pre-work" entry before "1. Claim".
+3. =## Phase 0: eligibility= → =## Phase 0: pre-work= with three sub-sections. 0.1 keeps the existing four eligibility bullets verbatim. 0.2 adds a reconcile (fetch, identify base branch, ff-only on clean, surface drift / dirty / diverged, surface if current branch isn't the base). 0.3 adds the existence check — reads the source first, runs the repro if concrete enough for bugs, searches for behavior (not just names) for features, skip for tests/chores with one exception. Each disposition for a "problem isn't there" finding gives the user three options (close / dig harder / proceed-anyway with reduced confidence).
+4. Anti-patterns — added two: "Skipping the pre-flight reconcile" and "Taking the ticket's word that the problem still exists."
+
+Verified file is a hardlink to =~/.claude/commands/start-work.md= (same inode) so the edits are live without a =make install=.
+
+** Committed start-work, then triage-intake review
+
+Craig: "draft the commit and push." Followed =commits.md=: Step 0 reconcile (clean), inline review of the staged diff (clean — no AI attribution, cross-refs intact, matches existing prose density), drafted =/tmp/commit-start-work-pre-work.md=, ran =/voice= general (fired #13 em-dash → comma; cut a process-reference sentence per the commits.md voice rule), printed inline, committed + pushed =a9ef07d=.
+
+Then Craig asked about the "triage intake" workflow — does it mark mail read, does it cover c@cjennings.net via cmail. First pass I couldn't find a =triage-intake.org= file and described =daily-prep.org='s Phase 3 triage instead. Craig: "there should be a triage-intake now. review it." Found it — =~/projects/claude-templates/.ai/workflows/triage-intake.org=, added by him (commit =ac2fd5d=) during an earlier pause this session, plus a follow-on edit at 17:44; not yet rsync'd into rulesets. He confirmed: "you didn't miss it. i added it during the pause."
+
+Reviewed it. Strengths: cmail properly wired (mu query + explicit-paths mark-read with the never-call-bare warning), surface-first/mark-second ordering, every source optional, the Linear Dev-Review sweep with Done-vs-PM-Acceptance heuristic, per-project extension hook. Findings: (1) Important — Phase 1's =maxResults= caps (~25/~15/head -30) bound what Phase 3 marks read, so an over-cap inbox stays partially unread despite the Overview's "marks every email touched as read"; (2) Important — Overview overpromises vs Phase 3's scoped behavior; (3) Minor — =dmail= referenced in Phase 3's warning but never used as a source while its sibling cmail is (turned out =dmail= = the DeepSat account synced to =~/.mail/dmail/=, mu-indexed like cmail); (4) Minor — Phase 2's Linear-sweep =gh pr list= has no non-GitHub guard; (5) Minor — cross-file =wrap-it-up.org:125= phrasing. Verdict: approve with changes. Also caught (during the fix) that the Overview said "no calendar" while Phase 1 step 7 is a calendars source.
+
+** Fixed all the issues
+
+Craig: "fix all the issues you found." Checked =~/.mail/= — gmail/dmail/cmail all present and mu-indexed (=dmail= is DeepSat). Rewrote =triage-intake.org= in claude-templates (canonical): Overview now lists the real sources and makes an accurate mark-read promise; Phase 1 step 3 note corrected (Phase 3 re-queries; cmail uses mu because Proton has no Gmail API); Phase 1 step 6 + Phase 2 sweep got "skip if no GitHub-family remote"; Phase 3 rewritten — one =mu find 'flag:unread AND NOT flag:trashed AND (maildir:/gmail/INBOX OR maildir:/dmail/INBOX OR maildir:/cmail/INBOX)' --fields='p'= then one =maildir-flag-manager.py mark-read --reindex <paths>= call, with the explicit-paths warning kept and an mbsync-propagation note; cmail-via-mu/Google-via-MCP split explained; Principles + Living Document tweaked. Updated the INDEX.org entry to match. Issue #5 was already resolved — Craig had removed the stale =wrap-it-up.org= reference in claude-templates during the pause; the rulesets copy was just stale.
+
+rsync'd the workflows dir into rulesets (added triage-intake.org, updated INDEX.org + wrap-it-up.org). Committed in claude-templates (=1d5f489 fix(triage-intake): ...=, =/voice= general — #13 em-dash + a semicolon→period) and pushed; committed in rulesets (=7d9554c chore(ai): sync triage-intake workflow from claude-templates=, treated as a mechanical sync chore — manual #13 em-dash fix on the 2-line body) and pushed.