Documentation Site Structure
How docs.estateaigents.com serves two audiences — ops staff and Hermes developers — from a single site with two sub-sections.
How docs.estateaigents.com serves two audiences — ops staff and Hermes developers — from a single site with two sub-sections.
Section A In Plain English
docs.estateaigents.com serves two very different groups of people. Estate agents (the ops team using Paperclip) need workflow guides, compliance SOPs, and tenancy procedures. Developers (Eugin and the tech team building RAIA (Real estate Artificial Intelligence Agent) with Hermes) need architecture docs, ADRs, coding pipelines, and agent reference material. Each group gets their own index page so neither audience is confused by the other's content.
The split works like this:
-
1Estate agents go to /user-guide/
Pyramid UI walkthroughs, tenancy workflows, compliance SOPs, rent and maintenance management. Written for humans doing daily estate agency work in Paperclip.
-
2Developers go to /developer-guide/
Hermes agent profiles, Kanban dispatch architecture, ADRs, coding pipeline specs, STATE.md protocol. Written for engineers and AI agents building RAIA.
-
3Both groups share a hub at /guides_index.html
The combined landing page links both indexes from one URL. Either audience can start here and follow the right path.
flowchart TD
Hub["📚 docs.estateaigents.com
guides_index.html"] --> UserGuide["/user-guide/
🏢 Ops staff
Estate agents & property managers"]
Hub --> DevGuide["/developer-guide/
⚙️ Hermes developers
Eugin + tech team building RAIA"]
UserGuide --> UserContent["Pyramid UI
Tenancy workflows
Compliance SOPs
Rent & maintenance"]
DevGuide --> DevContent["Hermes profiles
Kanban dispatch
ADRs
Coding pipeline • STATE.md"]
Section B User Guide
The Two Audiences at a Glance
| URL | Audience | Content |
|---|---|---|
docs.estateaigents.com/user-guide/ |
Estate agent staff, property managers | Pyramid UI, tenancy workflows, compliance SOPs, rent management, maintenance |
docs.estateaigents.com/developer-guide/ |
Eugin + tech team building RAIA | Hermes profiles, Kanban dispatch, ADRs, coding pipeline, STATE.md |
docs.estateaigents.com/guides_index.html |
All | Combined hub landing page linking both indexes |
How to Find a Page
If you are an estate agent or property manager using Paperclip day-to-day, start at /user-guide/. If you are building RAIA — writing code, configuring Hermes profiles, or reviewing ADRs — start at /developer-guide/. Either way, guides_index.html shows you both.
What Lives in /user-guide/
The user guide index lists all pages tagged audience: ops in the documentation metadata. These are written for the humans operating Paperclip, not for the agents or engineers building it. Topics include:
- Pyramid UI — lenses UX, tenancy dashboard, audit panel
- Tenancy SOPs — photo ID, guarantor checks, UK/Thai tenancy onboarding
- Compliance — serving notices, rent arrears, AST consent, gap analysis
- Rent & billing — payment management, utility bills, charges and pricing
- Maintenance — job dispatch, key custody workflow
What Lives in /developer-guide/
The developer guide index lists all pages tagged audience: dev. These are written for engineers and AI agents who build and maintain RAIA. Topics include:
- Hermes agent profiles — PA, Programmer, Scribe, ADR-271 roster collapse
- Kanban dispatch — deterministic hourly cron, zero-LLM shell script
- Architecture Decision Records (ADRs)
- Coding pipeline — MoA stack, model routing, Playwright QA
- STATE.md protocol — compounding session log, handover format
- Data architecture, GDPR, pipelines, and agent memory
Section C Developer Reference
File System Layout
The docs pipeline has three layers. Raw source (authored), compiled output (repo + nginx), and the portal mirror.
# Raw source files — Scribe writes here
/root/projects/raia/docs/raw/*.html
# Compiled output — generate_index.py writes here
/root/projects/raia/docs/*.html
/var/www/html/docs/*.html # nginx serves this
# Audience-split indexes — generated by generate_index.py
/var/www/html/docs/user-guide/index.html
/var/www/html/docs/developer-guide/index.html
# Combined hub
/var/www/html/docs/guides_index.html
# Portal mirror — deploy.sh copies here
/root/projects/raia/03_technology/11_frontend/portal/public/docs/
Build Pipeline
Every new documentation page follows exactly this 4-step sequence. Deviating from it causes pages to appear in the wrong index or not appear at all.
-
1Write raw HTML to docs/raw/<slug>.html
Scribe (or Programmer) authors the raw page using the 3-tier format (Section A / ELI5, Section B / User Guide, Section C / Dev Guide). No Tailwind CDN in raw files — the compiler wraps it in the unified shell.
-
2Register slug in DOCS_METADATA (unify_docs.py)
Add the slug with
audience: "dev"oraudience: "ops". The compiler will refuse to route the page to the correct index without this field. Also add the slug togenerate_index.pyPYRAMID_MAPPING under the correct quadrant. -
3Compile: python3 generate_index.py
Reads all raw pages, routes each by its
audiencefield, wraps in the unified shell, and writes both audience indexes plus compiled page files to repo and nginx directories. -
4Deploy: bash deploy.sh
Rsyncs compiled files to
/var/www/html/docs/, writes the nginx redirect map, and reloads nginx. After this step the page is live.
# Full pipeline (run from /root/projects/raia/docs)
cd /root/projects/raia/docs
python3 generate_index.py
bash deploy.sh
# Verify
curl -s -o /dev/null -w "%{http_code}" https://docs.estateaigents.com/docs/<slug>.html
How Audience Routing Works
Every entry in docs/unify_docs.py DOCS_METADATA has an audience field. generate_index.py reads this field and routes the slug to the correct index. There is no other mechanism. If the field is missing or wrong, the page silently falls into the wrong index or the appendix.
| audience value | Routed to | Nginx path |
|---|---|---|
"dev" | Developer Guide index | /var/www/html/docs/developer-guide/index.html |
"ops" | User Guide index | /var/www/html/docs/user-guide/index.html |
Within each index, pages are further sorted by the PYRAMID_MAPPING dict in generate_index.py. Slugs not in that mapping fall into the appendix section.
PYRAMID_MAPPING Quadrants (Developer Guide)
| Quadrant key | Label | Examples |
|---|---|---|
foundations | Core Foundations & Strategy | Introduction, GTM, A2A activation, competitor analysis |
quadrant_1 | Lenses UX (Visual, Layout) | Application UX, navigation, map pins, carousel |
quadrant_2 | AI Audit (Trust, Privacy) | GDPR, PII, security, red team |
quadrant_3 | Compliance (Ledger, SOPs) | Tenancy SOPs, notices, billing reports, gap analysis |
quadrant_4 | Agentic Loops (Swarms, Backend) | Kanban dispatch, Hermes profiles, ADR-271, this page |
appendix | Forensic Case Studies | Alto case study, appsheet mislink |
Watchdog Automation
The doc-sync-watchdog.sh cron (ID 4efc19328579) runs at 3am daily, detects git commits touching 03_technology/ or STATE.md, and creates Scribe review tasks on the Kanban board. Scribe commits — those whose git message starts with docs(scribe): — are explicitly excluded from triggering new watchdog tasks. This prevents an infinite self-loop where Scribe writing docs triggers a watchdog that dispatches Scribe again.
# Watchdog cron
ID: 4efc19328579
Schedule: 0 3 * * * (3am daily)
Triggers on: commits touching 03_technology/ or STATE.md
Excluded: commit messages starting with "docs(scribe):"
# View watchdog logs
hermes logs show 4efc19328579
Dispatch Rule
All new documentation pages must be dispatched by PA as a Kanban task assigned to the scribe profile. PA's role is to specify the page content and verify the result. The Scribe agent does the actual HTML authoring, compilation, and deployment. This separation prevents PA from accumulating implementation debt and ensures all pages go through the 4-step pipeline above.
Checklist for every new page:
- Raw file written to
docs/raw/<slug>.html - Slug registered in DOCS_METADATA with correct
audience:field - Slug added to PYRAMID_MAPPING in
generate_index.py python3 generate_index.pyrun without errorsbash deploy.shrun — nginx reloaded- Compiled file copied to portal
public/docs/ - STATE.md §8 updated with one-line log entry
- Git commit:
docs(scribe): <summary>
Amendment Platform Docs Access & Authoring Priority (ADR-018, 2026-07-30)
The decisions in this section were locked by Eugin on 2026-07-30 and are recorded in ADR-018 (Amendment 2026-07-30). They govern who can read each docs audience, and which audience Scribe writes for first during Phase 1.
1. Platform Docs ≠ In-App Documents
Two unrelated systems share the word "documents". Do not conflate them.
| System | What it is | Where it lives | Security model |
|---|---|---|---|
| Platform docs | Product & engineering documentation for RAIA (Real estate Artificial Intelligence Agent) — help guides, architecture specs, ADRs | docs.estateaigents.com (this site — nginx static) |
Website publish / network access |
| In-app documents | Tenancy agreements, deposit certificates, rent statements, ID uploads, invoices | Paperclip portal database (tbl_documents, tbl_organisation_document_permissions) |
Application authz — per-organisation, per-role Privileges UI |
Never describe platform-docs access as "document permissions" and never tie it to the
tbl_organisation_document_permissions table or the /settings/organisation/privileges
screen. Those govern tenancy files inside Paperclip, not pages on this site. The two systems have
separate threat models and separate owners.
2. Access Model — Today vs Future
| Audience | Today (Phase 1) | Future intent |
|---|---|---|
/user-guide/ — ops (estate agent staff) |
Internal only — Tailscale | Public SaaS help (Intercom / automated bank reconciliation gateway-style). No Tailscale or admin login required for help content. |
/developer-guide/ — dev (Hermes team) |
Internal only — Tailscale | Private. If public DNS is added later, gated by @estateaigents.com identity (not only admin@). |
The whole docs. host is reachable only over Tailscale (DNS 100.x, UFW 443
restricted to 100.64.0.0/10). There is no public DNS for docs yet. Do not describe access as
"login as admin required" — no application login gates this site today; the network perimeter does.
3. Authoring Priority — Developer-Guide First (Phase 1)
During the first development phase, only the Developer Guide is actively maintained.
New feature documentation defaults to a dev page under /developer-guide/. The User Guide
is deferred until the platform is more stable and out of Phase 1.
-
1Feature ships → default to a dev page
When a feature lands, Scribe writes a developer-guide page (architecture, configuration, ADRs, code paths). This is the default — no PA brief needed to choose the dev audience.
-
2User-guide pages only on explicit request
An ops page is written only when Eugin explicitly asks, or after the Phase-1 stability gate is declared. Do not open a programme of ops-page backfills on your own initiative.
-
3Existing user-guide pages stay live, but are not the priority
Pages already published under
/user-guide/remain reachable. They are maintained for correctness only when they become actively wrong — they are not the focus of new work during Phase 1.
4. What Scribe & PA Do When a Feature Ships
| Step | Owner | Action |
|---|---|---|
| 1 | PA | Dispatches a Scribe kanban task with audience: dev declared in the brief. |
| 2 | Scribe | Writes raw page under docs/raw/<slug>.html, registers it in DOCS_METADATA with audience: "dev", adds it to PYRAMID_MAPPING, compiles, deploys. |
| 3 | PA | Verifies the live page returns 200 under /developer-guide/<slug>.html and that the content matches the brief. |
| 4 | — | User-guide coverage is deferred until Eugin revisits the stability gate. No automatic ops mirror is produced. |
In-app document privileges (tbl_organisation_document_permissions and the Privileges UI)
are unchanged and out of scope for platform-docs decisions. That is not this system.