From cf65c82df6c44f2b0ace93a9b8e5be481e8321d5 Mon Sep 17 00:00:00 2001 From: Claude Opus 5 Date: Fri, 31 Jul 2026 12:46:41 +0600 Subject: [PATCH] name the layer, not only the primitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The constitution asks which primitive a feature is. It never asked *where* the feature belongs, and that let a whole feature get built at the wrong layer. Four layers, outermost wins: content on disk, engine (facts only the engine can produce), theme (markup), browser (CSS, then JS). Two rules fall out — the engine never edits authored text to change how it looks, and a feature needing no engine fact is not an engine feature. architecture.md carries the table and the test; CLAUDE.md carries the one-line version, since it is the file always loaded. The example is named in the docs on purpose. A rule with a scar attached is one an agent can apply; a rule stated in the abstract gets reasoned around. --- CLAUDE.md | 6 ++++++ HARNESS.md | 7 +++++++ docs/architecture.md | 21 +++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 61ab99c..9c53700 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -35,6 +35,12 @@ Definitions and STATUS: `docs/architecture.md`. Name the primitive before writing code. If it reduces to none it is a **trunk** (wants a permanent service or a core-model change): stop, say so in a paragraph, propose the leaf, wait. +**Name the layer too.** Content on disk · engine (data only the engine can produce) · theme (markup) · +browser (CSS, and only then JS). Build it at the outermost layer that can do the job: a line-breaking or +spacing problem CSS solves is not an engine feature, and code that edits an author's text to fix how it +*looks* is at the wrong layer by definition (ADR-0045 — a whole feature was deleted for this). Layers and +the test: `docs/architecture.md`. + ## 3. Hard rules 1. **No abstraction before its second concrete use** — pipeline, resolver, interface, generic, config diff --git a/HARNESS.md b/HARNESS.md index a36a69d..926f131 100644 --- a/HARNESS.md +++ b/HARNESS.md @@ -52,6 +52,13 @@ must do — not the theme. `verify.sh` fails if the embedded reference theme cha changing, because in practice those two drift together — and it fails on a `