# Fill WT LLMs Through the Joomla REST API

Configure the WT LLMs component for this site:

**Site:** {{SITE_URL}}

**WT LLMs entry point and current schema:**

{{SCHEMA_URL}}

**Public results:**

* llms.txt: {{LLMS_TXT_URL}}
* llms.json: {{LLMS_JSON_URL}}

{{OWNER_INSTRUCTIONS}}

## Goal

Research the public site and fill WT LLMs through the REST API so that `llms.txt` and `llms.json`:

* explain accurately and concisely who owns the site and what it is about;
* reflect the main services, products, competencies, or information areas;
* describe real user intents;
* point to the most important canonical pages;
* avoid invented facts;
* help other AI agents interpret the site correctly and recommend suitable pages.

Do not create `llms.txt` or `llms.json` locally instead of using the component. Save all data through the WT LLMs REST API, then call the REST generation method.

## Authentication

Use the Joomla REST API as an authenticated Joomla user.

The API must use a Joomla token owned by a user with the required permissions. The token or other credentials are supplied separately from this prompt.

The Joomla token is usually sent in this header:

```http
X-Joomla-Token: <JOOMLA_API_TOKEN>
```

Do not output the token:

* in the final report;
* in request logs;
* in command examples;
* in error messages;
* in saved WT LLMs data.

The Joomla user must be allowed to:

* view and manage the component;
* create records;
* edit records;
* generate WT LLMs files.

Do not delete records by default. Delete or unpublish records only when the site owner explicitly asks you to do so.

If authentication is missing or permissions are insufficient, stop write operations and report exactly which permission or authentication method is missing.

## The Schema Is the Source of Truth

Start by requesting the schema:

```http
GET {{SCHEMA_URL}}
```

Study the schema for:

* available REST routes;
* HTTP methods;
* profile fields;
* intent fields;
* canonical page fields;
* `llms.txt` writing rules;
* generation rules;
* allowed values;
* required fields;
* the page-to-intent link format;
* the REST file generation method.

Do not rely on a previously known component structure when it differs from the received schema.

Do not send fields that are absent from the current schema.

If the schema and this prompt disagree on technical details, follow the current schema. Keep the semantic workflow from this prompt.

## Reliability Rules

Research the site from scratch.

Do not use:

* memory from previous conversations;
* company or owner facts not present on the site;
* unverified search snippets;
* assumptions based on the domain name;
* promotional wording not supported by site content.

Do not invent:

* services;
* products;
* features;
* prices;
* timelines;
* guarantees;
* clients;
* case studies;
* addresses;
* service geography;
* technologies;
* certificates;
* awards;
* partnerships;
* software versions;
* legal terms.

Leave unknown fields empty.

Every important claim must be supported by one or more public pages on the site.

## Workflow

Follow this order strictly:

1. Get the WT LLMs schema.
2. Authenticate with the Joomla REST API.
3. Read the currently saved component data.
4. Scan the public pages of the site.
5. Build a semantic model of the site.
6. Update the profile.
7. Create or update intents.
8. Fetch intents again and record their numeric IDs.
9. Create or update canonical pages and connect them to intents.
10. Manually write and save the content body for `llms.txt`.
11. Verify the saved data.
12. Call the REST generation method.
13. Verify the public `llms.txt` and `llms.json` files.
14. Produce a concise final report.

## Site Scan

Inspect the public site as an external visitor.

Use public sources such as:

* the home page;
* main menu sections;
* footer links;
* sitemap files when available;
* category pages;
* service, product, document, support, and contact pages;
* Markdown versions of pages when the site publishes them;
* HTML versions when Markdown is incomplete.

For each important page, record:

* canonical URL;
* title;
* main subject;
* practical user task;
* key facts present on the page;
* whether it should become a canonical page in WT LLMs.

Prefer pages that directly answer user questions. Do not mechanically include every URL.

## Profile

Fill the profile with verified, site-level facts only.

Use the current schema fields. Typical values may include:

* site or organization name;
* site URL;
* language;
* short description;
* profile type;
* audience;
* external same-as links;
* geography and service area;
* contacts;
* AI usage guidelines;
* facts that AI must not claim;
* preferred fact sources;
* fallback behavior when data is missing.

Use concise factual language. Do not turn profile fields into advertising copy.

## Intents

Create intents for real user goals, not SEO keyword lists.

Each intent should describe a task such as:

* understand what the organization does;
* choose a service or product;
* find prices or terms;
* contact the organization;
* download documentation;
* get support;
* compare options;
* check delivery, payment, warranty, or legal information.

For each intent:

* create a stable `intent_key`;
* write a human-readable title;
* assign a category;
* add realistic user questions;
* set priority;
* add notes only when useful;
* publish confirmed records.

Use `ordering` when the schema supports it so the most important intents appear first.

## Canonical Pages

Canonical pages are trusted pages AI should use as primary or supporting answers.

For each page:

* create a stable `page_key`;
* use the actual title;
* use the canonical HTML URL;
* add a concise factual summary;
* set the page type;
* connect it to one or more intents;
* set priority;
* mark whether it is primary for the topic;
* publish confirmed records.

Use numeric intent row IDs in `intent_ids` after creating or fetching intents. Do not send `intent_key` when the schema expects numeric IDs.

When supported by the schema, use `ordering` to preserve the semantic order of pages.

If the API does not provide a reliable Joomla menu item ID, use manual URL mode with `use_menu_item = 0`.

## Manual `llms.txt` Body

Write the `llms_txt` field manually from your research.

This is not the entire `/llms.txt` file. It is the content body that the component appends after the automatically generated title, intro quote, and profile blocks.

Follow the current schema.

In particular:

* do not add a first-level `#` heading;
* do not add an introductory blockquote `>`;
* do not repeat the automatically generated name and description;
* start the manual text with a second-level `##` heading;
* use factual wording;
* do not turn the file into a full sitemap;
* do not mechanically dump or duplicate all structured Intents and Canonical Pages data;
* write a concise human-readable summary;
* include a curated selection of the most important canonical page links.

Recommended structure:

```markdown
## Main Areas

Briefly explain the main services, products, competencies, or information areas.

## When To Use This Site

List the main user tasks for which this site is an appropriate source.

## Key Pages

- [Page title](https://example.com/path): concise factual explanation.
- [Page title](https://example.com/path): concise factual explanation.

## Evidence Or Trust Signals

Links to cases, documents, portfolio, author profile, regulations, or other confirmation pages.

## Additional Sections

Secondary but meaningful site areas.

## Documentation And Contacts

Links to key documents, FAQ, support, and contacts.
```

Use absolute URLs inside Markdown unless the component schema explicitly says it normalizes manual Markdown links.

`llms.txt` should communicate the correct high-level understanding of the site within the first few paragraphs.

## Pre-Generation Check

Fetch again:

* profile;
* import settings;
* intents;
* canonical pages;
* manual `llms.txt` body.

Check that:

* raw JSON override is disabled unless intentionally required;
* there are no duplicate `intent_key` values;
* there are no duplicate `page_key` values;
* intents describe user tasks, not SEO keywords;
* pages are linked to existing numeric intent IDs;
* important intents have suitable pages;
* primary pages have higher priority;
* secondary sections do not displace the site main purpose;
* URLs exist and open;
* page summaries match page content;
* manual `llms.txt` starts with `##`;
* `llms.txt` contains no unsupported claims;
* only current records are published.

Do not generate files until detected errors are fixed.

## Generate Files

Find the protected REST generation method in the current WT LLMs schema.

Call it as an authenticated Joomla user.

Expected operation type:

```http
POST <generation endpoint from schema>
```

Do not call the Joomla administrator HTML form instead of the REST method.

Do not claim that generation succeeded until the API returns a successful response.

Save from the response:

* generation time;
* generated file URLs;
* file status;
* component warnings.

## Verify Results

After successful generation, request:

```text
{{LLMS_TXT_URL}}
{{LLMS_JSON_URL}}
```

Verify `llms.txt`:

* the file is accessible;
* MIME type is suitable for text or Markdown;
* the beginning describes the site correctly;
* main areas appear before secondary areas;
* links open;
* there is no internal noise;
* there are no unsupported claims.

Verify `llms.json`:

* the file is accessible;
* JSON syntax is valid;
* the profile is filled;
* published intents are present;
* published canonical pages are present;
* page-to-intent links are converted correctly;
* URLs are absolute and valid;
* keys are not duplicated;
* there are no empty meaningless objects;
* AI rules do not conflict with site content.

If the site publishes Markdown page versions, spot-check several important URLs for parity with HTML.

## Final Self-Check

Assume an independent AI agent received only:

1. the beginning of `llms.txt`;
2. the profile from `llms.json`;
3. high-priority intents;
4. primary canonical pages.

Answer as that agent:

* Who or what is represented by the site?
* What is the site main purpose?
* Which tasks should the site be used for?
* Which areas are primary?
* Which areas are secondary?
* Which pages should be recommended to users?
* Which claims must not be made without additional verification?

If the answers do not match the factual content and intended semantic hierarchy of the site, fix the data and regenerate.

## Final Report

After completion, output a concise report:

```text
schema_loaded:
authentication_successful:
site_pages_scanned:
sitemaps_checked:
profile_updated:
intents_created:
intents_updated:
pages_created:
pages_updated:
llms_txt_updated:
generation_successful:
llms_txt_valid:
llms_json_valid:
markdown_pages_checked:
warnings:
```

Also list:

* created and updated intents;
* canonical pages and their connected intents;
* pages reviewed but not included in the canonical map;
* facts omitted because they were not confirmed;
* contradictions or outdated data found on the site;
* recommendations for improving the site structure and AI readability.
