From 2e2292c039c73b77c7fb3631f0313530fa1ff375 Mon Sep 17 00:00:00 2001 From: David Hu <159687+divad12@users.noreply.github.com> Date: Mon, 15 Jun 2026 20:16:29 -0300 Subject: [PATCH] task-observer: add contract-change extrapolation guidance to learn SKILL.md --- .agents/skills/learn/SKILL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.agents/skills/learn/SKILL.md b/.agents/skills/learn/SKILL.md index 4fef2ea..3c687cc 100644 --- a/.agents/skills/learn/SKILL.md +++ b/.agents/skills/learn/SKILL.md @@ -106,6 +106,8 @@ Use the abstraction ladder from `docs/ai/learning-system.md`, but do not force a After identifying the principle, note what would enforce it next time: a regression test, lint rule, schema/contract scan, shared helper, checklist, docs update, skill tweak, or automation. +When the bug stems from a changed shared contract — an API shape, hook signature, cache key, DB schema field, type definition, fixture format, or doc assumption — explicitly name the contract and list the consumer classes that share the same assumption (hooks, routes, tests, fixtures, helpers, docs). Ask: who else in the codebase could have made the same wrong assumption? Contract-change bugs often have sibling-bug risk beyond the immediate incident. Climb to the highest-actionable prevention principle and pair it with a candidate enforcement hook that would catch a future consumer getting the contract wrong. + Store prevention work as one readable list, e.g. `Prevention artifacts: docs (required), test (required), skill (proposed)`. Required artifacts describe work needed to prevent the issue; proposed artifacts are worthwhile ideas to consider. The executor decides what is executable now and records completed, blocked, deferred, or follow-up status. Any required code, test, helper, skill, automation, architecture, or enforcement artifact requires TDD/review discipline. If the code surface does not exist yet, docs, skill, or nested-AGENTS updates may be the only executable prevention artifact for now. Before writing, check active inbox, candidates, promoted entries, and recent archives for an existing related learning. The CLI adds `Captured: YYYY-MM-DD` and a stable fingerprint so dashboard decisions can target a row. Fingerprint matching is not semantic dedupe; it only catches exact replay-like writes. Agents own semantic dedupe and clustering and should merge related evidence instead of creating noisy parallel entries.