qa
Use when Forge begins quality assurance. QA engineer runs functional, visual, contract, regression, and edge-case tests against the spec.
SKILL.mdskills/qa/SKILL.md
GitHub<Purpose>
Phase 4 of the Forge pipeline. The QA Engineer systematically tests the implemented
product against the spec, design, and interface contracts. Every feature is verified
through functional, visual, contract, regression, and edge-case testing. Issues are
tracked in .forge/holes/ and classified by severity to determine the next phase.
</Purpose>
<Use_When>
- Automatically invoked after Phase 3 (develop) completes
- state.json phase=4
</Use_When>
<Layer_Classification>
QA agent is dispatched as layer2_subagent — process isolation from developers is critical
to maintain independent verification.
Optional Analyst support: Analyst can augment QA with quality assessment — dead code detection, complexity hotspots, and pattern violations (see agents/analyst.md). QA decides whether to invoke Analyst based on project size and scope; skip for small projects, recommend for multi-module codebases. </Layer_Classification>
<Steps> 0. **Handoff Interview — QA Intake** a. QA Engineer reads: - .forge/spec.md, .forge/design/components.md, .forge/contracts/*.ts - Lead Dev's session handoff notes - Merged code (git log of Phase 3 work) b. QA generates clarification questions: - "Spec says X but I see Y implemented — is this intentional?" - "No test criteria defined for feature Z — what's the expected behavior?" - "Contract type A doesn't match the implementation — which is correct?" c. Lead Dev / CTO answers implementation questions; PM answers spec intent questions d. QA confirms understanding: "I will test [N features] against [these criteria]."Dispatch QA Engineer agent with context:
- .forge/spec.md (requirements reference)
- .forge/design/components.md (visual reference)
- .forge/design/tokens.json (design tokens)
- .forge/contracts/*.ts (interface contracts)
- .forge/code-rules.md (code standards)
Functional Testing: a. Map every feature in spec.md to a test case b. For each feature:
- Verify happy path works as described in spec
- Verify error states behave as spec defines
- Verify edge cases (empty data, max length, special chars, concurrent access) c. Record pass/fail for each test case
Visual Testing: a. For each component in components.md:
- Verify all states render correctly: default, hover, active, disabled, loading, error, empty
- Verify responsive behavior at all breakpoints (mobile, tablet, desktop)
- Verify design tokens are applied correctly (colors, spacing, typography) b. Record visual discrepancies with screenshots/descriptions
Contract Testing: a. For each interface in .forge/contracts/:
- Verify API responses match declared types
- Verify component props match declared interfaces
- Verify data flow matches architecture diagram b. Record contract violations
Regression Testing: a. Run full test suite (unit + integration) b. Verify no previously passing tests now fail c. Verify no unintended side effects from merged PRs
Edge-Case Testing: a. Empty states: what happens with no data? b. Boundary values: min/max inputs, zero, negative c. Rapid interactions: double-click, spam submit d. Network conditions: slow response, timeout e. Authentication edge cases: expired token, missing auth
Issue Classification: For each discovered issue, dispatch the bug-tracker agent to create a hole file using the standard format
HOLE-{NNN}-{slug}.md:- Provide the bug-tracker with:
- Severity: blocker | major | minor | cosmetic
- Category: functional | visual | contract | regression | edge-case
- Steps to reproduce
- Expected behavior (from spec/design)
- Actual behavior
- Affected spec section
- Requirement IDs and acceptance IDs whenever known
- The bug-tracker agent writes .forge/holes/HOLE-{NNN}-{slug}.md with the next available sequence number and a kebab-case slug derived from the issue summary
- After hole creation, run:
node scripts/forge-sync-traceability.mjs
- Provide the bug-tracker with:
7b. Lesson Check + Extraction (harness learning):
a. Before testing, load relevant pattern lessons from ~/.claude/forge-lessons/ and .forge/lessons/
- Match lessons against current tech stack and project type
- Known bug patterns from past projects → add as extra test cases
b. After testing, if 3+ blockers found:
- Categorize blockers by root cause type
- If a category has 2+ blockers → create pattern lesson in .forge/lessons/
- See references/harness-learning.md for format
Gate Decision:
- Count blockers and majors
- If blockers > 0 → set next_phase=6 (fix loop)
- If blockers = 0 → set next_phase=5 (security review)
- Update company runtime in the same step:
- If blockers > 0:
node scripts/forge-lane-runtime.mjs set-company-gate --gate implementation_readiness --gate-owner lead-dev --delivery-state blocked --internal-blockers "{blocker summaries}" - If blockers = 0:
node scripts/forge-lane-runtime.mjs set-company-gate --gate security --gate-owner security-reviewer --delivery-state in_progress
- If blockers > 0:
Update state.json:
- If blockers: phase=6, phase_id="fix", phase_name="fix"
- If clean: phase=5, phase_id="security", phase_name="security"
Update session handoff:
- If blockers:
node scripts/forge-lane-runtime.mjs write-session-handoff --summary "{blockers found in QA}" --next-goal "Fix blockers and rerun QA" --next-owner lead-dev - If clean:
node scripts/forge-lane-runtime.mjs write-session-handoff --summary "QA clear; proceed to security review" --next-goal "Run security delivery gate" --next-owner security-reviewer
Create git tag: forge/v1-qa
Transition to next phase (forge:fix or forge:security)
</Steps>