From 675b8c474b45c787c4a829e79e9ef4635c52f521 Mon Sep 17 00:00:00 2001 From: HiranoMasaaki Date: Sat, 3 Jan 2026 05:27:06 +0000 Subject: [PATCH] fix(create-expert): use appendTextFile instead of editTextFile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ecosystem-builder instruction incorrectly told the LLM to use editTextFile for appending content. Per docs/making-experts/base-skill.md: - editTextFile: "Performs search-and-replace in text files" - appendTextFile: "Appends content to existing files" Changed to use appendTextFile which is the correct tool. Closes #354 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .changeset/use-append-text-file.md | 10 ++++++++++ apps/create-expert/src/lib/create-expert-toml.ts | 9 +++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .changeset/use-append-text-file.md diff --git a/.changeset/use-append-text-file.md b/.changeset/use-append-text-file.md new file mode 100644 index 00000000..170c2f70 --- /dev/null +++ b/.changeset/use-append-text-file.md @@ -0,0 +1,10 @@ +--- +"create-expert": patch +--- + +Use appendTextFile instead of editTextFile in ecosystem-builder + +The ecosystem-builder instruction incorrectly told the LLM to use +editTextFile for appending content. editTextFile is a search-and-replace +tool, not an append tool. Changed to use appendTextFile which is the +correct tool for adding content to the end of a file. diff --git a/apps/create-expert/src/lib/create-expert-toml.ts b/apps/create-expert/src/lib/create-expert-toml.ts index c9fd903a..d34368f0 100644 --- a/apps/create-expert/src/lib/create-expert-toml.ts +++ b/apps/create-expert/src/lib/create-expert-toml.ts @@ -87,13 +87,10 @@ Generate not just a single Expert, but an **ecosystem** of experts that ensures 4. **Doctor Expert**: Only if external dependencies exist - diagnoses and fixes issues ## Output -Use editTextFile to APPEND the Expert ecosystem to the existing perstack.toml. +Use appendTextFile to add the Expert ecosystem to perstack.toml. +First read the file to understand the existing structure, then append your Expert sections. Do NOT use writeTextFile - it would overwrite the entire file. - -## How to Append -1. First, read perstack.toml to understand the existing structure -2. Use editTextFile to add your Expert sections at the END of the file -3. Do NOT modify model, runtime, or provider settings - they already exist +Do NOT modify model, runtime, or provider settings - they already exist. ## Ecosystem Generation Strategy