Skip to content

Commit 7f9db12

Browse files
authored
fix(workflows): ensure workflow-builder injects $ARGUMENTS in generated YAMLs (#1733)
Fixes #1535 The workflow-builder's generate-yaml node did not explicitly require generated workflows to reference $ARGUMENTS (or $USER_MESSAGE). When the AI generated single-node workflows that accept user input, it described the input in prose but omitted the $ARGUMENTS substitution variable. The harness captured the user's invocation message but never injected it into the node's conversation. Changes: - Add rule 13 to generate-yaml prompt: every workflow that accepts user input MUST reference $ARGUMENTS in at least one node prompt - Add validation warning in validate-yaml when neither $ARGUMENTS nor $USER_MESSAGE appears in the generated YAML - Regenerate bundled defaults
1 parent 8028521 commit 7f9db12

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.archon/workflows/defaults/archon-workflow-builder.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ nodes:
189189
10. Use `allowed_tools: []` on classification/analysis nodes that don't need tools
190190
11. Use `denied_tools: [Edit, Bash]` when a node should only use Write (not edit existing files)
191191
12. Prefer `model: haiku` for simple classification tasks to save cost
192+
13. **CRITICAL**: Every generated workflow that accepts user input MUST reference `$ARGUMENTS` (or `$USER_MESSAGE`) in at least one node prompt. For single-node workflows, include it directly in the prompt (e.g., `$ARGUMENTS` on its own line under a `## Input` or `## Request` heading). Without this, the user's invocation message is captured by the harness but never injected into the node's conversation — the agent sees an empty input.
192193
193194
## Output
194195
@@ -223,6 +224,10 @@ nodes:
223224
exit 1
224225
fi
225226
227+
if ! grep -q '\$ARGUMENTS\|\$USER_MESSAGE' "$FILE"; then
228+
echo "WARNING: workflow does not reference \$ARGUMENTS or \$USER_MESSAGE — user input will not be injected into node prompts"
229+
fi
230+
226231
echo "VALID"
227232
depends_on: [generate-yaml]
228233

0 commit comments

Comments
 (0)