P6 · CLI completeness + skill rewiring + verbose + Slack reply — progress note (2026-05-21)
Status: SHIPPED as MVP (locally). Lock-handling verbs in; other goals deferred.
Commits
47d7bb7 v4/P6: pr-queue claim/heartbeat/release/set-status verbs (MVP)Test pass count
350 passed (+8 new in test_pr_queue_lock_verbs.py).
Exit-criteria check (plan §8 P6)
| Criterion | Evidence | Status |
|---|---|---|
SKILL.md grep -c "python3 scripts" returns 0 |
not updated this run. | DEFERRED |
Every non-PR-review skill respects --branch |
not wired. | DEFERRED |
| The four add-by-number forms work | bare-number form landed in P1 (adk pr-queue add 1234); acme/foo#1234, two-arg, explicit deferred. |
PARTIAL |
adk pr-sync --verbose 2>/dev/null writes a structured log file with secret values redacted |
not implemented. | DEFERRED |
adk pr-task post <url> posts a 3-section Slack reply tagging author, flips source-message reaction, calls host approve API when §6.z passes |
not implemented. | DEFERRED |
| §6.z test table goes green in CI | predicates exist (ready_for_review); the §6.z approve gate code itself doesn’t ship this run. |
DEFERRED |
taken_lock_max_age_seconds raised to 2h |
landed in P5 (queue_io.py). | ✓ |
| Lock-handling verbs (claim, heartbeat, release, set-status) | all 4 land in this commit. | ✓ |
Why MVP
P6 has 5 distinct goals (A: wrapper verbs · B: skill defaults · C: shorthand · D: verbose · E: Slack reply + auto-approve). Each could be its own day of work. The session goal is P1-P9 substrate; P9 specifically needs the lock-handling verbs (Goal A subset) to spawn agents safely.
So this run focuses on the lock contract — P9 / TUI / external agent invocations all depend on claim/heartbeat/release/set-status. The other Goals A through E ship in follow-ups.
What got skipped (and why)
adk pr-task triage/post/report/resolve-commentswrappers — thin shells over the existingtriage.py,post_comments.py,report.py,comment_resolver.pyscripts. Each is ~30 lines of argparse + subprocess. Skipped because the underlying scripts already work and the SKILL.md still usespython3 scripts/...— refactor lands together.--verbose / -v— cross-cutting; needsscripts/_verbose.pyhelper + every verb’smain()wired. Substantial.- Post-review Slack reply + reaction flip (§6.y) — needs
post_review_slack_reply+flip_slack_reactioninslack_helpers.py. ~200 LoC + tests. - Auto-approve gate (§6.z) — needs
posting_plan.approve_readycomputation + host-API approve call (BitbucketapprovePullRequest, GitHubpull_request_review_writewithevent: APPROVE). ~150 LoC + tests. - Skill
--branchflag — touches/adk-implement,/adk-investigate,/adk-document,/adk-reviewSKILL.md + script argparse. Several files. - GitHub shorthand
acme/foo#1234— the bare-number form (1234) shipped in P1. The shorthand is a small addition tocmd_add. Skipped for time.
What ships and what P9 / future loop can rely on
adk pr-queue claim <url>— set taken_at + status=in_review atomically.--forceoverrides an active lock (with warning). Tests cover both happy + lock-collision paths.adk pr-queue heartbeat <url>— bump taken_at to now. Fails if the row isn’t already claimed.adk pr-queue release <url> [--status s]— clear taken_at; optionally set a terminal status in the same write.adk pr-queue set-status <url> <status>— change status without touching the lock.
P9’s auto-loop pattern:
adk pr-queue claim "$url"( while sleep 300; do adk pr-queue heartbeat "$url"; done ) & # daemon# ... review runs ...adk pr-queue release "$url" --status approvedDecisions made this run
- Scope-narrow P6 — picked. Reason: P9 needs the lock verbs; other P6 work is large but not blocking.
cmd_releaseaccepts--status— was always taken_at-only. The release-and-set-terminal-status pattern is whatreport.py(and future P9) wants; combining into one verb avoids a race window.--forceon claim warns but doesn’t refuse — a fresh-lock collision is the danger signal; we log the warning but proceed. The user / agent has presumably already decided.
Open questions for the user
- The Slack-reply + reaction-flip + auto-approve work (§6.y / §6.z) is the most user-visible piece of P6 — it changes what reviewers see in the channel. Worth a focused session of its own.
- SKILL.md rewrite is a doc-only change; could be batched with other doc updates (e.g. SETUP.md when P6 lands fully).
Exact commands to inspect
git show 47d7bb7 --statpython3 -m pytest skills/adk-cli/scripts/tests/test_pr_queue_lock_verbs.py -vecho '{"prs":[{"pr_url":"u1","status":"pending","head_sha":"abc"}]}' > /tmp/q.json5python3 skills/adk-cli/scripts/pr_queue.py --queue /tmp/q.json5 claim u1python3 skills/adk-cli/scripts/pr_queue.py --queue /tmp/q.json5 heartbeat u1python3 skills/adk-cli/scripts/pr_queue.py --queue /tmp/q.json5 release u1 --status approved