FN-6904: name CE slash commands in built-in workflow prompts
Built-in compound-engineering workflow prompts now point agents at the intended /ce- skill commands directly. - Prefix each compound-engineering skill stage prompt with its matching /ce- slash command. - Add workflow coverage that verifies every skill-node prompt names the expected command while the merge boundary stays generic. - Add a patch changeset for the published Fusion package. Files changed: .changeset/fn-6904-ce-workflow-prompt-skill-callout.md | 5 +++++ packages/core/src/__tests__/builtin-workflows.test.ts | 18 ++++++++++++++++++ packages/core/src/builtin-workflows.ts | 16 ++++++++++------ 3 files changed, 33 insertions(+), 6 deletions(-) Fusion-Task-Id: FN-6904 Fusion-Task-Lineage: c1d8c9cd-c0ae-49a0-a287-48721490f41f
This commit is contained in:
5
.changeset/fn-6904-ce-workflow-prompt-skill-callout.md
Normal file
5
.changeset/fn-6904-ce-workflow-prompt-skill-callout.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@runfusion/fusion": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Built-in compound-engineering workflow prompts now explicitly call out the `/ce-` skill slash command at each stage.
|
||||||
@@ -379,6 +379,24 @@ describe("built-in workflows", () => {
|
|||||||
expect(execute!.toolMode).toBe("coding");
|
expect(execute!.toolMode).toBe("coding");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("compound-engineering skill-node prompts name their /ce- slash commands", () => {
|
||||||
|
const ce = getBuiltinWorkflow("builtin:compound-engineering")!;
|
||||||
|
const byId = (id: string) => ce.ir.nodes.find((n) => n.id === id);
|
||||||
|
const expectedPrompts = new Map([
|
||||||
|
["plan", "/ce-plan"],
|
||||||
|
["execute", "/ce-work"],
|
||||||
|
["code-review", "/ce-code-review"],
|
||||||
|
["commit-pr", "/ce-commit-push-pr"],
|
||||||
|
["resolve-feedback", "/ce-resolve-pr-feedback"],
|
||||||
|
["document", "/ce-compound"],
|
||||||
|
]);
|
||||||
|
|
||||||
|
for (const [nodeId, slashCommand] of expectedPrompts) {
|
||||||
|
expect(String(byId(nodeId)?.config?.prompt ?? "")).toContain(slashCommand);
|
||||||
|
}
|
||||||
|
expect(String(byId("merge")?.config?.prompt ?? "")).not.toContain("/ce-");
|
||||||
|
});
|
||||||
|
|
||||||
it("compound-engineering merge stage uses the CE commit/PR + resolve-feedback skills", () => {
|
it("compound-engineering merge stage uses the CE commit/PR + resolve-feedback skills", () => {
|
||||||
const ce = getBuiltinWorkflow("builtin:compound-engineering")!;
|
const ce = getBuiltinWorkflow("builtin:compound-engineering")!;
|
||||||
const byId = (id: string) => ce.ir.nodes.find((n) => n.id === id);
|
const byId = (id: string) => ce.ir.nodes.find((n) => n.id === id);
|
||||||
|
|||||||
@@ -175,6 +175,10 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
|
|||||||
createdAt: BUILTIN_TS,
|
createdAt: BUILTIN_TS,
|
||||||
updatedAt: BUILTIN_TS,
|
updatedAt: BUILTIN_TS,
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
|
* FNXC:Workflows 2026-06-21-00:00:
|
||||||
|
* FN-6904 requires every compound-engineering stage prompt to name its /ce- slash command explicitly. The prompt body stays self-documenting and reinforces the skill invocation even when executor skill preambles change.
|
||||||
|
*/
|
||||||
linear({
|
linear({
|
||||||
id: "builtin:compound-engineering",
|
id: "builtin:compound-engineering",
|
||||||
name: "Compound engineering (built-in)",
|
name: "Compound engineering (built-in)",
|
||||||
@@ -191,7 +195,7 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
|
|||||||
// fn_spawn_agent (registered only for coding-mode steps). It is not
|
// fn_spawn_agent (registered only for coding-mode steps). It is not
|
||||||
// meant to write — see the accepted write-capability posture (Risk-1).
|
// meant to write — see the accepted write-capability posture (Risk-1).
|
||||||
toolMode: "coding",
|
toolMode: "coding",
|
||||||
prompt: "Produce a short implementation plan for this task before any code is written.",
|
prompt: "Run /ce-plan to produce a short implementation plan for this task before any code is written.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -205,7 +209,7 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
|
|||||||
// default and would strip them). ce-work does the implementation the
|
// default and would strip them). ce-work does the implementation the
|
||||||
// CE way instead of the generic executor seam.
|
// CE way instead of the generic executor seam.
|
||||||
toolMode: "coding",
|
toolMode: "coding",
|
||||||
prompt: "Execute the plan for this task, following existing patterns and maintaining quality throughout.",
|
prompt: "Run /ce-work to execute the plan for this task, following existing patterns and maintaining quality throughout.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -224,7 +228,7 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
|
|||||||
// subagents via fn_spawn_agent. As a gate step it still emits the
|
// subagents via fn_spawn_agent. As a gate step it still emits the
|
||||||
// verdict JSON (KTD-6); it is not meant to write the tree (Risk-1).
|
// verdict JSON (KTD-6); it is not meant to write the tree (Risk-1).
|
||||||
toolMode: "coding",
|
toolMode: "coding",
|
||||||
prompt: "Run a structured code review of the changes. Block merge on P0/P1 findings.",
|
prompt: "Run /ce-code-review to perform a structured code review of the changes. Block merge on P0/P1 findings.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -239,7 +243,7 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
|
|||||||
// stays with Fusion's merge seam below (workflow-owned merge), so the
|
// stays with Fusion's merge seam below (workflow-owned merge), so the
|
||||||
// two never race the same branch state.
|
// two never race the same branch state.
|
||||||
toolMode: "coding",
|
toolMode: "coding",
|
||||||
prompt: "Commit the work in logical commits, push the branch, and open a pull request with a value-first description.",
|
prompt: "Run /ce-commit-push-pr to commit the work in logical commits, push the branch, and open a pull request with a value-first description.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -253,7 +257,7 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
|
|||||||
// Resolves open PR review threads. On the first autonomous pass there
|
// 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
|
// 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.
|
// 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.",
|
prompt: "Run /ce-resolve-pr-feedback to resolve open PR review feedback: evaluate each thread, fix valid issues, and reply.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ id: "merge", kind: "prompt", config: builtinPromptConfig("merge", "Merge boundary") },
|
{ id: "merge", kind: "prompt", config: builtinPromptConfig("merge", "Merge boundary") },
|
||||||
@@ -267,7 +271,7 @@ export const BUILTIN_WORKFLOWS: WorkflowDefinition[] = [
|
|||||||
// Coding mode so ce-compound can WRITE the learning doc into
|
// Coding mode so ce-compound can WRITE the learning doc into
|
||||||
// docs/solutions (readonly would strip write tools).
|
// docs/solutions (readonly would strip write tools).
|
||||||
toolMode: "coding",
|
toolMode: "coding",
|
||||||
prompt: "Capture any reusable learnings from this task into docs/solutions.",
|
prompt: "Run /ce-compound to capture any reusable learnings from this task into docs/solutions.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user