Fix: child tasks only from spec/breakdown agents; live review badge
Two fixes from real usage: - Child-task creation is now gated to story-producing skills (spec-writing, story-breakdown). A code/design/test agent's output is the artifact — a numbered list in it (e.g. file names from an engineer) is no longer mistaken for child stories. - The review-inbox badge now updates without a refresh: it polls more often (6s), refetches on window focus, and reacts to a REVIEWS_CHANGED event the board fires after Run (with a couple of delayed pulses to catch the ~5s completion) and the review page fires after approve / send back. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -94,12 +94,20 @@ internal sealed class AgentRunExecutor(
|
||||
run.Complete(output, assembled.PrimaryAction, assembled.PrimaryActionRisk, result, completion.LatencyMs, clock.GetUtcNow());
|
||||
await db.SaveChangesAsync(cancellationToken);
|
||||
|
||||
// Only a spec / story-breakdown agent proposes child stories. Other actions (code, design,
|
||||
// tests) produce an artifact, not a backlog — so don't mistake a numbered list in their
|
||||
// output (e.g. a list of file names) for child tasks.
|
||||
var primarySkill = context.SkillKeys.Count > 0 ? context.SkillKeys[0] : null;
|
||||
var childTitles = primarySkill is "spec-writing" or "story-breakdown"
|
||||
? OutputParser.ExtractChildTitles(output)
|
||||
: Array.Empty<string>();
|
||||
|
||||
// Hand the parsed action to the gate: autonomy vs risk → execute now or hold in review.
|
||||
var gate = await actionGate.EvaluateAsync(
|
||||
new AgentActionProposal(
|
||||
run.Id, run.SeatId, context.AgentId, run.WorkItemId, context.TeamId, context.OrganizationId,
|
||||
context.Autonomy, assembled.PrimaryAction, assembled.PrimaryActionRisk,
|
||||
context.TaskTitle, output, OutputParser.ExtractChildTitles(output), assembled.Trace),
|
||||
context.TaskTitle, output, childTitles, assembled.Trace),
|
||||
cancellationToken);
|
||||
logger.LogInformation(
|
||||
"Run {RunId}: {Action} ({Risk}) → {Outcome}.",
|
||||
|
||||
Reference in New Issue
Block a user