docs(adr): ADR-0078 — segment the ObjectStackProtocol god-interface (ISP); keep the engine a pure primitive#2421
Closed
os-zhuang wants to merge 2 commits into
Closed
docs(adr): ADR-0078 — segment the ObjectStackProtocol god-interface (ISP); keep the engine a pure primitive#2421os-zhuang wants to merge 2 commits into
os-zhuang wants to merge 2 commits into
Conversation
…ISP); keep the engine a pure primitive Records a deep kernel-architecture finding: the engine (objectql) is a clean, governance-free primitive and should be protected; the real debt is the central wire contract `ObjectStackProtocol` — a 70-method / 11-domain god-interface (60/70 optional; no consumer uses >11%). Decision: segment the contract per ISP into DataProtocol + MetadataProtocol + optional capability protocols (Analytics/Feed/Realtime/Notification/View/…), keeping a composed alias for back-compat. The contract split is spec/type-level and incremental; the impl restructure + package rename ride the cross-repo window together with ADR-0076 Step 2. Also adds a forward-pointer from ADR-0076 to ADR-0078. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Folding into ADR-0076 instead of a separate ADR (per maintainer: fewer ADRs). |
This was referenced Jul 13, 2026
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ADR-0078 records a deep kernel-architecture assessment and the decision that follows. It builds on ADR-0076 (which handled packaging) and addresses the deeper contract shape 0076 did not.
Findings (verified against source)
engine.ts(~3.3k LOC) hard-codes zero governance; RLS/RBAC/field-masking/owner/tenant are all pluggable viaregisterMiddleware+ hooks. Driver port minimal. Protect it; don't add protocol/governance to it.ObjectStackProtocol: a 70-method, 11-domain god-interface (Data 9, Metadata 8, Feed 13, Notifications 7, Realtime 6, Packages 6, Views 5, …). 60/70 optional; no consumer uses >11%. It aggregates domains that already have their own services, which forces a ~5.6k-LOC facade and makes the contract un-versionable. It's also the root cause of themetadata-protocolnaming confusion (the package carries the thin data facade too).Decision
DataProtocol+MetadataProtocol+ optional capability protocols (Analytics/Feed/Realtime/Notification/View/…); keep a composed aliasObjectStackProtocol = DataProtocol & MetadataProtocol & Partial<…>for back-compat. Spec/type-level, incremental, low-risk.ObjectQLPlugindirectly in ~8 sites).Scope
Docs only — adds
docs/adr/0078-protocol-segmentation.mdand a forward-pointer in ADR-0076. No code. Empty changeset (no release impact).🤖 Generated with Claude Code