← All decisions

Internalize is a reference, not an architectural exemplar

accepted

0011 — Internalize is a reference, not an architectural exemplar

Context

Ark is the multi-tenant productized successor to internalize, a single-tenant operations platform that has run for an art collective of ~30 members for several months. Internalize works — feature-wise it’s the most mature artifact in the ecosystem, and the patterns it demonstrates (forum + mentions + permissions + realtime + push notifications) are what make ark’s pitch credible.

But internalize was built under POC pressure for a single, known tenant. Direct framing from the project owner: “internalize repo is a borderline-vibe proof of concept. it’s working with a 30 mem collective but it’s definitely not fully vetted.”

If we lift internalize code 1:1 into ark, we import POC compromises into a system whose entire value proposition is stability for one engineer running N tenants (ADR 0009). The “one engineer can sustain N tenants” math collapses if the codebase contains the kind of carefully-load-bearing-but-undocumented code that POCs accumulate.

Decision

Treat internalize as a domain reference and a feature spec, not as the code we ship. When porting any internalize feature into ark, the work is a re-implementation, not a copy-paste-and-edit.

The lift discipline, applied to every module:

  1. Read internalize first to learn the domain — what does the feature do, what data shape is right, what gotchas exist (often documented inline in CLAUDE.md “Common Gotchas” sections).
  2. Write the domain understanding down in 1-2 paragraphs in the new ark package’s CLAUDE.md. This is the lift artifact.
  3. Write tests first for the ark version, based on the domain understanding (per ADR 0009).
  4. Implement the ark version from those tests, in the ark style — strict TS, Zod boundaries, packages with clear contracts, no magic.
  5. Code-review pass before merging. Use the simplify skill or request explicit review for any module touching auth, RLS, permissions, or notifications.

The ark version stands on its own. Internalize is referenced in commit messages and CLAUDE.md notes as the source of domain understanding, but the implementation is ours.

Operating principles for the port

These are not new — they’re the standard “good engineering” principles. Calling them out explicitly because the temptation to skip them when “the original works” is real.

Anti-patterns from internalize specifically NOT to carry forward

These are observations from the source-map review, not criticisms — internalize’s tradeoffs were appropriate for its scope. They’re inappropriate for ark’s scope.

Consequences

Easier:

Harder:

Trip-wires

We revisit this stance only if:

Alternatives considered