feat: add quality_review task status and qualityReview initiative flag
Adds two new fields to the database and propagates them through the repository layer: - Task status enum gains 'quality_review' (between in_progress and completed), enabling a QA gate before tasks are marked complete. - initiatives.quality_review (INTEGER DEFAULT 0) lets an initiative be flagged for quality-review workflow without a data migration (existing rows default to false). Includes: - Schema changes in schema.ts - Migration 0037 (ALTER TABLE initiatives ADD quality_review) - Snapshot chain repaired: deleted stale 0036 snapshot, fixed 0035 prevId to create a linear chain (0032 → 0034 → 0035), then generated clean 0037 snapshot - Repository adapter already uses SELECT * / spread-update pattern so no adapter code changes were needed - Initiative and task repository tests extended with qualityReview / quality_review_status describe blocks (7 new tests) - docs/database.md updated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,8 @@ All adapters use nanoid() for IDs, auto-manage timestamps, and use Drizzle's `.r
|
||||
| name | text NOT NULL | |
|
||||
| status | text enum | 'active' \| 'pending_review' \| 'completed' \| 'archived', default 'active' |
|
||||
| branch | text nullable | auto-generated initiative branch (e.g., 'cw/user-auth') |
|
||||
| executionMode | text enum | 'yolo' \| 'review_per_phase', default 'review_per_phase' |
|
||||
| qualityReview | integer (boolean) | default false; flags initiative for quality review workflow |
|
||||
| createdAt, updatedAt | integer/timestamp | |
|
||||
|
||||
### phases
|
||||
@@ -48,7 +50,7 @@ All adapters use nanoid() for IDs, auto-manage timestamps, and use Drizzle's `.r
|
||||
| type | text enum | 'auto' |
|
||||
| category | text enum | 'execute' \| 'research' \| 'discuss' \| 'plan' \| 'detail' \| 'refine' \| 'verify' \| 'merge' \| 'review' |
|
||||
| priority | text enum | 'low' \| 'medium' \| 'high' |
|
||||
| status | text enum | 'pending' \| 'in_progress' \| 'completed' \| 'blocked' |
|
||||
| status | text enum | 'pending' \| 'in_progress' \| 'quality_review' \| 'completed' \| 'blocked' |
|
||||
| order | integer | default 0 |
|
||||
| summary | text nullable | Agent result summary — propagated to dependent tasks as context |
|
||||
| retryCount | integer NOT NULL | default 0, incremented on agent crash auto-retry, reset on manual retry |
|
||||
|
||||
Reference in New Issue
Block a user