Upgrade notes
The steps by hand that a release asked for, one heading per change, newest first. An update's pull request names the ones it needs, so read these only when it does. A repository coming from an old release takes them oldest first, from the bottom of the page up, as Updating says.
Grouped checks
From this release on, a pull request's list of checks shows most of the factory's jobs in three groups, Pull request, Tickets, and Default branch, so a group with nothing to do shows as one skipped row, not a row for each of its jobs. Nothing in your settings has to change. The rules the factory makes require statuses, such as "Review verdict", whose names stay the same.
A rule you made yourself may require one of the factory's jobs by its
row's name. Look in your repository's Settings, under Rules and
Branches, at each rule's list of required checks. A name such as
factory / Record the verdict no longer appears, so a pull request
waits for it forever. Change it to the job's new name, which adds the
group, such as factory / Pull request / Record the verdict.
Workflows lists each group's jobs. The
rows of Review and Answer, such as factory / Review / Session, and
review / Factory files in step, keep their names.
It worked when a pull request opened after the update no longer shows a required check as "Expected — Waiting for status to be reported".
The poller reads your settings
From this release, a poller you host
reads tickets.board,
tickets.columns,
tickets.labels, and
builds from your settings on your default
branch, so its environment needs only FACTORY_REPOSITORY and
FACTORY_BOARD_TOKEN. A scheduled poller, yours or your organization's,
already read them, and nothing changes for it.
- Merge the pull request that updates the factory.
- Run the poller's image of the version on the
version:line of.claude/factory.lock, as Hosting the poller shows. - Take the variables it no longer reads out of its environment: What it reads lists them. Until you do, it ignores them, and names each one in its log when it starts.
It worked when the poller's log, wherever your host keeps a container's output, shows the settings it read, such as:
settings from .claude/factory.lock on main: board 1, ready column "Ready", label "factory", 20 builds an hourFollow-ups in the pull request
From this release on, what a session noticed and did not fix is listed in its pull request, for you to decide about. There is no follow-ups ticket anymore, and the factory no longer knows its label.
-
Before the update, delete the line
follow-up:undertickets.labels, if your settings or a preset of yours has one. Until you do, no pull request opens for the release, and the job "Open the updates' pull requests" fails with:.claude/factory.yaml: tickets.labels.follow-up: unknown key -
After it, if a "Follow-ups" ticket is open, write a ticket in your ticket system for each line you still want, and close it. Nothing builds it anymore, since it has no criteria.
-
Take any step about the follow-ups ticket out of your own instructions for the coding agent, such as
CLAUDE.md, which win over the factory's rules, and out of a plugin of your own.factory follow-uptakes a title and a text now, not a file and a line. -
If you host the poller, take
FACTORY_FOLLOW_UP_LABELout of its environment, if you set it there.
It worked when factory config check prints ✓ The settings are valid.
after the update, and no open ticket is titled "Follow-ups".
Tickets across repositories
From this release on, a ticket can name several repositories. Nothing in your settings has to change. Two things can ask something of you:
- A repository renamed since it was set up still has its old name in its
repositoryline. Its next pull request fails the check "Factory files in step", with both names. Change the line, runfactory sync, and commit what it writes. - A heading of your own named Repositories, under
repositoriesintickets.fields, now holds the factory's. Give yours another name.
The pull request that updates to it also adds one folder to
.claude/settings.json: the one other repositories are cloned into, so a
session can edit there.
Cloud runs in three jobs
From this release on, each run that uses your coding agent is three jobs, so the agent and a sign-in to your code host are never in the same one. Nothing in your settings has to change. Four things differ:
- The pull request that updates to it gets no automated review, where
the review is on, because your default branch's workflow does not run one
yet and the new one is not merged. Its "Review verdict" stays waiting. Read
it yourself, then add the
verdict-overridelabel. - A review you submit on that pull request starts a run that fails, in "Answer / Prepare". It runs the new workflow with the old version of the factory. No rule requires it, and it passes once the update has merged.
- A build's commits are not signed, where they were. A rule that requires signed commits stops its pull requests from merging.
- A session reaches only the npm registry unless you list more under
builds.hosts, and neither Docker nor Git LFS works in it (What a session can use).
It worked when the next pull request you mark ready gets a review.
Moving to one install on your machine
This is for a repository whose package.json lists
@davidbyoung/software-factory. Each such repository installed the
factory for itself and holds about ten workflow files. Now the factory
is installed once on a machine, and a repository holds two. The update
job does not make this move: close the pull request Dependabot opens for
this release, and do these steps in the repository's checkout.
-
Install the factory on your machine, and take it out of the repository:
npm install -g @davidbyoung/software-factory@latest npm uninstall @davidbyoung/software-factory -
If you follow a preset, it was an npm package and is now a repository. Create that repository on your code host, put what the package held, its
factory-preset.yaml,agents/, andskills/, at its root, and push it (Write a preset). Thennpm uninstallthe package, and delete its name frompresetsin.claude/factory.yaml. If the update in step 3 then stops on a setting the preset supplied, write that setting in.claude/factory.yamluntil step 4 adds the preset again. -
Update:
factory updateThe factory 0.1.15 → 0.3.0 ✓ Wrote 21 files and deleted 12. Commit them on a branch and open a pull request.It writes
.github/workflows/factory.ymland.github/workflows/factory-review.yml, deletes the workflow files they replace, and rewrites the factory's other files.If it stops instead, the line it prints names what your settings lack. Follow the section for that line, and then run
factory updateagain: Moving to settings version 2 for a line that saysversion: must be 2, Naming every column for one that saystickets.columnsis required, and Naming build branches for one that sayscode-host.branch-nameis required. -
Add the preset again, by its repository's name, with
factory preset add. -
Tidy what the old install left:
- If
package.jsonlists no dependencies and nothing else of yours, delete it, withpackage-lock.jsonand thenode_modules/line in.gitignore. - If
.github/dependabot.ymlhas a group for the factory or for a preset, delete the group, and its name from any other group'sexclude-patterns. Dependabot no longer sees either. Dependency bots has theignoreentry to add to thegithub-actionsupdate when Dependabot updates your workflow files.
- If
-
Commit all of it on a branch, and open a pull request. Three of its checks behave differently on this one pull request, since your default branch still holds the old workflows:
- "Review verdict" stays waiting where the automated review is on,
because the old workflow that posts it listens for a review workflow
this pull request deletes. Read the review yourself, then add the
verdict-overridelabel to merge. - "Factory files in step" is now named
review / Factory files in step. If a rule of your repository requires it by name, change the name there (Workflows). - A review you submit on it starts a run, "Answer the review", that fails. It runs the new workflow with the old version of the factory, which your default branch still names. No rule requires it, and it passes once this pull request has merged.
- "Review verdict" stays waiting where the automated review is on,
because the old workflow that posts it listens for a review workflow
this pull request deletes. Read the review yourself, then add the
It worked when every other check on the pull request passes, and
factory doctor shows the version the repository names:
✓ The factory 0.3.0, the newest releaseLabeling your open tickets
From this release the factory works only on tickets with its label
(Which tickets are the factory's).
Before it, every open ticket was the factory's, so you label each open
ticket once, before you merge the update, and no card changes column.
Run this on the update's branch, after factory update or the
factory init that opened the update's pull request:
$ factory ticket adopt --all-open
labeled #4, #31, #35, #40, #41, #44, #47, #50, #51, #53, #54, #57, #61, #63
✓ 14 open tickets carry factoryRunning it again labels nothing, and says
✓ 14 open tickets carry factory; none needed it.
Read the list. For a ticket the factory shouldn't touch, remove the label in your ticket system, before or after you merge: the factory then leaves it where it is.
If you renamed the label under
tickets.labels and host your own
poller, update the poller too, as
The poller reads your settings says:
it then reads the new name from your settings.
It worked when factory status lists the tickets it listed before
the update, less any you took the label off.
A spec for every visible change
From this release, a change your users will see, and that isn't small,
gets the spec label and a Spec, a design, and a list of
tasks in its ticket, whatever
specs says. Before it, a repository with
specs: none, or no specs line, which means the same, got only a list
of acceptance criteria. Nothing stops on the update: tickets refined
earlier build as they are, and the next one refinement writes has the
longer shape.
factory specs change-name N is gone. A script of yours that ran it
runs factory specs new N and factory specs finish N instead
(Your repository's commands).
The next time you run factory init, it asks once which spec tool you
use, and writes your answer; choosing OpenSpec installs it.
Naming build branches
From this release, every repository says how a build names its branch,
in code-host.branch-name. Before it, a
build named its branch issue- with the ticket's number and a few words
of its title, such as issue-47-terminal-color, and no setting said so.
So a repository set up earlier has no branch-name, or writes
code-host: github on one line, and every command that reads the
settings stops with code-host.branch-name: is required.
There is no pattern that keeps the old names, since they held words a session chose. The pattern you choose names new builds only: branches already pushed keep their names, and their pull requests carry on as before.
So the update to that release cannot sync: factory update stops with
the same line. On your default branch, from your repository's root, run
factory init at the new release:
FACTORY_VERSION=$(npm view @davidbyoung/software-factory version) factory initA plain factory init would run the release you are leaving, which the
lock still names. npm view prints the newest release, and
FACTORY_VERSION runs this one command at the release it names
(Which version runs).
Init keeps everything your settings already say, so it asks again only
what they lack: how a build names its branch, offering {ticket}. Press
Enter to keep it, or type your team's pattern, such as
feature/{user}/{ticket}; code-host
lists what a pattern can hold. If the update also needs Naming every
column, the same run fills in both. When a
preset you follow sets the pattern, init asks nothing.
Then it opens the update's pull request itself, as
Naming every column says.
You can add the lines by hand instead:
code-host:
type: github
branch-name: "{ticket}"Keep the quotes: without them, YAML reads {ticket} as a map rather
than as text. After adding them by hand, run factory update again,
commit what changed on a branch, .claude/factory.yaml included, and
open a pull request.
It worked when factory config check prints
✓ The settings are valid., and factory ticket branch 12 prints the
branch a build of ticket 12 would push.
In an organization, factory init --org now asks for the pattern
and writes it in the preset. If yours was set up before that, add the
lines above to factory-preset.yaml in your factory-config. The next
factory init in a new repository then lists the pattern as
Branch names, and does not ask. A repository that has its own
branch-name keeps it: delete that line to follow the preset's.
Naming every column
From this release, a repository with a board names a column for all six
states in tickets.columns. Before
it, a state you left out used the factory's own column name, so a
repository set up earlier has no columns block, or one with only the
states whose column has another name. A repository with no
tickets.board needs nothing.
Until the block names all six, every command that reads the settings stops with one of these, the second naming the states you left out:
.claude/factory.yaml: tickets.columns: is required with tickets.board: run factory init to choose which of board 3's columns shows each state
.claude/factory.yaml: tickets.columns: building and done have no column: give each a column, a list of columns, or none, or run factory init to choose themSo the update to that release cannot sync: factory update
(Doing it yourself) stops with the same line. On
your default branch, from your repository's root, run factory init at
the new release:
FACTORY_VERSION=$(npm view @davidbyoung/software-factory version) factory initA plain factory init would run the release you are leaving, which the
lock still names. npm view prints the newest release, and
FACTORY_VERSION runs this one command at the release it names
(Which version runs).
Init keeps everything your settings already say and adds only the missing states. It shows the whole block it saves, the states you had and the ones it added. A state whose column of the factory's name is on your board, which is the column the factory was reading for it, is added with no question:
Your settings give no column to building or done.
Board 3 has a column of the factory's name for each:
State Column
backlog Todo
refining none, shows in Todo
ready none
building In Progress
review Code review
done DoneFor a state whose column your board doesn't have, init asks which column shows it, offering your columns, no column, or a new column with the factory's name. When it needs Claude Code to suggest columns, it asks as You already have a board shows.
Init then lists what it will do and asks "Go ahead?". Once you type
y, it syncs at the new release, which rewrites the factory's files
for it, runs your gate, and opens a pull request titled "Change the
software factory's settings" from a new branch, set-up-factory, or
set-up-factory-2 when that name is taken. It holds .claude/factory.yaml and every file the new
release wrote, so it is the update: merge it as you would the update
job's.
You can add the lines by hand instead. For each state your block leaves
out, the factory used the name in the table in
tickets.columns, so write that name
to keep things as they were. If your board has no column of that name,
write one of your columns, or none. Then run factory update again,
which rewrites the factory's files for the new version, commit what
changed on a branch, .claude/factory.yaml included, and open a pull
request.
It worked when factory config check prints
✓ The settings are valid., and factory sync --check passes.
Moving to settings version 2
One release changes the shape of .claude/factory.yaml, from version 1 to
version 2, and no command converts the file: you move it by hand, once.
Until you do, every command that reads the settings stops with:
.claude/factory.yaml: version: must be 2: this file is version 1, see "Moving to settings version 2" in docs/updating.mdSo factory update cannot sync to that release until the file is moved.
A release since this page moved prints this section's address in place of
docs/updating.md.
From step 1 until step 4, no other factory command works in the
repository, since the version the lock still names refuses a version 2
file. On a branch:
- Edit
.claude/factory.yamlas the table and the example below show. A row applies only when your file has that key. - Add
commands.gate, which is new and which a build cannot finish without. Put in it the commands yourCLAUDE.mdnames as the check before a task is done, usually what CI runs, such asnpm run check. - Once
commands.gateholds the gate, change the gate's prose in yourCLAUDE.mdto point atfactory gate, so the two cannot differ. - Run
factory update, thenfactory config check, and commit what changed.
It worked when factory config check prints
✓ The settings are valid., and factory sync --check passes.
Each key that moved or changed shape
| Version 1 | Version 2 |
|---|---|
version: 1 |
version: 2 |
before-commit, at the top of the file |
commands.before-commit |
build-setup, at the top of the file |
commands.build-setup |
plugins, one list, each item with a role |
plugins, grouped by phase, each plugin listed under its role's key instead of a role field |
A plugin with role: mockups |
The one block plugins.refine.mockups |
A plugin with role: builder |
An item of the list plugins.build.builders |
A plugin with role: reviewer |
An item of the list plugins.build.reviewers |
ci-review |
pr-review: true, in place of the block |
specs, one word |
Still one word. It is now also a block, with type and check |
Every other key keeps its name, its place, and its meaning.
factory-test-reviewer still runs by default, with nothing to write. Once
you write plugins.test.reviewers, that
list is the whole list, so factory-test-reviewer runs only when you list
it there.
Before:
version: 1
repository: your-name/your-repo
specs: openspec
before-commit:
- npm run -s format:check
- npx tsc --noEmit
build-setup:
- npx playwright install --with-deps chromium
plugins:
- skill: design-mockups
role: mockups
- skill: add-endpoint
role: builder
labels:
- new-endpoint
- agent: migration-reviewer
role: reviewer
files:
- db/migrations/**After:
version: 2
repository: your-name/your-repo
code-host:
type: github
branch-name: "{ticket}"
specs: openspec
commands:
before-commit:
- npm run -s format:check
- npx tsc --noEmit
build-setup:
- npx playwright install --with-deps chromium
# New, and needed: what a build runs to check its change.
gate:
- npm run check
plugins:
refine:
mockups:
skill: design-mockups
build:
builders:
- skill: add-endpoint
labels:
- new-endpoint
reviewers:
- agent: migration-reviewer
files:
- db/migrations/**The code-host block is not in the table, since nothing moved into it:
code-host.branch-name is new, from
Naming build branches.
A file moved only partway says which key is left:
before-commit: moved to commands.before-commit, or
plugins: must be grouped by phase: refine, build, test, conflicts.
What version 2 adds
Nothing here was in a version 1 file, so nothing moves. The first is needed, and the rest are worth a look while the file is open.
- The gate. A build used to check its change with the commands your
agent's instructions named. It now runs
factory gate, which runscommands.gate. Copy those commands there, or a build stops withcommands.gate is not set. - One test alone, and one end-to-end spec alone:
commands.test-oneandcommands.end-to-end, which the skills run in place of naming a test runner. - The checks for browser end-to-end tests moved out of
factory-test-reviewerinto a second built-in agent,factory-e2e-reviewer. A repository with such tests keeps them by settingcommands.end-to-endand listing both agents underplugins.test.reviewers. - Coverage, and the lock file:
commands.coverageandcommands.relock. - Four more roles for plugins: your own refiner, prover, test reviewers, and conflict resolvers (Your own skills and agents).
- The default branch is read, not assumed. A repository whose default
branch is not
mainneeds no setting:factory syncwrites the branch's name where the workflows need it.