Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .agents/skills/bugfix-tdd/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,26 @@ npm test -- --run

### 5. Route the learning

After the fix passes verification, invoke `/learn` capture for any reusable bug
class, missing guardrail, or project-specific workflow lesson. The canonical
record is `docs/learnings/`; legacy files such as `BUG_PATTERNS.md` and
`LESSONS_LEARNED.md` may be candidate artifacts when a project still uses them.
After the fix passes verification, invoke `/learn` capture. A bug is only fully
learned when the bug class leaves behind a mechanical or documented guardrail.

**Climb to the highest actionable principle.** Don't stop at the symptom ("removed
field still referenced"). Ask which shared contract changed, who else could be
affected, and what the most general still-true rule is ("when a shared contract
changes, all consumers must update").
Comment on lines +63 to +66

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer abstraction until the evidence supports it

For an isolated, low-risk bug with no established recurrence, this instruction now forces the agent to invent a general principle and guardrail. That contradicts the canonical learning contract in docs/ai/learning-system.md:18 and .agents/skills/learn/SKILL.md:105, which explicitly allows raw bugs to remain samples and calls for abstraction only after several examples or one high-risk incident with a clear prevention surface. Restore the conditional capture behavior or delegate the abstraction decision to /learn so one-off bugs do not pollute promoted guidance.

Useful? React with 👍 / 👎.


**Name the enforcement.** For each principle, identify what prevents the next
similar bug: the regression test already written in step 1, a lint rule, a shared
helper, a docs/ai rule, or a checklist item. Log it as a prevention artifact in
the learning capture.

**Promote high-blast-radius patterns** — bug classes that touch multiple
consumers, span layers, or could recur in future features — into `docs/ai/`,
shared helpers, ESLint restrictions, or contract tests rather than leaving them
only in the learning inbox.
Comment on lines +73 to +76

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify guardrail changes made after the test run

When a high-blast-radius bug leads to a shared-helper, ESLint, or contract-test change, this promotion occurs after Step 4 has already run the full suite, and Step 6 only summarizes, so the newly promoted code or configuration can be left unverified. This also conflicts with .agents/skills/learn/SKILL.md:188, which requires code and enforcement changes to receive TDD/review discipline. Either record these as follow-up prevention work during capture or add a verification/review step after promotion.

Useful? React with 👍 / 👎.


The canonical record is `docs/learnings/`; legacy files such as `BUG_PATTERNS.md`
and `LESSONS_LEARNED.md` may be candidate artifacts when a project still uses them.

### 6. Summarize

Expand Down