---
description: Think within task constraints
argument-hint: "[task-id]"
agent: oracle
---

# Task-Bounded Thinking: $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 Thinking Boundaries

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

## Phase 1: Task-Context Problem Structuring

### Structure Only Task-Related Problem

**Task Problem:** [From PRD goal section]
**Task Boundaries:** [From PRD scope section]
**Task Constraints:** [From spec constraints section]

### Sequential Thinking (Task-Focused):

```
Use sequential-thinking skill for task $ARGUMENTS analysis

ANTI-HALLUCINATION THINKING REQUIREMENTS:
1. Read $TASK_DIR/prd.md and $TASK_DIR/spec.md FIRST
2. Structure thinking only around task goal
3. Explore solutions within task scope only
4. Apply problem-solving techniques to task constraints
5. Reject approaches outside task boundaries
6. Document thinking in $TASK_DIR/review.md
7. Stay within task-defined problem space

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

NO EXCEPTIONS: Thinking must serve task requirements only
```

### Questions to Explore (Task-Bounded):

1. **Task Problem**: What's the real problem within task goal?
2. **Task Assumptions**: What assumptions does task $ARGUMENTS make?
3. **Task Boundaries**: What would task $ARGUMENTS look like from zero?
4. **Task Elegance**: What's most elegant solution within task constraints?

## Phase 2: Task-Constraint Research

### Research Only Within Task Requirements

**Research Focus**: [From task PRD goal]
**Research Boundaries**: [From task PRD scope]
**Research Constraints**: [From task spec constraints]

### Task-Aligned Research:

```
@oracle Research solutions for task $ARGUMENTS

ANTI-HALLUCINATION RESEARCH REQUIREMENTS:
1. Research only solutions that serve task goal
2. Reject approaches violating task scope
3. Filter findings through task constraints
4. Focus on task success criteria achievement
5. Document research in task context only
6. Ignore solutions outside task boundaries

TASK-BOUNDED RESEARCH:
- Goal: [From PRD goal]
- Scope: [From PRD scope]
- Constraints: [From spec constraints]
- Success: [From PRD success criteria]

NO EXCEPTIONS: Research must serve task constraints only
```

## Phase 3: Task-Problem Solving

### Apply Techniques (Task-Context)

| Stuck Type                    | Technique          | Task Application                       |
| ----------------------------- | ------------------ | -------------------------------------- |
| Complexity within task        | Simplification     | Remove non-essential task features     |
| Innovation within constraints | Collision thinking | Combine task elements in new ways      |
| Patterns within scope         | Meta-recognition   | Find recurring patterns in task domain |
| Assumptions in task           | Inversion          | What if opposite of task assumption?   |

### Technique Selection (Task-Bounded):

- Choose technique that serves task goal
- Apply within task scope boundaries
- Respect all task constraints
- Work toward task success criteria

## Phase 4: Task-Solution Design

### Design Within Task Constraints

**Solution Space**: [Limited by task scope]
**Design Rules**: [From task spec constraints]
**Success Metrics**: [From task PRD criteria]

### Solution Options (Task-Only):

```
Option 1: [Task-compliant approach]
- Core Idea: [Within task constraints]
- Pros: [Serves task goal]
- Cons: [Within task limitations]
- Complexity: [Appropriate for task]

Option 2: [Alternative task approach]
- Core Idea: [Different take on task goal]
- Pros: [Still within task scope]
- Cons: [Task constraint challenges]
- Complexity: [Fits task requirements]

Option 3: [Contrarian within task]
- Core Idea: [Opposite of task assumption]
- Pros: [Unexpected task benefits]
- Cons: [Task boundary conflicts]
- Complexity: [Task-appropriate]
```

## Phase 5: Task-Craftsmanship Test

### Validate Against Task Requirements

✓ **Simpler possible?** [Within task constraints]
✓ **Necessary for task?** [For task success]
✓ **Inevitable for task?** [Serves task goal]
✓ **Task-explainable?** [One sentence about task]
✓ **Task-survivable?** [5 years for task context]

### Task Elegance Check:

> Solution should feel inevitable for task $ARGUMENTS
> If defending complexity for task, haven't thought deep enough

## Phase 6: Task Implementation Blueprint

### Task-Focused Plan

1. **Step**: [Clear task progression]
2. **Next**: [Natural task step]
3. **Final**: [Task completion]

### Task Edge Cases:

- [From task spec edge cases]
- [Task-specific error handling]
- [Task constraint compliance]

### Task Verification:

- [ ] Meets task PRD success criteria
- [ ] Follows task spec constraints
- [ ] Stays within task scope
- [ ] Handles task edge cases

## Phase 7: Task Documentation

### Update Task Review

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

## Strategic Thinking - $(date '+%Y-%m-%d')

### Task Analysis

**Problem**: [From task PRD goal]
**Constraints**: [From task spec]
**Scope**: [From task PRD scope]

### Solution Process

[Thinking process within task boundaries]

### Decision Rationale

[Why chosen solution serves task best]

### Task Compliance

- Goal alignment: [How solution serves task]
- Constraint adherence: [How solution respects limits]
- Scope compliance: [How solution stays within bounds]

EOF`

---

**ANTI-HALLUCINATION: Thinking must serve task constraints, not general problem-solving**
