Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions projects/hipdnn/tools/ai/skills/hipdnn-deep-review/RUNBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,14 @@ its output sweep ([lanes/leaks.md](lanes/leaks.md); output `$EVIDENCE/r<N>/lanes
On a new head, start round N+1 at *Pin and intake*. In *Orient*, copy the previous round's
`orient/` and `CONTEXT.md`; scout an area the change adds and every area whose file's
`Describes` sha is not the new `$BASE` (the copied file is its prior file), then `SYNTH` again.
The affected files differ between the heads and belong to either round's change:
The affected files differ between the heads and belong to either round's change. The previous
round's file list comes from git, so a seeded round folder without `files.txt` works too:

```bash
. <evidence dir>/r<N>/env.sh
git -C "$CLONE" diff --name-only --no-renames <old-head> <new-head> | sort -u |
comm -12 - <(sort -u "../r<N-1>/files.txt" files.txt) > affected.txt
comm -12 - <(git -C "$CLONE" diff --name-only --no-renames <old-base> <old-head> |
cat - files.txt | sort -u) > affected.txt
```

Findings whose `Where` is in `affected.txt`, and every `process` finding, are affected. Re-run
Expand All @@ -353,6 +355,16 @@ Re-run `DRIFT` whenever the round's `drift.txt` says `Trigger: yes`: the target
Re-verify every affected `OPEN` or `UNVERIFIED` finding. A lane not re-run carries forward
(Coverage and Lanes rows copied, marked `carried from r<M>`).

**Continuing a published review.** Earlier rounds may exist only as a published record that
someone else ran (`prior:<dir>`): a review folder holding `LEDGER.md` and `r<k>/` rounds,
without `PIN.md` or `files.txt`. Before *Pin and intake*, copy its `LEDGER*.md` and every
`r<k>/` into an empty `$EVIDENCE`, and leave the copies unchanged. `round:` then defaults to
the next round. Take the previous head and base from the record's round table or the newest
`REPORT.md` header. Run `ledger.py counts "$EVIDENCE" <k>` on the newest round. For each
Open questions row the PR has since answered, ask the user and move the answer into Decisions,
or the new round cannot reach `Closure: CLOSED`. `(not published)` cells in the copies are
redactions; the scripts accept them.

On the same head, after a decision, approval, new evidence or to re-run a `FAILED` lane, reopen the round at *Merge and
verify*: record the decision, run the follow-ups, re-verify what it affects and repeat
*Synthesize*, updating the round's files in place.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: hipdnn-deep-review
description: "Multi-agent deep review of a hipDNN or dnn-providers PR, branch or commit range. Scouts map each affected area, focused reviewer lanes run in parallel, every finding is verified by source proof, reproduction or mutation, and a ledger carries findings across rounds until no blocking or important one stays open. For a PR body or a quick single-pass review, use hipdnn-pr-quality."
argument-hint: "[<PR URL or number> | branch:<name> | <base>..<head>] evidence:<dir> scratch:<dir> [clone:<dir>] [intent:<file>] [terms:<file>] [knowledge:<dir>] [round:<N>]"
argument-hint: "[<PR URL or number> | branch:<name> | <base>..<head>] evidence:<dir> scratch:<dir> [clone:<dir>] [intent:<file>] [terms:<file>] [knowledge:<dir>] [round:<N>] [prior:<dir>]"
allowed-tools: Bash, Read, Write, Edit, Grep, Glob, Task
---

Expand Down Expand Up @@ -35,6 +35,7 @@ Ask for what is missing; record it in `PIN.md`:
| `evidence:<dir>`, `scratch:<dir>`, `clone:<dir>` | `$EVIDENCE` outside the product tree; disposable `$SCRATCH`; optional clone (default `$SCRATCH/clone`) |
| `terms:<file>`, `knowledge:<dir>` | Optional private terms, one fixed string per line, outside the repository; optional `$KNOWLEDGE` store |
| `round:<N>` | Default: one more than the highest `$EVIDENCE/r<k>/`; 1 when none |
| `prior:<dir>` | Optional published record of earlier rounds that `$EVIDENCE` lacks (`LEDGER.md` and `r<k>/`); [RUNBOOK.md](RUNBOOK.md) *Iterate* seeds `$EVIDENCE` from it |
| Agent limits | Ask the user or the host for `Agents:` (maximum concurrent agents), `Cores:` (CPU cores for builds and tests) and `Mutation:` (a host recipe for mutating a built tree, or none); the skill assumes no values. They go into `dispatch-context.md` ([RUNBOOK.md](RUNBOOK.md) *Fan out*) |
| Scope notes | Ask the user for scope notes the change's description does not state, such as areas being deprecated, or `none`. Free text; it goes into `dispatch-context.md` as `Scope:` and is informational unless it says "do not file findings in <area>" ([lanes/common.md](lanes/common.md) *Rules*) |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ whose Checked-no-finding states `Sweep: clean`, or whose Findings list each coun
|---|---|
| Every commit (message, author, committer, added lines); the final diff (added lines with line numbers at `$HEAD`, changed paths) | `history` and `git diff -U0`, below |
| PR title, description, reviews, comments, inline threads | `pr/` in the round directory (PR targets only): `branch.txt`, `pr-text.txt`, `pr-comment.txt`, `pr-inline.txt`. No PR: the commit messages are the future description, and `intent.md` stands in for it |
| Earlier heads | Round N > 1: `history "$BASE..<previous head>"` too, the head in the previous round's `PIN.md` |
| Earlier heads | Round N > 1: `history "$BASE..<previous head>"` too, with the `Previous head` from this round's `PIN.md` |

`history` covers every commit: a leak removed later is still published. `--diff-merges=remerge` (git 2.36+; older `--cc`) includes
what merge commits introduce. `$L/pub.content` holds one published line per line; the parallel `$L/pub.anchor` holds
Expand Down
Loading