From fa729353a7c58caf767000185cdea2da151f6d27 Mon Sep 17 00:00:00 2001 From: Sinabina Date: Thu, 23 Jul 2026 10:59:40 -0700 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20/plan=20empty-target=20fast=20path?= =?UTF-8?q?=20=E2=80=94=20probe=20before=20any=20module=20read?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A totally empty repo burned ~5k tokens of reference/module reading before the agent acknowledged there was nothing on disk. The plan dispatcher now runs one cheap ls -A probe first; an empty tree short-circuits to an immediate greenfield header, skips repo-evidence phases, and asks what to build when the prompt carries no idea. Co-Authored-By: Claude Fable 5 --- scripts/gstack2/generate-skill-tree.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/gstack2/generate-skill-tree.ts b/scripts/gstack2/generate-skill-tree.ts index 95120458e7..74e5251da3 100644 --- a/scripts/gstack2/generate-skill-tree.ts +++ b/scripts/gstack2/generate-skill-tree.ts @@ -209,6 +209,13 @@ function rootSkill(dispatcher: DispatcherDefinition): string { const scaleLine = dispatcher.name === 'plan' ? 'Scale: \n' : ''; + const emptyFastPath = dispatcher.name === 'plan' + ? ` +## Empty-target fast path + +Probe the target directory with one cheap listing (\`ls -A\`) before reading any reference file or specialist module. If the working tree is empty or holds only VCS/tooling metadata (\`.git\`, \`.gitignore\`, editor or CI config), do not spend further reading discovering that: print the required header immediately with \`Target: (empty repository — greenfield)\`, state in the first sentence after the header that the repository is empty, and plan from the prompt alone. Skip decision-store recall, repository scanning, and every specialist phase whose input is existing code — there is none. If the prompt carries no idea to plan, ask the single question of what the user wants to build before reading any module. An empty tree fixes the codebase vector at greenfield; scale comes from the prompt alone. +` + : ''; const buildScale = dispatcher.name === 'plan' ? ` ## Build scale @@ -255,7 +262,7 @@ Web context: 6. Preserve report-only versus mutation boundaries. Missing mutation authorization fails closed: do not edit merely because a specialist can fix. Commits, pushes, PRs, merges, deploys, messages, and other external mutations still require affirmative authority from the user. 7. Match the user's language. Keep code identifiers, commands, and source quotations original when translation would reduce accuracy. 8. At exit, report completed artifacts, evidence, unresolved decisions, skipped modules with reasons, and any blocked gate. -${supplemental}${buildScale} +${supplemental}${emptyFastPath}${buildScale} ## Top-level modes From 49b86878d80f2fac869dd1709ed4d9a62f02ed09 Mon Sep 17 00:00:00 2001 From: Sinabina Date: Thu, 23 Jul 2026 10:59:41 -0700 Subject: [PATCH 2/2] chore: regenerate gstack2 tree for /plan empty-target fast path Co-Authored-By: Claude Fable 5 --- evals/parity/transcripts/policy-units.json | 2 +- skills/plan/SKILL.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/evals/parity/transcripts/policy-units.json b/evals/parity/transcripts/policy-units.json index b94d7a1daf..dfb5fe9777 100644 --- a/evals/parity/transcripts/policy-units.json +++ b/evals/parity/transcripts/policy-units.json @@ -426,7 +426,7 @@ "prompt_sha256": "51b7d53bc342e8632e34ae31a167cbde568ab5ee2a6dd2ccc980583a30604164", "semantic_attempt_sha256": "06f77b27c9bd360562655b23ca00a0dd021bdb14ebaaf3d836845e4e0cb43d68" }, - "policy_sha256": "7436f2bd70592738eda54ae9666d52ae909a4d44c06297e6486afda124cdbf41", + "policy_sha256": "226f7b3d386e486e58d301ca48575a100086fc523d9b6d3b333d5f2311b3f41a", "policy_present": true, "prompt_is_not_authority_input": true, "verdict": "PASS" diff --git a/skills/plan/SKILL.md b/skills/plan/SKILL.md index 36452e7f72..e7809662fb 100644 --- a/skills/plan/SKILL.md +++ b/skills/plan/SKILL.md @@ -36,6 +36,10 @@ Web context: 9. Classify the Scale header line from the Build scale section before any questioning begins. Every planning specialist applies its proportional-planning judgment port to that scale. +## Empty-target fast path + +Probe the target directory with one cheap listing (`ls -A`) before reading any reference file or specialist module. If the working tree is empty or holds only VCS/tooling metadata (`.git`, `.gitignore`, editor or CI config), do not spend further reading discovering that: print the required header immediately with `Target: (empty repository — greenfield)`, state in the first sentence after the header that the repository is empty, and plan from the prompt alone. Skip decision-store recall, repository scanning, and every specialist phase whose input is existing code — there is none. If the prompt carries no idea to plan, ask the single question of what the user wants to build before reading any module. An empty tree fixes the codebase vector at greenfield; scale comes from the prompt alone. + ## Build scale Classify the request on fifteen scale vectors before any questioning begins, from the prompt and cheap repository evidence only. Never run a questioning round merely to classify scale. Default unknown vectors to the low end; the specialist's own workflow raises the scale naturally when answers reveal more (builder talk turning into startup talk upgrades mid-session).