Skip to content

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
mainfrom
adr/0078-protocol-segmentation
Closed

docs(adr): ADR-0078 — segment the ObjectStackProtocol god-interface (ISP); keep the engine a pure primitive#2421
os-zhuang wants to merge 2 commits into
mainfrom
adr/0078-protocol-segmentation

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

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)

  • The engine is the crown jewel and it's correctengine.ts (~3.3k LOC) hard-codes zero governance; RLS/RBAC/field-masking/owner/tenant are all pluggable via registerMiddleware + hooks. Driver port minimal. Protect it; don't add protocol/governance to it.
  • The real debt is 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 the metadata-protocol naming confusion (the package carries the thin data facade too).

Decision

  • D1 Ratify the engine as a pure primitive (protect over tidiness).
  • D2 Segment the contract per ISP → DataProtocol + MetadataProtocol + optional capability protocols (Analytics/Feed/Realtime/Notification/View/…); keep a composed alias ObjectStackProtocol = DataProtocol & MetadataProtocol & Partial<…> for back-compat. Spec/type-level, incremental, low-risk.
  • D3 Impl + package naming follow the contract; capability domains served by their existing services, not re-bundled.
  • D4 Contract segmentation can start now (incremental); the impl restructure + rename ride the cross-repo window with ADR-0076 Step 2 (cloud constructs ObjectQLPlugin directly in ~8 sites).

Scope

Docs only — adds docs/adr/0078-protocol-segmentation.md and a forward-pointer in ADR-0076. No code. Empty changeset (no release impact).

🤖 Generated with Claude Code

os-zhuang and others added 2 commits June 28, 2026 18:37
…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>
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 28, 2026 10:42am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling size/s labels Jun 28, 2026
@os-zhuang

Copy link
Copy Markdown
Contributor Author

Folding into ADR-0076 instead of a separate ADR (per maintainer: fewer ADRs).

@os-zhuang os-zhuang closed this Jun 28, 2026
os-zhuang added a commit that referenced this pull request Jul 13, 2026
…rs (#2881)

feat(fields): pickers for the sharing rule form (object / criteria / recipient) (#2421)

objectui@6a741605b1e0c7d8cad94ac4a55cead7801a7e79

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant