Add aim-tracking-freshness skill for oversight INDEX rebuild and staleness detection#146
Open
Hidden-History wants to merge 1 commit into
Open
Add aim-tracking-freshness skill for oversight INDEX rebuild and staleness detection#146Hidden-History wants to merge 1 commit into
Hidden-History wants to merge 1 commit into
Conversation
Introduces the `aim-tracking-freshness` POV skill (PLAN-028 P0-4c) to replace the manual per-PM rebuild of `oversight/bugs/INDEX.md` and `oversight/tech-debt/INDEX.md` that caused 80-day tracking drift. The backing script (`tracking_freshness.py`) scans every `bugs/BUG-*.md` and `tech-debt/TECH-DEBT-*.md`, classifies each record as open or closed from its authoritative `**Status**` header, and either reports staleness divergences (--check, read-only) or regenerates both INDEX files (--write). Key design decisions: - Handles all three Status header formats found in the live tree: colon-outside-bold (**Status**: value, most common), colon-inside-bold (**Status:** value, 10 files), and table-row format (54 files). - Separate closed-class token sets for bugs (FIXED, RESOLVED, NOT A BUG, DUPLICATE, RECLASSIFIED, FIX APPLIED) and tech-debt (IMPLEMENTED, RESOLVED, FIXED). - LIKELY FIXED edge case explicitly guarded as open. - Companion files (duplicate numeric ID) excluded from INDEX generation and listed explicitly in report output. - Oversight root configurable via --oversight-root or AI_MEMORY_OVERSIGHT_ROOT env var; no hardcoded absolute path. - Staleness report surfaces divergences prominently (e.g. records in the wrong INDEX section), orphan rows, and missing records. - Exit code 1 when issues found (CI/hook friendly). Live --check against the full 90-bug / 68-TD oversight tree reports 0 no-status warnings, 0 divergences, 0 orphans, 0 missing. Includes 68 unit tests covering status classification (both colon variants + table-row) and companion exclusion. All three lint tools (black + ruff + isort) pass.
1ff1ff1 to
e04a2d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
aim-tracking-freshnessPOV skill (PLAN-028 P0-4(c)) — a read-only staleness reporter and INDEX regenerator for the oversight tracking system.--checkmode: scans everyoversight/bugs/BUG-*.mdandoversight/tech-debt/TECH-DEBT-*.md, classifies each record open/closed from its authoritative**Status**header, and reports divergences against the current INDEX files (BUG-301-class misfilings, orphan INDEX rows, records missing from the INDEX, companion files excluded).--writemode: runs the same analysis, then regenerates bothbugs/INDEX.mdandtech-debt/INDEX.mdfrom scratch — title, severity, and verbatim status extracted from each file's own header fields.This closes the P0-4(c) work item in PLAN-028 (memory-system correctness), completing the full P0 baseline-rebuild and drift-prevention track.
Key design decisions
**Status**field in each record file is the single source of truth; INDEX placement is never inferred.FIXED,RESOLVED,IMPLEMENTED,NOT A BUG,FIX APPLIED, etc.) match only at the operative leading position of the normalized status — never mid-text. This correctly handles statuses likeREOPENED … Previously: FIXED …where a historical clause would otherwise trigger a false CLOSED classification.**Status**: v), colon-inside-bold (**Status:** v), and table-row (| **Status** | v |) — all confirmed against the live oversight tree.**Title**:field, H1/H2 heading with ID prefix stripped (handlesBUG-NNN:,BUG-NNN —,TECH-DEBT-NNN:separators), then de-slugified filename.[A-Z]+token extracted after stripping markdown bold; aliasesMajor→HIGH,Minor→LOW,Blocker→CRITICAL; non-severity values (N/A,Closed) return empty.--oversight-rootflag orAI_MEMORY_OVERSIGHT_ROOTenv var; defaults to./oversightrelative to CWD. Zero hardcoded absolute paths.Usage
No
.claude/skills/shim is needed — the installer auto-generates POV skill shims at install time.Files changed
_ai-memory/pov/skills/aim-tracking-freshness/SKILL.md_ai-memory/pov/skills/aim-tracking-freshness/scripts/tracking_freshness.pytests/unit/test_tracking_freshness_skill.pyCHANGELOG.md[Unreleased]### Added entryTest plan
TestStatusClassification,TestCompanionExclusion,TestTitleExtraction,TestSeverityNormalization,TestStatusVerbatim)REOPENED … Previously: FIXED …→ OPEN;FIXED …leading → CLOSED;NOT A BUGleading → CLOSED;LIKELY FIXED→ OPEN;IMPLEMENTED(TD) → CLOSED;DEFERRED(TD) → OPEN--checkagainst the live oversight tree: surfaces the known BUG-301 misfiling (REOPENED bug in Closed section of the PM #296 hand-built INDEX) as 1 divergence--writeon a copy: regenerates both INDEX files; subsequent--checkshows 0 divergences (idempotent)