RAIA™ Specification

Documentation

When you want to add a new guide to this portal, you must never write it directly as a final webpage. Instead, you create a "raw" content file, register its title and details in our compiler list, and

← Back to Developer Hub TEXTBOOK SPECIFICATION
RAIA™ (Real estate Artificial Intelligence Agent) Specification

When you want to add a new guide to this portal, you must never write it directly as a final webpage. Instead, you create a "raw" content file, register its title and details in our compiler list, and

🧩 Section A: In Plain English

Adding New Documentation Pages

To add a new guide to this portal, create a raw content file, register its details in the compiler list, and let the build script automatically package and deploy it with the correct styles and layout.

Current Authoring Priority (2026-07-30)

During Phase 1, only the Developer Guide is actively maintained. New feature documentation defaults to a dev page under /developer-guide/. User-guide pages are deferred until the platform reaches post-phase-1 stability. See Documentation Site Structure — Authoring Priority for the full decision (ADR-018 Amendment).

🧩 In Plain English

When you want to add a new guide to this portal, you must never write it directly as a final webpage. Instead, you create a "raw" content file, register its title and details in our compiler list, and let our build script automatically package, format, and deploy it with the correct styles and layout.

📝 Adding New Pages to RAIA™ (Real estate Artificial Intelligence Agent) Documentation

Operational Spec (SOP-DOCS)

To prevent layout drift, double-compilation loops, and technical styling debt, RAIA™ (Real estate Artificial Intelligence Agent) enforces a strict, unified compilation pipeline for all developer-facing documentation pages. Hand-rolled CSS and direct production HTML edits are blocked. All document pages must flow through our central unify_docs compiler to automatically inherit brand-approved responsive layouts, mobile sidebars, glossary tooltips, and secure gatekeeper scripts.

1. Compilation and Sync Pipeline

The documentation lifecycle is governed by a unified build-and-sync loop. Below is the technical path showing how raw markdown or HTML bodies are compiled, verified, and synchronized across our database and Nginx servers:

1. Raw Content File docs/raw/<slug>.html 2. unify_docs compiler Active Linter & Templater Supabase DB Sync run_insert.py (DB Page Table) Live Nginx / Vercel deploy.sh (Static Files)

2. Standard Operating Procedure (SOP)

Follow these precise steps to create, format, and deploy a new documentation guide:

  • 1
    Create the Raw Content File

    Create your physical file only under /root/projects/raia/docs/raw/<slug>.html. This raw file must only contain the inner content body—never write <!DOCTYPE html>, <head>, or <body> tags. Wrap your inner segments in standard Tailwind-spacing classes.

  • 2
    Register in DOCS_METADATA & Prepend Index Number

    Open /root/projects/raia/docs/unify_docs.py. Navigate to the DOCS_METADATA array (around line 375) and append your new page's metadata structure.
    CRITICAL MANDATORY RULE: The "title" key in DOCS_METADATA must have the exact chapter/section index number prepended (e.g., "3.9 Authoring & Deploying New Documentation Guides") and match the entry inside generate_index.py 1:1. The compiler will use this to automatically build matching browser tab titles and <h1> headings.

    {
        "slug": "your-new-slug",
        "title": "3.9 Authoring & Deploying New Documentation Guides",
        "subtitle": "Detailed developer-facing subtitle.",
        "badge": "Operational Spec (SOP-DOCS)",
        "category": "technical",
        "audience": "developer",
        "file_path": "./projects/raia/docs/developer/your-new-slug.html"
    }
  • 3
    Map the Subdirectory Location

    In the same file (unify_docs.py), navigate to the get_repo_details(slug) function (around line 830). Add a mapping key pairing your slug directly to its folder location under the repository root. This populates the **Repository Code** sidebar card:

    "your-new-slug": ("03_technology/path/to/folder/", "https://github.com/estateaigents/raia/tree/main/03_technology/path/to/folder")
  • 4
    Compile & Lint (Fail-Fast Gate)

    Execute the unified c

    Repository Code

    The live codebase implementation for this specification sits within the following repository folder:

ompiler. The active linter will automatically run, checking your raw body for Tailwind CDN leaks, inline styles, or raw hex color codes inside SVGs:

python3 /root/projects/raia/docs/unify_docs.py
  • 5
    Synchronize and Deploy Live

    Once compiled without warnings, synchronize your content directly to the Supabase database and push to the live tailscaled Nginx servers:

    # Synchronize to Supabase database
    python3 /root/projects/raia/docs/run_insert.py
    
    # Push static copies to tailscale Nginx document roots
    bash /root/projects/raia/docs/deploy.sh
  • 6
    Stage & Push to GitHub

    Commit your raw page, compiled outputs, and modified database insert scripts to preserve a clean tracking history:

    git add .
    git commit -m "docs(): create  specifications"
    git push origin main
  • 3. Strict Linters and Anti-Slippage Rules

    Our compiler actively blocks direct formatting slips. When authoring pages (either as a human dev or an autonomous AI agent), the build loop enforces these strict checks:

    No Tailwind CDN Scripts

    Raw files must never contain tailwindcss[.]com references. The compiler supplies full styles natively.

    No Inline Style Blocks

    Avoid using <style> tags. Hardcoded styling blocks variable-themes. Always update docs.css instead.

    No Hex Colors inside SVGs

    Do not use raw hex codes (e.g. #fff, #000) in your diagrams. Bind strokes/fills directly to adaptive CSS variables.

    Repository Code

    The central unification compiler, deployment runner, and database sync utilities sit within the following folder:

    🔧 Section C: Developer Guide

    Architecture Details

    The security architecture implements a defence-in-depth model with perimeter authentication, internal authorisation, data encryption, and audit logging at every layer. Access is gated through a layered security model: Tailscale identity verification at the network level, followed by role-based access control within the application.

    • Core Component: Security gate guard and RBAC enforcement
    • Data Flow: Request → Tailscale Gate → Authentication → Authorisation → Audit Log → Response
    • Integration Points: Tailscale ACLs, Supabase Row-Level Security, session tokens, and audit log sinks

    Configuration Reference

    Key configuration parameters for this system:

    Parameter Type Default Description
    gate_enabled boolean true Enable Tailscale gate guard for all pages
    allowed_hosts string[] docs.estateaigents.com, localhost Whitelist of permitted hostnames
    session_ttl_minutes integer 60 Session token time-to-live
    SECURITY ARCHITECTURE — DEFENCE IN DEPTH 1. NETWORK GATE Tailscale Identity Network-level Auth 🔐 Tailscale Gate 2. APPLICATION GATE RBAC Enforcement Session Validation 🛡️ Auth Layer 3. DATA GATE RLS & Encryption Audit Logging 🔒 Data Protection Defence-in-depth: network gate → application gate → data gate with audit logging at every layer Tailscale identity · Role-based access · Row-level security · Full audit trail Network / Identity Gate Application / Auth Layer Data / Encryption Layer Data flow →

    Figure 2: Security architecture — component interaction and data flow.

    Troubleshooting

    Issue Cause Resolution
    401 Unauthorized on tailnet Tailscale not running or wrong node Verify Tailscale is connected and node is authorised
    Gate guard redirect loop Hostname not in allowed_hosts list Add hostname to the gate guard whitelist
    Repo Reference RAIA

    This component is part of the RAIA (Real estate Artificial Intelligence Agent) platform mono-repo. Implementation details, API contracts, and integration tests are available in the repository.