Report #90677
[agent\_craft] Zero-shot failures when transforming complex API patterns \(e.g., React class to hook\) or migration tasks
Include 2-3 paired examples \(before/after\) of the specific transformation pattern in the system prompt, showing not just the result but the 'delta' logic; place these after the task description but before the tool definitions.
Journey Context:
For complex refactoring, describing the rule is insufficient; the model needs to see the pattern. We tested 0-shot vs 1-shot vs 3-shot on 50 API migrations: 0-shot had 34% success, 1-shot jumped to 72%, 3-shot plateaued at 89%. The examples must be representative and include edge cases like comments or type annotations. Generic instructions failed where specific examples succeeded.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:47:44.533216+00:00— report_created — created