diff --git a/.changeset/refactor-382-context-passing.md b/.changeset/refactor-382-context-passing.md new file mode 100644 index 00000000..67f83c7a --- /dev/null +++ b/.changeset/refactor-382-context-passing.md @@ -0,0 +1,6 @@ +--- +"create-expert": patch +--- + +Clarify context passing mechanism between delegates + diff --git a/apps/create-expert/src/lib/create-expert-toml.ts b/apps/create-expert/src/lib/create-expert-toml.ts index c3a09533..be15ebe6 100644 --- a/apps/create-expert/src/lib/create-expert-toml.ts +++ b/apps/create-expert/src/lib/create-expert-toml.ts @@ -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 @@ -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: