@davidbyoung/software-factory 0.0.0-stage → 0.1.1

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 (141) hide show
  1. package/.claude-plugin/plugin.json +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +135 -2
  4. package/actions/factory-agent/action.yml +218 -0
  5. package/agents/factory-test-reviewer.md +129 -0
  6. package/agents/factory-ticket-readiness.md +107 -0
  7. package/agents/factory-ui-reviewer.md +160 -0
  8. package/bin/factory.js +45 -0
  9. package/bin/launch.js +67 -0
  10. package/dist/board.d.mts +128 -0
  11. package/dist/board.mjs +456 -0
  12. package/dist/build.d.mts +18 -0
  13. package/dist/build.mjs +60 -0
  14. package/dist/cli.d.mts +17 -0
  15. package/dist/cli.mjs +264 -0
  16. package/dist/code-host/github.d.mts +118 -0
  17. package/dist/code-host/github.mjs +419 -0
  18. package/dist/code-host/index.d.mts +9 -0
  19. package/dist/code-host/index.mjs +18 -0
  20. package/dist/code-host/types.d.mts +205 -0
  21. package/dist/code-host/types.mjs +12 -0
  22. package/dist/config.d.mts +166 -0
  23. package/dist/config.mjs +548 -0
  24. package/dist/deps.d.mts +32 -0
  25. package/dist/deps.mjs +126 -0
  26. package/dist/doctor.d.mts +34 -0
  27. package/dist/doctor.mjs +188 -0
  28. package/dist/guard-commit.d.mts +41 -0
  29. package/dist/guard-commit.mjs +209 -0
  30. package/dist/guard-permission.d.mts +15 -0
  31. package/dist/guard-permission.mjs +52 -0
  32. package/dist/guard-ticket-text.d.mts +27 -0
  33. package/dist/guard-ticket-text.mjs +288 -0
  34. package/dist/guard.d.mts +4 -0
  35. package/dist/guard.mjs +37 -0
  36. package/dist/init.d.mts +58 -0
  37. package/dist/init.mjs +556 -0
  38. package/dist/lib/clock.d.mts +14 -0
  39. package/dist/lib/clock.mjs +36 -0
  40. package/dist/lib/gh.d.mts +28 -0
  41. package/dist/lib/gh.mjs +92 -0
  42. package/dist/lib/glob.d.mts +2 -0
  43. package/dist/lib/glob.mjs +41 -0
  44. package/dist/lib/pricing.d.mts +25 -0
  45. package/dist/lib/pricing.mjs +77 -0
  46. package/dist/lib/usage.d.mts +34 -0
  47. package/dist/lib/usage.mjs +128 -0
  48. package/dist/lib/work-status.d.mts +251 -0
  49. package/dist/lib/work-status.mjs +510 -0
  50. package/dist/merge-policy.d.mts +66 -0
  51. package/dist/merge-policy.mjs +146 -0
  52. package/dist/parts.d.mts +39 -0
  53. package/dist/parts.mjs +138 -0
  54. package/dist/poller.d.mts +61 -0
  55. package/dist/poller.mjs +247 -0
  56. package/dist/pr-watch.d.mts +45 -0
  57. package/dist/pr-watch.mjs +244 -0
  58. package/dist/pr.d.mts +65 -0
  59. package/dist/pr.mjs +571 -0
  60. package/dist/review-cost.d.mts +18 -0
  61. package/dist/review-cost.mjs +95 -0
  62. package/dist/review-tools.d.mts +5 -0
  63. package/dist/review-tools.mjs +46 -0
  64. package/dist/review-verdict.d.mts +50 -0
  65. package/dist/review-verdict.mjs +171 -0
  66. package/dist/reviewers.d.mts +54 -0
  67. package/dist/reviewers.mjs +312 -0
  68. package/dist/runner/github-actions.d.mts +12 -0
  69. package/dist/runner/github-actions.mjs +97 -0
  70. package/dist/runner/index.d.mts +9 -0
  71. package/dist/runner/index.mjs +22 -0
  72. package/dist/runner/types.d.mts +60 -0
  73. package/dist/runner/types.mjs +7 -0
  74. package/dist/session-start.d.mts +20 -0
  75. package/dist/session-start.mjs +115 -0
  76. package/dist/site/capture.d.mts +44 -0
  77. package/dist/site/capture.mjs +114 -0
  78. package/dist/site/measure.d.mts +83 -0
  79. package/dist/site/measure.mjs +225 -0
  80. package/dist/site/pages.d.mts +10 -0
  81. package/dist/site/pages.mjs +71 -0
  82. package/dist/site/pixels.d.mts +47 -0
  83. package/dist/site/pixels.mjs +157 -0
  84. package/dist/site/servers.d.mts +47 -0
  85. package/dist/site/servers.mjs +141 -0
  86. package/dist/site.d.mts +60 -0
  87. package/dist/site.mjs +341 -0
  88. package/dist/status.d.mts +100 -0
  89. package/dist/status.mjs +514 -0
  90. package/dist/sync.d.mts +59 -0
  91. package/dist/sync.mjs +292 -0
  92. package/dist/ticket.d.mts +61 -0
  93. package/dist/ticket.mjs +562 -0
  94. package/dist/tickets/github.d.mts +128 -0
  95. package/dist/tickets/github.mjs +491 -0
  96. package/dist/tickets/index.d.mts +15 -0
  97. package/dist/tickets/index.mjs +27 -0
  98. package/dist/tickets/transport.d.mts +42 -0
  99. package/dist/tickets/transport.mjs +158 -0
  100. package/dist/tickets/types.d.mts +191 -0
  101. package/dist/tickets/types.mjs +76 -0
  102. package/docs/builds.md +227 -0
  103. package/docs/cli.md +221 -0
  104. package/docs/configuration.md +809 -0
  105. package/docs/design.md +106 -0
  106. package/docs/developing.md +400 -0
  107. package/docs/existing-repo.md +138 -0
  108. package/docs/github/reference.md +288 -0
  109. package/docs/github/setup.md +312 -0
  110. package/docs/glossary.md +106 -0
  111. package/docs/limitations.md +115 -0
  112. package/docs/plugins.md +192 -0
  113. package/docs/quick-start.md +222 -0
  114. package/docs/removing.md +76 -0
  115. package/docs/skills.md +270 -0
  116. package/docs/updating.md +108 -0
  117. package/docs/workflow.md +195 -0
  118. package/package.json +67 -4
  119. package/poller.Dockerfile +21 -0
  120. package/review.md +170 -0
  121. package/rules.md +313 -0
  122. package/settings.schema.json +411 -0
  123. package/skills/factory-address-review/SKILL.md +547 -0
  124. package/skills/factory-address-review/patch-coverage.py +68 -0
  125. package/skills/factory-build/SKILL.md +412 -0
  126. package/skills/factory-deps/SKILL.md +185 -0
  127. package/skills/factory-design/SKILL.md +159 -0
  128. package/skills/factory-diagnose/SKILL.md +93 -0
  129. package/skills/factory-mutate/SKILL.md +76 -0
  130. package/skills/factory-refine/SKILL.md +417 -0
  131. package/skills/factory-resolve-conflicts/SKILL.md +235 -0
  132. package/workflows/factory-board-sync.yml +91 -0
  133. package/workflows/factory-build.yml +72 -0
  134. package/workflows/factory-check.yml +37 -0
  135. package/workflows/factory-claude-review.yml +133 -0
  136. package/workflows/factory-conflicts.yml +69 -0
  137. package/workflows/factory-deps-auto-merge.yml +43 -0
  138. package/workflows/factory-deps.yml +59 -0
  139. package/workflows/factory-merge-policy.yml +121 -0
  140. package/workflows/factory-review-verdict.yml +54 -0
  141. package/workflows/factory-review.yml +75 -0
@@ -0,0 +1,411 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Settings for the software factory",
4
+ "description": "The settings file, .claude/factory.yaml. An editor's help: `factory config check` is the check that counts.",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "repository"],
8
+ "properties": {
9
+ "version": {
10
+ "const": 1,
11
+ "description": "The shape of this file, not the factory's version. Must be 1."
12
+ },
13
+ "repository": {
14
+ "type": "string",
15
+ "pattern": "^[\\w.-]+/[\\w.-]+$",
16
+ "description": "The repository's owner and name, as owner/name."
17
+ },
18
+ "tickets": {
19
+ "description": "Where tickets live and how their state is shown.",
20
+ "anyOf": [
21
+ {
22
+ "$ref": "#/definitions/tickets/properties/type"
23
+ },
24
+ {
25
+ "$ref": "#/definitions/tickets"
26
+ }
27
+ ]
28
+ },
29
+ "code-host": {
30
+ "description": "Where pull requests are.",
31
+ "anyOf": [
32
+ {
33
+ "$ref": "#/definitions/code-host/properties/type"
34
+ },
35
+ {
36
+ "$ref": "#/definitions/code-host"
37
+ }
38
+ ]
39
+ },
40
+ "builds": {
41
+ "$ref": "#/definitions/builds"
42
+ },
43
+ "specs": {
44
+ "description": "How the written spec for a visible change is kept: openspec, or none.",
45
+ "anyOf": [
46
+ {
47
+ "$ref": "#/definitions/specs/properties/type"
48
+ },
49
+ {
50
+ "$ref": "#/definitions/specs"
51
+ }
52
+ ]
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."
69
+ },
70
+ "plugins": {
71
+ "type": "array",
72
+ "description": "Your own skills and agents.",
73
+ "items": {
74
+ "$ref": "#/definitions/plugins[]"
75
+ }
76
+ },
77
+ "auto-merge": {
78
+ "$ref": "#/definitions/auto-merge"
79
+ },
80
+ "ci-review": {
81
+ "$ref": "#/definitions/ci-review"
82
+ },
83
+ "site": {
84
+ "$ref": "#/definitions/site"
85
+ },
86
+ "session-minutes": {
87
+ "$ref": "#/definitions/session-minutes"
88
+ }
89
+ },
90
+ "definitions": {
91
+ "tickets": {
92
+ "type": "object",
93
+ "description": "Where tickets live and how their state is shown.",
94
+ "additionalProperties": false,
95
+ "properties": {
96
+ "type": {
97
+ "enum": ["github"],
98
+ "description": "The ticket system. Default: github."
99
+ },
100
+ "board": {
101
+ "description": "The number at the end of your GitHub Project's address, or none. Default: none.",
102
+ "anyOf": [
103
+ {
104
+ "type": "integer",
105
+ "minimum": 1
106
+ },
107
+ {
108
+ "enum": ["none"]
109
+ }
110
+ ]
111
+ },
112
+ "columns": {
113
+ "$ref": "#/definitions/tickets.columns"
114
+ },
115
+ "fields": {
116
+ "$ref": "#/definitions/tickets.fields"
117
+ }
118
+ }
119
+ },
120
+ "tickets.columns": {
121
+ "type": "object",
122
+ "description": "Which of your board's columns shows each state. Needs a board.",
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "backlog": {
126
+ "type": "string",
127
+ "minLength": 1,
128
+ "description": "The board's column for the backlog state. Default: Backlog."
129
+ },
130
+ "refining": {
131
+ "type": "string",
132
+ "minLength": 1,
133
+ "description": "The board's column for the refining state. Default: In refinement. May be none."
134
+ },
135
+ "ready": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "description": "The board's column for the ready state. Default: Ready. May be none."
139
+ },
140
+ "building": {
141
+ "type": "string",
142
+ "minLength": 1,
143
+ "description": "The board's column for the building state. Default: In progress. May be none."
144
+ },
145
+ "review": {
146
+ "type": "string",
147
+ "minLength": 1,
148
+ "description": "The board's column for the review state. Default: In review. May be none."
149
+ },
150
+ "done": {
151
+ "type": "string",
152
+ "minLength": 1,
153
+ "description": "The board's column for the done state. Default: Done. May be none."
154
+ }
155
+ }
156
+ },
157
+ "tickets.fields": {
158
+ "type": "object",
159
+ "description": "Which of your board's fields the sync writes. Needs a board.",
160
+ "additionalProperties": false,
161
+ "properties": {
162
+ "session": {
163
+ "type": "string",
164
+ "minLength": 1,
165
+ "description": "The board's field the sync writes for session. Default: Session. May be none."
166
+ },
167
+ "runs-in": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "description": "The board's field the sync writes for runs-in. Default: Runs in. May be none."
171
+ },
172
+ "cost": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "description": "The board's field the sync writes for cost. Default: Cost. May be none."
176
+ }
177
+ }
178
+ },
179
+ "code-host": {
180
+ "type": "object",
181
+ "description": "Where pull requests are.",
182
+ "additionalProperties": false,
183
+ "properties": {
184
+ "type": {
185
+ "enum": ["github"],
186
+ "description": "The code host. Default: github."
187
+ }
188
+ }
189
+ },
190
+ "builds": {
191
+ "type": "object",
192
+ "description": "What starts a build, and where it runs.",
193
+ "additionalProperties": false,
194
+ "properties": {
195
+ "trigger": {
196
+ "enum": ["own-server", "github-action", "manual"],
197
+ "description": "What starts a build for a ticket you moved to Ready. Default: manual."
198
+ },
199
+ "runner": {
200
+ "enum": ["github-actions"],
201
+ "description": "Where an unattended build runs. Default: github-actions."
202
+ }
203
+ }
204
+ },
205
+ "specs": {
206
+ "type": "object",
207
+ "description": "How the written spec for a visible change is kept.",
208
+ "additionalProperties": false,
209
+ "properties": {
210
+ "type": {
211
+ "enum": ["none", "openspec"],
212
+ "description": "How the spec for a visible change is kept. Default: none."
213
+ }
214
+ }
215
+ },
216
+ "auto-merge": {
217
+ "type": "object",
218
+ "description": "Which pull requests may merge without you.",
219
+ "additionalProperties": false,
220
+ "properties": {
221
+ "allow": {
222
+ "type": "array",
223
+ "items": {
224
+ "type": "string",
225
+ "minLength": 1
226
+ },
227
+ "description": "Patterns for files safe to merge unread."
228
+ },
229
+ "deny": {
230
+ "type": "array",
231
+ "items": {
232
+ "type": "string",
233
+ "minLength": 1
234
+ },
235
+ "description": "Exceptions inside allow. deny always wins."
236
+ },
237
+ "commands": {
238
+ "type": "array",
239
+ "items": {
240
+ "type": "string",
241
+ "minLength": 1
242
+ },
243
+ "description": "Your own checks. Each is run once for a pull request and can veto it."
244
+ }
245
+ }
246
+ },
247
+ "ci-review": {
248
+ "type": ["object", "null"],
249
+ "additionalProperties": false,
250
+ "description": "The automated review of every pull request: on when this is written, even with nothing under it.",
251
+ "properties": {
252
+ "commands": {
253
+ "type": "array",
254
+ "items": {
255
+ "type": "string",
256
+ "minLength": 1,
257
+ "pattern": "^[^,()\"]+$"
258
+ },
259
+ "description": "Commands the review may run, as prefixes, beside the factory's own, such as your tests."
260
+ }
261
+ }
262
+ },
263
+ "site": {
264
+ "type": "object",
265
+ "description": "How the factory looks at your website.",
266
+ "additionalProperties": false,
267
+ "properties": {
268
+ "start": {
269
+ "type": "string",
270
+ "minLength": 1,
271
+ "description": "Builds and serves the site from the repository's root; $PORT is set."
272
+ },
273
+ "url": {
274
+ "type": "string",
275
+ "minLength": 1,
276
+ "description": "The address start answers at."
277
+ },
278
+ "design-guide": {
279
+ "type": "string",
280
+ "minLength": 1,
281
+ "description": "A file of your own design rules."
282
+ },
283
+ "pages": {
284
+ "type": "array",
285
+ "items": {
286
+ "type": "string",
287
+ "minLength": 1
288
+ },
289
+ "description": "The paths to look at. Otherwise from /sitemap.xml, or the home page's links."
290
+ },
291
+ "widths": {
292
+ "type": "array",
293
+ "minItems": 1,
294
+ "items": {
295
+ "type": "integer",
296
+ "minimum": 1
297
+ },
298
+ "description": "The widths, in pixels, each page is shot at. Default: [390, 1280]."
299
+ },
300
+ "hide": {
301
+ "type": "array",
302
+ "items": {
303
+ "type": "string",
304
+ "minLength": 1
305
+ },
306
+ "description": "CSS selectors hidden before every picture, for something that floats."
307
+ },
308
+ "checks": {
309
+ "type": "array",
310
+ "items": {
311
+ "type": "string",
312
+ "minLength": 1
313
+ },
314
+ "description": "Your own measuring commands. Each gets one JSON object on its standard input."
315
+ },
316
+ "max-pages": {
317
+ "type": "integer",
318
+ "minimum": 1,
319
+ "description": "How many changed pages the agent reads closely. Default: 4."
320
+ },
321
+ "start-minutes": {
322
+ "type": "integer",
323
+ "minimum": 1,
324
+ "description": "How long to wait for the site to answer after start is run. Default: 5."
325
+ },
326
+ "accessibility": {
327
+ "enum": ["wcag22aa", "wcag21aa", "wcag2aa", "none"],
328
+ "description": "The WCAG level axe-core measures each changed page against; none runs no accessibility rules. Default: wcag22aa."
329
+ },
330
+ "new-values": {
331
+ "type": "boolean",
332
+ "description": "Whether a font size, color, spacing, or corner radius the change brings in that the base site uses nowhere is reported. Default: true."
333
+ }
334
+ },
335
+ "required": ["start", "url"]
336
+ },
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
+ "session-minutes": {
384
+ "type": "object",
385
+ "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.",
386
+ "additionalProperties": false,
387
+ "properties": {
388
+ "build": {
389
+ "type": "integer",
390
+ "minimum": 1,
391
+ "description": "A build of a ticket. Default: 230."
392
+ },
393
+ "conflicts": {
394
+ "type": "integer",
395
+ "minimum": 1,
396
+ "description": "A fix of a pull request's conflicts with the default branch. Default: 110."
397
+ },
398
+ "review": {
399
+ "type": "integer",
400
+ "minimum": 1,
401
+ "description": "An answer to your review of a pull request. Default: 50."
402
+ },
403
+ "dependencies": {
404
+ "type": "integer",
405
+ "minimum": 1,
406
+ "description": "Work on the dependency pull requests. Default: 50."
407
+ }
408
+ }
409
+ }
410
+ }
411
+ }