Files
structured-website-builder-…/skills-scripts/ai-index-discovery-materialization-skill.md
T
2026-06-09 11:57:54 -06:00

12 KiB
Raw Blame History

Skill: AI Index Discovery Materialization

Human prompt to complete this skill:

Using the attached skill, referencing the completed markdown pages, chunks.json files, qa.json files, and README.md process document attached, create the ai-index.json discovery layer for this project. Reference existing ai-index.json if one already exists from prior builds. Reference all prior outputs for structural consistency. Also referfenced is the document structure for this corpus so you can properly reference where files exist.

Use the build_ai_index.py, which materializes the site’s public/ai-index.json discovery layer from the current source content and semantic artifacts. It scans content//*.md, reads each page’s front matter, finds the matching local public/data/open/pages//chunks.json and qa.json files, emits served artifact paths as /data/open/pages/**, extracts lightweight discovery metadata such as title, summary, tags, topics, entities, concepts, audiences, artifact paths, HTML routes, retrieval priority, access type, and coverage counts, then writes a complete machine-readable AI index.

If available in the future (because this content could be deleted), it also includes explicitly referenced whitepapers from home.md, normalizes common encoding artifacts, validates that referenced local markdown/chunks/QA files exist, and records validation results in the output so the index can be regenerated deterministically after content changes.

After this skill runs, run discovery-files-materialization-skill.md / build_discovery_files.py to regenerate the root public discovery files that depend on the current AI index and rendered HTML routes:

  • public/robots.txt
  • public/sitemap.xml
  • public/llms.txt
  • public/agents.md
  • public/skills.md

Overview

This skill generates the:

ai-index.json

discovery and routing layer for an AI-native publishing system.

This file acts as:

  • the machine-readable entry point;
  • the discovery layer;
  • the routing layer;
  • the evaluation layer;
  • the trust signaling layer;
  • the economic discovery layer.

It helps AI systems determine:

  1. What exists
  2. Where it exists
  3. Why it matters
  4. Why it is trustworthy
  5. Whether it is worth retrieving
  6. Whether it is worth paying for
  7. How to access it

This layer is intentionally lightweight.

It is NOT:

  • the full corpus;
  • the full CIS envelope;
  • the full chunk database;
  • a vector database;
  • a semantic graph dump.

Instead:

ai-index.json

is a discovery-oriented semantic control surface.

Think of it as:

  • a machine-readable table of contents;
  • a discovery manifest;
  • a semantic routing layer;
  • an AI-native sitemap with intelligence.

Core Architectural Principle

The ai-index.json file exists to eliminate ambiguity.

Without it, AI systems must:

  • parse HTML;
  • infer structure;
  • crawl pages;
  • guess importance;
  • infer trust;
  • infer access methods;
  • infer semantic relationships.

With it:

the publisher explicitly programs the discovery interface.


Purpose Of ai-index.json

The ai-index.json layer should help AI systems answer:

  • What knowledge exists?
  • What domains does this corpus cover?
  • What should I retrieve first?
  • What content is high-value?
  • What content is authoritative?
  • What content is free?
  • What content is paywalled?
  • What workflows exist?
  • What entities are important?
  • What systems are connected?
  • What is worth paying for?
  • What is the best route through this knowledgebase?

Relationship To Other Layers

Markdown / HTML

Human-readable canonical content.


chunks.json

Semantic retrieval infrastructure.

Contains:

  • chunk identity;
  • semantic segmentation;
  • summaries;
  • concepts;
  • tags;
  • retrieval metadata.

qa.json

Semantic interaction infrastructure.

Contains:

  • questions;
  • reasoning paths;
  • workflows;
  • synthesis;
  • interaction topology.

ai-index.json

Discovery + routing layer.

Contains:

  • discovery metadata;
  • access metadata;
  • trust signals;
  • evaluation hints;
  • corpus navigation;
  • retrieval prioritization;
  • economic routing;
  • semantic previews.

Important Constraint

The ai-index.json file should NOT duplicate the full chunks or QA datasets.

It should contain:

decision-enabling metadata only.

This layer advertises the corpus.

It does not fully materialize it.


Discovery Philosophy

The ai-index.json file exists to help AI systems make rational retrieval decisions.

The system should reduce:

  • uncertainty;
  • ambiguity;
  • retrieval cost;
  • discovery friction.

The file should help AI systems evaluate:

  • relevance;
  • authority;
  • applicability;
  • access method;
  • expected value.

AI Discovery Questions

The ai-index.json layer should help answer:

1. What is this?

Describe:

  • the corpus;
  • the page;
  • the subsystem;
  • the resource;
  • the domain.

2. Why should I trust it?

Include trust and credibility signals such as:

  • author;
  • organization;
  • expertise;
  • citations;
  • connected systems;
  • usage signals;
  • reputation signals;
  • provenance hints.

Do NOT invent trust signals.


3. Why is it worth retrieving?

Include:

  • semantic relevance;
  • uniqueness;
  • specialization;
  • workflow usefulness;
  • strategic importance;
  • synthesis value.

4. Why is it worth paying for?

If applicable, include:

  • exclusivity;
  • operational value;
  • strategic insights;
  • workflow execution value;
  • decision-support value.

The goal is to make retrieval or purchase the obvious rational choice.


Discovery Layer Scope

The ai-index.json file MAY include:

  • page-level metadata;
  • semantic summaries;
  • trust signals;
  • access methods;
  • content classifications;
  • routing hints;
  • corpus relationships;
  • workflow previews;
  • semantic previews;
  • retrieval hints;
  • topic clusters;
  • economic signals;
  • content freshness;
  • content state;
  • semantic importance.

The ai-index.json file should NOT include:

  • full chunk text;
  • full QA datasets;
  • large content payloads;
  • vector embeddings;
  • raw graph exports.

Recommended Top-Level Structure

{
  "index": {
    "title": "",
    "description": "",
    "version": "",
    "generated_at": "",
    "publisher": "",
    "canonical_url": "",
    "discovery_type": "",
    "materialization_level": 1
  },

  "corpus": {
    "domains": [],
    "topics": [],
    "entities": [],
    "audiences": []
  },

  "resources": []
}

Resource Entry Structure

Each page, document, or resource should include:

{
  "resource_id": "",
  "title": "",
  "slug": "",

  "resource_type": "",

  "summary": "",

  "topics": [],
  "entities": [],
  "concepts": [],

  "audience": [],

  "trust_signals": {
    "author": "",
    "organization": "",
    "source_alignment": "",
    "credibility_hints": []
  },

  "discovery": {
    "importance": "",
    "retrieval_priority": "",
    "semantic_density": "",
    "workflow_value": ""
  },

  "access": {
    "access_type": "",
    "api_endpoint": "",
    "preview_available": false,
    "pricing": null,
    "license": "https://creativecommons.org/licenses/by/4.0/",
    "usageInfo": "https://indx.earth/wiki/license/"
  },

  "artifacts": {
    "markdown": "",
    "html": "",
    "chunks_json": "",
    "qa_json": "",
    "semantic_summary_json": ""
  },

  "relationships": {
    "related_resources": [],
    "supports": [],
    "depends_on": [],
    "expands": []
  }
}

Resource Types

Recommended values:

  • page
  • article
  • whitepaper
  • documentation
  • overview
  • research
  • workflow
  • dataset
  • transcript
  • faq
  • directory
  • policy
  • educational

Discovery Metadata

importance

Relative strategic importance.

Recommended values:

  • low
  • medium
  • high
  • foundational
  • critical

retrieval_priority

Recommended retrieval order.

Examples:

  • primary
  • secondary
  • deep-reference
  • synthesis-layer

semantic_density

Indicates conceptual richness.

Examples:

  • light
  • moderate
  • dense
  • highly-connected

workflow_value

Indicates operational usefulness.

Examples:

  • informational
  • strategic
  • executable
  • workflow-support
  • agent-operational

Identity Rule

The ai-index.json layer should reference existing authoritative identities whenever possible.

Avoid introducing new identity systems unless:

  • resources exist independently from documents;
  • external systems require separate IDs;
  • discovery objects are materially different from source documents.

Preferred order:

  1. document_id
  2. knowledge_id
  3. existing canonical identifiers

Avoid duplicate identity namespaces.


Access Layer

The access section should explain:

  • whether content is open;
  • whether content is restricted;
  • how it is accessed;
  • whether previews exist;
  • whether API access exists.

Example:

"access": {
  "access_type": "open",
  "api_endpoint": "/data/open/pages/home/chunks.json",
  "preview_available": false,
  "pricing": null
}

Possible access types:

  • open
  • preview
  • paid
  • restricted
  • licensed
  • api-only

Trust Signals

Trust signals should remain lightweight.

Do NOT attempt full reputation scoring here.

Examples:

  • author expertise;
  • connected systems;
  • publication history;
  • ecosystem participation;
  • citations;
  • workflow usage;
  • domain specialization.

Corpus Rollup

The corpus section should aggregate:

  • primary domains;
  • major entities;
  • conceptual areas;
  • intended audiences.

This helps AI systems rapidly determine:

  • corpus scope;
  • specialization;
  • applicability.

Relationship Mapping

The ai-index.json layer MAY include lightweight relationships.

Examples:

"relationships": {
  "related_resources": [
    "networksig-overview"
  ],
  "supports": [],
  "depends_on": [],
  "expands": []
}

Purpose:

  • routing;
  • navigation;
  • graph hinting;
  • retrieval expansion.

Avoid deep graph materialization here.


Materialization Levels

Level 1 — Lightweight Discovery Layer

Use for:

  • simple websites;
  • early prototypes;
  • public static sites.

Includes:

  • page discovery;
  • summaries;
  • artifact references;
  • access metadata.

Recommended default for small AI-native websites.


Level 2 — Enhanced Discovery Layer

Adds:

  • trust signals;
  • workflow hints;
  • retrieval prioritization;
  • semantic density;
  • relationship hints.

Recommended for structured knowledgebases.


Level 3 — Economic Discovery Layer

Adds:

  • pricing;
  • previews;
  • trust inheritance;
  • utility signals;
  • usage indicators;
  • retrieval economics.

Recommended for monetized systems.


Level 4 — Agent Routing Layer

Adds:

  • executable endpoints;
  • workflow invocation;
  • tool compatibility;
  • policy hints;
  • semantic contracts.

Recommended for agent ecosystems.


Corpus-Specific Guidance

Static Websites

Recommended level:

Level 1 or 2

Focus on:

  • discoverability;
  • routing;
  • semantic summaries;
  • retrieval clarity.

Avoid excessive complexity.


White Paper Libraries

Recommended level:

Level 2 or 3

Focus on:

  • authority;
  • specialization;
  • conceptual density;
  • synthesis value.

Monetized Knowledge Systems

Recommended level:

Level 3 or 4

Focus on:

  • value signaling;
  • access methods;
  • previews;
  • retrieval economics;
  • workflow utility.

Validation Requirements

After generating ai-index.json:

  1. Verify all referenced files exist
  2. Verify all slugs match
  3. Verify all chunk and QA references are valid
  4. Verify no orphaned resources exist
  5. Verify access routes are internally consistent
  6. Verify trust signals are grounded in source content
  7. Verify no unsupported claims were added

A second AI agent should validate the output.


Relationship To Discovery Files

The ai-index.json file complements:

  • sitemap.xml
  • robots.txt
  • llms.txt
  • agents.md
  • skills.md

But unlike those files:

it is semantically structured for machine reasoning.


Future Compatibility

This structure is intentionally designed to support future:

  • vectorization;
  • embeddings;
  • graph databases;
  • retrieval ranking;
  • economic routing;
  • semantic trust systems;
  • AI agents;
  • autonomous retrieval systems;
  • programmable knowledge access.

Important Architectural Principle

The ai-index.json file is:

a semantic discovery and routing layer

—not merely a sitemap replacement.

It is the programmable discovery interface for AI systems.


Final Output Requirement

Output a COMPLETE valid ai-index.json file.

Do NOT output:

  • markdown commentary;
  • explanations;
  • partial fragments;
  • pseudo-JSON.

The output should be:

  • production-ready;
  • machine-readable;
  • semantically grounded;
  • suitable for direct ingestion into downstream systems.