Single source of truth for Birkly CMS documentation

Technical reference for agent_guide.v1: storage layout, schema sections, completeness algorithm, publish pipeline, and export enrichment. Schema file: schema/ai_presence.schema.json in the Birkly repo (canonical $id: agent_guide.v1.json).

Legacy schema version ai_presence.v1 is accepted on load and normalized to current behavior.

Schema version

"schema_version": "agent_guide.v1"

Also accepted: "ai_presence.v1" (legacy). New saves use agent_guide.v1.

Storage (runtime)

Not committed to git — lives under project settings/:

settings/ai_presence/
  draft.json          ← working copy (admin edits)
  published.json      ← last published snapshot
  meta.json           ← versions, timestamps, checksums
  versions/
    1.json … N.json   ← optional history (cap 50)

Internal path name ai_presence is historical; the product and export schema are Agent Guide.

meta.json fields

FieldDescription
published_versionInteger, increments each publish
last_published_atISO 8601
draft_updated_atLast draft save
draft_checksum / published_checksumSHA-256 of normalized JSON

Top-level document structure

KeyDescription
sources_of_truthRegistry of canonical sources (CMS, web, docs, media, marketplaces)
guide_metaExport hints (product, summary_layer)
identityOfficial name, descriptions, website, social, derived_from
positioningBest known for, differentiators, fit
communication_guidanceTerms, tone, qualifications
connected_contentLegacy — migrated to sources_of_truth on save
products_servicesCatalog items
claimsFactual statements + status
evidenceProof artifacts
media_contextMedia library contextual metadata
relationshipsPartners, parent orgs, etc.
publication_settingsEnable, paths, JSON-LD, redactions
setup_completed_at / setup_skipped_atOnboarding markers

Published export adds: published_version, generated_at, usage_hints, optional json_ld.

sources_of_truth item

{
  "id": "truth_about",
  "type": "cms_entry",
  "role": "narrative",
  "label": "About us",
  "url": "https://example.com/pages/about",
  "notes": "",
  "priority": 80,
  "last_verified_at": "2026-07-27T10:00:00+00:00",
  "link_status": "ok",
  "ref": {
    "collection": "pages",
    "entry_id": "abc123",
    "slug": "about",
    "label": "About us",
    "ref_type": "entry"
  }
}

Types: cms_entry, cms_collection, website, document, media_asset, marketplace, review_platform, other

Roles: narrative, proof, reference, archive

For document and media_asset, optional media_id links Media library.

On publish, CMS refs resolve to public URLs; guide_meta and enriched usage_hints mark the summary layer.

identity

{
  "official_name": "Acme Co",
  "short_description": "…",
  "full_description": "…",
  "what_we_do": "…",
  "industry": ["SaaS"],
  "categories": ["Productivity"],
  "locations": ["Berlin", "Remote-first"],
  "website": "https://example.com",
  "social_profiles": [{ "platform": "linkedin", "url": "https://…" }],
  "derived_from": {
    "short_description": {
      "collection": "pages",
      "entry_id": "about",
      "slug": "about",
      "label": "About us"
    }
  }
}

On publish, derived_from.*.url resolves to public CMS URL when possible.

products_services item

{
  "id": "prod_x",
  "name": "Widget Pro",
  "type": "product",
  "short_description": "…",
  "full_description": "…",
  "category": "Hardware",
  "pricing_model": "subscription",
  "best_for": ["Small teams"],
  "not_for": ["Enterprise SSO-only shops"],
  "claim_ids": ["claim_y"],
  "sources": [{ "$ref": "source_link" }],
  "connected_entry": { "collection": "…", "entry_id": "…" },
  "media_id": "…",
  "media_url": "…",
  "public": true
}

connected_entry legacy field normalized into sources[] on save. Export omits raw connected_entry; exports resolved sources.

Product source_link definition

{
  "id": "src_abc",
  "role": "canonical_detail",
  "type": "cms_entry",
  "label": "Widget Pro page",
  "url": "https://example.com/products/widget-pro",
  "notes": "",
  "rating": null,
  "review_count": null,
  "last_verified_at": "2026-07-27T10:00:00+00:00",
  "link_status": "ok",
  "ref": {
    "collection": "products",
    "entry_id": "e1",
    "slug": "widget-pro",
    "label": "Widget Pro"
  }
}

Roles: canonical_detail, reference, marketplace, review, docs, proof, purchase, social, other

Types: cms_entry, public_page, marketplace_listing, review_platform, docs, certification, other

claims item

{
  "id": "claim_x",
  "statement": "ISO 27001 certified",
  "status": "supported",
  "evidence_ids": ["evidence_a", "evidence_b"],
  "related_content": [],
  "sources": [],
  "last_reviewed_at": "",
  "expires_at": "",
  "notes": ""
}

Public graph views add linked_evidence[] on export.

evidence item

{
  "id": "evidence_a",
  "type": "certification",
  "title": "ISO 27001 certificate",
  "url": "https://…",
  "rating": null,
  "review_count": null,
  "publisher": "",
  "verification_status": "user_verified",
  "claim_ids": ["claim_x"],
  "link_status": "ok",
  "last_verified_at": "2026-07-27T10:00:00+00:00",
  "notes": ""
}

Types: cms_content, external_url, upload, certification, publication, marketplace_listing, review_platform, other

usage_hints (export only)

Generated at publish — guides AI consumers:

{
  "summary_layer": true,
  "follow_sources_of_truth": true,
  "authoritative_fields": ["identity.official_name", "claims.supported", "evidence.user_verified"],
  "marketing_fields": ["positioning.best_known_for", "positioning.differentiators"],
  "citation": "Prefer citing sources_of_truth and linked detail URLs over paraphrasing summaries alone.",
  "claims_require_evidence": true,
  "follow_links_for": ["product specs", "pricing", "reviews", "certifications"]
}

Completeness scoring (max 100)

KeyMaxLogic
identity20name 10 + short 10
description15full or what_we_do
sources_of_truth15narrative source 15; any source 8
claims20supported+evidence 20; any claim 8
evidence15any 10 + URL 5
positioning10best_known_for non-empty
products10any 5 + grounded 5
terminology5preferred_terms
publishing5enabled flag

Publish pipeline

  1. Load draft → validate → normalize sources (agent_guide_sources.php)
  2. Require publication_settings.enabled
  3. Write published.json, bump version, save meta
  4. Snapshot to versions/{n}.json, prune >50
  5. Build public export:

- Attach version, timestamp, guide_meta - Optional JSON-LD - Enrich: resolve sources_of_truth, product sources, usage_hints, linked_evidence

  1. Write well-known file (default /.well-known/agent-guide.json) if public_site_mode=project

Admin API (authenticated)

Base: /api/ai_presence.php (internal name; serves Agent Guide)

ActionMethodNotes
getreadDraft + published + completeness + staleness
save_draftwriteCSRF, merge partial
publishwriteValidate + snapshot
suggest / copilotwriteAI suggestions (sources-first grounding)
suggest_linkswriteLink-specific suggestions
validate_linkswriteOptional update_status
list_collection_entriesreadCMS picker
fetch_url_metawriteSSRF-safe title fetch
cms_diff / cms_refreshread/writeSync helpers

Permissions

CapabilityPermission
Viewread OR manage_settings
Edit, publishmanage_settings

Related docs