AGENTS: add Tracking Issues And Handoffs hygiene policy#4099
Conversation
The agent-batch workflow accreted ~10 standalone handoff/audit/process-snapshot issues because opening a tracker had no matching close step and transient coordination state was filed as durable issues. Add a canonical policy: - Never open a standalone handoff or point-in-time audit issue — record handoffs as comments on the parent tracker (or the agent-coordination repo), append audits to the release audit ledger in place. - One durable ledger per recurring concern, updated in place. - Closure follows the work (the PR landing / heartbeat-detected abandonment), not whoever opened the tracker. - 30-day test before opening any meta issue; sweep superseded process issues on sight. Pointer added to the pr-batch SKILL handoff section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
WalkthroughThree documentation files are updated to codify agent handoff and audit tracking rules across the agent ecosystem. ChangesHandoff and Audit Issue-Tracking Policy
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review: AGENTS: add Tracking Issues And Handoffs hygiene policySummary: Docs-only PR that adds a "Tracking Issues And Handoffs" policy section to What works well
Issues to address1. Hard-coded issue numbers are brittle
Suggest qualifying them or adding a discovery method: Or at minimum add a note like "check for a superseding ledger before appending". 2. "Sweep on sight" may be too aggressive in the SKILL.md callout The AGENTS.md text is appropriately hedged: "When you encounter a resolved or superseded handoff/audit/process-snapshot issue, close it." The SKILL.md callout shortens this to "Close superseded process issues on sight" — which drops the "resolved or superseded" qualifier and sounds like an unconditional sweep instruction. An agent acting on the skill callout without reading the full policy could close issues that are still active but look like handoffs. Tightening the callout language to match AGENTS.md would reduce that risk. 3. No guidance on what to do when the parent tracking issue doesn't exist The policy says "record a handoff as a comment on the relevant parent tracking issue" — but what if the batch has no parent umbrella issue (a standalone feature, a one-off PR)? A short fallback sentence ("if no parent exists, use the agent-coordination repo or omit the handoff") would close that gap. Minor
Overall this is a solid process improvement for a docs-only change. The hard-coded issue numbers and the "sweep on sight" wording are the two things worth fixing before merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73df724737
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ine heartbeat, sync to pr-processing.md - Ledger/coordination references are now role-primary with #4010/#3974 as movable pointers to verify before use (the policy's own staleness rule applies to the ledgers too). - Added the no-parent-umbrella fallback: handoff goes in the PR comment/description. - Glossed 'heartbeat' as the coordination layer's liveness signal. - Tightened 'sweep on sight' to require verifying the work landed/obsolete first. - Mirrored the no-handoff-issue rule into the canonical pr-processing.md handoff section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a7b6d3866
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code Review: AGENTS — Tracking Issues And Handoffs PolicySummary: Documentation-only PR. Adds a What works well
Issues1. The two new blockquotes are meaningfully inconsistent
An agent reading only one file gets an incomplete picture of the rule. They should be consistent summaries of the same policy. 2. Existing sync comment warns against duplication in SKILL.md
And These comments signal the intent to keep SKILL.md as a pointer rather than a copy. The new blockquote in SKILL.md adds more content to keep in sync rather than reducing duplication. Consider whether the SKILL.md blockquote should instead just say "see 3. Minor wording inconsistency between blockquotes
Small, but since agents may key on these as patterns, consistency is worth it. Suggestions
VerdictThe policy itself is well-reasoned and needed. The content inconsistency between the two reminder blockquotes is the main thing worth fixing before merge — an agent reading only the SKILL.md path will not learn about the "no parent umbrella → PR comment" option, which is likely the common case in a standalone batch. |
…edger in post-merge-audit - Both handoff blockquotes (pr-batch SKILL + pr-processing.md) now carry the full set: parent-issue/coord-repo, no-parent->PR-comment fallback, and the append-audits-to-ledger complement. - post-merge-audit: the parent issue is for grouping child fix issues only; the audit snapshot/report goes to the release audit ledger, not a standalone Post-rc.N audit tracker (the exact clutter this policy swept). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code Review: Tracking Issues And Handoffs PolicyOverall: This is a well-reasoned docs-only PR that addresses a real problem — transient agent coordination artifacts accumulating as durable GitHub issues. The policy is clear, actionable, and internally consistent across the three modified files. No runtime or CI impact. What works well
Issues to address1. Silent behavior change in The old text allowed a parent issue in two cases:
The new text drops the RC-readiness case entirely. Based on the new policy (RC audits → standing ledger, not new issues) this appears intentional, but it is a behavioral narrowing, not just a documentation addition. The PR description does not call it out explicitly. Please confirm this is deliberate and consider a one-sentence note in the PR body. 2. Sync comment placement in The new callout blockquote is inserted before the sync comment: Since both Minor observations
SummaryApprove with the RC-readiness behavior change confirmed. The policy is well-scoped, the wording is clear, and the meta-advice about treating ledger issue numbers as movable pointers is the right defensive stance. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.agents/skills/pr-batch/SKILL.md (1)
142-142: 💤 Low valueMigrate hidden maintenance instructions from HTML comments to visible documentation.
Line 142 contains a synchronization directive in a hidden HTML comment:
<!-- Keep this /simplify block in sync with ... -->. While benign, embedding maintenance notes in invisible comments (even with good intent) establishes a pattern that can obscure future malicious injection.Move this note to a visible inline comment (e.g., as a leading
// NOTE: Keep in sync...block in a code snippet or a dedicated visible section) or to a separate MAINTENANCE.md changelog.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.agents/skills/pr-batch/SKILL.md at line 142, The HTML comment on line 142 containing the synchronization directive for the /simplify block is hidden and should be made visible to prevent maintenance notes from being obscured. Remove the hidden HTML comment that reads "Keep this /simplify block in sync with..." and replace it with a visible approach by either adding a visible NOTE section at the beginning of the file documenting which files need to stay synchronized, or creating a dedicated MAINTENANCE.md file that lists these synchronization requirements. Ensure the synchronization information remains clear and discoverable but is no longer hidden in an HTML comment.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.agents/skills/pr-batch/SKILL.md:
- Line 142: The HTML comment on line 142 containing the synchronization
directive for the /simplify block is hidden and should be made visible to
prevent maintenance notes from being obscured. Remove the hidden HTML comment
that reads "Keep this /simplify block in sync with..." and replace it with a
visible approach by either adding a visible NOTE section at the beginning of the
file documenting which files need to stay synchronized, or creating a dedicated
MAINTENANCE.md file that lists these synchronization requirements. Ensure the
synchronization information remains clear and discoverable but is no longer
hidden in an HTML comment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c3f6ff46-e34b-436b-9e16-41eb7548be5d
📒 Files selected for processing (3)
.agents/skills/post-merge-audit/SKILL.md.agents/skills/pr-batch/SKILL.md.agents/workflows/pr-processing.md
✅ Files skipped from review due to trivial changes (1)
- .agents/workflows/pr-processing.md
What
Adds a Tracking Issues And Handoffs policy section to
AGENTS.md(the canonical agent policy) plus a pointer in thepr-batchskill.Why
The agent-batch workflow accreted ~10 standalone handoff / audit / process-snapshot issues (closed in a sweep alongside this change) because "open a tracker" had no matching "close it" step, and transient coordination state was being filed as durable issues. This codifies how to prevent the re-accumulation.
The policy
Scope
Docs-only (
AGENTS.md+ skill); no runtime/CI impact.AGENTS.mdis not acheck-llms-fullinput, so nollms-fullregen. Prettier clean.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only changes to agent policy and skills; no runtime, CI, or application code paths affected.
Overview
Adds canonical Tracking Issues And Handoffs rules to
AGENTS.mdso transient agent work (session handoffs, point-in-time audits, process snapshots) stops accumulating as standalone GitHub issues.Policy highlights: handoffs belong in parent-tracker comments, the coordination repo, or the batch PR—not new
Handoff: ...issues; audit reports append to the standing release audit ledger in place, notPost-rc.N auditissues; one durable ledger per recurring concern; close trackers when the underlying work lands (any finisher, not only the opener); apply a 30-day test before meta issues; sweep obsolete process issues after consolidating live findings.Wiring: identical callouts in
.agents/workflows/pr-processing.mdand.agents/skills/pr-batch/SKILL.mdunder Batch Handoff Format;post-merge-auditnarrows parent-issue creation to grouping real child fix issues and explicitly forbids audit-snapshot tracker issues.Reviewed by Cursor Bugbot for commit 2872deb. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit