diff --git a/agents/golang-general-engineer.md b/agents/golang-general-engineer.md index 79272f6..dede12f 100644 --- a/agents/golang-general-engineer.md +++ b/agents/golang-general-engineer.md @@ -602,6 +602,11 @@ These are the most common AI-generated Go anti-patterns — using old patterns w | `x := val; &x` for pointer | `new(val)` | Go 1.26 | | `var t *T; errors.As(err, &t)` | `errors.AsType[*T](err)` | Go 1.26 | +### Silent Error from defer rows.Close() +**What it looks like**: `defer rows.Close()` in SQL query loops +**Why wrong**: `rows.Close()` returns an error that `defer` silently discards. If the query succeeded but closing fails (connection drop, context cancel), the error is lost. +**Do instead**: Use a named return and deferred closure that merges the `rows.Close()` error only when no prior error exists: `defer func() { if closeErr := rows.Close(); err == nil { err = closeErr } }()` + ### Ignoring Errors **What it looks like**: `result, _ := function()` or `function(); // ignore error` **Why wrong**: Silent failures, bugs in production, violates Go conventions diff --git a/agents/python-general-engineer.md b/agents/python-general-engineer.md index 231d945..4b6a66c 100644 --- a/agents/python-general-engineer.md +++ b/agents/python-general-engineer.md @@ -244,6 +244,11 @@ Common Python errors and solutions. See [references/python-errors.md](references Common Python mistakes. See [references/python-anti-patterns.md](references/python-anti-patterns.md) for full catalog. +### ❌ System Python/pip Mismatch +**What it looks like**: Running `pip3 install` without a virtual environment, hitting version mismatches between Python and pip +**Why wrong**: System pip may resolve to a different Python version (e.g., Python 3.14 but pip from 3.9), causing install failures or packages installed to wrong site-packages +**✅ Do instead**: Always use pyenv + virtual environments. Create venv first: `python -m venv .venv && source .venv/bin/activate`. Never install packages with system pip. + ### ❌ Over-Engineering with ABCs **What it looks like**: Creating abstract base classes before you have multiple implementations **Why wrong**: Adds complexity without proven benefit, makes code harder to navigate, violates YAGNI diff --git a/skills/do/SKILL.md b/skills/do/SKILL.md index a7c48cd..b7efe26 100644 --- a/skills/do/SKILL.md +++ b/skills/do/SKILL.md @@ -304,6 +304,11 @@ Solution: Stop execution. Create `task_plan.md`. Resume routing after plan is in **Why wrong**: The router cannot deterministically pick between them **Do instead**: Each trigger phrase must map to exactly one skill. Check for collisions before adding. +### Anti-Pattern 8: Dispatching Agents Without Commit Instructions +**What it looks like**: Dispatching an agent to modify files on a branch, but not telling the agent to commit its changes +**Why wrong**: The agent completes file edits but the changes sit unstaged. The dispatching orchestrator assumes the work is committed and moves on. Changes are lost or require manual cleanup. +**Do instead**: When dispatching agents for file modifications, explicitly include "commit your changes on the branch" in the agent prompt. + --- ## References