feat(reviewer): add Tier 1 reviewer agent role with auto-channel notifications
Reviewer workflow in agent-prompts.ts (8-step process), Rust auto-post to #review-queue on task->review transition, reviewQueueDepth in attention scoring (10pts/task cap 50), Tasks tab for reviewer in ProjectBox with 10s queue polling. 7 vitest + 4 cargo tests.
This commit is contained in:
parent
61f01e22b8
commit
323bb1b040
9 changed files with 397 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ const SCORE_CONTEXT_CRITICAL = 80; // >90% context
|
|||
const SCORE_FILE_CONFLICT = 70;
|
||||
const SCORE_CONTEXT_HIGH = 40; // >75% context
|
||||
|
||||
// Review queue scoring: 10pts per stale review, capped at 50
|
||||
const SCORE_REVIEW_PER_TASK = 10;
|
||||
const SCORE_REVIEW_CAP = 50;
|
||||
|
||||
export interface AttentionInput {
|
||||
sessionStatus: string | undefined;
|
||||
sessionError: string | undefined;
|
||||
|
|
@ -18,6 +22,8 @@ export interface AttentionInput {
|
|||
contextPressure: number | null;
|
||||
fileConflictCount: number;
|
||||
externalConflictCount: number;
|
||||
/** Number of tasks in 'review' status (for reviewer agents) */
|
||||
reviewQueueDepth?: number;
|
||||
}
|
||||
|
||||
export interface AttentionResult {
|
||||
|
|
@ -57,6 +63,14 @@ export function scoreAttention(input: AttentionInput): AttentionResult {
|
|||
};
|
||||
}
|
||||
|
||||
if (input.reviewQueueDepth && input.reviewQueueDepth > 0) {
|
||||
const score = Math.min(input.reviewQueueDepth * SCORE_REVIEW_PER_TASK, SCORE_REVIEW_CAP);
|
||||
return {
|
||||
score,
|
||||
reason: `${input.reviewQueueDepth} task${input.reviewQueueDepth > 1 ? 's' : ''} awaiting review`,
|
||||
};
|
||||
}
|
||||
|
||||
if (input.contextPressure !== null && input.contextPressure > 0.75) {
|
||||
return {
|
||||
score: SCORE_CONTEXT_HIGH,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue