LearnNewsExamplesServices
Frontmatter
id13537
titleCompress pr-review guide payload
stateClosed
labels
documentationenhancementaiarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 19, 2026, 11:25 AM
updatedAtJun 19, 2026, 12:44 PM
githubUrlhttps://github.com/neomjs/neo/issues/13537
authorneo-gpt
commentsCount1
parentIssue10757
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 19, 2026, 12:44 PM

Compress pr-review guide payload

Closed v13.1.0/archive-v13-1-0-chunk-4 documentationenhancementaiarchitecturemodel-experience
neo-gpt
neo-gpt commented on Jun 19, 2026, 11:25 AM

Context

This is the next focused reduction target after #13535.

Current measured evidence:

  • node ./ai/scripts/lint/lint-skill-manifest.mjs --report-sizes --top 20 ranks .agents/skills/pr-review/references/pr-review-guide.md as the largest skill Markdown file: 50,230 bytes, 454 lines, 233 signals, disposition compress-to-trigger.
  • The next largest hot lifecycle payloads are lower: pull-request-workflow.md at 34,096 bytes and ideation-sandbox-workflow.md at 25,000 bytes.
  • .agents/skills/skills.manifest.json still carries temporary migration-period per-file budget overrides for pr-review and pull-request; pr-review is the largest remaining override consumer.
  • Discussion #11891 already identified review-lifecycle payload size as part of the problem and stated that any implementation ticket in that area must require net reduction for pr-review-guide.md and templates, or at minimum forbid new template/audit-file growth until the guide is split or shrunk.
  • Discussion #11598 recorded the same pattern earlier when pr-review-guide.md was 58,968 bytes and pull-request-workflow.md was 36,041 bytes: skill payloads accrete across substrate correction cycles and compete with the smallest active context window.

Release classification: post-release Agent OS hardening; boardless.

The Problem

pr-review is one of the hottest and most important agent workflows. It is also the heaviest single skill payload.

The failure mode is not that any one section is obviously wrong. The failure mode is accumulated review discipline: every missed review pattern became another paragraph, audit, template detail, or edge-case reminder. That makes each review cycle more expensive to enter, especially for GPT/Codex-class contexts that are still far below the 1M-token Claude windows.

Adding another compact-review-mode audit file or another reviewer paragraph would repeat the bloat loop. The next useful move is a measured reduction pass that preserves review quality while lowering the default review payload.

The Architectural Reality

Primary target:

  • .agents/skills/pr-review/references/pr-review-guide.md

Adjacent surfaces that must be checked but should not grow by default:

  • .agents/skills/pr-review/references/pr-review-template.md
  • .agents/skills/pr-review/references/pr-review-followup-template.md
  • .agents/skills/pr-review/references/audits/**
  • .agents/skills/skills.manifest.json

The create-skill guide already defines the corrective shape: workflow files are maps; edge-case sections should be trigger pointers or deeper payload only when that reduces total loaded cost. For this ticket, relocation alone is not enough.

The Fix

Perform a focused compression pass on the pr-review guide.

Preferred direction:

  • Merge duplicated review-gate language.
  • Convert historical/provenance-heavy text into compact citations.
  • Keep current review contracts grep-visible.
  • Avoid adding new audit or template files unless the same PR has a larger same-surface deletion and explains why the new file is a true progressive-disclosure boundary.
  • If sections must move, reduce aggregate .agents/skills/pr-review/**/*.md bytes, not just the main guide.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
.agents/skills/pr-review/references/pr-review-guide.md create-skill recursive Map/Atlas guidance; #10757 cognitive-load audit; Discussion #11891 Reduce the heaviest review payload while preserving required review contracts Stop if a proposed deletion weakens review safety; document the unresolved section instead Same guide; PR body slot-rationale before/after wc -c, lint-skill-manifest --report-sizes --top 20, grep for retained anchors
.agents/skills/pr-review/references/pr-review-template.md and follow-up template Current pr-review workflow Do not grow templates by default; template edits must be net-negative across pr-review Markdown Leave templates untouched if compression can happen in the guide only Existing templates byte delta and focused grep
.agents/skills/pr-review/references/audits/** Existing audit-sibling model No new audit sibling unless aggregate pr-review Markdown shrinks and the PR proves the split reduces load at invocation time Compact inline citations instead of adding files Existing audits aggregate `find .agents/skills/pr-review -name '*.md' -print0
.agents/skills/skills.manifest.json Skill Manifest Lint If the pass materially lowers pr-review-guide.md, consider lowering the temporary pr-review per-file override in the same PR or a follow-up Leave manifest unchanged if budget tightening would make the PR too broad manifest lint-skill-manifest

Decision Record impact

Aligned with ADR 0008 (SKILL.md anatomy / Progressive Disclosure) and the recursive workflow-map guidance in .agents/skills/create-skill/references/skill-authoring-guide.md.

Acceptance Criteria

  • Record before/after byte counts for .agents/skills/pr-review/references/pr-review-guide.md.
  • Record before/after aggregate byte counts for .agents/skills/pr-review/**/*.md.
  • The PR has a net-negative .agents/skills/pr-review/**/*.md byte delta.
  • No new pr-review audit/template Markdown file is added unless the aggregate pr-review Markdown delta remains negative and the PR explains why the new file reduces load at invocation time.
  • Existing required review contracts remain grep-verifiable: exact-head validation, close-target audit, Contract Ledger / Source-of-Authority audit, Evidence Audit, cross-skill integration, cross-family review mandate, review-response handoff, and post-review pickup.
  • node ./ai/scripts/lint/lint-skill-manifest.mjs --base origin/dev passes.
  • If the resulting pr-review-guide.md fits below a lower per-file threshold, either lower the manifest override in the same PR or document the follow-up threshold target.

Out of Scope

  • Changing review policy semantics.
  • Adding compact-review-mode as a new book.
  • Compressing pull-request or ideation-sandbox; those are separate hotspots.
  • Rewriting the manage_pr_review validator.

Avoided Traps

  • New audit sibling as the first move: rejected unless aggregate bytes go down. Otherwise it repeats the accretion pattern.
  • Relocation-only split: rejected because the invoked pr-review context still pays for the same material.
  • Weakening review rigor: rejected; this is compression, not a lower review bar.

Related

Handoff Retrieval Hints

Search patterns:

  • pr-review-guide bloat compact review mode net-reduction
  • Discussion #11891 pr-review-guide 532 lines no-new-audit-file
  • skill payloads accrete pr-review-guide 58968 pull-request-workflow 36041