From 71b413f20cdea793aa91ee1c459d82a55e170d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Thu, 7 May 2026 14:20:23 +0000 Subject: [PATCH] feat(planner): add phase granularity guidance to reduce over-splitting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simple tasks were getting 3 phases when 1 would suffice. Added explicit complexity-to-phase-count mapping in the planner system prompt. 小橘 🍊 --- packages/workflow-role-planner/src/planner.ts | 10 ++++++++++ packages/workflow/workflow | 1 + 2 files changed, 11 insertions(+) create mode 120000 packages/workflow/workflow diff --git a/packages/workflow-role-planner/src/planner.ts b/packages/workflow-role-planner/src/planner.ts index f77faf1..371e0da 100644 --- a/packages/workflow-role-planner/src/planner.ts +++ b/packages/workflow-role-planner/src/planner.ts @@ -36,6 +36,16 @@ Replace \`\` with the actual thread ID you found above. The command p **Do NOT store phase details in any other way** (no temp files, no invented paths). The CLI command is the only supported storage mechanism. +## Phase granularity + +Match the number of phases to task complexity: +- Trivial (add a config option, fix a typo, rename): 1 phase +- Small (a new feature touching 2-3 files): 1-2 phases +- Medium (cross-module refactor): 2-3 phases +- Large (new subsystem, architectural change): 3-5 phases + +Fewer phases is always better. Each phase must justify its existence — if two phases would be tested together anyway, merge them. + ## Output format After storing all phases via the CLI, output compact JSON only: diff --git a/packages/workflow/workflow b/packages/workflow/workflow new file mode 120000 index 0000000..52a4c2d --- /dev/null +++ b/packages/workflow/workflow @@ -0,0 +1 @@ +/home/azureuser/repos/uncaged-workflow/packages/workflow \ No newline at end of file