Title here
Summary here
Status: Accepted Date: 2025-12-01 Supersedes: N/A Superseded by: N/A
Agent steps accept prompts in two forms: inline prompt field (for short prompts) and prompt_file field (for external markdown files with template interpolation). If both are set, behavior is ambiguous — which one wins? Silent precedence rules cause subtle bugs in workflow authoring.
| Option | Pros | Cons |
|---|---|---|
| XOR constraint (exactly one) | Unambiguous, fails fast, clear error | Slightly less flexible |
| Precedence rule (file wins) | Allows both, predictable | Silent override, confusing when inline is ignored |
| Merge (inline as fallback) | Maximum flexibility | Complex semantics, hard to debug |
Enforce mutual exclusivity at validation time:
AgentConfig.Validate() rejects configurations where both Prompt and PromptFile are setawf validate catches this statically before executionprompt_file supports full Go template interpolation and resolves via ADR-0006 path resolutionio.LimitReaderRules:
prompt or prompt_file must be set on agent stepsAgentConfig.Validate())What becomes easier:
What becomes harder:
| Principle | Status | Justification |
|---|---|---|
| Go Idioms | Compliant | Validation at parse time, explicit error handling |
| Minimal Abstraction | Compliant | Simple boolean check, no complex merge logic |
| Error Taxonomy | Compliant | Validation error = exit code 2 (configuration error) |