Repository navigation
Description
This was generated by AI during triage (operator-ratified decision, 2026-07-24).
Summary
Codify the org-wide duplication-consolidation doctrine in conventions/engineering/engineering-philosophy.md: copy-count thresholds (Rule of Three vs threshold-of-two) are subordinated to an ordered test sequence. Ratified by the owner after a deep-research pass (24 sources, 25 claims adversarially verified, 1 refuted); origin: melodic-software/claude-code-plugins#252.
The ratified decision matrix
Run in order; first decisive test wins:
- T1 — Same knowledge or coincidental? Identical text encoding different knowledge is a coincidence, not duplication (Hunt/Thomas); never consolidate — consolidation actively harms.
- T2 — Crosses an encapsulation boundary? Bounded contexts, services, availability seams: duplication is correct by design (DDD divergent models; event-carried state transfer). Consolidate only via an explicit shared-kernel-style decision with an owner.
- T3 — Change-together acid test. One fact forcing edits in multiple places/formats (including code+docs pairs) is true knowledge duplication — consolidate now, even at two copies; count is irrelevant.
- T4 — Abstraction namable and stable? Cannot name it → the Rule-of-Three brake applies (wrong-abstraction avoidance); can name it → two copies suffice.
- T5 — Reversibility. Cheap to inline back → early consolidation is low-risk; load-bearing/hard-to-unwind abstraction → demand the third occurrence as evidence.
- T6 — Churn/friction. High co-change frequency multiplies drift cost → consolidate earlier; static content tolerates copies longer.
Prose overlay: knowledge-bearing docs content (values, procedures, policy) consolidates from first reuse (DITA single-sourcing posture — no Rule-of-Three wait exists in tech-writing doctrine); audience-, context-, or SEO-sensitive prose is legitimately duplicated (Write the Docs); reuse-eligibility alone never justifies consolidation.
Constraints for the doctrine text
- Do not present the Rule of Three as a cost calculus — the claim that three copies makes maintenance cost definitively outweigh refactoring cost was refuted (0-3 adversarial vote). It is a heuristic brake against premature wrong abstractions, permissive about two, never a prohibition on earlier extraction.
- Cite Metz ("The Wrong Abstraction"), Dodds (AHA), Swett (counter-argument), and Pike (Go proverb) as links, not load-bearing attributions, until a targeted primary-source verify pass — these camps had no surviving primary-verified claims in the research run.
Key sources (verified)
- Hunt/Thomas, The Pragmatic Programmer (20th Anniv.) DRY chapter — https://media.pragprog.com/titles/tpp20/dry.pdf
- Dave Thomas, Artima interview — https://www.artima.com/articles/orthogonality-and-the-dry-principle
- Rule of Three — https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)
- Rainsberger, Clarifying the Rule of Three — https://blog.jbrains.ca/permalink/clarifying-the-rule-of-three-in-refactoring/
- Fowler, Bounded Context (quoting Evans) — https://martinfowler.com/bliki/BoundedContext.html
- Fowler, What do you mean by "Event-Driven"? — https://martinfowler.com/articles/201701-event-driven.html
- DITA Best Practices ch. 10 — https://www.oreilly.com/library/view/dita-best-practices/9780132374323/ch10.html
- Gasparyan, WTD Portland 2022 content-reuse talk — https://www.writethedocs.org/videos/portland/2022/don-t-shoot-yourself-in-the-foot-with-content-reuse-anna-gasparyan/
Acceptance
engineering-philosophy.mdcarries the ordered matrix and prose overlay as the org duplication posture.- Consumers of the posture (e.g. claude-code-plugins
docs-hygieneskills,point-dont-copycorrector) can cite it as the single source of truth instead of restating thresholds.
Activity
feat(conventions): add source-authority tiers and session-time agent-…
kyle-sexton commentedon Jul 27, 2026
This was generated by AI during triage.
The triage lane has claimed this item for triage.
kyle-sexton commentedon Jul 27, 2026
This was generated by AI during triage.
Triage brief
Verified against the working tree at
861060b4(chore: raise loop-lane merge rung to c3-autonomous (#281)). Every line number below was read, not inferred.Goal
Land the owner-ratified duplication-consolidation doctrine (ordered tests T1–T6 plus the prose overlay) as the org's single authoritative duplication posture in
conventions/engineering/, and reconcile every existing catalog statement that currently gates consolidation on a copy count.Verdict: real and actionable, with one placement decision reserved to the owner
The content decision is settled — the body reads as a ratified matrix, not an open question. What is not settled is which file the body lands in, and the issue body never engages the repo's file architecture. See Open questions. Do not start authoring before that one word is answered; it changes which files the diff touches.
Exact files and insertion points
The placement candidates (pick per Open questions):
conventions/engineering/engineering-philosophy.md— 35 lines total. It is a priors index, not a body. Its## Cross-cutting design defaultssection (lines 28–35) already delegates this exact concern:Two catalog rules push against putting the body here.
conventions/engineering/README.md:7states this file's charter as "the default posture: explicit, fail-fast, resilient, idempotent, simple, cross-platform, cosmetic findings as real work" — duplication is not in that charter, andREADME.md:16assigns it toreference-dont-duplicate.md.conventions/engineering/progressive-disclosure.md:17-18calls inlining a full body into a headline surface "the core anti-pattern".AGENTS.md("Before changing anything here") holds a change in this repo to the bar the catalog prescribes downstream, so both apply to this diff.conventions/engineering/reference-dont-duplicate.md— 45 lines. Already owns in-repo duplication (README.md:16), already distinguishes literal vs semantic duplication (lines 5–10) and the Describe/Use/Expose roles (lines 18–24). The matrix slots naturally as a new##section between## Smell signals(line 12) and## Classify a file's role before flagging(line 18), because the matrix supersedes the smell signals it would sit above.Text that must be edited or removed under either placement — these are contradictions, not cross-link opportunities:
conventions/engineering/reference-dont-duplicate.md:12-16— the sharpest conflict in the repo. Currently:Signals 1 and 2 gate the rule on three copies. T3 says one fact forcing edits in multiple places is knowledge duplication to consolidate "even at two copies; count is irrelevant." Rewrite, do not cross-link.
conventions/engineering/simpler-code.md:25— "A reduction is right when it removes copy-paste duplication after three uses agree on shape". Must be re-anchored to T4 (namable/stable abstraction) and T5 (reversibility), not a count.conventions/engineering/simpler-code.md:10— cites Metz as a load-bearing attribution: "The wrong abstraction — an abstraction extracted before three concrete uses agree on its shape. Duplication is cheaper than the wrong abstraction". This collides directly with this issue's own constraint that Metz is a link, not a load-bearing attribution. The constraint forces an edit here; it cannot be satisfied by only touching the new text.conventions/engineering/code-organization.md:12— "This governs verbatim reuse of identical logic; deciding the shape of a new abstraction follows the rule of three — seesimpler-code.md." Repoint if doctrine ownership moves. Notecode-organization.md:5-12("Share at the second consumer") is already threshold-of-two and is consistent with T3/T4 — keep it, but make the composition explicit rather than leaving two unlinked thresholds.conventions/review/code-design.md:30— "repeated field/property/method scaffolding across three or more classes signals a missing base or helper... (Rule of three; see../engineering/simpler-code.md.)" Repoint and reconcile the count language.conventions/engineering/README.md— the charter table row changes under either placement (row 7 gains duplication, or row 16 broadens).Content contract
Non-negotiable; these are acceptance criteria, not suggestions:
simpler-code.md:10and:25.simpler-code.md:10.## Sourcessection, matching the existing pattern (progressive-disclosure.md:26-28).conventions/engineering/—conventions/engineering/README.md:3andenforceability-tiers.mdreserve mechanically-enforceable rules forcomponents/.Out of scope
melodic-software/claude-code-plugins(thedocs-hygieneskills, thepoint-dont-copycorrector, or thestandards-contract.mdsurface indexes). Downstream re-pointing is a follow-up in that repo, not this diff.distribution/sync-manifest.yml. Noconventions/path appears in it (verified: zero matches forconventionsacross all 259 lines); this change adds none.Acceptance criteria
reference-dont-duplicate.md:14-16no longer gates the rule on three copies.simpler-code.md:10and:25no longer make three uses the trigger, and Metz is a link rather than a load-bearing attribution.code-organization.md:12andconventions/review/code-design.md:30repointed and count-language reconciled.conventions/engineering/README.mdcharter row updated.distribution/governance-process.md:46-76makes cross-doc reconciliation a required self-review checklist item for anyconventions/change (required_approving_review_countis0org-wide, so nothing else backstops it). The PR body must state that no other normative doc was left contradicting the change.reference-dont-duplicate.md:32-34requires citation by a documented heading, and this issue's own acceptance says downstream consumers will cite this doctrine as the single source of truth. The PR must state the exact heading text as the contract anchor.npm run lint:md— the documented markdown gate in README's Validation section, runningmarkdownlint-cli2 --config .markdownlint-cli2.jsonc. Style constraints that bite prose: MD004 dash bullets, MD049/MD050 asterisk emphasis/strong, MD003 ATX headings; MD013 is disabled so there is no wrap limit.lefthookruns the fast pre-commit subset (lefthook.ymlextendscomponents/lefthook-base/lefthook.yml, which pullseditorconfig-checker,gitleaks,markdownlint,typos/_typos.toml,repository-text). Link checking is load-bearing here because the doctrine carries eight external URLs:lychee.tomlsetsinclude_fragments = "full"and its header documents an offline CI lane plus an online advisory lane.pr-titleis a required status perAGENTS.md); squash-only merge.Blast radius
Read-at-source, single repo.
distribution/sync-manifest.ymlcontains zeroconventions/entries across all 259 lines — every component it materializes is executable policy (lefthook-*,markdownlint,gitleaks,runner-policy,dotnet-analysis, and so on).conventions/engineering/README.md:3andconventions/README.mdposition this tier as reasoning-only prose adopted by pointer or by copy, not by managed materialization. So no downstream materialization PR follows this change.Two qualifiers:
distribution/governance-process.md:8-44documents a sanctioned manual copy path for reasoning-only prose, with back-link and drift-check requirements owned by the adopting repo. Any consumer that copied these files owns noticing this change; this repo does not push it.melodic-software/claude-code-pluginsclone, the only matches forreference-dont-duplicate/engineering-philosophyare aCHANGELOG.mdentry and an illustrative example fence insideplugins/{review,planning}/reference/standards-contract.md(line 62, a sample index table) — not a live normative citation. Downstream therefore has no citation to break today, but also no row to inherit: if the doctrine body lands inreference-dont-duplicate.md, a consumer'sstandards-contract.mdindex would need a row for it, since the sample only carries anengineering-philosophysurface.Open questions
One, reserved to the owner, blocking authoring:
Where does the doctrine body land?
conventions/engineering/reference-dont-duplicate.md, with a one-line headline bullet added toengineering-philosophy.md's existing## Cross-cutting design defaultsslot pointing at it. This is what the catalog's own rules prescribe:README.md:16already assigns duplication to that file,progressive-disclosure.md:17-18forbids inlining a body into a headline surface, andengineering-philosophy.md:35already delegates there. It also puts the matrix directly above the smell signals it supersedes.engineering-philosophy.md, as this issue's acceptance criterion literally reads ("engineering-philosophy.mdcarries the ordered matrix and prose overlay"). Honors the ratified wording exactly, at the cost of a self-inflicted dogfooding finding againstprogressive-disclosure.mdand theREADME.md:7charter row.The ratification covered the matrix content after a DRY research pass; nothing in the issue body engages this repo's file architecture or names a single existing line to change, which is why this reads as unresolved rather than decided.
kyle-sexton commentedon Aug 11, 2026
Frontier consensus (Fable + Sol) — ACCEPT
Decision: Place consolidation-doctrine body in
conventions/engineering/reference-dont-duplicate.md(notengineering-philosophy.md).Implementing in-session.
🤖
kyle-sexton commentedon Aug 11, 2026
Lease claim for in-session drain. Implementing now. 🤖
docs(conventions): codify duplication-consolidation doctrine in refer…
docs(conventions): codify duplication-consolidation doctrine in refer…
docs(conventions): codify duplication-consolidation doctrine in refer…
docs(conventions): codify duplication-consolidation doctrine in refer…