diff options
Diffstat (limited to '.ai/workflows')
| -rw-r--r-- | .ai/workflows/startup.org | 2 | ||||
| -rw-r--r-- | .ai/workflows/triage-intake.cmail.org | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/.ai/workflows/startup.org b/.ai/workflows/startup.org index bc89256..d52add6 100644 --- a/.ai/workflows/startup.org +++ b/.ai/workflows/startup.org @@ -205,7 +205,7 @@ Notes on what =sync-templates= does (the rsync behavior it carries): - The =scripts/= sync excludes Python build artifacts (=__pycache__/=, =.pytest_cache/=, =*.pyc=). Running rulesets' own pytest leaves these in =claude-templates/.ai/scripts/tests/=, and =rsync -a= copies by disk presence regardless of =.gitignore=, so without the excludes every consuming project's tree gets polluted with machine-specific cache files. The excludes also protect existing dest copies from =--delete= cleanup, so a project that already received the cache must remove it once by hand. - The sync is guarded to skip when rulesets has uncommitted changes under the synced source paths. =rsync -a --delete= copies the working tree by disk presence, so without the guard a downstream session started while rulesets had in-flight WIP would pull that WIP into its =.ai/workflows/= and =.ai/scripts/=, surfacing as drift the user never authored (and tempting a fake "chore: sync .ai tooling" commit). The guard is scoped to the synced paths, not the whole repo, so unrelated rulesets dirt doesn't block the sync. From the jr-estate handoff 2026-05-29. - The sync is also guarded to skip when the *project* branch is behind its upstream (=proj_behind=). Phase A.0 correctly declines to fast-forward a diverged or behind-and-dirty branch, but the rsync would then land templates on the stale committed =.ai/= baseline — a huge diff measured against old content that conflicts once the branch reconciles to upstream's newer templates. Skipping is safe: the sync runs next session once the branch is current. Not an auto-discard — startup never =git checkout=s drift away, because a legitimate local stopgap in a synced file is indistinguishable from accidental drift by content alone (home reverted an intentional =flashcard-to-anki.py= fix this way on 2026-06-22). Prevention is safe; blind cleanup-after is not. Phase C's template-sync-churn safety net still surfaces any pre-existing dirt for a human decision. From the home handoff 2026-07-04. -- The sync touches only =protocols.org=, =workflows/=, and =scripts/=. The project-owned dirs =project-workflows/= and =project-scripts/= are deliberately *outside* the synced set, so a project's own workflows and scripts survive startup. This is why a project script that a workflow imports must live in =.ai/project-scripts/=, never =.ai/scripts/= — the latter is wiped to match the template by =--delete= on every startup. Naming: a script imported as a Python module needs an importable name (underscores, e.g. =zlibrary_api.py=); a CLI-invoked script can stay kebab-case like the template tooling (=cmail-action.py=). +- The sync touches only =protocols.org=, =workflows/=, and =scripts/=. The project-owned dirs =project-workflows/= and =project-scripts/= are deliberately *outside* the synced set, so a project's own workflows and scripts survive startup. This is why a project script that a workflow imports must live in =.ai/project-scripts/=, never =.ai/scripts/= — the latter is wiped to match the template by =--delete= on every startup. Naming: a script imported as a Python module needs an importable name (underscores, e.g. =zlibrary_api.py=); a CLI-invoked script can stay kebab-case like the template tooling (=inbox-status=). Rationale: Every call in Phase A is read-only or writes to a distinct path. Running them sequentially wastes round-trips; running them in parallel gives Claude the complete starting picture in one round-trip. diff --git a/.ai/workflows/triage-intake.cmail.org b/.ai/workflows/triage-intake.cmail.org index 8d8abfb..66ecf80 100644 --- a/.ai/workflows/triage-intake.cmail.org +++ b/.ai/workflows/triage-intake.cmail.org @@ -8,7 +8,7 @@ * Source: cmail :PROPERTIES: :ORDER: 25 -:ENABLED: test -f .ai/scripts/cmail-action.py +:ENABLED: command -v cmail-action :ANCHOR: none :SUBAGENT_OVER: 50 :END: @@ -18,7 +18,7 @@ Proton (=c@cjennings.net=) via the bridge script. =ANCHOR: none= because this reports live IMAP unread *state*, not a since-window — the engine substitutes no cutoff. Phase B uses the anchor only to flag which of the current unread arrived since last check. #+begin_src bash -python3 .ai/scripts/cmail-action.py list-unread +cmail-action list-unread #+end_src JSON output, keyed by UID. The script ignores messages already flagged =\Deleted= (those are pending-flush on the next Proton sync), so the list is the genuinely-live unread set. @@ -47,7 +47,7 @@ Omit if zero unread. All take one or more UIDs (from the =list-unread= JSON): -- mark-read :: =python3 .ai/scripts/cmail-action.py mark-read <uid>= -- star :: =python3 .ai/scripts/cmail-action.py star <uid>= -- unstar :: =python3 .ai/scripts/cmail-action.py unstar <uid>= -- trash :: =python3 .ai/scripts/cmail-action.py trash <uid>= (flags =\Deleted=; flushed on next Proton sync) +- mark-read :: =cmail-action mark-read <uid>= +- star :: =cmail-action star <uid>= +- unstar :: =cmail-action unstar <uid>= +- trash :: =cmail-action trash <uid>= (flags =\Deleted=; flushed on next Proton sync) |
