Skip to content

docs: record the architecture decisions in docs/adr - #7

Merged
JDCyllene merged 4 commits into
CylleneDigital:mainfrom
JDCyllene:docs/decision-records
Oct 14, 2026
Merged

JDCyllene merged 4 commits into
CylleneDigital:mainfrom
JDCyllene:docs/decision-records

Conversation

@JDCyllene

@JDCyllene JDCyllene commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What this pull request does

Adds architecture decision records in docs/adr/: one file per decision, 32 records, with an index. Each record holds a decision about the plugin and its reasons (Status, Date, Context, Decision, Consequences, Related), without paths nor figures, which stay in the pages that follow the code.

  • The records cover the invariants of CLAUDE.md, the choices the code does not explain (materialized conditional taxons owning their links, counted filter subqueries with caps, media zones replacing the native Images section, the search form takeover, the condition preview) and what is kept as it is on purpose (random display modes, translation key namespaces, option conditions on translated values).
  • CLAUDE.md keeps every rule in full and links its record. The README, the docs index, the architecture overview, the code map, the conditional taxons page, CONTRIBUTING.md and the pull request template point to the records; the public contract says a record promises nothing.
  • Every record and page was checked against the code. Stale statements are fixed: the released migration is never edited (pull request template, migrations.md, CONTRIBUTING.md), syncTaxon() takes no locale, the preview orders by id, the visibility runtime caches channel membership. Stale code comments are fixed and comments that only restate the code are removed (comments only, no behaviour change).

Points to watch

  • Tests pass (vendor/bin/phpunit locally; Behat left to the CI, no template nor behaviour change)
  • PHPStan and ECS are green
  • If the schema changed: a new migration is added, and sh tests/check-schema-drift.sh prints nothing (MySQL or PostgreSQL)
  • UPGRADE.md is up to date if the public contract changes (traits and interfaces, Twig hooks and functions, grid query)
  • A decision taken or reversed has its record in docs/adr/
  • No customer data, shop secrets or pre-production URLs appear in the code, the tests or this description

No schema nor public contract change; documentation and comments only, no release needed.

One file per decision, 35 records: the invariants of CLAUDE.md, the choices the code does not
explain (materialized conditional taxons owning their links, counted filter subqueries, media
zones, the search form takeover, the condition preview) and what was kept as it is on purpose
(random display modes, translation key namespaces, option conditions on translated values).

The records hold the decisions and their reasons only; CLAUDE.md keeps every rule in full and
links its record. The README, the docs index, the overview, CONTRIBUTING and the pull request
template point to them, and the public contract says that a record promises nothing.
Drop the three records about the project's own tooling (changelog, CI organisation, contributor
stack): they are not decisions about the plugin a shop installs. Correct the records where the
code says otherwise (fixtures skip validation, only attribute and option filters are subqueries,
the preview skips rows the synchronization fails closed on, only a new icon is checked, ...).

Bring the pages in line: the released migration is never edited, syncTaxon() takes no locale,
the preview orders by id, the visibility runtime caches channel membership. The conditional
taxons page and the code map keep the facts and link the records for the reasons. Fix stale code
comments and drop the ones that only restate the code.
The upstream workaround record now states the plugin's choice (its requirements stay open) without
the project's tests and CI; the icon record no longer describes the unit test that enforces it, and
the bundle record no longer compares with other plugins.
@JDCyllene
JDCyllene requested a review from a team as a code owner October 14, 2026 13:08
@JDCyllene
JDCyllene merged commit 578af3e into CylleneDigital:main Oct 14, 2026
19 checks passed
@JDCyllene
JDCyllene deleted the docs/decision-records branch October 14, 2026 13:20
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