docs/updating.md

Updating the plugin and existing tasks

Updating the installed plugin and updating a project's task files are separate operations. Installation does not move legacy .factory/ records, rewrite tasks or grant new approvals.

Update the installed plugin

From the product repository, use the terminal:

claude plugin marketplace update software-factory
claude plugin update factory@software-factory --scope project

The first command refreshes the marketplace catalog; the second updates the installed plugin. Match --scope to the original installation (project, user, or local); do not create another installation merely to update one. If unsure, check /plugin → Installed in Claude Code for the active installation and scope. Managed installations require your organization's update policy.

Fully restart Claude Code after the update. Then check:

claude plugin list --json

Find factory@software-factory, confirm it is enabled, and compare its installed version with the release you intended to install in the changelog. If a new skill is missing, verify the scope/version and restart before retrying. Updating only the marketplace is not enough to establish which plugin version is running.

Refresh the Codex copy

If the project also uses Codex, run /factory:codex after the plugin update (or node /path/to/software-factory/scripts/codex.mjs install . from a checkout at the new release). Then commit the refreshed .agents/factory/ and .agents/skills/factory-* files and restart Codex. /factory:codex check reports whether the copy matches the installed plugin without writing anything. See Using factory with Codex.

Only published changes available from the marketplace source can be installed this way. An unmerged PR is not a released plugin update. To try a checkout before release, start Claude Code from the product repository with claude --plugin-dir /absolute/path/to/software-factory, as described in Develop.

Run migrations through a selected version

After verifying the installed plugin version, run:

/factory:migrate 0.6.1

The command prepares the sequential migration preview, rehearses it on a copy of the project's records in a separate sandbox, and asks for approval before applying it to the live records. For a report with no writes or approval prompt, use:

/factory:migrate check 0.6.1

In Codex, use $factory-migrate with the same arguments. To request application explicitly, use /factory:migrate apply 0.6.1; it still previews exact changes and waits for approval. Omitting the target uses the installed plugin version. Unknown targets, targets newer than installed, task IDs and all are rejected. No command installs the plugin, starts delivery, commits or pushes. Merely running migrate is not approval of its proposed changes.

Select version-scoped migration instructions

The migrate command loads the release index below and the applicable local descriptors. Establish the project's last verified migration/version checkpoint from project/backup evidence, not the newly installed plugin version. Follow every intervening release in ascending semantic-version order; verify each target before advancing. Descriptors declare only target_version/target_layout alongside schema/identity metadata, not source-version allowlists or source-layout selectors. Multiple steps for one target require explicit index order.

Target version Target layout Instructions
0.3.0 Existing .factory/ records unchanged Compatible design workflow: explicit no-record-migration step
0.3.1 .factory/tasks/ with separate code/design track rules Historical task-track audit
0.4.0 Local unversioned shared-Git catalog, including reservations Shared local record storage
0.4.1 Same catalog; upgrades use migrate Command replacement: no record relocation
0.5.0 Same catalog; DEV-NNN/DSGN-NNN IDs with legacy_id, priorities, journal Reported lines, no reports/ Release migration: one plan for the whole release
0.6.0 Same catalog; every task uses the 0.6.0 task record: workflow references in the header (depends_on, implements, delivery, submitted; design reviewer, approach, handoff, approval, dev_task) and the four-section body Release migration: one plan for the whole release
0.6.1 Same catalog and 0.6.0 task record, unchanged; new locks carry an owner file, settings.md may have ## Known noise Release migration: explicit no-record-migration step

For example, a project last verified at 0.2.0 visits 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.5.0, 0.6.0, then 0.6.1; an already verified 0.6.0 project visits only 0.6.1. All earlier target rules are bundled locally; migration does not depend on a removed command or accidentally audit an old step against the newest task template. An archived pre-minimal workflow needs its own earlier transition instructions; do not skip it into this sequence. Missing instructions or unknown progress stop for read-only reconstruction, not guessed compatibility.

Keep execution evidence/checkpoints with the approved external backup until the shared catalog exists, then consolidate it into catalog migration.md. Preview/check never initializes either location. A fresh project without legacy records/reservations or a catalog needs no historical migration. An existing/partial catalog is not proof of completion: reconcile its inventory and last verified checkpoint before writing. Already completed steps are validated read-only without duplicate log entries; partial/failed steps block later releases.

The 0.4.0 step remains a breaking storage move: preserve IDs, reservation metadata, custom content, history and exact approval evidence; back up externally, copy only approved reconciled records, verify, and separately authorize product-baseline cleanup. Catalog records are not backed up by Git push/clone. A later rollback exports newer work before restoration and restores only the last verified checkpoint. Migration never creates new task-definition/human approval or starts task execution.

Internal maintainers define future release instructions through work-issue-migrations and its template. This authoring stage is not a shipped consumer command; migrate executes the approved instructions in the current agent session, not as an unattended script.

Replacing the old command in 0.4.1

/factory:migrate-tasks is removed; there is no compatibility alias or task-ID/all selector. Use /factory:migrate <target-version> for the ordered preview/approval flow, or check <target-version> for read-only inspection. Historical logs naming the old command remain unchanged. The maintainer selected patch version 0.4.1 for this invocation replacement; existing 0.4.0 records need no additional schema conversion or relocation. Installing 0.4.1 does not itself migrate records or authorize edits to project docs/scripts that mention the retired invocation.

Upgrading to 0.5.0

0.5.0 changes existing records, so run /factory:migrate 0.5.0 once after updating the plugin, with no other factory session or scheduled feedback run active. Until then, definition and delivery stop on tasks with numeric IDs, and feedback stops while reports/ exists; /factory:tasks still lists everything.

  • Tasks are renumbered by kind, keeping the number: 003 becomes DEV-003 (code) or DSGN-003 (design). The old ID stays in legacy_id, so /factory:deliver 003 still finds DEV-003. Branches, handoff files, logs and the journal keep the old ID as history.
  • Tasks without a priority get normal.
  • Journal entries covered by old feedback reports are marked Reported; reports/ moves into the external backup.

Each release migration is rehearsed in a sandbox first: the sandbox helper copies the catalog and legacy records into a separate repository, the migration runs there, and you approve the exact list of changes before anything live is written. See the 0.5.0 release migration for the full procedure and recovery.

Upgrading to 0.6.0

0.6.0 changes existing task files, so run /factory:migrate 0.6.0 once after updating the plugin (and /factory:codex first if the project uses Codex), with no other factory session or scheduled feedback run active. A project still on 0.4.1 or earlier runs the 0.5.0 step first, in the same command. Until the migration runs, /factory:tasks shows tasks as eligibility unknown: missing … (run /factory:migrate 0.6.0) and doesn't pick one automatically, and definition and delivery report an unmigrated task and point to the migration instead of converting it.

  • Workflow references move from body sections into the header: implements, delivery and submitted for code; reviewer, approach, delivery, submitted, handoff, approval and dev_task for design. Every task gets depends_on, [] unless you name prerequisites in the preview.
  • The body becomes General description, Goals, Scope of work and Acceptance criteria. Old Problem, Approach, Brief and Out of scope text moves into them word for word; task-specific Verification checks become acceptance criteria. Log lines are kept.
  • done tasks get the same rewrite but are approved in bulk, with unclear references left null and the original text kept in migration.md.

0.6.0 also changes delivery without a migration: for a project with a remote, delivery now pushes the branch and opens a pull request at the end, and publishes the STR evidence to a factory-evidence branch. Set pull_requests: off in the catalog's settings.md to keep the old behaviour. See the 0.6.0 release migration for the full procedure and recovery.

Upgrading to 0.6.1

0.6.1 changes no records. Run /factory:migrate 0.6.1 once after updating the plugin (and /factory:codex first if the project uses Codex, so $factory-settle is installed): it checks that the 0.6.0 step is verified and records the 0.6.1 checkpoint, nothing else. A project still on 0.5.0 or earlier runs the earlier steps first, in the same command.

  • Finish or pause open deliveries before updating. Locks now carry an owner file; a lock taken by a 0.6.0 session has none, so a 0.6.1 session that meets it asks you before taking it over.
  • Behaviour change: /factory:tasks and delivery's start first run the new /factory:settle, which marks a task done when its PR was merged and nothing would be lost, and lists the rest under Needs attention. Reading PR states needs the gh CLI; without it the overview says so and settles nothing.
  • Reviewers now run on the other agent (Codex from Claude Code, Claude Code from Codex) when the session can start it, and fall back to a fresh same-agent subagent otherwise.

See the 0.6.1 release migration for the procedure and rollback.

Original Markdown, including metadata
# Updating the plugin and existing tasks

Updating the installed plugin and updating a project's task files are separate operations. Installation does not move legacy `.factory/` records, rewrite tasks or grant new approvals.

## Update the installed plugin

From the product repository, use the terminal:

```sh
claude plugin marketplace update software-factory
claude plugin update factory@software-factory --scope project
```

The first command refreshes the marketplace catalog; the second updates the installed plugin. Match `--scope` to the original installation (`project`, `user`, or `local`); do not create another installation merely to update one. If unsure, check `/plugin` → Installed in Claude Code for the active installation and scope. Managed installations require your organization's update policy.

Fully restart Claude Code after the update. Then check:

```sh
claude plugin list --json
```

Find `factory@software-factory`, confirm it is enabled, and compare its installed version with the release you intended to install in the [changelog](../CHANGELOG.md). If a new skill is missing, verify the scope/version and restart before retrying. Updating only the marketplace is not enough to establish which plugin version is running.

### Refresh the Codex copy

If the project also uses Codex, run `/factory:codex` after the plugin update (or `node /path/to/software-factory/scripts/codex.mjs install .` from a checkout at the new release). Then commit the refreshed `.agents/factory/` and `.agents/skills/factory-*` files and restart Codex. `/factory:codex check` reports whether the copy matches the installed plugin without writing anything. See [Using factory with Codex](adapters/codex.md).

Only published changes available from the marketplace source can be installed this way. An unmerged PR is not a released plugin update. To try a checkout before release, start Claude Code from the product repository with `claude --plugin-dir /absolute/path/to/software-factory`, as described in [Develop](../README.md#develop).

## Run migrations through a selected version

After verifying the installed plugin version, run:

```text
/factory:migrate 0.6.1
```

The command prepares the sequential migration preview, rehearses it on a copy of the project's records in a separate sandbox, and asks for approval before applying it to the live records. For a report with no writes or approval prompt, use:

```text
/factory:migrate check 0.6.1
```

In Codex, use `$factory-migrate` with the same arguments. To request application explicitly, use `/factory:migrate apply 0.6.1`; it still previews exact changes and waits for approval. Omitting the target uses the installed plugin version. Unknown targets, targets newer than installed, task IDs and `all` are rejected. No command installs the plugin, starts delivery, commits or pushes. Merely running `migrate` is not approval of its proposed changes.

## Select version-scoped migration instructions

The [migrate command](../skills/migrate/SKILL.md) loads the release index below and the applicable local descriptors. Establish the project's last verified migration/version checkpoint from project/backup evidence, not the newly installed plugin version. Follow every intervening release in ascending semantic-version order; verify each target before advancing. Descriptors declare only `target_version`/`target_layout` alongside schema/identity metadata, not source-version allowlists or source-layout selectors. Multiple steps for one target require explicit index order.

| Target version | Target layout | Instructions |
| --- | --- | --- |
| `0.3.0` | Existing `.factory/` records unchanged | [Compatible design workflow](migrations/0.3.0-design-workflow.md): explicit no-record-migration step |
| `0.3.1` | `.factory/tasks/` with separate code/design track rules | [Historical task-track audit](migrations/0.3.1-task-tracks.md) |
| `0.4.0` | Local unversioned shared-Git catalog, including reservations | [Shared local record storage](migrations/0.4.0-shared-record-storage.md) |
| `0.4.1` | Same catalog; upgrades use `migrate` | [Command replacement](migrations/0.4.1-migrate-command.md): no record relocation |
| `0.5.0` | Same catalog; `DEV-NNN`/`DSGN-NNN` IDs with `legacy_id`, priorities, journal **Reported** lines, no `reports/` | [Release migration](migrations/0.5.0-release.md): one plan for the whole release |
| `0.6.0` | Same catalog; every task uses the 0.6.0 task record: workflow references in the header (`depends_on`, `implements`, `delivery`, `submitted`; design `reviewer`, `approach`, `handoff`, `approval`, `dev_task`) and the four-section body | [Release migration](migrations/0.6.0-release.md): one plan for the whole release |
| `0.6.1` | Same catalog and 0.6.0 task record, unchanged; new locks carry an `owner` file, `settings.md` may have `## Known noise` | [Release migration](migrations/0.6.1-release.md): explicit no-record-migration step |

For example, a project last verified at `0.2.0` visits `0.3.0`, `0.3.1`, `0.4.0`, `0.4.1`, `0.5.0`, `0.6.0`, then `0.6.1`; an already verified `0.6.0` project visits only `0.6.1`. All earlier target rules are bundled locally; migration does not depend on a removed command or accidentally audit an old step against the newest task template. An archived pre-minimal workflow needs its own earlier transition instructions; do not skip it into this sequence. Missing instructions or unknown progress stop for read-only reconstruction, not guessed compatibility.

Keep execution evidence/checkpoints with the approved external backup until the shared catalog exists, then consolidate it into catalog `migration.md`. Preview/check never initializes either location. A fresh project without legacy records/reservations or a catalog needs no historical migration. An existing/partial catalog is not proof of completion: reconcile its inventory and last verified checkpoint before writing. Already completed steps are validated read-only without duplicate log entries; partial/failed steps block later releases.

The `0.4.0` step remains a breaking storage move: preserve IDs, reservation metadata, custom content, history and exact approval evidence; back up externally, copy only approved reconciled records, verify, and separately authorize product-baseline cleanup. Catalog records are not backed up by Git push/clone. A later rollback exports newer work before restoration and restores only the last verified checkpoint. Migration never creates new task-definition/human approval or starts task execution.

Internal maintainers define future release instructions through [work-issue-migrations](../.agents/skills/work-issue-migrations/SKILL.md) and its template. This authoring stage is not a shipped consumer command; `migrate` executes the approved instructions in the current agent session, not as an unattended script.

## Replacing the old command in 0.4.1

`/factory:migrate-tasks` is removed; there is no compatibility alias or task-ID/`all` selector. Use `/factory:migrate <target-version>` for the ordered preview/approval flow, or `check <target-version>` for read-only inspection. Historical logs naming the old command remain unchanged. The maintainer selected patch version `0.4.1` for this invocation replacement; existing `0.4.0` records need no additional schema conversion or relocation. Installing `0.4.1` does not itself migrate records or authorize edits to project docs/scripts that mention the retired invocation.

## Upgrading to 0.5.0

0.5.0 changes existing records, so run `/factory:migrate 0.5.0` once after updating the plugin, with no other factory session or scheduled `feedback` run active. Until then, definition and delivery stop on tasks with numeric IDs, and `feedback` stops while `reports/` exists; `/factory:tasks` still lists everything.

- Tasks are renumbered by kind, keeping the number: `003` becomes `DEV-003` (code) or `DSGN-003` (design). The old ID stays in `legacy_id`, so `/factory:deliver 003` still finds `DEV-003`. Branches, handoff files, logs and the journal keep the old ID as history.
- Tasks without a priority get `normal`.
- Journal entries covered by old feedback reports are marked **Reported**; `reports/` moves into the external backup.

Each release migration is rehearsed in a sandbox first: the [sandbox helper](../scripts/migration-sandbox.mjs) copies the catalog and legacy records into a separate repository, the migration runs there, and you approve the exact list of changes before anything live is written. See the [0.5.0 release migration](migrations/0.5.0-release.md) for the full procedure and recovery.

## Upgrading to 0.6.0

0.6.0 changes existing task files, so run `/factory:migrate 0.6.0` once after updating the plugin (and `/factory:codex` first if the project uses Codex), with no other factory session or scheduled `feedback` run active. A project still on 0.4.1 or earlier runs the 0.5.0 step first, in the same command. Until the migration runs, `/factory:tasks` shows tasks as `eligibility unknown: missing … (run /factory:migrate 0.6.0)` and doesn't pick one automatically, and definition and delivery report an unmigrated task and point to the migration instead of converting it.

- Workflow references move from body sections into the header: `implements`, `delivery` and `submitted` for code; `reviewer`, `approach`, `delivery`, `submitted`, `handoff`, `approval` and `dev_task` for design. Every task gets `depends_on`, `[]` unless you name prerequisites in the preview.
- The body becomes General description, Goals, Scope of work and Acceptance criteria. Old Problem, Approach, Brief and Out of scope text moves into them word for word; task-specific Verification checks become acceptance criteria. Log lines are kept.
- `done` tasks get the same rewrite but are approved in bulk, with unclear references left `null` and the original text kept in `migration.md`.

0.6.0 also changes delivery without a migration: for a project with a remote, delivery now pushes the branch and opens a pull request at the end, and publishes the STR evidence to a `factory-evidence` branch. Set `pull_requests: off` in the catalog's `settings.md` to keep the old behaviour. See the [0.6.0 release migration](migrations/0.6.0-release.md) for the full procedure and recovery.

## Upgrading to 0.6.1

0.6.1 changes no records. Run `/factory:migrate 0.6.1` once after updating the plugin (and `/factory:codex` first if the project uses Codex, so `$factory-settle` is installed): it checks that the 0.6.0 step is verified and records the `0.6.1` checkpoint, nothing else. A project still on 0.5.0 or earlier runs the earlier steps first, in the same command.

- Finish or pause open deliveries before updating. Locks now carry an `owner` file; a lock taken by a 0.6.0 session has none, so a 0.6.1 session that meets it asks you before taking it over.
- **Behaviour change:** `/factory:tasks` and delivery's start first run the new `/factory:settle`, which marks a task `done` when its PR was merged and nothing would be lost, and lists the rest under **Needs attention**. Reading PR states needs the `gh` CLI; without it the overview says so and settles nothing.
- Reviewers now run on the other agent (Codex from Claude Code, Claude Code from Codex) when the session can start it, and fall back to a fresh same-agent subagent otherwise.

See the [0.6.1 release migration](migrations/0.6.1-release.md) for the procedure and rollback.