Skip to content

Add docs manifest fetch#70

Closed
Joshalphonse wants to merge 3 commits into
mainfrom
feature/docs-source
Closed

Add docs manifest fetch#70
Joshalphonse wants to merge 3 commits into
mainfrom
feature/docs-source

Conversation

@Joshalphonse

@Joshalphonse Joshalphonse commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Added the ability to fetch a Docs manifest from the mux.com repo. This way agents can access docs without pulling the entire mux.com repo or any files other than an index.json with all of the docs content.


Note

Medium Risk
Adds a new docs subsystem that fetches and caches documentation indexes from docs.mux.com (network + local cache), introducing new I/O paths and CLI surface area that could affect reliability and error handling.

Overview
Adds a new mux docs command group (search, read, update, source) and wires it into the root CLI.

Docs can now be indexed from a local mux.com checkout or pulled as published manifest.json/index.json artifacts from docs.mux.com and cached under the XDG cache dir, enabling search/read without cloning the full repo. Includes new search/query normalization logic, JSON-friendly outputs for agents, and comprehensive Bun tests for indexing, caching, and command wiring.

Package publishing is updated to include a new skills/mux-cli skill definition in npm artifacts.

Reviewed by Cursor Bugbot for commit bc0d437. Bugbot is set up for automated code reviews on this repo. Configure here.

@Joshalphonse
Joshalphonse requested a review from dylanjha May 19, 2026 23:35
Comment thread src/lib/docs.ts
Comment thread src/lib/docs.ts Outdated
Comment thread src/lib/docs.ts Outdated
Comment thread src/commands/docs/read.ts
)
.option('--manifest-url <url:string>', 'URL for the published docs manifest')
.option('--index-url <url:string>', 'URL for the published docs index')
.option('--force', 'Refresh cached docs artifacts')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

--force option is declared but never used

Medium Severity

The --force option is defined and documented as "Refresh cached docs artifacts," but options.force is never read in the action handler or in either updateFromLocalSource or updateFromPublishedArtifacts. The update always runs unconditionally, making the flag completely inert. Users passing --force get no different behavior than without it.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5cf9a25. Configure here.

Comment thread src/lib/docs.ts
return { frontmatter: {}, body: content };
}

const end = content.indexOf('\n---', 4);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Frontmatter parser inconsistently handles CRLF line endings

Low Severity

parseFrontmatter checks for '---\n' (LF only) on line 473 and uses '\n---' on line 477, so it silently fails to extract metadata from files with CRLF line endings. In contrast, stripFrontmatterBlock on line 689 correctly handles both via \r?\n. This means files with CRLF endings would get wrong titles (falling back to titleFromId) and missing descriptions during indexing, while formatDocContent would still correctly strip the frontmatter block.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5cf9a25. Configure here.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bc0d437. Configure here.

Comment thread src/commands/docs/read.ts
}

process.exit(1);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Identical error handler duplicated across command files

Low Severity

printDocsError is defined identically in read.ts and search.ts, and the same error-handling pattern is also inlined in source.ts and update.ts. All four implementations format and print errors the same way based on a json option. This duplicated logic risks inconsistent future fixes and could be a single shared utility.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bc0d437. Configure here.

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