---
description: Quick design within task constraints
argument-hint: "[task-id]"
agent: build
---

# Quick Design: $ARGUMENTS

## Phase 0: Task Validation (MANDATORY)

### Check Task Exists

!`TASK_DIR="@backlog/tasks/$ARGUMENTS"`
!`if [ ! -d "$TASK_DIR" ]; then echo "ERROR: Task $ARGUMENTS not found. Use /task-with-spec first"; exit 1; fi`

### Load Design Constraints

!`echo "=== QUICK DESIGN BOUNDARIES ==="`
!`grep -A 10 "Scope:" "$TASK_DIR/prd.md"`
!`grep -A 15 "Constraints:" "$TASK_DIR/spec.md"`

## Phase 1: Task-Bounded Quick Design

### Design Only Within Task Requirements

**Task Goal:** [From PRD goal section]
**Task Scope:** [From PRD scope section]
**Task Constraints:** [From spec constraints section]

### Quick Design Rules (Task-Focused):

```
@build Quick design for task $ARGUMENTS

ANTI-HALLUCINATION DESIGN REQUIREMENTS:
1. Read $TASK_DIR/prd.md and $TASK_DIR/spec.md FIRST
2. Design only for task goal achievement
3. Stay within task scope boundaries
4. Follow all task constraints
5. Use only allowed frameworks/libraries from spec
6. Design minimal components for task success
7. Stop if any constraint violation detected
8. Complete $TASK_DIR/review.md after work
9. Mark task success criteria as completed

QUICK DESIGN BOUNDARIES:
- Goal: [From PRD goal]
- Scope: [From PRD scope]
- Constraints: [From spec constraints]
- Success: [From PRD success criteria]

NO EXCEPTIONS: Even quick designs must serve task constraints only
```

### Design Validation (Task-Aligned):

- [ ] Design serves task goal only
- [ ] Stays within task scope
- [ ] Follows all task constraints
- [ ] Uses only allowed frameworks
- [ ] Achieves task success criteria

## Phase 2: Task-Focused Design Implementation

### Quick Design Process:

1. **Analyze task requirements** from PRD+spec
2. **Design minimal solution** for task goal only
3. **Use task-allowed tools** from spec constraints
4. **Create task-specific assets** for success criteria
5. **Validate against task boundaries** continuously

### Asset Creation (Task-Bounded):

- **Images**: Only for task success criteria
- **Colors**: Only if specified in task constraints
- **Fonts**: Only if allowed by task spec
- **Layout**: Only for task user flow

## Phase 3: Task Design Validation

### Design Compliance Check:

```
session({
  mode: "message",
  agent: "code-auditor",
  text: "Review quick design for task $ARGUMENTS compliance with PRD+spec constraints"
})
```

### Validation Criteria:

- **Scope compliance**: Design stays within task boundaries
- **Constraint adherence**: All task constraints followed
- **Goal alignment**: Design serves task purpose
- **Success criteria**: Design achieves task requirements

## Phase 4: Task Design Completion

### Update Task Documentation

!`cat >> "$TASK_DIR/review.md" << EOF

## Quick Design - $(date '+%Y-%m-%d')

### Task Context

**Goal**: $(grep -A 3 'Goal:' "$TASK_DIR/prd.md" | tail -1)
**Scope**: $(grep -A 3 'In-Scope:' "$TASK_DIR/prd.md" | tail -2)

### Design Implementation

[Quick design created within task constraints]

### Design Compliance

- Goal alignment: [How design serves task]
- Scope compliance: [How design respects boundaries]
- Constraint adherence: [How design follows spec]

### Assets Created

[Only assets needed for task success]

EOF`

### Complete Task

!`/complete-task $ARGUMENTS`

---

**ANTI-HALLUCINATION: Even quick designs must serve task constraints, not creative exploration**
