Enterprise Implementation Specification
These do not change with tools, frameworks, or vendors.
-
Code is written as if it will be licensed, audited, sold, and maintained by strangers
-
Correctness over speed --- broken fast systems cost more than slow correct ones
-
Offline is a state, not an error
-
Global scope is hostile --- everything must be explicitly namespaced or prefixed
-
Platform independence where possible, platform optimization where necessary
-
Design for weakest environments first (2G, low RAM, old Android)
All rules fall into one of four categories:
Must be followed. Violations block merge.
Strong default. Deviations require justification.
Used when context applies.
Never allowed.
-
(M) PHP 8.2+
-
(M)
declare(strict_types=1); -
(M) PSR-1, PSR-4, PSR-12
-
(X) PSR-2 (deprecated)
-
(P) readonly properties/classes where appropriate
-
(S) enums for domain modeling
-
(S) fibers only with documented use case
-
(M) WordPress 6.8+
-
(M) WordPress VIP standards override PSR when conflicting
-
(M) Multisite-first architecture --- never retrofitted
-
(M) All code network-aware from inception
-
(M) Business logic isolated from WordPress-specific code
-
(M) Platform adapters/interfaces for portability
-
(P) Laravel / C# / external services supported via abstraction layers
-
(M)
Starisian\{Product}\{Component}— replace{Product}with the product-specific namespace defined in that product's standards -
(X) Abbreviations or deviations
-
(M) All globals prefixed:
-
functions
-
hooks
-
CPTs
-
taxonomies
-
meta keys
-
options
-
DB tables
-
Each product defines its own prefix in that product's standards (e.g. myproduct_action, myproduct_post_type). Every global identifier MUST carry the product prefix.
- (X) Unprefixed global identifiers
-
(M) PHPStan Level 5 minimum
-
(P) Level 8+ for core systems
-
(M) No suppression without:
-
inline reason
-
linked issue or remediation plan
-
-
(M) PHPCS (VIP + PSR-12)
-
(M) ESLint
-
(M) Stylelint
-
(M) HTMLHint
-
(M) markdownlint
-
(M) JSON linting
-
(X) Auto-fix in CI
-
(M) Lint failures block merge
Cloudflare (CDN, WAF, Workers)
→ Nginx
→ Varnish
→ Apache
→ PHP-FPM
→ MariaDB
→ Redis
-
(M) Code must not break caching, proxying, or edge behavior
-
(P) Code should be aware of upstream/downstream layers
-
(S) Must degrade gracefully when layers are absent (local/dev)
These are organization-wide primitives, not optional plugins.
-
(M) Used for device, network, and environment context
-
(X) Custom device fingerprinting
-
(M) Frontend error reporting through the governance SDK
-
(M) Trust identity issued by the auth SDK
-
(X) Custom frontend auth systems
-
(X) Direct use of
wp_set_auth_cookie()for frontend users
-
(M) All recording via the approved audio capture SDK
-
(X) Raw MediaRecorder implementations
-
(M) Design for 2G/3G baseline
-
(M) Resumable uploads (TUS) for unreliable networks
-
(M) Generous timeouts (≥30s)
-
(M) Optimize for low RAM (1--2GB)
-
(M) Avoid heavy client computation
-
(M) Mobile-first UI
-
(M) Offline state required
-
(M) Service Worker for data-input features
-
(M) IndexedDB for persistence
-
(X) localStorage for critical data
-
(M) Resumable
-
(M) Idempotent (no duplication/corruption)
-
(M) App shell architecture
-
(M) Service worker
-
(P) Installability
-
(S) Push notifications (phase-based)
-
(M) TUS required for:
-
large files
-
unreliable network flows
-
user-generated content
-
-
(M) FFmpeg (sandboxed)
-
(M) ImageMagick (sandboxed)
-
(X) User-controlled execution parameters
-
(M) Abstracted storage layer
-
(P) Cloudflare R2 primary
-
(P) S3 fallback
-
(X) Hardcoded storage URLs
-
(M) Network-aware from line one
-
(M) Proper use of:
-
$wpdb->prefix -
get_option()vsget_site_option()
-
-
(M) Activation handles all sites
-
(M) New site creation initializes automatically
-
(M) Prepared statements only
-
(M) Sanitized queries
-
CPT → content
-
Custom tables → high-volume/structured data
-
Redis → cache/transient
-
(P) Use
dbDelta()for standard schema management -
(S) Versioned migrations allowed when justified
Sanitize → Validate → Escape (in that order)
-
(M) Sanitize input
-
(M) Validate domain logic
-
(M) Escape output
-
sanitize_text_field()→ machine data -
wp_kses_post()→ human content -
esc_*()→ output context
-
(M) GeoIP2 for geolocation
-
(M) IP anonymization (last octet zeroed)
-
(X) Trusting user-supplied location blindly
-
(M) PHPUnit (backend)
-
(M) Jest (frontend)
-
(M) Playwright (E2E)
-
(M) axe-core (accessibility)
-
(S) Puppeteer for automation tasks
-
(M) No hardcoded credentials
-
(M) No undocumented APIs
-
(M) Capability-based access control
-
(M) License headers in all files
-
(M) Dependency license audit
-
(X) Commented-out code in production
-
(X) Untracked TODOs
-
(M) DocBlocks for all public interfaces
-
(P) Generated reference documentation
-
(M) Manual documentation for:
-
architecture
-
integrations
-
operational procedures
-
- (M) One canonical version source
On tag (v*):
-
Validate version consistency
-
Run lint suite
-
Run full test suite
-
Build/minify assets
-
Generate translations
-
Package distribution
-
Generate checksums
-
Publish release
-
(M) All steps required
-
(X) Manual releases
-
(M) CI blocks merge on:
-
lint failure
-
test failure
-
static analysis failure
-
-
(M) Exceptions require:
-
documented reason
-
linked issue
-
defined resolution path
-
-
Modern PHP only
-
WordPress VIP when applicable
-
PSR everywhere else
-
Prefix everything global
-
Multisite first
-
Offline-first always
-
2G-first design
-
Use organization-wide SDKs (governance, auth, audio capture)
-
No silent failures
-
No hidden dependencies
-
Every line commercial-ready
This is no longer a "coding standard."
This is a platform contract.
It defines:
-
how systems behave
-
how data flows
-
how users are supported
-
how products scale commercially
If enforced, this creates:
-
predictable engineering output
-
faster onboarding of new developers
-
reduced long-term maintenance cost
-
real enterprise credibility