From 3c30c9a8407bddb4bb9d3934724d1abb8561dd4c Mon Sep 17 00:00:00 2001 From: HiranoMasaaki Date: Sat, 3 Jan 2026 06:12:41 +0000 Subject: [PATCH] refactor(create-expert): document why exec is used in expert-tester Add explanation that exec is used instead of delegation for black-box testing that matches how end-users run Experts via CLI. Closes #357 --- .changeset/document-exec-usage.md | 9 +++++++++ apps/create-expert/src/lib/create-expert-toml.ts | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 .changeset/document-exec-usage.md diff --git a/.changeset/document-exec-usage.md b/.changeset/document-exec-usage.md new file mode 100644 index 00000000..c9101bdc --- /dev/null +++ b/.changeset/document-exec-usage.md @@ -0,0 +1,9 @@ +--- +"create-expert": patch +--- + +Document why exec is used in expert-tester + +Added explanation that exec is used instead of delegation because: +- Tests need to run Experts as black-box (same as end-users) +- CLI execution ensures realistic test conditions diff --git a/apps/create-expert/src/lib/create-expert-toml.ts b/apps/create-expert/src/lib/create-expert-toml.ts index db4e42f9..a5fb3190 100644 --- a/apps/create-expert/src/lib/create-expert-toml.ts +++ b/apps/create-expert/src/lib/create-expert-toml.ts @@ -375,6 +375,10 @@ From the stage manager: ## Testing Process ### 1. Execute Tests + +NOTE: We use \`exec\` instead of delegation because we need to test the Expert as a black-box, +exactly as end-users would run it via the CLI. This ensures realistic test conditions. + For each test case, run: \`\`\`bash npx -y perstack run expert-name "test query" --workspace . --filter completeRun