repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

feat: add modernize prompt

fb61a368942d3fae2308491fd9602d8efc142fcf

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (2)

.pi/prompts/modernize.md

Added
new file mode 100644
1 +---
2 +description: Audit this repository for migrations required by the latest Pi release
3 +argument-hint: "[focus]"
4 +---
6 +# Modernize Pi code
8 +Use the project-local `modernize` skill now.
9 +Read `.pi/skills/modernize/SKILL.md` completely and follow it.
11 +Optional focus: `$ARGUMENTS`
13 +The focus changes priority only.
14 +Audit the entire repository.
15 +Do not modify files.

.pi/skills/modernize/SKILL.md

Added
new file mode 100644
1 +---
2 +name: modernize
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."
4 +---
6 +# Modernize
8 +Read-only audit.
9 +Never edit repository files.
11 +## Procedure
13 +1. Run from the repository root:
15 + ```bash
16 + node .pi/skills/modernize/scripts/audit.mjs
17 + ```
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.
44 +## Output
46 +For findings:
48 +```text
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
53 +```
55 +Order by severity, then path.
56 +Deduplicate shared root causes.
57 +Every finding needs `path:line`.
59 +When nothing needs fixing:
61 +```text
62 +MODERNIZE CLEAN
63 +<funny ASCII art>
64 +```
66 +Generate fresh, non-boxed ASCII art under 20 lines.
67 +No art on failure or findings.