4 4 #
Modernize Prompt Implementation Plan 6 6 > **For agentic workers:** REQUIRED SUB-SKILL: Use /skill:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
8 8 **Goal:** Add a project-local `/modernize` audit that fails on stale installed Pi, derives migrations from current local and remote changelogs, scans the repository, and celebrates a clean result with ASCII art.
10 -**Architecture:** A Node standard-library script performs deterministic version, changelog, package-lock, candidate, and Git file-set collection. A project skill validates candidates semantically against latest Pi docs/source and scans code. A thin prompt invokes the skill and defines output behavior.
10 +**Architecture:** A Node standard-library script performs deterministic version, changelog, package-lock, and candidate collection. A project skill validates candidates semantically against latest Pi docs/source, enumerates the Git file set with tools, and scans code. A thin prompt invokes the skill and defines output behavior.
12 12 **Tech Stack:** Pi prompt templates, Agent Skills, Node 26, `node:test`, Git, npm registry, GitHub raw changelog
26 26 - [x] **Step 1: Write failing Node tests**
28 -Cover release-section parsing, migration-section extraction, keyword extraction, ordinary-note exclusion, stale installed-version rejection, semantic version ordering, malformed changelog rejection, package-lock Pi version collection, and Git file-list parsing.
28 +Cover release-section parsing, migration-section extraction, keyword extraction, ordinary-note exclusion, stale installed-version rejection, semantic version ordering, malformed changelog rejection, package-lock Pi version collection, and minimal report shaping.
30 30 - [x] **Step 2: Run tests to verify RED**
48 48 - rejects local/latest mismatch;
49 49 - reads `package-lock.json` Pi package versions;
50 50 - extracts candidates newer than the oldest repo-resolved Pi package;
51 -- lists tracked and non-ignored untracked files through Git;
51 +- emits only versions, changelog locations, and candidates as compact JSON;
55 54 - [x] **Step 4: Run tests to verify GREEN**
74 73 - [x] **Step 1: Create the skill**
76 -Define a read-only workflow that runs `node .pi/skills/modernize/scripts/audit.mjs`, stops on preflight failure, verifies every candidate against latest Pi docs/source, scans every returned repository file, inspects callers, and reports evidence-backed findings only.
75 +Define a read-only workflow that runs `node .pi/skills/modernize/scripts/audit.mjs`, stops on preflight failure, verifies every candidate against latest Pi docs/source, enumerates every repository file with Git, inspects callers, and reports evidence-backed findings only.
78 77 - [x] **Step 2: Create the prompt**
111 110 node .pi/skills/modernize/scripts/audit.mjs > /tmp/pi-modernize-audit.json
114 -Assert local/latest equality, both changelog sources, candidate count, resolved package versions, and repository file count with `jq`.
113 +Assert the Pi version, both changelog locations, candidate range, and candidate count with `jq`.
116 115 - [x] **Step 2: Run real Pi prompt**