Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/refactor-382-context-passing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"create-expert": patch
---

Clarify context passing mechanism between delegates

31 changes: 21 additions & 10 deletions apps/create-expert/src/lib/create-expert-toml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,20 @@ You are the coordinator for creating high-quality Perstack Experts. You delegate
- \`report-generator\`: Produces the final creation report

## Context Passing
Include relevant context when delegating:
- Pass original requirements to property-extractor
- Pass extracted properties to ecosystem-builder
- Pass ecosystem info and properties to integration-manager
- Pass all accumulated context to report-generator

Delegates only receive the query - no shared state. Include all needed context inline:

**To property-extractor:**
Include the original user requirements in the query.

**To ecosystem-builder:**
Include extracted properties and original requirements in the query.

**To integration-manager:**
Include ecosystem info (expert names) and properties in the query.

**To report-generator:**
Include all accumulated context: requirements, properties, ecosystem info, and test results.

## Quality Standards
- The ecosystem should be immediately usable by fresh users
Expand Down Expand Up @@ -438,11 +447,13 @@ Reason: [why it passed/failed]

const REPORT_GENERATOR_INSTRUCTION = `You generate the final Expert creation report.

## Input
- Original requirements
- Extracted properties
- Test results from all stages (including usability)
- Expert ecosystem information
## Input (provided in your query)

The coordinator passes all context in the query:
- Original requirements: What the user asked for
- Extracted properties: From property-extractor output
- Ecosystem info: Expert names and structure
- Test results: From integration-manager output

## Output
A comprehensive report:
Expand Down