Skip to content

Plan: Driven port interfaces (1.2.2)#13

Draft
lodyai[bot] wants to merge 1 commit into
mainfrom
1-2-2-define-driven-port-interfaces
Draft

Plan: Driven port interfaces (1.2.2)#13
lodyai[bot] wants to merge 1 commit into
mainfrom
1-2-2-define-driven-port-interfaces

Conversation

@lodyai

@lodyai lodyai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the execution plan docs/execplans/1-2-2-define-driven-port-interfaces.md for roadmap item 1.2.2 — defining the six driven-port interfaces (GameStateRepository, Clock, RandomSource, AudioEventSink, AssetCatalogue, TelemetrySink) in src/domain/ports/.

This PR contains the plan only. No interfaces are implemented yet — the execplans approval gate requires sign-off before implementation begins. Please review the plan and approve (or request revisions).

How the plan was produced

  • Grounded in docs/roadmap.md (1.2.2), the HLD §"Module layout"/§"Domain model", and ADR-002/004/005/006/007/008/009/010, plus the existing 1.2.1 boundary tooling (scripts/import-boundaries.ts, tools/path-aliases.ts, strict tsconfig).
  • Open gaps on prior art resolved via Firecrawl: pure-rand's immutable generator shape (inspiration only — not a dependency) and the Result-vs-Promise convention for ports.
  • Stress-tested by a Logisphere community-of-experts design review (contracts, structural boundaries, alternatives, failure-mode pre-mortem). Verdict: proceed with conditions; every condition is folded into the plan's Decision Log and Interfaces sections.

Key design decisions captured

  • Opaque branded placeholders for the not-yet-built 1.3.1 aggregates (not permissive unknown/Record), so premature coupling is a compile error.
  • GameStateRepository segregated into RunIndex / SnapshotStore / EventLog, composed via an intersection alias (ADR-004 access patterns/evolution rates).
  • RandomSource as a pure, immutable, snapshot-serialisable port (sfc32 per ADR-005); the snapshot value the pure tick consumes lives in domain/model.
  • A new placeholder-honesty CI guard (lint:domain-placeholders) plus an import-hygiene rule closing the boundary guard's npm allow-list gap.
  • Dropped sync AssetCatalogue.has; documented the "a sink never throws" invariant with an optional Flushable; property-style members throughout; the no-Result divergence from the ADR-002 sketch and the deferred seventh (self-play report) seam are recorded.

Scope note for the approver

This is a types-only slice — it renders no DOM and carries no user-visible strings — so localisation, card-model data, WCAG 2.2 markup, and Playwright/css-view visual validation are recorded as not applicable. bun ff (including the a11y and e2e suites) must still pass green during implementation to prove no regression. Please confirm you agree with this scoping.

References

🤖 Generated with Claude Code

Add the execution plan for roadmap item 1.2.2 (define the six driven-port
interfaces: GameStateRepository, Clock, RandomSource, AudioEventSink,
AssetCatalogue, TelemetrySink).

The plan was drafted from the HLD, ADR-002/004/005/006/007/008/009/010, and
the existing 1.2.1 tooling, then revised after a focused Logisphere
community-of-experts design review (verdict: proceed with conditions). Key
decisions captured: opaque branded placeholders for not-yet-built aggregates,
GameStateRepository segregated into RunIndex/SnapshotStore/EventLog, a pure
immutable RandomSource with the snapshot value owned by the model, a new
placeholder-honesty CI guard plus an import-hygiene rule, dropped sync
AssetCatalogue.has, sink "never throws" invariant with optional Flushable,
property-style members, and the no-Result divergence documented.

No implementation has begun; the plan awaits approval per the execplans gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @LodyAI[bot], you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d31d548f-98ec-4d02-80d0-6933bb5f7422

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 1-2-2-define-driven-port-interfaces

Comment @coderabbitai help to get the list of available commands and usage tips.

@leynos leynos changed the title Plan driven-port interfaces (1.2.2) Plan: Driven port interfaces (1.2.2) Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant