本文へスキップ
Skillpedia
一般的なプログラミング101k · #988

rewrite-plan

できること

このエージェントは、コードを書き直すための詳細な計画を作成します。作業を小さなステップに分け、各部分の担当者を定めることで、変更が安全でレビューしやすくなるようにします。

使う場面

  • ✓コードの一部を整理された方法で書き直す必要があるとき
  • ✓複数の修正ステップを必要とする大きなプロジェクトを始めるとき
  • ✓コードの変更が安全で、プロジェクトを壊さないようにしたいとき

スキルのリンク

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/rewrite-plan/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/rewrite-plan/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ウェブサイトの認証部分を書き直す計画を作成してください。各ファイルの担当範囲も明確に定義してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは既存のコードとデザインを分析して、ロードマップを作成します。このロードマップには、タスク、担当者、関連するリスクが並んでおり、すべてが段階的に確実に進むようにします。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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

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

Implemented by the daemon runner in apps/daemon/src/plugins/atoms/rewrite-plan.ts. It classifies ownership and writes plan.md, steps.json, and ownership.json.

よくある質問

コードを書き直す前に計画が重要なのはなぜですか?

計画がないと、エージェントが「一度にすべてを直そう」とし、原因がわかりにくい形でプロジェクトを壊してしまうことがあります。計画によって、変更が管理された安全な方法で行われます。

「担当範囲の境界」とは何ですか?

特定のコンポーネントに属するコードの部分と、全体で共有されるコードの部分を区別するものです。これにより作業を整理し、衝突を避けられます。

ステップが危険すぎる場合はどうなりますか?

計画では危険性の高いステップを特定します。そのようなステップでは、エージェントが変更を加える前に、あなたの明示的な確認を求めます。これにより、あなたが内容を理解し、同意したうえで進められます。

詳細

作者による元の説明

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.

repo: nexu-io/open-design

人気

GitHubのスター
101k
ランキング
#988
ライセンス
Apache-2.0
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル