---
description: Create integration tests within task constraints
argument-hint: "[task-id]"
agent: build
---

# Integration Test: $ARGUMENTS

Use `use_skill("test-driven-development")` for integration testing.

## Task Validation

1. **Check task exists:** `backlog_task_view({ id: "$ARGUMENTS" })`
2. **Read constraints:** `@backlog/tasks/$ARGUMENTS/spec.md` Testing Notes section
3. **If missing:** STOP. Create with `/task-with-spec` first.

## Workflow

1. **Load skill** - `use_skill("test-driven-development")`
2. **Follow TDD cycle:**
   - Write failing integration test first
   - Verify it fails for the right reason
   - Implement minimal code to pass
   - Refactor while green
3. **Test only task integration points** from spec architecture

## Anti-Hallucination

- Test only modules from task PRD scope
- Mock only dependencies from task spec
- Use test framework from task testing notes
- Update `@backlog/tasks/$ARGUMENTS/review.md` after work

## Complete

Run `/complete-task $ARGUMENTS` when done.
