aboutsummaryrefslogtreecommitdiff
path: root/.ai/scripts
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-11 07:38:07 -0500
committerCraig Jennings <c@cjennings.net>2026-05-11 07:38:07 -0500
commitc62aa7af377e74d617ba09fe97b9df4718c6f1c4 (patch)
treea9acfc2e38c38716722726ee1555daf4ae745ffb /.ai/scripts
parentc462a13acd893f16e6e9b9358071435adf439c86 (diff)
downloadrulesets-c62aa7af377e74d617ba09fe97b9df4718c6f1c4.tar.gz
rulesets-c62aa7af377e74d617ba09fe97b9df4718c6f1c4.zip
chore(ai): sync template updates from claude-templates
Pull in the latest maildir-flag-manager.py and cross-agent-comms doc updates from the claude-templates source.
Diffstat (limited to '.ai/scripts')
-rw-r--r--.ai/scripts/cross-agent-comms/cross-agent-send.md4
-rw-r--r--.ai/scripts/cross-agent-comms/cross-agent-status.md2
-rw-r--r--.ai/scripts/cross-agent-comms/cross-agent-watch.md2
-rwxr-xr-x.ai/scripts/maildir-flag-manager.py38
4 files changed, 26 insertions, 20 deletions
diff --git a/.ai/scripts/cross-agent-comms/cross-agent-send.md b/.ai/scripts/cross-agent-comms/cross-agent-send.md
index b06dbce..29bfb24 100644
--- a/.ai/scripts/cross-agent-comms/cross-agent-send.md
+++ b/.ai/scripts/cross-agent-comms/cross-agent-send.md
@@ -123,8 +123,8 @@ host = "velox.local"
ssh_user = "cjennings"
# Optional: per-project inbox-path overrides for non-default layouts.
-[projects.career]
-inbox_path = "~/projects/career/inbox/from-agents"
+[projects.work]
+inbox_path = "~/projects/work/inbox/from-agents"
[projects.homelab]
inbox_path = "~/projects/homelab/inbox/from-agents"
diff --git a/.ai/scripts/cross-agent-comms/cross-agent-status.md b/.ai/scripts/cross-agent-comms/cross-agent-status.md
index e700919..070330c 100644
--- a/.ai/scripts/cross-agent-comms/cross-agent-status.md
+++ b/.ai/scripts/cross-agent-comms/cross-agent-status.md
@@ -129,7 +129,7 @@ cross-agent-status
cross-agent-status --json | jq '.projects[] | select(.pending_count > 0)'
# Single-project query
-cross-agent-status --projects-glob ~/projects/career/inbox/from-agents/
+cross-agent-status --projects-glob ~/projects/work/inbox/from-agents/
```
## See also
diff --git a/.ai/scripts/cross-agent-comms/cross-agent-watch.md b/.ai/scripts/cross-agent-comms/cross-agent-watch.md
index 7192f46..dd8afc1 100644
--- a/.ai/scripts/cross-agent-comms/cross-agent-watch.md
+++ b/.ai/scripts/cross-agent-comms/cross-agent-watch.md
@@ -114,7 +114,7 @@ cross-agent-watch
# Test against a single project, no notifications, verbose
cross-agent-watch \
- --projects-glob "$HOME/projects/career/inbox/from-agents/" \
+ --projects-glob "$HOME/projects/work/inbox/from-agents/" \
--no-notify
# Production-style: quiet stdout, log only
diff --git a/.ai/scripts/maildir-flag-manager.py b/.ai/scripts/maildir-flag-manager.py
index 9c4a59c..97ed1d8 100755
--- a/.ai/scripts/maildir-flag-manager.py
+++ b/.ai/scripts/maildir-flag-manager.py
@@ -119,28 +119,34 @@ def process_maildir(maildir_path, flag, dry_run=False):
print(f" Skipping {maildir_path} (not found)", file=sys.stderr)
return 0, 0, 0
- changed = 0
- skipped = 0
- errors = 0
-
+ # Snapshot the file list before any rename. Adding S to a new/ file
+ # moves it to cur/ via rename_with_flag; without a snapshot, the
+ # moved file gets re-encountered during the cur/ scan and inflates
+ # the skipped count.
+ file_paths = []
for subdir in ('new', 'cur'):
subdir_path = os.path.join(maildir_path, subdir)
if not os.path.isdir(subdir_path):
continue
-
for filename in os.listdir(subdir_path):
file_path = os.path.join(subdir_path, filename)
- if not os.path.isfile(file_path):
- continue
-
- try:
- if rename_with_flag(file_path, flag, dry_run):
- changed += 1
- else:
- skipped += 1
- except Exception as e:
- print(f" Error on {filename}: {e}", file=sys.stderr)
- errors += 1
+ if os.path.isfile(file_path):
+ file_paths.append(file_path)
+
+ changed = 0
+ skipped = 0
+ errors = 0
+
+ for file_path in file_paths:
+ try:
+ if rename_with_flag(file_path, flag, dry_run):
+ changed += 1
+ else:
+ skipped += 1
+ except Exception as e:
+ print(f" Error on {os.path.basename(file_path)}: {e}",
+ file=sys.stderr)
+ errors += 1
return changed, skipped, errors