-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
create-expertcreate-expert CLI packagecreate-expert CLI packagerefactorCode improvement without behavior changeCode improvement without behavior change
Description
Description
The ecosystem-builder instruction contains repetitive error handling guidance across multiple expert templates, violating the DRY principle and making updates error-prone.
Current State
Each template in ECOSYSTEM_BUILDER_INSTRUCTION repeats similar error handling guidance:
Main Expert Template:
## Error Handling
When errors occur, provide actionable guidance:
- "❌ Error: [what went wrong] | To fix: [specific steps]"
- Never fail silently - always explain what happened and how to resolve itSetup Expert Template:
## Error Handling
When setup fails, guide the user:
- "❌ Failed: [what went wrong] | To fix: [specific steps]"
- Suggest running the doctor expert for diagnosticsDoctor Expert Template:
## Output Format
For issues: "❌ Issue: [problem] | To fix: [steps]"
If healthy: "✓ All checks passed! <name> is ready to use."Issues:
- Three variations of the same "❌ ... | To fix: ..." pattern
- Slight inconsistencies (Error vs Failed vs Issue)
- Changes require updates in multiple places
Target State
Define error format once and reference it:
instruction = '''
...
## Error Format (applies to all ecosystem experts)
All errors must follow this format:
- "❌ [Type]: [description] | To fix: [actionable steps]"
- Type should be: Error, Failed, or Issue depending on context
- Never fail silently
For setup/doctor experts, also suggest related commands:
- Setup failures: "Run [name]-doctor for diagnostics"
- Doctor issues: "Run [name]-setup to reconfigure"
---
(Individual expert templates reference this shared format)
'''Alternatively, extract error handling into instruction preamble that ecosystem-builder generates, rather than embedding in each template.
Affected Areas
apps/create-expert/src/lib/create-expert-toml.ts(ECOSYSTEM_BUILDER_INSTRUCTION)
Acceptance Criteria
- No behavior changes
- Error format defined once
- All templates use consistent terminology
- Easier to update error format globally
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
create-expertcreate-expert CLI packagecreate-expert CLI packagerefactorCode improvement without behavior changeCode improvement without behavior change