@davidahmann/mill 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 (184) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +335 -0
  3. package/dist/audit/repository.d.ts +8 -0
  4. package/dist/audit/repository.d.ts.map +1 -0
  5. package/dist/audit/repository.js +232 -0
  6. package/dist/audit/repository.js.map +1 -0
  7. package/dist/cli-program.d.ts +12 -0
  8. package/dist/cli-program.d.ts.map +1 -0
  9. package/dist/cli-program.js +1020 -0
  10. package/dist/cli-program.js.map +1 -0
  11. package/dist/cli.d.ts +3 -0
  12. package/dist/cli.d.ts.map +1 -0
  13. package/dist/cli.js +7 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/config/lock.d.ts +12 -0
  16. package/dist/config/lock.d.ts.map +1 -0
  17. package/dist/config/lock.js +83 -0
  18. package/dist/config/lock.js.map +1 -0
  19. package/dist/contracts/canonical.d.ts +7 -0
  20. package/dist/contracts/canonical.d.ts.map +1 -0
  21. package/dist/contracts/canonical.js +30 -0
  22. package/dist/contracts/canonical.js.map +1 -0
  23. package/dist/contracts/schemas.d.ts +2705 -0
  24. package/dist/contracts/schemas.d.ts.map +1 -0
  25. package/dist/contracts/schemas.js +988 -0
  26. package/dist/contracts/schemas.js.map +1 -0
  27. package/dist/doctor.d.ts +21 -0
  28. package/dist/doctor.d.ts.map +1 -0
  29. package/dist/doctor.js +138 -0
  30. package/dist/doctor.js.map +1 -0
  31. package/dist/errors.d.ts +18 -0
  32. package/dist/errors.d.ts.map +1 -0
  33. package/dist/errors.js +31 -0
  34. package/dist/errors.js.map +1 -0
  35. package/dist/index.d.ts +20 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +20 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/intake/prd.d.ts +14 -0
  40. package/dist/intake/prd.d.ts.map +1 -0
  41. package/dist/intake/prd.js +39 -0
  42. package/dist/intake/prd.js.map +1 -0
  43. package/dist/planning/impact.d.ts +59 -0
  44. package/dist/planning/impact.d.ts.map +1 -0
  45. package/dist/planning/impact.js +400 -0
  46. package/dist/planning/impact.js.map +1 -0
  47. package/dist/planning/specification.d.ts +42 -0
  48. package/dist/planning/specification.d.ts.map +1 -0
  49. package/dist/planning/specification.js +235 -0
  50. package/dist/planning/specification.js.map +1 -0
  51. package/dist/qualification/public-alpha.d.ts +16 -0
  52. package/dist/qualification/public-alpha.d.ts.map +1 -0
  53. package/dist/qualification/public-alpha.js +128 -0
  54. package/dist/qualification/public-alpha.js.map +1 -0
  55. package/dist/recipes/node-typescript-next-web.d.ts +19 -0
  56. package/dist/recipes/node-typescript-next-web.d.ts.map +1 -0
  57. package/dist/recipes/node-typescript-next-web.js +136 -0
  58. package/dist/recipes/node-typescript-next-web.js.map +1 -0
  59. package/dist/repository/integration.d.ts +58 -0
  60. package/dist/repository/integration.d.ts.map +1 -0
  61. package/dist/repository/integration.js +1385 -0
  62. package/dist/repository/integration.js.map +1 -0
  63. package/dist/repository/scan.d.ts +27 -0
  64. package/dist/repository/scan.d.ts.map +1 -0
  65. package/dist/repository/scan.js +388 -0
  66. package/dist/repository/scan.js.map +1 -0
  67. package/dist/result.d.ts +23 -0
  68. package/dist/result.d.ts.map +1 -0
  69. package/dist/result.js +24 -0
  70. package/dist/result.js.map +1 -0
  71. package/dist/runtime/codex.d.ts +28 -0
  72. package/dist/runtime/codex.d.ts.map +1 -0
  73. package/dist/runtime/codex.js +439 -0
  74. package/dist/runtime/codex.js.map +1 -0
  75. package/dist/runtime/context.d.ts +10 -0
  76. package/dist/runtime/context.d.ts.map +1 -0
  77. package/dist/runtime/context.js +151 -0
  78. package/dist/runtime/context.js.map +1 -0
  79. package/dist/runtime/delivery.d.ts +58 -0
  80. package/dist/runtime/delivery.d.ts.map +1 -0
  81. package/dist/runtime/delivery.js +1073 -0
  82. package/dist/runtime/delivery.js.map +1 -0
  83. package/dist/runtime/dependencies.d.ts +19 -0
  84. package/dist/runtime/dependencies.d.ts.map +1 -0
  85. package/dist/runtime/dependencies.js +495 -0
  86. package/dist/runtime/dependencies.js.map +1 -0
  87. package/dist/runtime/github.d.ts +112 -0
  88. package/dist/runtime/github.d.ts.map +1 -0
  89. package/dist/runtime/github.js +510 -0
  90. package/dist/runtime/github.js.map +1 -0
  91. package/dist/runtime/inputs.d.ts +24 -0
  92. package/dist/runtime/inputs.d.ts.map +1 -0
  93. package/dist/runtime/inputs.js +237 -0
  94. package/dist/runtime/inputs.js.map +1 -0
  95. package/dist/runtime/lease.d.ts +11 -0
  96. package/dist/runtime/lease.d.ts.map +1 -0
  97. package/dist/runtime/lease.js +52 -0
  98. package/dist/runtime/lease.js.map +1 -0
  99. package/dist/runtime/lifecycle.d.ts +87 -0
  100. package/dist/runtime/lifecycle.d.ts.map +1 -0
  101. package/dist/runtime/lifecycle.js +1024 -0
  102. package/dist/runtime/lifecycle.js.map +1 -0
  103. package/dist/runtime/process.d.ts +39 -0
  104. package/dist/runtime/process.d.ts.map +1 -0
  105. package/dist/runtime/process.js +304 -0
  106. package/dist/runtime/process.js.map +1 -0
  107. package/dist/runtime/repository.d.ts +36 -0
  108. package/dist/runtime/repository.d.ts.map +1 -0
  109. package/dist/runtime/repository.js +458 -0
  110. package/dist/runtime/repository.js.map +1 -0
  111. package/dist/runtime/state.d.ts +121 -0
  112. package/dist/runtime/state.d.ts.map +1 -0
  113. package/dist/runtime/state.js +1017 -0
  114. package/dist/runtime/state.js.map +1 -0
  115. package/dist/runtime/verifier.d.ts +31 -0
  116. package/dist/runtime/verifier.d.ts.map +1 -0
  117. package/dist/runtime/verifier.js +478 -0
  118. package/dist/runtime/verifier.js.map +1 -0
  119. package/dist/runtime/worker.d.ts +67 -0
  120. package/dist/runtime/worker.d.ts.map +1 -0
  121. package/dist/runtime/worker.js +34 -0
  122. package/dist/runtime/worker.js.map +1 -0
  123. package/dist/security/safe-path.d.ts +3 -0
  124. package/dist/security/safe-path.d.ts.map +1 -0
  125. package/dist/security/safe-path.js +102 -0
  126. package/dist/security/safe-path.js.map +1 -0
  127. package/dist/version.d.ts +4 -0
  128. package/dist/version.d.ts.map +1 -0
  129. package/dist/version.js +4 -0
  130. package/dist/version.js.map +1 -0
  131. package/dist/workflows/founder.d.ts +33 -0
  132. package/dist/workflows/founder.d.ts.map +1 -0
  133. package/dist/workflows/founder.js +422 -0
  134. package/dist/workflows/founder.js.map +1 -0
  135. package/package.json +79 -0
  136. package/recipes/node-typescript-next-web/.github/workflows/ci.yml +34 -0
  137. package/recipes/node-typescript-next-web/.node-version +1 -0
  138. package/recipes/node-typescript-next-web/.tool-versions +1 -0
  139. package/recipes/node-typescript-next-web/AGENTS.md +44 -0
  140. package/recipes/node-typescript-next-web/README.md +16 -0
  141. package/recipes/node-typescript-next-web/WORKFLOW.md +6 -0
  142. package/recipes/node-typescript-next-web/app/api/health/route.ts +5 -0
  143. package/recipes/node-typescript-next-web/app/layout.tsx +19 -0
  144. package/recipes/node-typescript-next-web/app/page.tsx +12 -0
  145. package/recipes/node-typescript-next-web/app/styles.css +21 -0
  146. package/recipes/node-typescript-next-web/docs/development.md +16 -0
  147. package/recipes/node-typescript-next-web/eslint.config.mjs +9 -0
  148. package/recipes/node-typescript-next-web/gitignore.template +5 -0
  149. package/recipes/node-typescript-next-web/next-env.d.ts +7 -0
  150. package/recipes/node-typescript-next-web/next.config.ts +11 -0
  151. package/recipes/node-typescript-next-web/package-lock.json +7540 -0
  152. package/recipes/node-typescript-next-web/package.json +39 -0
  153. package/recipes/node-typescript-next-web/playwright.config.ts +23 -0
  154. package/recipes/node-typescript-next-web/recipe.yaml +71 -0
  155. package/recipes/node-typescript-next-web/scripts/check-package.mjs +3 -0
  156. package/recipes/node-typescript-next-web/src/health.ts +3 -0
  157. package/recipes/node-typescript-next-web/test/browser/home.spec.ts +14 -0
  158. package/recipes/node-typescript-next-web/test/integration/health-route.test.ts +11 -0
  159. package/recipes/node-typescript-next-web/test/unit/health.test.ts +9 -0
  160. package/recipes/node-typescript-next-web/tsconfig.json +33 -0
  161. package/schemas/README.md +64 -0
  162. package/schemas/audit-report.schema.json +59 -0
  163. package/schemas/blueprint.schema.json +34 -0
  164. package/schemas/context-manifest.schema.json +88 -0
  165. package/schemas/delivery-record.schema.json +266 -0
  166. package/schemas/impact-manifest.schema.json +146 -0
  167. package/schemas/managed-repository.schema.json +36 -0
  168. package/schemas/mill-config.schema.json +212 -0
  169. package/schemas/mill-lock.schema.json +96 -0
  170. package/schemas/outcome-plan.schema.json +51 -0
  171. package/schemas/product-contract.schema.json +181 -0
  172. package/schemas/public-alpha-qualification.schema.json +391 -0
  173. package/schemas/recipe-manifest.schema.json +187 -0
  174. package/schemas/release-evidence.schema.json +170 -0
  175. package/schemas/repository-integration-plan.schema.json +156 -0
  176. package/schemas/review-result.schema.json +57 -0
  177. package/schemas/scenario-set.schema.json +84 -0
  178. package/schemas/source-manifest.schema.json +96 -0
  179. package/schemas/specification-proposal.schema.json +406 -0
  180. package/schemas/support-tuple.schema.json +107 -0
  181. package/schemas/task-packet.schema.json +395 -0
  182. package/schemas/validation-evidence.schema.json +125 -0
  183. package/schemas/worker-invocation.schema.json +119 -0
  184. package/schemas/worker-profile.schema.json +53 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 David Ahmann
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
package/README.md ADDED
@@ -0,0 +1,335 @@
1
+ # Mill
2
+
3
+ Mill is a local-first software factory that turns approved product intent into
4
+ bounded, tested, locally reviewed draft pull requests.
5
+
6
+ It is designed for a founder or small team that wants coding-agent leverage
7
+ without handing one agent an open-ended ticket, production credentials, and the
8
+ power to judge its own work. Product truth stays in the repository. Codex writes
9
+ inside a disposable worktree. Native tests and scenarios verify the committed
10
+ candidate. A separate read-only pass reviews that exact commit. Only the
11
+ attended shipper can use your GitHub identity, and it stops at a draft PR.
12
+
13
+ Mill `0.1.4` is a public-alpha release candidate. The source tree implements the
14
+ candidate and genesis release gates, but no npm availability or supported tuple
15
+ is claimed until the separately authorized release completes and its registry
16
+ and GitHub readback pass.
17
+
18
+ ## Why Mill
19
+
20
+ Coding is only one part of software delivery. The difficult failure modes live
21
+ between a PRD and a merged change: ambiguous intent, changing architecture, weak
22
+ acceptance tests, context drift, cumulative regressions, credential leakage,
23
+ interrupted side effects, noisy review, and artifacts that cannot be
24
+ reconstructed later.
25
+
26
+ Mill makes those boundaries explicit:
27
+
28
+ - approved outcomes, invariants, scenarios, impacts, and tasks are versioned in
29
+ Git;
30
+ - each run is bound to an exact base, authority closure, worker profile, budget,
31
+ candidate commit, validation result, and review result;
32
+ - product code remains independently buildable and testable without Mill;
33
+ - the builder cannot push, merge, deploy, or rewrite the oracle that certifies
34
+ its own candidate;
35
+ - GitHub mutations are separately planned, approved, journaled, and reconciled;
36
+ - one complete review is repaired systemically instead of creating micro-PR
37
+ churn;
38
+ - longitudinal qualification proves that accepted behavior survives a sequence
39
+ of dependent changes, not just one isolated demo;
40
+ - releases preserve and publish one independently reproduced tarball rather than
41
+ rebuilding at publication time.
42
+
43
+ This is the differentiator: Mill is not another chat UI or general coding
44
+ harness. It is the small, inspectable delivery control plane around the coding
45
+ agent you already use.
46
+
47
+ ## What it can do
48
+
49
+ For its one qualified shape, Mill can:
50
+
51
+ 1. inspect a PRD, source manifest, structured product proposal, and repository
52
+ without executing repository code;
53
+ 2. freeze an approved product contract, stable invariants, scenarios, and
54
+ per-change impact;
55
+ 3. create a repository from the bundled web recipe or plan a compatible adoption
56
+ without overwriting existing truth;
57
+ 4. prepare exact npm dependencies as a separate attended network effect;
58
+ 5. run one approved task through Codex build, OCI validation, exact-candidate
59
+ review, and one bounded repair generation;
60
+ 6. plan and open one draft GitHub PR through the operator's own `gh` session;
61
+ 7. observe exact-head CI and review, then record human merge and resulting-main
62
+ closure;
63
+ 8. back up, restore, purge, reconcile, cancel, detach, and export a redacted
64
+ support bundle through explicit commands;
65
+ 9. audit the exact repository candidate and validate a public-alpha
66
+ qualification record.
67
+
68
+ Mill does not autonomously research the web or invent a product specification in
69
+ this alpha. The operator supplies the structured proposal that Mill assesses and
70
+ freezes.
71
+
72
+ ## Supported shape
73
+
74
+ The first recipe is intentionally exact:
75
+
76
+ - Node.js 24.18.1 and npm 11.16.0 inside the verifier image;
77
+ - TypeScript 6.0.3;
78
+ - Next.js 16.3.4 and React 19.2.8;
79
+ - Playwright 1.62.1;
80
+ - GitHub as the only forge;
81
+ - Codex CLI with the operator's existing login;
82
+ - Docker-compatible OCI verification;
83
+ - macOS arm64 as the first candidate host tuple.
84
+
85
+ Mill itself is developed with Node.js 24.20.0 and npm 11.19.0. Exact support is
86
+ published in release qualification evidence, not inferred from nearby versions.
87
+ All other stacks, operating systems, architectures, forges, models, and worker
88
+ harnesses are experimental or unsupported until independently qualified.
89
+
90
+ ## Install
91
+
92
+ Before the first public artifact, develop and evaluate from a clean source
93
+ checkout:
94
+
95
+ ```sh
96
+ git clone https://github.com/davidahmann/mill.git
97
+ cd mill
98
+ asdf install
99
+ node_bin_dir=$(dirname "$(asdf which node)")
100
+ PATH="$node_bin_dir:$PATH" "$node_bin_dir/npm" ci --ignore-scripts
101
+ PATH="$node_bin_dir:$PATH" "$node_bin_dir/npm" run check
102
+ PATH="$node_bin_dir:$PATH" "$node_bin_dir/npm" run build
103
+ node dist/cli.js --version
104
+ ```
105
+
106
+ After the separately verified npm release, downstream repositories will pin the
107
+ exact package version rather than `latest`:
108
+
109
+ ```sh
110
+ npm install --save-dev --ignore-scripts @davidahmann/mill@0.1.4
111
+ npx --no-install millctl --version
112
+ ```
113
+
114
+ Do not treat the npm command as available until the release exists and the
115
+ downloaded artifact passes the documented readback canary.
116
+
117
+ ## Quick start
118
+
119
+ Start with read-only readiness. These commands do not execute repository code:
120
+
121
+ ```sh
122
+ node dist/cli.js doctor --mode inspect
123
+ node dist/cli.js inspect --prd product/PRD.md
124
+ node dist/cli.js adopt --scan-only
125
+ ```
126
+
127
+ For a source-backed specification, supply the PRD, source manifest, and
128
+ structured proposal:
129
+
130
+ ```sh
131
+ millctl --json plan specification \
132
+ --prd product/PRD.md \
133
+ --sources product/sources.yaml \
134
+ --proposal product/proposal.yaml
135
+ ```
136
+
137
+ Review the returned contradictions, assumptions, questions, and exact proposal
138
+ digest. Approval freezes that proposal; it does not grant repository writes.
139
+
140
+ ### Create a repository
141
+
142
+ Preview the exact file plan first, then apply the same plan attended:
143
+
144
+ ```sh
145
+ millctl --json new my-product --dry-run \
146
+ --prd product/PRD.md --sources product/sources.yaml \
147
+ --proposal product/proposal.yaml --approve-product sha256:<product> \
148
+ --repository-id <uuid> --approved-by <identity> \
149
+ --approved-at <iso-time> --author-name <name> --author-email <email>
150
+
151
+ millctl --json new my-product --apply --attended \
152
+ --prd product/PRD.md --sources product/sources.yaml \
153
+ --proposal product/proposal.yaml --approve-product sha256:<product> \
154
+ --approve-plan sha256:<integration-plan> --repository-id <uuid> \
155
+ --approved-by <identity> --approved-at <iso-time> \
156
+ --author-name <name> --author-email <email>
157
+ ```
158
+
159
+ Greenfield apply stages and runs the complete native recipe gate before the
160
+ target becomes a Git repository. It never replaces an existing path.
161
+
162
+ ### Adopt a compatible repository
163
+
164
+ Use the same two-step boundary with `adopt --plan` and then
165
+ `adopt --apply --attended`. Adoption supports only the exact recipe-compatible
166
+ Node/Next.js shape. It keeps the operator checkout unchanged, writes an isolated
167
+ branch, and blocks on conflicting product truth, drifted native oracle files,
168
+ unsafe Git state, symlinks, credential-like files, or incompatible versions.
169
+
170
+ Prepare dependencies separately because it is the only recipe step that needs
171
+ registry network access:
172
+
173
+ ```sh
174
+ millctl --json dependencies prepare --attended
175
+ ```
176
+
177
+ Later verification has no network and receives read-only source.
178
+
179
+ ### Deliver one approved task
180
+
181
+ The downstream repository owns `mill.yaml`, `product/contract.yaml`,
182
+ `quality/scenarios.yaml`, an approved impact manifest, and a version 2 task.
183
+ Qualify the unchanged base, then use the returned digest once:
184
+
185
+ ```sh
186
+ millctl --json qualify --baseline --task product/tasks/TASK.yaml
187
+ millctl --json run --task product/tasks/TASK.yaml \
188
+ --approve sha256:<baseline-approval> --attended
189
+ millctl --json verify --task product/tasks/TASK.yaml --run <run-id>
190
+ millctl --json review --task product/tasks/TASK.yaml --run <run-id>
191
+ ```
192
+
193
+ The shorter resumable path is:
194
+
195
+ ```sh
196
+ millctl --json start --prd product/PRD.md --attended
197
+ ```
198
+
199
+ `millctl start` selects exactly one approved ready outcome or resumes its sole
200
+ existing lifecycle. It checks authority before dependency or model spend.
201
+
202
+ ### Open a reviewed draft PR
203
+
204
+ Raise `trustCeiling` to `propose` only after configuring the exact GitHub
205
+ repository node ID, branch, allowed operator and merger, checks, review policy,
206
+ and approval TTL in `mill.yaml`.
207
+
208
+ ```sh
209
+ millctl --json pr plan --task product/tasks/TASK.yaml --run <run-id>
210
+ millctl --json pr open --task product/tasks/TASK.yaml --run <run-id> \
211
+ --approve sha256:<delivery-plan> --attended
212
+ millctl --json pr observe --task product/tasks/TASK.yaml --run <run-id>
213
+ # A human marks ready and merges in GitHub.
214
+ millctl --json pr finalize --task product/tasks/TASK.yaml --run <run-id>
215
+ ```
216
+
217
+ Or use `millctl ship --draft` twice: first to return the proposal, then with its
218
+ exact digest and `--attended` to perform it. `millctl` never marks ready or
219
+ merges.
220
+
221
+ ## Trust model
222
+
223
+ Mill separates four principals:
224
+
225
+ | Principal | May do | Cannot do |
226
+ | ---------------- | -------------------------------------------------- | -------------------------------------------------- |
227
+ | Builder | Edit approved paths in a disposable worktree | Push, merge, deploy, change authority or oracles |
228
+ | Verifier | Run declared commands in bounded no-network OCI | Write candidate source or use forge credentials |
229
+ | Reviewer | Read the exact committed candidate | Execute or edit code |
230
+ | Attended shipper | Push the unchanged candidate and open its draft PR | Change the candidate, mark ready, merge, or deploy |
231
+
232
+ Codex uses your existing Codex CLI session and therefore your own provider
233
+ billing. GitHub operations use your existing `gh` session. Another maintainer
234
+ can clone Mill and use their own Codex and GitHub accounts after the downstream
235
+ repo explicitly allows their identity. Mill stores neither credential.
236
+
237
+ The Codex worker runs on the trusted host with a workspace-write sandbox. This
238
+ is not containment against hostile code, host files, keychains, processes, or
239
+ network access. Native candidate verification is the stronger boundary: a
240
+ pre-pulled digest-pinned OCI image, no network, read-only source/root, dropped
241
+ capabilities, deadlines, bounded output and resources, and explicit cleanup. Do
242
+ not use this alpha with hostile repositories or sensitive source.
243
+
244
+ ## Recovery
245
+
246
+ Every run has durable state and an append-only event history. If a controller is
247
+ interrupted, inspect before acting:
248
+
249
+ ```sh
250
+ millctl --json status --run <run-id>
251
+ millctl --json resume --task product/tasks/TASK.yaml --run <run-id> --attended
252
+ millctl --json cancel --run <run-id>
253
+ millctl --json pr reconcile --task product/tasks/TASK.yaml --run <run-id>
254
+ ```
255
+
256
+ Mill never signals a process solely from a stored PID and never retries an
257
+ uncertain external effect without authoritative readback. Use explicit local
258
+ recovery for state and diagnostics:
259
+
260
+ ```sh
261
+ millctl --json state backup --output /absolute/path/backup.sqlite
262
+ millctl --json state restore --input /absolute/path/backup.sqlite --attended
263
+ millctl --json state purge --attended
264
+ millctl --json support-bundle --output /absolute/path/support.json
265
+ millctl --json detach plan
266
+ ```
267
+
268
+ Restore validates the database before atomic replacement and quarantines newer
269
+ unreferenced worktrees. Detach is plan-only; the operator performs the reviewed
270
+ removal. A generated/adopted repo must continue to build and test natively after
271
+ Mill is removed.
272
+
273
+ ## Audit and qualification
274
+
275
+ `millctl audit` is a bounded, read-only milestone check for Mill's selected
276
+ recipe and release path. It requires a clean exact Git candidate and reports
277
+ product, code, UX, accessibility, security, dependency, architecture,
278
+ operations, and release checks in a schema-valid JSON envelope.
279
+
280
+ ```sh
281
+ millctl --json --cwd . audit
282
+ millctl --json --cwd . qualify public-alpha \
283
+ --file /absolute/path/qualification.json
284
+ ```
285
+
286
+ Public-alpha qualification requires at least five dependent accepted changes,
287
+ item-level new-behavior and preservation evidence, a rejected and recovered
288
+ seeded-fault branch, a current exact support tuple, every required packed and
289
+ integration canary, and all nine audits. A later success cannot conceal an
290
+ earlier unresolved preservation failure.
291
+
292
+ The one-time genesis release additionally requires two independent clean builds
293
+ from the exact annotated tag, canonical content equality, a preserved tarball,
294
+ SBOM, trusted npm OIDC publication, provenance, registry reinstallation, and
295
+ GitHub Release readback. See [the release runbook](docs/release.md).
296
+
297
+ ## Troubleshooting
298
+
299
+ - `WRONG_MILL_VERSION`: run the exact package version in `mill.lock`; Mill does
300
+ not silently delegate to another version.
301
+ - `BASE_REF_DRIFT` or context drift: stop, review the new repository state, and
302
+ requalify. Never reuse the old approval digest.
303
+ - missing OCI image: pull the exact digest explicitly outside Mill, then rerun
304
+ readiness. Mill never pulls implicitly.
305
+ - provider login failure: run `codex login` as the operator; do not pass a token
306
+ through the task or repository.
307
+ - GitHub identity or destination mismatch: correct `mill.yaml` or log in with
308
+ the explicitly allowed `gh` identity. Do not weaken the binding.
309
+ - `effect_unknown`: run read-only reconciliation. Do not retry push or PR
310
+ creation until absence or success is authoritative.
311
+ - active-run conflict: resume or safely terminalize the existing run; do not
312
+ start a second writer.
313
+
314
+ Use [GitHub Issues](https://github.com/davidahmann/mill/issues) for reproducible
315
+ defects and private vulnerability reporting for security issues. Support is
316
+ best-effort with no SLA.
317
+
318
+ ## Limitations
319
+
320
+ - local and attended only;
321
+ - one repository, outcome, and writer at a time;
322
+ - one exact web recipe and compatible adoption shape;
323
+ - operator-supplied structured proposal, not autonomous planning research;
324
+ - Codex and GitHub through the operator's existing sessions;
325
+ - no hostile-host containment for the coding agent;
326
+ - no daemon, hosted control plane, scheduler, fleet, or parallel agents;
327
+ - no automatic readiness, merge, deployment, repository provisioning, or issue
328
+ synchronization;
329
+ - no general migration engine, automatic upgrade/rollback, or automatic detach;
330
+ - no self-improvement loop or model-authored acceptance authority.
331
+
332
+ For system detail, read the [product requirements](product/PRD.md),
333
+ [architecture](architecture/ARCHITECTURE.md),
334
+ [development guide](docs/development.md), [workflow](WORKFLOW.md), and
335
+ [agent operating contract](AGENTS.md).
@@ -0,0 +1,8 @@
1
+ import type { z } from "zod";
2
+ import { auditReportSchema } from "../contracts/schemas.js";
3
+ export type AuditReport = z.infer<typeof auditReportSchema>;
4
+ export declare function auditRepository(input: {
5
+ root: string;
6
+ now?: Date;
7
+ }): Promise<AuditReport>;
8
+ //# sourceMappingURL=repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/audit/repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EACL,iBAAiB,EAIlB,MAAM,yBAAyB,CAAC;AASjC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAkD5D,wBAAsB,eAAe,CAAC,KAAK,EAAE;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,GAAG,OAAO,CAAC,WAAW,CAAC,CAoOvB"}