# Behavior traces — changesets/changesets

> Canonical page: https://codevetter.com/unpack/changesets/behavior-traces

# Behavior traces — changesets/changesets

Scanned commit c73949ba7b3160a4aa5729223335c190de1528f8 (2026-09-22). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The inspected startup, add, version, and publish paths connect concrete command dispatch to their terminal effects. Additional traces cover status, prerelease persistence, and packing. These are source-derived execution sequences, not observed runtime results. Branches around skipped packages, prerelease state, authentication, and partial publication materially change the sequence.
- Startup: bin.js imports the CLI → index.ts calls cli.parse(run:false) → enables interactive guidance for TTY add/publish → displays the version intro → awaits runMatchedCommand; command actions import handlers lazily. — [packages/cli/bin.js#L3-9](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/bin.js#L3-L9) [packages/cli/src/index.ts#L11-28](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/index.ts#L11-L28) [packages/cli/src/cli.ts#L97-100](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/cli.ts#L97-L100)
- Add: getPackages → ensureChangesetFolder → readConfig → filter versionable packages → best-effort getVersionableChangedPackages → createChangeset or empty intent → writeChangeset → optional getAddMessage/Git commit → optional launchEditor. — [packages/cli/src/commands/add/index.ts#L30-49](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/add/index.ts#L30-L49) [packages/cli/src/commands/add/index.ts#L65-125](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/add/index.ts#L65-L125) [packages/cli/src/commands/add/index.ts#L168-170](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/add/index.ts#L168-L170)
- Version: discover packages/read config → validate ignore names and skipped dependents → readChangesets/readPreState → reject snapshot/pre conflicts or absent intent → assembleReleasePlan → applyReleasePlan → optionally stage touched paths sequentially and commit. — [packages/cli/src/commands/version/index.ts#L27-70](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/version/index.ts#L27-L70) [packages/cli/src/commands/version/index.ts#L72-125](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/version/index.ts#L72-L125) [packages/cli/src/commands/version/index.ts#L127-143](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/version/index.ts#L127-L143)
- Planner: getRelevantChangesets rejects unknown packages and mixed skipped/non-skipped intent → getPreInfo → flattenReleases → build dependents graph → repeat determineDependents/matchFixedConstraint/applyLinks until stable → calculate output versions. — [packages/assemble-release-plan/src/index.ts#L138-183](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/assemble-release-plan/src/index.ts#L138-L183) [packages/assemble-release-plan/src/index.ts#L219-235](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/assemble-release-plan/src/index.ts#L219-L235) [packages/assemble-release-plan/src/index.ts#L249-280](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/assemble-release-plan/src/index.ts#L249-L280)
- Status: getPackages/readConfig → readPreState/readChangesets → assembleReleasePlan → detect changed packages → enforce presence of changesets → either serialize the release plan or print sorted bump groups and optional IDs/new versions. — [packages/cli/src/commands/status/index.ts#L22-66](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/status/index.ts#L22-L66) [packages/cli/src/commands/status/index.ts#L84-109](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/status/index.ts#L84-L109)
- Prerelease persistence: enterPre writes mode/tag → version application moves consumed files into .changeset/pre → active-pre assembly excludes archived IDs → exitPre writes mode:exit → the next application removes pre.json and consumes releasable archived intent. — [packages/pre/src/index.ts#L43-70](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/pre/src/index.ts#L43-L70) [packages/apply-release-plan/src/index.ts#L114-119](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/apply-release-plan/src/index.ts#L114-L119) [packages/apply-release-plan/src/index.ts#L216-227](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/apply-release-plan/src/index.ts#L216-L227) [packages/assemble-release-plan/src/index.ts#L279-283](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/assemble-release-plan/src/index.ts#L279-L283)
- Pack: discover/read config → read supplied plan or compute getPublishPlan → create output/packages → queue publishTool.pack calls → hash each returned tarball → attach metadata to original chunks → write publish-plan.json; Yarn rejects publishConfig.directory. — [packages/cli/src/commands/pack/index.ts#L45-98](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/pack/index.ts#L45-L98) [packages/cli/src/commands/pack/index.ts#L110-158](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/pack/index.ts#L110-L158)
- Publish: create reporter/discover adapter → load or compute plan → process dependency chunks → use TTY sequential probing or bulk publishing → recover eligible 2FA failures interactively → tag successes/tag-only entries → exit 1 for recorded failures. — [packages/cli/src/commands/publish/index.ts#L110-176](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish/index.ts#L110-L176) [packages/cli/src/commands/publish/index.ts#L191-265](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish/index.ts#L191-L265) [packages/cli/src/commands/publish/index.ts#L324-362](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish/index.ts#L324-L362) [packages/cli/src/commands/publish/index.ts#L376-419](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish/index.ts#L376-L419)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
