Files
ai-knowledge-structure-OPEN/README.md
T
2026-05-05 15:23:55 -06:00

8.9 KiB
Raw Blame History

Overview

This is an AI-native, versioned knowledge system with structured discovery, reasoning layers, and an economic access layer. This a is the process that would be used to structure content for AI to use.

It has four fundamental properties:

  1. Content is structured at creation
  2. Meaning is separated from policy
  3. Trust compounds over time
  4. Access can be programmatically gated (free → paid)

Mental model: Page =

  1. Human version (Markdown or HTML if a website, or makdown is source of truth published into HTML for human website reading)
  2. AI version (json + Q&A + chunks + CIS envelope).

The Architecture (Layered Model)

The system resolves into six clean layers:

  1. Authoring Layer → Markdown (human)
  2. Structuring Layer → Chunked Markdown (parser)
  3. Semantic Layer → Chunks + CIS (meaning + trust)
  4. Control Plane → Policy + pricing + state
  5. Serving Layer → Resolved JSON (content + policy)
  6. Discovery Layer → ai-index.json, llms.txt, sitemap. This is for website, but could these also carry over to other knowledgebases? This would also be extended into vectorization/embeddings

Each layer has a single responsibility, which is why the system stays stable.

Process

Phase A — Creation

Step 1: Author writes content

Ideal is markdown pages = website pages But likely could be existing platforms like Wordpress or Shopify that produce HTML pages.

/content/home.md

  • Human-readable narrative
  • Becomes the source of truth

If produced in markdown and this is for a website, use a tool like Hugo to create the corresponding HTML page + JSON-LD

Step 2: Parser structures the document

  • Inserts chunk boundaries
  • Assigns stable chunk ID and knowledge-level IDs

This is a reasoning layer for AI to parse the document. Or, the author could just use a template.

Identity of the chunkcs are created here.


Phase B — Structuring + Enrichment

Step 3: Build process extracts chunks

For each chunk:

  • knowledge_id → from chunk ID
  • did_chunk → version ID
  • cid_chunk → hash of content

Generates:

  • chunks.base.json (immutable content + core CIS)
  • qa.json (AI-generated questions/answers)

Core CIS is chunk-intelligence-signature - see .md file for it.

Step 4: Q&A generation and Tools To Complete Tasks, Generation

content → AI → questions

Produces:

  • Full QA dataset (reasoning layer)
  • If feasible, identify tools, processes, workflows that can be used to help users complete tasks. Include them as part of answers that prompts users what to do next using the tools, proceses workflows identified.
  • Subset used for JSON-LD (optional)

Step 5: Semantic JSON Page - this may not be needed,

  • A new page written in JSON format based on your HTML page, referenced by your HTML page.
  • Explains what the content means
  • Canonical source of truth
  • It is useful only if it acts as a document-level aggregation layer for agents.
  • Key question: is this file doing something unique or just repeating other layers.
  • Call it what is is to be precise: semantic-summary.json

Step 6: Ai-index,json - Discovery + Routing Layer. What exists, where is it, and how do I access it? This is a single page for all referenced pages in the system. This is for a website, but could exist for any knowledgebase, which is what a website rally is.

This is a machine-readable control plane. It replaces ambiguity from:

  • sitemap (URLs only)
  • llms.txt (text only) Without ai-index.json, the agent has to:
  • parse HTML
  • guess structure using sitemap.xml and agents.md
  • infer access rules With it:
  • You are explicitly programming the agent’s entry point
  • Think of it as a table of contents, whereas the JSON chunk pages with the CIS metadata is the full book.
  • You include only decision-enabling metadata, not the full CIS envelope (referenced above in chunks). The metadata is descriptive, evaluative.
  • Think of it as advertising what is available.
    1. What is this?
    2. Why should I trust it?
    3. Why is it worth paying for?
    4. Pulling trust and value signals, economic terms, access routing and possibly even a preview if available, all of which is contained in each JSON chunk.
  • What Drives Conversion (For Agents)? Agents will pay when they see:
    1. Proof of use: “others paid for this”
    2. Clear relevance: matches current task
    3. Low uncertainty: high confidence signal
    4. Low friction: simple endpoint + price
  • ai-index.json should make buying the obvious rational choice, not a guess.

Phase C — Control Plane Integration

Step 7: Sync with control plane

The control plane is a relational database in tables. The CIS envelope metadata that accompanies each chunk is rolled up into colums and rows for filtering and sorting. This control plane references metadata in the chunks, but some metadata is controlled here, like pricing for chunks if they are paywalled. From here you would produce resolved chunks that have their chunked content, their CIS envelope metadata, the metadata from the control plane (which is the policy and governance layer). See below

This database stores:

  • Chunk records
  • Version + status (active/deprecated)
  • Pricing + permissions
  • Usage metrics
  • Lineage (supersedes / derived_from)

Control plane manages state, not content


Phase D — Versioning & Evolution

Minor edits

  • Same knowledge_id
  • New did_chunk
  • Old chunks → deprecated
  • Trust carries forward

Moderate structural changes (split/merge)

  • New knowledge IDs
  • Lineage recorded
  • Partial trust inheritance

Major revision (new document)

  • New document_id
  • Old document deprecated
  • No automatic trust transfer

Rule: Never delete—only deprecate and supersede

How to Detect This

You need a semantic continuity check

At build time, Compare old chunk ↔ new chunk.

Compute: semantic_similarity = 0.0 → 1.0 Then apply rules:

  • 0.85 → same knowledge_id (inherit trust)

  • 0.5–0.85 → partial inheritance
  • < 0.5 → new knowledge_id (no inheritance)

Trust Migration Logic

Instead of “copying trust,” do this:

For each new chunk: Case 1 — Strong match { "knowledge_id": "same", "trust_inheritance": 0.9 } Case 2 — Partial match { "knowledge_id": "same", "trust_inheritance": 0.4 } Case 3 — New concept { "knowledge_id": "new", "trust_inheritance": 0.0 }

Trust should transfer only when meaning persists.


Phase E — Policy Overlay

Step 8: Merge content + policy

chunks.base.json + control plane data → chunks.resolved.json. As detailed above, here you produce resolved chunks from the original chunks and the control plane.

  • Base chunks remain unchanged
  • Resolved data is a computed view
  • Not a new canonical document

Phase F — Publishing

Step 9: Generate outputs - this is specifically for a website, but could accompany any knowledgegage, of which a website is a form of it.

/public/data/open/... → free content
/api/chunks/... → paid content access
ai-index.json
sitemap.xml
llms.txt
agents.md skills.md (optional) JSON-LD

Step 10: Previews of Paywalled Chunks

It is possible you can produce JSON previews of paywalled chunks to help sell them. This is another layer

Step 11: Deploy

  • Static files synced to server
  • API endpoints handle paywalled access

Phase E - Vectorization

THe above phases are for sturucturing content for AI, whether for a website or any knowledgebase. But if we want to connect our own AI model, then in this phase, we would further process the content via vectorization/embeddings.


Public vs Paywalled Content Model

Open content:

/data/open/pages/home/chunks.json

Paid content:

GET /api/chunks/{slug}
→ 402 Payment Required
→ payment
→ 200 + data


Discovery System

html+JSON-LD - if website sitemap.xml - if website robots.txt - if website llms.txt → how to behave
ai-index.json → what exists
semantic json pages - if needed QA json pages preview json pages skills.md agents.md

The core content system would be in markdown/html pages for humans and in the resolved chunk json pages for AI. The above pieces are for discovery and evaluation by the AI agent to determine if it wants the resolved chunk json pages.

Relevant templates for websites for the discovery layer is in the seo-geo repo: https://projects.eddiesoehnel.com/adminprojects/seo-geo

Trust System

Entity → Document → Knowledge ID → Chunk

Trust evolves through usage, repetition, and outcomes, which is aggregated into the ai-index.json page

Principle: Trust follows meaning, not structure


Control Plane

Manages:

  • Access
  • Pricing
  • Permissions
  • Usage
  • Version state

Does NOT manage:

  • Content
  • Identity
  • Structure

Identity Model

in the CIS envelope:

  • knowledge_id → stable idea
  • did_chunk → version
  • cid_chunk → content hash

Rule: Identity is authored, versions are computed, state is managed