|
| 1 | +# PR 8.10 — Sample Multi-File Tool Payload Alignment |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Clarify that "multiple tools" in samples means multiple files, not arrays inside a single file. |
| 5 | + |
| 6 | +Each file represents a single tool payload and matches the exact format used in workspace/game manifest tool entries. |
| 7 | + |
| 8 | +## Key Correction |
| 9 | + |
| 10 | +### ❌ WRONG (array inside one file) |
| 11 | +```json |
| 12 | +{ |
| 13 | + "tools": [ ... ] |
| 14 | +} |
| 15 | +``` |
| 16 | + |
| 17 | +### ✅ CORRECT (multiple files) |
| 18 | +``` |
| 19 | +sample.0305.vector-map-editor.json |
| 20 | +sample.0305.vector-asset-studio.json |
| 21 | +``` |
| 22 | + |
| 23 | +Each file: |
| 24 | +- references ONE tool schema |
| 25 | +- contains ONE tool payload |
| 26 | +- is identical in shape to what goes inside: |
| 27 | + workspace.manifest.json → games[].tools[] |
| 28 | + |
| 29 | +## File Naming Standard |
| 30 | + |
| 31 | +``` |
| 32 | +sample.<id>.<tool>.json |
| 33 | +``` |
| 34 | + |
| 35 | +Examples: |
| 36 | +- sample.0305.vector-map-editor.json |
| 37 | +- sample.0305.palette-editor.json |
| 38 | +- sample.0101.sprite-editor.json |
| 39 | + |
| 40 | +## Payload Rule |
| 41 | + |
| 42 | +Each sample tool file MUST match EXACTLY the structure used in game/workspace manifests. |
| 43 | + |
| 44 | +Example: |
| 45 | + |
| 46 | +```json |
| 47 | +{ |
| 48 | + "$schema": "../../../tools/vector-map-editor/tool.schema.json", |
| 49 | + "tool": "vector-map-editor", |
| 50 | + "config": {} |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +This is identical to: |
| 55 | + |
| 56 | +```json |
| 57 | +{ |
| 58 | + "tools": [ |
| 59 | + { |
| 60 | + "tool": "vector-map-editor", |
| 61 | + "config": {} |
| 62 | + } |
| 63 | + ] |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +## Rules |
| 68 | + |
| 69 | +- One file = one tool |
| 70 | +- No arrays inside sample files |
| 71 | +- File = tool payload |
| 72 | +- Same structure as workspace manifest tool entry |
| 73 | +- $schema must point to tool schema |
| 74 | +- Naming must be deterministic |
| 75 | +- No wrapper objects (no documentKind, no sample envelope) |
| 76 | + |
| 77 | +## Palette |
| 78 | + |
| 79 | +If needed: |
| 80 | +``` |
| 81 | +sample.palette.json |
| 82 | +``` |
| 83 | + |
| 84 | +Referenced by convention, not embedded. |
| 85 | + |
| 86 | +## Non-Goals |
| 87 | + |
| 88 | +- No runtime logic |
| 89 | +- No validators |
| 90 | +- No workspace schema changes |
| 91 | + |
| 92 | +## Acceptance |
| 93 | + |
| 94 | +- No sample files contain tools arrays |
| 95 | +- All sample tool files match workspace tool payload shape |
| 96 | +- Naming convention enforced |
0 commit comments