AGENT SKILL

autobuild-pr-nudge-monitor

Reusable Hermes cron fixture for monitoring GitHub PRs linked to autobuild Linear issues, moving them to Rework on Codex feedback/conflicts, and merging after Codex approval.

License 许可
MIT
最近更新
2026-11-06
Stars
★ 5
Forks
4

01 前言 Front Matter

name
autobuild-pr-nudge-monitor
author
Hermes Agent
license
MIT
version
1.0.0
metadata
{ "hermes": { "tags": [ "github", "linear", "cron", "autobuild", "codex", "pull-requests" ] } }
description
Reusable Hermes cron fixture for monitoring GitHub PRs linked to autobuild Linear issues, moving them to Rework on Codex feedback/conflicts, and merging after Codex approval.

02 资源文件 5

03 SKILL.md 正文

Autobuild PR nudge monitor

Use when Aaron asks to monitor GitHub PRs and nudge only PRs attached to autobuild Linear issues.

Installed fixture

  • Script: ~/.hermes/scripts/autobuild_pr_nudge_monitor.py
  • Primary live config: ~/.hermes/pr-nudge-monitors.json
  • Bundled fallback config for ai-configs installs: ~/.hermes/scripts/autobuild_pr_nudge_monitor.config.json
  • State: ~/.hermes/state/autobuild_pr_nudge_monitor.json
  • Log: ~/.hermes/logs/autobuild_pr_nudge_monitor.log
  • Docs: ~/.hermes/docs/autobuild-pr-nudge-monitor.md
  • Reference: references/rework-fingerprint-regression.md captures the stalled-but-running fingerprint regression pattern and durable fix.
  • Cron job in default profile: Autobuild PR nudge monitor (8ae87f95f2e3 as of creation), every 10 minutes, script-only/no-agent, delivered to origin thread.

Behavior

The monitor:

  1. Lists GitHub open PRs for configured repos.
  2. Extracts linked Linear issues from PR title, branch, explicit Closes/Fixes/Resolves KEY-123 body text, and the first Linear linkback URL.
  3. Loads Linear issues with the configured required label, default autobuild, in one batch via ltui --format json --limit 250 issues list --label autobuild.
  4. Checks Codex/merge-readiness for every open PR in the configured repo, whether or not it is linked to an autobuild Linear issue.
  5. Maintains the GitHub PR label merge-ready as a visible PR-list indicator on any open PR whose current head is clean and has a real current-head Codex ready/no-issues signal. Codex readiness includes PR-level ? reactions from the Codex bot when the reaction is newer than the current head commit.
  6. Restricts nudging to matching required-label Linear issues: moves those issues to Rework and comments when there is current-head Codex feedback or a merge conflict.
  7. If merge_on_codex_ready is true, merges/auto-merges only matching required-label Linear PRs after a real Codex thumbs-up/ready signal.
  8. Prints only actionable output; empty stdout means no-op. Linear rate limits are logged and retried later quietly; they skip Linear nudges/auto-merge for that tick but do not block repo-wide merge-ready label maintenance.

Add another repo

Edit ~/.hermes/pr-nudge-monitors.json and add a monitor object. If the monitor should travel with the ai-configs-managed Hermes bundle, mirror the same object into ~/.hermes/scripts/autobuild_pr_nudge_monitor.config.json:

{
  "name": "repo-name-autobuild-prs",
  "repo": "Org/repo",
  "repo_dir": "/absolute/path/to/local/repo-if-ltui-config-needed",
  "linear_team": "NOD",
  "linear_project": "optional-linear-project-id",
  "issue_key_prefix": "NOD",
  "required_label": "autobuild",
  "rework_state": "Rework",
  "merge_on_codex_ready": true,
  "enabled": true
}

repo_dir is optional for GitHub but useful when repo-local ltui auth/config is required.

Verify

~/.hermes/scripts/autobuild_pr_nudge_monitor.py --list-config
DRY_RUN=1 ~/.hermes/scripts/autobuild_pr_nudge_monitor.py
hermes cron list

Pitfalls

  • If ltui disappears from PATH, set LTUI_CMD to the full command, e.g. LTUI_CMD=/Users/anichols/code/ltui-linear-rate-limit-reduction/bin/ltui. The watcher also has fallback resolution for known local ltui checkouts; do not let missing ambient PATH silently disable Linear nudges.
  • Do not use a broad regex over full Linear linkback markdown; it can include related issues. Use the fixture's extraction order instead.
  • Event fingerprints prevent duplicate nudges only while the linked Linear issue is already in the configured rework state. If a human/agent moves the same head back to review without a fresh Codex ready signal, the monitor must re-nudge and move it back to Rework; otherwise active PRs can appear stalled.

04 同仓库更多 Skills