A production bug prompt that forces AI to fix root cause before writing code

fute_nukem · x · 2026-11-06

A practical example of prompt design for data engineering: when an upstream column changed from a JSON object to a JSON string, the author crafted a prompt that makes the model first decide whether a pipeline code change is even needed (a SQL fix + upstream ping may suffice), prioritizes the lowest-compute, lowest-maintenance fix, explicitly bans expensive string-based workarounds, and prefers fixing at the source over adding permanent pipeline code or temp CTEs. The reply notes it's close to a one-shot solution once context is added — a good template for constraint-ordered engineering prompts.

Related event: Debate Flares Over Whether Prompting Is Hard in the Agent Era(2 posts)→

Original post →