Skip to content

feat: add llms.txt and llms-full.txt for agent discoverability#264

Open
sidneyswift wants to merge 1 commit into
mainfrom
feat/llms-txt
Open

feat: add llms.txt and llms-full.txt for agent discoverability#264
sidneyswift wants to merge 1 commit into
mainfrom
feat/llms-txt

Conversation

@sidneyswift

@sidneyswift sidneyswift commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Custom llms.txt and llms-full.txt for agent capability discovery. Addresses P2 roadmap item.


Summary by cubic

Add llms.txt and llms-full.txt to improve agent/tool discoverability of the Recoup API. Provides a compact index and a full reference covering endpoints, plugins, CLI, MCP, and common workflows.

  • New Features
    • llms.txt: compact overview with key endpoints by section, plugin install commands, @recoupable/cli quick start, MCP connection, and links.
    • llms-full.txt: comprehensive reference with all endpoints, auth and signup flow, example payloads, CLI commands, MCP tools, and step-by-step workflows.
    • Replaces Mintlify’s auto-generated file with domain-specific content and plugin installation steps.

Written for commit 18152f5. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Documentation
    • Added comprehensive API reference docs with base URL, authentication rules, and links to related resources.
    • Expanded coverage of available endpoints across content, chat, tasks, social, account, sandbox, and other service areas.
    • Included setup guidance for CLI usage, MCP server access, and agent/plugin installation.
    • Added operational notes and quick links to full and compact reference materials, docs, and support.

Custom llms.txt files that give AI agents a structured overview of the
entire Recoup API surface — endpoints, plugins, CLI, MCP, and common
workflows. Addresses the P2 roadmap item 'Agent discoverability in docs'.

- llms.txt: compact overview (~6.7KB) with all sections and key endpoints
- llms-full.txt: comprehensive reference (~17KB) with every endpoint,
  request/response details, and step-by-step workflows
- Overrides Mintlify's auto-generated version with music-industry-specific
  context and plugin installation instructions
@sidneyswift sidneyswift requested a review from sweetmantech as a code owner July 6, 2026 05:04
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds two new documentation files, llms.txt and llms-full.txt, that describe the Recoup API for LLM/agent consumption: authentication, endpoint catalogs across multiple domains, CLI usage, MCP server connection details, workflows, and reference links.

Changes

LLM Reference Documentation

Layer / File(s) Summary
Compact API summary reference
llms.txt
Adds base URL/docs links, x-api-key authentication with unauthenticated signup exception, agent plugin install commands, endpoint catalog across research, content, artists, chat, songs/catalogs, tasks, social connectors, Spotify, accounts/organizations, and sandboxes, plus CLI setup, MCP server info, and links.
Full API reference document
llms-full.txt
Adds a complete reference with authentication, detailed endpoint parameters for content creation, artists, chat, songs/catalogs, tasks, social connectors, Spotify, accounts/organizations, sandboxes, and miscellaneous endpoints, plus Slack bot syntax, CLI commands, MCP server tools, workflows, and links.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Related issues: None mentioned in the PR.

Related PRs: None mentioned in the PR.

Suggested labels: documentation

Suggested reviewers: None specified.

🐰 Poem

A rabbit hops through docs anew,
Two files bloom where none once grew,
Endpoints listed, keys required,
CLI and MCP paths admired,
Hop along, the API's clear! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding llms.txt and llms-full.txt for agent discoverability.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/llms-txt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@llms-full.txt`:
- Around line 148-152: The API docs currently use the wrong response and polling
identifiers for the content pipeline. Update the `POST /api/content/create`
section in `llms-full.txt` so it returns `runIds` as an array instead of a
singular `runId`, and correct the `GET /api/tasks/runs` polling guidance to use
`runId` rather than `taskId`. Make sure the references around the content-create
endpoint and the tasks-runs polling example are consistent with the actual
`runIds`/`runId` naming.
- Around line 50-53: Update the route description to use the canonical research
endpoint referenced by the GET /api/research documentation, not GET
/api/research/search. Adjust the workflow lookup guidance in llms-full.txt so it
says the search uses q with optional type defaulting to artists, plus limit and
offset, and explicitly instructs callers to pass type=artists rather than
relying on a /search path. Keep the surrounding API reference wording consistent
with the existing GET /api/research section.

In `@llms.txt`:
- Around line 32-35: The artist search entry in llms.txt is pointing at the doc
page instead of the canonical API route. Update the Research section so the
lookup reference uses GET /api/research?q={query}&type=artists (with optional
limit) and keep the surrounding endpoint list consistent with the real search
contract; use the existing Research heading and search/profile entries to locate
the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b2c2617c-606c-47b4-b363-460f81922d79

📥 Commits

Reviewing files that changed from the base of the PR and between 8c115d9 and 18152f5.

📒 Files selected for processing (2)
  • llms-full.txt
  • llms.txt

Comment thread llms-full.txt
Comment on lines +50 to +53
### GET /api/research/search
Search for artists by name.
Query params: `q` (required), `limit`, `offset`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the relevant documentation file and inspect the referenced ranges.
git ls-files | rg '^llms-full\.txt$'
wc -l llms-full.txt
sed -n '40,70p' llms-full.txt
printf '\n---\n'
sed -n '610,640p' llms-full.txt

# Search for research endpoint definitions and related query params across the repo.
rg -n "api/research|research/search|type=.*artists|offset|runIds|runId|api/content/create" .

Repository: recoupable/docs

Length of output: 29774


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the exact parameter list for GET /api/research in the OpenAPI spec.
sed -n '939,985p' api-reference/openapi/research.json

# Inspect the content-create response shape in the OpenAPI spec.
sed -n '661,710p' api-reference/openapi/content.json

Repository: recoupable/docs

Length of output: 4259


Use the canonical research route.
llms-full.txt:50-53, 618-623 should point to GET /api/research; that endpoint accepts q plus optional type (default artists), limit, and offset. The workflow lookup should use type=artists instead of the /search path.

Proposed fix
- ### GET /api/research/search
+ ### GET /api/research
  Search for artists by name.
- Query params: `q` (required), `limit`, `offset`
+ Query params: `q` (required), `type`, `limit`, `offset`
@@
- `GET /api/research/search?q={name}` — find Spotify match
+ `GET /api/research?q={name}&type=artists` — find Spotify match
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@llms-full.txt` around lines 50 - 53, Update the route description to use the
canonical research endpoint referenced by the GET /api/research documentation,
not GET /api/research/search. Adjust the workflow lookup guidance in
llms-full.txt so it says the search uses q with optional type defaulting to
artists, plus limit and offset, and explicitly instructs callers to pass
type=artists rather than relying on a /search path. Keep the surrounding API
reference wording consistent with the existing GET /api/research section.

Comment thread llms-full.txt
Comment on lines +148 to +152
### POST /api/content/create
Full content pipeline — takes an artist account ID and produces a finished social-ready video with caption.
Body: `{"artistAccountId": "uuid", "template": "optional-name", "lipsync": false, "upscale": false}`
Returns: `{"runId": "uuid"}` — poll with tasks endpoint.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Relevant lines from llms-full.txt\n'
nl -ba llms-full.txt | sed -n '138,165p'

printf '\n## Search for endpoint and run id references\n'
rg -n --hidden --no-messages -S 'POST /api/content/create|GET /api/tasks/runs|runIds|runId|taskId=' .

printf '\n## File inventory for likely docs/contracts\n'
git ls-files | rg -n '(^|/)(README|docs|llms-full\.txt|openapi|api|swagger|schema|spec)' || true

Repository: recoupable/docs

Length of output: 231


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Relevant lines from llms-full.txt\n'
awk 'NR>=138 && NR<=165 { printf "%d:%s\n", NR, $0 }' llms-full.txt

printf '\n## Search for endpoint and run id references in llms-full.txt\n'
rg -n -S 'POST /api/content/create|GET /api/tasks/runs|runIds|runId|taskId=' llms-full.txt

printf '\n## Search the repository for related references\n'
rg -n -S 'POST /api/content/create|GET /api/tasks/runs|runIds|runId|taskId=' .

Repository: recoupable/docs

Length of output: 14319


Use runIds here, and runId in the polling step. POST /api/content/create returns runIds (array), not a singular runId, and GET /api/tasks/runs should be polled with runId, not taskId. Update llms-full.txt at 148-152 and 630-631.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@llms-full.txt` around lines 148 - 152, The API docs currently use the wrong
response and polling identifiers for the content pipeline. Update the `POST
/api/content/create` section in `llms-full.txt` so it returns `runIds` as an
array instead of a singular `runId`, and correct the `GET /api/tasks/runs`
polling guidance to use `runId` rather than `taskId`. Make sure the references
around the content-create endpoint and the tasks-runs polling example are
consistent with the actual `runIds`/`runId` naming.

Comment thread llms.txt
Comment on lines +32 to +35
### Research (20+ endpoints)
Artist analytics, audience insights, playlist intelligence, competitive analysis, trend detection.
- `GET /api/research/search?q={query}` — Find artists
- `GET /api/research/profile?artistId={id}` — Artist profile

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^|/)(llms\.txt|openapi|openapi\.ya?ml|swagger|api|research)'
echo

echo "== llms.txt lines around 32-35 =="
if [ -f llms.txt ]; then
  cat -n llms.txt | sed -n '24,42p'
fi
echo

echo "== search for research route definitions =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' '/api/research|research/search|research\?' .

Repository: recoupable/docs

Length of output: 20870


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== research search doc =="
cat -n api-reference/research/search.mdx | sed -n '1,120p'
echo

echo "== openapi /api/research entry =="
python3 - <<'PY'
import json
from pathlib import Path

data = json.loads(Path('api-reference/openapi/research.json').read_text())
path = data['paths']['/api/research']['get']
print("summary:", path.get('summary'))
print("description:", path.get('description'))
print("parameters:")
for p in path.get('parameters', []):
    print(f"- {p.get('name')!r} in {p.get('in')} required={p.get('required')} schema={p.get('schema')}")
PY

Repository: recoupable/docs

Length of output: 1329


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== research search doc =="
cat -n api-reference/research/search.mdx | sed -n '1,120p'
echo

echo "== openapi /api/research entry =="
python3 - <<'PY'
import json
from pathlib import Path

data = json.loads(Path('api-reference/openapi/research.json').read_text())
path = data['paths']['/api/research']['get']
print("summary:", path.get("summary"))
print("description:", path.get("description"))
print("parameters:")
for p in path.get("parameters", []):
    print(f"- {p.get('name')!r} in {p.get('in')} required={p.get('required')} schema={p.get('schema')}")
PY

Repository: recoupable/docs

Length of output: 1329


Use the canonical research endpoint here.
/api/research/search is the doc page, not the API route. For artist lookup, point llms.txt at GET /api/research?q={query}&type=artists (with optional limit) so agents hit the real search contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@llms.txt` around lines 32 - 35, The artist search entry in llms.txt is
pointing at the doc page instead of the canonical API route. Update the Research
section so the lookup reference uses GET /api/research?q={query}&type=artists
(with optional limit) and keep the surrounding endpoint list consistent with the
real search contract; use the existing Research heading and search/profile
entries to locate the change.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 issues found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="llms.txt">

<violation number="1" location="llms.txt:34">
P2: This endpoint path (`/api/research/search`) may reference a documentation page rather than the actual API route. If the canonical artist search endpoint is `GET /api/research?q={query}&type=artists`, agents following this documentation will call a non-existent route.</violation>

<violation number="2" location="llms.txt:76">
P3: The Chat section header says "12 endpoints" but only 11 are listed below it. An AI agent parsing the count literally could get incorrect metadata about the API surface. Either update the count to 11 to match what's listed, or add the missing endpoint.</violation>

<violation number="3" location="llms.txt:90">
P3: The Songs & Catalogs section header says "10 endpoints" but only 9 are listed below it (and the full reference in `llms-full.txt` also has exactly 9). This would mislead an AI agent about the available API surface. Update the count to 9.</violation>
</file>

<file name="llms-full.txt">

<violation number="1" location="llms-full.txt:50">
P2: The research search endpoint documented here as `GET /api/research/search` may not match the actual API route. If the canonical endpoint is `GET /api/research` (accepting `q`, `type`, `limit`, `offset` parameters, with `type=artists` for artist lookup), this documentation will cause agents to hit a non-existent route. The same path is referenced in the workflow section at line 619.</violation>

<violation number="2" location="llms-full.txt:151">
P2: The response format documented here (`{"runId": "uuid"}`) and the polling step in the workflow section (`GET /api/tasks/runs?taskId={runId}`) appear internally inconsistent. If the actual response returns `runIds` (an array), this will cause agents to look for the wrong field. Additionally, the workflow section passes a `runId` value to a `taskId` parameter, which is contradictory and suggests the polling parameter should be `runId` instead.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread llms.txt

### Research (20+ endpoints)
Artist analytics, audience insights, playlist intelligence, competitive analysis, trend detection.
- `GET /api/research/search?q={query}` — Find artists

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This endpoint path (/api/research/search) may reference a documentation page rather than the actual API route. If the canonical artist search endpoint is GET /api/research?q={query}&type=artists, agents following this documentation will call a non-existent route.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At llms.txt, line 34:

<comment>This endpoint path (`/api/research/search`) may reference a documentation page rather than the actual API route. If the canonical artist search endpoint is `GET /api/research?q={query}&type=artists`, agents following this documentation will call a non-existent route.</comment>

<file context>
@@ -0,0 +1,157 @@
+
+### Research (20+ endpoints)
+Artist analytics, audience insights, playlist intelligence, competitive analysis, trend detection.
+- `GET /api/research/search?q={query}` — Find artists
+- `GET /api/research/profile?artistId={id}` — Artist profile
+- `GET /api/research/metrics?artistId={id}` — Streaming metrics
</file context>

Comment thread llms-full.txt
### POST /api/content/create
Full content pipeline — takes an artist account ID and produces a finished social-ready video with caption.
Body: `{"artistAccountId": "uuid", "template": "optional-name", "lipsync": false, "upscale": false}`
Returns: `{"runId": "uuid"}` — poll with tasks endpoint.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The response format documented here ({"runId": "uuid"}) and the polling step in the workflow section (GET /api/tasks/runs?taskId={runId}) appear internally inconsistent. If the actual response returns runIds (an array), this will cause agents to look for the wrong field. Additionally, the workflow section passes a runId value to a taskId parameter, which is contradictory and suggests the polling parameter should be runId instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At llms-full.txt, line 151:

<comment>The response format documented here (`{"runId": "uuid"}`) and the polling step in the workflow section (`GET /api/tasks/runs?taskId={runId}`) appear internally inconsistent. If the actual response returns `runIds` (an array), this will cause agents to look for the wrong field. Additionally, the workflow section passes a `runId` value to a `taskId` parameter, which is contradictory and suggests the polling parameter should be `runId` instead.</comment>

<file context>
@@ -0,0 +1,647 @@
+### POST /api/content/create
+Full content pipeline — takes an artist account ID and produces a finished social-ready video with caption.
+Body: `{"artistAccountId": "uuid", "template": "optional-name", "lipsync": false, "upscale": false}`
+Returns: `{"runId": "uuid"}` — poll with tasks endpoint.
+
+### POST /api/content/image
</file context>

Comment thread llms-full.txt

## Research Endpoints

### GET /api/research/search

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The research search endpoint documented here as GET /api/research/search may not match the actual API route. If the canonical endpoint is GET /api/research (accepting q, type, limit, offset parameters, with type=artists for artist lookup), this documentation will cause agents to hit a non-existent route. The same path is referenced in the workflow section at line 619.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At llms-full.txt, line 50:

<comment>The research search endpoint documented here as `GET /api/research/search` may not match the actual API route. If the canonical endpoint is `GET /api/research` (accepting `q`, `type`, `limit`, `offset` parameters, with `type=artists` for artist lookup), this documentation will cause agents to hit a non-existent route. The same path is referenced in the workflow section at line 619.</comment>

<file context>
@@ -0,0 +1,647 @@
+
+## Research Endpoints
+
+### GET /api/research/search
+Search for artists by name.
+Query params: `q` (required), `limit`, `offset`
</file context>

Comment thread llms.txt
- `DELETE /api/chats` — Delete chat
- `POST /api/chats/compact` — Compact chat history

### Songs & Catalogs (10 endpoints)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The Songs & Catalogs section header says "10 endpoints" but only 9 are listed below it (and the full reference in llms-full.txt also has exactly 9). This would mislead an AI agent about the available API surface. Update the count to 9.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At llms.txt, line 90:

<comment>The Songs & Catalogs section header says "10 endpoints" but only 9 are listed below it (and the full reference in `llms-full.txt` also has exactly 9). This would mislead an AI agent about the available API surface. Update the count to 9.</comment>

<file context>
@@ -0,0 +1,157 @@
+- `DELETE /api/chats` — Delete chat
+- `POST /api/chats/compact` — Compact chat history
+
+### Songs & Catalogs (10 endpoints)
+- `GET /api/songs` — List songs
+- `POST /api/songs` — Create song
</file context>
Suggested change
### Songs & Catalogs (10 endpoints)
### Songs & Catalogs (9 endpoints)

Comment thread llms.txt
- `GET /api/artists/socials?artistId={id}` — Artist social links
- `GET /api/artist/profile?artistId={id}` — Full artist profile

### Chat (12 endpoints)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The Chat section header says "12 endpoints" but only 11 are listed below it. An AI agent parsing the count literally could get incorrect metadata about the API surface. Either update the count to 11 to match what's listed, or add the missing endpoint.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At llms.txt, line 76:

<comment>The Chat section header says "12 endpoints" but only 11 are listed below it. An AI agent parsing the count literally could get incorrect metadata about the API surface. Either update the count to 11 to match what's listed, or add the missing endpoint.</comment>

<file context>
@@ -0,0 +1,157 @@
+- `GET /api/artists/socials?artistId={id}` — Artist social links
+- `GET /api/artist/profile?artistId={id}` — Full artist profile
+
+### Chat (12 endpoints)
+Conversations with artist context, streaming support.
+- `POST /api/chat/workflow` — Send message (non-streaming)
</file context>
Suggested change
### Chat (12 endpoints)
### Chat (11 endpoints)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant