Skip to content

docs: note that pnpm cli serves the last build, not the working tree - #164

Merged
thecodedrift merged 1 commit into
mainfrom
docs/pnpm-cli-staleness
Aug 24, 2026
Merged

docs: note that pnpm cli serves the last build, not the working tree#164
thecodedrift merged 1 commit into
mainfrom
docs/pnpm-cli-staleness

Conversation

@thecodedrift

@thecodedrift thecodedrift commented Aug 24, 2026

Copy link
Copy Markdown
Member

What

Three paragraphs under Local Development in CLAUDE.md, recording that pnpm cli runs packages/cli/dist/index.js — the last build — and not the working tree.

Why

agent <topic> recipes are embedded into the bundle at build time rather than fetched over the network, so a stale dist/ serves stale instructions with nothing to signal it.

Measured while onboarding this repo with Taskless: a dist/ built 26 commits earlier served create-sg-rule topic v2 while HEAD served v3. The revision it missed was the one documenting that language: takes ast-grep's own spelling, so four new rules were authored with an off-list lowercase typescript. That spelling happened to reach the right parser — a name ast-grep does not recognize at all aborts config parsing and takes every other rule's report down with it, silently.

The note also records how the skill's pinned nightly relates to pnpm cli. The two disagree exactly when dist/ is behind HEAD, and neither is automatically right: the pin is a real build of some commit, pnpm cli is this tree only once rebuilt.

Note on the diff

Prettier normalized four pre-existing *emphasis* markers to _emphasis_ and one blank line elsewhere in the file. lint-staged applies this on any commit that stages CLAUDE.md, so it is unavoidable rather than incidental scope.

No changeset: a CLAUDE.md edit ships no release note.

`dist/` is a build artifact and nothing rebuilds it on demand, so
`pnpm cli agent <topic>` can serve recipes from an arbitrarily old
commit — the recipe text is embedded into the bundle at build time
rather than fetched. Measured: a `dist/` built 26 commits back served
topic v2 while HEAD served v3, and the missing revision was the one
documenting that `language:` takes ast-grep's own spelling.

Also records how the skill's pinned nightly relates to `pnpm cli`, since
the two disagree exactly when `dist/` is behind HEAD and neither is
automatically right.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017cEN93Acyp4zBwP3oDnyy1
Copilot AI lite review requested due to automatic review settings August 24, 2026 22:10

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@thecodedrift
thecodedrift merged commit 9cd9d99 into main Aug 24, 2026
6 checks passed
@thecodedrift
thecodedrift deleted the docs/pnpm-cli-staleness branch August 24, 2026 22:11
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.

2 participants