Admin shell
admin is an independently versioned Go module whose Version() identifies its packaged source. It supplies a small compiled same-origin HTTPS shell; each owning Module supplies its real forms and operations. It has no Core registry, database, roles, alternative authentication or business authorization. Products register a finite set of Surface values with New, serve Handler() under the fixed /admin namespace and mount the existing identity.Web independently at the configured AuthPath (for example /auth). Pass identity/admin.Authenticator(web) plus the product Application as Authorizer. Identity owns cookie/CSRF validation; the shell separately authorizes each surface's navigation capability/target and each operation still calls its owning public Service.
A navigation grant is an explicit product choice, never an account-wide domain grant. Request.CheckAllowed is only a presentation hint: an explicit denial is (false, nil) while failed evaluation returns an error. Request.Allowed remains a compatible boolean hint and records failures; neither grants domain permission. Trusted compiled surfaces render an html/template definition named content through Request.Render; request/domain strings must stay template data. Rendering finishes into bounded 128 KiB buffers before writing. Request.Render returns a safe phase-bearing error after recording the original cause; errors.Is(err, admin.ErrResponseDelivery) means writing began and the surface must not append a fallback response. Module templates are trusted code, not user-installed templates. Surface IDs stay stable while Text{Domain, Key} identifies complete catalog messages. The shell uses semantic layout/navigation/forms, a skip link, keyboard focus feedback, logical responsive CSS and lang/dir; domain values are neither normalized nor translated.
Diagnostics and response certainty
Pass the product's Config.Logger to join its structured local diagnostic output; nil uses slog.Default. Transport deadline setup, authentication providers, policy evaluation, localization, rendering and response delivery retain a source-owned operation/phase and typed cause category. Pass Config.Diagnostic func(context.Context, string, string, error) when authorized diagnosis requires the original cause. The synchronous callback sees every operational cause before ordinary-log suppression; the product owns bounded handling, provider-aware sensitive-field redaction before retention/export, access and retention. It is not an ordinary log field or a public error chain. Request.Diagnose(operation, phase, cause) lets compiled surfaces report their own adapter failures with the same context. Names must be compiled identifiers, not request/resource values. Correlation already in context is preserved; Admin does not create unrelated request IDs.
Ordinary diagnostics admit the first distinct bounded cause sample per one-second window, with 56 regular and eight uncertain-outcome/delivery slots. Private fingerprints use at most 4096 cause bytes plus original length; raw text and fingerprints are not logged or retained. Repeats receive bounded timed summaries even after traffic stops. Sequence numbers connect summaries to admitted samples, and explicit sampled overflow counts describe information omitted from ordinary logs. Summary records do not claim a single request identity. Call Shell.FlushDiagnostics() after ingress shutdown for a final summary; this does not replace ingress draining. The protected sink owns its independent repetition policy. Operations owns the shared diagnostic rule.
Browser messages use stable machine codes before HTTP status: wrong credentials, session failure, invalid fields, dependency failure and proven pre-execution body timeout have different localized instructions. An explicit outcome: "not_executed" is used only before domain dispatch. Generic unavailable responses and lost mutation delivery remain uncertain and never trigger automatic replay. Confirmed success remains successful when permission hints are unavailable: the response keeps the record identity, disables unverified actions and includes warning: "permissions_unavailable". A successful HTTP acknowledgement with unreadable response details also instructs reconciliation without replay. Bounded server request references may be displayed as plain text.
Localization
English/LTR is the default; Persian/RTL is selectable. Each Module supplies its own embedded JSON catalogs through Surface.Catalogs. Products add their own domains and installed language packs with Config.Catalogs, select a default with Language, or supply their own per-request preference policy through SelectLanguage. Shell.Locales() exposes the installed choices. The shell snapshots validated catalog data and prepares bounded browser messages at construction; it performs no catalog filesystem/database reads during rendering.
The public localize package is presentation-independent and imports neither the shell nor Core. Products can use it for their own public interfaces without composing Admin. Message lookup, English fallback, named parameters and integral CLDR plurals share one data contract; Module and product text remain separately owned. Catalog text is ordinary untrusted display data, never executable templates or trusted HTML. Static browser formatters use DOM text and caller-owned nodes for isolated values, preserving the shell's existing CSP.
Follow the localization guide for file/schema examples, supported load/reload behavior, safe formatting and extension. The migration guide describes the deliberate pre-v1 change from bilingual Text fields. Existing product binaries and releases do not change automatically; migrate the compatible Admin/Identity/Media set, rebuild and validate through the product's own release path. UI selection does not translate stored content, change canonical values, grant permission or require terminal translation.
The first Identity-owned surface is identity/admin.New(service): create an account, inspect one opaque ID or separately authorized exact login, conditionally set status/password and revoke all sessions. Exact-login read reconciles an unknown create response without automatic replay; the product separately grants identity.AccountLookup against the exact validated login. AccountRead with an empty target gates this surface's navigation; actual ID reads still authorize their exact IDs. Password/status forms use the current revision as an exact decimal string through JSON/DOM, never a JavaScript number; RevokeAll uses the existing non-CAS API. No list, profiles or product role model is supplied.
The second real surface is media/admin: a bounded private file library whose upload hints follow the composed Media format selection with module-owned upload, metadata pages, known-ID status, authenticated attachment download and confirmed conditional deletion. Its List collection grant is separate from exact-ID Read/Delete; it exposes no maintenance grant or static paths. Native FormData and delegated form handlers support actual upload and refreshed rows without a frontend framework.
Call ConfigureServer before TLS serving to apply bounded header/total read/write/idle/header-size defaults. The product owns TLS keys/listener, trusted proxy topology if any, and graceful ingress shutdown before Application/Module shutdown. The shell additionally admits at most 16 requests without a queue, bounds bodies to 12 MiB (room for a 10 MiB Media file plus bounded multipart framing), derives a 10 second context and sets actual read/write deadlines through http.ResponseController no later than the caller's deadline. Unsupported writer wrappers fail closed; wrappers must support deadlines or expose Unwrap. Identity's JSON forms further bound reads to 2 KiB/two seconds.
Sensitive responses use no-store, nosniff, no-referrer, frame denial and a same-origin CSP without inline scripts/styles. HSTS belongs to the deployment profile; there is no CORS. Exact TLS/Host, empty query/raw paths, strict JSON and same-origin mutation admission remain required. Existing Identity/Web endpoints own non-simple header/CSRF behavior. The CSRF GET explicitly supplies only the same-origin root referrer with a request-local same-origin policy, refuses cross-origin requests/redirects and preserves Identity's exact origin checks; document responses retain no-referrer. Initial JavaScript uses only a request-local CSRF value, never persistent browser storage; each operation has one finite 15 second AbortController wait, no automatic retry. Password fields clear after completion/failure. An interrupted mutation reports an unknown outcome; inspect the retained exact login or known ID before another action. A not-found read does not prove that an earlier in-flight transaction can never commit.
Focused package tests cover registration, permission/error separation, escaping, browser headers, bounded admission/deadlines and owning Service dispatch. The normal pinned independent consumer and actual TLS/browser proof own end-to-end session, two-surface, keyboard/RTL and payload evidence; no source copy or module replacement is a supported proving path. Release-specific introduction/compatibility history belongs to the lifecycle guide. Product deployment and real-product lifecycle proof remain separately owned and gated.