Public: anyone can read this; the crew can change it.

Minecraft is a kind: one kind interface, with the compose design and the console adapter behind it in one directory #18468

opened this

Merged 3h 15m ago, live in production

Minecraft is now a kind behind one interface in src/kinds/. The compose design and the console adapter live in src/kinds/minecraft/, and the general layer reaches them only through that interface. The pushed state passes tsc, the gate's --fix, design-lint and the tests I ran.

Notes

opened this

Minecraft is now a kind behind one interface in src/kinds/. The compose design and the console adapter live in src/kinds/minecraft/, and the general layer reaches them only through that interface. The pushed state passes tsc, the gate's --fix, design-lint and the tests I ran. I did not run the full suite, and the forge's check runs it on this push.

What moved

  • src/games/minecraft.ts is now src/kinds/minecraft/compose.ts, and src/games/console.ts is now src/kinds/minecraft/console.ts. Both old files are deleted, not left beside the new ones.
  • src/kinds/kind.ts declares the interface with five parts: compose design, console adapter, people adapter, identity prover and metrics probe. MinecraftInput and MinecraftDesign became its DesignInput and Design, and the Crash type was lifted into it too.
  • src/kinds/index.ts has kindNamed(name) and defaultKind().
  • src/kinds/minecraft/index.ts is the Minecraft value of the interface.
  • The people, identity and metrics parts are stubs that only name where their code still lives. The next issue moves that code.
  • Callers now go through defaultKind(): src/actions/minecraft.ts, src/web/pages/games.ts, src/web/log_reader.ts and src/logs/game.ts. docs/features/infra.md points at the new path.

What I chose not to do

  • src/games/compose.ts stays put. It reads and edits any box's compose file, so it is the general layer, not Minecraft's design.
  • modrinth.ts, presets.ts and spark* stay put. The issue's moves cover only the compose design and the console adapter.
  • No public names were renamed. That is P16 line 4.
  • I changed no behaviour and no page, route or tool, so each commit message says why there is no terminal or how-to change.
  • Identity: identity.ts does not exist in src/games, so I pointed that stub at src/core/proven_identities.ts. Check that this is where the identity prover belongs.

Tests

  • New test/kinds.test.ts checks that a kind is found by name and an unknown name has none. It checks that all five parts exist and the unmoved three are stubs, and that the compose design and the console both work through the kind.
  • It also checks that nothing outside src/kinds/ imports kinds/minecraft/.
  • Only imports changed in test/minecraft-design.test.ts and test/game-console-colour.test.ts.

Try it: open /games on the preview. A box's console and its crash fold should draw as before.

🤖 Generated with Claude Code

Closes #18455

commented

Minecraft is now a kind behind one interface in src/kinds/. The compose design and the console adapter live in src/kinds/minecraft/, and the general layer reaches them only through that interface. The pushed state passes tsc, the gate's --fix, design-lint and the tests I ran. I did not run the full suite, and the forge's check runs it on this push.

What moved

  • src/games/minecraft.ts is now src/kinds/minecraft/compose.ts, and src/games/console.ts is now src/kinds/minecraft/console.ts. Both old files are deleted, not left beside the new ones.
  • src/kinds/kind.ts declares the interface with five parts: compose design, console adapter, people adapter, identity prover and metrics probe. MinecraftInput and MinecraftDesign became its DesignInput and Design, and the Crash type was lifted into it too.
  • src/kinds/index.ts has kindNamed(name) and defaultKind().
  • src/kinds/minecraft/index.ts is the Minecraft value of the interface.
  • The people, identity and metrics parts are stubs that only name where their code still lives. The next issue moves that code.
  • Callers now go through defaultKind(): src/actions/minecraft.ts, src/web/pages/games.ts, src/web/log_reader.ts and src/logs/game.ts. docs/features/infra.md points at the new path.

What I chose not to do

  • src/games/compose.ts stays put. It reads and edits any box's compose file, so it is the general layer, not Minecraft's design.
  • modrinth.ts, presets.ts and spark* stay put. The issue's moves cover only the compose design and the console adapter.
  • No public names were renamed. That is P16 line 4.
  • I changed no behaviour and no page, route or tool, so each commit message says why there is no terminal or how-to change.
  • Identity: identity.ts does not exist in src/games, so I pointed that stub at src/core/proven_identities.ts. Check that this is where the identity prover belongs.

Tests

  • New test/kinds.test.ts checks that a kind is found by name and an unknown name has none. It checks that all five parts exist and the unmoved three are stubs, and that the compose design and the console both work through the kind.
  • It also checks that nothing outside src/kinds/ imports kinds/minecraft/.
  • Only imports changed in test/minecraft-design.test.ts and test/game-console-colour.test.ts.

Try it: open /games on the preview. A box's console and its crash fold should draw as before.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs