Repository navigation
Make the PR follow-through loop act on rule violations - #76
Merged
Merged
Conversation
After each push the agent reads the head's `rules` section from `inspect metadata`, checks each violation against the rule and cited lines, and fixes it or says why it was left. not_checked, unreadable, or an older CLI without `rules` are unassessed, never passing. Agents never disable rules. Replaces the "pass/fail unavailable" wording. Task: tsk_034jIRXBetVPbMSHo3Votz Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stored rule's verdict names "ArchDev rules" as its source file, so the agent reads it from `rules --repository` rather than a repository file. Task: tsk_034jIRXBetVPbMSHo3Votz Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rob-archastro
force-pushed
the
skill/pr-loop-rule-violations
branch
from
October 20, 2026 23:53
052c982 to
889f275
Compare
rob-archastro
marked this pull request as ready for review
October 20, 2026 23:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review on ArchCode
Epic: Repo rules: instruction-file verdicts on PRs and mined rule candidates
Task: The PR follow-through loop acts on rule violations
Problem and author intent
Bruno's #68 added the Pull Requests loop. After each push the agent reads CI and the server risk assessments, then fixes or explains what it finds. The server also runs a repository-rule check on every PR head, but agents can't use it:
inspect metadatareturned no rule results until firstlanding #19177 / #19197, which are not released yet.monitor.mdsays a PR's per-rule pass/fail verdict is unavailable and tells agents to report it that way.The goal is for the loop to treat rule violations the way it treats risk concerns:
What changed
archdev/SKILL.md→ Pull Requests. A new step 3: read therulesviolations, check each against the rule file and the cited lines, fix it if it holds and is in scope, otherwise explain it in the summary, and never disable a rule yourself. The loop now covers CI, risk and rules. The finish line now includes the violations that were fixed or left, with reasons.not_checked,unreadable, or a CLI with noruleskey all count as unassessed, never passing.archdev/SKILL.md→ Read PR risk, scope, and rules. It now saysinspect metadatacarries the head'srulesverdicts, and that docs(archdev): rules are added from a session, not proposed #73'srules --repositorylisting does not hold PR results.archdev/references/monitor.md. A new "Rule verdicts for a PR head" subsection sits before docs(archdev): rules are added from a session, not proposed #73's "Repository rules, not PR verdicts". It documents:rulesstates (checked,not_checked,unreadable) and the fields of a violation;partialandinvalid_rules;disabled_filterstates (applied,none, andunavailablewith a reason);source_file, or therules --repositorylisting for a storedrl_rule, whosesource_fileis "ArchDev rules";ruleskey: report it as unavailable and ask before upgrading.docs(archdev): rules are added from a session, not proposed #73's closing paragraph now sends a PR's rule results to
inspect metadatainstead of saying they are unavailable.plugins/*/skills/archdev/**. Regenerated withnpm run build.tools/plugin-gen/test/generate.test.ts. Both contract tests now pin the rules guidance: the loop's rules step, never disabling a rule, unassessed states, each documented state, and the removal of the old "unavailable" wording.The checker's measured precision is deliberately left out of the text. It is an internal number, and this skill ships to customers.
Scope
The skill text and its generated plugin copies only. There are no code or CLI changes.
Risk
Low: prose and tests only. Agents follow this text, though, so the main risk is behavioral. Overstating violations would make agents churn on false flags. The text guards against that by calling violations claims to check, requiring the rule and cited lines to be read first, and allowing explain-and-leave.
User impact
After the CLI release, coding agents that use the ArchDev skill will act on rule violations for the PRs they push. With an older CLI they'll report rule results as unavailable instead of guessing.
Testing
Canonical proof:
tools/plugin-gen/test/generate.test.ts, tests "PR completion requires current-head CI, server risk and rule follow-through in the existing skill" and "review queries expose exact-head risk and scope without making reporting wait". They assert the new rules guidance inarchdev/SKILL.mdandmonitor.md, and that every harness's generated copy is byte-identical to the source.npm test: 116 passed.npm run check: 140 generated files match.npm run typecheck: clean. These run in theplugins.ymlworkflow on PRs.No honest end-to-end test exists for skill prose. Whether an agent follows the text can't be asserted mechanically.
Manual check: the
rulesJSON shape in the text was compared with the Rust CLI on firstlanding branchfix/inspect-metadata-rules-timeout(#19197, head550e67d168). That CLI was also run against real heads:That is the loop this PR writes down.
Checked against the released CLI: the v0.54.8 release binary was run on #19197 (
{state: "checked"}, 1 violation,disabled_filter: {state: "none"}) and on the release PR #19221 (1 violation, withsource_fileandcited_lines). Both match the text.Follow-ups
🤖 Generated with Claude Code