AGENT SKILL

address-gh-review

Use when a reviewer left comments on a GitHub PR of this repository and they need working through ("I added comments", "address the review", "обработай комменты", "ответь на ревью").

License 许可
Apache-2.0
最近更新
2026-10-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
address-gh-review
description
Use when a reviewer left comments on a GitHub PR of this repository and they need working through ("I added comments", "address the review", "обработай комменты", "ответь на ревью").

03 SKILL.md 正文

Read harness/core/README.md, the active runtime adapter and, when present, harness/project/skills/address-gh-review.md (this skill's project specifics) before following this procedure. harness/project in this skill means the overlay in use: $HARNESS_PROJECT when set; python3 harness/core/scripts/project.py overlay prints it. Resolve task artifacts with python3 harness/core/scripts/task_state.py locate <task>; use the returned absolute directory, including for an existing legacy run. <run-dir> below means that resolved directory. Reuse existing user authorization; publish comments or reviews only when the user explicitly requested it or explicitly invoked a skill authorizing that action.

Dispatch authority: resolve every orchestrator/worker model and effort from harness/core/adapters/models.json deep-merged with the active harness/project/models.json (or $HARNESS_PROJECT/models.json). Record profile, model and effort. Never select from personal memory or saved preferences; router shadow is advisory and cannot replace the actual static profile choice. Lane progress goes to <report>.progress.md; write final <report> only at the end. Requests use <run>/lanes/<work>.flag.md or tripwire.py flag; never type into another pane.

Address a GitHub PR review

The unit of work is the whole review round, not one comment: one push and one reply per thread, after the full pipeline is green again. A reply pointing at a half-tested push is worse than no reply. Cap: one round per invocation; stop and report after it.

Efficient testing authority

Apply harness/core/rules/efficient-testing.md to this workflow's tests and recommendations. Choose in-process fakes first, then one shared long-lived test service with owned logical isolation, then per-run services, then per-test containers only for a written correctness reason. Reuse expensive setup with complete content-hash keys. Keep build/result/dependency/ image caches enabled; bypass only a named test/step for an input that its cache cannot see. Run affected cases/packages first locally; the full suite remains required in CI/pre-PR. Heavy gates/evals/reviews use harness/core/scripts/load_guard.py for adaptive load/memory admission, never fixed slots; targeted runs and nested admitted work do not wait. Infrastructure changes name the isolation boundary, cleanup and measured cold/warm wall/resource cost. Never replace required real paired model measurements or real-service boundary coverage with a fake.

1. Collect

gh pr view --comments misses inline threads. Read all three sources (gh api fills in {owner}/{repo} from the current checkout):

gh api repos/{owner}/{repo}/pulls/<n>/comments --paginate \
  --jq '.[] | {id, user: .user.login, path, line, original_commit_id, in_reply_to_id, body}'
gh api repos/{owner}/{repo}/pulls/<n>/reviews --jq '.[] | {id, user: .user.login, state, body}'
gh api repos/{owner}/{repo}/issues/<n>/comments --jq '.[] | {id, user: .user.login, body}'

A thread root has in_reply_to_id: null; skip threads that already carry the author's reply. line refers to original_commit_id: read git show <original_commit_id>:<path> before mapping it to the current head.

2. Triage and plan

Read the code under each thread, then one verdict: take, reject (with the reason), investigate.

  • "Verify with <agent>" (perf, security, design) → dispatch that agent first, in the background, with file:line anchors and the exact question; it is the long pole.
  • A "how can this happen" question is a design challenge: answer with facts; when the answer is "it cannot", the fix is fail-fast, not a tolerated branch.
  • "Remember it as a gotcha" / "add a rule" → harness/project/rules/*.md for a path-scoped rule, the project's map (AGENTS.md) for a repo-wide one, a QA gotchas file for a QA check (harness/project/references/qa-gotchas.md; a check that holds for any stack is proposed to the core instead, never edited into harness/core in place) — and apply it to this PR's code. Log the harness change in harness/project/HARNESS_LOG.md.
  • "Do X everywhere" means the whole repo, in its own commit.

Write the plan to <run-dir>/review-round-<k>.md: one row per thread — comment id, full comment text, verdict, change, the test that proves it.

3. Fix

New commits on the branch (conventional messages), or git commit --fixup <sha> + GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash <base> when the user prefers a clean history. Nothing leaves the machine yet.

4. Re-run the whole pipeline

Not only the tests the fixes touch: every gate from submit-pr step 1, the panel lenses on the round's delta (triage their findings like the reviewer's), new screenshots from the ui-design-verifier when the change reaches the screen, and a re-check of the manual test plan and the PR body against the new diff.

5. Push, then reply

Push (--force-with-lease after a rebase), update the PR body, post the round's verdict comment (Taken / Rejected / Deferred). When CI is green, reply in every thread:

gh api -X POST repos/{owner}/{repo}/pulls/<n>/comments/<id>/replies -F body=@reply.md
  • Verdict first on its own line ("Done —", "Fixed —", "Kept —"), then the evidence: commit, number, or file:line. Plain English, every fact kept.
  • Never resolve a thread; the reviewer resolves it after reading.
  • Reply to the author's own self-review threads too.

6. Report

One line per thread with its verdict, then CI state, new screenshots and the PR link.

04 同仓库更多 Skills

pharosone
pharosone/dev-harness

deploy-app

Use when the fixture app has to be deployed to its staging host.

★ 0
pharosone
pharosone/dev-harness

submit-pr

Use when the user asks to open, update or finalize a pull request for work in this repository ("сделай PR", "открой PR", "submit", "push and open a PR"). Never on its own initiative.

★ 0
pharosone
pharosone/dev-harness

pharos-investigate

Use when something must be understood before anyone acts: a bug whose cause is not known yet (intermittent, data-dependent, only in one environment, a fix that did not hold), research of data or options for a decision, or understanding how unfamiliar code really works. On "разберись", "почему", "найди причину", "исследуй", "что выбрать", "investigate", "root cause".

★ 0
pharosone
pharosone/dev-harness

pharos-discover

Use when a feature, endpoint, screen or behaviour change in this repository needs requirements, alternative approaches and an approved specification with TDD units; also when a spec lacks its Requirements interview, its Placement, its Taste gates or a section a project interview row requires.

★ 0
pharosone
pharosone/dev-harness

pharos-dev

Use when implementing, fixing or refactoring anything in this repository beyond a one-line edit — executing an approved spec, a feature, a bugfix — and on follow-ups ("сделай", "реализуй", "исполни спеку", "почини", "продолжи", "перезапусти ревью", "redo the QA"). A review-only request runs the review step alone.

★ 0
pharosone
pharosone/dev-harness

manual-test-plan

Use when a PR in this repository needs its hand-executable verification plan written or executed ("test plan", "план ручного тестирования", "lets start test plan", "начнём тест-план"); submit-pr invokes it for every PR.

★ 0