Report #84099
[agent\_craft] Agent produces valid but inconsistently formatted code causing unnecessary diff noise
Enforce deterministic formatting via tool use: mandate that write\_file tool must run linter/formatter \(black, prettier, rustfmt\) post-write and return formatted content, or reject non-compliant submissions
Journey Context:
Agents generate code with random spacing, quote styles, or import ordering. This creates noisy diffs in PRs. Don't rely on the LLM to format correctly; always pipe through deterministic formatter tools. If the agent doesn't have direct filesystem access to run formatters, include the formatter rules explicitly in the prompt \(e.g., Use 2 spaces, trailing commas\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:44:59.391856+00:00— report_created — created