feat(directives): add 15 engagement-specific directives + tags.toml entries

This commit is contained in:
ed
2026-07-05 14:17:51 -04:00
parent 9434e4c6e9
commit 0c4a7621d4
31 changed files with 499 additions and 0 deletions
@@ -0,0 +1,9 @@
# regression_bisect_to_clean_baseline
## v1
**Why this iteration:** New rule, no prior source. The bisect-first pattern is implied by `reproduction_before_fix` but not explicitly stated for regressions.
**Source:** new rule
---
**Lifted:** 2026-07-05
@@ -0,0 +1,29 @@
# When fixing a regression, bisect to the last known-green commit before proposing a fix
## What it says
When a test regresses (was passing, now failing), the agent MUST `git bisect` (or manually bisect by running the test at recent commits) to identify the exact commit that introduced the regression BEFORE proposing a fix. The bisect result tells you what changed; the fix targets the cause, not the symptom.
## Why
Without a bisect, the agent is guessing at the cause. "The test fails because X is null" — but WHY is X null? The bisect points to the commit that made X null. The fix is then surgical: revert or repair the specific change. Without the bisect, the agent adds a null check (treating the symptom) and the real cause (a broken initialization in a different module) ships to production.
## The pattern
```bash
# Identify the last known-green commit
git log --oneline -20
# Run the failing test at recent commits until you find the green->red transition
git stash # if needed to preserve working tree
git switch -c bisect-tmp <older_commit>
uv run pytest tests/test_failing.py -v
# ... repeat until you find the transition commit
git switch - # back to the working branch
git branch -D bisect-tmp
```
## See also
- `conductor/directives/reproduction_before_fix` — reproduce the bug before fixing
- `conductor/directives/single_hypothesis_minimal_test` — test one hypothesis at a time