Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(skills): standardize active waiter preflight (#1416)
Call Whitea140a8ec9064
diff --git a/.agents/skills/pr-delivery-loop/SKILL.md b/.agents/skills/pr-delivery-loop/SKILL.mdindex 613cfa4d6..200532c73 100644--- a/.agents/skills/pr-delivery-loop/SKILL.md+++ b/.agents/skills/pr-delivery-loop/SKILL.md@@ -206,6 +206,11 @@ turn ends because you armed a watch and are waiting, say exactly that.filtering, settling, retries, and delivery acknowledgement. Those mechanicsbelong to the reusable skill; this policy only constrains when and why thewatch is armed.+- Before arming any managed wait, use `background-watch-hook` to resolve the+ active skill and verify the combined `wait_pr.py` capability flags. A failed+ check is an environment blocker: repair the harness registration or symlink+ before waiting. Never compensate for a stale copy by hand-rolling or patching+ an old waiter.- Arm the fresh watch only AFTER your reply-then-resolve batch is pushed andsettled: your own thread resolutions count as "review activity" to a watcharmed earlier in the round, so it self-consumes on YOUR close-out actions anddiff --git a/skills/background-watch-hook/SKILL.md b/skills/background-watch-hook/SKILL.mdindex 0084e0797..85f187c50 100644--- a/skills/background-watch-hook/SKILL.md+++ b/skills/background-watch-hook/SKILL.md@@ -2,7 +2,7 @@name: background-watch-hookslug: background-watch-hookdescription: Use `vibe watch` to run a managed Harness waiter that returns to the same conversation later. Best for reviews, CI, files, logs, and other wait-now-continue-later workflows.-version: 0.15.0+version: 0.16.0---# Background Watch Hook@@ -220,16 +220,64 @@ if [ -z "$BACKGROUND_WATCH_HOOK_SKILL_FILE" ]; thendonefiif [ -z "$BACKGROUND_WATCH_HOOK_SKILL_FILE" ]; then- for SKILL_ROOT in "${CODEX_HOME:-$HOME/.codex}/skills" "${AGENTS_HOME:-$HOME/.agents}/skills"; do- [ -d "$SKILL_ROOT" ] || continue- BACKGROUND_WATCH_HOOK_SKILL_FILE="$(find "$SKILL_ROOT" -path '*/background-watch-hook/SKILL.md' -print -quit)"- [ -n "$BACKGROUND_WATCH_HOOK_SKILL_FILE" ] && break+ for SKILL_FILE in \+ "${CODEX_HOME:-$HOME/.codex}/skills/background-watch-hook/SKILL.md" \+ "${AGENTS_HOME:-$HOME/.agents}/skills/background-watch-hook/SKILL.md" \+ "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/background-watch-hook/SKILL.md" \+ "${OPENCODE_HOME:-$HOME/.opencode}/skills/background-watch-hook/SKILL.md" \+ "${XDG_CONFIG_HOME:-$HOME/.config}/opencode/skills/background-watch-hook/SKILL.md"; do+ if [ -f "$SKILL_FILE" ]; then+ BACKGROUND_WATCH_HOOK_SKILL_FILE="$SKILL_FILE"+ break+ fidonefitest -f "$BACKGROUND_WATCH_HOOK_SKILL_FILE"BACKGROUND_WATCH_HOOK_DIR="$(dirname "$BACKGROUND_WATCH_HOOK_SKILL_FILE")"```+## Active Waiter Preflight++Skill distribution belongs to the agent environment, not to this skill. When+multiple harnesses on one machine should use the same checkout, expose that+canonical directory through harness-local symlinks instead of maintaining+independent copies. This skill does not install, copy, or rewrite harness skill+directories.++Before arming a managed GitHub waiter, check the waiter in the active directory+resolved above. The preflight is capability-based so it works for repository,+symlinked, and harness-managed installations without a second resolver or a+custom package manifest:++```bash+WAIT_PR="$BACKGROUND_WATCH_HOOK_DIR/scripts/wait_pr.py"+test -f "$WAIT_PR"+WAIT_PR_HELP="$(uv run --no-project "$WAIT_PR" --help 2>&1)" || {+ printf '%s\n' "background-watch-hook waiter is not executable: $WAIT_PR" >&2+ exit 1+}+for REQUIRED_FLAG in \+ --sha \+ --workflow \+ --seed-state \+ --actionable-only \+ --ignore-author; do+ case "$WAIT_PR_HELP" in+ *"$REQUIRED_FLAG"*) ;;+ *)+ printf '%s\n' "background-watch-hook waiter is missing $REQUIRED_FLAG: $WAIT_PR" >&2+ exit 1+ ;;+ esac+done+```++The frontmatter version is a human-readable signal; the required command-line+capabilities are the runtime contract. A failed preflight is an environment+blocker. Repair the harness registration or symlink to the intended skill, then+run the preflight again. Do not patch an older copy in place or hand-roll a+substitute waiter.+## GitHub Example WaiterFor a PR delivery loop, prefer one combined `wait_pr.py` watch. It observes PR review,diff --git a/tests/test_harness_skill_guidance.py b/tests/test_harness_skill_guidance.pyindex 252dcf3cf..15fc4653d 100644--- a/tests/test_harness_skill_guidance.py+++ b/tests/test_harness_skill_guidance.py@@ -152,6 +152,18 @@ def test_background_watch_skill_resolves_local_waiters_and_persists_managed_pr_sassert 'REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"' in bodyassert '"$REPO_ROOT/skills/background-watch-hook/SKILL.md"' in bodyassert '"$REPO_ROOT/.agents/skills/background-watch-hook/SKILL.md"' in body+ assert '"${OPENCODE_HOME:-$HOME/.opencode}/skills/background-watch-hook/SKILL.md"' in body+ assert (+ '"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/background-watch-hook/SKILL.md"' in body+ )+ assert "CLAUDE_HOME" not in body+ assert "find \"$SKILL_ROOT\"" not in body+ assert 'WAIT_PR="$BACKGROUND_WATCH_HOOK_DIR/scripts/wait_pr.py"' in body+ assert 'WAIT_PR_HELP="$(uv run --no-project "$WAIT_PR" --help 2>&1)"' in body+ assert "--workflow" in body+ assert "This skill does not install, copy, or rewrite harness skill" in body+ assert "sync_skill.py" not in body+ assert not (ROOT / "skills/background-watch-hook/scripts/sync_skill.py").exists()assert body.count('--state-file "$STATE_FILE"') >= 7assert body.count("--seed-state") >= 3assert "The one-shot PR and Actions waiters retry" in body