From 0c018785d2593233e11351693f612b76d892a200 Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Sat, 16 May 2026 13:44:49 -0700 Subject: [PATCH 1/3] chore: clean stale refs + watchdog enforcement banner (DPLAN-0179) --- src/aipass/devpulse/apps/modules/watchdog.py | 2 ++ src/aipass/drone/.seedgo/bypass.json | 10 ---------- src/aipass/drone/README.md | 2 -- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/aipass/devpulse/apps/modules/watchdog.py b/src/aipass/devpulse/apps/modules/watchdog.py index 94b99a66..19a06096 100644 --- a/src/aipass/devpulse/apps/modules/watchdog.py +++ b/src/aipass/devpulse/apps/modules/watchdog.py @@ -325,6 +325,8 @@ def _handle_agent(sub_args: List[str]) -> bool: error("Usage: watchdog agent [--timeout SECONDS]") return True + error("WATCHDOG: Must be invoked via Monitor tool, never run_in_background") + timeout = _DEFAULT_AGENT_TIMEOUT positional: List[str] = [] i = 0 diff --git a/src/aipass/drone/.seedgo/bypass.json b/src/aipass/drone/.seedgo/bypass.json index 3707ef7f..61a37a6b 100644 --- a/src/aipass/drone/.seedgo/bypass.json +++ b/src/aipass/drone/.seedgo/bypass.json @@ -174,16 +174,6 @@ "standard": "architecture", "reason": "Test file — intentionally outside 3-layer structure. tests/ is a peer of apps/, not part of it." }, - { - "file": "apps/handlers/git/status_handler_gitpython.py", - "standard": "architecture", - "reason": "DPLAN-0140 Phase 1 prototype — intentionally unreferenced, awaiting Phase 2/3 FPLAN to wire into production." - }, - { - "file": "handlers/git/status_handler_gitpython.py", - "standard": "dead_code", - "reason": "DPLAN-0140 Phase 1 prototype — intentionally unreferenced, awaiting Phase 2/3 FPLAN to wire into production." - }, { "file": "CLAUDE.md", "standard": "architecture", diff --git a/src/aipass/drone/README.md b/src/aipass/drone/README.md index a0b634d7..6db1fbd3 100644 --- a/src/aipass/drone/README.md +++ b/src/aipass/drone/README.md @@ -174,7 +174,6 @@ drone/ │ │ ├── branches_handler.py # List remote branches │ │ ├── delete_branch_handler.py # Delete remote branch (main/dev protected) │ │ ├── status_handler.py # Scoped git status (subprocess) -│ │ ├── status_handler_gitpython.py # [prototype] DPLAN-0140 Phase 1, not wired in │ │ └── sync_handler.py # Safe main sync (--autostash support) │ └── plugins/ │ ├── devpulse_ops/ # Privileged git operations (auth-gated) @@ -333,7 +332,6 @@ Run tests: `cd src/aipass/drone && python -m pytest tests/ -q` ## Known Issues -- `status_handler_gitpython.py` is an unreferenced prototype (DPLAN-0140 Phase 1) — awaiting Phase 2/3 - `update_command()` and `command_exists()` in `ops.py` are tested CRUD API but unused from production - Pyright warns about `json` package name shadowing stdlib — works at runtime - Recurring sync errors when working tree is dirty — operational, not code bugs From c75a3fd2ce458595ecc6bf577c606702a2b4b9f1 Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Sat, 16 May 2026 13:52:03 -0700 Subject: [PATCH 2/3] feat: add STATUS.local.md refresh to startup protocol --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index b108cc14..26d2cdae 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,6 +11,7 @@ On any greeting, silently read these files from CWD and run the commands — no - Read: `.trinity/passport.json`, `.trinity/local.json`, `.trinity/observations.json`, `README.md`, `STATUS.local.md` - Check: `drone @ai_mail inbox` — process any mail, don't ask. - Run: `drone @git status` + - Refresh: If `STATUS.local.md` is stale (last updated date older than latest session in local.json), update it from your memories. Keep Current Work accurate. Use drone commands for all operations. Never raw git, gh, file access, or python -m when drone provides it. From 0090026521275897eec8ae7551048a2e42343156 Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Sat, 16 May 2026 14:09:33 -0700 Subject: [PATCH 3/3] feat: pre_compact hook saves agent state for dispatched sessions --- .claude/hooks/pre_compact.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.claude/hooks/pre_compact.py b/.claude/hooks/pre_compact.py index 2e2c7e40..4782cb97 100644 --- a/.claude/hooks/pre_compact.py +++ b/.claude/hooks/pre_compact.py @@ -146,8 +146,21 @@ Context just compacted. Below is your live state. Use it to continue seamlessly. if status: sections.append(f"## STATUS.local.md\n{status}") - # Recovery instructions (lean) - sections.append("""## Recovery Protocol + # Recovery instructions — different for dispatched agents vs interactive + import os + + is_dispatched = os.environ.get("AIPASS_SESSION_TYPE") == "dispatched" + + if is_dispatched: + sections.append("""## DISPATCHED AGENT — SAVE STATE NOW +Before continuing work, you MUST update your memories: +1. Update .trinity/local.json — add/update current session with work done so far +2. Update STATUS.local.md — ensure Current Work reflects what you've accomplished +3. Then continue your task from where the summary left off + +This is non-optional. Compaction just happened — if you don't save now, work history is lost.""") + else: + sections.append("""## Recovery Protocol - Continue where the summary left off — don't restart or ask generic questions - .trinity/local.json has full session history and key_learnings — read it if you need more context - STATUS.local.md has current work, known issues, and todos