Skip to content

atlas: rosetta states its own design intent, graded by Project Atlas - #17

Merged
jamesyong-42 merged 2 commits into
mainfrom
atlas/dsl
Oct 16, 2026
Merged

jamesyong-42 merged 2 commits into
mainfrom
atlas/dsl

Conversation

@jamesyong-42

Copy link
Copy Markdown
Member

Rosetta's design intent was stated only in prose (CLAUDE.md, docs/ARCHITECTURE.md), so nothing checked that the code still matched it, and agents had no fixed place to say where a new crate belongs. This PR adds an architecture atlas that Project Atlas grades against the code.

What lands

  • atlas/*.atlas:

    • system and thesis;
    • the layer stack, exhaustive (an unplaced production file is a violation);
    • domains below crate level, and components with their runtime links;
    • the wire contract, the live and search-query flows;
    • cross-cutting rules (iron rules carry code IRn) and decisions with their real status.

    Every rule and decision cites CLAUDE.md, docs/ or a package README with a see "file#slug", and the check resolves each one. This is not a third living document.

  • @atlas comment lines only, with no code change:

    • every crate root ends its //! docs with its layer and domain, after a blank //!, so first paragraphs are unchanged;
    • single-crate rules live in their crate: core-is-a-leaf, pipeline-deps, thin-protocol, server-deps, search-seam, rosettad-is-root;
    • AgentAdapter, IngestOp and SearchBackend carry their contracts;
    • 16 flow steps sit above the function that does each step;
    • room-dials-nothing sits in the room's index.ts header.
  • CLAUDE.md "Atlas" and the atlas skill tell agents to:

    • place a new crate or package in a layer and domain in the same change;
    • fix selectors on a rename;
    • never weaken a rule (an except or a wider only list is the owner's call);
    • run the check command.
  • atlas/atlas.baseline.json records today's five findings as known, so check exits 0 and a new violation stands out. The five stay violated on purpose, for a decision:

    • thin-protocol: protocol re-exports search and store types;
    • server-deps: server uses media, pricing and search;
    • module-size: 14 files over 1,000 lines, 2 of them TypeScript;
    • IngestOp::GitCommit has no producer;
    • dependency-rule fails because of thin-protocol and server-deps.

Validation

  • Parse: 8 .atlas files and 38 annotated source files, 0 errors and 0 warnings.
  • Graded against the cached facts of main (4348545), with the in-code lines restated in a scratch file:
    • 381 claims: 339 verified, 37 asserted, 5 violated (0 new, 5 known);
    • 0 dangling, 0 ambiguous, 0 stale;
    • layer and domain coverage 100% of 120,191 production lines.
  • rustfmt --check --edition 2024 (toolchain 1.97.1) is clean on all 33 touched .rs files. git diff --check is clean, and no line was deleted from a source file.
  • Limitation: this Mac's shared build window blocked local cargo runs, so clippy, cargo test (doctests) and the npm suites are left to CI on this PR. The full Atlas run on the branch itself, which runs cargo doc, follows once the window opens.

🤖 Generated with Claude Code

jamesyong-42 and others added 2 commits October 15, 2026 14:36
What the code cannot say about itself (layer and domain placement, the
dependency rules, contracts, the live and search hot paths, decisions) now
lives in rosetta, and Project Atlas grades every statement against the code.
It is not a third living document: every rule and decision cites CLAUDE.md,
docs/ or a package README with a `see "file#slug"` the check resolves.

- atlas/*.atlas: system and thesis, the layer stack (exhaustive), domains
  below crate level, components and runtime links, the wire contract, the
  two flows, cross-cutting rules (iron rules carry `code IRn`), decisions
  with their real status (IR2 hypothesis, two proposals still proposed).
- @atlas comment lines only, no code change: every crate root ends its
  `//!` docs with its layer and domain; the rules about one crate sit in
  that crate (core-is-a-leaf, pipeline-deps, thin-protocol, server-deps,
  search-seam, rosettad-is-root); AgentAdapter, IngestOp and SearchBackend
  carry their contracts; 16 flow steps sit above the function that does
  the step; room-dials-nothing sits in the room's index.ts header.
- CLAUDE.md "Atlas" and the `atlas` skill: place a new crate or package in
  the same change, update selectors on a rename, never weaken a rule (an
  except or a wider only-list is the user's call), and the check command.

Left visible on purpose, for a decision: thin-protocol (protocol re-exports
search and store types), server-deps (server uses media, pricing, search),
module-size (14 files over 1,000 lines), IngestOp::GitCommit has no
producer, and dependency-rule fails because of the first two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`atlas baseline` records the violations the atlas found on the day it landed
(thin-protocol, server-deps, module-size's 14 files, IngestOp::GitCommit and
the dependency-rule decision), so `check` exits 0 and a violation an agent
introduces shows as new. They stay violated, tagged known.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamesyong-42
jamesyong-42 merged commit 25de71c into main Oct 16, 2026
7 checks passed
@jamesyong-42
jamesyong-42 deleted the atlas/dsl branch October 16, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant