# Skill: Discovery Files Materialization Human prompt to complete this skill: Using this skill, reference the current README.md process document, existing public discovery files if present, the generated Hugo HTML routes, source markdown pages, semantic data files, and ai-index.json. Create or update the final public discovery files: - `public/robots.txt` - `public/sitemap.xml` - `public/llms.txt` - `public/agents.md` - `public/skills.md` - `public/.well-known/ai-catalog.json` --- ## Contract This skill guarantees: - `robots.txt` points crawlers to the canonical sitemap and avoids exposing operational-only routes such as `/healthz/` as index targets. - `sitemap.xml` contains canonical public URLs with ``, ``, and `` for human-facing pages. - `sitemap.xml` appends selected root machine/helper resources after human-facing pages so crawlers have an explicit path to AI discovery files. - `llms.txt` gives LLMs a concise, plain-text entry point into the site, important URLs, and machine-readable artifacts. - `agents.md` gives autonomous agents safe retrieval, crawling, and usage guidance grounded in public files. - `skills.md` lists project skills and deterministic scripts that produce or validate this website. - `.well-known/ai-catalog.json` advertises actual public, agent-usable resources without duplicating `ai-index.json`. - Existing discovery files are read before replacement when present, so format and project-specific intent can be preserved where appropriate. - No credentials, secrets, private endpoints, or unsupported claims are added. ## Inputs Read these first: - `README.md` - Existing `public/robots.txt`, `public/sitemap.xml`, `public/llms.txt`, `public/agents.md`, `public/skills.md` if they exist - Existing `public/.well-known/ai-catalog.json` if it exists - `public/ai-index.json` - `content/**/*.md` - `public/data/open/pages/**/chunks.json` - `public/data/open/pages/**/qa.json` - `hugo-html-builder/public/**` when HTML has already been rendered ## Preferred Script Use: ```bash python skills-scripts/build_discovery_files.py ``` The script materializes all five files deterministically. Patch the script when the policy or output shape changes; do not repeatedly hand-author these files. ## Phases ### Phase 1: Inventory Identify all public human-facing routes: - `/` - section landing pages such as `/community-summaries/` - landing pages such as `/community-summaries/` - article pages such as `/community-summaries/{slug}.html` Exclude operational-only endpoints from the sitemap, especially `/healthz/`. ### Phase 2: Sitemap Create `public/sitemap.xml` with: - `` canonical URL under `https://indx.earth` - `` using source markdown last modification date, or the latest child modification date for section pages - `` estimated from page role - `` estimated from page role - selected root machine/helper resources appended after all HTML pages: - `/ai-index.json` - `/llms.txt` - `/skills.md` Recommended defaults: - Home: `weekly`, `1.0` - Primary section landing page: `weekly`, `0.8` - Secondary section landing page: `weekly`, `0.7` - Article/community summary page: `monthly`, `0.6` - Root AI/helper resource: `weekly`, `0.4` ### Phase 3: Robots Create `public/robots.txt` with a clear allow policy for public content, a disallow for `/healthz/`, and a `Sitemap:` line pointing to `https://indx.earth/sitemap.xml`. Do not encode Cloudflare bot-blocking policy in `robots.txt`; Cloudflare remains the enforcement layer for that. ### Phase 4: LLM Entry Point Create `public/llms.txt` as a compact LLM-facing guide: - site name and canonical URL - project purpose - important human pages - machine-readable artifacts - recommended retrieval order - contact/form status if relevant Keep it concise and plain text. ### Phase 5: Agent Guidance Create `public/agents.md` with safe agent instructions: - start with `/ai-index.json` - use `chunks.json` for retrieval and `qa.json` for interaction patterns - prefer canonical URLs from the sitemap - do not submit forms, scrape aggressively, or infer private data - respect public/open access boundaries - preserve license, usageInfo, source URL, and attribution metadata where available ### Phase 6: Skills Inventory Create `public/skills.md` listing project skills and deterministic scripts in `skills-scripts/`: - skill name or script filename - role in the publishing pipeline - when to use it This is a public inventory, not internal secrets or implementation logs. ### Phase 7: AI Catalog Apply `ai-catalog-materialization-skill.md` to create `public/.well-known/ai-catalog.json`. ### Phase 8: Validation Validate: - XML parses - all sitemap URLs use `https://indx.earth` - sitemap includes lastmod/changefreq/priority for each URL - sitemap includes `/ai-index.json`, `/llms.txt`, and `/skills.md` after the human-facing HTML URLs when those files exist - `robots.txt` references the sitemap - `llms.txt`, `agents.md`, and `skills.md` exist and are non-empty - `.well-known/ai-catalog.json` parses and advertises only real public resources - no credentials or private paths are present ## Anti-Patterns Do not: - include `/healthz/` in `sitemap.xml` - add secrets, API keys, private server names, or local-only paths to public files - invent crawler policies that belong in Cloudflare - duplicate full chunks, QA records, or ai-index contents in `llms.txt` or `agents.md` - treat `sitemap.xml` as a substitute for `ai-index.json` - treat `ai-catalog.json` as a replacement for `ai-index.json` - include `robots.txt`, `sitemap.xml`, operational endpoints, or `/healthz/` as index targets - hand-edit generated files without also updating the builder script when the change should persist