Skip to content

feat(skill): code-modernizer with ponytail-derived ladder#22

Merged
CodeWithJuber merged 2 commits into
masterfrom
claude/code-modernizer-skill-6o3bly
Jul 7, 2026
Merged

feat(skill): code-modernizer with ponytail-derived ladder#22
CodeWithJuber merged 2 commits into
masterfrom
claude/code-modernizer-skill-6o3bly

Conversation

@CodeWithJuber

Copy link
Copy Markdown
Owner

What & why

Replaces the minimal code-modernization skill with a comprehensive code-modernizer skill that adapts DietrichGebert/ponytail's decision ladder for retroactive code auditing — not just gating new code.

Key additions over the previous skill:

  • Scope handshake (Full / Partial / Targeted) — confirms blast radius before generating diffs
  • Pre-flight scanner (scripts/preflight_scan.py) — stdlib-only Python that reports file count, LOC, available dependencies, and high-cost files before any work begins
  • The ladder — 8-rung decision procedure (YAGNI → stdlib → platform → installed dep → researched new dep → one-liner → minimal code) adapted from ponytail (MIT)
  • Mandatory live research for rung 6 (new dependency) — never recommends a package from memory alone
  • Reference files: research protocol, design patterns cheatsheet, cost/impact pre-flight rubric
  • modernize: markers for deferred opportunities, mirroring ponytail's ponytail: comment convention

The skill composes with ponytail: ponytail governs new code as it's written; code-modernizer audits and modernizes what's already in the repo.

Files changed

File Change
global/tools/code-modernization/SKILL.md Rewritten with full ladder, scope control, 5-step procedure
global/tools/code-modernization/references/research-protocol.md New — library vetting checklist and decision template
global/tools/code-modernization/references/design-patterns-cheatsheet.md New — smell → pattern → when-to-skip table
global/tools/code-modernization/references/cost-impact-preflight.md New — pre-flight template and impact/flexibility rubric
global/tools/code-modernization/scripts/preflight_scan.py New — stdlib-only scanner for file count, LOC, deps, high-cost files

Checklist

  • npm test passes (Node 18/20/22) — no runtime code changed
  • npm run check passes (Biome lint + format) — markdown/Python only
  • Conventional commit message (feat:)
  • No new runtime dependency (dev deps ok) — scanner is stdlib-only Python
  • Substrate/docs updated if this changes forge substrate, forge impact, router/gate, or MCP substrate tools — skill docs self-contained

Risk & rollback

  • Risk level: low — replaces one skill definition with an expanded version; no runtime code, no API changes
  • Rollback plan: revert this single commit to restore the previous SKILL.md

Extra checks (tick if applicable)

  • If AI-assisted: I understand it, verified the package APIs, and it has tests

Generated by Claude Code

claude added 2 commits July 7, 2026 11:41
…rol, and preflight scanner

Replaces the minimal code-modernization skill with a comprehensive
code-modernizer that adapts DietrichGebert/ponytail's decision ladder for
retroactive auditing. Adds scope handshake (full/partial/targeted), a
stdlib-only preflight scanner, mandatory live research for new deps, and
reference files for design patterns, research protocol, and cost/impact
assessment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YS8HJw5cwmAQyNQLxRmyYZ
…nizer

Restores the incremental modernization methodology (Assess, Safety net,
Transform incrementally, Verify, Document, Guardrails) and migration-
specific trigger phrases from the original SKILL.md that were dropped
during the rewrite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YS8HJw5cwmAQyNQLxRmyYZ
@CodeWithJuber
CodeWithJuber marked this pull request as ready for review July 7, 2026 11:48
@CodeWithJuber
CodeWithJuber merged commit 1fea814 into master Jul 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants