Maintain the bundled TypeScript package docs that ship inside Phoenix npm packages. Use this skill whenever adding or updating docs for `@arizeai/phoenix-client`, `@arizeai/phoenix-evals`, or `@arizeai/phoenix-otel`, when changing the Mintlify package-doc pages, when keeping `node_modules/.../docs` content aligned with actual exports, or when modifying the sync and publish flow for packaged docs.
71
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Keep the curated TypeScript package docs aligned with the real npm package surface area and with the publish-time sync flow.
| Task | What to inspect | What to update |
|---|---|---|
| Fix a stale example | js/packages/<pkg>/src/ exports and function signatures | Canonical MDX under docs/phoenix/sdk-api-reference/typescript/packages/<pkg>/ |
| Add or remove a page | Existing package-doc folder and docs.json nav | Canonical MDX, docs.json, and any landing-page links |
| Add a new package to the bundled-docs system | js/scripts/sync-package-docs.mjs and package package.json | Sync map, package files, package prepack, and Mintlify nav |
| Verify publish output | node js/scripts/sync-package-docs.mjs and npm pack --dry-run | Generated js/packages/<pkg>/docs/ contents and tarball entries |
The canonical authored docs live in Mintlify pages:
docs/phoenix/sdk-api-reference/typescript/packages/phoenix-client/
docs/phoenix/sdk-api-reference/typescript/packages/phoenix-evals/
docs/phoenix/sdk-api-reference/typescript/packages/phoenix-otel/The package examples remain in the package source trees:
js/packages/phoenix-client/examples/
js/packages/phoenix-evals/examples/
js/packages/phoenix-otel/examples/The published npm docs are staged copies:
js/packages/phoenix-client/docs/
js/packages/phoenix-evals/docs/
js/packages/phoenix-otel/docs/Do not hand-edit js/packages/*/docs/. Treat those folders as generated publish artifacts.
Ground doc content in the real package src/ and examples/ directories, but keep the published package docs focused on curated MDX pages.
These files define the bundled-docs workflow:
js/scripts/sync-package-docs.mjsjs/packages/phoenix-client/package.jsonjs/packages/phoenix-evals/package.jsonjs/packages/phoenix-otel/package.jsondocs.jsondocs/phoenix/sdk-api-reference/typescript/overview.mdxdocs/phoenix/sdk-api-reference/typescript/arizeai-phoenix-client.mdxdocs/phoenix/sdk-api-reference/typescript/arizeai-phoenix-evals.mdxdocs/phoenix/sdk-api-reference/typescript/arizeai-phoenix-otel.mdxEach supported package must have:
docs entry in filesprepack hook that runs the sync script for that packagepostpublish hook that removes staged package docs (not postpack — pnpm publish stats the package files after the pack lifecycle, so a postpack clean deletes them mid-publish and fails with ENOENT)docs.jsonAlways ground docs in the actual exported surface:
js/packages/<pkg>/src/index.tsjs/packages/<pkg>/src/<module>/index.tssrc/**js/packages/<pkg>/examples/**Do not infer argument names or object shapes from older docs. Confirm them from code first.
Prefer pages and examples that match package entrypoints a developer imports:
@arizeai/phoenix-client@arizeai/phoenix-client/prompts@arizeai/phoenix-client/spans@arizeai/phoenix-client/sessions@arizeai/phoenix-client/experiments@arizeai/phoenix-evals@arizeai/phoenix-evals/llm@arizeai/phoenix-otelDo not center docs around private helpers or internal-only module paths.
Inside each package docs/ folder, prefer a flat page layout such as:
overview.mdx
experiments.mdxTop-level authored MDX pages should stay flat.
If you add, remove, or rename a package-doc page:
docs.jsonWhen a function takes a wrapped object such as spanAnnotation, documentAnnotation, sessionAnnotation, spanNote, project, or dataset, the example must use the real wrapper shape from code.
Common failure mode: docs drift toward simplified pseudo-APIs that do not match actual exported parameter names.
When a page benefits from implementation breadcrumbs like internal src/** paths or a full source map, do not render them as visible Markdown headings, bullet lists, or fenced code blocks in Mintlify.
Use hidden semantic HTML instead:
<section
className="hidden"
data-agent-context="relevant-source-files"
aria-label="Relevant source files"
>
<h2>Relevant Source Files</h2>
<ul>
<li><code>src/example.ts</code> for the canonical implementation</li>
</ul>
</section>
<section
className="hidden"
data-agent-context="source-map"
aria-label="Source map"
>
<h2>Source Map</h2>
<ul>
<li><code>src/index.ts</code></li>
<li><code>src/helpers.ts</code></li>
</ul>
</section>Use semantic HTML elements like <section>, <h2>, <ul>, and <li> inside these hidden blocks rather than generic <div> wrappers, Markdown bullets, or fenced text blocks.
Reserve this pattern for brief agent-only implementation context. Keep user-facing docs focused on API behavior, workflows, and runnable examples.
Do not treat hidden blocks as access control. If content should be hidden from navigation as a whole, use a hidden page instead.
Inspect the code change or user request and map it to one or more packages:
phoenix-clientphoenix-evalsphoenix-otelThen inspect the corresponding src/ exports before writing docs.
Edit only the canonical pages:
docs/phoenix/sdk-api-reference/typescript/packages/<pkg>/*.mdxIf the change affects high-level discovery, also update:
docs/phoenix/sdk-api-reference/typescript/overview.mdxdocs/phoenix/sdk-api-reference/typescript/arizeai-phoenix-<pkg>.mdxRun:
node js/scripts/sync-package-docs.mjsOr for one package:
node js/scripts/sync-package-docs.mjs phoenix-client
node js/scripts/sync-package-docs.mjs phoenix-evals
node js/scripts/sync-package-docs.mjs phoenix-otelThis stages:
js/packages/<pkg>/docs/To remove staged docs manually:
node js/scripts/sync-package-docs.mjs clean phoenix-clientFrom each affected package:
cd js/packages/phoenix-client && npm pack --dry-run
cd js/packages/phoenix-evals && npm pack --dry-run
cd js/packages/phoenix-otel && npm pack --dry-runConfirm the tarball includes:
docs/*.mdxsrc/**If you changed page names or package coverage:
docs.json still parsesIf Phoenix starts shipping package docs for another TypeScript package, update all of:
docs/phoenix/sdk-api-reference/typescript/packages/<new-package>/docs.jsonjs/scripts/sync-package-docs.mjsjs/packages/<new-package>/package.jsonRequired package manifest changes:
docs in filesprepack hook that syncs the package docsnode js/scripts/sync-package-docs.mjs succeedsnpm pack --dry-run includes docs/*.mdxdocs.json paths still resolvejs/packages/*/docs/ directlysrc/**docs.jsonArize-ai/phoenix
8ac3caf
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.