Agent Wranglers

Site architecture

A structure that makes the other rules easy. Pages are data, built once to static HTML and served from memory, with every machine file from one source.

  • Required 3
  • Recommended 6

The idea

Write each page once, as data. Build every format from it at build time. People get HTML. Agents get Markdown and JSON-LD (structured data search engines read). Crawlers get the sitemap, feeds and llms.txt. Serve the result from memory, with its headers decided in advance. Run in the browser only what needs a browser.

  1. Page data. Each page is one module or file with its path, title, description, date and content.
  2. Build. One script and one stylesheet get hashed names. Every page is rendered with its CSS inline, plus metadata, JSON-LD, SRI and preloads.
  3. Build checks. The build stops on any broken rule. It writes HTML, Markdown and JSON-LD for each page, a manifest, and compressed text files.
  4. Server. Each page has one route and is rendered and compressed once, with its ETag and CSP hashes. Every response carries the security headers.
  5. Machine files. Robots, the sitemap, feeds, llms.txt and the .well-known files are all built from the manifest.
  6. Browser. Scripts only add behaviour, such as the theme, menus, widgets and the service worker.

Required

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/site-architecture.