エンジニアリング
Map the legacy repo before the agent edits a line
Agents love to skim old repos — that is where the guesses hide.
困っていたこと
klöss (@kloss_xyz) shared a paste-before-you-edit prompt for Opus, Astra, or Grok Bot on legacy code: map the codebase, trace what the task will touch, flag dead code and hidden side effects, and make no edits until you approve the map. Not affiliated with xAI.
インストールまたは作成するもの
Paste his quoted prompt as the first message before any edit session. Approve the map, then allow edits.
ボット
Legacy coder
Maps first. Edits only after you approve the map.
プラグイン
GitHub
任意
ルーティン
初回の実行では使いません。まず手動で1回通して確認してください。
プロンプト
Map before edit (author-quoted)
Quoted from @kloss_xyz — as published. Do not invent a second system prompt.
Before we change anything, map this entire codebase. Trace every piece of code this task and session will touch, what depends on it, and what breaks if it changes. Flag any dead code, hidden side effects, and literally anything you're guessing about that's not proven by code reads and specific lines. No code edits until I approve the map manually.
初回実行
- 1Read https://x.com/kloss_xyz/status/2109747284044824692 (credit @kloss_xyz).
- 2Open the legacy repo with your coding bot.
- 3Paste his map prompt as the first message — before any edit.
- 4Review the map: dependencies, break risks, guesses vs proven lines.
- 5Approve the map, then allow the bot to edit.
承認フェンス
Do not merge or deploy without your yes after the map.
調整ポイント
Steal the map-then-approve gate. No code edits until the map is proven.
出典
klöss @kloss_xyz · 元の投稿
xAI とは提携していません。このプロンプトは当サイトが書いたものではありません。第三者テンプレートの規約も適用されます。
Pro パック
アイデアだけでなく、完全な構成が必要ですか?
Pro パックには、人気ユースケースのジョブ本文、プロンプト、スケジュール、落とし穴が入っています。