From 0f91aaae72366b6f32967c30a79a51a1ddbab326 Mon Sep 17 00:00:00 2001 From: David Hu <159687+divad12@users.noreply.github.com> Date: Wed, 24 Jun 2026 20:08:32 -0300 Subject: [PATCH] task-observer: add contract-level extrapolation to learn skill --- .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..45a8746 100644 --- a/.agents/skills/learn/SKILL.md +++ b/.agents/skills/learn/SKILL.md @@ -104,6 +104,8 @@ Real entries already in the canonical voice. Match this shape and rhythm — the Use the abstraction ladder from `docs/ai/learning-system.md`, but do not force a polished rule out of every single bug. Raw bugs are useful samples. When several samples point to the same class, cluster them into the highest still-actionable principle; when there is only one sample, capture it directly only if the prevention surface is already clear or the risk is high. If a claim says a workflow "should" do something, verify the actual trigger, prompt, hook, test, structural check, or code path that makes it happen. +For bug-fix captures, apply contract-level extrapolation: ask whether a shared contract changed (a schema model, API payload shape, hook return type, cache key, shared helper signature, or doc format). If yes, name the contract and list its consumer classes across the codebase. The goal is to surface sibling bugs the current fix did not reach and to identify the highest actionable enforcement surface — a test, lint rule, schema scan, shared helper, or docs rule that makes the next failure in this class harder to write. + 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. 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.