Skip to content

fix(core): trigger prevention on non-code corrections - #288

Merged
shafty023 merged 1 commit into
mainfrom
fix/prevent-recurrence-trigger
Oct 15, 2026
Merged

shafty023 merged 1 commit into
mainfrom
fix/prevent-recurrence-trigger

Conversation

@shafty023

Copy link
Copy Markdown
Collaborator

Installed closedloop-core v1.4.0 advertised prevent-recurrence for bugs and accepted code-review findings, so an agent correcting a setup, measurement, validation, or workflow failure could miss the skill even when the correction exposed a reusable prevention lesson.

This broadens the skill's frontmatter and opening guidance to cover any corrected issue or failure with a reusable prevention lesson, including code and non-code mistakes. It preserves the exclusions for ordinary feature work, rejected findings, and external outages or flaky infrastructure with no agent or system mistake. The dedicated contract test now pins both the broader trigger and those exclusions, and the plugin is bumped to v1.4.1.

Validation:

  • uv run pytest plugins/closedloop-core/tools/python/ -q (43 passed)
  • uv run ruff check .
  • uv run pyright
  • uv run --with pyyaml python /Users/daniel.ochoa/.codex/skills/.system/skill-creator/scripts/quick_validate.py plugins/closedloop-core/skills/prevent-recurrence
  • npm test and npm run typecheck in tools/plugin-manifests (6 tests passed)
  • git diff --check

Prevention

  • Class: Scoped automatic triggers to product-code bugs and review findings when reusable prevention lessons can also come from corrected setup, measurement, validation, and workflow mistakes.
  • Instances: fixed plugins/closedloop-core/skills/prevent-recurrence/SKILL.md and its README summary; no other canonical or adapter copy required a source change.
  • Search: rg -n --hidden --glob '!**/.git/**' 'prevent-recurrence|accepted code-review finding|A fixed instance is not a fixed mistake' .
  • Rung: 3. Guard test via plugins/closedloop-core/tools/python/test_prevent_recurrence_skill_contract.py.
  • Proof: the expanded trigger contract failed against the prior skill text on correcting an issue or failure, then passed after the skill update.
  • Why not higher: automatic skill selection is a natural-language contract that types and syntax checks cannot prove.
  • Follow-up: none.
  • Event recorded: no correction-event log is defined.

- Activate prevention for reusable lessons from setup, measurement, validation, workflow, and code corrections
- Preserve explicit exclusions and pin the trigger contract
- Bump closedloop-core to 1.4.1 and refresh generated docs

Testing: uv run pytest plugins/closedloop-core/tools/python/ -q; uv run ruff check .; uv run pyright; skill quick_validate; plugin-manifests test and typecheck

Risks: None identified
@shafty023
shafty023 merged commit 95a5599 into main Oct 15, 2026
10 checks passed
@shafty023
shafty023 deleted the fix/prevent-recurrence-trigger branch October 15, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant