What it is for
A router and gatekeeper. It reads themodernization/ folder, names the current phase, hands off to the phase skill, and enforces the rule that a person approves each phase before the next begins. It does not do a phase’s work.
Use it when
- You are modernizing, migrating or refactoring a legacy system and want a governed sequence.
- You want to know which phase is next.
Prerequisites
- A repository that CoreStory v3 has indexed. The skill checks this first with
statusandcorpus_info, and stops if the snapshot is missing or the last ingest failed. Setup is on the CoreStory v3 playbooks overview. - The
corestory-localplugin or the MCP connection, so the agent can reach the CoreStory v3 tools. - Someone who can approve each phase: the architect, the engineering lead, or a domain expert, depending on the phase.
- For COBOL or SQL-heavy systems, the agent asks about artifacts that carry rules but may have no structure in the graph (JCL, copybooks, lookup tables, stored procedures).
How to invoke it
- Automatic. With the Claude Code plugin, a session hook points the agent to the matching skill before it edits or answers. The agent picks
code-modernizationwhen the request fits. - By name. Ask for it directly (
/code-modernizationin Claude Code; the plugin may show it ascorestory-local:code-modernization), or say “use the code-modernization skill” in other agents. - From a rules file. Without the plugin hook, add the one-line fallback from the overview to
CLAUDE.mdorAGENTS.md.
What it produces
- No document of its own. It reads and updates the headers of the phase files in
modernization/, and setsstatus: approvedonly on your explicit statement.
How it works
- Preflight with
statusandcorpus_info; stop and relaystatus.next_stepif the snapshot is not ready. - List
modernization/*.mdand read each header to find the current phase. - Name the phase and the files read, then invoke the phase skill.
- When the phase skill finishes, present its draft and stop.
- On your explicit approval, set the header to
approvedwith your name and the date, and say the next phase starts in a new session.
The modernization phase files
Modernization in CoreStory v3 keeps its state as files in amodernization/ folder in your repository. Each file is one phase, and each starts with this header:
How the files are used:
- State. The current phase is the first row with no file, or with a file still marked
draft. A draft is waiting for a person; the router does not advance past it. - Approval. A phase is approved only when its header says
approvedwith a named approver, set after you say so in the conversation. The agent never approves a phase on its own. - One phase per session. Each phase skill writes a
draftfile and stops. The next phase starts in a new session. - Staleness. If a file’s
snapshotdiffers from the currentcorpus_infosnapshot, the file may be out of date, and the agent tells you so. - Agent-led variant. Vibe Modernization uses the same files plus per-ticket gap, build and conformance files.
Limits
- It makes no claim that modernization is faster, safer or lower risk. The verification phases compare source and rules and recommend tests.
- For agent-led, human-gated work with an independent audit, it hands off to Vibe Modernization.
- Hosted playbook note: the hosted Code Modernization playbook keeps state in a hosted project; v3 keeps it in files in your repository.
- CoreStory reads and indexes code. It does not run or test it. Any test results in the output are the agent’s own, from commands it ran.
- Results describe the ingested snapshot, which may differ from your working tree if files changed since.
- Hits from
searchare leads, not proof. The skill reads the cited lines before it relies on a rule, and lists what it could not check underNot verified.
Skill source
The full recipe is the skill file itself:code-modernization/SKILL.md on GitHub.