feat: lessons from what recurs about one setting, and three more approved
Some checks failed
validation / verify (push) Failing after 10s

Evidence was grouped only by the kind of problem, and a group gets one lesson,
so what kept recurring inside "validation proposed a Check" could not be
seen. A proposed or unimplementable Check is now also counted under each
provider setting or resource type it names; a subject seen in two or more
Executions is its own group and reaches the curator past triage.

Over 32 Executions that gave five proposals. The owner approved three, now
published: L-07 location Checks, L-08 Cloud SQL backup encryption, L-09
backend service capabilities. L-10 is held for more evidence and L-11
rejected.

Also: retiring a lesson marks its proposal, so publish no longer brings a
retired lesson back. L-04 had returned to the Skill that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 12:47:18 +01:00
parent ee1ba38867
commit 5feaaa6271
17 changed files with 354 additions and 13 deletions

View File

@@ -35,6 +35,8 @@ from __future__ import annotations
import asyncio
import sys
from collections.abc import Sequence
from dataclasses import replace
from datetime import UTC, datetime
from pathlib import Path
from app.agent import open_decider
@@ -42,7 +44,7 @@ from app.config import get_settings
from app.learning.curator import LESSON_CURATOR, curate
from app.learning.evidence import group_candidates, identifiers, read_candidates
from app.learning.proof import compare, record, render
from app.learning.proposals import ISSUES, load
from app.learning.proposals import ISSUES, load, write
from app.learning.skill import (
NotApproved,
mark_reviewed,
@@ -141,7 +143,7 @@ def show_status() -> int:
"in the Skill"
if proposal.id in live
else "retired"
if proposal.published
if proposal.retired
else "not in the Skill"
)
# One comparison suggests a direction; it does not prove a lesson.
@@ -211,6 +213,10 @@ def retire_lesson(arguments: Sequence[str]) -> int:
return 2
bundle = load_provider(get_settings().CLOUD_PROVIDER)
gone = retire(arguments[0], _skill_dir(bundle))
for proposal in load(ROOT / ISSUES):
if proposal.id == arguments[0] and not proposal.retired:
# Marked on its proposal, so the next publish does not bring it back.
write(replace(proposal, retired=datetime.now(UTC).date().isoformat()))
print(f"Retired {arguments[0]}." if gone else f"{arguments[0]} is not published.")
return 0 if gone else 1