docs: ship agent guides and skills from every published package - #310
Open
WiktorStarczewski wants to merge 6 commits into
Open
docs: ship agent guides and skills from every published package#310WiktorStarczewski wants to merge 6 commits into
WiktorStarczewski wants to merge 6 commits into
Conversation
5 tasks
This was referenced Aug 23, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Someone installs the web SDK, opens their AI agent, and asks it to build something Miden-related. Today the agent answers from training data, which for a pre-1.0 SDK is usually a version or two stale.
The blocker is that no agent auto-loads instruction files from
node_modules— Claude Code walks up from cwd forCLAUDE.md, Cursor and Codex readAGENTS.mdfrom the project, and none descend into dependencies. So this splits into a part we ship and a part that has to reach the consumer's repo. This PR is the first: the substrate.What ships
Every published package now carries an
AGENTS.mdindex plus askills/directory inside its tarball:@miden-sdk/miden-sdkweb-client-usage,frontend-pitfalls,signer-integration@miden-sdk/reactreact-sdk-patterns,testing-patterns@miden-sdk/vite-pluginvite-wasm-setupBecause they ship with the code, they're version-matched: a consumer pinned to 0.15 gets 0.15 guidance, not whatever HEAD says.
@miden-sdk/miden-sdkalso ships itsREADME.mdfor the first time — it previously published neither a readme nor any documentation, so its npm page was blank.Each readme gains a marker-delimited block to paste into a project's root
AGENTS.md, which is the part that actually makes an agent read any of this. A command to inject it automatically follows in a separate PR.Consolidating three drifting copies
These skills already existed in
agent-toolsand were copied intofrontend-template. Every shared skill had drifted:Writing fresh files here would have made a third copy. Instead the drifted pairs are reconciled into one canonical version each, taking
agent-toolsas the base and merging the sectionsfrontend-templatehad accumulated and never upstreamed (five inreact-sdk-patterns, two intesting-patterns), with the template's directory layout generalized out.The split is by what the knowledge is about, which turns out to be measurable — the SDK skills cite
@miden-sdk/*and nevercrates/, the internals skills citecrates/and never@miden-sdk/*:idxdb-patterns,wasm-bridge— internals, so they sit in.claude/skills/.agent-tools: everything cross-cutting — MASM,rust-sdk-*,miden-concepts,local-node-validation, slash commands.Follow-up PRs drop the copies from
agent-toolsandfrontend-templateand point them at the published packages.Also
CLAUDE.md→AGENTS.md, withCLAUDE.mdreduced to an@AGENTS.mdimport so Claude Code still loads it. Same forpackages/react-sdk/.AGENTS.mddocuments the ownership boundary and the rule that a public-API change updates the shipped skill in the same PR.Test plan
npm pack --dry-runconfirmsAGENTS.md,README.mdandskills/land in all three tarballs