From ee77a8d3faf6269c579506909cda62847e8c20b9 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 31 Jul 2026 22:38:52 -0700 Subject: [PATCH] FN-8659: preserve custom task specification sections Preserve custom planning sections while reinjecting the original task description. - Align unmarked original-description bodies before selecting a terminator. - Anchor inserted descriptions before custom H2 sections and retain safe fallback behavior. - Add regression coverage, workflow documentation, and a patch changeset. Files changed: ...fn-8659-original-description-custom-sections.md | 7 ++ docs/workflow-steps.md | 2 + .../__tests__/original-description-policy.test.ts | 114 ++++++++++++++++- packages/core/src/original-description-policy.ts | 135 ++++++++++++++++++--- 4 files changed, 235 insertions(+), 23 deletions(-) Fusion-Task-Id: FN-8659 Fusion-Task-Lineage: 7f047a31-3750-4545-b743-bfac9546c55b Co-authored-by: Fusion (runfusion.ai) --- ...59-original-description-custom-sections.md | 7 + docs/workflow-steps.md | 2 + .../original-description-policy.test.ts | 114 ++++++++++++++- .../core/src/original-description-policy.ts | 135 +++++++++++++++--- 4 files changed, 235 insertions(+), 23 deletions(-) create mode 100644 .changeset/fn-8659-original-description-custom-sections.md diff --git a/.changeset/fn-8659-original-description-custom-sections.md b/.changeset/fn-8659-original-description-custom-sections.md new file mode 100644 index 0000000000..5bbb26bc9f --- /dev/null +++ b/.changeset/fn-8659-original-description-custom-sections.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Preserve custom plan sections when Fusion refreshes the original task description. +category: fix +dev: Uses positional alignment with safe/unsafe partial handling for unmarked descriptions and anchors inserts before the first H2. diff --git a/docs/workflow-steps.md b/docs/workflow-steps.md index 1b96ff8416..ecebcdb1cf 100644 --- a/docs/workflow-steps.md +++ b/docs/workflow-steps.md @@ -102,6 +102,8 @@ The executor logs `[skill-load]` only when the **named** skill has no viable dis Use the dashboard [Workflow Editor](./workflow-editor.md) to inspect built-ins, tune built-in prompts, duplicate workflows, or author custom workflows. Custom workflows can declare graph nodes and edges, columns/traits, task fields, typed workflow settings, model lanes, optional workflow-step templates, and author-time validation. Use this page for runtime semantics; use the editor guide for the visual authoring surface. +Customized planning prompts may add their own `##` sections to generated task specifications. Fusion preserves those sections when it refreshes the verbatim **Original Description** block after planning, so custom prompt structure can appear alongside the built-in specification sections. +