Skip to content

Commit 2b524ef

Browse files
Merge pull request #496 from appdevforall/docs/ADFA-5343-server-lifecycle-adr
ADFA-5343 docs(server-lifecycle): add reconciler ADR + design-coherence guard
2 parents dd0a05f + 366709d commit 2b524ef

3 files changed

Lines changed: 593 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ Thumbs.db
1111
# pdf.js prebuilt dist (fetched at build time, not vendored) — ADFA-4708
1212
static/pdfjs/dist/
1313
controller/app/src/main/assets/kolibri_tree.jsonl
14+
15+
# Local, per-contributor Claude overrides (never committed)
16+
CLAUDE.local.md

‎CLAUDE.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,29 @@ incrementally:
6666

6767
---
6868

69+
## Design coherence — don't add state to compensate for a missing owner
70+
71+
The server-lifecycle tangle (ADR-5343: ~17 tickets in ~8 weeks, each adding a state to
72+
compensate for one missing owner) is the failure mode these rules prevent. Before adding code:
73+
74+
- **Before adding a state, flag, or guard, prove it is not a duplicate truth.** Does this fact
75+
already have an owner/source in the code? If you are re-deriving a value that lives in another
76+
layer, or adding a flag to paper over a race, STOP — that is a design signal, not a coding one.
77+
Raise it (a PR comment or an ADR); do not patch it locally.
78+
- **One source per fact.** If two places answer the same question ("is the server up?", "is an
79+
install running?"), the fix is to unify the source, not add a third.
80+
- **N tickets orbiting one file/concern is a redesign signal, not another patch.** If a file
81+
accumulates many `ADFA-XXXX` references on the same concern (check `git log`/`git blame`), raise
82+
an ADR before adding patch N+1.
83+
- **Prefer removing over adding.** A change that introduces a distinct state must justify in the PR
84+
why it is not a duplicate truth or a race compensator.
85+
- **The code-review second pass is a standing pre-merge gate, not reactive.** On every PR, beyond
86+
the form pass, run the two depth questions: does this add a second place that knows the same
87+
thing? does the structural fix have a lifecycle (who sets it, who clears it, what if the process
88+
dies)? When a *fact* is missing (not a case), the fix is usually a design change — surface it.
89+
90+
---
91+
6992
## Working in parallel (coordinating features on one repo)
7093

7194
We often have more than one feature in flight at once on this single repo. To keep

0 commit comments

Comments
 (0)