=== BotsBrief ===
Contributors: airsoft99
Tags: ai, llm, seo, answer engine optimization, knowledge graph
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

BotsBrief turns your content into an Open Knowledge Format (OKF) bundle for AI agents, served at /okf/ and kept in sync as you publish.

== Description ==

BotsBrief reads your published posts and pages and builds an Open Knowledge Format (OKF) bundle, a small set of clean Markdown files that AI agents and answer engines can read without wading through your theme, scripts, and navigation.

The bundle is served live at `/okf/`. Each concept becomes its own Markdown file with a short YAML header (title, description, canonical URL, tags, timestamp), internal links are rewritten so the bundle is self contained, and a concept graph captures how your content links together. An `index.md` lists every concept and a `log.md` tracks recent updates.

Everything stays in sync on its own. When you publish, edit, trash, or delete a post or page, the bundle regenerates. There is nothing to run by hand.

= What it does =

* Generates an OKF v0.1 bundle from your published posts and pages
* Serves it at `/okf/` with the correct `text/markdown` content type, plus a `?okf=` fallback for sites without pretty permalinks
* Rewrites internal links to point at sibling concept files, resolved through WordPress itself so they survive permalink changes
* Builds a concept graph and draws it as an interactive map in the admin, with pan, zoom, and a node limit for large sites
* Regenerates automatically whenever content changes
* Reads your meta description from Rank Math or Yoast when present, falling back to the excerpt
* Audits your internal links from the same graph: orphan pages, an internal PageRank, and link opportunities (related posts that do not link to each other yet)
* Optionally serves an llms.txt at your site root that points AI agents at your content and the bundle, plus a discovery hint in your page head

= Why OKF =

Answer engines increasingly read the web through agents, not browsers. Handing them a clean, linked, Markdown view of your knowledge is faster for them to parse and easier for you to control than hoping they render your pages correctly. The bundle is a focused signal of what your site actually knows.

Learn more about the format at https://suganthan.com/blog/open-knowledge-format/ and about making a site ready for agents at https://suganthan.com/blog/how-to-make-website-agent-ready/.

== Installation ==

1. Upload the `botsbrief` folder to `/wp-content/plugins/`, or install the zip through Plugins, Add New, Upload Plugin.
2. Activate the plugin through the Plugins menu.
3. Visit OKF in the admin to see your bundle and knowledge graph.
4. Open `OKF, Settings` to choose post types, exclude items, and set the bundle title and description.
5. For the clean `/okf/` address, make sure pretty permalinks are enabled under Settings, Permalinks. Sites on plain permalinks can use the `?okf=index.md` address shown on the OKF screen.

== Frequently Asked Questions ==

= Where is my bundle served? =

At `/okf/` for the index and `/okf/<concept>.md` for each concept. On sites without pretty permalinks, use `?okf=index.md`.

= Does it slow down my site? =

No. The bundle is built when content changes and stored, then served from that stored copy. Visitors and agents read a cached result.

= Will it expose pages I have hidden from search? =

Not by default. Anything you mark noindex in Rank Math or Yoast is skipped, so agents see only what you let search engines see. You can turn this off in settings.

= Does it work with custom post types? =

Yes. Any public post type can be included from the settings page.

= Does it send my content anywhere? =

No. Everything is generated and served from your own site. There are no external calls.

== Screenshots ==

1. The knowledge graph: every published post and page as a concept, internal links as edges, drawn live in the admin with pan, zoom, and click to open.
2. The generated bundle, served at /okf/ and previewed in the dashboard.
3. Settings: choose post types, exclude items, skip noindex content, and set the bundle title and description.

== Changelog ==

= 1.3.0 =
* Now called BotsBrief.
* Admin CSS and the knowledge-graph script are enqueued through the WordPress asset APIs instead of printed as inline tags.

= 1.2.0 =
* Optional llms.txt at your site root (site name, content links, and a pointer to the OKF bundle), with a discovery hint in the page head. Toggle in Settings.

= 1.1.0 =
* New Link Audit screen: orphan pages, internal authority (PageRank over your internal links), and link opportunities (related posts that do not link to each other), all derived from the bundle's link graph
* Export the orphan and opportunity lists as CSV

= 1.0.3 =
* Filter excluded posts in PHP instead of a post__not_in query, for a cleaner database query on large sites

= 1.0.2 =
* Code quality pass for the plugin directory: escape all admin output at the point of output, sanitise settings input, and resolve Plugin Check findings

= 1.0.1 =
* Rewrite rules now flush automatically when the version changes, so /okf/ works without re-saving permalinks after install or update
* Concept files serve directly on sites with trailing-slash permalinks, instead of taking a 301 redirect first

= 1.0.0 =
* First public release
* Generate an OKF bundle from published posts and pages
* Serve at `/okf/` with a `?okf=` fallback, correct content type, and automatic regeneration on content changes
* Interactive knowledge graph with pan, zoom, hide toggle, auto fit, and a node limit for large sites
* Settings: post types, exclusions, skip noindex, bundle title and description, graph node limit

== Upgrade Notice ==

= 1.3.0 =
New name (BotsBrief) and cleaner admin asset loading. No change to your bundle.

= 1.2.0 =
Adds an optional llms.txt and a bundle discovery hint.

= 1.1.0 =
Adds a Link Audit screen built from your internal-link graph.

= 1.0.3 =
Cleaner post exclusion query. No functional changes.

= 1.0.2 =
Code quality pass for the WordPress.org directory. No functional changes.

= 1.0.1 =
Fixes the /okf/ address on some installs without needing a permalink re-save.

= 1.0.0 =
First public release.
