generated from coulomb/repo-seed
session-memory: map signals to catalog recommendations via covers (WP-0010 follow-up)
Closes the gap where recurring_error suggestions showed generic 'Investigate' instead of the curated recommendation. Added a covers[] field to SolutionPattern (lowercase substrings a pattern's recommendation also applies to) + Catalog.find_for (exact key first, then covers match against signal key+locus). Retro now resolves recommendations through find_for. Tagged the read-before-edit pattern with covers=['file has not been read','modified since read','file_not_read'] (v1.0.1). Live: file-not-read suggestions across all repos now inherit 'Read the file before Edit/Write'. 6 new tests; suite 158/158. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,6 @@ from dataclasses import asdict, dataclass
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import Optional
|
||||
|
||||
from ..curate.schema import SolutionPattern
|
||||
from ..detect.cluster import cluster
|
||||
from ..detect.quality import QualityConfig, filter_real
|
||||
from ..detect.signals import extract_signals
|
||||
@@ -48,10 +47,10 @@ class Suggestion:
|
||||
pattern_key: str
|
||||
|
||||
|
||||
def _recommendation(pattern_key: str, catalog) -> Optional[str]:
|
||||
def _recommendation(pattern_key: str, locus: str, catalog) -> Optional[str]:
|
||||
if catalog is None:
|
||||
return None
|
||||
sp = catalog.load(SolutionPattern.make_id(pattern_key))
|
||||
sp = catalog.find_for(pattern_key, locus)
|
||||
if sp and sp.resolutions:
|
||||
return sp.resolutions[0].summary
|
||||
return None
|
||||
@@ -75,7 +74,7 @@ def weekly_retro(digests: list[dict], catalog=None, *, since: Optional[str] = No
|
||||
for p in patterns:
|
||||
if p.polarity != "problem":
|
||||
continue # improvements come from problems
|
||||
rec = (_recommendation(p.key, catalog)
|
||||
rec = (_recommendation(p.key, p.locus, catalog)
|
||||
or f"Investigate {p.signal_type.replace('_', ' ')} on {p.locus}")
|
||||
priority = "high" if (p.cross_flavor or p.score >= _HIGH_SCORE) else "medium"
|
||||
for repo in (p.repos or ["(unknown)"]):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated_at": "2026-06-07T17:14:00Z",
|
||||
"generated_at": "2026-06-07T19:07:51Z",
|
||||
"measure": {
|
||||
"error_rate": 0.957,
|
||||
"infra_overhead_share_median": 0.167,
|
||||
@@ -137,7 +137,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "activity-core",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -147,7 +147,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "citation-evidence",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -157,7 +157,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "infospace-bench",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -167,7 +167,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "issue-facade",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -177,7 +177,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "railiance-apps",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -187,7 +187,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "state-hub",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -197,7 +197,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "the-custodian",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -207,7 +207,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"priority": "high",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "vergabe-teilnahme",
|
||||
"score": 290.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -217,7 +217,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"priority": "medium",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "artifact-store",
|
||||
"score": 78.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -227,7 +227,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"priority": "medium",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "issue-facade",
|
||||
"score": 78.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -237,7 +237,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"priority": "medium",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "railiance-apps",
|
||||
"score": 78.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -247,7 +247,7 @@
|
||||
"cross_flavor": false,
|
||||
"pattern_key": "problem:recurring_error:<tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"priority": "medium",
|
||||
"recommendation": "Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>",
|
||||
"recommendation": "Read the file (or the region you'll touch) before Edit/Write",
|
||||
"repo": "state-hub",
|
||||
"score": 78.0,
|
||||
"signal_type": "recurring_error",
|
||||
@@ -316,7 +316,7 @@
|
||||
],
|
||||
"window": {
|
||||
"days": 30,
|
||||
"since": "2026-05-08T17:14:00Z",
|
||||
"until": "2026-06-07T17:14:00Z"
|
||||
"since": "2026-05-08T19:07:51Z",
|
||||
"until": "2026-06-07T19:07:51Z"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Weekly Coding Retro (2026-05-08 → 2026-06-07)
|
||||
_23 real sessions · generated 2026-06-07T17:14:00Z_
|
||||
_23 real sessions · generated 2026-06-07T19:07:51Z_
|
||||
|
||||
## Top improvement suggestions (cross-flavor first, ≤3 per repo)
|
||||
- **net-kingdom** (high, score=54.0) [CROSS-FLAVOR]: cross-flavor problem: recurring error — Investigate recurring error on make: *** [makefile:<n>: fix-consistency] error <n>
|
||||
@@ -14,18 +14,18 @@ _23 real sessions · generated 2026-06-07T17:14:00Z_
|
||||
- **flex-auth** (high, score=441.0): problem: schema thrash — Load the tool schemas you'll need once, up front
|
||||
- **infospace-bench** (high, score=441.0): problem: schema thrash — Load the tool schemas you'll need once, up front
|
||||
- **ops-bridge** (high, score=441.0): problem: schema thrash — Load the tool schemas you'll need once, up front
|
||||
- **activity-core** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **citation-evidence** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **infospace-bench** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **issue-facade** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **railiance-apps** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **state-hub** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **the-custodian** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **vergabe-teilnahme** (high, score=290.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has not been read yet. read it first before writing to it.<<path>>
|
||||
- **artifact-store** (medium, score=78.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>
|
||||
- **issue-facade** (medium, score=78.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>
|
||||
- **railiance-apps** (medium, score=78.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>
|
||||
- **state-hub** (medium, score=78.0): problem: recurring error — Investigate recurring error on <tool_use_error>file has been modified since read, either by the user or by a linter. read it again before attempting to write it.<<path>>
|
||||
- **activity-core** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **citation-evidence** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **infospace-bench** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **issue-facade** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **railiance-apps** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **state-hub** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **the-custodian** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **vergabe-teilnahme** (high, score=290.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **artifact-store** (medium, score=78.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **issue-facade** (medium, score=78.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **railiance-apps** (medium, score=78.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **state-hub** (medium, score=78.0): problem: recurring error — Read the file (or the region you'll touch) before Edit/Write
|
||||
- **artifact-store** (medium, score=50.55): problem: budget overrun — Read narrowly — target the region you need, not whole large files
|
||||
- **vergabe-teilnahme** (medium, score=12.0): problem: recurring error — Investigate recurring error on {
|
||||
- **ops-bridge** (medium, score=10.0): problem: recurring error — Investigate recurring error on found <n> errors (<n> fixed, <n> remaining).
|
||||
|
||||
Reference in New Issue
Block a user