Skip to content

Add ARCHITECTURE.md guide for contributors and agents#67

Open
bhairaav wants to merge 1 commit into
mainfrom
claude/add-architecture-docs-5Or1b
Open

Add ARCHITECTURE.md guide for contributors and agents#67
bhairaav wants to merge 1 commit into
mainfrom
claude/add-architecture-docs-5Or1b

Conversation

@bhairaav
Copy link
Copy Markdown
Collaborator

@bhairaav bhairaav commented May 2, 2026

Summary

Adds a comprehensive ARCHITECTURE.md document that serves as a bird's-eye map of the OpenPlans codebase for both human contributors and coding agents. The document covers:

  • Three-layer mental model: OpenPlans facade → openplans-core (semantic domain) → openplans-three (Three.js runtime) → opengeometry kernel
  • Code map: Directory structure and ownership across src/packages/openplans-core/, src/packages/openplans-three/, and top-level utilities
  • Cross-cutting invariants: Nine rules that must hold across the codebase (e.g., core does not depend on three, every element created through facade, appearance lives on semantic element)
  • Data flow walkthrough: Traces a wall from API call through geometry computation to export
  • Build and dev workflow: Commands for local development, building, and validation
  • Notes for agents: Guidance on navigating the codebase, pattern-matching, and validation loops

Also updates README.md to reference the new architecture guide.

Verification

Docs And Examples

Updated README.md to link to the new ARCHITECTURE.md guide in the "Architecture" section, directing readers to the full bird's-eye map for module boundaries, invariants, and data flow details.

Reviewer Notes

This is a documentation-only change. The guide is written for two audiences:

  1. Human contributors — a map of where things live and how they fit together
  2. Coding agents — opinionated entry points and patterns to follow

The invariants section (9 rules) is normative and should be treated as the source of truth for what is and is not allowed in the codebase. The data flow walkthrough uses a wall as the canonical example to trace through all layers.

Checklist

  • I ran the relevant validation for the areas I changed
  • I updated docs and/or examples when user-facing behavior changed
  • I did not hand-edit generated output such as dist/ or examples/dist/

https://claude.ai/code/session_011FQw5uuvs6XonjEHp9LCgL

Adds a top-level ARCHITECTURE.md following matklad's convention: bird's-eye
view, code map by module, cross-cutting invariants, end-to-end data flow,
and an explicit "notes for agents" section that codifies the harness-friendly
patterns already in the repo (single facade, sibling-mirroring, build+example
as the dev loop). README links out to it.
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.

2 participants