Files
ai-knowledge-structure-OPEN/README.md
T

420 lines
14 KiB
Markdown
Raw Normal View History

2026-05-05 07:40:45 -06:00
# Overview
2026-05-06 15:36:59 -06:00
This is an AI-native, versioned knowledge system with structured discovery, reasoning layers, and an economic access layer. This is the process that would be used to structure content for AI to use.
2026-05-05 07:40:45 -06:00
2026-05-05 14:32:27 -06:00
It has four fundamental properties:
2026-05-05 07:40:45 -06:00
2026-05-05 14:32:27 -06:00
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
<!-- CHUNK id="k:why-findability" -->
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.
2026-05-06 15:36:59 -06:00
This step is converting the markdown itself into:
- authored knowledge graph structure
- semantic retrieval structure
- reasoning topology
not just content.
This step 2 parser can also take the place of the CIS envelope for simple content, like a small static website. We don't want to overcomplicate things when not needed. The CIS envelope and control plane described further is more advanced for larger content repositories.
Use author-content-structuring-skill.md for this step.
For UUID, use this skill. But later, when there is :
multiple agents
multiple ingestion pipelines
multiple authors
distributed systems
synchronization
re-chunking
lineage tracking
graph merges
cross-corpus references
then you want authoritative identity management.
At that point:
AI should REQUEST IDs and not invent them independently, from:, for example:
a py UUID service
a database
an API
a registry
a microservice
2026-05-07 15:43:51 -06:00
Once completed, validate that this task was completed according to the skill requirements using another AI agent.
skill: author-content-structuring-skill.md
2026-05-05 14:32:27 -06:00
---
## 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)
2026-05-06 15:36:59 -06:00
Core CIS is chunk-intelligence-signature - see .md file for it. Also called CIS envelope.
Here, we pull from the CIS envelope for reference depending on the content and application. It may not be treated as a full implementation requirement. If we have a simple static website, we only need what is required to improve retrieval, continuity, reasoning and futur extensibility. We build the schema based on this perspective for both chunks and qa .json.
This initial is an interative process between human and AI, referencing the CIS envelope to determine the labels that need to be used moving forward.
Use:
knowledge_ids: []
chunk_ids: []
as arrays for:
- multi-hop reasoning;
- cross-chunk answers;
- synthesis answers
2026-05-07 15:43:51 -06:00
Once completed, validate that this task was completed according to the skill requirements using another AI agent. Verify that the ID's match throughout
2026-05-06 15:36:59 -06:00
2026-05-07 15:43:51 -06:00
skill: cis-guided-semantic-chunk-generation-skill.md
2026-05-05 14:32:27 -06:00
### 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)
2026-05-07 15:43:51 -06:00
Once completed, validate that this task was completed according to the skill requirements using another AI agent.Verify that the ID's match throughout in the process outline in all the steps up to now. Sample prompt: I need you to verify that the ID's used in each of these documents match throughout.  These documents represent a flow, with the source page enriched for frontmatter meaning, and the chunk and qa to follow with more meaning.  
skill: semantic-qa-materialization-skill.md
2026-05-05 14:32:27 -06:00
### 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
2026-05-07 15:43:51 -06:00
Once completed, validate that this task was completed according to the skill requirements using another AI agent.Verify that the ID's match throughout in the process outline in all the steps up to now.
### 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.
2026-05-05 14:32:27 -06:00
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.
2026-05-07 15:43:51 -06:00
Once completed, validate that this task was completed according to the skill requirements using another AI agent. Verify that the ID's match throughout in the process outline in all the steps up to now.
2026-05-05 14:32:27 -06:00
---
## 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
2026-05-07 15:43:51 -06:00
Manages:
- Access
- Pricing
- Permissions
- Usage
- Version state
Does NOT manage:
- Content
- Identity
- Structure
Once completed, validate that this task was completed according to the skill requirements using another AI agent.Verify that the ID's match throughout in the process outline in all the steps up to now.
---
Details at control-plane.md
2026-05-05 14:32:27 -06:00
---
## 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
2026-05-07 15:43:51 -06:00
see control-plane.md
You could build these when chunk is created, or dynamically as requested, which is better to accomdate changes in the control policy.
2026-05-05 14:32:27 -06:00
---
## 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
2026-05-07 15:43:51 -06:00
## Phase E - Enrichment
This element needs to be built out in far greater detail. We take the above and use reasoning to enrich the artifacts above to help create the relationships, ontologies and mapping the edges between all the artifacts.
We may be thinking conceptually about this as follows, creating ontology across three different layers that mature over time, rather than trying to do all at once:
1. Structural ontology
document → section → chunk → claim → answer → entity
2. Domain ontology
product, service, process, material, regulation, person, company, location, tool
3. Interpretive ontology
supports, contradicts, depends_on, solves, applies_to, caused_by, priced_as,
suitable_for, unsafe_for, prerequisite_for, replacement_for
Enrichment is a process that probably never ends but keeps improving as more content is added to the corpus and understanding compounds, which means enrichment gets better and better.
This phase also introduces the need for a graph database.
## Phase F - Vectorization
2026-05-05 14:32:27 -06:00
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
---
2026-05-07 15:43:51 -06:00
# Identity Model
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
in the CIS envelope:
- knowledge_id → stable idea
- did_chunk → version
- cid_chunk → content hash
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
Rule: Identity is authored, versions are computed, state is managed
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
# Gbrain Elements To Model
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
Below from analysis of Gbrain repo. Consider adding these elements.
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
- Auto-linking after every content write
- Stale edge reconciliation when content changes
- Provenance on edges: manual, frontmatter, extracted, llm, etc.
- Frontmatter-to-edge mapping as a lightweight ontology
- Backlink/reputation boost in retrieval
- Hybrid search: vector + keyword + graph + ranking fusion
- Background “dream” jobs, but for CIS reinterpretation/enrichment
- Unresolved references as enrichment triggers
- Compiled-truth/timeline split, adapted to chunk/document summaries
- Soft deprecation/recovery instead of deletion
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
See Gbrain repo analysis google doc
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
# Validation Of Process
2026-05-05 14:32:27 -06:00
2026-05-07 15:43:51 -06:00
One agent can create, another must then validate that the task is complete and the skills followed correctly.