-
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 create-expert coordinator instruction doesn't specify how to handle failures from delegated experts.
Current Behavior
CREATE_EXPERT_INSTRUCTION (lines 13-40) describes the workflow:
## Workflow
1. **Extract Properties**: Delegate to \`property-extractor\` with user requirements
- Get back: user properties + Perstack properties + usability properties + external dependencies
2. **Build Expert Ecosystem**: Delegate to \`ecosystem-builder\` with properties
- Get back: perstack.toml with Expert ecosystem (main + demo + setup + doctor)
3. **Integration Testing**: Delegate to \`integration-manager\`
...
4. **Generate Report**: Delegate to \`report-generator\`
...Missing
No guidance on:
- What happens if
property-extractorfails to extract meaningful properties? - What happens if
ecosystem-builderproduces invalid TOML? - What happens if
integration-managerreports test failures? - Should create-expert retry? Ask for clarification? Modify the ecosystem?
Expected Behavior
Per docs/understanding-perstack/experts.md:
When a Delegated Expert fails (unrecoverable error), the Job continues:
- The failed Run is marked as
stoppedByError- The error is returned to the Coordinator as the delegation result
- The Coordinator decides how to handle it (retry, try different Expert, give up)
The coordinator should have explicit error handling policies.
Target State
## Error Handling
If property-extractor fails:
- Ask user to clarify requirements
- Retry with more specific prompts
If ecosystem-builder produces invalid output:
- Request ecosystem-builder to fix the issue
- Retry up to 2 times before asking user for help
If integration-manager reports failures:
- Pass failure details back to ecosystem-builder for fixes
- Iterate until tests pass or max retries reached
If report-generator fails:
- Retry once, then provide raw test results to userAffected Areas
apps/create-expert/src/lib/create-expert-toml.ts:13-40(CREATE_EXPERT_INSTRUCTION)
Acceptance Criteria
- Add error handling policies for each delegation step
- Specify retry behavior
- Define when to escalate to user
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
create-expertcreate-expert CLI packagecreate-expert CLI packagerefactorCode improvement without behavior changeCode improvement without behavior change