What happened
PR #1779 added AgentReady scaffolding including documentation about the repo's collection mechanism. The fullsend review agent's initial review (run 29461958211) correctly identified that docs/patterns/add-release-policy-rule.md and .claude/rules/policy-rules.md incorrectly described collection registration (they said to edit collection files, when collections are actually declared via collections: in rule file METADATA annotations). The author fixed both files in commit 375f923f. However, AGENTS.md lines 50-52 contain the same misleading guidance: "Each collection imports specific policy packages... When adding a new rule, you must add it to the appropriate collection(s) or it won't be evaluated." This suggests developers should edit collection files, but collection files (e.g., policy/release/collection/minimal/minimal.rego) contain only a package declaration — rules declare their own collection membership via METADATA annotations. CodeRabbit's second-pass review flagged a related issue in AGENTS.md (lines 62-66) but the finding was not addressed before merge on Jul 21.
What could go better
The incomplete fix was merged because: (1) the review agent flagged the collection mechanism error in 2 of 3 affected files but missed the same error in AGENTS.md, despite AGENTS.md being part of the PR diff; (2) the re-review on the final commit (run 29517353505) did not verify that the fix was applied consistently across all files describing the same concept; (3) the human reviewer approved with no comments. Confidence is high that this is a genuine documentation error — verified by examining actual collection files, rule files, and the corrected guidance in the other two files.
Proposed change
Update AGENTS.md lines 50-52 to accurately describe the collection mechanism. Replace the current text with guidance consistent with .claude/rules/policy-rules.md and docs/patterns/add-release-policy-rule.md: clarify that rules declare collection membership via a collections: list in their METADATA custom: annotations (following the pattern in policy/release/attestation_type/attestation_type.rego), and that collection files themselves are minimal package declarations that do not need to be edited when adding new rules.
Validation criteria
AGENTS.md accurately describes the collection mechanism, matching the pattern demonstrated in policy/release/attestation_type/attestation_type.rego (METADATA annotations with collections: key) and consistent with the guidance in .claude/rules/policy-rules.md and docs/patterns/add-release-policy-rule.md. An AI agent or contributor following AGENTS.md should correctly declare collection membership in a new rule file's METADATA rather than attempting to edit collection files.
Generated by retro agent from #1779
What happened
PR #1779 added AgentReady scaffolding including documentation about the repo's collection mechanism. The fullsend review agent's initial review (run 29461958211) correctly identified that
docs/patterns/add-release-policy-rule.mdand.claude/rules/policy-rules.mdincorrectly described collection registration (they said to edit collection files, when collections are actually declared viacollections:in rule file METADATA annotations). The author fixed both files in commit375f923f. However,AGENTS.mdlines 50-52 contain the same misleading guidance: "Each collection imports specific policy packages... When adding a new rule, you must add it to the appropriate collection(s) or it won't be evaluated." This suggests developers should edit collection files, but collection files (e.g.,policy/release/collection/minimal/minimal.rego) contain only a package declaration — rules declare their own collection membership via METADATA annotations. CodeRabbit's second-pass review flagged a related issue in AGENTS.md (lines 62-66) but the finding was not addressed before merge on Jul 21.What could go better
The incomplete fix was merged because: (1) the review agent flagged the collection mechanism error in 2 of 3 affected files but missed the same error in AGENTS.md, despite AGENTS.md being part of the PR diff; (2) the re-review on the final commit (run 29517353505) did not verify that the fix was applied consistently across all files describing the same concept; (3) the human reviewer approved with no comments. Confidence is high that this is a genuine documentation error — verified by examining actual collection files, rule files, and the corrected guidance in the other two files.
Proposed change
Update AGENTS.md lines 50-52 to accurately describe the collection mechanism. Replace the current text with guidance consistent with
.claude/rules/policy-rules.mdanddocs/patterns/add-release-policy-rule.md: clarify that rules declare collection membership via acollections:list in their METADATAcustom:annotations (following the pattern inpolicy/release/attestation_type/attestation_type.rego), and that collection files themselves are minimal package declarations that do not need to be edited when adding new rules.Validation criteria
AGENTS.md accurately describes the collection mechanism, matching the pattern demonstrated in
policy/release/attestation_type/attestation_type.rego(METADATA annotations withcollections:key) and consistent with the guidance in.claude/rules/policy-rules.mdanddocs/patterns/add-release-policy-rule.md. An AI agent or contributor following AGENTS.md should correctly declare collection membership in a new rule file's METADATA rather than attempting to edit collection files.Generated by retro agent from #1779