@davidbyoung/software-factory 0.1.2 → 0.1.4

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.
Files changed (120) hide show
  1. package/README.md +20 -20
  2. package/actions/factory-agent/action.yml +1 -1
  3. package/agents/factory-e2e-reviewer.md +102 -0
  4. package/agents/factory-test-reviewer.md +26 -64
  5. package/agents/factory-ticket-readiness.md +14 -6
  6. package/dist/agent/claude-code.d.mts +3 -0
  7. package/dist/agent/claude-code.mjs +89 -0
  8. package/dist/agent/index.d.mts +2 -0
  9. package/dist/agent/index.mjs +5 -0
  10. package/dist/board.mjs +1 -1
  11. package/dist/cli.mjs +46 -4
  12. package/dist/code-host/github-setup.d.mts +5 -0
  13. package/dist/code-host/github-setup.mjs +133 -0
  14. package/dist/code-host/github.mjs +4 -0
  15. package/dist/code-host/index.d.mts +1 -1
  16. package/dist/code-host/index.mjs +2 -1
  17. package/dist/code-host/types.d.mts +2 -0
  18. package/dist/commands.d.mts +16 -0
  19. package/dist/commands.mjs +129 -0
  20. package/dist/config.d.mts +87 -20
  21. package/dist/config.mjs +344 -89
  22. package/dist/deps.d.mts +7 -4
  23. package/dist/deps.mjs +20 -9
  24. package/dist/doctor.d.mts +9 -16
  25. package/dist/doctor.mjs +71 -68
  26. package/dist/explain.d.mts +4 -0
  27. package/dist/explain.mjs +174 -0
  28. package/dist/guard-commit.d.mts +7 -2
  29. package/dist/guard-commit.mjs +58 -21
  30. package/dist/init.d.mts +12 -14
  31. package/dist/init.mjs +194 -136
  32. package/dist/lib/default-branch.d.mts +35 -0
  33. package/dist/lib/default-branch.mjs +117 -0
  34. package/dist/lib/has-command.d.mts +5 -0
  35. package/dist/lib/has-command.mjs +8 -0
  36. package/dist/lib/listed.d.mts +2 -0
  37. package/dist/lib/listed.mjs +4 -0
  38. package/dist/lib/refined-check.d.mts +7 -0
  39. package/dist/lib/refined-check.mjs +76 -0
  40. package/dist/lib/work-status.d.mts +12 -2
  41. package/dist/lib/work-status.mjs +14 -3
  42. package/dist/parts.d.mts +18 -15
  43. package/dist/parts.mjs +15 -43
  44. package/dist/patch-coverage.d.mts +13 -0
  45. package/dist/patch-coverage.mjs +73 -0
  46. package/dist/poller.d.mts +20 -3
  47. package/dist/poller.mjs +62 -15
  48. package/dist/pr-watch.d.mts +3 -2
  49. package/dist/pr-watch.mjs +22 -5
  50. package/dist/pr.mjs +34 -2
  51. package/dist/remove.d.mts +11 -0
  52. package/dist/remove.mjs +156 -0
  53. package/dist/runner/github-actions.d.mts +1 -1
  54. package/dist/runner/github-actions.mjs +12 -0
  55. package/dist/runner/index.d.mts +1 -1
  56. package/dist/runner/index.mjs +2 -1
  57. package/dist/runner/setup.d.mts +2 -0
  58. package/dist/runner/setup.mjs +22 -0
  59. package/dist/runner/types.d.mts +3 -0
  60. package/dist/runner/types.mjs +0 -2
  61. package/dist/session-start.d.mts +23 -13
  62. package/dist/session-start.mjs +56 -44
  63. package/dist/setup.d.mts +98 -0
  64. package/dist/setup.mjs +3 -0
  65. package/dist/site/servers.d.mts +6 -2
  66. package/dist/site/servers.mjs +14 -9
  67. package/dist/site.mjs +2 -2
  68. package/dist/status.d.mts +4 -4
  69. package/dist/status.mjs +8 -7
  70. package/dist/sync.d.mts +26 -2
  71. package/dist/sync.mjs +177 -13
  72. package/dist/ticket.mjs +19 -1
  73. package/dist/tickets/github-setup.d.mts +2 -0
  74. package/dist/tickets/github-setup.mjs +50 -0
  75. package/dist/tickets/github.mjs +0 -2
  76. package/dist/tickets/index.mjs +2 -1
  77. package/dist/tickets/transport.mjs +1 -3
  78. package/dist/tickets/types.mjs +0 -2
  79. package/dist/tool-names.d.mts +11 -0
  80. package/dist/tool-names.mjs +20 -0
  81. package/dist/tools.d.mts +56 -0
  82. package/dist/tools.mjs +76 -0
  83. package/docs/builds.md +111 -59
  84. package/docs/cli.md +106 -69
  85. package/docs/configuration.md +489 -171
  86. package/docs/design.md +18 -5
  87. package/docs/developing.md +179 -73
  88. package/docs/existing-repo.md +25 -12
  89. package/docs/github/by-hand.md +334 -0
  90. package/docs/github/reference.md +76 -67
  91. package/docs/github/setup.md +105 -286
  92. package/docs/glossary.md +18 -7
  93. package/docs/limitations.md +39 -12
  94. package/docs/plugins.md +305 -56
  95. package/docs/quick-start.md +85 -100
  96. package/docs/removing.md +37 -17
  97. package/docs/skills.md +121 -62
  98. package/docs/updating.md +150 -9
  99. package/docs/workflow.md +23 -19
  100. package/package.json +1 -1
  101. package/poller.Dockerfile +10 -18
  102. package/review.md +20 -11
  103. package/rules.md +36 -30
  104. package/settings.schema.json +313 -69
  105. package/skills/factory-address-review/SKILL.md +50 -30
  106. package/skills/factory-build/SKILL.md +76 -23
  107. package/skills/factory-deps/SKILL.md +46 -21
  108. package/skills/factory-design/SKILL.md +17 -8
  109. package/skills/factory-diagnose/SKILL.md +22 -20
  110. package/skills/factory-mutate/SKILL.md +38 -24
  111. package/skills/factory-refine/SKILL.md +55 -31
  112. package/skills/factory-resolve-conflicts/SKILL.md +76 -34
  113. package/skills/factory-trace/SKILL.md +80 -0
  114. package/workflows/factory-build.yml +6 -5
  115. package/workflows/factory-conflicts.yml +8 -8
  116. package/workflows/factory-deps-auto-merge.yml +3 -2
  117. package/workflows/factory-deps.yml +1 -1
  118. package/workflows/factory-poller.yml +46 -0
  119. package/workflows/factory-review.yml +1 -1
  120. package/skills/factory-address-review/patch-coverage.py +0 -68
package/review.md CHANGED
@@ -9,8 +9,8 @@ defend.
9
9
 
10
10
  ## Before you review
11
11
 
12
- 1. Read `CLAUDE.md`, `AGENTS.md`, and every area guide "Rules by area" in
13
- `CLAUDE.md` lists, in full. They are the project's rules, and most
12
+ 1. Read `CLAUDE.md`, the files it imports, and every area guide "Rules by
13
+ area" in `CLAUDE.md` lists, in full. They are the project's rules, and most
14
14
  findings worth raising break one of them. Then read
15
15
  `.github/review-notes.md` when it exists: what this repository's review
16
16
  checks beyond this file.
@@ -24,16 +24,25 @@ defend.
24
24
  gh api repos/REPO/pulls/PR_NUMBER/comments --paginate
25
25
  ```
26
26
 
27
+ The commands below write the default branch's name as DEFAULT. This
28
+ prints it:
29
+
30
+ ```bash
31
+ gh api repos/REPO --jq .default_branch
32
+ ```
33
+
27
34
  Your earlier summaries contain `<!-- claude-review sha=SHA -->`. If one
28
35
  exists and that SHA is an ancestor of the head
29
36
  (`git merge-base --is-ancestor SHA HEAD`), compare
30
- `git merge-base SHA origin/main` with `git merge-base HEAD origin/main`.
31
- If they differ, main was merged in since that review, so review
32
- `git diff origin/main...HEAD`, the pull request's own changes as they
33
- now stand. If they match, review only `git diff SHA...HEAD`. Otherwise
34
- review the whole pull request, `git diff origin/main...HEAD`. Use
35
- `origin/main` rather than the base SHA you were given, which comes from
36
- the event and can be older than a merge from main.
37
+ `git merge-base SHA origin/DEFAULT` with
38
+ `git merge-base HEAD origin/DEFAULT`.
39
+ If they differ, the default branch was merged in since that review, so
40
+ review `git diff origin/DEFAULT...HEAD`, the pull request's own changes
41
+ as they now stand. If they match, review only `git diff SHA...HEAD`.
42
+ Otherwise review the whole pull request,
43
+ `git diff origin/DEFAULT...HEAD`. Use `origin/DEFAULT` rather than the
44
+ base SHA you were given, which comes from the event and can be older
45
+ than a merge from the default branch.
37
46
 
38
47
  If that SHA is the head itself, this is a re-run after the author
39
48
  replied without pushing. There is no new code: read the replies since
@@ -69,9 +78,9 @@ defend.
69
78
  - **Correctness.** A defect a user would hit, a regression, a race, data
70
79
  that is silently dropped.
71
80
  - **What it was asked to do.** A Spec line or criterion from step 4 that
72
- the whole pull request, `git diff origin/main...HEAD`, does not meet, or
81
+ the whole pull request, `git diff origin/DEFAULT...HEAD`, does not meet, or
73
82
  meets only in part, is a finding, since the merge closes the issue as
74
- done: High when a visitor would see the gap, Medium otherwise. Behavior
83
+ done: High when a user would see the gap, Medium otherwise. Behavior
75
84
  no line asked for is Medium, unless the body or the owner's comments on
76
85
  the pull request explain it. Quote the line either way.
77
86
  - **Tests that cannot fail.** A test whose name and body disagree, a
package/rules.md CHANGED
@@ -13,7 +13,7 @@ and a pull request's conversation comments and labels through
13
13
 
14
14
  A change is small when it changes under about 30 lines outside tests,
15
15
  specs, and content, and adds no component and no state, whether or not a
16
- visitor sees it: a style tweak, a bug fix, a link, or a line of copy. Its
16
+ user sees it: a style tweak, a bug fix, a link, or a line of copy. Its
17
17
  size decides, not its kind; content the repository reviews by what changed
18
18
  instead is named in "Small changes: this repository" in `CLAUDE.md`. A
19
19
  follow-ups build is sized by its lines: when every line is small, its one
@@ -29,18 +29,20 @@ here rather than restate it.
29
29
  - **Say the size first.** The first message of the work names the path,
30
30
  such as "small: one test, red first, one UI reviewer read", so the
31
31
  owner can overrule it before the work starts rather than halfway through.
32
- - **No `spec` label**, even when a visitor sees it: the issue's acceptance
32
+ - **No `spec` label**, even when a user sees it: the issue's acceptance
33
33
  criteria are the spec. No OpenSpec change either, unless the change makes
34
34
  a line of `openspec/specs/` false, as renaming a label a spec quotes
35
35
  would. That issue also carries a Spec section of the changed line, and
36
36
  the build archives a proposal and spec delta in the same pull request,
37
37
  which then waits for the owner. A fix that restores what a spec says
38
38
  changes no line of it.
39
- - **No `factory-ticket-readiness` read and no `factory-test-reviewer` read**, with two
40
- exceptions that keep `factory-test-reviewer`: a change to tests alone, the one
41
- kind it exists for, and code that builds what is sent to an outside
42
- service, which "Small changes: this repository" in `CLAUDE.md` names,
43
- since a broken payload loses data without a sound.
39
+ - **No `factory-ticket-readiness` read and no read by the test reviewers**
40
+ (`npx --no-install factory plugins test-reviewer` lists them), with two
41
+ exceptions that keep every test reviewer it prints whose `files`, if it
42
+ has any, the change touches: a change to
43
+ tests alone, the one kind they exist for, and code that builds what is
44
+ sent to an outside service, which "Small changes: this repository" in
45
+ `CLAUDE.md` names, since a broken payload loses data without a sound.
44
46
  - **Tests.** A bug fix gets one test that reproduces the defect. A style
45
47
  tweak gets one only when it sets what a check in the repository's design
46
48
  guide measures, which "Small changes: this repository" in `CLAUDE.md`
@@ -53,7 +55,7 @@ here rather than restate it.
53
55
  change, not one per way the code could break. A script proves each
54
56
  behavior this way: script defects here have been silent data loss.
55
57
  - **Choices.** One that is not layout, such as which page, what label, or
56
- what it links to, is asked in plain English, saying what a visitor would
58
+ what it links to, is asked in plain English, saying what a user would
57
59
  see. A layout or style choice gets no mockup round: build the
58
60
  recommendation, put the UI reviewer's screenshots of it in the pull
59
61
  request body, and leave the pull request a draft for the owner to mark
@@ -68,12 +70,14 @@ here rather than restate it.
68
70
 
69
71
  ## Branching, pushing, and review
70
72
 
71
- `main` is protected: no direct pushes, no bypass, CI must pass, and every
73
+ The default branch, whose name `npx --no-install factory default-branch`
74
+ prints, is protected: no direct pushes, no bypass, CI must pass, and every
72
75
  review thread must be resolved before a merge. Work accordingly rather than
73
76
  discovering it at push time.
74
77
 
75
- - **Never commit on `main`.** If `main` is checked out, create a branch from
76
- the latest origin/main first and say which branch you made. Reuse the
78
+ - **Never commit on the default branch.** If it is checked out, create a
79
+ branch from the latest copy of it on `origin` first and say which branch
80
+ you made. Reuse the
77
81
  current feature branch when one is already checked out; a feature usually
78
82
  spans several commits.
79
83
  - **Push the branch after each coherent change.** Small commits are the point;
@@ -112,20 +116,21 @@ discovering it at push time.
112
116
  wait for the review of that push, then work it with the `factory-address-review` skill
113
117
  without being asked. If no PR exists yet, say so in one line: review begins
114
118
  when the user opens one.
115
- - **A conflict with main is fixed through the `factory-resolve-conflicts` skill.** Its
116
- sweep runs after each merge into main and nightly, on every ready pull
119
+ - **A conflict with the default branch is fixed through the `factory-resolve-conflicts` skill.** Its
120
+ sweep runs after each merge into the default branch and nightly, on every ready pull
117
121
  request that conflicts, and a session working a pull request with
118
122
  `factory-address-review` runs its conflict fix before anything else. When the two
119
123
  sides contradict, it pushes nothing, comments why, and opens an issue.
120
124
  - **An issue is built in GitHub Actions by moving its card to Ready** on
121
125
  the board, the GitHub Project whose number
122
126
  `npx --no-install factory config get tickets.board` prints: the
123
- `ready-poller` worker dispatches the "Factory build" workflow within
124
- about a minute, the same run that `npx --no-install factory build N`
125
- starts by hand. A local build starts by telling a session to work the
127
+ poller dispatches the "Factory build" workflow, within about a minute
128
+ when you host it (`builds.trigger: own-server`) or at its next scheduled
129
+ pass (`github-action`), the same run that
130
+ `npx --no-install factory build N` starts by hand. A local build starts by telling a session to work the
126
131
  issue.
127
- The poller skips a card whose blocker is open and starts it within a
128
- minute of the blocker closing. A card moves only forward on its own,
132
+ The poller skips a card whose blocker is open and starts it at its first
133
+ pass after the blocker closes. A card moves only forward on its own,
129
134
  except the follow-ups issue when a pull request merged part of it,
130
135
  which goes to Backlog: a
131
136
  build that ends without a merge stays In progress, and a finished
@@ -156,7 +161,7 @@ owner. Its `Who merges` status in the checks list says which, and why.
156
161
  Agents never merge, enable auto-merge, or add the `verdict: override`
157
162
  label, the owner's pass of the verdict for one commit; `factory pr label`
158
163
  and `factory ticket label` refuse it, and the guard hook stops the ordinary
159
- ways of adding it around them. Both workflows run from main's copy,
164
+ ways of adding it around them. Both workflows run from the default branch's copy,
160
165
  so a pull request cannot change how it is judged, and changes to them are
161
166
  always the owner's.
162
167
 
@@ -171,7 +176,7 @@ into `openspec/specs/` in the same pull request. `openspec/specs/` is the
171
176
  current description of what the repository does; a change to it starts by
172
177
  reading its spec.
173
178
 
174
- A change that adds or alters behavior a visitor can see carries the
179
+ A change that adds or alters behavior a user can see carries the
175
180
  `spec` label, which `factory-refine` adds, unless it is small ("Small
176
181
  changes" above). Everything else, such as copy, bug fixes that
177
182
  restore intended behavior, style tweaks, tooling, CI, and docs, builds
@@ -188,7 +193,7 @@ OpenSpec collects anonymous usage statistics unless told not to. Run it with
188
193
  ## Issues that wait on another
189
194
 
190
195
  A build order stated only in prose is one nothing reads: the poller starts
191
- a build within a minute of a card moving to Ready, and it and `factory-build`
196
+ a build within minutes of a card moving to Ready, and it and `factory-build`
192
197
  stop only on a recorded relationship. So whoever opens or refines an issue records each
193
198
  blocker as a blocked-by relationship, and says why in the issue's
194
199
  body (under Decisions, for a refined issue).
@@ -224,7 +229,7 @@ labeled `follow-up`, holding a checklist. A line leads with the file or
224
229
  page it is about:
225
230
 
226
231
  ```
227
- - [ ] <file or page>: <what is wrong, as a visitor or a maintainer sees it>. Found by <who> while building #N. <The rule it breaks, by its section in the guide that states it (an area's guide under "Rules by area" in CLAUDE.md, CLAUDE.md, or this file), or "Needs a decision: <the question>".>
232
+ - [ ] <file or page>: <what is wrong, as a user or a maintainer sees it>. Found by <who> while building #N. <The rule it breaks, by its section in the guide that states it (an area's guide under "Rules by area" in CLAUDE.md, CLAUDE.md, or this file), or "Needs a decision: <the question>".>
228
233
  ```
229
234
 
230
235
  It is added with the file and the rest of the line as two arguments, and
@@ -252,7 +257,7 @@ hook refuses the same in text sent to GitHub directly, as the
252
257
  builder that meets such a line without the phrase adds it and leaves
253
258
  the line unchecked.
254
259
  - A follow-up gets its own issue only when it would need the `spec` label,
255
- because it adds or alters behavior a visitor can see, or would make a
260
+ because it adds or alters behavior a user can see, or would make a
256
261
  line of `openspec/specs/` false. A request from the owner is always its
257
262
  own issue.
258
263
  - The `factory-resolve-conflicts` conflict stop keeps opening its own issue: which side
@@ -271,7 +276,7 @@ touches a file that does, and gets the fresh-agent trace ("Changing the
271
276
  process") when any line edits a rule.
272
277
 
273
278
  **Not everything noticed is a follow-up.** What breaks no rule in the
274
- guides, and what a visitor or a maintainer would not notice without
279
+ guides, and what a user or a maintainer would not notice without
275
280
  measuring, gets no line and no fix. Once, every line left on a follow-ups
276
281
  issue came from reviewing the previous batch's fixes, including a 1 px
277
282
  jump, and each line's fix was reviewed in turn, so the list kept refilling
@@ -284,7 +289,8 @@ The factory's skills, agents, rules, review instructions, and workflows
284
289
  under `.claude/` and `.github/` are copies, written by `factory sync` from
285
290
  the factory's package. Change the source in the package, run
286
291
  `npx --no-install factory sync`, and commit both: the gate and CI fail
287
- when a copy differs from its source.
292
+ when a copy differs from what `sync` writes from its source and the
293
+ settings.
288
294
 
289
295
  A rule written for the change in front of its author can be wrong for
290
296
  every other kind. Once, the step that adds the `spec` label kept adding
@@ -297,11 +303,11 @@ code that decides what runs and who merges (the factory's own commands,
297
303
  and the scripts "Changing the process: this
298
304
  repository" in `CLAUDE.md` names)
299
305
  that alters what triggers a step, who runs or when,
300
- gets a read from a fresh agent before its pull request is marked
301
- ready. Give it the branch and `.claude/change-types.md`. It traces each
302
- kind through the rules as they will stand, and reports a kind that got
303
- heavier, lighter, or ambiguous, and any two rules that now disagree. Fix
304
- what holds up. A change to wording alone needs no trace.
306
+ is traced with the `factory-trace` skill before its pull request is
307
+ marked ready: a fresh agent walks each kind in `.claude/change-types.md`
308
+ through the rules as they will stand, and reports a kind that got heavier,
309
+ lighter, or ambiguous, and any two rules that now disagree. Fix what holds
310
+ up. A change to wording alone needs no trace.
305
311
 
306
312
  ## Stepping back from a rabbit hole
307
313
 
@@ -7,8 +7,8 @@
7
7
  "required": ["version", "repository"],
8
8
  "properties": {
9
9
  "version": {
10
- "const": 1,
11
- "description": "The shape of this file, not the factory's version. Must be 1."
10
+ "const": 2,
11
+ "description": "The shape of this file, not the factory's version. Must be 2."
12
12
  },
13
13
  "repository": {
14
14
  "type": "string",
@@ -41,7 +41,7 @@
41
41
  "$ref": "#/definitions/builds"
42
42
  },
43
43
  "specs": {
44
- "description": "How the written spec for a visible change is kept: openspec, or none.",
44
+ "description": "How the written spec for a visible change is kept: openspec or none as one word, or a block with a type and the command that checks the specs.",
45
45
  "anyOf": [
46
46
  {
47
47
  "$ref": "#/definitions/specs/properties/type"
@@ -51,28 +51,11 @@
51
51
  }
52
52
  ]
53
53
  },
54
- "before-commit": {
55
- "type": "array",
56
- "items": {
57
- "type": "string",
58
- "minLength": 1
59
- },
60
- "description": "Commands run from the repository's root before every commit a session makes. If one fails, the commit is blocked."
61
- },
62
- "build-setup": {
63
- "type": "array",
64
- "items": {
65
- "type": "string",
66
- "minLength": 1
67
- },
68
- "description": "Commands run from the repository's root before an unattended build starts work."
54
+ "commands": {
55
+ "$ref": "#/definitions/commands"
69
56
  },
70
57
  "plugins": {
71
- "type": "array",
72
- "description": "Your own skills and agents.",
73
- "items": {
74
- "$ref": "#/definitions/plugins[]"
75
- }
58
+ "$ref": "#/definitions/plugins"
76
59
  },
77
60
  "auto-merge": {
78
61
  "$ref": "#/definitions/auto-merge"
@@ -85,6 +68,9 @@
85
68
  },
86
69
  "session-minutes": {
87
70
  "$ref": "#/definitions/session-minutes"
71
+ },
72
+ "rules": {
73
+ "$ref": "#/definitions/rules"
88
74
  }
89
75
  },
90
76
  "definitions": {
@@ -199,6 +185,10 @@
199
185
  "runner": {
200
186
  "enum": ["github-actions"],
201
187
  "description": "Where an unattended build runs. Default: github-actions."
188
+ },
189
+ "poll-minutes": {
190
+ "enum": [5, 10, 15, 30, 60],
191
+ "description": "How often the scheduled poller checks the board, in minutes, with builds.trigger: github-action. Default: 5."
202
192
  }
203
193
  }
204
194
  },
@@ -210,9 +200,292 @@
210
200
  "type": {
211
201
  "enum": ["none", "openspec"],
212
202
  "description": "How the spec for a visible change is kept. Default: none."
203
+ },
204
+ "check": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "description": "The command that checks the specs, run from the repository's root with DO_NOT_TRACK=1. Needs type: openspec. Default: npx --no-install openspec validate --all --strict --no-interactive."
208
+ }
209
+ }
210
+ },
211
+ "commands": {
212
+ "type": "object",
213
+ "description": "Every command a build runs, each from the repository's root.",
214
+ "additionalProperties": false,
215
+ "properties": {
216
+ "build-setup": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "string",
220
+ "minLength": 1
221
+ },
222
+ "description": "Commands run before an unattended build starts work."
223
+ },
224
+ "before-commit": {
225
+ "type": "array",
226
+ "items": {
227
+ "type": "string",
228
+ "minLength": 1
229
+ },
230
+ "description": "Commands run before every commit a session makes. If one fails, the commit is blocked."
231
+ },
232
+ "gate": {
233
+ "type": "array",
234
+ "items": {
235
+ "type": "string",
236
+ "minLength": 1
237
+ },
238
+ "description": "Commands that check a change, run in order before a session reports a task done."
239
+ },
240
+ "test-one": {
241
+ "type": "string",
242
+ "minLength": 1,
243
+ "description": "Runs one test alone. $FILE is the test's file and $NAME the test's name, empty for the whole file."
244
+ },
245
+ "end-to-end": {
246
+ "type": "string",
247
+ "minLength": 1,
248
+ "description": "Runs one end-to-end spec alone. $FILE is the spec's file."
249
+ },
250
+ "coverage": {
251
+ "$ref": "#/definitions/commands.coverage"
252
+ },
253
+ "relock": {
254
+ "type": "string",
255
+ "minLength": 1,
256
+ "description": "Rebuilds the package manager's lock file after a conflict in it. Default: npm install."
213
257
  }
214
258
  }
215
259
  },
260
+ "commands.coverage": {
261
+ "type": "object",
262
+ "description": "How coverage is measured, and where its report lands.",
263
+ "additionalProperties": false,
264
+ "properties": {
265
+ "run": {
266
+ "type": "string",
267
+ "minLength": 1,
268
+ "description": "The command that measures coverage."
269
+ },
270
+ "report": {
271
+ "type": "string",
272
+ "minLength": 1,
273
+ "description": "The path of the lcov report the command writes."
274
+ }
275
+ },
276
+ "required": ["run", "report"]
277
+ },
278
+ "plugins": {
279
+ "type": "object",
280
+ "description": "Your own skills and agents, grouped by the phase they work in. Every slot is optional.",
281
+ "additionalProperties": false,
282
+ "properties": {
283
+ "refine": {
284
+ "$ref": "#/definitions/plugins.refine"
285
+ },
286
+ "build": {
287
+ "$ref": "#/definitions/plugins.build"
288
+ },
289
+ "test": {
290
+ "$ref": "#/definitions/plugins.test"
291
+ },
292
+ "conflicts": {
293
+ "$ref": "#/definitions/plugins.conflicts"
294
+ }
295
+ }
296
+ },
297
+ "plugins.refine": {
298
+ "type": "object",
299
+ "description": "Plug-ins for refining a ticket.",
300
+ "additionalProperties": false,
301
+ "properties": {
302
+ "refiner": {
303
+ "$ref": "#/definitions/plugins.refine.refiner"
304
+ },
305
+ "mockups": {
306
+ "$ref": "#/definitions/plugins.refine.mockups"
307
+ }
308
+ }
309
+ },
310
+ "plugins.build": {
311
+ "type": "object",
312
+ "description": "Plug-ins for building a ticket.",
313
+ "additionalProperties": false,
314
+ "properties": {
315
+ "builders": {
316
+ "type": "array",
317
+ "description": "Skills that build a ticket carrying one of their labels.",
318
+ "items": {
319
+ "$ref": "#/definitions/plugins.build.builders[]"
320
+ }
321
+ },
322
+ "reviewers": {
323
+ "type": "array",
324
+ "description": "Agents considered when a change touches one of their files.",
325
+ "items": {
326
+ "$ref": "#/definitions/plugins.build.reviewers[]"
327
+ }
328
+ }
329
+ }
330
+ },
331
+ "plugins.test": {
332
+ "type": "object",
333
+ "description": "Plug-ins for a change's tests.",
334
+ "additionalProperties": false,
335
+ "properties": {
336
+ "prover": {
337
+ "$ref": "#/definitions/plugins.test.prover"
338
+ },
339
+ "reviewers": {
340
+ "type": "array",
341
+ "description": "The whole list of agents that read a change's tests. Default: factory-test-reviewer alone.",
342
+ "items": {
343
+ "$ref": "#/definitions/plugins.test.reviewers[]"
344
+ }
345
+ }
346
+ }
347
+ },
348
+ "plugins.conflicts": {
349
+ "type": "object",
350
+ "description": "Plug-ins for a conflict with the default branch.",
351
+ "additionalProperties": false,
352
+ "properties": {
353
+ "resolvers": {
354
+ "type": "array",
355
+ "description": "Skills that rebuild their files after a conflict, in place of a merge by hand.",
356
+ "items": {
357
+ "$ref": "#/definitions/plugins.conflicts.resolvers[]"
358
+ }
359
+ }
360
+ }
361
+ },
362
+ "plugins.refine.refiner": {
363
+ "type": "object",
364
+ "description": "The skill that refines a ticket, in place of factory-refine.",
365
+ "additionalProperties": false,
366
+ "properties": {
367
+ "skill": {
368
+ "type": "string",
369
+ "pattern": "^[\\w-]+$",
370
+ "description": "The name of one of your own skills, in .claude/skills/."
371
+ }
372
+ },
373
+ "required": ["skill"]
374
+ },
375
+ "plugins.refine.mockups": {
376
+ "type": "object",
377
+ "description": "The skill that makes pictures when a decision changes the look.",
378
+ "additionalProperties": false,
379
+ "properties": {
380
+ "skill": {
381
+ "type": "string",
382
+ "pattern": "^[\\w-]+$",
383
+ "description": "The name of one of your own skills, in .claude/skills/."
384
+ }
385
+ },
386
+ "required": ["skill"]
387
+ },
388
+ "plugins.build.builders[]": {
389
+ "type": "object",
390
+ "description": "One builder.",
391
+ "additionalProperties": false,
392
+ "properties": {
393
+ "skill": {
394
+ "type": "string",
395
+ "pattern": "^[\\w-]+$",
396
+ "description": "The name of one of your own skills, in .claude/skills/."
397
+ },
398
+ "labels": {
399
+ "type": "array",
400
+ "minItems": 1,
401
+ "items": {
402
+ "type": "string",
403
+ "minLength": 1
404
+ },
405
+ "description": "It builds a ticket carrying one of these labels."
406
+ }
407
+ },
408
+ "required": ["skill", "labels"]
409
+ },
410
+ "plugins.build.reviewers[]": {
411
+ "type": "object",
412
+ "description": "One reviewer of a change.",
413
+ "additionalProperties": false,
414
+ "properties": {
415
+ "agent": {
416
+ "type": "string",
417
+ "pattern": "^[\\w-]+$",
418
+ "description": "The name of an agent, in .claude/agents/."
419
+ },
420
+ "files": {
421
+ "type": "array",
422
+ "minItems": 1,
423
+ "items": {
424
+ "type": "string",
425
+ "minLength": 1
426
+ },
427
+ "description": "It is considered when a change touches one of these."
428
+ }
429
+ },
430
+ "required": ["agent", "files"]
431
+ },
432
+ "plugins.test.prover": {
433
+ "type": "object",
434
+ "description": "The skill that proves a new test can fail, in place of factory-mutate.",
435
+ "additionalProperties": false,
436
+ "properties": {
437
+ "skill": {
438
+ "type": "string",
439
+ "pattern": "^[\\w-]+$",
440
+ "description": "The name of one of your own skills, in .claude/skills/."
441
+ }
442
+ },
443
+ "required": ["skill"]
444
+ },
445
+ "plugins.test.reviewers[]": {
446
+ "type": "object",
447
+ "description": "One reviewer of a change's tests.",
448
+ "additionalProperties": false,
449
+ "properties": {
450
+ "agent": {
451
+ "type": "string",
452
+ "pattern": "^[\\w-]+$",
453
+ "description": "The name of an agent, in .claude/agents/."
454
+ },
455
+ "files": {
456
+ "type": "array",
457
+ "minItems": 1,
458
+ "items": {
459
+ "type": "string",
460
+ "minLength": 1
461
+ },
462
+ "description": "It is considered only when a change touches one of these. Left out, it is considered whenever a change touches tests."
463
+ }
464
+ },
465
+ "required": ["agent"]
466
+ },
467
+ "plugins.conflicts.resolvers[]": {
468
+ "type": "object",
469
+ "description": "One resolver.",
470
+ "additionalProperties": false,
471
+ "properties": {
472
+ "skill": {
473
+ "type": "string",
474
+ "pattern": "^[\\w-]+$",
475
+ "description": "The name of one of your own skills, in .claude/skills/."
476
+ },
477
+ "files": {
478
+ "type": "array",
479
+ "minItems": 1,
480
+ "items": {
481
+ "type": "string",
482
+ "minLength": 1
483
+ },
484
+ "description": "It resolves a conflict in one of these."
485
+ }
486
+ },
487
+ "required": ["skill", "files"]
488
+ },
216
489
  "auto-merge": {
217
490
  "type": "object",
218
491
  "description": "Which pull requests may merge without you.",
@@ -334,52 +607,6 @@
334
607
  },
335
608
  "required": ["start", "url"]
336
609
  },
337
- "plugins[]": {
338
- "type": "object",
339
- "description": "One skill or one agent.",
340
- "additionalProperties": false,
341
- "properties": {
342
- "skill": {
343
- "type": "string",
344
- "pattern": "^[\\w-]+$",
345
- "description": "The name of one of your own skills, in .claude/skills/."
346
- },
347
- "agent": {
348
- "type": "string",
349
- "pattern": "^[\\w-]+$",
350
- "description": "The name of one of your own agents, in .claude/agents/."
351
- },
352
- "role": {
353
- "enum": ["mockups", "builder", "reviewer"],
354
- "description": "What the plug-in does: mockups, builder, or reviewer."
355
- },
356
- "files": {
357
- "type": "array",
358
- "items": {
359
- "type": "string",
360
- "minLength": 1
361
- },
362
- "description": "For a reviewer: it is considered when a change touches one of these."
363
- },
364
- "labels": {
365
- "type": "array",
366
- "items": {
367
- "type": "string",
368
- "minLength": 1
369
- },
370
- "description": "For a builder: it builds a ticket carrying one of these labels."
371
- }
372
- },
373
- "required": ["role"],
374
- "oneOf": [
375
- {
376
- "required": ["skill"]
377
- },
378
- {
379
- "required": ["agent"]
380
- }
381
- ]
382
- },
383
610
  "session-minutes": {
384
611
  "type": "object",
385
612
  "description": "How long each kind of unattended session may run, in minutes. The job around it gets 10 more. GitHub's own runners stop a job at 6 hours, so a value above 350 does nothing there.",
@@ -406,6 +633,23 @@
406
633
  "description": "Work on the dependency pull requests. Default: 50."
407
634
  }
408
635
  }
636
+ },
637
+ "rules": {
638
+ "type": "object",
639
+ "description": "Numbers the process rules use, for a repository that wants different ones.",
640
+ "additionalProperties": false,
641
+ "properties": {
642
+ "small-change-lines": {
643
+ "type": "integer",
644
+ "minimum": 1,
645
+ "description": "A change under this many lines outside tests, specs, and content, adding no component and no state, takes the lighter path. Default: 30."
646
+ },
647
+ "review-rounds": {
648
+ "type": "integer",
649
+ "minimum": 1,
650
+ "description": "Rounds a session works a review before it hands what is left to you. Default: 2."
651
+ }
652
+ }
409
653
  }
410
654
  }
411
655
  }