Ship one npm package per domain. Do not publish a universal “does everything” CLI or expose @erdflow/core to end users.
| Publish | Do not publish (monorepo private) |
|---|---|
@erdflow/<Domain> |
@erdflow/core, @erdflow/layout, @erdflow/web, parser-* |
Users run:
npx @erdflow/<Domain>Agents read AGENTS.md / llms.txt inside that package after install — not a universal erdflow guide.
Replace <Domain> with the domain id (lowercase folder/npm segment), e.g. the package path packages/<Domain>/ and name @erdflow/<Domain>.
Each published domain owns its own agent docs. Folder name = domain = npm scope.
packages/<Domain>/ → @erdflow/<Domain>
README.md
AGENTS.md
llms.txt
media/
bin: erdflow-<Domain>
When adding a new domain, copy this checklist — do not append that domain’s sections into another domain’s AGENTS.md:
- Create
packages/<Domain>/with binerdflow-<Domain> - Own
README.md,AGENTS.md,llms.txt,media/ - Wire that domain’s parser; reuse private
core/layout/webvia the domain bundle - Set
repository.directorytopackages/<Domain> - Publish
@erdflow/<Domain>with--access public
Shared internals stay private until two published packages need @erdflow/core on npm (two-adapters rule).
Deep module rule: the interface of @erdflow/<Domain> is “run ERD for that domain.” Each new domain is a second adapter package with the same shape, not extra sections inside another domain’s docs.
npm whoami
# must be a member of the erdflow org
npm login # if neededConfigured in packages/<Domain>/package.json:
| Field | Value |
|---|---|
| Path | packages/<Domain>/ |
name |
@erdflow/<Domain> |
bin |
erdflow-<Domain> → ./dist/cli.js |
publishConfig.access |
public |
files |
dist/cli.js, dist/public, media, README.md, AGENTS.md, llms.txt |
repository.directory |
packages/<Domain> |
Shared workspace packages stay private / unpublished. tsup bundles them into dist/cli.js.
cd erdFlow
pnpm install
pnpm --filter @erdflow/core build
pnpm --filter @erdflow/<Domain> buildSmoke test (adjust schema path for the domain):
node packages/<Domain>/dist/cli.js --no-open
# → http://127.0.0.1:4317/cd packages/<Domain>
npm pack --dry-runConfirm the tarball includes README, AGENTS.md, llms.txt, media, and dist — not src/, fixtures, or .turbo/.
cd packages/<Domain>
npm publish --access publicBump version in package.json for later releases (0.1.1, …).
npx @erdflow/<Domain> --help
npm view @erdflow/<Domain>- Package folder is
packages/<Domain>/(matches npm name) - Package name is domain-scoped (
@erdflow/<Domain>, not unscopederdflow) - Description and keywords are domain-only
- Own
README.md/AGENTS.md/llms.txt/media/(not shared with other domains) - Agent docs use
npx @erdflow/<Domain> -
pnpm --filter @erdflow/<Domain> buildsucceeds -
npm pack --dry-runlooks clean -
@erdflow/core(and other internals) remain unpublished