Skip to content

docs(adr): ADR-001 says what is true about the domains - #1315

Merged
ExtraToast merged 1 commit into
mainfrom
docs/adr-001-says-what-is-true
Sep 18, 2026
Merged

ExtraToast merged 1 commit into
mainfrom
docs/adr-001-says-what-is-true

Conversation

@ExtraToast

@ExtraToast ExtraToast commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Closes #1273.

Three statements in docs/adr/frontend/ADR-001-domain-feature-architecture.md were false on main, and they are the kind that cost work: a reader planning against them would set out to build things that already exist.

What was wrong

The ADR said What is true on main
"no domain has one" / "No domain exposes an index.ts" All eleven do — association, auth, boards, cohorts, committees, contribution, emails, esports, jobs, recovery, user
"the cross-domain rule has never had an implementation to route through" Both rules have been enforced since #1183 and #1206
"Report-only first, then error" They landed at error and have never been report-only
"An eslint no-restricted-paths rule" no-restricted-paths needs eslint-plugin-import, which is not a dependency. Both halves are one built-in no-restricted-imports entry

What it says now

The Enforcement section describes the rule that exists: one no-restricted-imports entry, two patterns, error. It records why it is one entry — a second block naming the same rule replaces the first rather than adding to it, which is how the first draft let a client import through — because that is the trap the next person editing this will walk into.

The allowlist is described as what it is: the debt count, 70 when the rule landed, 42 today (7 pages, 35 components), deleted when it empties. Measured on ec0e11212, and git grep -l "@/services/api" returns exactly those 7 and 35, so the list and the tree agree.

The .vue exception is written down as a decision rather than left to read as an oversight — a component is imported where it is drawn, and routing components through a barrel loads a domain's whole surface into anything that renders one.

The one remaining gap is stated rather than implied: the deep-import rule is scoped to pages/** and components/**, so a domain reaching into another domain is not yet checked. That is #1263.

One thing deliberately not settled here

The ADR also said domain names are singular — "board, not boards". Five are plural: boards, cohorts, committees, emails, jobs. Nothing enforces either way.

Renaming five directories moves every import that names them and would conflict with every open branch, so it is not a docs-only change and does not belong in this PR. The sentence now records that the rule was specified and never held to, and points at #1314, which settles it. A reader is told to follow the directory that is there rather than the sentence.

Acceptance criteria

  • The claim that no domain exposes an index.ts is replaced by what the eleven domains actually expose
  • The rollout wording says the rule is enforced as error, with the .vue exemption stated as a decision rather than as a gap
  • No sentence in the ADR contradicts services/frontend/eslint.config.mjs at this commit
  • Nothing outside the ADR changes — the diff is one file

Diff breakdown added removed, scaled to the largest row.

docs                                               +34    -15    1
  docs               ██████████████████░░░░░░░░    +34    -15    1

──────────────────────────────────────────────────────────────────
total (hand-written)                               +34    -15  1 file

Three statements in it were false on main, and a reader who believed them would
plan work that is already done.

It said no domain exposes an `index.ts`. All eleven do, and each is named. It
said the cross-domain rule had never had an implementation to route through, and
that the rollout would be report-only first: both rules have been enforced as
`error` since they landed. It described the rule as `no-restricted-paths`, which
is not the plugin this repo has — both halves are one `no-restricted-imports`
entry, and the reason they are one entry is now recorded, because a second block
naming the same rule replaces the first.

The allowlist is described as what it is: the debt count, 70 when the rule
landed and 42 today, deleted when it empties. The `.vue` exception is written
down as a decision rather than left to read as a gap.

The naming sentence is the one thing not settled here. It asked for singular
names, five domains are plural, and nothing enforces either; #1314 decides which
way that goes.
@ExtraToast
ExtraToast merged commit a499910 into main Sep 18, 2026
21 checks passed
@ExtraToast
ExtraToast deleted the docs/adr-001-says-what-is-true branch September 18, 2026 10:54
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.

ADR-001 says what is true about the domains

1 participant