Skip to content

Enrich LLM-facing documentation with context and navigation#939

Open
AvdLee wants to merge 5 commits intomasterfrom
docs/llm-content-enrichment
Open

Enrich LLM-facing documentation with context and navigation#939
AvdLee wants to merge 5 commits intomasterfrom
docs/llm-content-enrichment

Conversation

@AvdLee
Copy link
Copy Markdown
Owner

@AvdLee AvdLee commented Mar 2, 2026

Summary

  • Adds rich <SYSTEM> headers to llms-full.txt and llms-small.txt with product context, supported platforms (iOS, macOS, watchOS, visionOS), and key capabilities
  • Inserts a structured table of contents in both LLM doc variants for easier navigation
  • Adds cross-reference "Related" links between related documentation pages
  • Creates llms-ctx.txt with concise product context for LLM consumption
  • References llms-ctx.txt from the main llms.txt entry point

Changes

  • docs/src/integrations/llms-txt-post-process.ts — enhanced post-processing with SYSTEM header, TOC, cross-references, and llms.txt modification
  • docs/public/llms-ctx.txt — new static file with product context

Test plan

  • Verify npm run build passes
  • Check generated llms-full.txt starts with rich SYSTEM header (no pricing mentioned)
  • Check generated llms-full.txt has table of contents after SYSTEM header
  • Check related links appear at the end of relevant pages in llms-full.txt
  • Verify llms-ctx.txt is accessible at /llms-ctx.txt
  • Verify llms.txt references llms-ctx.txt

Add rich SYSTEM headers to llms-full.txt and llms-small.txt with product
context, supported platforms, and key capabilities. Insert a table of
contents for navigation. Add related-page cross-references to help LLMs
understand documentation relationships. Create llms-ctx.txt with concise
product context. Reference llms-ctx.txt from llms.txt entry point.
Repository owner deleted a comment from Copilot AI Mar 2, 2026
@AvdLee AvdLee requested a review from Copilot March 2, 2026 09:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the generated llms-*.txt documentation artifacts by injecting richer product context, navigation helpers, and cross-page references, and adds a standalone context file (llms-ctx.txt) intended for LLM consumption.

Changes:

  • Adds enriched <SYSTEM> headers, a static table of contents, and “Related” cross-links into llms-full.txt / llms-small.txt during post-processing.
  • Rewrites the generated llms.txt index during build to include product info and a link to llms-ctx.txt.
  • Adds a new public llms-ctx.txt file containing concise RocketSim product context and technical details.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
docs/src/integrations/llms-txt-post-process.ts Post-processes generated LLM docs to prepend richer SYSTEM headers/TOC, append related links, and rewrite llms.txt.
docs/public/llms-ctx.txt New static “product context” document referenced from llms.txt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Onboarding
- Product Tour & Quick Demos
- Configuring App Actions
- Setting Up RocketSim Connect
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

TOC entry "Setting Up RocketSim Connect" uses different capitalization than the actual page title ("Setting up RocketSim Connect"). Since addRelatedLinks and other logic key off exact titles, keeping TOC/page titles consistent avoids confusion and reduces drift.

Suggested change
- Setting Up RocketSim Connect
- Setting up RocketSim Connect

Copilot uses AI. Check for mistakes.
Comment on lines +219 to +223
Last updated: ${buildDate}
Website: https://www.rocketsim.app
Documentation: https://www.rocketsim.app/docs
GitHub: https://github.com/AvdLee/RocketSimApp
Support: support@rocketsim.app
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

enhanceLlmsTxtIndex hard-codes the production base URL (https://www.rocketsim.app) in multiple places. Since the repo already centralizes the site URL in docs/src/config/config.json (used by docs/astro.config.ts), consider deriving the base URL from that config to avoid broken links if the domain changes or when building in non-prod environments.

Copilot uses AI. Check for mistakes.

## Technical Details
- Platform: macOS (enhances the iOS/watchOS/visionOS Simulator in Xcode)
- Distribution: Mac App Store + direct enterprise distribution
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The "Distribution" line claims "Mac App Store + direct enterprise distribution", but the existing FAQ only states there is an out-of-the-App-Store distribution option via support contact. To avoid providing potentially incorrect product info to LLMs, consider aligning this wording with the FAQ (or linking to the official wording/source).

Suggested change
- Distribution: Mac App Store + direct enterprise distribution
- Distribution: Mac App Store (see official FAQ or contact support for alternative distribution options)

Copilot uses AI. Check for mistakes.
Comment on lines +157 to +159
"[Setting Up RocketSim Connect](/docs/getting-started/setting-up-rocketsim-connect)",
],
"Setting Up RocketSim Connect": [
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

RELATED_LINKS uses the key "Setting Up RocketSim Connect", but the actual page title in the docs frontmatter is "Setting up RocketSim Connect". Because addRelatedLinks does an exact title match, the related links block will never be added for that page. Rename the key (and any other exact-title keys) to match the real # title text.

Suggested change
"[Setting Up RocketSim Connect](/docs/getting-started/setting-up-rocketsim-connect)",
],
"Setting Up RocketSim Connect": [
"[Setting up RocketSim Connect](/docs/getting-started/setting-up-rocketsim-connect)",
],
"Setting up RocketSim Connect": [

Copilot uses AI. Check for mistakes.
- Setting Up RocketSim Connect
- How Large Teams Use RocketSim
- Additional Resources
- Testimonials
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The TOC includes a "Testimonials" entry, but transformLlmsTxt removes the Testimonials page for the small variant. This makes llms-small.txt’s TOC point to content that won’t exist. Consider generating variant-specific TOC content (or conditionally omitting Testimonials for small).

Suggested change
- Testimonials

Copilot uses AI. Check for mistakes.
- Simulator Camera Support

### Status Bar
- Status Bar Appearance
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

TOC entry "Status Bar Appearance" doesn’t match the actual docs page title ("Statusbar Appearance"). Since this TOC is meant for navigation/search in the generated LLM docs, mismatched titles make it harder to correlate sections. Update the TOC text to match the real page title(s).

Suggested change
- Status Bar Appearance
- Statusbar Appearance

Copilot uses AI. Check for mistakes.

### App Actions
- App Directory Access
- Deep Links & Universal Links
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

TOC entry "Deep Links & Universal Links" doesn’t match the actual page title ("Deeplinks (Universal Links)"). If the TOC is intended to help locate page sections by title, keep the wording consistent with the generated # headings.

Suggested change
- Deep Links & Universal Links
- Deeplinks (Universal Links)

Copilot uses AI. Check for mistakes.
AvdLee added 2 commits March 2, 2026 10:54
…tion wording

Address Copilot review feedback:
- Align TOC entries with actual page titles: "Setting up" (lowercase),
  "Statusbar Appearance" (one word), "Deeplinks (Universal Links)"
- Fix RELATED_LINKS key for "Setting up RocketSim Connect" so
  cross-references actually match
- Exclude Testimonials from TOC in small variant since the page is
  stripped
- Soften distribution claim in llms-ctx.txt to match FAQ wording
Comment on lines +40 to +103
const TABLE_OF_CONTENTS = `## Table of Contents

### Getting Started
- Onboarding
- Product Tour & Quick Demos
- Configuring App Actions
- Setting up RocketSim Connect
- How Large Teams Use RocketSim
- Additional Resources
- Testimonials

### Screenshots & Recordings
- Taking Screenshots
- Creating Recordings
- Floating Thumbnail
- App Store Connect Optimization
- Touch Indicators
- 120 FPS Recordings

### Simulator Camera
- Simulator Camera Support

### Status Bar
- Statusbar Appearance

### Design Comparison
- Comparing Designs
- Grids & Rulers
- Magnifier
- Slow Animations

### App Actions
- App Directory Access
- Deeplinks (Universal Links)
- Location Simulation
- Privacy & Permissions
- Push Notifications
- Quick Actions

### Networking
- Network Speed Control & Simulator Airplane Mode
- Network Traffic Monitoring
- Networking Insights

### Build Insights
- Build Insights
- Team Build Insights

### Accessibility
- Environment Overrides
- Toggles & Dynamic Text
- VoiceOver Navigator

### Other Features
- User Defaults Editor

### Settings
- Shortcuts
- Side Window

### Support
- FAQ
- Reporting An Issue
- Requesting A Feature`;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Issue:

This will be hard to maintain. We'd have to update this table of contents every time we change something in the docs (add/remove pages, change order of pages, etc). If we want this here, I think we should automate it.

Comment on lines +105 to +163
const RELATED_LINKS: Record<string, string[]> = {
"Taking Screenshots": [
"[Creating Recordings](/docs/features/capturing/recordings)",
"[App Store Connect Optimization](/docs/features/capturing/app-store-connect-optimization)",
"[Floating Thumbnail](/docs/features/capturing/floating-thumbnail)",
],
"Creating Recordings": [
"[Taking Screenshots](/docs/features/capturing/screenshots)",
"[Touch Indicators](/docs/features/capturing/touch-indicators)",
"[120 FPS Recordings](/docs/features/capturing/120-fps-recordings)",
],
"Network Traffic Monitoring": [
"[Setting Up RocketSim Connect](/docs/getting-started/setting-up-rocketsim-connect)",
"[Networking Insights](/docs/features/networking/networking-insights)",
"[Network Speed Control](/docs/features/networking/network-speed-control)",
],
"Networking Insights": [
"[Network Traffic Monitoring](/docs/features/networking/network-traffic-monitoring)",
"[Setting Up RocketSim Connect](/docs/getting-started/setting-up-rocketsim-connect)",
],
"Network Speed Control & Simulator Airplane Mode": [
"[Network Traffic Monitoring](/docs/features/networking/network-traffic-monitoring)",
"[Networking Insights](/docs/features/networking/networking-insights)",
],
"Push Notifications": [
"[Configuring App Actions](/docs/getting-started/configuring-app-actions)",
"[Deep Links & Universal Links](/docs/features/app-actions/deeplinks-universal-links)",
],
"Deeplinks (Universal Links)": [
"[Configuring App Actions](/docs/getting-started/configuring-app-actions)",
"[Push Notifications](/docs/features/app-actions/push-notifications)",
],
"Build Insights": [
"[Team Build Insights](/docs/features/build-insights/team-build-insights)",
],
"Team Build Insights": [
"[Build Insights](/docs/features/build-insights/build-insights)",
"[How Large Teams Use RocketSim](/docs/getting-started/how-large-teams-use-rocketsim)",
],
"Comparing Designs": [
"[Grids & Rulers](/docs/features/design-comparison/grids-and-rulers)",
"[Magnifier](/docs/features/design-comparison/magnifier)",
],
"Environment Overrides": [
"[Toggles & Dynamic Text](/docs/features/accessibility/toggles-and-dynamic-text)",
"[VoiceOver Navigator](/docs/features/accessibility/voiceover-navigator)",
],
"VoiceOver Navigator": [
"[Environment Overrides](/docs/features/accessibility/environment-overrides)",
"[Toggles & Dynamic Text](/docs/features/accessibility/toggles-and-dynamic-text)",
],
"Simulator Camera Support": [
"[Setting Up RocketSim Connect](/docs/getting-started/setting-up-rocketsim-connect)",
],
"Setting up RocketSim Connect": [
"[Network Traffic Monitoring](/docs/features/networking/network-traffic-monitoring)",
"[Simulator Camera Support](/docs/features/capturing/simulator-camera-support)",
],
};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Issue:

Same here. This will be hard to maintain. If we change links, add/remove pages, etc this section is outdated. We should automate this if we want this.

AvdLee added 2 commits March 4, 2026 14:30
Resolve conflict in llms-txt-post-process.ts by keeping the extracted
enhanceLlmsTxtIndex() function (superset of master's inline version,
includes llms-ctx.txt reference).
Address PR review feedback from ngnijland:
- Replace hard-coded TABLE_OF_CONTENTS with dynamic generation that
  scans content files and groups them using the sidebar configuration
- Replace hard-coded RELATED_LINKS with automatic generation based on
  sidebar grouping (pages in the same group link to siblings)
- Extract sidebar group definitions into shared config used by both
  astro.config.ts and the post-processing integration
- Derive base URL from config.json instead of hard-coding it (Copilot
  review feedback)
@AvdLee AvdLee requested a review from ngnijland March 4, 2026 13:59
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.

3 participants