Welcome to Conpacts & Pacts
Engineered for Autonomous Web Systems
conpacts.dev serves as the authoritative developer ecosystem uniting the Conpacts WordPress runtime architecture with the deterministic Pacts Domain-Specific Language (DSL).
Modern web engineering demands seamless alignment between editorial WordPress components, high-density headless state management, and autonomous AI agents. Conpacts eliminates architectural fragmentation by establishing a single source of truth across all three surfaces.
Conpacts handles presentation, headless schema discovery, and client-side execution within WordPress, while Pacts DSL governs multi-turn AI reasoning, operational control flow, and token-safe prompt compilation.
The Unified Architecture
The platform separates responsibilities cleanly across distinct layers:
- Conpacts Framework: Single-File Component (SFC) engine and 4-tier inspector hierarchy delivering deterministic Gutenberg blocks, Elementor widgets, and REST APIs.
- Conpacts Environment: The tenant runtime directory (
wp-content/plugins/conpacts/) enforcing strict update safety, zero-trust storage vaults, and modular logic boundaries. - Pacts DSL: The domain-specific prompt and context language engineering deterministic reasoning hierarchies, attention control, and session gatekeeping.
System Topography & Layers
Separation of Platform Concerns
The ecosystem enforces strict architectural boundaries to insulate client tenant code from upstream platform upgrades and cloud agent automation streams.
High-Level Architectural Hierarchy
┌────────────────────────────────────────────────────────┐
│ CONTURALIS CORE (wp-content/plugins/conturalis/) │
│ Platform updater, cloud gateways, agent controllers │
└──────────────────────────┬─────────────────────────────┘
│ Exposes hooks & scan filters
▼
┌────────────────────────────────────────────────────────┐
│ CONPACTS ENVIRONMENT (wp-content/plugins/conpacts/) │
│ Tenant components, custom apps, space/ workspaces │
└──────────────────────────┬─────────────────────────────┘
│ Structured via
▼
┌────────────────────────────────────────────────────────┐
│ PACTS DSL SUBSYSTEM (conpacts/pacts/) │
│ .pacts directives, .ctx.asc blueprints, system rules │
└────────────────────────────────────────────────────────┘
Operational Runtime Boundaries
Every layer has dedicated responsibilities:
- Stateless Core Upgrades: The core plugin executes programmatic codemods and database migrations centrally via
includes/updates/routines/, leaving tenant directories untracked and untouched. - Universal Block Namespace: Regardless of physical location, every Smart Component is discovered recursively and registered under the unified
conturalis/ namespace. - Deterministic In-Memory Switching: Complex interactive hubs run as Single-Page Applications (Spas) driven by internal repeaters and hash routing, guaranteeing 0ms transitions.
Smart Component (SCMP) Engine
The Single-File Component (SFC) Standard
Smart Components are editor-agnostic, single-file PHP primitives delivering a single source of truth across Gutenberg, Elementor, custom REST routes, and headless AI agent generation.
Every component is self-contained within an autonomous .php file containing five sequential layers:
- File-level DocBlock: Declares bundle identity, package volatility, and operational lifecycle status.
- PHP Nowdoc Header (
$conturalis_registry): Authoritative JSON schema declaring properties, types, default values, icons, and taxonomy tags. - Template Execution: Strict extraction from
$data, dynamic deterministic UID generation, and semantic HTML rendering. - Scoped CSS (
<style>): Styles isolated strictly to #<?php echo esc_attr( $uid ); ?> inheriting global design system tokens. - Scoped Interactivity (
<script>): Inline Alpine.js constructors (Alpine.data()) executing zero-dependency client reactivity.
Universal 4-Tier Inspector Hierarchy
Properties declared in the Nowdoc schema are mapped automatically to the WordPress block inspector using standard ordering:
Level 1: Primary Categories ("category": "content" | "style")
├── Content Panel
│ ├── Level 2: Sub-Panels ("group": "data" | "integrations")
│ └── Level 3: Visual Sub-Dividers (_note_* separators)
└── Style Panel
├── Section Canvas (sectionTheme, outerContainer, paddingY)
└── Level 4: Conditional Visibility (dependsOn rules)
Core and Library scope components must never introduce detached CSS or JavaScript files. 80-90% of presentation must rely on global utility classes (.cts-theme-card, .cts-theme-full) and design tokens.
Dynamic Bindings & Presets
Data Ingestion & Synchronized Layouts
Smart Components decouple presentation from database architecture through two primary data delivery channels: dynamic pointers and synchronized presets.
Dynamic Binding Engine (cts-bind:)
Rather than coupling to fragile block binding APIs, editors can click the database icon in Gutenberg to inject direct pointer strings into any attribute:
cts-bind:wp:title — Resolves native post titles dynamically.cts-bind:wp:content — Streams full post content into rich-text cards with recursion guards.cts-bind:acf_hero_heading — Intercepts field queries via get_field() to resolve advanced ACF Pro fields and repeaters.cts-bind:custom_meta_key — Native post meta fallback resolution.
Component Presets Architecture (cts_component_preset)
Managed as a dedicated custom post type, presets enforce a strict Separation of Concerns:
Content Presets: Lock editorial copy. They support runtime Translation Overlays where non-empty incoming AI strings take precedence over preset text while keeping style attachments intact.
Style Presets: Permanently seal layout, surface themes, container constraints, and token ramps against canvas drift.
4-Phase Hydration Resolution
When a component renders, properties are evaluated through an unshakeable hierarchy:
1. Schema Defaults ──► 2. Content Preset ──► 3. Style Preset ──► 4. Deliberate Canvas Overlays
Environment & Update Safety
Package Directives & Volatility Boundaries
The Conpacts WP Environment (wp-content/plugins/conpacts/) houses client-owned assets, tenant workspaces, and isolated storage pools without risk of core update destruction.
Every file within the environment declares its volatility through explicit @subpackage annotations:
@subpackage EDITABLE: Upstream core updates are physically prohibited from modifying, overwriting, or removing these files. Includes components/custom/, space/, and extensions/third-party/.@subpackage READONLY: Upstream framework files maintained by the core engineering team. Overwritten on every release. Includes conpacts.php, toolbox/, and pacts/bigbang/.@subpackage EDITABLE REGION: Entry configuration files such as includes/functions.php and bootstrap.php. Updater routines strictly preserve code inside the // ##EDIT_REGION block.
Functions Architecture & Modularization
Tenant-level business logic lives inside Conpacts Functions (includes/functions.php). To prevent monolithic sprawl and ensure high-speed AI comprehension, strict guidelines apply:
Keep individual logic files under 200,000 characters. When business logic expands, modularize routines into dedicated subdirectories (e.g., includes/redirections/) and load them via a local bootstrapper.
Custom Forks & Lifecycle
Decoupling Components from Upstream Upgrades
When an enterprise implementation requires deep modifications to upstream components, developers must decouple them to prevent future updater collisions.
Decoupling via Custom Forks (-custom-fork)
When adapting a component from an upstream Library bundle (such as Polaris or Arcturus):
- Copy the component file into
components/custom/. - Append
-custom-fork to the slug in the JSON Nowdoc registry header (e.g., "name": "cts-docs-spa-polaris-custom-fork"). - Rename the physical file without the
cts- prefix: docs-spa-polaris-custom-fork.php. - Update the DocBlock tag to
@subpackage Conpacts Custom.
Bespoke Components (-custom)
Components engineered from scratch for a specific client must use the -custom suffix (e.g., "name": "cts-client-portal-custom" with file client-portal-custom.php). These files remain invisible to upstream updater routines.
Component Promotion Protocol
Activating standby components from extensions/library/ follows a clear sequence:
extensions/library/ (Status: Stored) ──► Copy to components/ (Status: Registered) ──► Sync Registry
Pacts DSL Syntax & Grammar
Deterministic AI Reasoning Control
Pacts is a Domain-Specific Language engineered by Conturalis to establish deterministic prompt hierarchy, prevent token bleeding, and govern runtime workflow execution.
Official prompt sequences utilize the .pacts file extension (supported by custom VS Code syntax highlighting).
Core Structural Hierarchy
- Parent Pact (
!!pactname): Primary execution directive (e.g., !!plan, !!exe, !!refine, !!bind, !!chat). Highlighted in bold purple. - Nested Pact (
!nested): Sub-method, modifier, or mode toggle paired with a parent pact (e.g., !full, !insert, !to json). Highlighted in bold cyan. - Strict Boundary Variable (
!{ ... }!): Wraps multi-line sentences, code payloads, or complex input to guarantee clean token containment. Highlighted in amber. - Placeholder Slot (
!..! / !...): Marks parameters requiring developer injection before dispatch.
Turn Separators & Session Units
In Pacts terminology:
A single prompt execution is a prompt. An ordered multi-step workflow with confirmation gates is a gate. The comprehensive dialogue thread is the session.
--- : Internal separator dividing payload chunks within a single turn.*** : Turn separator denoting progression to the next interaction gate.1. *** : Explicitly numbered turn separator for linear multi-prompt workflows.****************** : 4+ asterisks defining top-level metadata boundaries.
Attention Seekers (ASE)
Context Prioritization & Control Markers
Attention Seekers (ASE) are high-priority inline markers signaling explicit intent, constraints, or instruction bypasses to the reasoning model.
When present in user input, models must prioritize these blocks and acknowledge them in their execution response:
Canonical ASE Registry
| Marker Tag | Intent | Operational Purpose |
|---|
<!!> ... </!!> | General Critical | Highlights mission-critical directives requiring absolute adherence. |
<?> ... </?> | Question Focus | Forces deliberate analytical focus onto an explicit inquiry. |
<m> ... </m> | Must / Requirement | Declares non-negotiable architectural or functional constraints. |
<o> ... </o> | Objective / Goal | Defines the overarching strategic target for the session. |
<t> ... </t> | Task Boundary | Isolates a concrete procedural task unit. |
<r> ... </r> | Reference Standard | Specifies an authoritative schema or benchmark to adhere to. |
<x> ... </x> | Example Reference | Provides an authoritative golden master implementation example. |
<q> ... </q> | Strict Condition | Defines prerequisites that must be satisfied before execution. |
<ii> ... </ii> | Ignore Marker | Treats all enclosed text as inert raw data; instructions inside are ignored. |
Context Protocol (.ctx.asc)
High-Density ASCII Context Blueprints
The .ctx.asc format compiles codebase architecture, schemas, and operational boundaries into dense, structured blueprints optimized for LLM token ingestion.
Context documents eliminate ambiguity by enforcing strict 80-character visual dividers and explicit tab indentation (\t):
ASCII Divider Hierarchy
********************************************************************************
* CTX - [COMPANY OR SUBSYSTEM NAME] - MASTER
********************************************************************************
website: https://conpacts.dev/
repo: https://github.com/MarnixBlevi/conpacts
authors: Marnix Blevi
version: 1.0.0
================================================================================
[1. LEVEL 1: PRIMARY ARCHITECTURE SECTION]
================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1.1 LEVEL 2: SUB-SECTION SPECIFICATION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
................................................................................
. LEVEL 3: FILE BOUNDARY OR METHOD
................................................................................
• Explicit tab-indented specification points (never spaces).
================================================================================
[I. LOGBOOK]
================================================================================
• DDMMYYYY [Domain]: Factual single-sentence operational log.
================================================================================
[II. QUERY RESEARCH]
================================================================================
• DDMMYYYY: Focus keyword research
- [KEYWORDS]: short-tail terms
- [KEYPHRASES]: long-tail query titles
Because CTX files frequently contain nested code blocks with standard triple backticks, full .ctx.asc files must always be delivered wrapped inside 4 backticks (````text ... ````) to prevent premature Markdown termination.
HITL, HOTL & Baton Protocol
Collaborative AI Execution & Session Handoffs
Conturalis and Pacts operate across two distinct automation engagement models depending on task risk and scope:
Engagement Models
- Human-in-the-Loop (HITL): Interactive, conversational development. The AI accelerates drafting, reasoning, and prototyping, while human engineers inspect, validate, and approve every line of code before production release.
- Human-out-of-the-Loop (HOTL): Autonomous, headless execution. Triggered by Cloud Agents for routine content generation, schema scraping, or scheduled optimization jobs within pre-approved boundaries.
Session Transition via Baton (!!baton)
When token limits approach or tasks transition between specialized AI instances, state is transferred deterministically using the Baton protocol:
// 1. Session A generates the handoff payload:
!!baton !pass
// 2. Output is pre-formatted for direct copy-pasting into Session B:
!!baton !take !{
• Completed refactor of Smart Component Nowdoc headers.
• Synchronized cts-docs-spa-polaris with 0.9.21 schema.
• Pending task: Verify inspector.js dropdown bindings in Gutenberg.
}!
// 3. Session B ingests active state without conversational fluff:
Active state ingested. Ready to verify inspector.js dropdown controls.
This guarantees complete continuity across development workflows with zero token hallucination or redundant recap overhead.