|
| 1 | +# PLAN_PR_SHARED_EXTRACTION_02_EXECUTABLE_TARGET_MAP |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Replace the non-executable target map with an execution-grade target map for shared-helper extraction. |
| 5 | + |
| 6 | +This PLAN exists because `BUILD_PR_SHARED_EXTRACTION_02_EXACT_HELPER_MOVE` failed the BUILD fail-fast rule: |
| 7 | +the referenced target map does not provide enough explicit information to execute without guessing. |
| 8 | + |
| 9 | +## Current Blocker |
| 10 | +The current target map is not executable because it does **not** provide all of the following: |
| 11 | + |
| 12 | +1. Exact source file list |
| 13 | +2. Exact destination file list |
| 14 | +3. Exact source -> destination mapping |
| 15 | +4. Exact import-update targets |
| 16 | + |
| 17 | +Because those details are missing, any attempted execution would require guessing, which is not allowed. |
| 18 | + |
| 19 | +## Scope |
| 20 | +This PR purpose is **only** to define the execution-grade target map requirements and replacement structure. |
| 21 | +It does **not** execute moves. |
| 22 | +It does **not** change runtime code. |
| 23 | +It does **not** change engine APIs. |
| 24 | + |
| 25 | +## Required Replacement Artifact |
| 26 | +Create or replace the target map with a document that contains these four sections exactly: |
| 27 | + |
| 28 | +### 1) Exact Source Files |
| 29 | +List each source file that currently contains a duplicate helper. |
| 30 | + |
| 31 | +Required format: |
| 32 | + |
| 33 | +- `source_file: <repo-relative path>` |
| 34 | +- `helpers_in_file: [<helper_1>, <helper_2>, ...]` |
| 35 | + |
| 36 | +### 2) Exact Destination Files |
| 37 | +List each destination file under `src/shared` that will own moved helpers. |
| 38 | + |
| 39 | +Required format: |
| 40 | + |
| 41 | +- `destination_file: <repo-relative path>` |
| 42 | +- `helpers_owned: [<helper_1>, <helper_2>, ...]` |
| 43 | + |
| 44 | +### 3) Exact Source -> Destination Mapping |
| 45 | +List every helper move individually. |
| 46 | + |
| 47 | +Required format: |
| 48 | + |
| 49 | +- `helper: <helper_name>` |
| 50 | +- `from: <repo-relative source file>` |
| 51 | +- `to: <repo-relative destination file>` |
| 52 | + |
| 53 | +### 4) Exact Import Update Targets |
| 54 | +List every file whose imports must change because of the move. |
| 55 | + |
| 56 | +Required format: |
| 57 | + |
| 58 | +- `consumer_file: <repo-relative path>` |
| 59 | +- `remove_import_from: <old path or inline/local helper reference>` |
| 60 | +- `add_import_from: <new shared path>` |
| 61 | +- `helpers: [<helper_1>, <helper_2>, ...]` |
| 62 | + |
| 63 | +## Mandatory Constraints |
| 64 | +- DO NOT scan the repo |
| 65 | +- ONLY use explicitly listed files |
| 66 | +- NO engine API changes |
| 67 | +- NO new files unless explicitly listed |
| 68 | +- One PR purpose only |
| 69 | +- No guessing |
| 70 | +- No fallback wording such as "as needed", "if found", or "scan for duplicates" |
| 71 | + |
| 72 | +## Execution Readiness Gate |
| 73 | +The replacement target map is executable only if all answers below are **yes**: |
| 74 | + |
| 75 | +- Are all source files explicitly listed? |
| 76 | +- Are all destination files explicitly listed? |
| 77 | +- Does every helper have one exact `from` and one exact `to`? |
| 78 | +- Are all import update targets explicitly listed? |
| 79 | +- Can Codex execute the moves without opening unrelated files or discovering anything? |
| 80 | + |
| 81 | +If any answer is **no**, stop and do not issue a BUILD. |
| 82 | + |
| 83 | +## Non-Goals |
| 84 | +- No helper movement |
| 85 | +- No import edits |
| 86 | +- No refactors |
| 87 | +- No renames |
| 88 | +- No logic changes |
| 89 | +- No validation claims about code |
| 90 | + |
| 91 | +## Next Allowed Step |
| 92 | +Only after this executable target map exists should the workflow proceed to: |
| 93 | + |
| 94 | +`BUILD_PR_SHARED_EXTRACTION_02_EXACT_HELPER_MOVE` |
0 commit comments