From ea0759d74bfcc68eb5e7c443df1ce87962bffbcb Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 23 Nov 2026 22:29:57 +0000 Subject: [PATCH] :books: Focus project anomalies script guidance Keep the script's data and batching boundaries while leaving the anomaly catalog and usage instructions to the dedicated skill. AI-assisted-by: gpt-6.1-terra --- .serena/memories/scripts/project-anomalies.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.serena/memories/scripts/project-anomalies.md b/.serena/memories/scripts/project-anomalies.md index 9d0bfe6ecc..8ec7812eca 100644 --- a/.serena/memories/scripts/project-anomalies.md +++ b/.serena/memories/scripts/project-anomalies.md @@ -1,17 +1,5 @@ # Project anomalies helper -`scripts/project-anomalies.py` implements the `find-project-anomalies` skill: `check ` fetches milestone issues/PRs with `--state all` via `scripts/gh.py`, resolves outsiders in bulk (one GraphQL call per 50 items), and writes `tmp/-ANOMALIES.md` (gitignored scratch output, every number a full GitHub link). - -## Anomaly types (all scoped to the milestone) - -- Open-with-merged-PR: OPEN issue with a MERGED closing PR (close it or move it out). -- Issue-PR mismatch: milestone issue whose *merged* closing PR is elsewhere/nowhere (an unmerged PR's milestone is irrelevant), or issue off the Main board. -- PR-issue mismatch: *merged* milestone PR closing an issue elsewhere/nowhere (milestone-less issues ARE reported here, unlike the changelog flow), or off the Main board. Unmerged PRs never count anywhere: their milestone is meaningless. -- Needs-triage: MERGED PR on a `needs triage` issue (human triage only, never auto-unlabel). -- Unassigned: MERGED PR on an issue with no assignees and no `community contribution` label on either side (valid states: assigned, or unassigned+community). - -## Conventions - -- Project membership is checked on the issue side only (`projects` list from `gh.py`); PRs are not the Main-tracked unit, so an unprojected PR alone is never an anomaly. -- Detection (`find_anomalies`) and rendering (`render_report`) are pure functions over pre-resolved dicts; outsiders must be merged into the lookup maps first (missing numbers are skipped, never flagged). -- The only mechanical fix is assigning a missing milestone (`gh pr/issue edit --milestone`); everything else is human judgment with per-item confirmation. +- For usage, anomaly definitions and authorized fixes, use the `find-project-anomalies` skill. +- `scripts/project-anomalies.py` fetches milestone issues and PRs through `scripts/gh.py` and resolves outside references in batches. Keep GitHub queries out of per-item loops. +- `find_anomalies` and `render_report` operate on pre-resolved data without network calls. Merge resolved outsiders into the lookup maps before detection; missing numbers are skipped, not flagged.