aboutsummaryrefslogtreecommitdiff
path: root/.ai/workflows
Commit message (Collapse)AuthorAgeFilesLines
* feat(workflows): add inbox-zero for routing the roam inbox by projectCraig Jennings16 hours4-0/+111
| | | | | | | | The global roam inbox (~/org/roam/inbox.org) is one shared capture file every project can see, and nothing routed its items to the project that owns them. inbox-zero claims the items prefixed for the current project, files them into that project's todo.org per the process-inbox discipline, and removes them from the shared inbox. Foreign-prefixed and unowned items stay. Every scan reports the total item count plus how many appear related to this project. This v1 is single-destination: it routes by explicit <project>: prefix only. The domain-aware mode that would guess every item's owner and empty the whole inbox in one run is deferred until the multi-project need is concrete. Wired into both session ends so each project touches the inbox twice a session: startup surfaces a read-only count and offer, wrap-up Step 3 sweeps the claimed set before the cleanup scripts so imported tasks ride the wrap commit. INDEX carries the trigger phrases.
* feat(workflows): skeptical review gate for inbox change proposalsCraig Jennings33 hours2-2/+47
| | | | | | | | The value gate asks whether to take an inbox item, never whether the proposed change is right. process-inbox gains a Skeptical Review for proposals that change shared assets: a written question battery (fit for all consumers, conflicts elsewhere, effect on common activities, enhancement, simplification, plus at least three change-specific questions), ending in a summary and recommendation Craig approves before the change lands. In a no-approvals session, behavior-changing proposals park instead of self-applying: prepared diff in working/, a [#B] VERIFY carrying the decision package, a reply to the sender. Wording-only fixes proceed, logged. monitor-inbox's act-vs-file rule and protocols.org's act-now line gain the matching exception so all three statements of the rule agree. protocols.org's tables picked up the org-table-standard reflow in the same pass. The motivating case is today's spec-decisions handoff. I applied it as-is, and the after-the-fact review surfaced a lost state and a vacuous gate pass the battery would have caught up front.
* feat(workflows): SUPERSEDED/CANCELLED decision states + old-model gateCraig Jennings33 hours2-4/+10
| | | | | | A superseded decision now flips to SUPERSEDED (linking its replacement) and a moot one to CANCELLED. Both are done-class via a #+TODO: header the spec template auto-adds, so the [/] cookie counts them resolved and neither blocks implementation-ready. The TODO/DONE pair alone had lost the old State: field's superseded value. spec-review's gate and Ready rubric now read "no decision is still TODO", and a spec still on the retired State: field model fails the gate item until converted. The gate as first written would have vacuously passed old specs, which have no decision tasks at all.
* feat(workflows): spec decisions become org TODO/DONE tasksCraig Jennings34 hours3-15/+31
| | | | | | Each spec decision is now an org TODO task that flips to DONE when the decision-maker agrees, with a [/] cookie on the Decisions heading and a Discussion child for disputes. This replaces the inline State: proposed | accepted | superseded field. spec-response folds settled decisions by flipping them to DONE. spec-review's readiness gate and Ready rubric require the cookie to read complete. A spec can't move past draft to implementation-ready while any decision is still TODO. From the .emacs.d handoff 2026-06-12.
* chore: drop the Signal triage-intake pluginCraig Jennings37 hours2-118/+2
| | | | Remove the triage-intake Signal source plugin and de-list Signal from the engine's plugin enumeration. I'm rebuilding the Signal client (signel + signal-cli) from scratch, so the plugin would scan against an unstable client. The signal MCP server and its README setup stay. Re-add the plugin when the client is stable.
* chore: delete the page-signal pager wrapperCraig Jennings38 hours3-90/+1
| | | | Remove the page-signal CLI wrapper, its workflow, and the references in INDEX.org, broadcast.org, and mcp/README.org. The signal MCP server stays. It's the two-way path and a separate capability. The pager number had deregistered and the send-only wrapper isn't worth re-registering.
* docs(task-audit): add tag-vocabulary enforcement and verify-then-closeCraig Jennings45 hours1-0/+14
| | | | Two Phase C behaviors, both surfaced auditing an Emacs-config todo.org. Enforce a project's declared closed tag set (strip tags outside it) where the legend marks the set exhaustive, leaving open-vocabulary projects untouched. For a task whose code shipped but awaits a manual or visual check, file that check under the project's manual-testing parent (dedup first) and close the implementation task, rather than letting "done but unverified" linger half-open.
* feat(triage): deltas-only sweep summaries and silent telegram dev groupsCraig Jennings2 days2-11/+37
| | | | | | A sweep now reports only what changed: a new invite, a moved or cancelled event, a message needing attention. Unchanged sources get no block. An all-quiet sweep renders as one line. Scan failures keep their loud banner and the suggested-actions line stays when actions are queued. Telegram dev-community group traffic (zed, GNU Emacs, Kitty) is dropped from sweep reports entirely unless Craig asks. Real DMs from known contacts still surface as Action.
* feat(workflows): session-harvest monthly promotion-mining passCraig Jennings3 days2-0/+106
| | | | | | session-harvest runs a monthly pass over recent session summaries across every AI project and proposes promotion candidates in four lanes: patterns catalog, KB facts, rule refinements, workflow learnings. Capture already happens continuously. This adds the batched review cadence that turns it into curated promotion. The window filter reads each session filename's date prefix instead of mtime. Clones and syncs reset mtime, which let 2025 sessions pass a recency filter. The run also aggregates the KB receipt lines from session summaries, so it doubles as the 30-day KB metrics readout.
* fix(triage): correct telegram mark-read verbs and crash guidanceCraig Jennings3 days1-12/+43
| | | | The documented mark-read verb telega-chat--mark-read never existed in telega. I replaced it with the verified telega--viewMessages form (plus mentions and reactions), noted that telega-chat-toggle-read toggles and needs an unread guard, and added the delete-join-notice sweep Craig approved (first run deleted 41 chats). The SEGFAULT gotcha now reflects reality: the dockerized server crashes spontaneously (memory corruption, 11 coredumps since 2026-06-09), the verbs were never the trigger, so action batches check the server first and treat a death as retryable.
* fix(install): link default hooks in make installCraig Jennings3 days1-2/+2
| | | | | | session-clear-resume.sh shipped 2026-06-02 with its settings.json entry, but make install didn't cover hooks and nothing re-ran install-hooks, so the symlink only existed on machines that had linked it by hand. Everywhere else the hook errored silently on every /clear. make install now links DEFAULT_HOOKS alongside skills, rules, config, and bin scripts, so the startup workflow's install step propagates new hooks machine-wide. Opt-in hooks stay manual. scripts/tests/install-hooks-link.bats covers the new section. The SessionStart-on-clear todo task closes with this: the hook feature already existed, and the gap was distribution.
* feat(workflows): rewrite daily-prep to the strict three-section templateCraig Jennings3 days2-420/+239
| | | | | | | | From the template spec Craig wrote 2026-06-10 plus four refinements from his review of the first new-format prep. The doc is now exactly Heads-Up, Day's Priorities, and Meetings / Focus Blocks. Two run modes replace full-prep and standup-only: Create ends with a mandatory priorities review gate (disagreement there signals todo.org staleness), and Update refreshes a day when the world moves. Both run a triage-intake first when none ran in the last hour. It retires the separate Standup Briefs and Upcoming Deadlines sections, the Anchor Tasks handoff, and the thin-link convention. Priorities entries now mirror their todo.org task heading and carry links and context in the body. Briefs nest under the standup they're reported in, with Blockers: None explicit. Meetings carry what to contribute and get, likely questions with answers, linked prep docs, and day-before prep blocks for unanswered questions. Focus blocks are linked menus, created the day before and marked free. The spec and the decisions handoff land in docs/design/.
* feat(workflows): transcript processing gains classification, extraction, ↵Craig Jennings3 days1-31/+42
| | | | | | exit gate Three changes from today's work session, closing the defect where the workflow could end at file hygiene with nothing landing in durable homes. Every recording is classified before transcription (this project / named other project / personal — unmatchable files ask Craig, never default), and cross-project files route per cross-project.md: labeled transcript plus an outcome note via inbox-send, recording to the owning project's meetings dir, nothing in local assets. A new mandatory Step 11 extracts action items to todo.org with owners and decisions to knowledge.org. The validation checklist becomes a hard exit gate: Step 13 (delete sources, the irreversible step) must not run until classification, extraction, and durable-home writes all hold.
* fix(triage-intake): Signal is Emacs-only — remove the standalone receive pathCraig Jennings3 days1-45/+32
| | | | Craig's ruling, correcting this morning's plugin: signel and standalone signal-cli share the same account config and device queue, so a standalone drain steals messages the Emacs client would otherwise show him. Step 0 now starts signel via cj/signel--ensure-started when it's down and leaves it running (a live signel is the steady state, so no teardown). signal-cli survives only for queue-untouching reads like listAccounts; the SCAN FAILED rule covers signel failing to start.
* feat(workflows): wrap-up promotes to the KB and records the usage receiptCraig Jennings3 days1-0/+13
| | | | Phase 3 of the agent KB spec. Step 1 of wrap-it-up gains a promotion check against knowledge-base.md's inclusion criteria, and every Summary now ends with a "KB: promoted N / consulted yes-no" line — the single grep-able input to the spec's 30-day success-metrics checkpoint. The validation checklist enforces the line.
* feat(kb): roam-sync script + timer units, old roam path repointedCraig Jennings3 days1-2/+2
| | | | Phase 0 of the agent KB spec: the org-roam KB now lives at ~/org/roam as a git repo on cjennings.net. roam-sync.sh (bats-tested: commit, rebase, push, conflict-abort) runs from a 15-minute systemd user timer; canonical unit files live in scripts/systemd/. Live references to the old ~/sync/org/roam path (the task-list pointer, the journal workflow, the notes template) repoint to ~/org/roam, and a transition symlink at the old location covers stragglers.
* feat(triage-intake): loud scan-failure rule + messenger plugin reworkCraig Jennings4 days3-25/+128
| | | | | | The 2026-06-10 sweep shipped without Signal: a standalone signal-cli receive hung on the account lock while the signel daemon owned it, and the failure looked identical to a quiet source. The engine now renders any failed, hung, or skipped scan in a SCAN FAILED banner at the top of the summary. Quiet means the scan ran and found nothing. The signal plugin now detects which path owns the account before scanning: when the signel daemon is live it queries chat buffers through Emacs, and the standalone draining receive runs foreground-only when it isn't. The telegram plugin gets an at-a-glance lifecycle (docker-mode launch, scan, send, shutdown only if the scan started the server) and treats a real DM from a work contact as Action.
* feat(workflows): daily-prep carries execution links and join linksCraig Jennings4 days1-1/+16
| | | | | | A Day's Priorities entry now carries the URL the task is done through (payment portal, doc, PR, form), not just the thin link to its todo.org home. When that URL is missing from the todo.org body, the prep build finds it and adds it to both. Meeting lines in Meetings / Work Blocks get an org link to the join URL from the calendar event's conference data, so joining is one click from the prep doc. Both rules came out of working the 2026-06-10 prep doc, where paying an invoice meant a Gmail dig for the payment URL first.
* feat(voice): expand skill to 45 patterns with attestation receipts and ↵Craig Jennings4 days1-2/+2
| | | | | | | | | | | | artifact budgets Two patterns kept failing in practice despite being documented (#40 praise asymmetry and the #38 terse cut), so I made the walk verifiable and closed the content gap behind tangled review text. The high-recurrence set (#13, #37, #38, #40, #42) now gets per-pattern attestation receipts. The anti-AI audit runs after the terse pass so the audited text is the text that ships. Short personal-mode artifacts get a compact output format, and a write-back step puts the voiced text in the file the publish flow posts from. Four patterns are new: #42 finding stems (one claim per sentence in review findings), #43 single-sentence paragraph cadence, #44 parenthetical asides, #45 declarative register marker. #37 exempts verdict formulas. #40 covers verification narration. #13 and #33 carry the self-discipline framing. A per-artifact budgets table makes terse a checkable budget instead of an adjective. The profile gains paired entries with the approved worked examples, and commits.md plus no-approvals.org drop hardcoded pattern counts so the next addition doesn't re-drift them.
* feat(workflows): promote meeting-prep to a general templateCraig Jennings4 days4-3/+179
| | | | | | Meeting-prep was project-only. I generalized its project-specific references (transcript-home path, issue tracker, knowledge file, worked-example doc) to neutral terms and moved it into claude-templates so any project's .ai/ picks it up. The pre-wire supporting doc travels beside it as meeting-prep.pre-wire.org. I added the workflow entry and trigger phrases to INDEX.org. I flipped daily-prep's two conditional meeting-prep references, and its trailing changelog claim, to direct links now that the workflow ships as a template.
* docs(task-review): sharpen the :solo: tag definitionCraig Jennings4 days1-2/+10
| | | | | | Craig clarified what :solo: means. The old third gate ("the outcome is verifiable locally, no ... confirmation that the result is right") read literally disqualified every task, since Craig spot-checks everything regardless of the tag. It conflated "Craig will also check" with "only Craig can check." The three gates are now buildable, verifiable by Claude, and no upfront decision. The fix is decoupling Craig's routine spot-check from the determination: a task Claude builds and verifies itself, leaving a manual-testing reminder for the residual human-in-the-loop confirmation, is solo. The disqualifier is having no verification path of Claude's own, a result only judgeable by Craig's eyes. task-audit.org Phase C already defers here for the definition, so this is the one edit site.
* feat(daily-prep): add 5-day look-ahead, daily big-ball, and decline gateCraig Jennings4 days1-4/+18
| | | | I folded in three additions from the Manager Tools prep research. Phase A now fetches the prep day plus the next 5 days, and a new Phase 1 sub-section scans that window for meetings that need prep, scheduling traps, and focus blocks to protect. It's a scan-and-flag pass that feeds Heads-up and Anchor Tasks, not a new prep-doc section. Phase 3 sub-step 3a pulls one important-but-not-urgent task per day for a 15-minute chunk, so strategic work lands in small daily pieces instead of getting displaced by the urgent. Phase 1 item 5 reframes "attend" as "contribute" and adds a send-regrets gate for meetings with no objective. The look-ahead's meeting-prep references stay conditional ("where the project has one") since meeting-prep is project-only for now.
* docs(create-workflow): document the supporting-document conventionCraig Jennings4 days2-1/+9
| | | | A workflow that outgrows its inline content stores the overflow in a sibling <workflow>.<suffix>.org, linked inline. This reuses the engine.plugin dot-glob, so the drift-check and discovery glob already treat the file as owned rather than an orphan. It also travels with the workflow on promotion. I extended the INDEX drift-check note to name supporting docs alongside source plugins.
* docs(spec-review): check generated config resolves where consumedCraig Jennings4 days1-1/+1
| | | | A generated config gets read in a different namespace than the one that wrote it. Build host, chroot, image runtime, target system, container, and VM are distinct, so a path valid where the config is generated can be absent where it's read. I added the check to the Architecture & maintainability dimension.
* feat(workflows): generalize broadcast into announcement + situational modesCraig Jennings4 days3-141/+187
| | | | cross-project-broadcast handled tooling and rule announcements but had no shape for the situational case: a life or work event I want every project's agent to know, said once so none is missing context when I next talk to them. I renamed it to broadcast (helper and test alongside) and split it into two modes over the same fan-out plumbing. Announcement keeps the rigid capability template. Situational carries a general-not-comprehensive summary plus a fixed receiving-agent contract: record it in notes.org, hold it time-boxed or standing, apply on the project's own judgment, ask follow-ups at startup. The broadcasting agent does no per-project relevance analysis. Each receiving agent decides what the event means for its own work.
* feat(workflows): add spec-create, the author leg of the spec trioCraig Jennings4 days2-0/+199
| | | | spec-create is the front of the spec-create → spec-review → spec-response trio: the author writes a short design spec before non-trivial code, shaped to pass spec-review's readiness gate. It runs a when-to-spec proportionality gate first, then problem-first framing, design with forced alternatives and inline mini-ADR decisions, implementation phases with acceptance criteria and a readiness-dimensions menu, a terseness pass, and a hand-off self-check against the review rubric.
* feat(triage-intake): add Telegram source pluginCraig Jennings5 days2-1/+199
| | | | | | | | I added a Telegram source plugin so the triage-intake sweep covers Telegram alongside Signal, cmail, Gmail, calendar, and PRs. Telegram is personal messaging, so it's a general plugin that syncs to every project. Unlike signal-cli, Telegram has no headless CLI here, so the plugin drives telega.el inside the running Emacs daemon over emacsclient. It records whether telega was already live and shuts it down only if the scan started it, leaving an active session alone. Two sharp edges are documented in the plugin: the tdlib server can SIGSEGV on the initial sync, where docker mode is the fix, and the scan reads the cached telega--chats hash so a dead server still reports unread state instead of going blank. I also added Telegram to the engine's general-plugin list.
* feat(triage-intake): add Signal source pluginCraig Jennings5 days2-1/+69
| | | | | | | | I added a Signal source plugin so the triage-intake sweep covers Signal alongside cmail, Gmail, calendar, and PRs. Signal is personal messaging, so it's a general plugin that syncs to every project. It needs no wrapper script, unlike cmail. signal-cli is already a full CLI, so the plugin drives receive and send directly. The scan filters signal-cli's JSON down to real messages and drops the sync, receipt, and typing noise. One sharp edge is documented in the plugin: signal-cli receive drains the server queue, so the triage gets one shot per message. Signal Desktop and the phone keep their own copies, so nothing's lost. I also added Signal to the engine's general-plugin list.
* feat(workflows): promote reusable spec-review checks from emacs-d review passesCraig Jennings8 days1-12/+67
| | | | | | I folded the reusable, product-neutral checks from two emacs-d review passes into the canonical spec-review.org, so they survive the startup rsync and reach every project instead of living only in a downstream copy. The additions cover package-readiness and Makefile scope, actionable error strings, observability and diagnostics, long-running performance and failure-mode research, defcustom surface, a documentation plan, architecture weak-point mitigation, simplicity controls, extension/plugin developer experience, comparable-product sentiment, terminal-state discovery, CLI-wrapper value, and rollout/rollback, plus three reviewer principles and a generalizable-question harvesting rule. The promotion is a pure superset. Every change adds or expands a generic check, nothing regresses. Project-specific findings stayed in the source spec. The handoff that asked for this is preserved under docs/design.
* feat(workflows): build implementation tasks on Ready in spec-responseCraig Jennings8 days1-0/+19
| | | | | | I added Phase 6 to spec-response: once the author confirms a spec is Ready, file the full implementation-task breakdown in todo.org rather than leave a Ready spec nobody can act on. The phase creates one task per implementation phase, runs a completeness pass against every acceptance criterion and principle rule, marks :solo: only where the agent can build and verify end to end, collects the rest under a Manual-testing task, and defers outward-facing publish steps until the user confirms. This is the author-side complement to spec-review's Phase 6, which emits the drop-in task block. Review produces the block, response files the work.
* feat(startup): run make install in Phase A.0 to link new skillsCraig Jennings9 days1-0/+19
| | | | | | | | A skill added to rulesets and pushed reached each machine's files on the next pull, but not its ~/.claude symlink. make install only links what isn't already linked, and a git pull doesn't run it. So a new skill stayed silently uninstalled until someone re-ran make install by hand. The flush skill sat in that gap from 2026-06-02 until a manual install today. I added a make install step right after the Phase A.0 rulesets pull, the step that brings the skill's files in. It's idempotent: skips already-linked targets, links only what's new, and only writes symlinks under ~/.claude and ~/.local/bin. A grep keeps the all-skip case to one quiet line. Link, relink, and WARN lines get surfaced, and a new Phase C bullet handles them: a skill the harness already picked up mid-session is noted as available, one it didn't gets a restart prompt, a non-symlink collision goes to the user. Now "add a skill, commit, push" is enough to reach every machine on the next session. The step also covers a newly-added rule or script, since make install links those too. The canonical template and the .ai/ mirror both carry the change.
* feat(lint-org): reconcile follow-ups on write instead of appendingCraig Jennings11 days1-1/+1
| | | | | | | | | | Every run appended a fresh dated "lint-org follow-ups" section with line-number-keyed entries, so the follow-ups file grew an unbounded pile of near-duplicate sections, kept entries whose finding had since resolved, and broke whenever the target file's line numbers shifted. Running an audit against a large todo.org surfaced exactly that drift: dead-link flags pointing at docs that now exist, and three stacked dated runs for one file. Now lint-org rewrites the current file's section from the current run. Findings that no longer reproduce simply are not re-emitted, re-runs dedupe to one section, and entries key on checker plus message with the line as a trailing annotation, so a finding survives line shifts as the same entry. Other files' sections are left intact, and the strip step tolerates the old dated-header shape so existing follow-ups files migrate on first run. This changes the follow-ups file from an append-only log to the current outstanding findings per file. task-audit's Phase C link-hygiene step now also reaps a matching dead-link entry when it fixes or verifies the link, scoped strictly to dead-link entries, so the audit and the follow-ups file stop drifting between lint runs. Five follow-ups tests cover record-by-content, dedupe across runs, drop-on-resolve, and preserve-other-files. Mirrors synced.
* feat(task-audit): chain a task-review pass as the final phaseCraig Jennings11 days1-1/+9
| | | | A task audit verified the surviving tasks are factually honest but left their relevance and priority untouched, so keeping the list lean still needed a separate task-review run. Added Phase F: after the audit stamps :LAST_AUDIT:, run task-review on the oldest-unreviewed batch in the same pass. The two stay distinct (audit owns facts and :LAST_AUDIT:, review owns relevance and the per-task :LAST_REVIEWED:); chaining just refreshes both markers in one invocation. open-tasks does not invoke task-review, so nothing there needed to change. Mirror synced.
* feat(page-signal): route pages through a dedicated Signal pager accountCraig Jennings11 days1-2/+2
| | | | | | Paging never actually reached the phone before. signal-cli was registered as my primary number, so a page was that account messaging itself, and Signal mobile doesn't push-notify a self-message. I registered signal-cli with a separate Google Voice number (profile "Claude Pager") and pointed everything at it. page-signal now sends from that account to my Signal account by default, so a page lands as a normal third-party message and rings the phone. The old --note-to-self default is gone, since note-to-self on the pager account wouldn't reach me. Sender and default recipient now come from PAGE_SIGNAL_ACCOUNT and PAGE_SIGNAL_TO with baked-in defaults. The send command pins the sender with -a, and --to also accepts a Signal account UUID, since my account hides its phone number. servers.json points signal-mcp at the new number. Verified end-to-end: live sends from the pager account notified the phone, and signal-mcp shows connected.
* feat(daily-prep): store prep docs in daily-prep/ with a root symlinkCraig Jennings13 days2-14/+38
| | | | | | Prep docs are now born in daily-prep/YYYY-MM-DD-daily-prep.org and never move. A stable symlink at the project root, daily-prep.org, points at the current day's file and is the only thing that changes day to day. I replaced the old model where the doc was born in inbox/, yesterday's lingered there, and older docs were moved into a daily-prep/ archive. Consumers resolve the root symlink instead of reconstructing a dated filename or scanning inbox/: the standup lookback, next-day Phase 2, and the Emacs opener. Phase 8 becomes a symlink repoint rather than an archive move, and triage-intake's prep-doc anchor fallback now points at daily-prep/ only.
* fix(workflows): commit template-sync churn deterministicallyCraig Jennings13 days2-0/+51
| | | | | | | | Phase A's startup rsync copies template updates from rulesets into each project's .ai/, but nothing committed that churn, so it accumulated across sessions and eventually blocked Phase A.0's auto-fast-forward (git won't ff a dirty tree). Two projects hit it the same day. I added a Step 4.0 to wrap-it-up.org that commits the churn as its own chore commit before the session-work commit, guarded so it only auto-commits synced .ai paths matching rulesets canonical byte-for-byte and surfaces anything that doesn't. startup.org Phase C now surfaces leftover churn at session start as the crashed-session safety net. Both skip the rulesets repo, where .ai/ is a committed mirror. I also moved four misplaced PROPERTIES drawers in todo.org (DONE tasks) from after the resolution prose to immediately under the CLOSED line, so org parses them as real drawers.
* feat: add rename-ai-artifact tool and rename the drill-deck family to flashcardCraig Jennings14 days3-47/+93
| | | | | | | | | | Renaming an .ai artifact by hand is the kind of mechanical job that gets done incompletely: the canonical copy moves but the mirror doesn't, a reference in the INDEX is missed, a trigger phrase points at the old name. I'd also assumed a rename was costly because references scatter, when the index update is trivial and the drift check already guards it. So I built the discipline into a script instead of re-deriving it each time. scripts/rename-ai-artifact.sh takes old and new basenames, moves the file in both the canonical and mirror trees, and rewrites every reference repo-wide on a token boundary so renaming "foo" can't corrupt "foobar" or "foo-bar". It rewrites the underscore module-name variant too (a hyphenated script imported as foo_bar via importlib), leaves the archived session records under sessions/ alone because they're history, and runs workflow-integrity + sync-check at the end to prove no drift. rename-artifact.org documents it and indexes the triggers. Then I used the tool to do the rename that prompted it: the org-drill deck workflow and its helpers are now flashcard-named, since "flashcard" is the word you'd actually search for. The renamed set is flashcard-review.org plus flashcard-stats.py, flashcard-sync, flashcard-to-anki.py, and flashcard-diff-ids.py, with their tests, every reference, and the INDEX entry updated. The deck is still an org-drill deck under the hood, so the ":drill:" tag handling and the "drill deck" trigger phrases stay. I added "review/update the flashcards" alongside them. Tests: 9 bats for the rename tool (including the prefix-collision and history-preservation edges), and the renamed script suites all pass under make test.
* refactor(workflows): restructure startup and triage-intake into reading lanesCraig Jennings14 days2-110/+137
| | | | | | | | | | I split each into lanes so a reader can stop at the level that answers the question: Summary for "what does this do and what does it produce", Execution for the steps to follow, Reference for examples and edge cases, History for old decisions. Both files are large enough that an agent loading them at routing time pays for context it doesn't need yet. startup.org keeps Summary, Execution, and Reference (workflow discovery and common mistakes moved under Reference). triage-intake.org gets all four, including a History lane for its design notes. Every instruction is preserved. The triage reorder ran through a content-preservation check that compared the multiset of content lines before and after, so only heading depth and lane grouping moved. Nothing was dropped or reworded. workflow-integrity.py now counts "Summary" as a valid orientation heading, since that's the new top section both files lead with. This is the pilot from the codex backlog, scoped to the two largest workflows. Whether the lanes actually cut session token use gets evaluated before any wider rollout.
* refactor(daily-prep): delegate triage to the triage-intake engineCraig Jennings14 days1-272/+24
| | | | | | daily-prep's Phase 3 re-implemented email/Slack/Linear/PR scanning inline (sub-steps 3b-3g, ~280 lines): the same fan-out, classify, and reactive-task work the triage-intake engine has owned since its 2026-05-26 plugin refactor. I collapsed those to four steps: 3b runs the engine, 3c surfaces today's reactive items as Day's Priorities thin links, 3d re-sorts by urgency, 3e writes the audit footer from the engine's per-source coverage. Source coverage carries because the engine's Phase 0 globs both .ai/workflows/ and .ai/project-workflows/ plugins, so the work account's Gmail/Slack/Linear/GHE plugins are still scanned, and a source change now lives in one plugin instead of being duplicated here. I adapted the downstream references (the Prep-Doc-Structure rule, the Heads-up FYI source, the Recommended Approach Pattern reframed as engine-applied), dropped the orphaned Linear-digest note, and added a Living Document entry. The file goes 825 to 576 lines, and the prep-doc contract (Day's Priorities, Heads-up, Sources-checked footer) is unchanged.
* docs(spec-review): enumerate implementation tasks in Phase 6Craig Jennings14 days1-0/+24
| | | | From a pearl handoff: Phase 6 logged deferred and v1 work only in passing, so the implementer handoff was a re-read of the spec rather than a paste. I added a step that lifts the spec's Implementation phases section into a drop-in todo.org block: one [#B] TODO per phase plus a test-surface entry mirroring the Acceptance criteria. A spec with no phase decomposition fails the step, surfacing the shape problem as a finding before Ready rather than inventing phases. Added Exit Criterion 6 and a review-history entry.
* feat(workflows): add monitor-inbox workflow + inbox-status scriptCraig Jennings2026-05-312-0/+94
| | | | | | Handoffs that arrive mid-session used to sit unseen until the next startup or a manual check. Today's burst of cross-project handoffs made that gap obvious. I added monitor-inbox.org, the cadence-and-decision layer over process-inbox: check the inbox at every task boundary, decide act-now (just do it) versus file (ask, with filing as option 1), and reply to the sender. An opt-in background-monitor /loop recipe covers unattended watching. inbox-status (with bats tests) is the cheap check the cadence calls. It lists unprocessed handoffs and exits nonzero when any are pending, using the same artifact exclusions as the wrap-up sanity check. protocols.org gets a short cadence note so the habit fires every session, and INDEX.org lists the new workflow. The act-vs-file rule (act-now is silent, filing asks with file as option 1, ambiguity asks) is the decision protocol we settled today.
* docs(protocols): surface cmail-action send as the default email pathCraig Jennings2026-05-301-35/+15
| | | | An org-drill session asked to send a follow-up email first claimed it couldn't, then hand-built MIME through msmtp, because nothing told it cmail send exists. I added a "Sending Email" subsection to protocols.org (read every session): cmail (c@cjennings.net) is the default for personal mail, dmail for work, and cmail-action send is the tool, with one-liner examples for body-file, attachments, Cc/Bcc, and threaded replies. I also rewrote send-email.org Step 4, replacing the inline-Python heredoc that taught the hard way with the cmail-action send call.
* feat(session-context): resolve the active path per AI_AGENT_IDCraig Jennings2026-05-302-3/+14
| | | | | | A single .ai/session-context.org races when two agents share a project: each agent's writes clobber the other's session log. I added .ai/scripts/session-context-path, which resolves the active path from AI_AGENT_ID: unset gives the legacy .ai/session-context.org singleton (so every existing one-agent session is unchanged), set gives .ai/session-context.d/<id>.org with the id sanitized to filename-safe characters. This is Codex's Phase 1 slice from the runtime-neutral spec: the race fix on its own, no broader refactor. startup.org's existence check and wrap-it-up.org's rename now resolve through the helper, each with a singleton fallback so older checkouts that haven't synced the script still work. Wrap folds the agent id into the archive name so two agents wrapping in the same minute don't collide. protocols.org documents the rule. Verified with 5 bats cases and a two-agent simulation showing distinct paths per id.
* fix(startup): skip the .ai/ template sync when rulesets has uncommitted WIPCraig Jennings2026-05-301-10/+28
| | | | | | From jr-estate's handoff: Phase A's =rsync -a --delete= copies the rulesets working tree by disk presence, so a downstream session that starts while rulesets has in-flight WIP pulls that WIP into its own =.ai/workflows/= and =.ai/scripts/=, where it reads as drift the user never authored. I guarded the three rsyncs behind a =git status --porcelain= check on the synced source paths (=claude-templates/.ai/{protocols.org,workflows/,scripts/}=). It syncs when those are clean and skips with a message when dirty, catching up on the next clean session. The check is scoped to those paths, so unrelated rulesets dirt (a stray session-context.org, scratch files) doesn't block the sync. The handoff's secondary anomaly (two workflow files that didn't reach jr-estate) was a timeline artifact, not a Phase A bug. Both were added in 664bf01 on 2026-05-29, after jr-estate's rsync had already run, so they correctly didn't exist to copy yet.
* fix(drill-deck): cut leakage false positives and codify source/date conventionsCraig Jennings2026-05-301-3/+10
| | | | | | | | Health ran the new leakage check on a 43-card deck and hit two false-positive classes. The check read the whole card body, so a =Source: <label> — <url>= citation line inflated the front/back overlap whenever the URL slug repeated the question's words. Range/category cards ("What are the HbA1c ranges across normal, prediabetes, and diabetes?") tripped it too, because the question's categories echo in the answer even though the recalled content is the numbers. drill-deck-stats.py now routes leakage through an is_leaky helper. It strips =Source:= and created-date lines before computing overlap, and exempts a card when the answer carries a numeric range or threshold the question lacks. leakage_ratio itself is unchanged, so the genuine-restatement case still flags. Two body conventions now hold: a =Source:= citation goes at the end of a card after two blank lines, and no created/added date goes on a card. drill-to-anki.py now strips =Created:= / =:CREATED:= lines from the back as a backstop, and the workflow's Phase C removes them from the source during the rewrite. I added tests for the source-strip, the numeric carve-out, and the created-line strip, and documented all of it in drill-deck-review.org.
* fix(startup): exclude Python cache from script sync and restore script exec bitsCraig Jennings2026-05-301-1/+2
| | | | | | From health's handoff: the startup =.ai/scripts/= sync was dragging pytest build artifacts into every consuming project. =rsync -a= copies by disk presence, not git status, so the =__pycache__/= and =.pytest_cache/= that rulesets' own pytest leaves in =claude-templates/.ai/scripts/tests/= rode along to each project's tree even though the root =.gitignore= already keeps them out of rulesets' commits. Phase A's scripts rsync now excludes =__pycache__=, =.pytest_cache=, and =*.pyc=. A project that already received the cache has to remove it once by hand, since =--delete= leaves excluded paths in place. I noted that in the startup doc. Health also flagged that =inbox-send.py= kept needing a manual chmod. The cause wasn't rsync dropping the bit. Four shebang scripts (=inbox-send.py=, =cj-scan.py=, =cj-remove-block.py=, =eml-view-and-extract-attachments.py=) were committed mode 100644, so rsync faithfully copied the wrong mode. I set the exec bit on all four so the synced copies are runnable.
* feat(drill-deck): add authoring-quality checks and a card-authoring sectionCraig Jennings2026-05-301-2/+36
| | | | | | | | I researched spaced-repetition best practices (Wozniak's twenty rules, Matuschak's prompt-writing guide, Nielsen, the Anki and FSRS docs) and folded the findings into the drill-deck pipeline. drill-deck-stats.py now checks authoring quality on top of structure. Two checks block: answer leakage (a question that echoes >= 80% of its own answer's content words tests recognition, not recall) and duplicate / near-duplicate fronts (confusable cards interfere). Three checks warn without blocking, surfacing rewrite candidates without failing the gate: overloaded backs, list-shaped backs, and binary yes/no prompts. The fuzzy thresholds live in constants at the top of the script, so a real deck that trips false positives can be tuned. I pulled the card-parsing into a parse_cards helper that captures each card's body, and added focused tests for every new helper plus CLI coverage of the leaky, duplicate, and notes-only cases. drill-deck-review.org gains a Card Authoring Principles section (the why behind the canonical shapes, with sources), a person-card splitting path bounded by the :ID:-preservation rule, a Phase B cost-benefit-removal and leech-reformulation disposition, and a scheduling-is-Anki-side note so a future editor doesn't try to encode FSRS retention in the org source. I left out cloze cards (would need a second note type), per-card tractability targeting and retention encoding (Anki-side telemetry that never reaches the source), and on-face source-stamping (the converter strips those drawers by design). Each is noted with its reason.
* chore(scripts): add drill-deck stats, diff-ids, and sync wrapperCraig Jennings2026-05-301-24/+100
| | | | | | I incorporated the flashcard-tooling bundle from the work project's deck-review workflow, validated there against a 93-card deck. Three scripts now live under .ai/scripts/: drill-deck-stats.py (pre-rewrite inventory plus a gate that warns on stray *** Answer headers, missing :ID:, non-prompt headings, and #+TITLE jargon like "org-drill"), drill-deck-diff-ids.py (SRS-state preservation check that flags any :ID: lost across a rewrite), and drill-deck-sync (bash wrapper chaining stats, optional diff-ids, then drill-to-anki, writing to ~/sync/phone/anki/ only when the gates pass). The drill-deck-review.org workflow gains a Helper Scripts section and references the scripts from its phases. I reconciled its output-path prose with the drill-to-anki default that just moved to ~/sync/phone/anki/, so it no longer claims the script still defaults to ~/sync/org/drill/. I added tests for both Python scripts (pure logic plus CLI gate behavior) and a bats suite for the wrapper's guard paths. The clean end-to-end sync path stays uncovered since it needs uv-resolved genanki.
* chore: sync .ai mirror with canonical (drill-deck-review)Craig Jennings2026-05-302-0/+212
|
* fix(wrap-it-up): inbox sanity check exempts lint-followups.orgCraig Jennings2026-05-291-4/+11
| | | | | | | | | | | | | | | | The inbox sanity check I added in 8424e8f counted lint-followups.org as unprocessed, which surfaced as a false alarm during this session's wrap-up. lint-org writes its judgment items into inbox/lint-followups.org earlier in the same wrap-up workflow by design. The file is a pipeline artifact for the next morning's daily-prep, not a handoff that needs the value gate. The find filter now excludes .gitkeep, lint-followups.org, and PROCESSED-* prefixes. The Validation Checklist line names the same expected-artifacts list explicitly. Smoke test: post-fix count is 0 in the rulesets project (where lint-org just wrote 5 judgment items into inbox/lint-followups.org).