Record architecture decisions - #47
Merged
Merged
Conversation
Adopting the MADR format already used in caltechlibrary/alchemist and caltechlibrary/workflows: docs/decisions/, NNNN-kebab-case.md, immutable once accepted, rejected options recorded. Two decisions, chosen on the test in ADR-0001 -- a decision worth recording is one whose result looks like unnecessary complication to someone who did not watch it being made, and which a future reader would therefore be tempted to "simplify" back: 0002 build the site rather than publishing the repository 0003 keep sources and generated files in separate namespaces Both carry the alternatives that were rejected and why, which is the part the code cannot show. 0002 records that a self-contained workflow was built first and worked, and was rejected anyway because it is a copy -- and that the reusable workflow cannot be used here, since a caller cannot add a Deno setup step to a job it did not write. 0003 records why several Markdown files stay in the root: cmt writes them there and its generator registry keys on the exact output filename, so it cannot write to docs/. The reasoning was in the description of caltechlibrary#46, which stops being read the moment it merges. The ADRs are not rendered into the site: the build globs docs/*.md without recursing, so docs/decisions/ is carried in the repository and read on GitHub. That suits the audience -- they are for people changing this repository, not for people using the components. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Adopts the MADR format already in use in
caltechlibrary/alchemistandcaltechlibrary/workflows, and records the two decisions behind #46.Additive only — three Markdown files, no code changes.
Why
The reasoning for #46 lived in its description, which stops being read the moment it merges. Both decisions leave behind something that looks like a mistake to anyone who did not watch it being made:
docs/, but several Markdown files stay in the rootEach is the survivor of an alternative that was tried or costed and rejected. Without that written down, the obvious move for the next person is to "simplify" them back.
The ADRs
0002 records that a self-contained build workflow was written first and worked — the resulting site was byte-identical to what was published — and was rejected anyway, because it would be a copy that every other Caltech Library site needs too. It also records why the reusable workflow cannot be used here: the site compiles component bundles, so
deno task buildhas to run first, and a caller cannot add steps to a job it did not write.0003 records why some Markdown stays in the root. Not preference —
cmtwrites those files there, and its generator registry keys on the exact output filename, socmt codemeta.json docs/about.mdexits withunsupported format. It also collects what the flat layout actually cost: ten filenames shadowed between/andsrc/, a Lua filter referenced for three months but never committed, and generated HTML that drifted from its source.Notes
docs/*.mdwithout recursing, sodocs/decisions/is carried in the repository and read on GitHub. That suits the audience — they are for people changing this repository, not for people using the components. ADR-0001 says so explicitly, since it is the obvious thing to wonder about.🤖 Generated with Claude Code