Improvement prompts
One prompt per recommendation, in priority order (severity first, then quick wins before long campaigns). Each prompt is self-contained and may be pasted into a fresh AI agent session with no other context. Ordering dependencies, where they exist, are noted in each prompt’s Run after line and repeated inside the prompt text itself.
Every prompt below assumes the executing agent works in this project’s own repository
conventions: clone Pullwright/agent-ops fresh (never reuse a shared checkout), work on a
dedicated branch, commit, push, and open a pull request per AGENTS.md’s “Branch workflow” and
“Commit messages” sections (Conventional Commits title, since the PR title becomes the squash
commit on main) — this is not repeated in each prompt below to save space, but is a hard
constraint on every one of them. Where a prompt’s issue is agent-ops#<n> and it fully resolves
that issue, the PR must close it with a real closing keyword (Fixes #<n>).
Prompt for R-01 — Resolve the live-secret transcript exposure and close the redaction-coverage gap it exposed
Section titled “Prompt for R-01 — Resolve the live-secret transcript exposure and close the redaction-coverage gap it exposed”Bundles: R-01 only · Run after: no prerequisites
Context: agent-ops (Pullwright/agent-ops) is Bash/jq operations tooling for an autonomouscoding-agent pipeline. Its redaction module, lib/redact.sh, is responsible for masking secrets incycle transcripts before scripts/state-sync.sh pushes them to an external state-mirror repository,and before scripts/publish-dashboard.sh publishes dashboard JSON. Two callers currently registerone runtime literal each via redact_add_literal (notify_webhook_url).
The problem: on 2026-09-16, an Implementer stage's `docker compose config` invocation printed alive Vercel token and GitHub App private-key paths into its own session transcript (issue #1627,still open 13+ days later with zero comments). lib/redact.sh's shape-based rules (gh*_, github_pat_,sk-, "Bearer ...") do not match a Vercel token or a filesystem path, and neither is registered viaredact_add_literal, so a recurrence reaching the state-mirror push would not be caught. A follow-upissue (#1752, filed 2026-09-21) scopes the code fix: register VERCEL_TOKEN andVERCEL_AUTOMATION_BYPASS_SECRET via redact_add_literal at their one call site,scripts/preview-deploy.sh (which currently uses VERCEL_TOKEN directly in an Authorization: Bearerheader at line ~281). Separately, docs/DATA-HANDLING.md states operational data is made "safelyshareable for debugging" and that data is "never... shared unless deliberately pushed... by theoperator" — both readings overstate what the mirror-push redaction pass actually guarantees.
The goal (read #1627 and #1752 on GitHub first for the full, authoritative context and anymaintainer comments since this review was written):1. Determine and record whether the exposed Vercel token and GitHub App private-key paths need rotation. This is very likely an owner-only decision (per #1627's own framing) — if you cannot make this call yourself, post a clear comment on #1627 laying out the decision needed and do not block the rest of this work on it.2. Register VERCEL_TOKEN and VERCEL_AUTOMATION_BYPASS_SECRET via redact_add_literal at scripts/preview-deploy.sh's use of them, following the exact pattern notify_webhook_url already uses in scripts/state-sync.sh and scripts/publish-dashboard.sh.3. Update docs/DATA-HANDLING.md's redaction paragraph to state precisely what is and isn't covered: a fixed set of shape rules plus explicitly-registered runtime literals — not a blanket "safe to share" or "never shared" claim — cross-referencing #1752.
Constraints: do not weaken any existing redaction rule. Do not change the redaction pass'sarchitecture (shape rules + explicit registration) — only extend its registered-literal set andcorrect the documentation's claims about it. Follow the file's existing comment style.
Verification: run the existing redaction test suite (test/redact.test.sh, test/state-sync.test.sh,test/publish-dashboard.test.sh) via `bash test/<name>.test.sh` (this repo's suite needs Docker fora fully faithful run via scripts/run-tests.sh — use that if available, otherwise run the specificfiles directly with jq 1.7). Add a new assertion confirming a VERCEL_TOKEN-shaped value is maskedin scripts/preview-deploy.sh's output path. Confirm docs/DATA-HANDLING.md's wording no longer makesan unqualified "safe"/"never shared" claim.
Work cost-consciously. Where your environment supports subagents, delegate the mechanicalredact_add_literal registration and its test to a mid-cost tier (it follows an exact existingpattern). Do the doc-wording edit and the #1627 rotation-decision framing yourself at ahigh-capability tier, since getting a security document's claims precisely right matters more thanspeed here. Verify all delegated work before integrating it.
Deliverable: a pull request that closes #1752 with a real closing keyword, references #1627 withoutclosing it (unless you also completed the rotation/sandboxing decision, which is unlikely to beyours to make), and includes the redaction registration, its test, and the DATA-HANDLING.md wordingfix.Prompt for R-02 — Make the config-table/toc AND changelog-section checks actual required merge gates
Section titled “Prompt for R-02 — Make the config-table/toc AND changelog-section checks actual required merge gates”Bundles: R-02 only (config-table/toc and changelog-section share the identical remediation
pattern and sequencing constraint, so fixing them together avoids doing the same merge_group:
research twice) · Run after: no prerequisites
Context: agent-ops (Pullwright/agent-ops) has three GitHub Actions workflows that check generatedor structured content on every pull request but do not block the merge if they fail:.github/workflows/config-table.yml, .github/workflows/toc.yml, and.github/workflows/changelog-section.yml. None of the three currently appears in the repository'sbranch ruleset (id 18857310 at review time — re-fetch the live ruleset yourself, do not assume thisID is still current) required-status-check list, and none has a merge_group: trigger, which is aprerequisite: without it, a PR sitting in a merge queue would stall for the check's full timeoutbefore ever running it there.
The problem: issue agent-ops#1144 records the owner's own binding decision for config-table/toc:"(1) add a merge_group: trigger to the workflow — ordinary work, do it now; (2) only after thatlands on main, the owner adds the check to the ruleset's required contexts by hand — do not do (2)first." Read #1144 in full for the exact rationale. Issue agent-ops#1916 (filed by this review)documents the identical gap for changelog-section.yml specifically — its own workflow headeralready states the requirement, and scripts/doctor.sh's own acceptance check (requirement 25c)already detects and warns about the gap live.
The goal: add a merge_group: trigger to all three workflows' `on:` blocks (step 1 of #1144'ssequencing, extended to changelog-section.yml). Do NOT attempt step 2 (editing the branch ruleset)yourself — that is an explicit owner-only action per #1144's own text (requirement 36a); your jobends at making all three workflows merge_group:-triggerable.
Constraints: match the merge_group: trigger shape already used by this repo's one check that isboth required and merge_group:-enabled today (tech-debt-register.yml — read it as the referencepattern). Do not change any other trigger behaviour of these three workflows. Do not touch thebranch ruleset itself.
Verification: confirm each workflow file is valid YAML and that its merge_group: trigger fires onthe same events/paths the existing pull_request: trigger does (a config change should trigger bothidentically). If this environment lets you inspect GitHub Actions workflow syntax via `gh workflowview` or similar, use it; otherwise a careful manual read against tech-debt-register.yml's workingexample is sufficient — this is not something you can safely execute end-to-end without merging.
Work cost-consciously. This whole task suits a low-cost tier: it is a mechanical, well-specifiededit to three YAML files following one already-proven pattern in the same repository.
Deliverable: a pull request that closes agent-ops#1916 with a real closing keyword and references(does not close) agent-ops#1144, since #1144's own text reserves closing it for after the ownercompletes step 2.Prompt for R-03 — Fix publish-dashboard.sh’s silent unknown-flag swallowing; add --help to monitor-cycle.sh
Section titled “Prompt for R-03 — Fix publish-dashboard.sh’s silent unknown-flag swallowing; add --help to monitor-cycle.sh”Bundles: R-03 only (both fixes share the exact same established pattern and issue) · Run after: no prerequisites
Context: agent-ops (Pullwright/agent-ops) has three top-level pipeline entry points:agent-cycle.sh, review-cycle.sh, and monitor-cycle.sh, plus scripts/publish-dashboard.sh. The firsttwo, and scripts/check-node-compose.sh, all error loudly on an unrecognised command-line flag andanswer -h/--help with real usage text (see review-cycle.sh's usage() function for the model tofollow). scripts/publish-dashboard.sh and monitor-cycle.sh do not.
The problem, fully scoped already on issue agent-ops#1753 (read it first — it may carry updatessince this review): scripts/publish-dashboard.sh's flag-parsing loop ends with a bare `*) shift ;;`catch-all, so any unrecognised flag — including -h or --help — is silently discarded and a full(possibly minutes-long, GitHub-API-consuming) dashboard rebuild runs anyway. monitor-cycle.shalready errors loudly on an unknown flag (exit 64 with a message) but has no -h|--help case orusage() function at all.
The goal:1. In scripts/publish-dashboard.sh, replace the `*) shift ;;` catch-all with a loud error (print to stderr, exit non-zero) matching monitor-cycle.sh's existing pattern, and add a -h|--help case that prints a usage summary of the script's actual flags (--no-github, --fast, --now, and any others currently supported) and exits 0.2. In monitor-cycle.sh, add a usage() function and a -h|--help case, modelled directly on review-cycle.sh's usage() (synopsis line, one-line description, a pointer to docs/MONITOR-PIPELINE-SPEC.md, per-flag descriptions).
Constraints: do not change either script's behaviour for any currently-valid flag combination.Match each file's existing code style exactly (indentation, quoting conventions, error-messagephrasing already used elsewhere in the same file).
Verification: run `scripts/publish-dashboard.sh --bogus-flag` and confirm it now errors instead ofrebuilding; run `scripts/publish-dashboard.sh -h` / `--help` and confirm it prints usage and exits0 without touching GitHub or the dashboard output. Same two checks for monitor-cycle.sh. Add orextend test/publish-dashboard.test.sh and a monitor-cycle test file with assertions for both newbehaviours, following the suite's existing conventions (see test/review-cycle.test.sh's -h test fora model).
Work cost-consciously. This whole task suits a low-cost tier: it is mechanical, follows an exactpattern already implemented twice in this repository, and needs no design judgment.
Deliverable: a pull request that closes agent-ops#1753 with a real closing keyword.Prompt for R-04 — Refresh the vendored project-review skill’s provenance stamp and add a drift-check
Section titled “Prompt for R-04 — Refresh the vendored project-review skill’s provenance stamp and add a drift-check”Bundles: R-04 only · Run after: no prerequisites
Context: agent-ops (Pullwright/agent-ops) vendors a copy of an upstream Claude Code skill("project-review") for its repository-review pipeline. docs/REVIEW-PIPELINE-SPEC.md documents thisvendored copy's provenance — an upstream commit hash and a "vendored on <date>" claim.
The problem, fully scoped on issue agent-ops#1146 (read it first for the exact current wording andany updates since this review): the provenance stamp in docs/REVIEW-PIPELINE-SPEC.md is stale — itnames a vendoring date/commit that predates at least two real in-repo edits to the skill's owncontent since (made directly in this repository, not re-synced from upstream). No automated checkcatches this drift; the issue has been open, fully scoped, and unassigned for 29+ days across fourconsecutive project reviews.
The goal: (1) correct the provenance stamp in docs/REVIEW-PIPELINE-SPEC.md to accurately describethe skill's current state — either the actual last-synced upstream commit/date if it can bedetermined, or a rephrasing that doesn't make a falsifiable point-in-time claim if the skill hasdiverged enough that "vendored from commit X" is no longer meaningful; and (2) add a lightweightdrift-check, even a minimal one (a PR-template checklist item, or a CI step that flags any committouching the skill's files without a corresponding spec update), so this specific class ofstaleness doesn't silently recur a fifth time.
Constraints: do not change the skill's actual content — this is a documentation-accuracy fix only.Follow docs/REVIEW-PIPELINE-SPEC.md's existing prose style and the "as-built" documentationconvention in AGENTS.md (state what is, not history — put any historical framing in the PR'sChangelog section instead).
Verification: read the actual skill files in the repository and confirm the corrected provenancestamp matches what you find. If you add a CI-based drift-check, confirm it actually fires on atest change to the skill's files (dry-run its logic, or point to an existing similar check in thisrepo's workflows as your evidence it works).
Work cost-consciously. This whole task suits a low-cost tier for the stamp correction itself; use amid-cost tier only if you design a CI-based drift-check from scratch (a PR-template checklist lineis the cheaper, sufficient option if you're unsure).
Deliverable: a pull request that closes agent-ops#1146 with a real closing keyword.Prompt for R-05 — Add an update mechanism, pin floating images/tags, and SHA-pin high-privilege Actions steps
Section titled “Prompt for R-05 — Add an update mechanism, pin floating images/tags, and SHA-pin high-privilege Actions steps”Bundles: R-05 only (agent-ops#1145’s three sub-items plus the new SHA-pinning item share one underlying theme — agent-ops’s own supply-chain hygiene — but are independent enough to land as separate commits within one PR, or as separate PRs if you prefer smaller units) · Run after: no prerequisites
Context: agent-ops (Pullwright/agent-ops) is a Bash/jq project with no package manifest; itssupply chain is GitHub Actions (.github/workflows/*.yml), a Dockerfile(deploy/docker/Dockerfile), and Compose sidecar images (deploy/docker/compose.yaml). TheDockerfile already pins supercronic and shellcheck to an exact release AND verifies a checksum atbuild time — that is the bar the rest of the supply chain does not yet meet.
The problem, tracked on agent-ops#1145 (three items) and agent-ops#1918 (one item, filed by thisreview — read both first):1. No .github/dependabot.yml or Renovate config exists anywhere, so every Actions `uses:` version and Dockerfile ARG is bumped only by hand.2. deploy/docker/compose.yaml pins `tailscale/tailscale:latest` and `containrrr/watchtower:latest` with no version pin at all, unlike every other image reference in the same file.3. Every `uses:` line across all ~10 action-consuming workflow files references a mutable version tag (e.g. actions/checkout@v7), not a commit SHA — including docker/login-action and docker/build-push-action, which hold registry-push credentials on every push to main.
The goal:1. Add .github/dependabot.yml with at minimum a `github-actions` ecosystem entry (per #1145's own scoping comment, which explicitly excludes the Docker base image and curl-fetched binary versions as a separate concern — do not try to solve those with Dependabot).2. Pin `tailscale/tailscale` and `containrrr/watchtower` in compose.yaml to a specific version tag (not `latest`, not necessarily a digest — match the pinning style of every other image reference in the same file).3. Pin docker/login-action and docker/build-push-action (the two steps holding registry-push credentials) to commit SHAs, with a trailing comment noting the tag each SHA corresponds to (e.g. `uses: docker/build-push-action@<sha> # v7`).
Constraints: do not change any image's actual version to something untested — pin to the versioncurrently in use unless you have a specific reason (and evidence) to bump it. Do not attempt toSHA-pin every workflow's every action in this pass — start with the two credential-holding stepsnamed above; a broader SHA-pinning sweep can be a follow-up.
Verification: confirm dependabot.yml is valid (GitHub's schema, `github-actions` ecosystem,sensible schedule). Run `docker compose config` against compose.yaml if Docker is available in yourenvironment to confirm the file still parses after the pin; otherwise a careful manual YAML checkis sufficient. Confirm each SHA you pin actually corresponds to the tag you cite in its comment (lookup the tag's commit on GitHub).
Work cost-consciously. The dependabot.yml addition and the two image-tag pins suit a low-cost tier(mechanical, well-specified). Verifying and pinning the two SHA references yourself (not delegated)is worth the extra care, since an incorrect SHA silently breaks the build/push pipeline.
Deliverable: a pull request that closes agent-ops#1145 and agent-ops#1918 with real closingkeywords.Prompt for R-06 — Paginate publish-dashboard.sh’s open-issues fetch for the Priority display
Section titled “Prompt for R-06 — Paginate publish-dashboard.sh’s open-issues fetch for the Priority display”Bundles: R-06 only · Run after: no prerequisites
Context: agent-ops's scripts/publish-dashboard.sh fetches a repository's open issues via `gh api`to populate a Priority display used by the Co-Ordinator's own ranking logic downstream.
The problem, scoped on agent-ops#1171 (read it first): the fetch uses `per_page=30` with no`--paginate`, so a repository with more than 30 open issues silently truncates the Priority displaypast the 30th-newest. A prior partial fix added a separate total-count display so the panel nolonger *understates* the count, but the per-issue Priority detail itself is still capped.
The goal: make the Priority display reflect the full open-issue set, using the same`api_json_paged`-style helper already proven in this codebase for the identical bug class (seescripts/gather-source-state.sh's `api_json_paged` for the reference implementation) — or, if youdetermine the cost genuinely isn't justified (e.g. performance concerns at scale), explicitlydocument the 30-row cap as an accepted trade-off in the script's own comments instead. Prefer thefix unless you find a concrete reason not to.
Constraints: do not change the Priority field's own computation logic, only how many issues feedit. Match the existing `api_json_paged` helper's calling convention rather than inventing a newpagination approach.
Verification: test against a repository (or a synthetic fixture) with more than 30 open issues andconfirm the Priority display now includes issues beyond the 30th. Add or extendtest/publish-dashboard.test.sh with a fixture asserting this.
Work cost-consciously. This whole task suits a mid-cost tier: it's ordinary implementation againsta clear acceptance criterion, reusing an existing helper.
Deliverable: a pull request that closes agent-ops#1171 with a real closing keyword.Prompt for R-07 — Bound the rest of state-sync.sh’s do_push and wrap gh API calls with a timeout
Section titled “Prompt for R-07 — Bound the rest of state-sync.sh’s do_push and wrap gh API calls with a timeout”Bundles: R-07 only (both halves share the same root cause — unbounded outbound calls holding pipeline state — per agent-ops#1701’s own framing) · Run after: no prerequisites
Context: agent-ops's scripts/state-sync.sh pushes cycle-transcript state to an externalstate-mirror repository under `mirror_lock`. A prior fix (closing #1679) wrapped only theredaction loop inside `do_push` with a `mirror_run_with_deadline` helper, after a real 7-hourproduction wedge incident.
The problem, scoped on agent-ops#1701 and agent-ops#1604 (read both first): `do_push`'s`mirror_init` git fetch, both `rsync -a --delete` passes, and the final `mirror_write push` (a gitpush) all still execute after `mirror_lock` is taken and before any deadline applies — any one ofthem hanging (a DNS stall, a proxy hang) wedges the lock indefinitely, the same failure class#1679 already proved happens on this transport. #1701's own analysis explicitly rules out wrappingeach command individually with `timeout`(1) as insufficient (it would still leave the rsync passeseffectively unbounded in aggregate). Separately, a repo-wide grep of every `gh api`/`gh pr`/`ghissue`/`gh repo`/`gh graphql` invocation (58+ files, including the `gh` shim itself) found zero`timeout`(1) wrappers anywhere, even though `run_claude_stage`, the Vercel preview probes, and thenotify-webhook POST are all already time-bounded.
The goal:1. Wrap the entirety of `do_push`'s lock-holding body (fetch, both rsync passes, the final push) in `mirror_run_with_deadline`, per #1701's own recommended approach — not per-command `timeout`.2. Add retry-with-backoff for transient network failures on the push path, per #1604's spec (up to 3 attempts, 5s/15s backoff, retrying only transient network-class failures, not permanent ones).3. Wrap `gh` invocations in the shared `gh` shim with an outer `timeout`(1) so a hung API call fails the same way a hung Claude stage already does, rather than hanging indefinitely.
Constraints: preserve `do_push`'s existing atomicity guarantees — a partial push must still leavethe mirror in a recoverable state, not a corrupted one. Do not change the redaction loop's ownexisting deadline behaviour, only extend the same pattern to the rest of the function. Choosetimeout durations conservatively (long enough that a normal push never times out; short enough thata genuine hang is caught well inside any watchdog this pipeline already has for the whole cycle —check lib/stage-budget.sh for what that ceiling is).
Verification: run the existing test/state-sync.test.sh suite and extend it with a fixture thatsimulates a hanging git/rsync/gh call (e.g. via a stub that sleeps past the deadline) and assertsthe deadline fires and `mirror_lock` is released rather than held indefinitely. Document your chosentimeout values and the reasoning for them in a code comment, matching this codebase's existingpractice of citing the incident that motivated a constant.
Work cost-consciously. The `mirror_run_with_deadline` wrapping is mechanical (mid-cost tier,following the redaction loop's own proven pattern). Choosing the retry/backoff logic and the timeoutdurations is more judgment-dependent — do that part yourself at a high-capability tier, or have amid-cost-tier subagent draft it and review the result carefully, since getting the failure-recoverylogic wrong here directly risks data loss or a worse wedge than the one being fixed.
Deliverable: a pull request that closes agent-ops#1701 and agent-ops#1604 with real closingkeywords.Prompt for R-08 — Grant the Reviewer stage read/rerun access to CI logs and jobs
Section titled “Prompt for R-08 — Grant the Reviewer stage read/rerun access to CI logs and jobs”Bundles: R-08 only · Run after: no prerequisites
Context: agent-ops's autonomous Reviewer stage (see prompts/reviewer.md) reviews pull requestsraised by the Implementer stage against this repository's own CI. Its sibling, prompts/implementer.md,already documents a route for reading a failing run's log; prompts/reviewer.md does not.
The problem, scoped on agent-ops#1496 (read it first — it carries a concrete incident, PR #1494,where a plausible flake cost a full ~25-minute re-run via an empty commit because the Reviewercould neither read the failure's log nor re-run just that job): the pipeline's GitHub Appinstallation lacks the `actions: write` permission needed to re-run a job, and this environment'segress proxy blocks the Actions log-blob storage host needed to read a log's full content.
The goal: this is primarily a permissions/infrastructure decision, not a code change — #1496proposes granting `actions: read`/`actions: write` to the App installation and allowlisting thelog-blob host through the egress proxy. If you have the access to make these two changes, makethem and verify a Reviewer-stage session can then successfully call `gh run view --log` and `gh runrerun --failed` against a real failing run. If you do NOT have this access (most executing agentswill not — these are owner-level infrastructure changes), your deliverable is instead: (a) confirm#1496's proposed fix is still accurate against the current App installation's permissions and thecurrent proxy configuration, and (b) update prompts/reviewer.md with the exact log-read/rerunprocedure prompts/implementer.md already documents, so the prompt-side half of the fix is ready themoment the permissions land — do not wait for the infrastructure change to write theprompt-side documentation.
Constraints: do not attempt to work around the missing permissions with an unofficial channel(e.g. scraping a log through an unintended route) — wait for the proper grant, or document what'sneeded and stop there.
Verification: if you made the permissions/proxy changes, verify with a real `gh run view --log` and`gh run rerun --failed` call against a genuinely failing run. If you only updated the prompt, verifyits wording is consistent with prompts/implementer.md's existing equivalent section.
Work cost-consciously. The prompt-file documentation update suits a low-cost tier (it's copying anestablished pattern from a sibling file). The permissions/infrastructure decision, if you have theaccess to make it, warrants your own direct attention rather than delegation, since it's asecurity-relevant access grant.
Deliverable: if you completed the full fix, a pull request that closes agent-ops#1496 with a realclosing keyword. If you only completed the prompt-side half, a pull request that references (doesnot close) #1496 and clearly states in its description what remains (the App-permission grant andproxy allowlisting).Prompt for R-09 — Extend the proven jq streaming fix to publish-dashboard.sh’s remaining full-log reads
Section titled “Prompt for R-09 — Extend the proven jq streaming fix to publish-dashboard.sh’s remaining full-log reads”Bundles: R-09 only · Run after: no prerequisites
Context: agent-ops's scripts/publish-dashboard.sh renders a fleet dashboard from a never-rotatedevent log, log.jsonl, which grows for a node's entire lifetime by design (seescripts/rotate-logs.sh's own comment explaining why this file is exempt from rotation). A prior fix(issue #982, applied to lib/crash-loop.sh and siblings) replaced a full-array-materializing`jq -sc`/`jq -R -s` slurp read with a streaming `jq -n 'inputs'` form, cutting parse time by roughly1000x on a real-world log size and — more importantly — capping the reader's peak memoryindependent of log size.
The problem, tracked on agent-ops#1649 (read it first): scripts/publish-dashboard.sh:1110 (linenumber approximate — locate the exact `jq -sc '.' "$events_jsonl"` call in the current file) stilluses the old slurp form. This is not merely a latency concern: it is the documented, measured causeof two real fleet-wide memory-livelock incidents (issues #1620 and #1643, both now closed) becausethe reader's working set is a direct linear function of log.jsonl's size, and that size only grows.A different PR (#1635) fixed an unrelated memory coupling in the same script but did not touch thisline.
The goal: convert scripts/publish-dashboard.sh's remaining full-log `jq -sc`/`jq -s` reads to thesame `-n`/`inputs` streaming form already proven in lib/crash-loop.sh and lib/stage-health.sh.Where a read does more than a flat pass (e.g. a windowed fold like `item_lifecycle_fold`, if itexists in the current file — check), convert it to a streaming fold using `inputs` and `reduce`rather than slurping first, following #1649's own outline for the harder cases.
Constraints: the converted reader must produce byte-identical output to the current slurp-basedreader for the same input (this is a performance/memory fix, not a behaviour change) — write adifferential test if the existing test suite doesn't already give you this guarantee. Do not changelog.jsonl's own format or the rotation policy.
Verification: run test/publish-dashboard.test.sh and confirm all existing assertions still passunchanged. Add a test that measures (or at least demonstrates) that the converted reader's memoryuse no longer scales with an artificially large input log.jsonl fixture, if your environment letsyou measure memory; otherwise, at minimum, confirm output identity between the old and new logic ona realistic fixture before removing the old code path.
Work cost-consciously. The straightforward slurp-to-streaming conversions suit a mid-cost tier(mechanical, following an exact proven pattern). If a windowed-fold case exists and needs a genuinestreaming-algorithm redesign, do that part yourself at a high-capability tier rather thandelegating it, and verify the differential-output test passes before considering it done.
Deliverable: a pull request that closes agent-ops#1649 with a real closing keyword.Prompt for R-10 — Resolve the memory-cgroup unbounded/livelocked remediation gap
Section titled “Prompt for R-10 — Resolve the memory-cgroup unbounded/livelocked remediation gap”Bundles: R-10 only · Run after: no prerequisites
Context: agent-ops runs a fleet of containerized nodes, each with a memory cgroup ceiling meant tobound a runaway process. lib/memory.sh computes a `memory_cgroup_verdict` (e.g. "ok","unbounded", "livelocked") published hourly to the dashboard and the Monitor's own digest.
The problem, tracked on agent-ops#1569 and agent-ops#1639 (read both in full — #1569 in particularcarries five separate investigation comments spanning multiple weeks and nodes; do not re-derivewhat they already establish): a live node has run with no parent memory ceiling and a climbing`oom_kill_count` for an extended period, because the only known fix(scripts/cgroup-parent-setup.sh) explicitly refuses to run inside a container (it checks for/.dockerenv and exits) and needs root/host access that no container in this architecture has. Everyinvestigation so far reaches the same dead end. Separately, #1639 shows cgroup-parent-setup.sh'sown shipped default configuration (`--max 1536m`) produces exactly the "livelocked" shape itssibling detection code now warns about — a self-inconsistency independent of the host-accessquestion. Finally, lib/pager-invariants.sh — the module that pages a human for a defined set ofsustained bad conditions — has no entry for memory/cgroup at all, so this verdict, however bad itgets, never escalates beyond the dashboard.
The goal, in two independent pieces (do the second even if the first isn't yours to decide):1. (Likely owner-only architecture decision — see #1569's own "option 1 vs option 2" framing) Give the pipeline a narrowly-scoped, privileged path to apply the cgroup-parent fix itself, OR decide and document that this genuinely requires host-operator intervention going forward. If this decision isn't yours to make, post your analysis as a comment on #1569 rather than guessing.2. (Independently actionable) Fix cgroup-parent-setup.sh's shipped default so it no longer produces the livelocked shape its own sibling code warns about (#1639's specific, narrower fix — read its comment for the exact number to change). Then add a `memory`/`cgroup` entry to lib/pager-invariants.sh so a sustained "unbounded" or "livelocked" verdict, or a rising `oom_kill_count` trend, pages a human the way this module's other invariants already do — this does not require solving the host-access problem, only making the existing detection actually escalate.
Constraints: do not attempt to give any pipeline stage broader host/root access than the specific,narrow grant #1569's own framing calls for — err on the side of documenting the need rather thanimprovising a workaround with wider blast radius. Match lib/pager-invariants.sh's existinginvariant structure exactly when adding the new entry.
Verification: for the #1639 default fix, confirm the new default no longer reproduces thelivelocked shape under the same conditions the sibling detection code checks for (read that code tounderstand its exact trigger condition, then verify against it). For the new pager invariant, add atest modelled on an existing invariant's test in the pager-invariants test file, confirming it firesunder a synthetic "unbounded"/"livelocked" verdict and does not fire under "ok".
Work cost-consciously. The #1639 default-value fix and the new pager invariant both suit amid-cost tier (each follows an existing pattern in the same files). The host-access architecturequestion is inherently a judgment call for a high-capability tier or the owner directly — do notdelegate it to a low-cost pass.
Deliverable: a pull request. If you completed only the #1639 fix and the new pager invariant, closeagent-ops#1639 with a real closing keyword and reference (do not close) #1569, clearly stating inthe PR description that the host-access decision remains open.Prompt for R-11 — Action agent-ops#1756’s decomposition items; keep pace with god-function growth
Section titled “Prompt for R-11 — Action agent-ops#1756’s decomposition items; keep pace with god-function growth”Bundles: R-11 only (large effort; expect this to be split into several PRs, one per function or region, matching this codebase’s own established decomposition pattern) · Run after: no prerequisites
Context: agent-ops's agent-cycle.sh (the main autonomous work-loop entry point) and severallib/*.sh files have grown a set of oversized "stage-orchestration" functions over successivereview cycles. One of an original seven flagged functions (maybe_run_refiner) has already beenfully decomposed as a model to follow (see its PR, #1258, for the pattern: extracting named helperfunctions from one large function without changing behaviour).
The problem, tracked on agent-ops#1756 (read it first — it was filed specifically to catch up fouroutstanding items and has itself had zero activity since being filed, which this review flags as anotable stall in its own right):1. `run_standdown_checks` (in lib/standdown.sh) has grown to roughly 1,000+ lines (check the current file for the exact figure) and has no tracking issue of its own yet.2. `compute_skip_lists` (in lib/candidate-gather.sh) is similarly oversized with no tracking issue.3. `monitor-cycle.sh`, the newest pipeline entry point, was built with the same undecomposed flat top-level-script shape as agent-cycle.sh, rather than following review-cycle.sh's already-proven decomposed structure (review-cycle.sh keeps its own top-level flow to a small fraction of its total size — read it to see the target shape).4. Issue #1256 still names `coordinator_corroborate_retry_or_fallback`, a function that no longer exists in the codebase (superseded by a redesign in PR #1560) — it needs correcting or closing.Separately, agent-ops#1254 and agent-ops#1255 already track `maybe_run_enabler` and`run_approver_stage` respectively, both of which have grown further since being filed — read thoseissues too if you pick up either function.
The goal: pick ONE of the above items per pull request (this is explicitly meant to be severalsmall, independently-reviewable PRs, not one large one, matching this codebase's own establishedconvention). For a decomposition target, extract named, single-purpose helper functions from theoversized function, following maybe_run_refiner's PR #1258 as your structural model, with zerobehaviour change. For monitor-cycle.sh, decompose its flat top-level regions into named functionsfollowing review-cycle.sh's structure specifically (not agent-cycle.sh's, which is itself part ofthis same defect). For #1256, either correct it to name the actual current god-function that mostresembles its original concern, or close it with an explanation that its target no longer exists.
Constraints: zero behaviour change in any decomposition PR — this is a refactor, not a feature orbug fix. Preserve every existing test's passing status exactly. Do not decompose more than onefunction/region per PR — smaller, reviewable units are the explicit goal here, not anice-to-have.
Verification: run the full existing test suite relevant to the file you touched (e.g.test/standdown.test.sh for run_standdown_checks) before and after your change and confirm identicalresults. For a shellcheck-clean codebase, also run `shellcheck` against your changed file andconfirm it remains clean.
Work cost-consciously. Filing the two missing issues (for run_standdown_checks andcompute_skip_lists, per #1756's own item list) suits a low-cost tier — it's pure issue-writingfollowing an existing template (look at #1254/#1255 as models for the issue body shape). The actualdecomposition work is ordinary refactoring against a clear zero-behaviour-change acceptancecriterion — a mid-cost tier, with your own (higher-capability) review of the diff before it'sproposed, since a subtle behaviour change hidden in a "pure" refactor is exactly the kind of bugthat's easy to miss and costly to ship in a stage-orchestration function.
Deliverable: one pull request per decomposition unit. If your PR fully completes one of #1254,#1255, or a newly-filed issue for run_standdown_checks/compute_skip_lists, close it with a realclosing keyword. Do not attempt to close agent-ops#1756 itself in a single PR — only once all fourof its items are done should it be closed, and that is unlikely to happen in one pass.Prompt for R-12 — Fix README’s crontab duplicated-path typo; widen the org-name-drift sweep
Section titled “Prompt for R-12 — Fix README’s crontab duplicated-path typo; widen the org-name-drift sweep”Bundles: R-12 only (both are single-line documentation fixes in the same file family) · Run after: no prerequisites
Context: agent-ops's README.md documents how to install and operate the pipeline, including a"Keep it fresh" section giving a crontab line to periodically refresh the dashboard. The repositoryitself was transferred from the `Poetic-Poems` GitHub organisation to `Pullwright` (commit`cfa8f0b`), and most references to the old org name were updated at that time.
The problem: (1) the crontab line in README.md's current, non-legacy "Keep it fresh" sectionduplicates the `Poetic-Poems` org segment in its own example path (search README.md for"Poetic-Poems/Poetic-Poems" to find it) — a currently-active install instruction, so copying itverbatim installs a crontab entry pointing at a path that does not exist, and the dashboard'speriodic refresh then silently never fires (cron redirects stderr to a log nobody is told to checkfor this specific failure). (2) Separately, agent-ops#1870 already tracks eight locations acrossREADME.md and both pipeline specs that still say `Poetic-Poems/agent-ops` instead of`Pullwright/agent-ops` — but it does not cite README.md's own intro-sentence link (near the top ofthe file) or one example command in the "legacy, decommissioned" host-install section, both ofwhich also still name the old org.
The goal: (1) fix the duplicated `Poetic-Poems` segment in the "Keep it fresh" crontab line so itmatches the correct install path used elsewhere in the same document. (2) Read agent-ops#1870 forits current scope and exact list of locations; if it hasn't already been widened, fix the twoadditional locations this review found (the intro-sentence link and the legacy-section example)in the same pass, alongside whatever #1870 itself already asks for.
Constraints: change only the specific incorrect path/org-name text — do not otherwise reword thesesections. In the legacy-section example, preserve its existing "this is retired, kept as a record"framing; only the org name in the example itself should change.
Verification: grep README.md and both specs for "Poetic-Poems" after your change and manuallyconfirm every remaining hit is either (a) a correct historical reference explicitly marked as such,or (b) genuinely out of scope (e.g. referring to the `Poetic-Poems/poetic` product repository, whichis a real, still-current org/repo and should NOT be changed — only `agent-ops`'s own former homeunder that org is stale). Do not blanket-replace every occurrence of the string without checkingthis distinction.
Work cost-consciously. This whole task suits a low-cost tier: it is mechanical text correction withone important judgment call (distinguishing agent-ops's own stale org references from legitimate,current references to the separate `Poetic-Poems/poetic` product repository) that is simple enoughto check by reading context around each match rather than requiring escalation.
Deliverable: a pull request that closes the new crontab-typo issue (agent-ops#1917) with a realclosing keyword, and that either closes agent-ops#1870 (if this PR completes its full scope) orreferences it (if #1870's other locations are left for a separate pass).Prompt for R-13 — Add openssl to doctor.sh’s toolchain check
Section titled “Prompt for R-13 — Add openssl to doctor.sh’s toolchain check”Bundles: R-13 only · Run after: no prerequisites
Context: agent-ops's scripts/doctor.sh runs a set of health checks on a node, including a"Toolchain" check that verifies required binaries are present (currently checking for at leastbash, jq, git, curl, perl, python3, rsync, flock, timeout — read the current loop to confirm theexact list). lib/approver-token.sh hard-depends on `openssl` for RS256 JWT signing when minting aGitHub App installation token, and the project's own Dockerfile installs openssl specifically forthis reason (its comment says so).
The problem, scoped on agent-ops#1147 (read it first): doctor.sh's toolchain loop does not checkfor openssl's presence, so a node missing it (e.g. a stripped custom base image, or a bare hostinstall outside the shipped Docker image) only discovers the gap when a credential-minting callfails mid-cycle, rather than getting a doctor warning ahead of time.
The goal: add openssl to doctor.sh's toolchain check, but gate the check on whether it's actuallyneeded — per #1147's own comment, only fail (not merely warn) if the node's configuration has any`merge_autonomy` source set above `human` (check lib/config-access.sh or wherever`merge_autonomy_sources` is already computed for the exact function/variable to reuse — do notduplicate that logic).
Constraints: match the existing toolchain loop's exact structure and messaging style (read a fewof its existing entries for the pattern). Do not make this check unconditionally fatal — a nodethat never approves anything above human autonomy has no need for openssl and should not be brokenby this change.
Verification: run scripts/doctor.sh on a node/container both with and without openssl present (orsimulate its absence, e.g. by temporarily adjusting PATH) and confirm the check fires exactly whenmerge_autonomy is configured above human and openssl is missing, and stays silent otherwise. Add atest to test/doctor.test.sh covering both branches.
Work cost-consciously. This whole task suits a low-cost tier: a one-line addition to an existingloop, gated on an existing helper, following an established pattern.
Deliverable: a pull request that closes agent-ops#1147 with a real closing keyword.Prompt for R-14 — Harden san() (lib/claim-key.sh) against a bare .. path segment
Section titled “Prompt for R-14 — Harden san() (lib/claim-key.sh) against a bare .. path segment”Bundles: R-14 only · Run after: no prerequisites
Context: agent-ops's lib/claim-key.sh defines a `san()` helper used to sanitise identifiers beforethey become part of a filesystem path (e.g. in claim-registry paths built by lib/claim.sh). Itscurrent implementation only replaces `/` with `__` — it does not reject a bare `.` or `..` input.
The problem, scoped on agent-ops#1172 (read it first): every current caller happens to append afilename suffix after calling san() (e.g. `printf 'claims/%s/%s.json' "$(san "$1")" "$(san "$2")"`),which makes a bare `..` currently unexploitable as a path-traversal vector — but this safetyproperty is an accident of caller discipline, not something san() itself guarantees, so a futurecaller that doesn't follow the same pattern could reintroduce a real vulnerability.
The goal: make san() itself reject or neutralise a bare `.` or `..` input (after the `/`→`__`substitution, an input that is now exactly `.` or `..` should be treated as invalid), independent ofwhat any caller does afterward.
Constraints: do not change san()'s behaviour for any currently-valid input — only add handling forthe specific `.`/`..` edge case. Decide (and clearly document in a code comment) whether an invalidinput should cause san() to fail loudly (e.g. return non-zero / print to stderr) or substitute asafe placeholder — prefer failing loudly, consistent with this codebase's general fail-closedsecurity posture (see lib/redact.sh's own header for an example of this project's statedpreference), unless a specific caller genuinely cannot tolerate that.
Verification: add unit tests to a claim-key/claim test file covering san(".") and san("..") inputs,confirming they're now rejected/neutralised, and confirming every currently-passing test for normalinputs still passes unchanged. Trace every current caller (lib/claim.sh,scripts/sweep-orphan-branches.sh, and any others found via grep) and confirm none of them breaksunder the new behaviour.
Work cost-consciously. This whole task suits a low-cost tier: a small, well-specified functionchange with a clear test plan.
Deliverable: a pull request that closes agent-ops#1172 with a real closing keyword.Prompt for R-15 — Deduplicate cfg() between lib/claim.sh and scripts/sweep-orphan-branches.sh
Section titled “Prompt for R-15 — Deduplicate cfg() between lib/claim.sh and scripts/sweep-orphan-branches.sh”Bundles: R-15 only · Run after: no prerequisites
Context: agent-ops has a shared config-access helper, lib/config-access.sh, defining a canonical`cfg()` function used throughout the codebase to read values out of the resolved config JSON. Aprior cleanup (issue #967) deduplicated a different helper (`san()`) between lib/claim.sh andscripts/sweep-orphan-branches.sh by pointing both at a shared lib/claim-key.sh — but left eachfile's own local `cfg()` definition in place, un-deduplicated.
The problem, scoped on agent-ops#1755 (read it first): lib/claim.sh andscripts/sweep-orphan-branches.sh each still define their own copy of `cfg()`, and that copy hasalready begun to diverge from the canonical lib/config-access.sh version — both local copiessuppress stderr (`2>/dev/null`) on the underlying jq call, which the shared version does not do.
The goal: make both lib/claim.sh and scripts/sweep-orphan-branches.sh source the shared `cfg()`from lib/config-access.sh instead of defining their own, after first confirming the `2>/dev/null`difference doesn't matter to either file's actual usage (i.e., check whether either file relies onsuppressing a jq error message it would now see) — if it does matter, document why the localoverride is deliberate instead of removing it.
Constraints: do not change lib/config-access.sh's own `cfg()` behaviour — only change the twocallers to use it. If you find the stderr-suppression difference is actually load-bearing foreither file, stop and document that explicitly rather than silently dropping it.
Verification: run every test file touching lib/claim.sh and scripts/sweep-orphan-branches.sh (grepthe test/ directory for references to either file) before and after your change and confirmidentical results. Specifically check whether any test asserts on stderr output from either file'sconfig reads.
Work cost-consciously. This whole task suits a low-cost tier: mechanical deduplication with onesmall verification step (confirming the stderr-suppression difference is safe to drop).
Deliverable: a pull request that closes agent-ops#1755 with a real closing keyword.Prompt for R-16 — Close small test-coverage gaps
Section titled “Prompt for R-16 — Close small test-coverage gaps”Bundles: R-16 only (git-identity and redact.sh coverage; bundled because both are narrowly-scoped, independent test-writing tasks of similar size best done in one focused pass) · Run after: no prerequisites
Context: agent-ops's lib/git-identity.sh provides `require_git_identity`, called by bothagent-cycle.sh and review-cycle.sh to ensure a git commit identity is configured before anautonomous stage commits anything. Separately, lib/redact.sh is the module solely responsible formasking secrets before cycle transcripts reach an external state-mirror repository or publisheddashboard JSON.
The problem: (1) agent-ops#1148 (read it first) — `require_git_identity` has no test coverageanywhere; five existing test files reference its two environment variables, but only as a fixtureprecondition to let an unrelated scenario proceed past the guard, never testing the function's ownmissing-var-exit-1 path or its `git config --global` writes. (2) agent-ops#1757 (read it first,noting its scope is only half-done) — test/redact.test.sh now exists and coversredact_add_literal's placeholder-escaping fix, but not lib/redact.sh's shape-based rules(patterns matching gh*_, github_pat_, sk-, "Bearer ...", etc.) or the newline-bearing-secretno-op-with-warning behaviour — both still exercised only as a side effect of an unrelatedintegration test's fixture data.
The goal:1. Create test/git-identity.test.sh with direct assertions for require_git_identity: the missing-GIT_USER_NAME/EMAIL early-exit path, and the successful-configuration path (verify it actually calls `git config --global user.name`/`user.email` with the expected values).2. Extend test/redact.test.sh with direct assertions for each of lib/redact.sh's shape-based rules (one test per pattern, using a representative fake secret matching each shape) and for the newline-bearing-secret warning behaviour, independent of any state-sync.sh/publish-dashboard.sh integration fixture.
Constraints: follow this suite's existing test-file conventions exactly (see recent additions liketest/redact.test.sh or test/stage-health.test.sh for the current house style — a plain bash testfile with assert helpers, one scenario per assertion block, a comment explaining the failure modeeach assertion guards against).
Verification: run both test files directly (`bash test/git-identity.test.sh`,`bash test/redact.test.sh`) and confirm all assertions pass. Confirm the new redact.test.shassertions would actually fail if you temporarily broke the corresponding shape rule (a quicksanity check that they're not vacuously true).
Work cost-consciously. This whole task suits a low-cost tier: well-specified, mechanicaltest-writing against clearly-defined existing behaviour, following an established house style.
Deliverable: a pull request that closes agent-ops#1148 with a real closing keyword. For #1757,close it only if your redact.test.sh additions now cover every shape rule and the newline case infull — otherwise reference it and note what remains.Prompt for R-17 — Land the two ready one-line flaky-test fixes
Section titled “Prompt for R-17 — Land the two ready one-line flaky-test fixes”Bundles: R-17 only (both are trivial, already-specified one-line changes in the test suite) · Run after: no prerequisites
Context: agent-ops's test suite (test/*.test.sh) has two tests that are self-documented asoccasionally flaky, each with a complete, already-specified one-line fix sitting on its trackingissue, unpicked for over a week in both cases.
The problem:1. agent-ops#1205 (read it for the full context): test/publish-dashboard.test.sh line ~1277 calls `run_window 20`; the issue's own comment specifies changing this to `run_window 30` to give the underlying timing-dependent assertion more margin.2. agent-ops#1722 (read it for the full context): test/state-sync.test.sh line ~1657 asserts `mirror_lock_holder_age_s` equals exactly "0"; the issue's own comment specifies widening this to tolerate a value of 0 or 1 (a `{0,1}` pattern or equivalent), since the assertion can legitimately observe either value depending on exact timing.
The goal: apply both fixes exactly as specified in their respective issues. Do not investigatefurther or redesign either test — both issues already contain a complete, reviewed specification;your job is to execute it.
Constraints: change only the specific line each issue names. Do not touch any other part of eithertest file.
Verification: run both test files (`bash test/publish-dashboard.test.sh`,`bash test/state-sync.test.sh`) multiple times in a row (e.g. 5-10 iterations) if your environmentallows, to gain some confidence the flake is actually addressed rather than just silenced. Confirmno other assertion in either file regresses.
Work cost-consciously. This whole task suits a low-cost tier: both fixes are pre-specified,one-line changes with no design judgment required.
Deliverable: a pull request that closes both agent-ops#1205 and agent-ops#1722 with real closingkeywords (a single PR covering both is fine, since both are trivial and unrelated to each otheronly in the sense that combining them saves overhead, not because they interact).Prompt for R-18 — Clean up fixture identity hygiene
Section titled “Prompt for R-18 — Clean up fixture identity hygiene”Bundles: R-18 only · Run after: no prerequisites
Context: agent-ops's test suite includes fixtures (test data representing GitHub users, actors,assignees, etc.) used across many test files. Some of these fixtures use the project maintainer'sreal GitHub usernames (warwick / warwickallen / Warwick-Allen) as literal test values, rather thansynthetic placeholder identities.
The problem, scoped on agent-ops#1174 (read it first — it has a scoping comment from 2026-09-05specifying the exact replacement approach): 35 test files plus one dashboard-data fixture currentlyuse the maintainer's real username as a fixture value (a count that has grown, not shrunk, sincethis issue was filed, as new tests kept adding the same real value instead of a placeholder). Whilelow-sensitivity (an already-public GitHub identity), this is real personal data accumulating incommitted fixtures.
The goal: replace the real username occurrences in test fixtures with a synthetic placeholderidentity (e.g. a clearly-fake login/actor/assignee/by value), per #1174's own specified approach.Grep for warwick/warwickallen/Warwick-Allen across test/ (and any dashboard-data fixture) to findevery occurrence before starting, so you fix all of them in one pass rather than partially.
Constraints: use a single, consistent synthetic identity across all the fixtures you change (unlessa specific test genuinely needs multiple distinct fake identities — check for that case). Do notchange any assertion's actual logic — only the literal fixture value.
Verification: run the full set of affected test files after your change and confirm everyassertion that referenced the real username value was updated consistently (an assertion checkingfor "warwick" that you missed would now fail against your new placeholder — treat any such failureas a signal you missed a spot, not something to work around). Re-grep for the real usernames acrosstest/ afterward and confirm zero remaining hits (excluding any genuinely-justified exception youdocument explicitly).
Work cost-consciously. This whole task suits a low-cost tier: mechanical find-and-replace across awell-defined set of files, with straightforward verification (existing tests either still pass withthe new placeholder or they don't).
Deliverable: a pull request that closes agent-ops#1174 with a real closing keyword.Prompt for R-19 — Developer-experience polish (.editorconfig)
Section titled “Prompt for R-19 — Developer-experience polish (.editorconfig)”Bundles: R-19 only · Run after: no prerequisites
Context: agent-ops is a Bash/jq/Markdown/JSON project with a consistent 2-space-indent, LF-line-ending, final-newline convention throughout, enforced only by convention/inspection today, not byany machine-readable declaration.
The problem, scoped on agent-ops#1758 (read it first — it deliberately narrows scope to just this):no .editorconfig file exists at the repository root, so a newcomer's editor has no automaticdeclaration of the repo's already-consistent formatting convention. #1758 explicitly defers a.shellcheckrc and a Makefile/scripts-index as separate, out-of-scope concerns — do not add either ofthose in this pass.
The goal: add a root .editorconfig declaring, at minimum, indent_style, indent_size, end_of_line,and insert_final_newline, matching the convention already followed throughout the repository (2spaces, LF, final newline present) — sample a handful of existing files across lib/, scripts/,test/, and *.md to confirm the convention before writing the file, rather than assuming.
Constraints: keep the .editorconfig minimal, matching #1758's own scoping — do not addlanguage-specific overrides or opinionated rules beyond what's already the repo's actual, observedconvention.
Verification: run an EditorConfig checker if one is available in your environment (e.g.`editorconfig-checker`) against a sample of existing files and confirm no false "violations" arereported for files that already follow the stated convention — if a widespread false-positiveshows up, it likely means your .editorconfig doesn't accurately describe the real convention;adjust it rather than the files.
Work cost-consciously. This whole task suits a low-cost tier: a small, well-specified configurationfile addition with no code changes.
Deliverable: a pull request that closes agent-ops#1758 with a real closing keyword.Prompt for R-20 — Decompose the dashboard’s renderBody(); extract a shared paginated-fetch helper
Section titled “Prompt for R-20 — Decompose the dashboard’s renderBody(); extract a shared paginated-fetch helper”Bundles: two independent sub-tasks bundled into one prompt only because both are Low-severity, Medium-or-less effort dashboard/tooling polish with no interaction between them — treat them as two separate PRs even though they’re described together here · Run after: no prerequisites
Context: agent-ops's dashboard/index.html is a single-file static HTML/JS dashboard. ItsrenderBody() function has grown across three consecutive review cycles (462 -> 538 -> 552 lines)despite being flagged every time, and is now roughly 3.5x the size of the next-largest function,landingsPanel() (~159 lines), which already follows the file's established `*Panel()` naming/structure convention. Separately, across lib/ and scripts/, at least 13 files independentlyreimplement the same paginated `gh api ".../comments"` / `.../reviews` / `.../timeline``--paginate` fetch pattern, each with its own copy of the same caveat comment about `--jq` runningonce per page.
The problem: agent-ops#1173 (read it first) scopes the renderBody() decomposition: extract eachbanner group currently inlined in renderBody() into its own named function, mirroring the file'sexisting `*Panel()` convention (e.g. `landingsPanel()`). agent-ops#1919 (filed by this review;read it for the full file list) documents the paginated-fetch duplication acrosslib/approver.sh, lib/candidate-select.sh, lib/enabler.sh, lib/landing.sh,lib/reconciliation-gate.sh, and eight scripts/*.sh files.
The goal (two separate pull requests):1. Decompose renderBody() by extracting each distinct banner group into its own named function (e.g. `reviewStageHealthBanner()`, `mirrorRebuildBanner()`, etc. — name each after what it renders, matching existing naming in the file), leaving renderBody() itself as a short sequence of calls to these new functions plus whatever top-level layout logic doesn't belong in any single banner.2. Extract a thin shared `gh_paginated_fetch` (or similarly-named) helper into lib/github-limit.sh (already the shared home for gh rate-limit handling) covering the comments/reviews/timeline fetch shape specifically — the three endpoints repeated most often per #1919 — and migrate at least the files #1919 lists to use it instead of their own inline implementation. If any file's exact filtering/field needs don't fit the shared helper cleanly, leave it using its own implementation and note why in the PR description rather than forcing a bad abstraction.
Constraints: for renderBody(), zero visual/behavioural change to the rendered dashboard — this is apure refactor. For the paginated-fetch helper, preserve each migrated call site's exact currentfiltering/field-selection behaviour; do not change what any of them fetches, only how the paginationloop itself is implemented.
Verification: for renderBody(), open the dashboard (or its test harness, if one exists) before andafter your change and confirm pixel-identical/structurally-identical output for a representativedata fixture. For the paginated-fetch helper, run every test file covering a migrated call sitebefore and after and confirm identical results; add a focused unit test for the new helper itselfcovering the multi-page case.
Work cost-consciously. Both tasks suit a mid-cost tier: mechanical extraction following an existingconvention (the `*Panel()` naming pattern; the existing `_reconciliation_gate_comments` paginationidiom as the helper's starting template), with a clear identical-output verification bar. Neitherrequires high-capability-tier judgment, but do review the extracted diff yourself before proposingit, since a subtle scoping bug in a "pure" extraction is easy to introduce and easy to miss inreview.
Deliverable: two pull requests. The first closes agent-ops#1173 with a real closing keyword. Thesecond closes agent-ops#1919 with a real closing keyword (or references it if you migrate onlysome of the listed call sites, stating clearly in the PR description which remain).