API rules and ADR 0043: static modules, one clock and per-kind minters, layers with account/, the common/ rule #422

Closed
opened 2026-10-15 14:45:03 +00:00 by root · 10 comments
root commented 2026-10-15 14:45:03 +00:00 (Migrated from gitlab.core-project.space)

Parent

#421

What to build

The API's rules describe the wiring the owner decided, before any code moves. This is a docs-only change, the dedicated rule change the owner asked for (CLAUDE.md, "No rule edits in feature work").

A new ADR 0043 states four things:

  • feature modules are static;
  • the root module alone is dynamic and provides each feature's options, one shared clock and one minter per kind of identity (Room code, Game id, Guest, secret);
  • the API layers are common → config → mail → auth → games → account → devtools → room → .;
  • common/ admits what at least two features use and no single feature owns.

Seam: S3. No code change; the gate stays green on docs.

Acceptance criteria

  • ADR 0043 states the wiring, the clock and minters, the layer order with account, and the common/ admission rule, in the ADR format.
  • ADR 0026 keeps the engine. Its API line points to ADR 0043.
  • ADR 0027's sentence about one flat feature module is corrected.
  • The ADR index has a row for 0043, and 0026's row reflects the change.
  • The API standards' preamble lists the seven folders and the common/ rule.
  • Rule 1 lists the files of auth/, mail/, devtools/ and account/ that may import Nest.
  • Rule 2 reads: the clock and each identity minter are shared providers, and only their default may call Date.now, Math.random or randomBytes.
  • Rule 6 adds that tests replace providers by token through createApp's overrides.
## Parent #421 ## What to build The API's rules describe the wiring the owner decided, before any code moves. This is a docs-only change, the dedicated rule change the owner asked for (`CLAUDE.md`, "No rule edits in feature work"). A new ADR 0043 states four things: - feature modules are static; - the root module alone is dynamic and provides each feature's options, one shared clock and one minter per kind of identity (Room code, Game id, Guest, secret); - the API layers are `common → config → mail → auth → games → account → devtools → room → .`; - `common/` admits what at least two features use and no single feature owns. Seam: S3. No code change; the gate stays green on docs. ## Acceptance criteria - [ ] ADR 0043 states the wiring, the clock and minters, the layer order with `account`, and the `common/` admission rule, in the ADR format. - [ ] ADR 0026 keeps the engine. Its API line points to ADR 0043. - [ ] ADR 0027's sentence about one flat feature module is corrected. - [ ] The ADR index has a row for 0043, and 0026's row reflects the change. - [ ] The API standards' preamble lists the seven folders and the `common/` rule. - [ ] Rule 1 lists the files of `auth/`, `mail/`, `devtools/` and `account/` that may import Nest. - [ ] Rule 2 reads: the clock and each identity minter are shared providers, and only their default may call `Date.now`, `Math.random` or `randomBytes`. - [ ] Rule 6 adds that tests replace providers by token through `createApp`'s overrides.
root commented 2026-10-15 14:45:16 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #423

mentioned in issue #423
root commented 2026-10-15 14:45:20 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #424

mentioned in issue #424
root commented 2026-10-15 14:45:40 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #427

mentioned in issue #427
root commented 2026-10-15 14:45:56 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #421

marked this issue as related to #421
root commented 2026-10-15 14:46:20 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #423

marked this issue as related to #423
root commented 2026-10-15 14:46:22 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #424

marked this issue as related to #424
root commented 2026-10-15 14:46:25 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #427

marked this issue as related to #427
root commented 2026-10-15 16:04:31 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit b8d9256810

mentioned in commit b8d9256810ba72ee9f81eefbf1dd0d90de43b3d9
root commented 2026-10-15 16:04:47 +00:00 (Migrated from gitlab.core-project.space)

mentioned in merge request !536

mentioned in merge request !536
root commented 2026-10-15 16:07:35 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit b40e298d22

mentioned in commit b40e298d22896cd7e12fbb19b7a1c3c148ee7af5
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-15 18:59:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
amaurycoudr/chess-project#422
No description provided.