AGENTS.md@packages/cli ยท diff
git:20261011.f886e12 to git:20261011.25893b9
2 added, 2 removed. Audit A to A.
# @shadowclone/cli
- The `shadowclone` command. It parses commands, calls the other packages, and builds the one package that goes to npm.
+ The `shadowclone` command. It parses commands, calls the other packages, and builds the CLI package for npm.
<!-- package-facts:start -->
(generated by `bun run guides`; do not edit by hand)
- Package name: `@shadowclone/cli`
- Workspace dependencies: `@shadowclone/agents`, `@shadowclone/builds`, `@shadowclone/changes`, `@shadowclone/cloud`, `@shadowclone/core`, `@shadowclone/environment`, `@shadowclone/harness`, `@shadowclone/learning`, `@shadowclone/mcp`, `@shadowclone/profile`, `@shadowclone/redact`, `@shadowclone/review`, `@shadowclone/sessions`, `@shadowclone/skills`, `@shadowclone/web`
- External dependencies: `@anthropic-ai/sandbox-runtime`, `bun`, `commander`, `smol-toml`, `zod`
- Export subpaths: `.`
<!-- package-facts:end -->
## Owns
- `bin/shadowclone.mjs`: the `bin` entry. It runs `dist/shadowclone.js` with Bun.
- `src/main.ts`: the command router and the usage text. Each command has its own file, such as `init.ts`, `learn.ts`, `review.ts`, and `forget.ts`.
- `scripts/build.ts`: bundles the workspace packages into `dist/`.
- `scripts/stage.ts` and `publishedManifest.ts`: write the publishable package to `out/package`.
## Rules
- - This is the only package that goes to npm. Other packages stay private.
+ - This package publishes the CLI. The separate skills artifact publishes portable content. Workspace runtime packages stay private.
- `publishedManifest` copies a fixed list of fields. It drops every `workspace:` dependency.
- The build fails when the bundle contains a path of the build machine.
- The bundle keeps `@anthropic-ai/sandbox-runtime` external. The published manifest retains its pinned dependency so installed packages include native sandbox helpers.
- Product name and version come from `@shadowclone/core/product.json`. Workspace manifests have no version.
- `forget --all` stops while task worktrees from earlier versions remain.
- Error text passes through `redactSecrets` before it prints.
- Update the usage text in `src/main.ts` and `docs/guides/commands.md` when you add a command.
## Tests
Run `bun test` in this folder, or `bun test packages/cli` from the root. Many tests create a synthetic home folder and run `git`. The `scripts/` tests check the bundle and the staged package.
Update this file in the same commit when you change the package purpose, public exports, dependencies, or a rule above.