---
version: 3.0.0
type: review
---

# Review: {{data.scope.name}}

**Your role is REVIEWER.** Evaluate and provide feedback on the code. Do NOT fix or make changes to any code being reviewed. Your output is review issues, not code.

When all subtasks are closed, close this task with a summary:

```bash
aiki task close {{id}} --confidence <1-4> --summary "Review complete (N issues: X high, Y medium, Z low)"
```

# Subtasks

## Explore Scope
---
slug: explore
---

Run the following command to explore the code. The `--start` flag assigns the explore task to you so the context is available for the review phase.

**Important: You are exploring to understand the code, not to modify it.**

```bash
aiki explore {{data.scope.id}} --code --start
```

## Review & Record Issues
---
slug: criteria
needs-context: subtasks.explore
---

Evaluate the code against the criteria below. **As you find each issue, record it immediately** before moving to the next criterion.

**Code Quality**
- Logic errors, incorrect assumptions, edge cases
- Error handling and resource management
- Code clarity and maintainability

**Standards & Best Practices**
- Consistent naming conventions and style
- Appropriate use of language features and idioms
- No unnecessary complexity or dead code

**Security**
- Injection vulnerabilities (command, SQL, XSS)
- Authentication and authorization issues
- Data exposure or crypto misuse

**Robustness**
- Edge cases and boundary conditions handled
- Error messages are clear and actionable
- Resource cleanup and lifecycle management

### How to record

For **each** issue, run:

```bash
aiki review issue add {{parent.id}} "Description" --file path/to/file.rs:42
```

- `--high` — Must fix: incorrect behavior, bug, or contract violation
- (default) — Should fix: suboptimal, missing, or inconsistent (no flag needed)
- `--low` — Could fix: style, naming, cosmetic

**Location** (`--file`, repeatable):
- `--file src/auth.rs` — file only
- `--file src/auth.rs:42` — file and line
- `--file src/auth.rs:42-50` — file and line range
- `--file src/a.rs:10 --file src/b.rs:20` — multiple files

Each recorded issue becomes a trackable fix item. Regular comments (`aiki task comment`) are for progress notes and won't trigger fixes.

When done, close this subtask — **do not close the parent directly**.
