Repository navigation
Description
Problem
Agent PRs carry a run summary and validation text, but nothing tells a reviewer where to look. Reviewers either read every line or rubber-stamp. protected_paths exists but is only used for auto-merge.
Goal
Add a compact "Review digest" section to the PR description (issue runs) and the completion comment (follow-up and /fix runs) that ranks the change by risk and shows the evidence.
Acceptance criteria
- A new
digestsection exists in the PR template section model, with a fixed position aftersummary, a placeholder, scaffold text andpropr repo validatesupport, documented indocs/docs/features/pr-templates.md. - The digest contains, in this order: (1) risk-tiered paths: changed files grouped as high / normal / low risk; (2) validation evidence: per-command status from the structured validation result of Keep repository validation results in structured form on the run result and task timeline #3429; (3) diff size: files and lines added/removed.
- Risk tiers come from built-in defaults (CI and workflow files,
.propr/, agent configuration files, lockfiles and dependency manifests, database migrations, auth- and payment-looking paths as high; docs and tests as low) plus an optionalreview.risk_pathslist of globs in.propr/workflow.ymlthat marks additional high-risk paths. The key follows the existing optional-key pattern (runtime validator, JSON schema parity,propr initscaffold, docs). Glob matching reuses theprotected_pathsmatcher. - New dependencies added to a manifest are listed by name.
- The section is omitted entirely (empty string) when there is no diff, so existing byte-identical PR-body tests pass unchanged for those cases; tests for the new section are added.
- Output is bounded (file lists capped like the existing
files_changedsection) and contains no raw diff content. - The digest data is also written as one
task_historymetadata event so later features can read it.
Out of scope
- Scope-vs-issue analysis, shortcut detection, acceptance criteria (separate issues in this plan).
- UI rendering beyond the markdown.
Implementation
Key files: packages/shared/src/prTemplate.ts (PR_TEMPLATE_SECTIONS, PrBodyPiece, placeholders, scaffold), packages/core/src/workflow/prTemplate.ts, packages/core/src/utils/github/logFiles.ts (CompletionCommentParts, generateCompletionCommentParts, generateCompletionComment), src/jobs/issueJobHelpers.ts (buildIssuePullRequestBodyPieces), src/jobs/prCompletionComment.ts (buildCompletionComment), packages/core/src/workflow/autoMergePolicy.ts (compileProtectedPathGlob, findProtectedPaths), packages/core/src/workflow/repositoryWorkflow.ts (schema), packages/core/src/services/worktreeMonitorService.ts (getWorktreeChanges, FileChange), src/jobs/prDiffFormatting.ts (private classifiers isLockfile, isDocumentationFile etc. — export or move to a shared module), packages/cli/src/commands/repoValidate.ts.
Approach: a pure buildReviewDigest(changes, validationResult, riskConfig) in core returning a structured value plus a markdown renderer; call it where the completion parts are generated. Tests: test/prTemplateDescription.test.ts, packages/shared/test/prTemplate.test.ts, packages/core/test/prTemplate.test.ts, test/issueJobHelpers.test.ts, packages/core/test/repositoryWorkflow.test.ts. Verify with npm run test:prepare, npm run typecheck, the changed test files via node scripts/run-test-suite.mjs, and eslint --max-warnings 0 per touched package.
Activity
propr-dev commentedon Nov 12, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53461/claude-opus-5-5-add-a-risk-ranked-digest--20261112-1026-g7s3461-epic-trust-the-prqissue-3461-20261112-1026-claude-opus-5-5-g7s🔍 Track Task Execution