Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,35 @@ jobs:
':!package-lock.json'
':!yarn.lock'
':!**/CHANGELOG.md'
':!tmp/ship/**'
':!dist/**'
':!build/**'
':!.next/**'
':!.turbo/**'
':!node_modules/**'
':!.codex/**'
':!.agents/skills/pr-context/**'
':!specs/**'
':!reports/**'
':!tech-probes/**'
':!stories/**'
':!projects/**'
':!strategy/**'
':!bun.lockb'
':!**/__snapshots__/**'
':!*.snap'
':!tmp/**'
)

BASE="origin/${{ steps.pr.outputs.base_ref }}"

# specs/ exclusion keeps SPEC.md reviewable: a feature's SPEC.md is
# load-bearing grounding for reviewers, while spec sub-artifacts
# (evidence/, meta/, analyses) are research noise. Pathspecs cannot
# re-include after an exclude, so enumerate changed spec files NOT
# named SPEC.md and exclude them by exact path.
while IFS= read -r spec_file; do
[ -n "$spec_file" ] && EXCLUDE_PATTERNS+=(":!$spec_file")
done < <(git diff --name-only "$BASE"...HEAD -- 'specs/' 2>/dev/null | grep -v '/SPEC\.md$' || true)

DIFF=$(git diff "$BASE"...HEAD -- . "${EXCLUDE_PATTERNS[@]}")
DIFF_SIZE=${#DIFF}

Expand Down Expand Up @@ -392,21 +403,29 @@ jobs:
':!package-lock.json'
':!yarn.lock'
':!**/CHANGELOG.md'
':!tmp/ship/**'
':!dist/**'
':!build/**'
':!.next/**'
':!.turbo/**'
':!node_modules/**'
':!.codex/**'
':!.agents/skills/pr-context/**'
':!specs/**'
':!reports/**'
':!tech-probes/**'
':!stories/**'
':!projects/**'
':!strategy/**'
':!bun.lockb'
':!**/__snapshots__/**'
':!*.snap'
':!tmp/**'
)
# Keep SPEC.md reviewable in the delta too (same rationale as
# EXCLUDE_PATTERNS above).
while IFS= read -r spec_file; do
[ -n "$spec_file" ] && DIFF_EXCLUDE+=(":!$spec_file")
done < <(git diff --name-only "$LAST_REVIEW_SHA".."$PR_HEAD" -- 'specs/' 2>/dev/null | grep -v '/SPEC\.md$' || true)

SINCE_REVIEW_LOG=$(git log --oneline "$LAST_REVIEW_SHA".."$PR_HEAD")
SINCE_REVIEW_STATS=$(git diff --stat "$LAST_REVIEW_SHA".."$PR_HEAD" -- . "${DIFF_EXCLUDE[@]}")
SINCE_REVIEW_FILES=$(git diff --name-only "$LAST_REVIEW_SHA".."$PR_HEAD" -- . "${DIFF_EXCLUDE[@]}")
Expand Down
Loading