docs: Add initiative review gate to dispatch-events, server-api, and database docs
This commit is contained in:
@@ -18,7 +18,7 @@ All adapters use nanoid() for IDs, auto-manage timestamps, and use Drizzle's `.r
|
||||
|--------|------|-------|
|
||||
| id | text PK | nanoid |
|
||||
| name | text NOT NULL | |
|
||||
| status | text enum | 'active' \| 'completed' \| 'archived', default 'active' |
|
||||
| status | text enum | 'active' \| 'pending_review' \| 'completed' \| 'archived', default 'active' |
|
||||
| mergeRequiresApproval | integer/boolean | default true |
|
||||
| branch | text nullable | auto-generated initiative branch (e.g., 'cw/user-auth') |
|
||||
| createdAt, updatedAt | integer/timestamp | |
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
- **Adapter**: `TypedEventBus` using Node.js `EventEmitter`
|
||||
- All events implement `BaseEvent { type, timestamp, payload }`
|
||||
|
||||
### Event Types (55)
|
||||
### Event Types (57)
|
||||
|
||||
| Category | Events | Count |
|
||||
|----------|--------|-------|
|
||||
@@ -27,6 +27,7 @@
|
||||
| **Preview** | `preview:building`, `preview:ready`, `preview:stopped`, `preview:failed` | 4 |
|
||||
| **Conversation** | `conversation:created`, `conversation:answered` | 2 | `conversation:created` triggers auto-resume of idle target agents via `resumeForConversation()` |
|
||||
| **Chat** | `chat:message_created`, `chat:session_closed` | 2 | Chat session lifecycle events |
|
||||
| **Initiative** | `initiative:pending_review`, `initiative:review_approved` | 2 | Initiative-level review gate events |
|
||||
| **Project** | `project:synced`, `project:sync_failed` | 2 | Remote sync results from `ProjectSyncManager` |
|
||||
| **Log** | `log:entry` | 1 |
|
||||
|
||||
@@ -45,6 +46,8 @@ PhaseStartedEvent { phaseId, initiativeId }
|
||||
MergeConflictedEvent { taskId, agentId, worktreeId, targetBranch, conflictingFiles[] }
|
||||
PhaseChangesRequestedEvent { phaseId, initiativeId, taskId, commentCount }
|
||||
AccountCredentialsRefreshedEvent { accountId, expiresAt, previousExpiresAt? }
|
||||
InitiativePendingReviewEvent { initiativeId, branch }
|
||||
InitiativeReviewApprovedEvent { initiativeId, branch, strategy: 'push_branch' | 'merge_and_push' }
|
||||
```
|
||||
|
||||
## Task Dispatch
|
||||
|
||||
@@ -93,6 +93,10 @@ Each procedure uses `require*Repository(ctx)` helpers that throw `TRPCError(INTE
|
||||
| updateInitiative | mutation | Name, status |
|
||||
| deleteInitiative | mutation | Cascade delete initiative and all children |
|
||||
| updateInitiativeConfig | mutation | mergeRequiresApproval, executionMode, branch |
|
||||
| getInitiativeReviewDiff | query | Full diff of initiative branch vs project default branch |
|
||||
| getInitiativeReviewCommits | query | Commits on initiative branch not on default branch |
|
||||
| getInitiativeCommitDiff | query | Single commit diff for initiative review |
|
||||
| approveInitiativeReview | mutation | Approve initiative review: `{initiativeId, strategy: 'push_branch' \| 'merge_and_push'}` |
|
||||
|
||||
### Phases
|
||||
| Procedure | Type | Description |
|
||||
|
||||
Reference in New Issue
Block a user