aboutsummaryrefslogtreecommitdiff
path: root/.ai
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-11 01:37:55 -0500
committerCraig Jennings <c@cjennings.net>2026-06-11 01:37:55 -0500
commitcf957630668be9b8a51fba5a42aea5829ff4bcc4 (patch)
tree33be19f12944cddef8196573986d875f7852d1d1 /.ai
parent63b9a5f6b451f63e7f18381c47f4464bda993ead (diff)
downloadrulesets-cf957630668be9b8a51fba5a42aea5829ff4bcc4.tar.gz
rulesets-cf957630668be9b8a51fba5a42aea5829ff4bcc4.zip
chore(ai): archive session record
Diffstat (limited to '.ai')
-rw-r--r--.ai/notes.org2
-rw-r--r--.ai/sessions/2026-06-11-01-37-agent-kb-spec-to-ship.org128
2 files changed, 129 insertions, 1 deletions
diff --git a/.ai/notes.org b/.ai/notes.org
index a41e6e4..abb03af 100644
--- a/.ai/notes.org
+++ b/.ai/notes.org
@@ -79,6 +79,6 @@ Format:
Markers maintained by workflows to record when they last ran. Read by other workflows that gate their behavior on freshness.
:LAST_AUDIT: 2026-05-28
-:LAST_INBOX_PROCESS: 2026-06-10
+:LAST_INBOX_PROCESS: 2026-06-11
Format: one =:MARKER: YYYY-MM-DD= line per workflow. Workflows overwrite their own marker on completion.
diff --git a/.ai/sessions/2026-06-11-01-37-agent-kb-spec-to-ship.org b/.ai/sessions/2026-06-11-01-37-agent-kb-spec-to-ship.org
new file mode 100644
index 0000000..46be0a4
--- /dev/null
+++ b/.ai/sessions/2026-06-11-01-37-agent-kb-spec-to-ship.org
@@ -0,0 +1,128 @@
+#+TITLE: Session Context — 2026-06-10/11 agent KB: spec to ship
+#+DATE: 2026-06-10
+
+* Summary
+
+** Active Goal
+Take the agent knowledge base from ratified spec to shipped v1, plus the day's inbox batches. Started as a crash-recovery resume (the morning voice-skill session's anchor), ran through spec finalization, Craig's five design questions, the D8 git-transport pivot, and a full no-approvals implementation of Phases 0-4. Closed with insights-report follow-ups.
+
+** Decisions
+- D8 (Craig): the KB moves from Syncthing to git, Shape A — whole roam relocates to ~/org/roam with a cjennings.net remote; agents/ subdir for agent writes; work machine never clones. Phone stays on on-demand drops to ~/sync/phone.
+- Work-root denylist confirmed: ~/projects/work only; archangel is not work-scoped.
+- Transition-symlink strategy dropped post-migration: Syncthing removed the symlink, and all live references were already repointed, so recreating it would just fight the share.
+- Signal is Emacs-only (Craig's ruling, correcting the morning plugin): standalone signal-cli receive removed entirely; signel starts and stays running.
+- Insights report triage: harness-loaded rules beat protocols.org for action-gating invariants; the suggested pre-commit hook rejected (wrong layer, breaks track-mode projects); the 500-token-cap finding was a mislabel of 529/stream-timeout errors.
+
+** Data Collected / Findings
+- Syncthing share root is ~/sync/org; roam was 487 org files + 63 conflict files, 18MB; org-roam-db-autosync-mode is on; db lives outside the repo.
+- git@cjennings.net has a real shell; repos live in /var/git.
+- defconst re-evaluates on reload but defvar doesn't (inbox-file needed explicit setq); bare git remotes default HEAD to master while pushing main (bats fixture gotcha); awk FS ': *' mis-splits org property drawer lines (kb-hygiene orphan bug, caught by test 4).
+- The orphaned linear-emacs memory dir (1 entry, no live project) flagged for Craig.
+
+** Files Modified
+- roam.git born: 424 clean org files + 4 agent nodes (3 promoted memories + the seed/doc node), indexed at 420 org-roam nodes.
+- rulesets, 14 commits e0364b8..63b9a5f: KB spec finalized → amended (D8 + five folds) → implemented; knowledge-base.md rule; roam-sync.sh + kb-hygiene.sh + 12 bats + 4 systemd units (both timers enabled); wrap-it-up promotion check + KB receipt line; daily-prep execution/join links; triage-intake loud-failure rule + signal Emacs-only rewrite + telegram lifecycle; transcript workflow classification/extraction/exit-gate; interaction.md render-merge guard; debug-skill hypothesis discipline; commits.md staging guard; tracked CLAUDE.md with the mirror invariant; two [#C] pilots filed (morning orchestrator, session harvest).
+- ~/.emacs.d/modules/user-constants.el roam-dir (committed there as 9c261ea7 per its session).
+- Handoffs: .emacs.d x2, archsetup x1, work x3 (replies), migrate-memories broadcast x10.
+
+** Next Steps
+- Craig: the manual-testing child under the memories parent (org-roam visual check, cross-machine round-trip, work/unknown refusal behavior); other personal machines need the one-time roam clone + timer setup (archsetup handoff).
+- Four unprocessed handoffs deferred to next session's startup: work daily-prep rewrite + template spec (x2), archsetup screenshot.py crash on ratio, work four-template-refinements.
+- Voice pattern #13 slipped twice on commit SUBJECTS today (em-dashes in 4d26552 and 63b9a5f) — the subject-line exemption reading needs tightening in the skill or the habit.
+- The 30-day KB checkpoint (success metrics in the spec) lands ~2026-07-10.
+
+KB: promoted 4 / consulted no
+
+* Session Log
+
+** Startup + inbox processing (09:59 CDT)
+
+Startup ran clean: rulesets dirty (.claude/settings.json modified — pre-existing, untouched), pull skipped; make install nothing new; project branches current; .ai/ synced from templates; no crashed session; no reminders or pending decisions; 5 top-level tasks stale >7 days (task-review nudge).
+
+Inbox had the work project's voice-skill revision delivery: a change-rationale handoff (supersedes the same morning's finding-stems handoff) plus a complete revised SKILL.md. Craig adopted all changes in the 2026-06-10 work session, so disposition = implement now.
+
+Applied:
+- voice/SKILL.md replaced with the revised version (45 patterns; attestation block step 8; artifact budgets table; compact output format; write-back step; reordered terse-pass→audit; #37 verdict-formula exemption; #40 verification-narration variant; new #42 finding stems, #43 single-sentence cadence, #44 parenthetical asides, #45 declarative marker; Personality/Soul mode-tagged). Frontmatter kept, description updated to 45 patterns + finding stems + budgets.
+- voice/references/voice-profile.org per the pairing rule: new entries §42 (with the three Craig-approved PR #233 Before/After examples from the stems handoff), §43–§45 (basis from the 2026-05-29 corpus); §37 exemption + history; §40 verification-narration variant + #236 Before/After + history (third recurrence); §13/§33 self-discipline reframing moved into the entries proper; suggested-deltas section marked landed; stale "only §13 populated" migration note fixed.
+- claude-rules/commits.md: hardcoded "41 patterns" references replaced with count-free phrasing ("full pattern walk") and artifact-mechanics lists updated to include finding stems (5 spots).
+- claude-templates/.ai/workflows/no-approvals.org (canonical) same de-count fix; mirror synced via sync-check --fix.
+- Revision handoff preserved at docs/design/2026-06-10-voice-skill-revision-handoff.org; all 3 inbox files deleted (stems handoff superseded, its examples live in profile §42; companion SKILL.md content landed in voice/SKILL.md).
+
+Verified: profile has exactly 45 §-entries, org-element parse OK, SKILL.md carries 45 pattern headings. voice/ is symlinked into ~/.claude by make install, so the change is live machine-wide immediately; harness picked up the new skill description mid-session.
+
+Next: commit (review-code + voice pass on the message per publish flow, .ai/ tracked → approval gate skipped).
+
+** Publish + close-out (10:13 CDT)
+
+Inbox pass closed: 3 items processed, 1 accepted as implement-now (the consolidated revision; the stems handoff was superseded by it, the companion .md was its payload), 0 rejected. /review-code --staged ran inline (prose diff, all criteria PASS or N/A, verdict Approve; one intentional non-issue noted — the profile's dated "Findings against the 41 SKILL.md patterns" heading stays as a 2026-05-29 record). Commit message walked through the revised skill itself (compact output + attestation — its first live exercise; #32 and #37 fired on the draft). Committed 5716695 as Craig, pushed a19db36..5716695 to origin/main. Acceptance reply sent to work's inbox (2026-06-10-1013-from-rulesets-inbox-response-voice-skill-revision.org). notes.org :LAST_INBOX_PROCESS: already 2026-06-10, no change. Inbox empty (only .gitkeep).
+
+Outstanding, not mine to touch: .claude/settings.json has a pre-existing uncommitted modification (it blocked the Phase A.0 rulesets pull; pull was a no-op anyway since this is the only machine ahead). Surface to Craig. Task-review nudge: 5 top-level tasks unreviewed >7 days.
+
+** settings.json commit + task review (14:05-14:25 CDT)
+
+Craig approved committing the settings drift: c6bd31f (chore(claude): pin model to fable in settings), pushed. Trivial-diff exemptions applied to review/voice gates.
+
+Task review, batch of 5 (the two stamped 2026-06-10 last night skipped): token-rotation helper KEPT (hold-until-imminent logic stands); Codex runtime spec EDITED (noted Phase 1/AI_AGENT_ID already shipped, narrowed to the phases 2-6 decision) + stamped; voice-profile corpus task marked DONE (profile is canonical with 45 entries, all deltas landed this morning; extension corpora deliberately not pursued); memories/org-roam task KEPT + stamped. Fifth (create-documentation) interrupted by Craig's /respond-to-cj-comments — not reviewed, resurfaces next run.
+
+** Org-roam KB spec — cj answers + spec-create rewrite (14:29 CDT)
+
+Craig annotated the 2026-06-05 org-roam spec with 5 cj comments (closing fences had a stray > — scanner saw them as unclosed; parsed manually). Answers: DECISION 5 = option C ratified; Syncthing DOES replicate ~/sync/ to a work machine, C still fine; node granularity per-fact; harness-memory-fate = "don't know what this means, explain" (explained in chat, held open); agent writes land freely in KB ONLY — explicitly not permission for email/Linear/public channels without review.
+
+IMPORTANT CONSTRAINT: Craig said "do not start implementing yet." No knowledge-base.md, no implementation tasks — spec only.
+
+Applied: new spec at docs/agent-knowledge-base-spec.org in spec-create format (D1-D6 accepted, D7 harness-memory open with the explanation Craig asked for; 3 implementation phases sketched but explicitly held; full readiness dimensions). Old draft docs/design/2026-06-05-org-roam-knowledge-base-spec.org deleted (superseded; git history has it). Inbound link in todo.org:97 retargeted. VERIFY under the memories task resolved to a dated entry recording the ratification; new sibling VERIFY filed for D7. cj-scan confirms the new spec clean; org parse OK; no stale links outside session archives.
+
+Uncommitted: todo.org (task review + VERIFY resolution), docs spec swap, session-context.org. Lands at wrap-up.
+
+** Spec-response on the KB spec (14:39-14:46 CDT)
+
+Craig ratified D7 = keep, then asked for the spec-response workflow. A review file existed: docs/agent-knowledge-base-spec-review.org, written at 14:35 by a CONCURRENT Codex session (which also appended its reviewer entry to the spec history, added a "Spec review — not ready" log entry + two VERIFYs + a [#D] hygiene child to todo.org — todo.org changed under me mid-edit, re-read before applying).
+
+Dispositions: both blockers accepted (D7 → accepted keep with Phase 3 mandatory; new "Project classification and write routing (v1)" design subsection — work-root denylist in knowledge-base.md as source of truth, initially ~/projects/work; personal = under ~/code|~/projects|~/.emacs.d and not denylisted; work/unknown → refuse + redacted-fact report; v1 adds no work-side store). Mediums accepted: canonical rg commands with --glob '!*sync-conflict*' baked in (63 conflict files exist), Phase 2 approval/rollback (Craig approves fact, one node, rollback = delete the file), Makefile no-change note, ~490 count, Testing/Verification section. Three MODIFIED (recorded in the spec's Review dispositions): standalone [#B] drop-in tasks → children under existing parent; exact count → ~490; work-side destination → existing conventions + refusal only. None rejected. Spec status: ready with caveats (caveat = denylist completeness; is archangel work-scoped?).
+
+todo.org: Codex's two VERIFYs resolved to dated entries; new VERIFY for denylist contents; stale 2026-05-16 "write the spec here" cj stub removed (fulfilled); Phase 1-3 implementation tasks + manual-testing child created under the parent (Phase 3 tagged :solo:; Phase 1 blocked on the denylist VERIFY); Codex's [#D] hygiene child kept, body extended with conditional vNext. Review file deleted (exit criterion). Both files org-parse OK.
+
+Implementation remains HELD — Craig's standing "do not start implementing yet". Nothing committed yet this stretch; wrap-up bundles it.
+
+** Session resumed after interruption — spec work committed (15:20 CDT)
+
+New session picked up the crash anchor (previous stretch ended ~14:46 without wrap-up). Craig chose: commit the held spec work first, then process the 3 inbox handoffs (daily-prep links; triage-intake signal replacement + telegram/engine edits — the latter two land together).
+
+Publish flow ran: Step 0 reconcile 0/0 clean. /review-code --staged inline (prose diff, universal criteria): both files org-parse OK, no stale references to the deleted old spec path; one Minor — todo.org:98 carried a live file: link to the deleted spec-review file — fixed to plain text before commit (keep-links-current). Verdict Approve. /voice personal on the message (compact; #27/#32 first-person rewrite, #38 terse). Committed e0364b8 (docs: finalize agent knowledge-base spec as ready with caveats) as Craig, pushed c6bd31f..e0364b8 to origin/main. session-context.org deliberately left uncommitted (live anchor); inbox files pending processing next.
+
+** Inbox pass — 3 handoffs implemented, 2 commits shipped (15:28 CDT)
+
+Processed the 3 work handoffs, all accepted as implement-now (each improves project tooling; Craig's verbatim asks). Commit 34c6945 (feat(workflows): daily-prep carries execution links and join links): execution-link rule in the thin-link section + sub-step 3c, new Phase 4 join-links sub-section, Updates entry. Commit 403f8b8 (feat(triage-intake): loud scan-failure rule + messenger plugin rework): signal plugin replaced verbatim with the signel-aware version, telegram quick-reference lifecycle + work-contact classify sentence, engine Phase C item 0 (SCAN FAILED banner) + Common Mistakes #9 + history entry — one commit per the sequencing note.
+
+Verified: mirrors synced via sync-check --fix, org parse OK on all four canonical files, workflow-integrity OK (44). Both commits pushed e0364b8..403f8b8. Acceptance reply sent to work (2026-06-10-1527-from-rulesets-inbox-response-triage-and-daily-prep.org); all 3 inbox files deleted; inbox empty (.gitkeep only). 3 processed / 3 accepted (implement-now) / 0 rejected. :LAST_INBOX_PROCESS: already 2026-06-10.
+
+** Denylist VERIFY resolved — spec flips to ready (17:30 CDT)
+
+Craig answered in chat: the work-root denylist is just ~/projects/work, archangel is not work-scoped. VERIFY at todo.org rewritten to a dated entry; Phase 1 task body updated to unblocked-awaiting-go; spec status flipped from "ready with caveats" to "ready" (Metadata, classification subsection, Phase 1, Risks dodge, new history entry at 17:29). Committed + pushed. Implementation hold stands — Craig has not said go. Also identified the 1 stale task for him: create-documentation (LAST_REVIEWED 2026-06-02, the review interrupted yesterday by /respond-to-cj-comments).
+
+** Task review — create-documentation kept (17:33 CDT)
+
+Craig reviewed the one stale task (create-documentation, interrupted in yesterday's batch): KEPT as-is, re-stamped LAST_REVIEWED 2026-06-10. Staleness count now 0. Uncommitted: todo.org stamp + session-context — lands at wrap-up.
+
+** KB spec amendment — D8 git transport + five folds (17:57-18:05 CDT)
+
+Craig asked five design questions (migration, shared-vs-separate roam, thin testing, his docs, maintenance), then ratified Shape A: whole roam moves from Syncthing to git. Ground truth gathered first: Syncthing share root is ~/sync/org (.stfolder there), roam not a git repo, 63 conflict files confirmed recursive, org-roam-db-autosync-mode on. Phone constraint dissolved: Craig's mobile pattern is on-demand drops to ~/sync/phone, he does NOT want whole-roam on the phone.
+
+Spec amended: new D8 (git on cjennings.net, ~/org/roam proposed, systemd git-sync timer, opt-in-by-clone, work machine no clone, agents/ subdir for agent writes); Summary/Problem/Goals/Alternatives/D1/D5/D6 consequences updated; new Inclusion-criteria and Transport-and-layout design subsections; phases renumbered 0-4 (new Phase 0 transport migration, 1.5 guided memory sweep, 4 monthly hygiene automation); seed node redefined as the KB's own doc; new Success metrics section (usage, recall wins, boundary integrity, hygiene; 30-day checkpoint); Risks/Readiness/Testing updated; query commands path-neutralized to <kb-path>. todo.org: dated amendment entry + Phase 0 and 1.5 tasks added, Phase 1/2/3 bodies updated, manual-testing child gains the cross-machine round-trip check, [#D] hygiene child promoted to Phase 4 framing. Committed + pushed. Implementation hold still stands.
+
+** No-approvals batch: KB Phases 0-4 — Phase 0 done (18:14 CDT)
+
+Craig: "the word. do it all in no-approvals mode." Batch = Phases 0-4 per the ratified spec; engineering gates stay on.
+
+Phase 0 complete: tarball backup at ~/roam-backup-2026-06-10.tar.gz; roam copied to ~/org/roam, 63 conflict files deleted (424 org files remain); git init + initial commit 515693d as Craig; bare repo created at /var/git/roam.git (git@cjennings.net has real shell); pushed, tracking main. Old ~/sync/org/roam replaced with symlink to ~/org/roam (Syncthing will propagate symlink to other machines — they need clones, noted in archsetup handoff). Emacs: user-constants.el roam-dir defconst rewritten to ~/org/roam (live-reloaded; inbox-file/reading-notes-file defvars set explicitly — defvar reload caveat; org-roam-directory repointed; db-sync rebuilt 416 nodes). roam-sync.sh + 6 bats (red-first, all green; bare-remote -b main fixture gotcha) + systemd units installed + enabled, manual run verified. Old-path sweep: protocols.org task-list pointer, journal-entry workflow, notes template, todo.org line 6 → ~/org/roam; mirrors synced. Handoffs sent to .emacs.d (commit the constants edit) and archsetup (adopt units, other-machine clone steps). rulesets commit fcf554a pushed.
+
+Next: Phase 1 knowledge-base.md.
+
+** Phase 1 done (18:16 CDT)
+claude-rules/knowledge-base.md written and committed (d071f1f, pushed). make install linked it; verified known-note query + conflict-glob exclusion with a planted file. Next: Phase 1.5 memory sweep.
+
+** Phases 1-4 + bookkeeping + evening inbox (18:15-18:28 CDT)
+
+Phase 1: knowledge-base.md rule (d071f1f), linked machine-wide, query + conflict-exclusion verified. Phase 1.5: rulesets memories swept — 3 promoted to ~/org/roam/agents/ (notify pattern, pdftools venv, gpg-agent SSH TTLs), 2 kept local (rule-encoded), ai-scripts-canonical memory de-staled (claude-templates subtree); migrate-memories handoff broadcast to 10 memory-bearing projects (work skipped per boundary; orphaned linear-emacs memory dir noted). Phase 2: seed/doc node written, indexed + resolvable by title via org-roam (420 nodes). Phase 3: wrap-it-up promotion check + mandatory "KB: promoted N / consulted yes-no" Summary line (242b95e). Phase 4: kb-hygiene.sh (awk :ID: field-split bug caught by test 4, fixed; 6/6 green, shellcheck clean) + monthly roam-hygiene timer installed/enabled; live run: 4 agent nodes, 428 files, 0 conflicts (b014095). Bookkeeping: phase tasks → dated entries, parent → DOING (manual testing + other-machine clones outstanding), spec status → implemented + history entry (97a7d63).
+
+Three evening work handoffs processed at the task boundary, all implement-now: Signal plugin corrected to Emacs-only per Craig's ruling — Path B removed, signel started-and-left-running (4d26552; NOTE: subject line carries an em-dash, a voice slip caught post-push); interaction.md render-merge guard (d5d5448); transcript workflow classification + Analyze-and-Extract + exit gate (df94836). Acceptance reply sent to work (...1828...); inbox empty; tree clean except this anchor. KB receipt for this session when it wraps: promoted 4 (3 sweep + seed) / consulted no (KB was the work itself).