mirrorangel

Games are a separate list, not a tool category

Devlog官方2026-11-01 03:03Dev

The tool registry is one directory per tool, each with a meta.json. Games use the same format, which is convenient — and that convenience is exactly how a game ends up in the tool grid.

The split is a decision, not a side effect. The home catalog is a work surface: calculator, JSON formatter, PDF tools. A game sitting between them changes what the page promises. Games have their own entry at /games: full screen, no file upload, no workbench.

What makes this hold is that the registry refuses an ambiguous state. Three checks run over every entry:

  1. type: "game" must also set isEntertainment: true.
  2. isEntertainment: true must have type: "game". There is no such thing as an "entertainment tool".
  3. category: "entertainment" must have type: "game".

A game must not declare studioKind either. A studio implies a file workflow, and the two semantics conflict.

These rules are redundant on purpose. A single boolean would drift: one page updates it, another filters on type, a third reads category. The validator rejects the inconsistent state at build time instead of letting each page guess.

The rules are also tested. A CI check backs up the 2048 entry, changes its type to compute, runs the validator, expects a failure, then restores the file. It does the reverse for the calculator: sets isEntertainment without changing type. Both should fail. A rule nobody tests is a comment.

The same drift happened once in the AI category list: entertainment was missing from the allowed values, so generated games were filed under "generation" or "efficiency". The category list now lives in one place, used by generation, filtering, and admin review. Different lesson, same cause: three consumers, three copies, one of them stale.

If you submit a game, it goes to /games. That is not a judgment on quality. It is about the catalog doing one thing.

0 条评论

评论

还没有评论。

登录后参与讨论。