fix: add learning-pipeline guardrails to builder, fixer, and reviewer prompts
loading diff…
Analyzed 72 fix PRs from the mercury learning pipeline (learning-pipeline + tool-fixer labels). Found recurring patterns of mistakes that the builder creates and the fixer makes worse. These targeted prompt additions prevent the top issues at source.
Builder prompt (action_builder/prompt.py):
raise_for_status() placement: must come AFTER custom error handlers, not before (was creating dead code in ~6 PRs)quote() (4+ PRs had broken URLs from unencoded emails/IDs)AliasChoices instead of exposing both old and new field names (5+ PRs)Fixer prompt (fix_action_prompt.py):
AliasChoices not duplicate fieldsReviewer prompt (reviewer/prompt.py):
make chk passes (ruff format, ruff lint, pyrefly type check all green)Analysis source: 72 open PRs in ComposioHQ/mercury with learning-pipeline + tool-fixer labels. Verdict breakdown: 38 good (52%), 26 acceptable (36%), 6 questionable (8%), 3 bad (4%). The prompt changes target the top recurring patterns across all categories.