Skip to content

Fix: ecosystem-builder incorrectly instructs to use editTextFile for appending #354

@FL4TLiN3

Description

@FL4TLiN3

Description

The ecosystem-builder instruction tells the LLM to use editTextFile for appending content, which is misleading. According to docs/making-experts/base-skill.md, editTextFile is a search-and-replace tool, not an append tool.

Current Behavior

ECOSYSTEM_BUILDER_INSTRUCTION (lines 90-94) states:

## Output
Use editTextFile to APPEND the Expert ecosystem to the existing perstack.toml.
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

Expected Behavior

According to docs/making-experts/base-skill.md:

  • editTextFile: "Performs search-and-replace in text files" - requires finding oldText and replacing with newText
  • appendTextFile: "Appends content to existing files" - directly adds content to end of file

The instruction should recommend appendTextFile for adding content to the end of a file.

Impact

The LLM may:

  1. Fail to find appropriate oldText to match for the edit
  2. Accidentally overwrite parts of the file
  3. Produce confusing errors about "oldText must exist in file"

Affected Areas

  • apps/create-expert/src/lib/create-expert-toml.ts:90-97 (ECOSYSTEM_BUILDER_INSTRUCTION)

Recommendation

Change instruction to:

## Output
Use appendTextFile to add the Expert ecosystem to perstack.toml.
First read the file to understand the existing structure.

Acceptance Criteria

  • Instruction recommends appendTextFile for adding content to end of file
  • Remove misleading "APPEND" terminology when referring to editTextFile

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcreate-expertcreate-expert CLI package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions