Repository navigation
docs: add an ADR index and template, and date what each decision record decided, recorded and amended - #318
Merged
Merged
Conversation
added 2 commits
October 1, 2026 20:33
…rd decided, recorded and amended
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
… alone (#319) Follows #318, which added the ADR index and template. - **Why:** the reason the domain knows no model provider was argued in one bullet of `architecture.md`, in `CLAUDE.md`, and implied in `testing.md`, but recorded nowhere as a decision with its date and its cost. A contributor who wanted to call a provider feature from `Chartula.Core` found a rule without the reasons behind it. - **ADR 0004** records it in the template of #318: decided 2026-07-16 in #41 (for #2), recorded here. - **Context:** two operations need a model, both with structured output; the product promises several providers (#75); a domain tied to one SDK ties the pipeline to it, and lets a test of the domain reach a real model, which costs tokens, needs a key and depends on the model. - **Decision:** `Chartula.Core` references `Microsoft.Extensions.AI` alone, `ChatModel` sends to an `IChatClient`, the provider packages are referenced by `Chartula.Cli` alone, and what the domain asks of a model is expressed in `Microsoft.Extensions.AI` terms. Provider knowledge such as `ClaudeThinkingSupport` stays in `Cli/Composition`. - **Consequences, precise about the tests:** `Chartula.Core.Tests` cannot reach a model by construction. `Chartula.Cli.Tests` does reference the SDKs, on purpose, and stays offline because its tests replace the network, not because of its references; the ADR says so rather than claiming the whole suite is safe by construction. Also: a provider joins in the composition root (#88 changed no file in `Chartula.Core`), the domain is limited to what `IChatClient` expresses, a provider package is weighed for trimming (ADR 0002), and referencing one from `Core` or `Infrastructure` starts as an issue. - **`architecture.md`** keeps the choice as one line and links the ADR instead of arguing it; **`testing.md`** links the ADR for why no Core test can reach a model. - The index in `adr/README.md` lists 0004. **Verified:** - The references were read from the project files: `Chartula.Core.csproj` holds `Microsoft.Extensions.AI` and nothing else; `Anthropic` and `Microsoft.Extensions.AI.OpenAI` are in `Chartula.Cli.csproj` only; `Chartula.Cli.Tests` references `Chartula.Cli`. - The decision date and pull request from `git log -S IChatClient` and #41's description; the provider promise from the decision comment on #75; that #88 touched no file in `src/Chartula.Core` from its diff. - `GetResponseAsync<T>`, `ReasoningOptions` and `UsageDetails` as used in `ChatModel.cs` and `ChatModelOptions.cs`. - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test). Tests: none, documentation only.
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
…cks and where messages are written (#321) Follows #318, #319 and #320, after which every principle the page names has a decision record to link. - **Why:** `architecture.md` mixed product behavior (what `--no-publish` writes, what a customer page holds, which outputs exist) with code, argued its principles in place instead of pointing to their records, named the pipeline steps but not the code path from `Program` to the writers, and had no answer to "where is this message written?". Its "Where things are" left out `Cli/Configuration`, `Cli/Commands`, `Core/Pipeline`, `Core/Formatting` and the provider adapters in `Cli/Composition`. - **A run in code:** a diagram and a numbered walk from `Program.Main` through `BuildConfiguration` and `BuildServices` to `ReleaseCommand` and every step of `ReleasePipeline`, each with its port and adapter. Review is shown as what it is today: it approves as is, because review mode is refused until #249. - **Principles, one sentence each with its ADR:** facts first and the structure of a rendering (0001), one fact base for every audience stated as what it gives and not as a guarantee of agreement (0001, as amended in #318), the AOT-friendly dependencies (0002), endpoints from the environment (0003), `IChatClient` in the domain (0004), refuse rather than guess (0005). The page no longer argues any of them. - **How the two checks work,** in code: what the rule-based check builds and searches (with #315 named), what the thorough check sends and how it keeps a pull request number, and how `CallValidity` treats a failed rendering and a failed verdict differently. - **Where user-facing messages are written:** a table from what the user sees to the file that writes it, under the rule that a message is written where its cause is known (ADR 0005). - **Where things are** is complete for every folder of the three projects and links the recipe. - **The recipe** caught up with #294: step 3 is now "keep it in the run record, and decide whether it is published" (`FactEntry` always, `ChangelogChange` only for what may be published, `schemaVersion` 2 and 3); step 5 names the file `FactBaseFixtureTests` lives in and how it compares; step 6 names the round-trip tests that exist (`FactBaseRoundTripTests`), not the removed `ChangelogJsonRoundTripTests`. Its terms (fact, fact base, fixture, statement, haystack, run record, `schemaVersion`) are explained on first use. - **Three doc comments** (`GroundedFactsFactory`, `IReleaseRenderer`, `ReleaseRenderer`) said the renderings "cannot contradict each other"; they now say what the shared fact base gives, as the glossary, ADR 0001 and the README do. `CHANGELOG.md` keeps the line, since it is committed as Chartula wrote it. **Verified:** - Every step, type and file named was checked against the code: the order in `Program.Main` and `ReleasePipeline.RunStepsAsync`, the ports and their adapters, `RuleBasedFaithfulnessChecker`, `ThoroughFaithfulnessChecker`, `CallValidity`, and the file each listed message comes from (`git grep` on the message text). - The recipe's step 3 against `FactEntry.cs`, `ChangelogDocument.cs` and `ChangelogJsonSerializer.cs`; step 5 against `FixturePipelineTests.cs`; step 6 against the test files that exist. - `dotnet build` without warnings (doc comments only changed in code). - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test). Tests: none changed, documentation and doc comments only.
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
…ape the template like the merged ones (#322) Follows #316 and #318, after which CONTRIBUTING can link the testing page and the ADR index instead of explaining either. - **Why:** CONTRIBUTING told a contributor to clone `goldbarth/chartula` as "your fork", had no word on branches, review or how a merge closes an issue, did not say that a pull request's title and description become Chartula's own release notes, listed types without saying which ones reach a release, and asked for a PR description ("what and why") unlike any that has been merged. The template asked for a type checkbox and a checklist none of the merged pull requests fill in. - **From a fork to a merged pull request** in six steps: fork and `upstream`, a branch named after type and topic (as the 40 last merged branches are), commit, open, review, merge. The merge step says what the repository is set to do: squash, with the PR title as the commit title and the description as the message, so `Closes #123` in the description closes the issue and stays in the history. - **"Your pull request is Chartula's input":** the title is the line a release names the change by, its type decides whether it appears, and the description is what the model reads, so it can reach a published note. Links `writing-pull-requests.md` instead of repeating it. - **Setup:** the exact SDK with an install command, and lock files: what rewrites them, that they are committed with the change, and the locked restore CI runs, as a command to check before pushing. - **Build, test and format** as the three commands CI runs, a single test with `--filter`, and the hook; the rest links `testing.md`. - **Trying the CLI on a repository:** where the binary is, what `preview`, `generate --no-publish` and `generate` cost or change, and the local stub for the model path. - **Types with a column "In the release notes",** worked out from the category table and this repository's `chartula.yaml`: `refactor` and `docs` appear only with `visibility:user-facing`, `test`, `build`, `ci`, `chore` and `style` are dropped as internal, `revert` appears unless its target is in the same release. Scopes are the folders, as before. - **The pull request** describes the shape the merged ones share (the `Closes` or `Follows` line, a bullet per decision with its reason, a bold verification section, a `Tests:` line) with a shortened #301 as the example, and keeps the short list of checks before opening. - **Writing documentation** gives the rules the pages follow, from the documentation plan, so a docs contribution needs no other source. - **The template** has the same four parts with comments that say what goes in each, and drops the type checkboxes and the checklist. **Verified:** - The merge settings from the repository API (`squash_merge_commit_title: PR_TITLE`, `squash_merge_commit_message: PR_BODY`), and that the last 20 commits on `main` are squash merges. - The CI commands against `.github/workflows/ci.yml`; `dotnet restore Chartula.slnx --locked-mode` passes on this branch. - The type column against `what-goes-into-a-release.md` (categories, what is dropped, who can meet a change, reverts) and `GroundedFactsFactory.Reaches`. - The example against #301's description; branch names against the head branches of the last 40 merged pull requests. - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test). Tests: none, documentation only.
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
…d writes (#323) Follows #318, which gave ADR 0003 its record of the provider-host refusal (#235), and #306, which made `outputs.md` the home of what each file holds. - **Why:** SECURITY named the line between repository content and the operator's credentials as the part worth protecting, but did not say where that line runs or link the decision that draws it. A reporter could not tell from it what a run sends to the model provider, what it writes to GitHub, or what a published `changelog.json` holds, which is what decides whether a finding crosses the line. - **"The trust boundary"** links ADR 0003 and states its four rules in a sentence each: endpoints and credential variable names from the environment only, no credential from a file and no value in any output, `https` except on this machine, and the other provider's API host refused. A way around any of them is in scope. - **"What a run sends and writes"** gives each destination one bullet and links its home instead of restating it: the model provider (what a fact holds, how often it is sent, the `title-only` depth, the local server), GitHub (`github.md`'s table), and the disk (`changelog.json` without descriptions, the run record that keeps them locally). - **Scope** gains one line for pull request text that steers the model: a known limitation, linked to the README; it becomes in scope when it makes Chartula send a credential, run a program or publish elsewhere. **Verified:** - Each rule against the code: `ChartulaConfiguration` (what the environment is read for), `EndpointUrl` (`https` except loopback), `ProviderHost`, `EndpointNotice` and `doctor` (variables named, values never). - What reaches the model against `GroundedFactsFactory` (the statement per fact) and `ThoroughFaithfulnessChecker` (facts and rendering); what reaches GitHub against `GitHubPullRequestReader` and `GitHubReleaseNotesWriter`. - Private vulnerability reporting is enabled on the repository, so the report link works. - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test). Tests: none, documentation only.
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.
Follows #264, which moved the ADRs to
docs/development/adr/, and #317, which ruled out the claim that the audiences "cannot disagree".Dateline that mixed when a decision was taken with what changed later ("2026-07-16 (feat(categorization): assign categories deterministically before the LLM #45), extended by The output format is left to the model #96"), no record of when each file was written, and no list of their own; CONTRIBUTING kept the only list. ADR 0003 did not mention fix(llm): refuse a base URL that belongs to another provider's API #235, which added a refusal to the decision it records, and ADR 0002's title named the tools rather than the decision.docs/development/adr/README.mdholds the index, when to write an ADR, and a template with separate fields: Decided (when it took effect in the code, which can precede the record), Recorded (when the file was written), and Amended (every later change to the decision or to a fact in it, each dated with its pull request). A moved file, a fixed link or a reworded sentence is not an amendment, so the list stays a record of meaning.Verified:
ProviderHost.csand fix(llm): refuse a base URL that belongs to another provider's API #235's description.Tests: none, documentation only.