plantuml-migratelisted
Install: claude install-skill MrBogomips/claude-code
# PlantUML Migrate
Propagate a Policy change across the project's `.plantuml/` and `.puml`
files. The most invasive skill in the plugin — it modifies user files,
so safety mechanisms are explicit.
## Flow
1. **Read current Policy** from `CLAUDE.md` § "PlantUML Policy". Abort if
absent with `"migrate requires a PlantUML Policy — run /plantuml-init first"`.
2. **Compute expected `.plantuml/`** files as if the Policy were freshly
materialized. Run the same generation logic as `plantuml-bootstrap`
(see `${CLAUDE_PLUGIN_ROOT}/skills/plantuml-bootstrap/SKILL.md` §
"Generation"), but produce in-memory strings instead of disk writes.
For each of the four partials (`_brand.puml`, `_theme.puml`,
`_fonts.puml`, `_layout.puml`), hold the expected bytes.
3. **Manual-edit detection (hash divergence)** — for each existing
`.plantuml/_brand.puml`, `_theme.puml`, `_fonts.puml`, `_layout.puml`:
- **Normalize** both sides before hashing to avoid false positives:
strip CR (`\r`), collapse trailing whitespace per line, ensure a
single trailing newline at EOF. Same normalization on both sides.
- Compute SHA-256 via `shasum -a 256` (BSD-compatible across macOS
and Linux).
- **Idempotency short-circuit**: if all four hashes match expected
AND no targets need adding/removing AND no Policy-driven `.puml`
edits are needed, print `"migration: nothing to do"` and exit 0.
4. **If any divergence is detected**, list the divergent files and
pres