feat(my-pr-monitor): redirect Phase 1 — disabled discovery task#407
Open
johnjansen wants to merge 1 commit into
Open
feat(my-pr-monitor): redirect Phase 1 — disabled discovery task#407johnjansen wants to merge 1 commit into
johnjansen wants to merge 1 commit into
Conversation
… Phase 1)
Lands `.anvil/todos/p2/my-pr-monitor-discover.md` per the redirect plan
(`dw/ideas/2026-05-29-my-pr-monitor-redirect.md` §9.4). The new task
coexists with the existing `my-pr-monitor.md` until plan step 9.6
validates ≥ 5 cycles with no recall keyspace conflict; the existing task
is not edited.
The new task is **discover + diff + notify**, full stop:
- reads `gh search prs author:@me` + `gh pr view` + GraphQL review
threads (read-only on the repo)
- diffs against recall and emits four event kinds keyed by
`<kind>:<head_sha>:<discriminator>`: `new_review_comment`,
`ci_failure`, `merge_conflict`, `ready_to_merge`
- resolves the originating workspace via cached
`origin_workspace_ref`, falling back to branch-prefix lookup against
`cmux list --json`, then to a `parking:pr-triage` synthetic ref
- delivers events through three layered channels: recall (truth),
`cmux color/progress/status` paint of the target workspace
(visible projection), and `terminal-notifier` for `ready_to_merge`
only (gated by the existing `notifications/ready-to-merge` key for
cross-task idempotency)
- re-paints stale `delivered` events idempotently but never re-fires
`terminal-notifier`
- supersedes events / comments / checks on `head_sha` rollover
Hard rules preserved from the sibling task and sharpened for the
redirect: no `git`, no worktrees, no `yarn`, no PR comments, no review
replies, no `gh pr ready`, no `update-branch`, no `requested_reviewers`,
no force-push, no API merge. PrimerAI org filter retained. Anvil never
escalates — the cmux pill staying Rose and the Phase 4 stdout report are
the escalation surface.
Ships `disabled: true` so it never runs until plan step 9.6 explicitly
enables it. Recall keyspace `events` is disjoint from the existing
task's `comments` / `checks` / `notifications` writes, so the two tasks
can run side-by-side during the validation window without collision.
Refs: dw/ideas/2026-05-29-my-pr-monitor-redirect.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of the my-pr-monitor redirect (
dw/ideas/2026-05-29-my-pr-monitor-redirect.md§9.4): new discover + diff + notify task that ships disabled alongsidemy-pr-monitor.md. Existing task untouched.When eventually enabled (plan §9.6, behind a separate brief shipping the workspace-side responder), this task replaces JJ-Monitor's triage loop with a routing model — anvil sees, the originating workspace acts.
.anvil/todos/p2/my-pr-monitor-discover.md,disabled: true, schedule*/15allowed_tools= sibling minusBash(git:*),Edit,Write; plusBash(cmux:*)eventscollection (pending/delivered/acked/superseded), keyed<kind>:<head_sha>:<discriminator>— disjoint from sibling'scomments/checks/notificationswritesnew_review_comment,ci_failure,merge_conflict,ready_to_mergeorigin_workspace_ref→ branch-prefix lookup againstcmux list --json→parking:pr-triagesynthetic refcolor/progress/status, idempotent re-paint on staledelivered) +terminal-notifierforready_to_mergeonly (gated by existingnotifications/ready-to-mergekey)head_sharollover supersedesevents/comments/checkscleanlyHard rules preserved + sharpened
git, no worktrees, noyarn, no typecheck (workspace concerns now)gh pr ready, noupdate-branch, norequested_reviewers, no force-push, no API merge — silent on GitHubterminal-notifieronly forready_to_merge, never re-fired for the samehead_shaOut of scope (separate briefs)
gh pr createorigin-registration hookorigin_workspace_reffor currently-open PRsschedule: ''on existing task)Test plan
.anvil/todos/p2/my-pr-monitor-discover.mddisabled: true.anvil/runs/etc. still ignored; only the new task file un-ignored.anvil/todos/p2/my-pr-monitor.mdunchanged