Skip to content
Back to skills

Rewrite Plan

ASecurity

Author a long-running multi-file rewrite plan that subsequent patch-edit + diff-review + build-test stages will execute, with explicit ownership boundaries and patch-safety guarantees.

  • 110,788 stars
  • 0 votes
  • 0 copies
  • 17 views
  • Added June 6, 2026
ai-agentsshell

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add nexu-io/open-design --skill rewrite-plan --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rewrite Plan?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rewrite Plan
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nexu-io-rewrite-plan/badge)](https://www.skillsdirectory.com/skills/nexu-io-rewrite-plan)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rewrite-plan
description: Author a long-running multi-file rewrite plan that subsequent patch-edit + diff-review + build-test stages will execute, with explicit ownership boundaries and patch-safety guarantees.
od:
  scenario: code-migration
  mode: planning
---

# Rewrite plan

Spec §20.3 / §21.3.2: scenario 4 (design → deliverable production
code) requires a contract-shaped rewrite plan before the agent
starts editing files. The plan is **the audit trail** every
subsequent stage references; without it the patch path slides into
"refactor everything that looks wrong" and the build breaks in
unreviewable ways.

## Inputs

- `code/index.json` from `code-import`.
- `token-map/*.json` from `token-map`.
- The active design system DESIGN.md (already in prompt).
- The user's tune intent (typically a short brief).

## Output

```text
project-cwd/
└── plan/
    ├── plan.md           # human-readable narrative
    ├── ownership.json    # { file: '...', layer: 'leaf' | 'shared' | 'route' | 'shell' }
    ├── steps.json        # ordered { id, files[], rationale, risk: 'low' | 'medium' | 'high' }[]
    └── meta.json         # { generatedAt, atomDigest, tokenMapDigest }
```

`steps.json` is the input `patch-edit` reads one entry per
iteration. `ownership.json` is the source of truth for "which
files belong to a single component vs. shared infrastructure";
`patch-edit` refuses to touch a `shell`-tier file unless the
matching step has `risk: 'high'` and the user explicitly confirmed.

## Convergence

The atom completes when `plan.md` is non-empty AND `steps.json`
contains at least one step.

## Anti-patterns the prompt fragment forbids

- Plans that include "rewrite the whole component library" as a
  single step. Break into per-component steps.
- Plans that don't classify ownership.
- Plans that don't list a `build-test` step at the end.

## Status

Reserved id, prompt-only fragment in v1. The component-mapping
heuristic + ownership classifier land in spec §16 Phase 7.

Files in this skill

  • SKILL.md2 KB
  • open-design.json824 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.