fix: strengthen pr-reviewer cross-file context prompt

Merged
KH
5mo ago
+2-1

Summary

  • Strengthens the pr-reviewer harness prompt to explicitly use the checked-out repo to trace the impact of the current diff across callers, types, tests, config, and related files.
  • Keeps scope bounded to breakage caused by this PR diff, not a general full-repo audit.

Assessment

  • Cloud runs the harness with cwd: ctx.sandbox.cwd, and the PR workspace setup creates a real git checkout at that cwd.
  • The checkout path fetches refs/pull/<number>/head, checks out pr-head, and guards that the worktree remains a git repo.
  • .workforce/pr.diff is generated as a three-dot binary diff from MERGE_BASE...pr-head; for very large diffs cloud caps it at PR_DIFF_MAX_BYTES and appends a truncation notice, so whole-repo context remains important for truncated diffs too.
  • The previous prompt allowed context reads but did not explicitly require tracing outside-diff callers/types/tests/configs, which was weak for signature/API-impact review.

Deployment note

This prompt change requires redeploying the pr-reviewer persona to take effect. This PR does not deploy it.

Verification

  • npm run typecheck
  • npm run compile attempted, but the repo script currently fails because the installed agentworkforce CLI does not provide the scripted persona subcommand (Unknown subcommand "persona").

Summary by cubic

Strengthens the pr-reviewer prompt to trace cross-file impact using the checked-out repo. It can now flag and fix breakage in callers, types, tests, and config outside the changed-file list, while staying scoped to this PR (not a full-repo audit).