feat(workflow): CE commit/PR + resolve-feedback in the merge stage (U9)

Add ce-commit-push-pr and ce-resolve-pr-feedback as coding-mode skill
steps before the merge seam. Per KTD-6 the CE steps own commit/push/PR
creation and feedback resolution; Fusion's merge seam still owns the
board-state merge transition, so the two never race the same branch.
Tests assert the new steps, coding mode, preserved merge seam, and
ordering.

NOTE: the precise handoff between ce-commit-push-pr's PR and Fusion's
workflow-owned board merge (Risk-3) needs verification on a running board.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-13 09:01:18 -07:00
parent e24a3e8150
commit 2e03e54383
2 changed files with 45 additions and 0 deletions

View File

@@ -288,6 +288,22 @@ describe("built-in workflows", () => {
expect(execute!.toolMode).toBe("coding");
});
it("compound-engineering merge stage uses the CE commit/PR + resolve-feedback skills", () => {
const ce = getBuiltinWorkflow("builtin:compound-engineering")!;
const byId = (id: string) => ce.ir.nodes.find((n) => n.id === id);
expect(byId("commit-pr")?.config?.skillName).toBe("compound-engineering:ce-commit-push-pr");
expect(byId("commit-pr")?.config?.toolMode).toBe("coding");
expect(byId("resolve-feedback")?.config?.skillName).toBe("compound-engineering:ce-resolve-pr-feedback");
// KTD-6: the Fusion board-merge seam is preserved (CE prepares the PR, Fusion
// owns the merge transition).
expect(byId("merge")?.config?.seam).toBe("merge");
// Ordering: commit-pr → resolve-feedback → merge → document.
const ids = ce.ir.nodes.map((n) => n.id);
expect(ids.indexOf("commit-pr")).toBeLessThan(ids.indexOf("resolve-feedback"));
expect(ids.indexOf("resolve-feedback")).toBeLessThan(ids.indexOf("merge"));
expect(ids.indexOf("merge")).toBeLessThan(ids.indexOf("document"));
});
describe("store integration", () => {
const harness = createTaskStoreTestHarness();
let store: ReturnType<typeof harness.store>;

View File

@@ -191,6 +191,35 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
prompt: "Run a structured code review of the changes. Block merge on P0/P1 findings.",
},
},
{
id: "commit-pr",
kind: "prompt",
config: {
name: "Commit & open PR",
executor: "skill",
skillName: "compound-engineering:ce-commit-push-pr",
// Coding mode: this step runs git + gh. Per KTD-6 it OWNS commit /
// push / PR creation; it does NOT perform the board-state merge — that
// stays with Fusion's merge seam below (workflow-owned merge), so the
// two never race the same branch state.
toolMode: "coding",
prompt: "Commit the work in logical commits, push the branch, and open a pull request with a value-first description.",
},
},
{
id: "resolve-feedback",
kind: "prompt",
config: {
name: "Resolve PR feedback",
executor: "skill",
skillName: "compound-engineering:ce-resolve-pr-feedback",
toolMode: "coding",
// Resolves open PR review threads. On the first autonomous pass there
// may be no feedback yet (review is async); the skill no-ops when there
// are no threads, and a re-run picks up later feedback.
prompt: "Resolve open PR review feedback: evaluate each thread, fix valid issues, and reply.",
},
},
{ id: "merge", kind: "prompt", config: builtinPromptConfig("merge", "Merge boundary") },
{
id: "document",