Skip to content

Commit c8e0bcd

Browse files
committed
Update AGENTS.md with docs workspace package details
Document the docs workspace package in the monorepo package listing, Documentation section (build modes, URL structure, doc-only releases, SDK cascade), and Changesets section.
1 parent 8806dfe commit c8e0bcd

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

AGENTS.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This is a monorepo project with the following packages:
44
- `./packages/b2c-cli` - the command line interface built with oclif
55
- `./packages/b2c-tooling-sdk` - the SDK/library for B2C Commerce operations; supports the CLI and can be used standalone
66
- `./packages/b2c-dx-mcp` - Model Context Protocol server; also built with oclif
7+
- `./docs` - documentation site (private `@salesforce/b2c-dx-docs` workspace package; not published to npm)
78

89
## Common Commands
910

@@ -97,10 +98,33 @@ See [documentation skill](./.claude/skills/documentation/SKILL.md) for details o
9798
# Run docs dev server (from project root)
9899
pnpm run docs:dev
99100

100-
# Build docs for production
101+
# Build docs for production (stable mode — root base path)
101102
pnpm run docs:build
103+
104+
# Build docs in dev mode (/dev/ base path)
105+
IS_DEV_BUILD=true pnpm run docs:build
102106
```
103107

108+
### Docs workspace package
109+
110+
The `./docs` directory is a private workspace package (`@salesforce/b2c-dx-docs`) with a dependency on `@salesforce/b2c-tooling-sdk`. This exists to support doc-only releases and changelog tracking via changesets, not for npm publishing. It has no build script — `pnpm -r run build` skips it.
111+
112+
**Deployed URL structure:** stable/released docs are served at the root URL, dev docs (from `main`) live at `/dev/`.
113+
114+
**Doc-only releases:** to release documentation changes without bumping CLI/SDK/MCP, create a changeset that targets only the docs package:
115+
116+
```md
117+
---
118+
'@salesforce/b2c-dx-docs': patch
119+
---
120+
121+
Improved authentication guide with step-by-step examples
122+
```
123+
124+
This produces a `docs@<version>` tag and triggers a docs rebuild on merge of the version PR.
125+
126+
**Automatic cascade:** because the docs package depends on the SDK, when the SDK version is bumped by a changeset, `updateInternalDependencies: "patch"` auto-bumps the docs version too — triggering a docs rebuild (correct since API docs are generated from the SDK).
127+
104128
## Logging
105129

106130
- when logging use the logger instance from `@salesforce/b2c-tooling-sdk/logger` package
@@ -142,8 +166,9 @@ This project uses [Changesets](https://github.com/changesets/changesets) for ver
142166

143167
**How it works:**
144168
- A changeset affecting only the SDK bumps only the SDK version
145-
- Packages that depend on a bumped package get an automatic patch bump (via `updateInternalDependencies: "patch"`) — e.g., if SDK bumps, CLI and MCP auto-get a patch bump because they depend on it
146-
- Only packages with a newer version than what's on npm get published
169+
- Packages that depend on a bumped package get an automatic patch bump (via `updateInternalDependencies: "patch"`) — e.g., if SDK bumps, CLI, MCP, and Docs all auto-get a patch bump
170+
- Only packages with a newer version than what's on npm get published (docs package is private and uses git tags instead)
171+
- A changeset targeting only `@salesforce/b2c-dx-docs` triggers a doc-only release — no npm packages are published, just a `docs@<version>` tag and docs rebuild
147172

148173
Changeset guidelines:
149174
- Create a changeset for any user-facing changes (features, bug fixes); typically in new pull requests

0 commit comments

Comments
 (0)