Skip to content

Ship AI documentation with published packages - #7098

Merged
tim-smart merged 3 commits into
mainfrom
agent/codex-engineer/2c4a0d07
Aug 6, 2026
Merged

Ship AI documentation with published packages#7098
tim-smart merged 3 commits into
mainfrom
agent/codex-engineer/2c4a0d07

Conversation

@tim-smart

@tim-smart tim-smart commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • copy canonical LLMS.md into every publishable package as AGENTS.md and CLAUDE.md during the root build
  • copy the checked-in ai-docs/ tree beside those entrypoints so their relative documentation links resolve in installed packages
  • include the entrypoints and ai-docs/**/* in each public package's published file allowlist
  • make the generated documentation wording and schema guide link work outside the monorepo
  • remove generated package copies during pnpm clean while preserving repository-level docs and agent instructions

Validation

  • pnpm lint-fix
  • clean build via pnpm clean && pnpm build
  • verified all 30 publishable package manifests include ai-docs/**/*
  • packed effect, @effect/sql-pg, and @effect/docgen; each tarball contains byte-identical AGENTS.md / CLAUDE.md and the exact checked-in ai-docs/ tree

Closes EFF-535

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e6fe611

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@effect-slopcop effect-slopcop Bot added 4.0 enhancement New feature or request labels Aug 6, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — minor suggestions below.

Reviewed changes

This PR ships the canonical LLMS.md AI documentation with every publishable package by copying it to AGENTS.md and CLAUDE.md at the end of the root build, including both files in each package's files allowlist, and cleaning the generated copies on pnpm clean.

  • .gitignore: ignores generated packages/**/AGENTS.md and packages/**/CLAUDE.md while preserving the repo-level /AGENTS.md.
  • LLMS.md / ai-docs/src: adjusts wording and the SCHEMA.md link so the doc is usable outside the monorepo.
  • package.json: appends node scripts/copy-ai-docs.mjs to the root build script.
  • 30 package.json files: add AGENTS.md and CLAUDE.md to each public package's files list.
  • scripts/copy-ai-docs.mjs (new): copies LLMS.md into every non-private package that lists both entrypoints in files.
  • scripts/clean.mjs: removes generated AGENTS.md/CLAUDE.md from package directories while leaving the root AGENTS.md symlink intact.

I verified the scripts end-to-end: copy-ai-docs.mjs produced 60 ignored files (30 packages × 2 docs), and clean.mjs removed them while keeping /AGENTS.md. pnpm lint passed.

ℹ️ Relative ai-docs links remain monorepo-only

LLMS.md still contains many ./ai-docs/src/... links (e.g., LLMS.md:91, LLMS.md:103, LLMS.md:161) that point to TypeScript example files in the monorepo source. Those files are not shipped in package tarballs, so the links will be dead in published-package context. The PR description scopes the outside-monorepo fix to wording and the SCHEMA.md link, so this may be intentional follow-up work; if these links are meant to be navigable when the docs ship with packages, they should also become absolute GitHub URLs, or the doc should note that they are monorepo-only references.

ℹ️ Nitpicks

  • Changeset: no changeset was added. Because this change affects the contents of published tarballs, a single patch-level changeset listing the affected packages would make the release notes accurate.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔Fix 👍s ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

Comment thread LLMS.md

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one minor suggestion inline.

Reviewed changes

This incremental review covers the follow-up commit 1bc6f1d2 ("Include AI docs sources in packages"). It addresses the prior review's main concern by copying the ai-docs/ source tree into every public package so relative ./ai-docs/... links resolve in published tarballs, and it adds CI validation for the copied contents.

  • .gitignore: now ignores generated packages/**/ai-docs/ directories.
  • Root package.json: added check-ai-docs script.
  • .github/workflows/check.yml: runs pnpm check-ai-docs after pnpm build.
  • 30 package.json files: added "ai-docs/**/*" to each public package's files list.
  • scripts/copy-ai-docs.mjs: updated to recursively copy the ai-docs/ tree into each public package, excluding dist/node_modules.
  • scripts/check-ai-docs.mjs: new validation script that checks every package has the generated entrypoints, a matching ai-docs/ copy, resolvable relative links, and that the effect tarball contains the expected files.
  • scripts/clean.mjs: now removes generated ai-docs directories from package dirs.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔Fix 👍s ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

Comment thread scripts/check-ai-docs.mjs Outdated

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

This incremental review covers commit e6fe611 ("Remove AI docs validation script"), which removes the standalone check-ai-docs validation script, its package script, and the CI step that invoked it.

  • .github/workflows/check.yml: no longer runs pnpm check-ai-docs after the build.
  • package.json: removed the check-ai-docs script.
  • scripts/check-ai-docs.mjs: deleted. The prior inline concern about opaque ENOENT errors from this script is addressed by the deletion.

The remaining scripts/copy-ai-docs.mjs still enforces that every public package lists AGENTS.md, CLAUDE.md, and ai-docs/**/* in its files allowlist, so missing entries will fail the root build.

ℹ️ Stale PR description

The PR description still lists pnpm check-ai-docs under Validation, but that script and CI invocation were removed in e6fe611. Consider updating the description so future readers don't try to run a command that no longer exists.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@tim-smart
tim-smart enabled auto-merge (squash) August 6, 2026 23:23
@tim-smart
tim-smart merged commit f6c6ec9 into main Aug 6, 2026
20 checks passed
@tim-smart
tim-smart deleted the agent/codex-engineer/2c4a0d07 branch August 6, 2026 23:28
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
basic.ts 6.92 KB 6.92 KB 0.00 KB (0.00%)
batching.ts 9.72 KB 9.72 KB 0.00 KB (0.00%)
brand.ts 6.60 KB 6.60 KB 0.00 KB (0.00%)
cache.ts 10.59 KB 10.59 KB 0.00 KB (0.00%)
config.ts 20.83 KB 20.83 KB 0.00 KB (0.00%)
differ.ts 19.67 KB 19.67 KB 0.00 KB (0.00%)
http-client.ts 21.50 KB 21.50 KB 0.00 KB (0.00%)
logger.ts 10.81 KB 10.81 KB 0.00 KB (0.00%)
metric.ts 8.86 KB 8.86 KB 0.00 KB (0.00%)
optic.ts 6.68 KB 6.68 KB 0.00 KB (0.00%)
pubsub.ts 14.86 KB 14.86 KB 0.00 KB (0.00%)
queue.ts 11.54 KB 11.54 KB 0.00 KB (0.00%)
schedule.ts 10.71 KB 10.71 KB 0.00 KB (0.00%)
schema-class.ts 19.38 KB 19.38 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 29.20 KB 29.20 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 25.51 KB 25.51 KB 0.00 KB (0.00%)
schema-string-transformation.ts 13.49 KB 13.49 KB 0.00 KB (0.00%)
schema-string.ts 11.03 KB 11.03 KB 0.00 KB (0.00%)
schema-template-literal.ts 15.30 KB 15.30 KB 0.00 KB (0.00%)
schema-toArbitraryLazy.ts 21.43 KB 21.43 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 23.87 KB 23.87 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 18.64 KB 18.64 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 18.47 KB 18.47 KB 0.00 KB (0.00%)
schema-toFormatter.ts 18.32 KB 18.32 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 22.09 KB 22.09 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 19.01 KB 19.01 KB 0.00 KB (0.00%)
schema.ts 18.62 KB 18.62 KB 0.00 KB (0.00%)
stm.ts 12.59 KB 12.59 KB 0.00 KB (0.00%)
stream.ts 9.67 KB 9.67 KB 0.00 KB (0.00%)

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

Labels

4.0 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant