Read all task artifacts and specs before writing code. Outputs implementation constraints. Use after task.py start and before any source editing — the before-dev gate is mandatory and blocks code changes until satisfied.
Quality verification: git diff/status, lint, type-check, tests, no debug logs, no suppressed errors, no unsafe type bypass. Deep check for L4/L5 adds spec compliance, cross-layer data flow, API/schema/type consistency, and code reuse. Outputs PASS/FAIL with blocking issues.
Review dependency direction, module boundaries, abstraction quality, duplicated concepts, layering violations, shared utility misuse, API contract clarity, and future extensibility. Outputs to review/architecture-review.md with PASS/FAIL. Required for L4/L5 tasks.
Review code for correctness, readability, maintainability, error handling, performance, tests, security, and unnecessary complexity. Outputs to review/code-review.md with PASS/FAIL, separating blocking from non-blocking issues. Use as a review gate when selected in the Review Gate Contract.
Decide execution mode, branch strategy, TDD approach, review gates, and architecture guidance for the task. Outputs Development Strategy and Review Gate Contract to implement.md. Use during Phase 1.4 after PRD and design are complete.
Finalize a completed task: verify gates passed, archive task, update workspace journal, update task index, summarize commits/PR, record follow-ups, and mark task done. Does NOT write code, fix bugs, bypass failed gates, or auto-push. Rejects if preconditions are not met.
Dual-mode skill for architecture guidance and deep review. Guidance mode (before implementation) outputs to design.md Architecture Guidance. Deep-review mode (after implementation) outputs to review/architecture-deep-review.md with PASS/FAIL. Triggers when changes cross 3+ layers, add new modules, change API/schema/persistence, modify shared types/util/config, introduce new abstractions, refactor, or use multi-subagent parallel execution.
Review integration when the merge-review trigger contract applies: L5; selected Trellis-native parallel + worktree; selected OMC ulw/ultrawork + worktree + parent/child; Branch strategy contains worktree; Parent/child: yes; Merge review needed: yes; PR merge; or conflict resolution. Checks conflict resolution logic, duplicate implementations, missing files, and interface inconsistencies between agents. Outputs to review/merge-review.md with PASS/FAIL.