feat(pi-workflow): reuse standard agent profiles

This commit is contained in:
jb
2026-08-26 22:51:20 -04:00
parent a4784b75c3
commit aa50f0fd16
12 changed files with 606 additions and 54 deletions
+8 -4
View File
@@ -12,10 +12,11 @@ import {
stat,
} from "node:fs/promises";
import * as path from "node:path";
import type {
PlanArtifact,
WorkflowReportArtifact,
WorkflowRun,
import {
DEFAULT_WORKFLOW_CONFIG,
type PlanArtifact,
type WorkflowReportArtifact,
type WorkflowRun,
} from "./domain.ts";
import { deriveRunLabel } from "./run-label.ts";
@@ -299,6 +300,9 @@ export class WorkflowStore {
run.affectedUiSurfaces ??= [];
run.reviewCycles ??= 0;
run.verificationCycles ??= 0;
run.effectiveConfig.standardAgents ??= structuredClone(
DEFAULT_WORKFLOW_CONFIG.standardAgents,
);
for (const assignment of run.assignments) {
if (assignment.gitBefore) assignment.gitBefore.pathStatuses ??= {};
if (assignment.gitAfter) assignment.gitAfter.pathStatuses ??= {};