> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# LPD CLI

> Accurate contributor guide and command reference for the repository lpd CLI.

> [!TIP]
>
> `lpd` is the repository CLI for setup, local docs development, governed page moves, testing, hooks, and managed script execution.

> [!NOTE]
>
> Use `bash lpd ...` until you have run `bash lpd setup --yes` and confirmed `lpd` is on your PATH. After that, plain `lpd ...` is the normal form.

> [!NOTE]
>
> `lpd dev` defaults to port `3333` when no port is provided. Agent sessions may not use port `3333` via `lpd dev`, and direct Mint launcher sessions may not use port `3000`.

## What `lpd` does

`lpd` standardizes the main contributor workflows for this repo:

* bootstrap local dependencies
* sync the repo planning skill into the local Codex skills directory
* verify your environment
* run Mint locally
* launch scoped docs previews for large navs
* load alternate docs config files through scoped dev or the custom loader alias
* run tests and CI-like checks
* manage hooks
* move pages with governed docs-path sync
* discover and run repo-managed scripts

## Most common workflows

### Start local docs

```bash icon="terminal" theme={null}
bash lpd setup --yes
lpd dev -- --port 3333
```

`bash lpd setup --yes` installs tools/tests dependencies, refreshes hooks, optionally installs `lpd` on PATH, and syncs `agentic-project-management-orchestrator` into `$CODEX_HOME/skills` (fallback: `~/.codex/skills`).

### Start a scoped Mint session

```bash icon="terminal" theme={null}
bash lpd dev --scoped --scope-version v2 --scope-language en --scope-prefix v2/orchestrators
```

### Load an alternate docs config

```bash icon="terminal" theme={null}
bash lpd dev --scoped --docs-config docs-orch-work.json
bash lpd dev --scoped --docs-config docs-gate-work.json
```

### Use the custom Mint loader helper

```bash icon="terminal" theme={null}
bash tools/dev/preview/mint-custom-loader.sh docs-orch-work.json
```

### Run pre-PR checks

```bash icon="terminal" theme={null}
lpd doctor --strict
lpd test --staged
lpd ci --skip-browser
```

### Move a page with governed rewrites

```bash icon="terminal" theme={null}
bash lpd move-page v2/orchestrators/setup/old.mdx v2/orchestrators/get-started/new.mdx --check
```

## Command quick index

## Command guide

> [accordion] Getting Started
>
> **bash lpd setup** `command`
>
> Bootstrap the local repo environment.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> bash lpd setup [--yes] [--no-tools] [--no-tests] [--no-hooks] [--with-mintlify] [--no-cli] [--no-codex-skills] [--json]
> ```
>
> **What it does**
>
> * installs `tools` dependencies
> * installs `tests` dependencies
> * installs or refreshes git hooks
> * optionally installs Mintlify globally
> * optionally installs `lpd` on your PATH
> * syncs `agentic-project-management-orchestrator` into `$CODEX_HOME/skills` (fallback: `~/.codex/skills`)
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> bash lpd setup --yes
> bash lpd setup --no-tests --no-cli
> bash lpd setup --yes --no-codex-skills
> bash lpd setup --with-mintlify
> ```
>
> **Flags**
>
> **--yes** `boolean` (default: false)
>
> Run setup non-interactively with default choices.
>
> **--no-tools** `boolean` (default: false)
>
> Skip `cd tools && npm install`.
>
> **--no-tests** `boolean` (default: false)
>
> Skip `cd operations/tests && npm install`.
>
> **--no-hooks** `boolean` (default: false)
>
> Skip `.githooks/install.sh`.
>
> **--with-mintlify** `boolean` (default: false)
>
> Run `npm i -g mintlify`.
>
> **--no-cli** `boolean` (default: false)
>
> Skip PATH installation for `lpd`.
>
> **--no-codex-skills** `boolean` (default: false)
>
> Skip syncing `agentic-project-management-orchestrator` into the local Codex skills directory.
>
> **--json** `boolean` (default: false)
>
> Emit the standard JSON status envelope.
>
> **lpd doctor** `command`
>
> Check whether your repo and local environment are ready.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd doctor [--strict] [--json]
> ```
>
> **Checks**
>
> * git repository context
> * Node availability
> * Mint availability
> * `tools/node_modules`
> * `operations/tests/node_modules`
> * hook sync state
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd doctor
> lpd doctor --strict
> lpd --json doctor
> ```
>
> **Flags**
>
> **--strict** `boolean` (default: false)
>
> Fail with a non-zero exit code if any issue is found.
>
> **--json** `boolean` (default: false)
>
> Emit the standard JSON status envelope.
>
> **lpd help | lpd info | lpd version** `command`
>
> Use these as the fast discovery commands.
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd help
> lpd info
> lpd version
> lpd --json version
> ```

> [accordion] Local Dev And Scoped Docs
>
> **lpd dev** `command`
>
> Run the local docs dev launcher.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd dev [--test] [--test-mode fast|staged|full] [--script [path]] [--dry-run] [--scoped] [--docs-config [path]] [--scope-interactive] [--scope-list] [--scope-file [path]] [--scope-version [csv]] [--scope-language [csv]] [--scope-tab [csv]] [--scope-prefix [csv]] [--skip-external-fetch] [--disable-openapi] [-- ...mint args]
> ```
>
> **What `--scoped` does**
> Generates a reduced dev-only Mint profile so large docs nav trees start faster and route changes are lighter when you are filtering the main docs navigation. Scope inputs are validated before any setup work runs (hooks, patches, fetches) so bad tab names fail immediately.
>
> **Tab name matching**
> Tab names are case-insensitive and support fuzzy matching. You do not need to quote multi-word tab names. The matcher resolves partial names using prefix, substring, and stem matching:
>
> * `Resources` resolves to `Resource HUB`
> * `Orch` resolves to `Orchestrators`
> * `LP` resolves to `LP Token`
> * `Internal` resolves to `Internal Hub`
>
> If a partial name matches more than one tab, the command fails with a list of ambiguous matches.
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd dev
> lpd dev -- --port 3333
> lpd dev --test --test-mode staged
> lpd dev --scoped --scope-version v2 --scope-language en --scope-tab Developers
> lpd dev --scoped --scope-tab Resources
> lpd dev --scoped --scope-tab About, Solutions
> lpd dev --scoped --scope-tab About --scope-tab Solutions
> lpd dev --scoped --scope-prefix v2/orchestrators
> lpd dev --scoped --scope-interactive
> lpd dev --scoped --scope-list
> lpd dev --dry-run --scoped --scope-prefix v2/orchestrators
> ```
>
> **Recommended use**
> Use `lpd dev --scoped` for filtered previews of the main docs navigation and for alternate scoped navigation files such as `docs-orch-work.json` or `docs-gate-work.json`.
>
> **Advanced distinction**
>
> **--docs-config \[path]** `string`
>
> Use an alternate docs config as the scoped navigation source. Scoped dev keeps Mint on a projected workspace and rewrites the active workspace-root `docs.json` when this source file changes.
>
> **--scope-file \[path]** `string`
>
> Load scoped selection settings from JSON. This is for filters such as `versions`, `languages`, `tabs`, `prefixes`, and optional `disableOpenapi`.
>
> **Flags**
>
> **--test** `boolean` (default: false)
>
> Run advisory tests before starting the dev server.
>
> **--test-mode fast|staged|full** `enum` (default: fast)
>
> Choose which advisory test mode to run with `--test`.
>
> **--script \[path]** `string` (default: tools/dev/preview/mint-dev.sh)
>
> Override the launcher script path.
>
> **--dry-run** `boolean` (default: false)
>
> Print the resolved launcher command and scoped settings, then exit.
>
> **--scoped** `boolean` (default: false)
>
> Enable scoped Mint profile generation.
>
> **--scope-interactive** `boolean` (default: false)
>
> Prompt for scoped filters interactively.
>
> **--scope-list** `boolean` (default: false)
>
> Print available versions, languages, and tab names from `docs.json`, then exit. Use this to discover valid scope values before running a scoped session.
>
> **--scope-version \[csv]** `string` (default: all)
>
> Limit included versions.
>
> **--scope-language \[csv]** `string` (default: all)
>
> Limit included languages.
>
> **--scope-tab \[csv]** `string` (default: all)
>
> Limit included tabs. Supports fuzzy matching: partial names, prefix matches, and stem matches resolve automatically. Multi-word tab names do not require quotes. Multiple tabs can be comma-separated or passed as repeated flags.
>
> **--scope-prefix \[csv]** `string` (default: all)
>
> Limit included routes by prefix such as `v2/orchestrators`.
>
> **--skip-external-fetch** `boolean` (default: false)
>
> Set `MINT_SKIP_EXTERNAL_FETCH=1` for this run.
>
> **--disable-openapi** `boolean` (default: false)
>
> Exclude OpenAPI routes from the scoped profile.
>
> **--** `separator`
>
> Pass the remaining arguments to the Mint launcher.
>
> **lpd mint dev** `command`
>
> Compatibility alias to `lpd dev`.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd mint dev [--scoped] [--scope-...] [-- ...mint args]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd mint dev
> lpd mint dev -- --port 3333
> lpd mint dev --scoped --scope-prefix v2/orchestrators
> ```
>
> **mint-custom-loader helper** `command`
>
> Thin alias for `lpd dev --scoped --docs-config`.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> bash tools/dev/preview/mint-custom-loader.sh <custom-docs-json> [-- ...mint args]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> bash tools/dev/preview/mint-custom-loader.sh docs-orch-work.json
> bash tools/dev/preview/mint-custom-loader.sh docs-gate-work.json -- --port 3333
> ```
>
> **Use this when**
>
> * you want a shorter alias for `lpd dev --scoped --docs-config ...`
> * you want alternate navigation from `docs-gate-work.json`
> * you want a custom docs config, not just a filtered view of the main docs nav

> [accordion] Validation And CI
>
> **lpd test** `command`
>
> Run the main test suite with optional integration checks.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd test [--staged|--full] [--browser] [--domain v1|v2|both] [--wcag] [--wcag-no-fix] [--link-audit-external] [--base-url URL] [--json]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd test --staged
> lpd test --staged --wcag
> lpd test --full --link-audit-external
> lpd test --browser
> lpd test --domain both --base-url http://localhost:3000
> ```
>
> **lpd ci** `command`
>
> Run the local CI-like validation flow.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd ci [--skip-browser] [--base-url URL] [--json]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd ci
> lpd ci --skip-browser
> lpd ci --base-url http://localhost:3000
> ```
>
> **lpd ai-sitemap** `command`
>
> Generate or validate `sitemap-ai.xml`.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd ai-sitemap [--write|--check] [--json]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd ai-sitemap --check
> lpd ai-sitemap --write
> lpd --json ai-sitemap --check
> ```

> [accordion] Page Operations
>
> **lpd move-page** `command`
>
> Move a docs page with governed rewrites.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> bash lpd move-page <old> <new> [--yes] [--check] [--no-stage] [--json]
> ```
>
> **What it does**
>
> * runs `git mv`
> * runs governed docs-path sync
> * stages related rewrites unless you opt out
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> bash lpd move-page v2/orchestrators/setup/old.mdx v2/orchestrators/get-started/new.mdx --check
> bash lpd move-page v2/orchestrators/setup/old.mdx v2/orchestrators/get-started/new.mdx --yes
> ```
>
> **Flags**
>
> **--yes** `boolean` (default: false)
>
> Auto-confirm the move.
>
> **--check** `boolean` (default: false)
>
> Dry-run the move path sync flow.
>
> **--no-stage** `boolean` (default: false)
>
> Do not stage rewritten files after the move.
>
> **--json** `boolean` (default: false)
>
> Emit the standard JSON status envelope.

> [accordion] Hooks And Script Runner
>
> **lpd hooks** `command`
>
> Manage hooks or run `.githooks` scripts.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd hooks <install|status|verify|info|<hook-script tokens...>> [-- script args]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd hooks install
> lpd hooks status
> lpd hooks verify
> lpd hooks info
> lpd hooks verify-browser --dry-run
> ```
>
> **Built-in subcommands**
>
> **install** `subcommand`
>
> Install or update `.git/hooks/pre-commit` from `.githooks/pre-commit`.
>
> **status** `subcommand`
>
> Check whether the installed hook exists, is executable, and matches source.
>
> **verify** `subcommand`
>
> Run `.githooks/verify.sh`.
>
> **info** `subcommand`
>
> Print hook scripts, bypass flags, and human-only override trailers.
>
> **\<hook-script tokens...>** `subcommand`
>
> Fallback resolution into managed scripts under `.githooks/`.
>
> **lpd scripts list** `command`
>
> List managed scripts across `tools`, `tasks`, `tests`, `v2`, and `hooks`.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd scripts list [--group tools|tasks|tests|v2|hooks] [--show-ignored] [--json]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd scripts list
> lpd scripts list --group tools
> lpd scripts list --group hooks --show-ignored
> lpd --json scripts list --group tests
> ```
>
> **lpd scripts run** `command`
>
> Resolve and run a managed script.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd scripts run <group> <script-path tokens...> [--dry-run] [--yes] [--json] [-- script args]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd scripts run tools dev authoring add-callouts -- --help
> lpd scripts run tasks run-audit --dry-run
> lpd scripts run tasks run-audit --yes
> ```
>
> **Inputs**
>
> **GROUP** `enum` *required*
>
> One of `tools`, `tasks`, `tests`, `v2`, or `hooks`.
>
> **\<script-path tokens...>** `string` *required*
>
> Space-delimited command path that resolves to a discovered script.
>
> **Flags**
>
> **--dry-run** `boolean` (default: false)
>
> Prints the resolved executable command and exits.
>
> **--yes** `boolean` (default: false)
>
> Auto-confirms high-risk script groups.
>
> **--json** `boolean` (default: false)
>
> Enables JSON status envelope output.
>
> **--** `separator`
>
> Passes remaining args to the resolved script target.
> Example: `lpd scripts run tools dev authoring add-callouts -- --help`
>
> **lpd \<tools|tasks|tests|v2>** `command`
>
> Group shorthand alias for `lpd scripts run <group> ...`.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> lpd tools <script-path tokens...> [-- script args]
> lpd tasks <script-path tokens...> [-- script args]
> lpd tests <script-path tokens...> [-- script args]
> lpd v2 <script-path tokens...> [-- script args]
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd tools dev authoring add-callouts -- --help
> lpd tests unit lpd-scoped-mint-dev.test -- --help
> lpd v2 wcag-repair-common -- --staged --stage
> ```
>
> **Script risk model** `command`
>
> Scripts are assigned risk by group and may require confirmation.
>
> **Usage**
>
> ```bash icon="terminal" theme={null}
> low: tests
> medium: tools, hooks
> high: tasks, v2
> ```
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd scripts run tasks run-audit
> lpd scripts run tasks run-audit --yes
> ```
>
> High-risk groups prompt for confirmation unless `--yes` is supplied.
> In non-interactive mode, high-risk commands fail without `--yes`.
>
> > [!NOTE]
> >
> > Human-only override trailers:
> > `git commit -m "msg" --trailer "allowlist-edit=true"` and
> > `git commit -m "msg" --trailer "allow-deletions=true"`.

> [accordion] Troubleshooting And JSON Output
>
> **`lpd` not found** `troubleshooting`
>
> Run:
>
> ```bash icon="terminal" theme={null}
> bash lpd setup --yes
> ```
>
> Then open a new shell or source your shell rc file. Until PATH is updated, use `bash lpd ...`.
>
> **Hook mismatch** `troubleshooting`
>
> Run:
>
> ```bash icon="terminal" theme={null}
> lpd hooks status
> lpd hooks install
> lpd hooks verify
> ```
>
> **Slow Mint startup on large navs** `troubleshooting`
>
> Prefer scoped mode:
>
> ```bash icon="terminal" theme={null}
> lpd dev --scoped --scope-prefix v2/orchestrators
> ```
>
> For alternate docs configs, use the helper:
>
> ```bash icon="terminal" theme={null}
> bash tools/dev/preview/mint-custom-loader.sh docs-orch-work.json
> bash tools/dev/preview/mint-custom-loader.sh docs-gate-work.json
> ```
>
> **JSON output** `response`
>
> Many commands support the standard finish-envelope JSON output.
>
> **Examples**
>
> ```bash icon="terminal" theme={null}
> lpd --json version
> lpd doctor --json
> lpd ci --json
> lpd scripts list --group tools --json
> ```
>
> The envelope typically includes:
>
> * command label
> * status
> * message
> * command-specific payload where supported

## Script Catalog

> [!NOTE]
>
> For generated full script metadata (script path, summary, usage, domain), see [`scripts-catalog`](../catalog/scripts-catalog.mdx).

> [tab] Tools
>
> #### Tools Scripts: `tools`
>
> > [!NOTE]
> >
> > Resolved paths in this table reflect the pre-2026-03-21 layout. Scripts have since moved to `operations/scripts/<type>/<concern>/<niche>/`. Run `lpd scripts list --group tools` to see current resolved paths.
>
> | Script token | Flags available | Resolved path (pre-restructure) | PURPOSE |
> | - | - | - | - |
> | `audit-all-pages-simple` | script-specific via `-- <args>` | `operations/scripts/archive/legacy/audit-all-pages-simple.js` | Legacy archived audit helper retained for historical reference. |
> | `audit-all-pages` | script-specific via `-- <args>` | `operations/scripts/archive/legacy/audit-all-pages.js` | Legacy archived audit helper retained for historical reference. |
> | `audit-all-v2-pages` | script-specific via `-- <args>` | `operations/scripts/archive/legacy/audit-all-v2-pages.js` | Utility script for operations/scripts/archive/legacy/audit-all-v2-pages.js. |
> | `audit-scripts` | script-specific via `-- <args>` | `operations/scripts/audits/governance/scripts/audit-script-categories.js` | Audit full-repo executable scripts, categorize usage/overlap, and overwrite SCRIPT\_AUDIT reports. |
> | `audit-tasks-folders` | script-specific via `-- <args>` | `operations/scripts/audits/governance/repo/audit-tasks-folders.js` | Audit tasks folders, optionally normalise report locations, and optionally apply audit recommendations with conflict-safe moves. |
> | `audit-v2-usefulness` | script-specific via `-- <args>` | `operations/scripts/audits/content/quality/audit-v2-usefulness.js` | Audit v2 MDX pages (excluding x-\* directories) and emit page-level usefulness matrix rows with source-weighted 2026 accuracy verification fields. |
> | `convert-rss-to-mdx` | script-specific via `-- <args>` | `operations/scripts/automations/content/data/transforms/convert-rss-to-mdx.js` | Runs `operations/scripts/automations/content/data/transforms/convert-rss-to-mdx.js`. |
> | `dev preview debug-mint-dev` | script-specific via `-- <args>` | `tools/dev/preview/debug-mint-dev.js` | Utility script for tools/dev/preview/debug-mint-dev.js. |
> | `deprecated project-management-output-script` | script-specific via `-- <args>` | `operations/scripts/deprecated/project-management-output-script.js` | Deprecated legacy project-management output script retained as a reference stub. |
> | `dev authoring add-callouts` | script-specific via `-- <args>` | `tools/dev/authoring/add-callouts.js` | Utility script for tools/dev/authoring/add-callouts.js. |
> | `dev batch-update-og-image` | script-specific via `-- <args>` | `tools/dev/batch-update-og-image.sh` | Utility script for tools/dev/batch-update-og-image.sh. |
> | `dev preview ensure-mint-watcher-patch` | script-specific via `-- <args>` | `tools/dev/preview/ensure-mint-watcher-patch.sh` | Ensure Mint local-preview watcher disables glob expansion in repo paths. |
> | `dev replace-og-image` | script-specific via `-- <args>` | `tools/dev/replace-og-image.py` | Utility script for tools/dev/replace-og-image.py. |
> | `generate-ai-sitemap` | script-specific via `-- <args>` | `operations/scripts/generators/content/seo/generate-ai-sitemap.js` | Generate an AI-focused sitemap from v2 docs navigation. |
> | `generate-docs-guide-indexes` | script-specific via `-- <args>` | `operations/scripts/generators/governance/catalogs/generate-docs-guide-indexes.js` | Generate docs-guide workflow/template indexes and optionally verify they are up to date. |
> | `generate-docs-guide-pages-index` | script-specific via `-- <args>` | `operations/scripts/generators/governance/catalogs/generate-docs-guide-pages-index.js` | Generate docs-guide/catalog/pages-catalog.mdx from v2/index.mdx entries filtered to docs.json navigation pages. |
> | `generate-docs-index` | script-specific via `-- <args>` | `operations/scripts/generators/content/catalogs/generate-docs-index.js` | Generate docs-index.json and optionally backfill v2 frontmatter metadata. |
> | `generate-llms-files` | script-specific via `-- <args>` | `operations/scripts/generators/ai/llm/generate-llms-files.js` | Generate llms.txt from v2 docs navigation. |
> | `generate-pages-index` | script-specific via `-- <args>` | `operations/scripts/generators/content/catalogs/generate-pages-index.js` | Generate and verify section-style index.mdx files for v2 docs folders, plus the root aggregate index. |
> | `mint-dev` | script-specific via `-- <args>` | `operations/scripts/mint-dev.sh` | Utility script for operations/scripts/mint-dev.sh. |
> | `new-script` | script-specific via `-- <args>` | `operations/scripts/generators/governance/scaffold/new-script.js` | Create a new script file prefilled with the required docs header template. |
> | `publish-v2-internal-reports` | script-specific via `-- <args>` | `operations/scripts/automations/governance/pipelines/publish-v2-internal-reports.js` | Duplicate approved markdown reports into v2/internal/reports pages with metadata and update docs.json. |
> | `snippets fetch-external-docs` | script-specific via `-- <args>` | `operations/scripts/automations/content/data/fetching/fetch-external-docs.sh` | Utility script for operations/scripts/automations/content/data/fetching/fetch-external-docs.sh. |
> | `snippets fetch-lpt-exchanges` | script-specific via `-- <args>` | `operations/scripts/snippets/fetch-lpt-exchanges.sh` | Utility script for operations/scripts/snippets/fetch-lpt-exchanges.sh. |
> | `snippets fetch-openapi-specs` | script-specific via `-- <args>` | `operations/scripts/snippets/fetch-openapi-specs.sh` | Utility script for operations/scripts/snippets/fetch-openapi-specs.sh. |
> | `snippets generate-api-docs` | script-specific via `-- <args>` | `operations/scripts/snippets/generate-api-docs.sh` | Utility script for operations/scripts/snippets/generate-api-docs.sh. |
> | `snippets generate-data scripts generate-glossary` | script-specific via `-- <args>` | `operations/scripts/snippets/generate-data/scripts/generate-glossary.js` | Utility script for operations/scripts/snippets/generate-data/scripts/generate-glossary.js. |
> | `snippets generate-data scripts terminology-search` | script-specific via `-- <args>` | `operations/scripts/snippets/generate-data/scripts/terminology-search.js` | Utility script for operations/scripts/snippets/generate-data/scripts/terminology-search.js. |
> | `snippets generate-seo` | script-specific via `-- <args>` | `operations/scripts/snippets/generate-seo.js` | Utility script for operations/scripts/snippets/generate-seo.js. |
> | `snippets test-scripts` | script-specific via `-- <args>` | `operations/scripts/snippets/test-scripts.sh` | Utility script for operations/scripts/snippets/test-scripts.sh. |
> | `generate-component-docs` | `--dry-run`, `--fix`, `--check`, `--template-only`, `--category <name>` | `operations/scripts/generators/components/documentation/generate-component-docs.js` | Generates the published component-library pages and localized scaffolds from governed component metadata. |
> | `test-all-pages-browser` | script-specific via `-- <args>` | `operations/scripts/archive/legacy/test-all-pages-browser.js` | Utility script for operations/scripts/archive/legacy/test-all-pages-browser.js. |
> | `test-all-pages-comprehensive` | script-specific via `-- <args>` | `operations/scripts/archive/legacy/test-all-pages-comprehensive.js` | Utility script for operations/scripts/archive/legacy/test-all-pages-comprehensive.js. |
> | `test-v2-pages` | script-specific via `-- <args>` | `operations/scripts/validators/content/structure/test-v2-pages.js` | Utility script for operations/scripts/validators/content/structure/test-v2-pages.js. |
> | `test-youtube-pages` | script-specific via `-- <args>` | `operations/scripts/archive/legacy/test-youtube-pages.js` | Utility script for operations/scripts/archive/legacy/test-youtube-pages.js. |
> | `test test-youtube-pages` | script-specific via `-- <args>` | `operations/scripts/test/test-youtube-pages.js` | Utility script for operations/scripts/test/test-youtube-pages.js. |
> | `verify .verify-large-change` | script-specific via `-- <args>` | `operations/scripts/verify/.verify-large-change.sh` | Reserved verifier hook placeholder for large-change checks. |
> | `wcag-repair-common` | script-specific via `-- <args>` | `operations/scripts/remediators/content/style/wcag-repair-common.js` | Apply conservative WCAG-related source autofixes across v2 docs (common raw-tag issues) and write deterministic repair reports. |

> [tab] Tasks
>
> #### Tasks Alias: `tasks`
>
> `tasks` is a legacy alias for `workspace` in `lpd scripts list`.
> There are no active `tasks/scripts/` paths in the repository anymore.
> Use `lpd scripts list --group workspace` for current AI working-directory scripts.

> [tab] Tests
>
> #### Test Scripts: `tests` (24)
>
> | Script token | Flags available | Resolved path | PURPOSE |
> | - | - | - | - |
> | `integration browser.test` | script-specific via `-- <args>` | `operations/tests/integration/browser.test.js` | Utility script for operations/tests/integration/browser.test.js. |
> | `integration domain-pages-audit` | script-specific via `-- <args>` | `operations/tests/integration/domain-pages-audit.js` | Audit deployed docs page load status and emit a stable JSON report. |
> | `integration v2-link-audit` | script-specific via `-- <args>` | `operations/tests/integration/v2-link-audit.js` | Compatibility wrapper for the canonical `page-links-audit.js` operations audit. |
> | `integration v2-link-audit.selftest` | script-specific via `-- <args>` | `operations/tests/integration/v2-link-audit.selftest.js` | Script-level self-tests for v2 link audit external validation using a local HTTP fixture and temporary MDX file. |
> | `integration v2-wcag-audit` | script-specific via `-- <args>` | `operations/tests/integration/v2-wcag-audit.js` | Audit v2 docs.json navigation pages for accessibility (WCAG 2.2 AA) with deterministic reports and conservative source autofixes. |
> | `integration v2-wcag-audit.selftest` | script-specific via `-- <args>` | `operations/tests/integration/v2-wcag-audit.selftest.js` | Script-level self-tests for the v2 WCAG audit (local HTTP + Puppeteer axe run, and temp-file fix/stage behaviour without Mintlify). |
> | `run-all` | script-specific via `-- <args>` | `operations/tests/run-all.js` | Utility script for operations/tests/run-all.js. |
> | `run-pr-checks` | script-specific via `-- <args>` | `operations/tests/run-pr-checks.js` | Run changed-file scoped validation checks for pull request CI. |
> | `unit docs-guide-sot.test` | script-specific via `-- <args>` | `operations/tests/unit/docs-guide-sot.test.js` | Validate docs-guide source-of-truth coverage, README pointers, and generated index freshness. |
> | `unit docs-navigation.test` | script-specific via `-- <args>` | `operations/tests/unit/docs-navigation.test.js` | Validate docs.json page-entry syntax, report missing routes, suggest remaps, and optionally apply approved remaps (`--write-report` to refresh navigation-report artifacts). |
> | `unit docs-usefulness-accuracy-verifier.test` | script-specific via `-- <args>` | `operations/tests/unit/docs-usefulness-accuracy-verifier.test.js` | Validate source-weighted 2026 accuracy verification rules (GitHub vs DeepWiki precedence, freshness, fallback, and cache reuse). |
> | `unit imports.test` | script-specific via `-- <args>` | `operations/tests/unit/imports.test.js` | Compatibility wrapper for the canonical `page-imports-audit.js` operations audit. |
> | `unit links.test` | script-specific via `-- <args>` | `operations/tests/unit/links.test.js` | Primary link validator — validates internal markdown/MDX links only, with repo-wide dry-run support. |
> | `unit mdx-guards.test` | script-specific via `-- <args>` | `operations/tests/unit/mdx-guards.test.js` | Enforce MDX guardrails for globals imports, math delimiters, and markdown table line breaks. |
> | `unit mdx.test` | script-specific via `-- <args>` | `operations/tests/unit/mdx.test.js` | Utility script for operations/tests/unit/mdx.test.js. |
> | `unit quality.test` | script-specific via `-- <args>` | `operations/tests/unit/quality.test.js` | Utility script for operations/tests/unit/quality.test.js. |
> | `unit script-docs.test` | script-specific via `-- <args>` | `operations/tests/unit/script-docs.test.js` | Enforce script header schema, keep group script indexes in sync, and build aggregate script index. |
> | `unit spelling.test` | script-specific via `-- <args>` | `operations/tests/unit/spelling.test.js` | Utility script for operations/tests/unit/spelling.test.js. |
> | `unit style-guide.test` | script-specific via `-- <args>` | `operations/tests/unit/style-guide.test.js` | Utility script for operations/tests/unit/style-guide.test.js. |
> | `unit v2-link-audit.test` | script-specific via `-- <args>` | `operations/tests/unit/v2-link-audit.test.js` | Unit tests for the legacy v2-link-audit compatibility wrapper and canonical page-links-audit args/helpers. |
> | `unit v2-wcag-audit.test` | script-specific via `-- <args>` | `operations/tests/unit/v2-wcag-audit.test.js` | Unit tests for v2 WCAG audit helper logic (args, thresholds, route mapping, report sorting, and conservative autofixes). |
> | `utils file-walker` | script-specific via `-- <args>` | `operations/tests/utils/file-walker.js` | Utility script for operations/tests/utils/file-walker.js. |
> | `utils mdx-parser` | script-specific via `-- <args>` | `operations/tests/utils/mdx-parser.js` | Utility script for operations/tests/utils/mdx-parser.js. |
> | `utils spell-checker` | script-specific via `-- <args>` | `operations/tests/utils/spell-checker.js` | Utility script for operations/tests/utils/spell-checker.js. |
>
> Canonical page health entrypoints now live under `operations/scripts`:
> `page-links-audit.js`, `page-imports-audit.js`, and `page-integrity-dispatch.js`.
> The legacy `integration v2-link-audit` token remains available as a compatibility wrapper.

> [tab] Other
>
> #### Other Scripts: `v2` (5)
>
> | Script token | Flags available | Resolved path | PURPOSE |
> | - | - | - | - |
> | `authoring add-callouts` | script-specific via `-- <args>` | `tools/dev/authoring/add-callouts.js` | Utility script for tools/dev/authoring/add-callouts.js. |
> | `batch-update-og-image` | script-specific via `-- <args>` | `tools/dev/batch-update-og-image.sh` | Utility script for tools/dev/batch-update-og-image.sh. |
> | `preview ensure-mint-watcher-patch` | script-specific via `-- <args>` | `tools/dev/preview/ensure-mint-watcher-patch.sh` | Ensure Mint local-preview watcher disables glob expansion in repo paths. |
> | `replace-og-image` | script-specific via `-- <args>` | `tools/dev/replace-og-image.py` | Utility script for tools/dev/replace-og-image.py. |

## Troubleshooting

### `lpd` not found

Use the repo-local fallback and verify setup:

```bash icon="terminal" theme={null}
bash lpd setup --yes
bash lpd version
```

If needed, reload your shell rc file (`source ~/.zshrc` or equivalent).

### Hooks mismatch

Check and reinstall hooks:

```bash icon="terminal" theme={null}
lpd hooks status
lpd hooks install
lpd hooks verify
```

### `--json` expectations

Global JSON mode is prefix form: `lpd --json <command> ...`.
Some commands also accept local `--json`.
`lpd info --json` is invalid because `info` only accepts `--help|-h`.

### Port collision on `lpd dev`

Pass a port through the launcher:

```bash icon="terminal" theme={null}
lpd dev -- --port 3334
```

### Slow startup or slow route changes on very large `docs.json`

Use scoped dev mode so Mint loads only the version, language, tab, or prefix you are actively editing:

```bash icon="terminal" theme={null}
lpd dev --scoped --scope-version v2 --scope-language en --scope-tab Developers
```

Interactive picker:

```bash icon="terminal" theme={null}
lpd dev --scoped --scope-interactive
```

## JSON Output

When JSON mode is active on finish-based commands, output uses this status envelope:

> [accordion] JSON Output Envelope
>
> **ok** `boolean`
>
> `true` for success and `false` for failure.
>
> **command** `string`
>
> Normalised command label (for example: `test`, `scripts list`, `hooks status`).
>
> **message** `string`
>
> Human-readable summary of the command result.
>
> **exit\_code** `number`
>
> Exit code returned by the command path.
>
> **repo\_root** `string`
>
> Absolute repo root used during command execution.
>
> Example:
>
> ```json icon="terminal" theme={null}
> {
>   "ok": true,
>   "command": "version",
>   "message": "lpd 0.2.0",
>   "exit_code": 0,
>   "repo_root": "/path/to/livepeer-docs-repo"
> }
> ```
>
> > [!NOTE]
> >
> > `lpd info` does not emit a structured JSON envelope.
> > Use JSON mode with commands that complete via `finish()`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.