feat(repo): make an /archon-pr-review run identifiable, and give it an unattended mode - #367
Conversation
…n unattended mode An /archon-pr-review run left no trace that a machine ran it, and it could not run without a human. Its comments arrive under the maintainer's own login, carry no marker, and are told apart only by a heading 24 shapes and 40 pull requests wide. So the night shift's first mutating gate could not be written, and the command could not be called with nobody present. Changes: - Add a "Two markers, written by two actors" section: the run's best-effort `comprehensive-review-report` marker and the command's own `archon-pr-review-verification` marker, sharing no leading token. - Record that the workflow posts PR comments and never a PR review, and give the first-line listing query that finds either marker, with the cmd.exe quoting caveat that query carries. - Step 3: name the human path as the default, the unattended path as the one exception, and stop a caller that cannot state an authorisation. - Step 4: ask the run to mark every comment it posts and to print a `dimensions-run:` / `dimensions-not-run:` roll call in five fixed spellings, on a produced-an-artifact definition. - Step 6: select the run's two comments by marker, five fixed strings for what the marker fails to deliver, and one verification comment carrying facts and labelled claims — never a verdict. - Allow the Write tool, which posting the comment by `--body-file` needs. Fixes #357
There was a problem hiding this comment.
Pull request overview
Updates the /archon-pr-review command documentation to make archon-comprehensive-pr-review runs identifiable on a PR and to support an unattended dispatch path (for night-shift) while preserving an auditable trail.
Changes:
- Adds a “two markers, two actors” scheme (run-requested markers + command-written verification marker) to make runs detectable in PR comments.
- Introduces a strictly-scoped unattended path that requires an explicit authorisation statement and carries it into the verification comment.
- Expands Step 6 to select run output by marker (not headings) and to post a single structured verification comment via
--body-file.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Reviewer flagged the sentence treating part=review and part=fixes as one marker; fixes is one character shorter, so the count only holds for the longer of the two.
⚡ Self-Fix Report (Aggressive)Status: COMPLETE Fixes Applied (1 total)
View all fixes
Tests Added(none — prose-only change, no code or tests touched) Skipped (0)(none — all findings addressed) Suggested Follow-up Issues(none) Validation✅ Lint/format ( Self-fix by Archon · aggressive mode · fixes pushed to |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (6)
.claude/commands/archon-pr-review.md:163
- Same as above: this jq slice uses
[0:100], which can truncate the verification marker when the 32-char run id and 40-char SHA are present. Use a wider slice so the marker (and itshead=) is fully visible.
gh pr view <n> --repo unic/unic-agents-plugins --json comments --jq ".comments[] | (.body | split(\"\n\")[0])[0:100]"
.claude/commands/archon-pr-review.md:219
- Right after the template, clarify that on the human path the entire
authorisation:line should be omitted (not left blank or left as a placeholder), so the field-format expectations remain unambiguous.
`<run-id>` is the 32-character ID Step 5 read from `archon workflow status`. `<post-review-sha>` is `headRefOid` read **after** the run left the active list. `authorisation:` appears on the unattended path only; every other field is always present, and where its source did not deliver it carries one of the five strings above.
.claude/commands/archon-pr-review.md:216
- The template shows an
authorisation:field, but it’s only valid on the unattended path. As written, it’s easy to copy/paste the template on the human path and accidentally include placeholder/empty authorisation, which would violate the strict field-format rules below. Make the template line explicitly say to omit it on the human path.
authorisation: <the caller's statement from Step 3, copied verbatim>
.claude/commands/archon-pr-review.md:24
- The introductory description still says the workflow “posts a review comment to the PR”, but the updated write-surface below now documents that it posts two comments (review + auto-fix report). Updating the intro avoids readers missing the second comment when scanning the top of the file.
- **Posts a `gh pr comment`** with the synthesised review, and a second one with the auto-fix report.
.claude/commands/archon-pr-review.md:53
- The explanation for the 100-char slice width only considers the run’s
comprehensive-review-reportmarkers (94 chars), but the verification marker you add in Step 6 is longer (~121 chars with a 32-char run id + 40-char SHA). Update the explanation to match the wider slice so readers don’t assume 100 is sufficient for all markers.
This issue also appears in the following locations of the same file:
- line 216
- line 219
In that output, find `archon-pr-review-verification` for this command's own comment and `comprehensive-review-report` for the run's. The width is 100 because the longer of the run's two markers (`part=review`) is 94 characters and ` part=` opens at column 79 — an 80-character slice shows the marker and hides which half of the run wrote it.
.claude/commands/archon-pr-review.md:50
- This jq slice uses
[0:100], which can truncate the verification marker when the 32-char run id and 40-char SHA are present (the line is ~121 chars). Use a wider slice so the full marker, includinghead=, is visible in the listing output.
This issue also appears on line 163 of the same file.
gh pr view <n> --repo unic/unic-agents-plugins --json comments --jq ".comments[] | (.body | split(\"\n\")[0])[0:100]"
Fixes #357.
Why
An
/archon-pr-reviewrun left no trace that a machine ran it, and it could not run without a human.Its two comments arrive under the maintainer's own
ghcredential, carry no HTML marker, and are told apart only by a heading. That heading identifies nothing: 120 of this repository's 135 pull-request comments open with one, in 24 distinct shapes, and# 🔍 Comprehensive PR Reviewspans 40 pull requests of which only five ever carried anarchon-comprehensive-pr-reviewrun. PR #307 carries it twice, from two different workflows. A check keyed on a heading anyone can type is a check a paste can satisfy — the shapedocs/process/ai-development.md:51names.The workflow also posts no PR review, so nothing reading
gh pr view --json reviewssees a run at all. And Step 3 always asked for a go-ahead, which is right for a workflow that force-pushes and commits fixes, but makes the command unusable by a caller with no human present.Both halves block the night shift: #358's Gate 1 cannot be written until a run is identifiable, and the command cannot be called at all until it has a second mode.
What changed
One file:
.claude/commands/archon-pr-review.md.<!-- comprehensive-review-report head=<sha> part=review|fixes -->and writes its own<!-- archon-pr-review-verification run=<id> head=<sha> -->. The two share no leading token, so a reader matching one never matches the other. The section records that the workflow posts comments and never a review, gives the query that lists how every comment opens, and names both markers as the strings to find in that output.night-shiftskill. A flag would record nothing — an agent can grant itself a flag — so the path asks the caller to state the authorisation covering this PR, and that statement is copied into the verification comment. A caller with no authorisation to state stops and dispatches nothing.dimensions-run:anddimensions-not-run:in the review comment, on a produced-an-artifact definition, in exactly five spellings —code-review,error-handling,test-coverage,comment-quality,docs-impact. Produced-an-artifact is the definition that separates three states a looser one merges: a clean dimension, a dimension whose agent died silently, and one that never ran.synthesizefires attrigger_rule: one_success, so the review comment's literal5 specialised agentssurvives four agents dying — which is why the roll call is asked for rather than read off the count.unknown,0andnoneare barred from standing in for any of them. The comment carries facts and labelled claims in a fixed field format — name, colon, one space, value, with the source on its own line beneath — and states no overall verdict.ci:is the one exception, quoted fromgh pr checksand labelled as CI's word.allowed-toolsgainsWrite, which posting the comment by--body-fileneeds.What this does not do
It ships an ask, not a proof. No run has ever been asked for a marker and none has printed one, so at
9da6b23no comment on any of the five reviewed pull requests carries it. The proof is #359's supervised rehearsal, and #358's Gate 1 stays unarmed until #359 answers. Two maintainer actions on #358 and #359 are recorded in the issue body; this PR does not edit either ticket.Verification
The 5 infos are pre-existing and unrelated (unsafe-fix suggestions in
apps/claude-code/unic-pr-reviewtests).Repo-scoped documentation change: no plugin version bump, no CHANGELOG entry, no
LICENSEfile touched.Every shell snippet added here is portable to
cmd.exe— no single-quoted arguments, no$VAR, no external program reached through a shell pipe. One labelled exemption: the comment-listing filter holds the inner string literal"\n", because reaching a comment's first line takessplit("\n")and jq offers no literal-free way to write it. The file carries the caveat that this quoting is not verified oncmd.exe.🤖 Generated with Claude Code