docs(adr): ADR-001 says what is true about the domains - #1315
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1273.
Three statements in
docs/adr/frontend/ADR-001-domain-feature-architecture.mdwere 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
mainindex.ts"association,auth,boards,cohorts,committees,contribution,emails,esports,jobs,recovery,usererror"errorand have never been report-onlyno-restricted-pathsrule"no-restricted-pathsneedseslint-plugin-import, which is not a dependency. Both halves are one built-inno-restricted-importsentryWhat it says now
The Enforcement section describes the rule that exists: one
no-restricted-importsentry, 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, andgit grep -l "@/services/api"returns exactly those 7 and 35, so the list and the tree agree.The
.vueexception 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/**andcomponents/**, 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, notboards". 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
index.tsis replaced by what the eleven domains actually exposeerror, with the.vueexemption stated as a decision rather than as a gapservices/frontend/eslint.config.mjsat this commitDiff breakdown —
█added░removed, scaled to the largest row.