Hard Eng Learn
Contract
- Input = affected repository + explicit
he learnevidence OR verified trigger from any route. - Any route = Direct + Diagnose + Feature Loop + Build + Ship; active Feature Brief = not required.
- Output =
<repo>/.agents/learning/<learning-id>.json+ assigned prevention destination, or exact non-candidate. - Lifecycle = unchanged; overlay only.
- Load workflow.md before classification or repair.
Ownership
- Failure classification + prevention owner + follow-through = this skill.
- Recurrence/root-cause proof =
repeated-failure-learning. - Prevention implementation = destination owner under its normal direct/
heroute. - Product implementation = current stage owner; learning does not seize it.
- Repository learning state + runtime wiring = learning_state.py.
Invariants
- Trigger = verified repository recurrence OR engineering correction OR false passing check OR systemic protected-boundary gap OR repeated manual waste.
- One-off implementation finding = current build loop; learning candidate = forbidden.
- Record fact once in affected repository = failure + evidence + root cause + occurrences + prevention owner + required proof.
- Global
~/.agents= learning engine only; repository-specific record/prevention promotion = forbidden. - Narrowest durable owner = remove cause → reuse/repair owner → invariant/type → regression test → scanner/hook → CI → script/tool.
- Mechanically detectable prevention = executable rule/tool/fixture at the closest owner; prose-only prevention = incomplete.
- Skill fallback = same root proven ≥2 by
repeated-failure-learning+ explicit deterministic limit + canonical<repo>/.agents/skills/<name>/. - Skill discovery = Codex + Copilot read canonical
.agents/skillsdirectly; Claude uses setup-owned.claude/skills/<name>symlink. - Prevention placement = before the expensive/failure boundary + cheaper than recurrence; independent checks parallel.
- Trigger record =
learning_state.py start; spawn one depth-1he-learnhelper only when output sayshelper=he-learn. - Repair = tracked + non-blocking; duplicate helper selection for one record = forbidden.
- Block/pause only when continued product work risks security/privacy/data loss/irreversible action or another protected boundary.
- Cross-repository repair = destination-owned normal flow; routine source PLAN pause/writer lease/nested lifecycle = forbidden.
- Open learning blocks task closure; resolved, non-candidate, or deferred with an owner + real next action permits closure.
Complete
- Candidate validity = evidence-backed.
- Prevention owner + proof = explicit.
- Applied prevention = violation fixture + valid fixture + actual-seam proof.
- Repository check =
~/.agents/setup.sh repo-check <repo>PASS. - Deferred prevention = repository-owned next action without blocking unrelated delivery.