Repository navigation
Description
Problem
When a new function is added and tested in isolation, QA may miss issues at the call site — where and under what conditions the function is invoked. Issue #295 added rebaseBeforePR() with thorough unit tests, but the function was called for every issue in a chain loop when the AC specified "only the final branch." The unit tests for the function itself all passed; the bug was in the calling context.
How it was caught
The QA agent team identified the gap by reading the loop in runIssueWithLogging and noticing no chainMode guard existed. The initial QA pass (by the lead) missed it because the function-level review looked correct.
Root cause
QA currently reviews:
- The new function's implementation (correctness, types, patterns)
- The new function's tests (coverage, quality)
But does not systematically review:
- Where the function is called
- Under what conditions (loop iteration, mode flags, error state)
- Whether the call-site conditions match the AC constraints
Proposed Solution
Add a call-site review prompt to the QA skill that triggers when new exported functions are added.
Detection
# Find new exported functions in the diff
git diff main...HEAD | grep -E '^\+export (async )?function \w+' | sed 's/+//'QA prompt additions
When new exported functions are detected, the QA review should include:
- Call-site inventory: "Where is
newFunction()called? List all call sites." - Condition audit: "What conditions gate the call? Do they match the AC constraints?"
- Loop awareness: "Is it called inside a loop? Should it run for every iteration or only specific ones?"
- Mode sensitivity: "Does the function behave differently based on mode/flags? Are all modes handled at the call site?"
Output format
### Call-Site Review
| Function | Call Sites | Conditions | AC Match |
|----------|-----------|------------|----------|
| `rebaseBeforePR()` | `run.ts:2977` | `success && worktreePath && !noRebase` | ⚠️ Missing chain mode guard (AC-2 says "final branch only") |Acceptance Criteria
- AC-1: QA skill detects new exported functions in the diff
- AC-2: For each new function, QA identifies all call sites in the codebase
- AC-3: Call-site conditions are listed and compared against AC constraints
- AC-4: Functions called inside loops are flagged for iteration-scope review
- AC-5: Findings are included in QA output under "Call-Site Review" section
Context
- Origin: QA cross-review finding on fix: Rebase worktrees onto main before PR to prevent lockfile drift #295
- Related: fix: Rebase worktrees onto main before PR to prevent lockfile drift #295 (lockfile drift —
rebaseBeforePRcalled for all chain issues instead of final only)
Activity
feat(#299): add call-site review check to QA skill for new functions
admarble commentedon Feb 20, 2026
Implementation Progress Update
AC Coverage
Files Changed
.claude/skills/qa/SKILL.md- Added Section 2f: Call-Site Review (114 lines).claude/skills/qa/references/call-site-review.md- New reference doc (211 lines)Quality Checks
npm run buildnpm run lintnpm testPR Created
PR #311: #311
Implementation Highlights
git diff main...HEAD | grep -E '^\+export (async )?function \w+'to find new exported functionsgrep -rn-B 5context to detect if call is inside a loopAC_NOT_MET, unused exports →AC_MET_BUT_NOT_A_PLUSReference Documentation
Created
call-site-review.mdwith:rebaseBeforePRcase)Next Steps
/qa 299admarble commentedon Feb 20, 2026
QA Review for Issue #299
AC Coverage
grep -E '^\+export (async )?function \w+'grep -rnwith exclude patterns for tests-B 5context grep for loop keywordsCoverage: 5/5 AC items fully met
Original ACs: 5/5 met
CI Status
build (18.x)build (20.x)build (22.x)validate-skillstypecheckvalidate-pluginCI Summary: 6 passed, 0 pending, 0 failed
Quality Metrics
any)Code Review
Strengths:
Issues: None identified
Skill Command Verification
Skill files changed: 2
.claude/skills/qa/SKILL.md.claude/skills/qa/references/call-site-review.mdCommands Verified:
git diff main...HEAD | grep -E ...→ ✅ Works correctlygrep -rn "functionName(" --include="*.ts"→ ✅ Works correctlygrep -rn "functionName(" -B 5 | grep -E "(for|while|...)"→ ✅ Works correctlyVerification Status: Passed
Self-Evaluation
Verdict: READY_FOR_MERGE
All 5 acceptance criteria are fully met. The implementation:
All CI checks pass. Commands verified to work correctly. Clean implementation following existing skill patterns.
Next Steps
admarble commentedon Feb 22, 2026
Merged via feat(#299). Call-site review check added to QA skill.
feat(#299): add call-site review check to QA skill for new functions
fix(#299): address QA gaps — tool consistency, arrow exports, step al…
feat(#299): Add call-site review check to QA skill for new functions (#…
admarble commentedon Feb 22, 2026
Documentation Review Complete
This issue contains documentation-only changes. No additional documentation generation required.
Files Modified:
.claude/skills/qa/SKILL.md— Added section 2f: Call-Site Review.claude/skills/qa/references/call-site-review.md— New reference doc with methodology and examplesStatus:
✅ Documentation changes are ready for review and merge.
Ready to merge!
docs: update changelog and what-weve-built for #299 and #300
chore: release v1.17.0