diff --git a/doc/agents/common-mistakes.md b/doc/agents/common-mistakes.md index 29731dab7..143b87a99 100644 --- a/doc/agents/common-mistakes.md +++ b/doc/agents/common-mistakes.md @@ -6,12 +6,14 @@ Patterns observed across multiple AI agent interactions on the ProxySQL codebase **Symptom:** PR targets `v3.0` (main) instead of the feature branch. -**Root cause:** Agent defaults to the repository's main/default branch when no branch is specified in the issue. +**Root cause:** Agents prioritize technical content over administrative instructions. Even when branch info is present in the issue, agents often skim past it while focusing on code requirements, then use heuristics (e.g., most recent branch, default branch) to fill the gap they don't realize they have. + +**Prevention:** Place git workflow instructions **at the very top** of the issue, before the technical description. Agents read top-down with decreasing attention — administrative details buried after exciting code specs will be skipped. -**Prevention:** Always specify in the issue: ``` -Create branch `v3.0-XXXX` from `v3.0-5473` -PR target: `v3.0-5473` +### FIRST: Git workflow (do this before reading anything else) +- Create branch `v3.0-XXXX` from `v3.0-5473` +- PR target: `v3.0-5473` ``` **Detection:** Check `gh pr view --json baseRefName` after PR creation. diff --git a/doc/agents/task-assignment-template.md b/doc/agents/task-assignment-template.md index 770b754c8..f9838b26f 100644 --- a/doc/agents/task-assignment-template.md +++ b/doc/agents/task-assignment-template.md @@ -13,6 +13,11 @@ Use this template when writing GitHub issues that will be assigned to AI coding ```markdown ## Task: +### FIRST: Git workflow (do this before reading anything else) +- Create branch `` from `` +- PR target: `` +- If upstream changes needed: `git rebase`, NOT `git merge` + ### Context @@ -21,11 +26,6 @@ Use this template when writing GitHub issues that will be assigned to AI coding - [ ] New file: `` — - [ ] Modified: `` — -### Git workflow -- Create branch `` from `` -- PR target: `` -- If upstream changes needed: `git rebase`, NOT `git merge` - ### Implementation details