Skip to content

docs(adr): split src/domain by subsystem behind one entry point - #11231

Merged
morluto merged 2 commits into
mainfrom
docs/domain-subsystems-adr
Nov 15, 2026
Merged

morluto merged 2 commits into
mainfrom
docs/domain-subsystems-adr

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

W9 step 6, planning only: an ADR (docs/adr/architecture/domain-subsystems.md) for splitting src/domain. Per the maintainer's direction the split is by subsystem, not by layer folder: the JavaScript engine, the analysis-view projection and the desktop script generation each become a top-level module (src/javascriptEngine/, src/analysisView/, src/desktopScripts/) with one public index.ts, enforced by an entry-point rule in the module-boundary check. It also records the TypeScript project-references evaluation (not adopted now; why, and when to revisit). No code moves in this PR. No issue; part of the structural cleanup plan.

Problem and expected behavior

src/domain holds a 62.8K-line JavaScript engine (180 files) and a 43.5K-line output projection (147 files) whose internals are imported directly by 108 and 70 outside files (64 and 42 distinct internal modules). Expected after the planned moves: each subsystem has one written interface, and the boundary check refuses imports of its internals.

Change and scope

Documentation only. Not included: the entry-point rule, the moves themselves, and any change to wire schemas or packages (no npm workspace split). The moves are scheduled one subtree per PR after open PRs editing src/domain/javascript/ (8 files in open PRs) and src/domain/analysisView/ (2 files) have merged.

Contract and boundary impact

  • Semantic owner and earliest changed stage: none (decision record).
  • Contribution scope fit and linked maintainer decision: implements the maintainer's 2026-11-15 direction for W9 (subsystem modules with one entry point; no layer folders; no package split).
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none.

  • Base reproduction or other evidence: file and line counts from find src/domain/<subtree> -name '*.ts' ! -name '*.test.ts'; importer counts from the repository's own import resolver (scripts/lib/module-boundaries.mjs) over production files at 664fab7.

  • User-visible CLI/MCP output (if applicable): none.

  • Remaining proof gaps: the type-check time benefit of project references is unmeasured, as the ADR states.

  • Observed, derived, and inferred claims remain distinguishable.

  • Artifact identity, source provenance, and failed attempts remain preserved.

  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npx oxfmt docs/adr/architecture/domain-subsystems.md — formatted.
  • node scripts/check-doc-facts.mjs — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: not applicable.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T14:31:28.121206Z
We couldn’t complete this review. Comment @codex review to try again.
0f34f2a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The documentation change appears safe to merge.

Summary

Adds a proposed decision to split src/domain into subsystem modules with one public index.ts each.

  • The ADR lays out one public entry point for each domain subsystem.

Reviews (2) · Last reviewed commit: "docs(adr): say project references do not..." · Reviewed by Greptile

@morluto
morluto merged commit c272d05 into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the docs/domain-subsystems-adr branch November 15, 2026 14:57
@morluto morluto added area: domain Domain logic, errors, and pure functions documentation Improvements or additions to documentation labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant