|
| 1 | +# M2 Explicit Local-Import Adapter Contract |
| 2 | + |
| 3 | +Original `M2 - Local extraction import` remains active and incomplete. This static contract defines |
| 4 | +the boundary for a later explicit local-import adapter. It does not read or parse a local export, |
| 5 | +import a database, build a line index, build a context graph, or complete any original M2 |
| 6 | +criterion. |
| 7 | + |
| 8 | +## Explicit Input Boundary |
| 9 | + |
| 10 | +A future adapter may accept exactly one user-selected export file under: |
| 11 | + |
| 12 | +```text |
| 13 | +workspace/local-private/extraction-indexing/input/ |
| 14 | +``` |
| 15 | + |
| 16 | +The user must copy or place the export under the ignored workspace root and pass its exact path. |
| 17 | +The future adapter must not infer, discover, or search for an export. |
| 18 | + |
| 19 | +This contract does not approve: |
| 20 | + |
| 21 | +- directories as adapter inputs; |
| 22 | +- external absolute paths; |
| 23 | +- recursive discovery or arbitrary drive traversal; |
| 24 | +- automatic Steam or game-install scanning; |
| 25 | +- reading the selected file in this contract slice. |
| 26 | + |
| 27 | +## Future Dry-Run Boundary |
| 28 | + |
| 29 | +The first future implementation must remain metadata-summary-only. It may report: |
| 30 | + |
| 31 | +- whether the explicit file exists; |
| 32 | +- whether the selected input is a file; |
| 33 | +- the file size in bytes; |
| 34 | +- redacted blocker categories; |
| 35 | +- schema compatibility as deferred. |
| 36 | + |
| 37 | +Future private output is allowed only under: |
| 38 | + |
| 39 | +```text |
| 40 | +workspace/local-private/extraction-indexing/import/ |
| 41 | +``` |
| 42 | + |
| 43 | +Tracked output must not contain local paths, filenames, file contents, extracted text, payloads, |
| 44 | +logs, screenshots, OCR output, save data, decompiled data, provider payloads, or runtime evidence. |
| 45 | + |
| 46 | +## Safety Boundary |
| 47 | + |
| 48 | +This contract does not permit: |
| 49 | + |
| 50 | +- real local-export reads or parsing; |
| 51 | +- real DB import; |
| 52 | +- line-index or context-graph construction from private input; |
| 53 | +- automatic Steam, game-install, or drive scanning; |
| 54 | +- BepInEx or game-log reads; |
| 55 | +- screenshots, OCR, saves, or decompiled-code work; |
| 56 | +- current-line capture, UI text reading, Unity scanning, hooks, or Harmony patches; |
| 57 | +- provider execution or companion HTTP contract changes; |
| 58 | +- committed extracted text, payloads, indexes, or private paths. |
| 59 | + |
| 60 | +## Fixture And Checker |
| 61 | + |
| 62 | +The machine-readable scope fixture is: |
| 63 | + |
| 64 | +```text |
| 65 | +docs/m2-explicit-local-import-adapter-contract.md |
| 66 | +tests/fixtures/m2_explicit_local_import_adapter_scope.synthetic.json |
| 67 | +scripts/check_m2_explicit_local_import_adapter_contract.py |
| 68 | +``` |
| 69 | + |
| 70 | +Validate the contract with: |
| 71 | + |
| 72 | +```powershell |
| 73 | +python scripts/check_m2_explicit_local_import_adapter_contract.py --quiet |
| 74 | +``` |
| 75 | + |
| 76 | +The next allowed step is: |
| 77 | + |
| 78 | +```text |
| 79 | +m2_explicit_local_import_adapter_dry_run |
| 80 | +``` |
0 commit comments