-
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 framework passes context between delegates (properties, test results, ecosystem info), but the mechanism is unclear from the instructions.
Current State
create-expert (coordinator):
## Important
- Pass context between delegates (properties, test results, ecosystem info)
report-generator:
## Input
- Original requirements
- Extracted properties
- Test results from all stages (including usability)
- Expert ecosystem information
Issues:
- "Pass context between delegates" - how? Via query string? Via workspace files?
- report-generator expects 4 types of input but doesn't explain how to receive them
- Per Perstack design, delegates start with empty history and only receive the query
From docs/understanding-perstack/experts.md:
Context is never shared between Experts. The delegate receives only the query — no message history, no parent context.
This means all context must be passed via:
- The query string itself (inline JSON or structured text)
- Workspace files
Target State
Make the context-passing mechanism explicit:
Option A: Query-based (inline context)
instruction = '''
## Context Passing
When delegating, include context in the query:
- Property extraction: "Requirements: [original requirements]"
- Ecosystem building: "Properties: [JSON of extracted properties]"
- Report generation: Include JSON with all accumulated data
Example delegation query:
"Generate report with:
- Requirements: [...]
- Properties: [...]
- Test results: [...]"
'''Option B: Workspace-based (file context)
instruction = '''
## Context Passing
Use workspace files for accumulated state:
- property-extractor writes: .perstack-context/properties.json
- ecosystem-builder reads properties, writes: .perstack-context/ecosystem.json
- integration-manager reads both, writes: .perstack-context/test-results.json
- report-generator reads all files to generate final report
'''Affected Areas
apps/create-expert/src/lib/create-expert-toml.ts- All expert instructions that pass or receive context
Acceptance Criteria
- Context-passing mechanism is explicitly documented
- Aligns with Perstack context isolation design
- Each delegate knows where to find its inputs
- Each delegate knows where to store its outputs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
create-expertcreate-expert CLI packagecreate-expert CLI packagerefactorCode improvement without behavior changeCode improvement without behavior change