-
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 internal experts used by apps/create-expert use procedural step-by-step instructions, which violates Best Practice #2 "Trust the LLM, Define Domain Knowledge".
Current State
Most experts have numbered workflow steps:
instruction = """
## Workflow
1. **Extract Properties**: Delegate to `property-extractor` with user requirements
2. **Build Expert Ecosystem**: Delegate to `ecosystem-builder` with properties
3. **Integration Testing**: Delegate to `integration-manager`
4. **Generate Report**: Delegate to `report-generator`
"""Similarly, expert-tester has procedural instructions:
### 1. Execute Tests
For each test case, run:
```bash
npx -y perstack run expert-name "test query" --workspace . --filter completeRun
### Target State
Per Best Practices, instructions should define **domain knowledge, not procedures**:
```toml
# BAD (procedural)
instruction = """
1. First, greet the customer
2. Ask for their order number
3. Look up the order
"""
# GOOD (declarative)
instruction = """
You are a customer support specialist.
Key policies:
- Orders ship within 2 business days
- Free returns within 30 days
"""
Instructions should define:
- Role and capabilities
- Domain rules and policies
- Output expectations
- When to use delegates (not step-by-step how)
Affected Experts
create-expert(coordinator)property-extractorecosystem-builderintegration-managerfunctional-managerusability-managerexpert-testerreport-generator
Affected Areas
apps/create-expert/src/lib/create-expert-toml.ts
Acceptance Criteria
- No behavior changes (same test outcomes)
- Instructions describe domain knowledge, not procedures
- LLM can reason about "what" to achieve, not "how" step-by-step
- Follows patterns from
docs/making-experts/best-practices.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
create-expertcreate-expert CLI packagecreate-expert CLI packagerefactorCode improvement without behavior changeCode improvement without behavior change