3 +description: "Audit this repository against the latest published Pi changelog and APIs. Use when checking for obsolete Pi extension, SDK, config, prompt, skill, model, session, tool, TUI, or provider code."
9 +Never edit repository files.
13 +1. Run from the repository root:
16 + node .pi/skills/modernize/scripts/audit.mjs
19 +2. If the command fails, stop.
20 + Report `MODERNIZE FAILED`, its exact reason, and local/latest versions when available.
21 + Do not scan, claim clean, or print celebratory art.
23 +3. Treat the JSON as collected evidence, not conclusions.
24 + Check both changelog sources and every candidate in `candidates`.
26 +4. Normalize each candidate against latest Pi truth:
27 + - read the candidate's linked current documentation when present;
28 + - otherwise inspect the release-tag-pinned source or installed latest declarations;
29 + - identify exact obsolete and replacement code shapes;
30 + - discard provider catalog, prose, and bug-fix entries that require no repository migration.
32 +5. Scan every path in `files` for each normalized obsolete shape.
33 + Use `grep`, then `read` every match and relevant callers.
34 + Skip binary content, but never silently narrow the returned file set.
35 + Optional user focus prioritizes inspection only; whole-repository coverage remains mandatory.
37 +6. Confirm a finding only when both are present:
38 + - migration evidence from a changelog plus latest docs/source;
39 + - contextual repository evidence showing obsolete behavior still applies.
41 +7. Do not report dependency age alone as a code finding.
42 + Report an old repo-resolved Pi package only when its age leaves code or package constraints requiring migration.
49 +MODERNIZE FINDINGS: N
50 +- [high|medium|low] path:line — obsolete API or behavior
51 + latest: exact replacement
52 + evidence: Pi version and current doc/source
55 +Order by severity, then path.
56 +Deduplicate shared root causes.
57 +Every finding needs `path:line`.
59 +When nothing needs fixing:
66 +Generate fresh, non-boxed ASCII art under 20 lines.
67 +No art on failure or findings.