@davidbyoung/software-factory 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/claude-code.d.mts +16 -0
- package/dist/agent/claude-code.mjs +75 -3
- package/dist/agent/index.d.mts +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/agent/types.d.mts +24 -0
- package/dist/agent/types.mjs +3 -0
- package/dist/board.mjs +9 -11
- package/dist/code-host/github.mjs +4 -0
- package/dist/code-host/types.d.mts +2 -0
- package/dist/columns-suggest.d.mts +52 -0
- package/dist/columns-suggest.mjs +259 -0
- package/dist/config.d.mts +6 -1
- package/dist/config.mjs +45 -8
- package/dist/doctor.d.mts +3 -0
- package/dist/doctor.mjs +133 -5
- package/dist/explain.mjs +1 -1
- package/dist/init.mjs +155 -7
- package/dist/lib/work-status.d.mts +10 -7
- package/dist/lib/work-status.mjs +20 -19
- package/dist/npmrc.d.mts +29 -0
- package/dist/npmrc.mjs +98 -0
- package/dist/poller.mjs +2 -2
- package/dist/preset-commands.d.mts +0 -2
- package/dist/preset-commands.mjs +2 -12
- package/dist/preset.d.mts +4 -0
- package/dist/preset.mjs +10 -0
- package/dist/runner/github-actions.mjs +47 -10
- package/dist/runner/types.d.mts +13 -0
- package/dist/setup.d.mts +3 -1
- package/dist/status.mjs +1 -1
- package/dist/sync.d.mts +7 -0
- package/dist/sync.mjs +66 -2
- package/dist/ticket.mjs +1 -1
- package/dist/tickets/github.mjs +10 -2
- package/dist/tickets/types.d.mts +3 -0
- package/dist/tools.d.mts +4 -1
- package/dist/tools.mjs +9 -2
- package/docs/configuration.md +33 -5
- package/docs/design.md +15 -0
- package/docs/developing.md +15 -6
- package/docs/existing-repo.md +104 -31
- package/docs/github/by-hand.md +4 -0
- package/docs/github/reference.md +5 -0
- package/docs/github/setup.md +141 -8
- package/docs/limitations.md +0 -8
- package/docs/presets.md +5 -9
- package/docs/removing.md +2 -2
- package/package.json +1 -1
- package/settings.schema.json +45 -15
- package/skills/factory-deps/SKILL.md +4 -0
package/docs/developing.md
CHANGED
|
@@ -53,6 +53,7 @@ marked working below exist only in these docs.
|
|
|
53
53
|
| Updates through Dependabot, which `factory-deps` completes with `factory sync` | Working |
|
|
54
54
|
| `factory board --dry-run` | Working |
|
|
55
55
|
| Your own column names on a board | Working |
|
|
56
|
+
| `init` suggesting a board's columns through the coding agent | Working |
|
|
56
57
|
| A UI reviewer for any website | Working |
|
|
57
58
|
| Built-in measurements for any website | Working |
|
|
58
59
|
| A design skill for any website | Working |
|
|
@@ -248,12 +249,12 @@ whole or not at all, and `factory ticket supports GROUP` prints `yes` or
|
|
|
248
249
|
`no`. A skill asks before it relies on one; a command that needs a group
|
|
249
250
|
its adapter lacks exits non-zero, names the group, and posts nothing.
|
|
250
251
|
|
|
251
|
-
| Group | In `Tickets` | Operations
|
|
252
|
-
| --------------- | -------------- |
|
|
253
|
-
| `board` | `board` | Read every card and the board's fields; add a ticket to the board; set its fields
|
|
254
|
-
| `blockers` | `blockers` | List what a ticket waits on; record that it waits on another; remove that
|
|
255
|
-
| `label-history` | `labelHistory` | Whether a label was ever removed from a ticket, which is how the factory knows the owner took `spec` off
|
|
256
|
-
| `attachments` | `attachments` | Comment with images attached, or write a body with them
|
|
252
|
+
| Group | In `Tickets` | Operations |
|
|
253
|
+
| --------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
254
|
+
| `board` | `board` | Read every card and the board's fields; list a board's columns, in the board's order; add a ticket to the board; set its fields |
|
|
255
|
+
| `blockers` | `blockers` | List what a ticket waits on; record that it waits on another; remove that |
|
|
256
|
+
| `label-history` | `labelHistory` | Whether a label was ever removed from a ticket, which is how the factory knows the owner took `spec` off |
|
|
257
|
+
| `attachments` | `attachments` | Comment with images attached, or write a body with them |
|
|
257
258
|
|
|
258
259
|
The GitHub adapter has every group, except that `attachments` needs the
|
|
259
260
|
GitHub CLI, so an adapter built without it has none. With
|
|
@@ -420,6 +421,14 @@ host, which it reads from the git remote: each code host says which
|
|
|
420
421
|
remotes are its own. The coding agent has no setting until there is a
|
|
421
422
|
second.
|
|
422
423
|
|
|
424
|
+
A coding agent also answers one question for `init`: given a prompt and
|
|
425
|
+
the shape of the answer as a JSON schema, it runs once, with no tools and
|
|
426
|
+
none of the repository's settings or hooks, and returns the answer or
|
|
427
|
+
the reason it has none. Claude Code runs `claude -p` on its smallest
|
|
428
|
+
model, from an empty folder. The prompt, the checks on the answer, and
|
|
429
|
+
what `init` prints live in `src/columns-suggest.mts`, which names no
|
|
430
|
+
agent and no ticket system, so a second agent adds only its `answer`.
|
|
431
|
+
|
|
423
432
|
The tests show a tool that the factory does not ship going through all
|
|
424
433
|
three commands: `tests/fake-tools.ts` has a ticket system with a site
|
|
425
434
|
address and a token of its own, and a coding agent whose configuration is
|
package/docs/existing-repo.md
CHANGED
|
@@ -50,44 +50,117 @@ complete settings file for a PHP library.
|
|
|
50
50
|
|
|
51
51
|
## You already have a board
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
the
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
A ticket is always in one of six [states](workflow.md#the-six-states),
|
|
54
|
+
and the factory shows each state as a column of your board. Its own names
|
|
55
|
+
for them are Backlog, In refinement, Ready, In progress, In review, and
|
|
56
|
+
Done, and the settings call the states `backlog`, `refining`, `ready`,
|
|
57
|
+
`building`, `review`, and `done`, in that order. Capitals don't matter, so
|
|
58
|
+
your "In Progress" is its "In progress".
|
|
59
|
+
|
|
60
|
+
When you run `factory init`, step 2 of the
|
|
61
|
+
[quick start](quick-start.md#2-set-it-up), it lists your boards to choose from. If the
|
|
62
|
+
one you choose has all six columns, there is nothing to set up. If it
|
|
63
|
+
lacks any, init asks your coding agent, Claude Code, which of your
|
|
64
|
+
columns shows each state, and shows you the answer before it changes
|
|
65
|
+
anything. This is one short request with no tools, made with the sign-in
|
|
66
|
+
Claude Code already has, and it sends your column names and nothing else.
|
|
67
|
+
On a board with the columns Todo, In Progress, Code review, and Done:
|
|
58
68
|
|
|
59
69
|
```text
|
|
60
|
-
|
|
70
|
+
? Which board? Use an existing one: Shop board (#3)
|
|
71
|
+
|
|
72
|
+
Board 3 has the columns Todo, In Progress, Code review, and Done.
|
|
73
|
+
Asking Claude Code which of them shows each of the factory's six states...
|
|
74
|
+
|
|
75
|
+
State Column
|
|
76
|
+
backlog Todo
|
|
77
|
+
refining no column, shows in Todo
|
|
78
|
+
ready no column: builds start only when you ask
|
|
79
|
+
building In Progress
|
|
80
|
+
review Code review
|
|
81
|
+
done Done
|
|
82
|
+
|
|
83
|
+
? Use these columns? (Use arrow keys)
|
|
84
|
+
❯ Yes
|
|
85
|
+
Change some
|
|
86
|
+
No: add the factory's columns instead
|
|
61
87
|
```
|
|
62
88
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
89
|
+
A state with no column shows its tickets in the column of the state
|
|
90
|
+
before it, so here a ticket being refined stays in Todo. With no column
|
|
91
|
+
for ready, you start each build with `/factory-build N` in a session,
|
|
92
|
+
rather than by moving its ticket on the board. That is the factory's
|
|
93
|
+
default, so the settings need nothing more: init offers no column for
|
|
94
|
+
ready only when builds start when you ask.
|
|
95
|
+
|
|
96
|
+
- **Yes** saves the table in your settings, `.claude/factory.yaml`, with
|
|
97
|
+
only the states whose column isn't the factory's own name:
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
tickets:
|
|
101
|
+
board: 3
|
|
102
|
+
columns:
|
|
103
|
+
backlog: Todo
|
|
104
|
+
refining: none
|
|
105
|
+
ready: none
|
|
106
|
+
review: Code review
|
|
80
107
|
```
|
|
81
108
|
|
|
109
|
+
- **Change some** lets you pick the states to change from a list, then,
|
|
110
|
+
for each, pick one of your columns, no column, or a new column with the
|
|
111
|
+
factory's name, which init adds to your board. Each state needs a column
|
|
112
|
+
of its own: two states can't share one.
|
|
113
|
+
- **No** adds each of the factory's six columns your board lacks, here
|
|
114
|
+
Backlog, In refinement, Ready, and In review, and saves nothing. Your
|
|
115
|
+
Todo, In Progress, Code review, and Done columns stay. In Progress and
|
|
116
|
+
Done are used, since their names match. The factory ignores the tickets
|
|
117
|
+
in Todo and Code review: nothing moves or builds them until you move
|
|
118
|
+
them to one of its columns.
|
|
119
|
+
|
|
120
|
+
Init ends by running its checks. When the columns are right, you see:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
Checks
|
|
124
|
+
✓ Board 3 has every column the settings name
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Init stops, and changes nothing, when it can't get an answer:** when
|
|
128
|
+
Claude Code isn't installed or isn't signed in, or when its answer can't
|
|
129
|
+
be used, such as one column for two states. It prints why. Then do one of
|
|
130
|
+
these, and run `factory init` again:
|
|
131
|
+
|
|
132
|
+
- install Claude Code and sign in, by running `claude` once;
|
|
133
|
+
- write a `columns` block like the one above in `.claude/factory.yaml`
|
|
134
|
+
yourself, with your own columns, as
|
|
135
|
+
[`tickets.columns`](configuration.md#ticketscolumns) describes: init
|
|
136
|
+
then doesn't ask;
|
|
137
|
+
- add the six columns to your board yourself, so init has nothing to ask.
|
|
138
|
+
|
|
139
|
+
Running init again is safe: it keeps what your settings already say. Once
|
|
140
|
+
they have a `columns` block, init doesn't ask about columns again. If you
|
|
141
|
+
change your board's columns later, edit the block, or delete it and run
|
|
142
|
+
`factory init` again for a new suggestion.
|
|
143
|
+
|
|
144
|
+
Init suggests one column for each state. When two of your columns mean the
|
|
145
|
+
same state, such as Code review and QA, write a list in the block
|
|
146
|
+
yourself: see [`tickets.columns`](configuration.md#ticketscolumns).
|
|
147
|
+
|
|
148
|
+
What else to expect on a board you already use:
|
|
149
|
+
|
|
150
|
+
- **The factory never renames or deletes your columns,** and only adds the
|
|
151
|
+
ones you agree to.
|
|
152
|
+
- **It adds three fields to your board,** Session, Runs in, and Cost, and
|
|
153
|
+
overwrites them on every sync, so don't type into them. Your own fields
|
|
154
|
+
are never touched. [`tickets.fields`](configuration.md#ticketsfields)
|
|
155
|
+
says what each holds.
|
|
82
156
|
- **Your board's own automations**, such as moving a closed ticket to
|
|
83
|
-
Done, have not been tested alongside the factory. Turn them off if
|
|
84
|
-
jump unexpectedly.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
organization's.
|
|
157
|
+
Done, have not been tested alongside the factory. Turn them off if
|
|
158
|
+
tickets jump unexpectedly.
|
|
159
|
+
|
|
160
|
+
To see what the factory will do with your board at any time, run
|
|
161
|
+
`factory board check`. It lists each state's column, as the table above
|
|
162
|
+
does, and ends with any problem, such as a column your settings name that
|
|
163
|
+
the board lacks.
|
|
91
164
|
|
|
92
165
|
## You already have agent instructions, settings, or CI workflows
|
|
93
166
|
|
package/docs/github/by-hand.md
CHANGED
|
@@ -312,6 +312,10 @@ gh secret set FACTORY_BUILD_TOKEN # builds in the cloud, with no board
|
|
|
312
312
|
gh secret set FACTORY_AUTOMERGE_TOKEN # pull requests that merge themselves
|
|
313
313
|
```
|
|
314
314
|
|
|
315
|
+
For a private npm registry, each variable your `.npmrc` reads is stored
|
|
316
|
+
twice, with `gh secret set NAME` and `gh secret set NAME --app dependabot`:
|
|
317
|
+
[Private npm packages](setup.md#private-npm-packages).
|
|
318
|
+
|
|
315
319
|
Two optional settings:
|
|
316
320
|
|
|
317
321
|
- **Paying by the token instead of a subscription:** store an API key from
|
package/docs/github/reference.md
CHANGED
|
@@ -40,6 +40,7 @@ The "Removing it" column says what `factory remove` does with each.
|
|
|
40
40
|
| ------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
41
41
|
| Secrets and variables named `FACTORY_...` | You create them | Delete them |
|
|
42
42
|
| `CLAUDE_CODE_OAUTH_TOKEN` | You create it, for the automated review and builds in the cloud | Delete it, unless another workflow uses it |
|
|
43
|
+
| The secrets your `.npmrc` reads, such as `NPM_TOKEN`, for Actions and for Dependabot | `init`, when you paste them | Leave them if your own CI uses them; otherwise delete both copies |
|
|
43
44
|
| Labels: `merge: automatic`, `merge: manual`, `verdict: override`, `follow-up`, `spec` | First use | Delete them. Deleting a label removes it from every ticket |
|
|
44
45
|
| A CI check that the factory's files are in step | Setup | Goes with `factory-check.yml` |
|
|
45
46
|
| A "Review verdict" required check, as the ruleset "Software factory" | `init`, when the review is on; or you, in your branch rules | Delete the ruleset, under Settings, Rules, **first**, or pull requests wait on it forever |
|
|
@@ -253,6 +254,10 @@ factory.
|
|
|
253
254
|
session step's timeout.
|
|
254
255
|
- GitHub's shortest schedule is every five minutes, and scheduled runs can
|
|
255
256
|
start late.
|
|
257
|
+
- **A pull request from a fork can't install a private package.** GitHub
|
|
258
|
+
gives a fork's pull request no secrets, so the factory check fails at
|
|
259
|
+
`npm ci` on one, in a repository with
|
|
260
|
+
[private npm packages](setup.md#private-npm-packages).
|
|
256
261
|
- Public repositories are not billed for Actions minutes.
|
|
257
262
|
- GitHub switches off scheduled workflows in a public repository with no
|
|
258
263
|
activity for 60 days.
|
package/docs/github/setup.md
CHANGED
|
@@ -42,13 +42,14 @@ machine, which is all the [quick start](../quick-start.md) needs.
|
|
|
42
42
|
|
|
43
43
|
It then asks only what your parts need:
|
|
44
44
|
|
|
45
|
-
| Question | Asked when you chose
|
|
46
|
-
| ------------------------------------- |
|
|
47
|
-
| Which board | A board
|
|
48
|
-
| Which files may merge without you | Pull requests that merge themselves
|
|
49
|
-
| Where the poller runs | Builds that start from the board
|
|
50
|
-
| The token `claude setup-token` prints | The review, and builds in the cloud
|
|
51
|
-
| A GitHub access token | A board, builds in the cloud, and pull requests that merge themselves
|
|
45
|
+
| Question | Asked when you chose | What you do |
|
|
46
|
+
| ------------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
47
|
+
| Which board | A board | Choose a new one, made with the factory's columns, or a Project you already have |
|
|
48
|
+
| Which files may merge without you | Pull requests that merge themselves | Type their patterns, such as `docs/**`. Start with a short list |
|
|
49
|
+
| Where the poller runs | Builds that start from the board | Choose a schedule on GitHub Actions or a server you host. [Builds in the cloud](../builds.md) compares them |
|
|
50
|
+
| The token `claude setup-token` prints | The review, and builds in the cloud | It runs the command for you. Follow what it says, then paste the token it prints |
|
|
51
|
+
| A GitHub access token | A board, builds in the cloud, and pull requests that merge themselves | It opens GitHub's page with the right scopes checked. Choose an expiry, generate the token, and paste it |
|
|
52
|
+
| The token your `.npmrc` reads | Nothing: it asks whenever `.npmrc` reads one ([Private npm packages](#private-npm-packages)) | Paste a token that can only read from your registry |
|
|
52
53
|
|
|
53
54
|
A token is typed into a masked prompt and goes straight to your
|
|
54
55
|
repository's secrets on GitHub. It is never printed or written to a file.
|
|
@@ -120,10 +121,142 @@ factory doctor
|
|
|
120
121
|
|
|
121
122
|
runs the checks again at any time: the settings, the factory's files, the
|
|
122
123
|
installed version, who the GitHub CLI is signed in as, that each secret
|
|
123
|
-
your parts read is set,
|
|
124
|
+
your parts read is set, those for
|
|
125
|
+
[private npm packages](#private-npm-packages), and the board's columns. GitHub never lets a
|
|
124
126
|
secret be read back, so a wrong one shows when the first run that needs it
|
|
125
127
|
fails, naming it.
|
|
126
128
|
|
|
129
|
+
## Private npm packages
|
|
130
|
+
|
|
131
|
+
For a repository that installs a package from a private registry, such as
|
|
132
|
+
your company's own packages or a private [preset](../presets.md). At the
|
|
133
|
+
end, the factory's workflows install it as your machine does, and
|
|
134
|
+
Dependabot offers its new versions.
|
|
135
|
+
|
|
136
|
+
### 1. Read the token from a variable in `.npmrc`
|
|
137
|
+
|
|
138
|
+
The workflows sign in to your registry the way npm does on your machine:
|
|
139
|
+
from the `.npmrc` at the root of your repository, which you commit. It
|
|
140
|
+
needs two lines, one that sends your packages' scope to the registry and
|
|
141
|
+
one that reads the token from an environment variable:
|
|
142
|
+
|
|
143
|
+
```ini
|
|
144
|
+
@acme:registry=https://acme.jfrog.io/artifactory/api/npm/npm/
|
|
145
|
+
//acme.jfrog.io/artifactory/api/npm/npm/:_authToken=${NPM_TOKEN}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Your registry's documentation gives both lines with its own address. The
|
|
149
|
+
variable can have any name; the factory stores the token as a secret of
|
|
150
|
+
the same name, so wherever this section says `NPM_TOKEN`, use yours. On
|
|
151
|
+
your machine, set the variable in your shell's profile, such as
|
|
152
|
+
`export NPM_TOKEN=...`. If the token line is only in your own
|
|
153
|
+
`~/.npmrc`, move it into this file with the variable in place of the
|
|
154
|
+
token: the workflows read only this one.
|
|
155
|
+
|
|
156
|
+
**It worked when** `npm ci` succeeds on your machine with the variable
|
|
157
|
+
set.
|
|
158
|
+
|
|
159
|
+
#### GitHub Packages
|
|
160
|
+
|
|
161
|
+
Read `${GITHUB_TOKEN}` in the token line. In the workflows it is their own
|
|
162
|
+
token, which can read the packages that give this repository access, so
|
|
163
|
+
`init` asks for nothing and you skip step 2. On your machine, set
|
|
164
|
+
`GITHUB_TOKEN` to a personal access token with the `read:packages` scope.
|
|
165
|
+
Dependabot has no token of its own for it: in step 4, store that personal
|
|
166
|
+
access token with `gh secret set PACKAGES_TOKEN --app dependabot`, and
|
|
167
|
+
name `PACKAGES_TOKEN` in place of `NPM_TOKEN`.
|
|
168
|
+
|
|
169
|
+
### 2. Make a read-only token
|
|
170
|
+
|
|
171
|
+
On your registry, make a token that can only read, and only the packages
|
|
172
|
+
this repository installs. Builds and reviews in the cloud hold it while
|
|
173
|
+
they work, and they read tickets and pull requests that anyone with access
|
|
174
|
+
to the repository can write, so a read-only token is all that text could
|
|
175
|
+
ever lead one to give away.
|
|
176
|
+
|
|
177
|
+
### 3. Store it with `factory init`
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
factory init
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Under "Found", `init` lists `.npmrc` and the variable it reads. Then it
|
|
184
|
+
asks you to paste the token, rewrites the factory's workflows under
|
|
185
|
+
`.github/workflows/` to pass the token to npm, and stores it twice: as an
|
|
186
|
+
Actions secret, and as a Dependabot secret, since a workflow that
|
|
187
|
+
Dependabot's pull request starts can read only Dependabot secrets. If
|
|
188
|
+
`.npmrc` isn't listed under "Found", the token line is missing from the
|
|
189
|
+
file at your repository's root.
|
|
190
|
+
|
|
191
|
+
If your organization already shares the secret with this repository,
|
|
192
|
+
`init` does not ask for the Actions copy. It still asks for the Dependabot
|
|
193
|
+
copy, since only an organization admin can see whether the organization
|
|
194
|
+
sets that one: leave it empty if yours does. To set both once for every
|
|
195
|
+
repository, an organization admin runs:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
gh secret set NPM_TOKEN --org acme --visibility all
|
|
199
|
+
gh secret set NPM_TOKEN --org acme --visibility all --app dependabot
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### 4. Tell Dependabot the registry
|
|
203
|
+
|
|
204
|
+
Skip this without a `.github/dependabot.yml`, or when your organization
|
|
205
|
+
sets the registry for Dependabot, which an organization admin can tell
|
|
206
|
+
you. Otherwise add the registry, and name it in your npm entry, or
|
|
207
|
+
Dependabot never sees a new version of a package from there:
|
|
208
|
+
|
|
209
|
+
```yaml
|
|
210
|
+
registries:
|
|
211
|
+
acme: # any name; the npm entry uses it
|
|
212
|
+
type: npm-registry
|
|
213
|
+
url: https://acme.jfrog.io/artifactory/api/npm/npm/ # as in .npmrc
|
|
214
|
+
token: ${{secrets.NPM_TOKEN}} # the Dependabot secret from step 3
|
|
215
|
+
updates:
|
|
216
|
+
- package-ecosystem: npm
|
|
217
|
+
directory: /
|
|
218
|
+
registries: [acme]
|
|
219
|
+
schedule:
|
|
220
|
+
interval: weekly
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### 5. Check it, and merge
|
|
224
|
+
|
|
225
|
+
Run `factory doctor`. **It worked when** it shows:
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
✓ NPM_TOKEN is set, for installing what .npmrc names
|
|
229
|
+
✓ NPM_TOKEN is set for Dependabot, for installing on Dependabot's pull requests
|
|
230
|
+
✓ .github/dependabot.yml uses https://acme.jfrog.io/artifactory/api/npm/npm/ for its npm updates
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Without a `.github/dependabot.yml` there is no third line. A line that
|
|
234
|
+
starts with `?` is one `doctor` cannot check from the repository, such as
|
|
235
|
+
a secret or a registry your organization may set, which only an
|
|
236
|
+
organization admin can see. It fails nothing.
|
|
237
|
+
|
|
238
|
+
Then commit `.npmrc` and what `init` wrote on a branch, open a pull
|
|
239
|
+
request, and merge it as any other change. The pull request's own
|
|
240
|
+
"Factory check" is the last check: its "Install dependencies" step passes
|
|
241
|
+
once the workflows can sign in.
|
|
242
|
+
|
|
243
|
+
### Replacing the token
|
|
244
|
+
|
|
245
|
+
When the token expires, the next workflow fails at `npm ci` with a 401.
|
|
246
|
+
Store the new one in both places:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
gh secret set NPM_TOKEN
|
|
250
|
+
gh secret set NPM_TOKEN --app dependabot
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
or run `factory init` and answer yes when it asks to replace the secrets
|
|
254
|
+
already set. An organization admin runs the two commands in step 3
|
|
255
|
+
again instead.
|
|
256
|
+
|
|
257
|
+
If you rename the variable in `.npmrc`, the factory's commands stop and
|
|
258
|
+
say to run `factory sync`, which rewrites the workflows for the new name.
|
|
259
|
+
|
|
127
260
|
## Doing it by hand
|
|
128
261
|
|
|
129
262
|
[Setting up on GitHub by hand](by-hand.md) has every step `init` takes,
|
package/docs/limitations.md
CHANGED
|
@@ -48,9 +48,6 @@ as a code host's billing or what its workflows can see, are in
|
|
|
48
48
|
then guards the old branch and not the new one. After the rename, run
|
|
49
49
|
that command in each checkout, then `factory sync`, which writes the
|
|
50
50
|
name into two workflows.
|
|
51
|
-
- **A private [preset](presets.md) works on your machine, not yet in the
|
|
52
|
-
factory's workflows.** _[Planned](developing.md#what-is-built)_: the
|
|
53
|
-
workflows can't install a private package yet.
|
|
54
51
|
- **One lock file is rebuilt for you after a conflict,** the one
|
|
55
52
|
[`commands.relock`](configuration.md#commandsrelock) rebuilds, npm's by
|
|
56
53
|
default. A second, such as another package manager's beside the
|
|
@@ -71,11 +68,6 @@ as a code host's billing or what its workflows can see, are in
|
|
|
71
68
|
- **A state that takes a click to reach is the agent's to drive,** not the
|
|
72
69
|
command's.
|
|
73
70
|
- **No budgets.** What each ticket cost is recorded. Nothing caps it.
|
|
74
|
-
- **Without the global install, the command needs `--no-install`.**
|
|
75
|
-
Another package on npm is called `factory`. Where this one is not
|
|
76
|
-
installed, `npx` without `--no-install` offers to download and run that
|
|
77
|
-
one instead, so `npx --no-install factory` fails rather than run another
|
|
78
|
-
package.
|
|
79
71
|
- **Nothing retries on its own.** A build that stops waits for you.
|
|
80
72
|
- **A cloud build's commits are unsigned unless you give it a signing
|
|
81
73
|
key.** `factory init` makes one when you choose that part
|
package/docs/presets.md
CHANGED
|
@@ -391,16 +391,12 @@ it gets a pull request at its dependency bot's next run, as
|
|
|
391
391
|
|
|
392
392
|
A preset is an npm package, so a private one installs on your machine the
|
|
393
393
|
way any other private package does, from whichever registry your company
|
|
394
|
-
uses, through your repository's `.npmrc`.
|
|
395
|
-
|
|
394
|
+
uses, through your repository's `.npmrc`.
|
|
395
|
+
[Private npm packages](github/setup.md#private-npm-packages) sets up the
|
|
396
|
+
factory's workflows and Dependabot to install it too. Give the preset a
|
|
397
|
+
Dependabot group of its own as well, the way
|
|
396
398
|
[Dependency bots](github/reference.md#dependency-bots) does for the
|
|
397
|
-
factory
|
|
398
|
-
`.github/dependabot.yml`, so Dependabot sees its new versions.
|
|
399
|
-
`factory preset add` names either one that's missing.
|
|
400
|
-
|
|
401
|
-
_[Planned](developing.md#what-is-built)_: the factory's workflows can't
|
|
402
|
-
install a private package yet, so a private preset works on your machine
|
|
403
|
-
and not yet in the factory's workflows.
|
|
399
|
+
factory. `factory preset add` names what's missing.
|
|
404
400
|
|
|
405
401
|
**It worked when** `factory doctor` shows:
|
|
406
402
|
|
package/docs/removing.md
CHANGED
|
@@ -20,8 +20,8 @@ hook, label, and setting.
|
|
|
20
20
|
and one "Follow-ups" ticket.
|
|
21
21
|
- **On your board,** if you have one: three fields, Session, Runs in, and
|
|
22
22
|
Cost, which `factory init` adds when the board lacks
|
|
23
|
-
them, and the board's own Status, which the sync sets. `init` adds
|
|
24
|
-
|
|
23
|
+
them, and the board's own Status, which the sync sets. `init` adds the
|
|
24
|
+
columns your settings name that the board lacked.
|
|
25
25
|
- **Outside both,** only if you host the poller: the poller, wherever you
|
|
26
26
|
host it. `factory remove` names it in what is left by hand.
|
|
27
27
|
|
package/package.json
CHANGED
package/settings.schema.json
CHANGED
|
@@ -118,14 +118,26 @@
|
|
|
118
118
|
"additionalProperties": false,
|
|
119
119
|
"properties": {
|
|
120
120
|
"backlog": {
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
"oneOf": [
|
|
122
|
+
{ "type": "string", "minLength": 1 },
|
|
123
|
+
{
|
|
124
|
+
"type": "array",
|
|
125
|
+
"minItems": 1,
|
|
126
|
+
"items": { "type": "string", "minLength": 1 }
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"description": "The board's column for the backlog state, or a list of its columns. Default: Backlog."
|
|
124
130
|
},
|
|
125
131
|
"refining": {
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
"oneOf": [
|
|
133
|
+
{ "type": "string", "minLength": 1 },
|
|
134
|
+
{
|
|
135
|
+
"type": "array",
|
|
136
|
+
"minItems": 1,
|
|
137
|
+
"items": { "type": "string", "minLength": 1 }
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"description": "The board's column for the refining state, or a list of its columns. Default: In refinement. May be none."
|
|
129
141
|
},
|
|
130
142
|
"ready": {
|
|
131
143
|
"type": "string",
|
|
@@ -133,19 +145,37 @@
|
|
|
133
145
|
"description": "The board's column for the ready state. Default: Ready. May be none."
|
|
134
146
|
},
|
|
135
147
|
"building": {
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
|
|
148
|
+
"oneOf": [
|
|
149
|
+
{ "type": "string", "minLength": 1 },
|
|
150
|
+
{
|
|
151
|
+
"type": "array",
|
|
152
|
+
"minItems": 1,
|
|
153
|
+
"items": { "type": "string", "minLength": 1 }
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"description": "The board's column for the building state, or a list of its columns. Default: In progress. May be none."
|
|
139
157
|
},
|
|
140
158
|
"review": {
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
159
|
+
"oneOf": [
|
|
160
|
+
{ "type": "string", "minLength": 1 },
|
|
161
|
+
{
|
|
162
|
+
"type": "array",
|
|
163
|
+
"minItems": 1,
|
|
164
|
+
"items": { "type": "string", "minLength": 1 }
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"description": "The board's column for the review state, or a list of its columns. Default: In review. May be none."
|
|
144
168
|
},
|
|
145
169
|
"done": {
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
|
|
170
|
+
"oneOf": [
|
|
171
|
+
{ "type": "string", "minLength": 1 },
|
|
172
|
+
{
|
|
173
|
+
"type": "array",
|
|
174
|
+
"minItems": 1,
|
|
175
|
+
"items": { "type": "string", "minLength": 1 }
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"description": "The board's column for the done state, or a list of its columns. Default: Done. May be none."
|
|
149
179
|
}
|
|
150
180
|
}
|
|
151
181
|
},
|
|
@@ -150,6 +150,10 @@ changed the settings' shape, as version 2 does.
|
|
|
150
150
|
Stop (step 6), and say the settings are the owner's to move, as "Moving to
|
|
151
151
|
settings version 2" in the factory's `docs/updating.md` says for that
|
|
152
152
|
release. Never edit `.claude/factory.yaml`.
|
|
153
|
+
When it fails on `.npmrc` instead, refusing a variable a sign-in line
|
|
154
|
+
reads, stop the same way and say the name is the owner's to change:
|
|
155
|
+
renaming it renames the secret and every developer's variable. Never edit
|
|
156
|
+
`.npmrc`.
|
|
153
157
|
|
|
154
158
|
Commit what the sync wrote as a second commit, "Sync the factory's files to
|
|
155
159
|
VERSION" or "Sync the settings to PACKAGE VERSION", and push. The push changes workflows, so it needs a token with
|