Module ID: SPEC-WP-300 | Target Engine: System Governance & Code Snippets Registry | Status: Active Standard
Purpose & Governance Objectives
To prevent code drift during iterative development, this protocol establishes a formal boundary between system registries and defines a 3-Phase Refactoring Protocol for all backend PHP, shortcodes, and site architecture modifications. All code must remain fully self-documenting and directly map to its designated registry parser.
1. Unified Functional Architecture Matrix
Strict isolation of data sources prevents cross-engine parsing errors while maintaining a cohesive modal/UI layer.
Component
Primary Data Source
Core Parsing Strategy
UI / Interactive Layer
Function Registry
Code Snippets DB ($wpdb->prefix . 'snippets')
Description field tags ([[Group]], [sub_function]) & active add_shortcode() scan
Topology Legend modal, Jump Bar navigation, copy-shortcode macros
System documentation modals, visual schema diagrams, taxonomy jump bars
System Documentation
Block Editor / Code Editor HTML Containers
Gutenberg comment delimiters (<!-- wp:group -->) & HTML tables
Direct post/page render, embedded code blocks, standardized CSS styling
2. 3-Phase Refactoring Protocol
Every new function or modification built upon existing code must progress through three mandatory validation gates:
Phase
Stage
Mandatory Operational Actions
Phase 1
Audit & Lock Invariants
Identify target data sources. Verify that existing regex rules, slug patterns, and comment delimiters remain uncompromised before editing working code.
Phase 2
Self-Doc Draft
Define function block headers (Module ID, Target Engine) and Code Snippets Description metadata ([[Group Name]], [sub_function], or @PHP prefix) prior to writing logic.
Phase 3
Execution & Registry Audit
Deploy code and verify rendering within
System Architecture Topology Legend
Entity Type
Visual Badge / Indicator
Operational Role
System Hub PHP Container
System Hub PHP
Unregistered backend engine scripts handling page templates or SVG graphics.
#335 [PAGE: CONVENTIONS - POST CATEGORY PARSER ♻️335]
[c4r_taxonomy_trail]
2026-09-23 19:28c4r_taxonomy_trail ...self —
component: CLASSIFICATION
(1)
Registry Entity / Macro
Sub-Functions & Description
#338 [NAR: CLASS LICENSE PLATE - PROTOTYPE ♻️338]
[c4r_classification_license_plate]
MODULE ID: MOD-LP-200 / 2026-09-23 23:26 — CLASSIFICATION LICENSE PLATE, ANALYTICS, NARRATIVE NAVI — Hopeful find of lost navi footer and modals
General / Uncategorized
(1)
Registry Entity / Macro
Sub-Functions & Description
#330
[SNIPPET: CATALOGING COPYBOOK 📙330]
System Hub PHP
. Confirm visual badge alignment (UI Macro vs. System Hub PHP) and modal interactivity.
3. Immutable Governance Rules
Comments as Contracts: Scientific docblocks, inline comments, and regex parsing rules inside source code are treated as immutable contracts. They cannot be stripped or repurposed without formal document revisions.
Presentation-Agnostic Modals: UI overlays (such as c4r-topology-modal) share styling and trigger patterns across components, but must never leak data logic between distinct registries.
Code Editor Precision: System documentation blocks are maintained purely through native Gutenberg layout containers in Code Editor mode, completely bypassing fragile block wrappers like Custom HTML.
Care4Rare Publishing System • Coding Architecture Standard • Document Version 1.0