← Back to .knowledge

// Blog / team workflow

How to review the wider impact of an AI-generated pull request

A coding-agent PR should not only show what changed. It should show which module boundary, trust state, and evidence were affected.

// direct answer

Short answer

Review PR impact by mapping changed files to repository areas, checking confidence and freshness, listing affected high-impact files, verifying source and tests, and showing unresolved follow-up work in the PR summary. The goal is to make the agent’s context clear to the reviewer.

Review AI-generated PRs with context about module impact, trust, and evidence.

// the problem

A small diff can have a wider repository impact

A small PR can cross a module boundary the agent did not understand.

The diff might pass superficial review while relying on stale context or missing tests.

Reviewers need a compact way to see what the agent thought it touched and what trust state surrounded that area.

// change review

Map changed files to the areas they affect

.knowledge can generate a PR-facing summary of trust, health, and repair state.

The reviewer can compare changed files against module summaries, evidence, and high-impact files before approving the diff.

Inspector Pro can turn that into a visual change-impact summary, while the free core keeps the underlying files in the repository.

// concrete example

A three-file PR that touches unverified context

An agent changes a runtime file, a policy file, and a test helper. The diff is small, but the module boundary is suspect.

The PR impact review should flag the boundary, require source and tests, and show which evidence was checked.

If evidence is missing, the reviewer sees that as review debt instead of discovering it after merge.

// files you can inspect

Files that explain change impact

Some repository-specific files appear only after setup or a health check. Run the documented setup workflow to create routing, confidence, freshness, search, metrics, and PR summary outputs.

PR summary CREATED AFTER A HEALTH CHECK

.knowledge/maintenance/pr_summary.md

The PR summary compresses trust, health, and repair state into reviewer-facing context.

Use it for
  • Review handoff
  • Checking changed context
Do not use it for
  • Replacing code review
  • Approving untested behavior
High-impact files INCLUDED IN THE DOWNLOAD

.knowledge/maps/critical_paths.json

Critical path maps help the reviewer see whether changed files touch risky paths.

Use it for
  • Prioritizing review
  • Finding critical-path changes
Do not use it for
  • Assuming non-critical means safe
Optional file-level map OPTIONAL OUTPUT

.knowledge/maps/file_criticality.json

Some projects may also generate a file-level criticality map for more granular PR review.

Optional generated file-level map; use critical_paths.json as the primary public file.

Use it for
  • Granular file review
  • Project-specific impact scoring
Do not use it for
  • Replacing critical path review
Module boundary CREATED DURING SETUP

.knowledge/modules/*.json

Module summaries help map changed files to ownership and confidence state.

Use it for
  • Boundary review
  • Finding affected modules
Do not use it for
  • Skipping current source reads
Evidence backing CREATED DURING SETUP

.knowledge/evidence/*.json

Evidence shows which checks or files back the agent's assumptions.

Use it for
  • Review traceability
  • Finding missing checks
Do not use it for
  • Assuming old checks still pass
PR summary workflow INCLUDED IN THE DOWNLOAD

.knowledge/github-action-templates/knowledge-pr-summary.yml

The shipped GitHub Action template shows how PR summaries can become repeatable automation.

Use it for
  • CI review setup
  • Automated handoff proof
Do not use it for
  • Skipping human PR review

// commands to try

Commands and expected checks

node .knowledge/tools/generate-pr-summary.js
what it does
A PR-facing trust and repair summary is generated.
where to look
.knowledge/maintenance/pr_summary.md
node .knowledge/tools/doctor.js
what it does
Knowledge health is checked before review handoff.
where to look
.knowledge/maintenance/quality_report.json
node .knowledge/tools/build-routing-bundle.js
what it does
Routing reflects current module boundaries before the review.
where to look
.knowledge/maintenance/routing_bundle.json
PR impact card files and checks

What the reviewer needs before approval

01 High-impact files -> module summaries -> tests/evidence -> PR summary.
02 Changed files mapped to modules.
03 Trust and freshness state for affected modules.
04 Evidence and tests checked by the agent.
05 Repair items or unknowns that remain before merge.

// practical reference

Change-impact review checklist

A useful PR summary tells the reviewer what to trust and what to recheck.
Review areaQuestionAction
Changed filesWhich repository areas are touched?Map files to module summaries.
TrustAre affected modules trusted?Re-read source when trust is weak.
TestsWhat proves behavior?Run or inspect relevant tests.
EvidenceWhat backs the agent's plan?Check evidence files or note gaps.
RepairWhat uncertainty remains?Assign or document before merge.

// quick FAQ

FAQ

Is PR impact review only for large changes?

No. Small changes can cross risky boundaries. The workflow can be lightweight, but it should still map files, trust, evidence, and tests.

Can the PR summary be generated automatically?

Yes, the free core can generate a PR summary from repository files. Human review still decides whether the diff is acceptable.

// next step

Review the wider impact of AI-generated PRs

Require the agent to attach module impact, trust state, evidence, tests, and repair items before reviewer handoff.