@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.
- package/LICENSE +202 -0
- package/README.md +335 -0
- package/dist/audit/repository.d.ts +8 -0
- package/dist/audit/repository.d.ts.map +1 -0
- package/dist/audit/repository.js +232 -0
- package/dist/audit/repository.js.map +1 -0
- package/dist/cli-program.d.ts +12 -0
- package/dist/cli-program.d.ts.map +1 -0
- package/dist/cli-program.js +1020 -0
- package/dist/cli-program.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +7 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/lock.d.ts +12 -0
- package/dist/config/lock.d.ts.map +1 -0
- package/dist/config/lock.js +83 -0
- package/dist/config/lock.js.map +1 -0
- package/dist/contracts/canonical.d.ts +7 -0
- package/dist/contracts/canonical.d.ts.map +1 -0
- package/dist/contracts/canonical.js +30 -0
- package/dist/contracts/canonical.js.map +1 -0
- package/dist/contracts/schemas.d.ts +2705 -0
- package/dist/contracts/schemas.d.ts.map +1 -0
- package/dist/contracts/schemas.js +988 -0
- package/dist/contracts/schemas.js.map +1 -0
- package/dist/doctor.d.ts +21 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +138 -0
- package/dist/doctor.js.map +1 -0
- package/dist/errors.d.ts +18 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +31 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/intake/prd.d.ts +14 -0
- package/dist/intake/prd.d.ts.map +1 -0
- package/dist/intake/prd.js +39 -0
- package/dist/intake/prd.js.map +1 -0
- package/dist/planning/impact.d.ts +59 -0
- package/dist/planning/impact.d.ts.map +1 -0
- package/dist/planning/impact.js +400 -0
- package/dist/planning/impact.js.map +1 -0
- package/dist/planning/specification.d.ts +42 -0
- package/dist/planning/specification.d.ts.map +1 -0
- package/dist/planning/specification.js +235 -0
- package/dist/planning/specification.js.map +1 -0
- package/dist/qualification/public-alpha.d.ts +16 -0
- package/dist/qualification/public-alpha.d.ts.map +1 -0
- package/dist/qualification/public-alpha.js +128 -0
- package/dist/qualification/public-alpha.js.map +1 -0
- package/dist/recipes/node-typescript-next-web.d.ts +19 -0
- package/dist/recipes/node-typescript-next-web.d.ts.map +1 -0
- package/dist/recipes/node-typescript-next-web.js +136 -0
- package/dist/recipes/node-typescript-next-web.js.map +1 -0
- package/dist/repository/integration.d.ts +58 -0
- package/dist/repository/integration.d.ts.map +1 -0
- package/dist/repository/integration.js +1385 -0
- package/dist/repository/integration.js.map +1 -0
- package/dist/repository/scan.d.ts +27 -0
- package/dist/repository/scan.d.ts.map +1 -0
- package/dist/repository/scan.js +388 -0
- package/dist/repository/scan.js.map +1 -0
- package/dist/result.d.ts +23 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +24 -0
- package/dist/result.js.map +1 -0
- package/dist/runtime/codex.d.ts +28 -0
- package/dist/runtime/codex.d.ts.map +1 -0
- package/dist/runtime/codex.js +439 -0
- package/dist/runtime/codex.js.map +1 -0
- package/dist/runtime/context.d.ts +10 -0
- package/dist/runtime/context.d.ts.map +1 -0
- package/dist/runtime/context.js +151 -0
- package/dist/runtime/context.js.map +1 -0
- package/dist/runtime/delivery.d.ts +58 -0
- package/dist/runtime/delivery.d.ts.map +1 -0
- package/dist/runtime/delivery.js +1073 -0
- package/dist/runtime/delivery.js.map +1 -0
- package/dist/runtime/dependencies.d.ts +19 -0
- package/dist/runtime/dependencies.d.ts.map +1 -0
- package/dist/runtime/dependencies.js +495 -0
- package/dist/runtime/dependencies.js.map +1 -0
- package/dist/runtime/github.d.ts +112 -0
- package/dist/runtime/github.d.ts.map +1 -0
- package/dist/runtime/github.js +510 -0
- package/dist/runtime/github.js.map +1 -0
- package/dist/runtime/inputs.d.ts +24 -0
- package/dist/runtime/inputs.d.ts.map +1 -0
- package/dist/runtime/inputs.js +237 -0
- package/dist/runtime/inputs.js.map +1 -0
- package/dist/runtime/lease.d.ts +11 -0
- package/dist/runtime/lease.d.ts.map +1 -0
- package/dist/runtime/lease.js +52 -0
- package/dist/runtime/lease.js.map +1 -0
- package/dist/runtime/lifecycle.d.ts +87 -0
- package/dist/runtime/lifecycle.d.ts.map +1 -0
- package/dist/runtime/lifecycle.js +1024 -0
- package/dist/runtime/lifecycle.js.map +1 -0
- package/dist/runtime/process.d.ts +39 -0
- package/dist/runtime/process.d.ts.map +1 -0
- package/dist/runtime/process.js +304 -0
- package/dist/runtime/process.js.map +1 -0
- package/dist/runtime/repository.d.ts +36 -0
- package/dist/runtime/repository.d.ts.map +1 -0
- package/dist/runtime/repository.js +458 -0
- package/dist/runtime/repository.js.map +1 -0
- package/dist/runtime/state.d.ts +121 -0
- package/dist/runtime/state.d.ts.map +1 -0
- package/dist/runtime/state.js +1017 -0
- package/dist/runtime/state.js.map +1 -0
- package/dist/runtime/verifier.d.ts +31 -0
- package/dist/runtime/verifier.d.ts.map +1 -0
- package/dist/runtime/verifier.js +478 -0
- package/dist/runtime/verifier.js.map +1 -0
- package/dist/runtime/worker.d.ts +67 -0
- package/dist/runtime/worker.d.ts.map +1 -0
- package/dist/runtime/worker.js +34 -0
- package/dist/runtime/worker.js.map +1 -0
- package/dist/security/safe-path.d.ts +3 -0
- package/dist/security/safe-path.d.ts.map +1 -0
- package/dist/security/safe-path.js +102 -0
- package/dist/security/safe-path.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -0
- package/dist/workflows/founder.d.ts +33 -0
- package/dist/workflows/founder.d.ts.map +1 -0
- package/dist/workflows/founder.js +422 -0
- package/dist/workflows/founder.js.map +1 -0
- package/package.json +79 -0
- package/recipes/node-typescript-next-web/.github/workflows/ci.yml +34 -0
- package/recipes/node-typescript-next-web/.node-version +1 -0
- package/recipes/node-typescript-next-web/.tool-versions +1 -0
- package/recipes/node-typescript-next-web/AGENTS.md +44 -0
- package/recipes/node-typescript-next-web/README.md +16 -0
- package/recipes/node-typescript-next-web/WORKFLOW.md +6 -0
- package/recipes/node-typescript-next-web/app/api/health/route.ts +5 -0
- package/recipes/node-typescript-next-web/app/layout.tsx +19 -0
- package/recipes/node-typescript-next-web/app/page.tsx +12 -0
- package/recipes/node-typescript-next-web/app/styles.css +21 -0
- package/recipes/node-typescript-next-web/docs/development.md +16 -0
- package/recipes/node-typescript-next-web/eslint.config.mjs +9 -0
- package/recipes/node-typescript-next-web/gitignore.template +5 -0
- package/recipes/node-typescript-next-web/next-env.d.ts +7 -0
- package/recipes/node-typescript-next-web/next.config.ts +11 -0
- package/recipes/node-typescript-next-web/package-lock.json +7540 -0
- package/recipes/node-typescript-next-web/package.json +39 -0
- package/recipes/node-typescript-next-web/playwright.config.ts +23 -0
- package/recipes/node-typescript-next-web/recipe.yaml +71 -0
- package/recipes/node-typescript-next-web/scripts/check-package.mjs +3 -0
- package/recipes/node-typescript-next-web/src/health.ts +3 -0
- package/recipes/node-typescript-next-web/test/browser/home.spec.ts +14 -0
- package/recipes/node-typescript-next-web/test/integration/health-route.test.ts +11 -0
- package/recipes/node-typescript-next-web/test/unit/health.test.ts +9 -0
- package/recipes/node-typescript-next-web/tsconfig.json +33 -0
- package/schemas/README.md +64 -0
- package/schemas/audit-report.schema.json +59 -0
- package/schemas/blueprint.schema.json +34 -0
- package/schemas/context-manifest.schema.json +88 -0
- package/schemas/delivery-record.schema.json +266 -0
- package/schemas/impact-manifest.schema.json +146 -0
- package/schemas/managed-repository.schema.json +36 -0
- package/schemas/mill-config.schema.json +212 -0
- package/schemas/mill-lock.schema.json +96 -0
- package/schemas/outcome-plan.schema.json +51 -0
- package/schemas/product-contract.schema.json +181 -0
- package/schemas/public-alpha-qualification.schema.json +391 -0
- package/schemas/recipe-manifest.schema.json +187 -0
- package/schemas/release-evidence.schema.json +170 -0
- package/schemas/repository-integration-plan.schema.json +156 -0
- package/schemas/review-result.schema.json +57 -0
- package/schemas/scenario-set.schema.json +84 -0
- package/schemas/source-manifest.schema.json +96 -0
- package/schemas/specification-proposal.schema.json +406 -0
- package/schemas/support-tuple.schema.json +107 -0
- package/schemas/task-packet.schema.json +395 -0
- package/schemas/validation-evidence.schema.json +125 -0
- package/schemas/worker-invocation.schema.json +119 -0
- package/schemas/worker-profile.schema.json +53 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { parse as parseYaml } from "yaml";
|
|
3
|
+
import { outcomePlanSchema, sourceManifestSchema, } from "../contracts/schemas.js";
|
|
4
|
+
import { canonicalDigest } from "../contracts/canonical.js";
|
|
5
|
+
import { doctor, doctorReady } from "../doctor.js";
|
|
6
|
+
import { asMillError, ExitCode, MillError } from "../errors.js";
|
|
7
|
+
import { finalizeDraftPr, observeDraftPr, planDraftPr, reconcileDraftPr, } from "../runtime/delivery.js";
|
|
8
|
+
import { qualifyBaseline, resumeRun, reviewRun, runInventory, runStatus, startLocalRun, verifyRun, } from "../runtime/lifecycle.js";
|
|
9
|
+
import { loadMillConfig, loadRuntimeInputs, textDigest, } from "../runtime/inputs.js";
|
|
10
|
+
import { commonGitDirectory, qualifyRepositoryForBuild, } from "../runtime/repository.js";
|
|
11
|
+
import { prepareDependencySnapshot, } from "../runtime/dependencies.js";
|
|
12
|
+
import { isTerminalRun, repositoryStateDirectory } from "../runtime/state.js";
|
|
13
|
+
import { safeReadText } from "../security/safe-path.js";
|
|
14
|
+
export async function nextReadyOutcome(root) {
|
|
15
|
+
const source = await safeReadText(root, "product/plan.yaml", 2 * 1024 * 1024);
|
|
16
|
+
let raw;
|
|
17
|
+
try {
|
|
18
|
+
raw = parseYaml(source);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
throw new MillError("OUTCOME_PLAN_INVALID", "product/plan.yaml is not valid YAML.", ExitCode.data, { cause: String(error) });
|
|
22
|
+
}
|
|
23
|
+
const plan = outcomePlanSchema.parse(raw);
|
|
24
|
+
const ready = plan.outcomes.filter((outcome) => outcome.status === "ready");
|
|
25
|
+
if (ready.length !== 1 || ready[0]?.taskRef === undefined) {
|
|
26
|
+
throw new MillError(ready.length === 0 ? "NO_READY_OUTCOME" : "AMBIGUOUS_READY_OUTCOME", "Exactly one ready outcome with one approved task reference is required.", ExitCode.configuration, { readyOutcomeIds: ready.map((outcome) => outcome.id) });
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
outcomeId: ready[0].id,
|
|
30
|
+
title: ready[0].title,
|
|
31
|
+
taskPath: ready[0].taskRef,
|
|
32
|
+
productContractDigest: plan.productContractDigest,
|
|
33
|
+
acceptanceIds: ready[0].acceptanceIds ?? [],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export async function prepareRepositoryDependencies(root, attended) {
|
|
37
|
+
const config = await loadMillConfig(root);
|
|
38
|
+
if (config.verifier?.dependencies === undefined)
|
|
39
|
+
return undefined;
|
|
40
|
+
const commonDirectory = await commonGitDirectory(root);
|
|
41
|
+
return prepareDependencySnapshot({
|
|
42
|
+
root,
|
|
43
|
+
stateDirectory: repositoryStateDirectory(config.repositoryId, commonDirectory),
|
|
44
|
+
config,
|
|
45
|
+
attended,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
async function assertApprovedPrd(root, prdPath, inputs) {
|
|
49
|
+
const [prd, manifestSource] = await Promise.all([
|
|
50
|
+
safeReadText(root, prdPath, 2 * 1024 * 1024),
|
|
51
|
+
safeReadText(root, "product/sources.yaml", 2 * 1024 * 1024),
|
|
52
|
+
]);
|
|
53
|
+
let raw;
|
|
54
|
+
try {
|
|
55
|
+
raw = parseYaml(manifestSource);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
throw new MillError("PRD_SOURCE_MANIFEST_INVALID", "product/sources.yaml is not valid YAML.", ExitCode.data, { cause: String(error) });
|
|
59
|
+
}
|
|
60
|
+
const manifest = sourceManifestSchema.safeParse(raw);
|
|
61
|
+
if (!manifest.success) {
|
|
62
|
+
throw new MillError("PRD_SOURCE_MANIFEST_INVALID", "product/sources.yaml does not satisfy its schema.", ExitCode.data, { issues: manifest.error.issues });
|
|
63
|
+
}
|
|
64
|
+
const normalizedPrd = path.normalize(prdPath).split(path.sep).join("/");
|
|
65
|
+
const expectedDigest = textDigest(prd);
|
|
66
|
+
const productSourceIds = new Set(inputs.continuity?.product.sourceRefs ?? []);
|
|
67
|
+
const matches = manifest.data.sources.filter((source) => {
|
|
68
|
+
const normalizedSource = path
|
|
69
|
+
.normalize(source.uri)
|
|
70
|
+
.split(path.sep)
|
|
71
|
+
.join("/");
|
|
72
|
+
return (normalizedSource === normalizedPrd &&
|
|
73
|
+
(source.revision === expectedDigest ||
|
|
74
|
+
source.digest === expectedDigest) &&
|
|
75
|
+
productSourceIds.has(source.id));
|
|
76
|
+
});
|
|
77
|
+
if (matches.length !== 1) {
|
|
78
|
+
throw new MillError("PRD_AUTHORITY_MISMATCH", "The selected PRD is not the exact source bound by the approved product contract.", ExitCode.configuration, { prdPath, digest: expectedDigest, matches: matches.length });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function sameMembers(left, right) {
|
|
82
|
+
const sortedLeft = [...left].sort();
|
|
83
|
+
const sortedRight = [...right].sort();
|
|
84
|
+
return (sortedLeft.length === sortedRight.length &&
|
|
85
|
+
sortedLeft.every((value, index) => value === sortedRight[index]));
|
|
86
|
+
}
|
|
87
|
+
function assertOutcomeAuthority(outcome, inputs) {
|
|
88
|
+
const continuity = inputs.continuity;
|
|
89
|
+
const contractDigest = continuity === undefined
|
|
90
|
+
? null
|
|
91
|
+
: canonicalDigest(continuity.product);
|
|
92
|
+
const contractOutcome = continuity?.product.outcomes.find((candidate) => candidate.id === outcome.outcomeId);
|
|
93
|
+
const impact = continuity?.impact;
|
|
94
|
+
const contractAcceptance = contractOutcome?.acceptanceIds ??
|
|
95
|
+
continuity?.product.acceptance.map((item) => item.id) ??
|
|
96
|
+
[];
|
|
97
|
+
const planAcceptance = outcome.acceptanceIds.length > 0
|
|
98
|
+
? outcome.acceptanceIds
|
|
99
|
+
: contractAcceptance;
|
|
100
|
+
if (continuity === undefined ||
|
|
101
|
+
contractDigest !== outcome.productContractDigest ||
|
|
102
|
+
contractOutcome === undefined ||
|
|
103
|
+
impact?.outcomeId !== outcome.outcomeId ||
|
|
104
|
+
contractAcceptance.length === 0 ||
|
|
105
|
+
!sameMembers(planAcceptance, contractAcceptance) ||
|
|
106
|
+
!sameMembers(contractAcceptance, impact.acceptanceIds)) {
|
|
107
|
+
throw new MillError("OUTCOME_TASK_AUTHORITY_MISMATCH", "The ready outcome, product contract, and referenced task impact do not identify the same approved work.", ExitCode.configuration, {
|
|
108
|
+
readyOutcomeId: outcome.outcomeId,
|
|
109
|
+
impactOutcomeId: impact?.outcomeId ?? null,
|
|
110
|
+
planProductContractDigest: outcome.productContractDigest,
|
|
111
|
+
taskProductContractDigest: contractDigest,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async function activeOutcomeRun(root, taskId) {
|
|
116
|
+
const active = (await runInventory({ root })).filter((run) => !isTerminalRun(run.status));
|
|
117
|
+
if (active.length === 0)
|
|
118
|
+
return {};
|
|
119
|
+
if (active.length !== 1 || active[0]?.taskId !== taskId) {
|
|
120
|
+
throw new MillError("ACTIVE_OUTCOME_CONFLICT", "Exactly zero or one nonterminal run for the selected task may exist.", ExitCode.configuration, {
|
|
121
|
+
activeRuns: active.map((run) => ({
|
|
122
|
+
runId: run.id,
|
|
123
|
+
taskId: run.taskId,
|
|
124
|
+
status: run.status,
|
|
125
|
+
})),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return runStatus({ root, runId: active[0].id });
|
|
129
|
+
}
|
|
130
|
+
export async function startNextReadyOutcome(input) {
|
|
131
|
+
const outcome = await nextReadyOutcome(input.root);
|
|
132
|
+
const inputs = await loadRuntimeInputs(input.root, outcome.taskPath);
|
|
133
|
+
assertOutcomeAuthority(outcome, inputs);
|
|
134
|
+
const active = (await runInventory({ root: input.root })).filter((run) => !isTerminalRun(run.status));
|
|
135
|
+
if (active.length > 0) {
|
|
136
|
+
throw new MillError("ACTIVE_OUTCOME_CONFLICT", "run next cannot create a second nonterminal lifecycle.", ExitCode.configuration, { activeRunIds: active.map((run) => run.id) });
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
outcome,
|
|
140
|
+
result: await startLocalRun({
|
|
141
|
+
root: input.root,
|
|
142
|
+
taskPath: outcome.taskPath,
|
|
143
|
+
approvalDigest: input.approvalDigest,
|
|
144
|
+
}),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function requiresBuildPreflight(run) {
|
|
148
|
+
return (run === undefined ||
|
|
149
|
+
run.status === "running" ||
|
|
150
|
+
run.status === "verified" ||
|
|
151
|
+
(run.status === "blocked" &&
|
|
152
|
+
[
|
|
153
|
+
"REVIEW_FINDINGS",
|
|
154
|
+
"REMOTE_REVIEW_FINDINGS",
|
|
155
|
+
"INTERRUPTED_RUN",
|
|
156
|
+
"CODEX_CANCELLED",
|
|
157
|
+
"CODEX_DEADLINE_EXCEEDED",
|
|
158
|
+
"CODEX_OUTPUT_BUDGET_EXCEEDED",
|
|
159
|
+
"CODEX_EXECUTION_FAILED",
|
|
160
|
+
].includes(run.blockCode ?? "")));
|
|
161
|
+
}
|
|
162
|
+
function requiresDependencyPreparation(run) {
|
|
163
|
+
return (run === undefined ||
|
|
164
|
+
run.status === "running" ||
|
|
165
|
+
run.status === "committed" ||
|
|
166
|
+
(run.status === "blocked" &&
|
|
167
|
+
[
|
|
168
|
+
"REVIEW_FINDINGS",
|
|
169
|
+
"REMOTE_REVIEW_FINDINGS",
|
|
170
|
+
"INTERRUPTED_RUN",
|
|
171
|
+
"CODEX_CANCELLED",
|
|
172
|
+
"CODEX_DEADLINE_EXCEEDED",
|
|
173
|
+
"CODEX_OUTPUT_BUDGET_EXCEEDED",
|
|
174
|
+
"CODEX_EXECUTION_FAILED",
|
|
175
|
+
].includes(run.blockCode ?? "")));
|
|
176
|
+
}
|
|
177
|
+
async function authorizeExistingBuildSpend(root, outcome, run) {
|
|
178
|
+
const inputs = await loadRuntimeInputs(root, outcome.taskPath);
|
|
179
|
+
assertOutcomeAuthority(outcome, inputs);
|
|
180
|
+
if (run.taskDigest !== inputs.taskDigest ||
|
|
181
|
+
run.configDigest !== inputs.configDigest) {
|
|
182
|
+
throw new MillError("RUN_POLICY_DRIFT", "Task or repository configuration changed after approval.", ExitCode.configuration);
|
|
183
|
+
}
|
|
184
|
+
const deadline = Date.parse(run.deadlineAt);
|
|
185
|
+
if (!Number.isSafeInteger(deadline) || deadline <= Date.now()) {
|
|
186
|
+
throw new MillError("RUN_DEADLINE_EXCEEDED", "The approved run deadline has elapsed; a fresh qualification and run are required.", ExitCode.temporary, { deadlineAt: run.deadlineAt });
|
|
187
|
+
}
|
|
188
|
+
const qualification = await qualifyRepositoryForBuild(root, inputs.task.baseRef, inputs.config.sensitivePaths);
|
|
189
|
+
if (qualification.baseCommit !== run.baseCommit) {
|
|
190
|
+
throw new MillError("BASE_REF_DRIFT", "The approved base reference moved after the run started.", ExitCode.configuration);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
export async function startFounderDelivery(input) {
|
|
194
|
+
if (!input.attended) {
|
|
195
|
+
throw new MillError("ATTENDANCE_REQUIRED", "The founder coordinator requires attended model, dependency, and optional forge authority.", ExitCode.configuration);
|
|
196
|
+
}
|
|
197
|
+
const outcome = await nextReadyOutcome(input.root);
|
|
198
|
+
const outcomeInputs = await loadRuntimeInputs(input.root, outcome.taskPath, "readback");
|
|
199
|
+
await assertApprovedPrd(input.root, input.prdPath, outcomeInputs);
|
|
200
|
+
assertOutcomeAuthority(outcome, outcomeInputs);
|
|
201
|
+
let status = await activeOutcomeRun(input.root, outcomeInputs.task.id);
|
|
202
|
+
const preflightMode = requiresBuildPreflight(status.run)
|
|
203
|
+
? "build"
|
|
204
|
+
: status.run?.status === "reviewed" && input.draftPr
|
|
205
|
+
? "propose"
|
|
206
|
+
: "inspect";
|
|
207
|
+
const preflight = await doctor(input.root, preflightMode);
|
|
208
|
+
if (!doctorReady(preflight)) {
|
|
209
|
+
throw new MillError("START_PREFLIGHT_BLOCKED", "Founder preflight failed before the next required tool or external effect.", ExitCode.unavailable, { preflight });
|
|
210
|
+
}
|
|
211
|
+
if (status.run === undefined && requiresDependencyPreparation(status.run)) {
|
|
212
|
+
const authorizingInputs = await loadRuntimeInputs(input.root, outcome.taskPath);
|
|
213
|
+
assertOutcomeAuthority(outcome, authorizingInputs);
|
|
214
|
+
await qualifyRepositoryForBuild(input.root, authorizingInputs.task.baseRef, authorizingInputs.config.sensitivePaths);
|
|
215
|
+
}
|
|
216
|
+
else if (status.run !== undefined &&
|
|
217
|
+
requiresDependencyPreparation(status.run)) {
|
|
218
|
+
await authorizeExistingBuildSpend(input.root, outcome, status.run);
|
|
219
|
+
}
|
|
220
|
+
const dependencyPreparation = requiresDependencyPreparation(status.run)
|
|
221
|
+
? await prepareRepositoryDependencies(input.root, input.attended)
|
|
222
|
+
: undefined;
|
|
223
|
+
if (status.run === undefined) {
|
|
224
|
+
const qualification = await qualifyBaseline({
|
|
225
|
+
root: input.root,
|
|
226
|
+
taskPath: outcome.taskPath,
|
|
227
|
+
});
|
|
228
|
+
if (!qualification.evidence.passed ||
|
|
229
|
+
qualification.approvalDigest === null) {
|
|
230
|
+
return {
|
|
231
|
+
outcome,
|
|
232
|
+
stage: "baseline_blocked",
|
|
233
|
+
nextAction: "Resolve the reported native baseline failure and rerun the same start command.",
|
|
234
|
+
...(dependencyPreparation === undefined
|
|
235
|
+
? {}
|
|
236
|
+
: { dependencyPreparation }),
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const started = await startLocalRun({
|
|
240
|
+
root: input.root,
|
|
241
|
+
taskPath: outcome.taskPath,
|
|
242
|
+
approvalDigest: qualification.approvalDigest,
|
|
243
|
+
});
|
|
244
|
+
status = { run: started.run };
|
|
245
|
+
}
|
|
246
|
+
for (let step = 0; step < 8; step += 1) {
|
|
247
|
+
const run = status.run;
|
|
248
|
+
if (run === undefined)
|
|
249
|
+
break;
|
|
250
|
+
if (run.status === "committed") {
|
|
251
|
+
status = {
|
|
252
|
+
run: (await verifyRun({
|
|
253
|
+
root: input.root,
|
|
254
|
+
taskPath: outcome.taskPath,
|
|
255
|
+
runId: run.id,
|
|
256
|
+
})).run,
|
|
257
|
+
};
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (run.status === "verified") {
|
|
261
|
+
status = {
|
|
262
|
+
run: (await reviewRun({
|
|
263
|
+
root: input.root,
|
|
264
|
+
taskPath: outcome.taskPath,
|
|
265
|
+
runId: run.id,
|
|
266
|
+
})).run,
|
|
267
|
+
};
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
if (run.status === "reviewed") {
|
|
271
|
+
if (!input.draftPr) {
|
|
272
|
+
return {
|
|
273
|
+
outcome,
|
|
274
|
+
stage: "reviewed",
|
|
275
|
+
run,
|
|
276
|
+
nextAction: `Run millctl ship --draft --task ${outcome.taskPath} --run ${run.id} to approve remote delivery.`,
|
|
277
|
+
...(dependencyPreparation === undefined
|
|
278
|
+
? {}
|
|
279
|
+
: { dependencyPreparation }),
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
const planned = await planDraftPr({
|
|
283
|
+
root: input.root,
|
|
284
|
+
taskPath: outcome.taskPath,
|
|
285
|
+
runId: run.id,
|
|
286
|
+
});
|
|
287
|
+
return {
|
|
288
|
+
outcome,
|
|
289
|
+
stage: "delivery_planned",
|
|
290
|
+
run: planned.run,
|
|
291
|
+
deliveryProposalDigest: planned.delivery.proposalDigest,
|
|
292
|
+
nextAction: `Inspect the exact delivery plan, then run millctl ship --draft --task ${outcome.taskPath} --run ${run.id} --approve ${planned.delivery.proposalDigest} --attended.`,
|
|
293
|
+
...(dependencyPreparation === undefined
|
|
294
|
+
? {}
|
|
295
|
+
: { dependencyPreparation }),
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
if (run.status === "proposing") {
|
|
299
|
+
return {
|
|
300
|
+
outcome,
|
|
301
|
+
stage: "delivery_planned",
|
|
302
|
+
run,
|
|
303
|
+
nextAction: `Run millctl ship --draft --task ${outcome.taskPath} --run ${run.id} to inspect a fresh exact delivery plan before attended approval.`,
|
|
304
|
+
...(dependencyPreparation === undefined
|
|
305
|
+
? {}
|
|
306
|
+
: { dependencyPreparation }),
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
if (run.status === "effect_unknown") {
|
|
310
|
+
status = {
|
|
311
|
+
run: (await reconcileDraftPr({
|
|
312
|
+
root: input.root,
|
|
313
|
+
taskPath: outcome.taskPath,
|
|
314
|
+
runId: run.id,
|
|
315
|
+
})).run,
|
|
316
|
+
};
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
if (run.status === "blocked" &&
|
|
320
|
+
run.blockCode === "REMOTE_REVIEW_FINDINGS") {
|
|
321
|
+
status = {
|
|
322
|
+
run: await resumeRun({
|
|
323
|
+
root: input.root,
|
|
324
|
+
taskPath: outcome.taskPath,
|
|
325
|
+
runId: run.id,
|
|
326
|
+
}),
|
|
327
|
+
};
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
if (run.status === "awaiting_ci" ||
|
|
331
|
+
(run.status === "blocked" && run.blockCode === "REMOTE_CHECKS_FAILED")) {
|
|
332
|
+
const observed = await observeDraftPr({
|
|
333
|
+
root: input.root,
|
|
334
|
+
taskPath: outcome.taskPath,
|
|
335
|
+
runId: run.id,
|
|
336
|
+
});
|
|
337
|
+
return {
|
|
338
|
+
outcome,
|
|
339
|
+
stage: observed.run.status,
|
|
340
|
+
run: observed.run,
|
|
341
|
+
...(observed.delivery.pullRequest?.url === undefined
|
|
342
|
+
? {}
|
|
343
|
+
: { pullRequestUrl: observed.delivery.pullRequest.url }),
|
|
344
|
+
nextAction: observed.run.status === "awaiting_human"
|
|
345
|
+
? "The configured human marks the draft ready and merges it, then reruns start."
|
|
346
|
+
: "Resolve the exact-head check or review blocker, then rerun start.",
|
|
347
|
+
...(dependencyPreparation === undefined
|
|
348
|
+
? {}
|
|
349
|
+
: { dependencyPreparation }),
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
if (run.status === "awaiting_human" ||
|
|
353
|
+
run.status === "merged" ||
|
|
354
|
+
run.status === "post_merge_verified") {
|
|
355
|
+
let finalized;
|
|
356
|
+
try {
|
|
357
|
+
finalized = await finalizeDraftPr({
|
|
358
|
+
root: input.root,
|
|
359
|
+
taskPath: outcome.taskPath,
|
|
360
|
+
runId: run.id,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
const failure = asMillError(error);
|
|
365
|
+
if (failure.code !== "HUMAN_MERGE_PENDING")
|
|
366
|
+
throw error;
|
|
367
|
+
return {
|
|
368
|
+
outcome,
|
|
369
|
+
stage: run.status,
|
|
370
|
+
run,
|
|
371
|
+
nextAction: "The configured human marks the draft ready and merges it, then reruns start.",
|
|
372
|
+
...(dependencyPreparation === undefined
|
|
373
|
+
? {}
|
|
374
|
+
: { dependencyPreparation }),
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
return {
|
|
378
|
+
outcome,
|
|
379
|
+
stage: finalized.run.status,
|
|
380
|
+
run: finalized.run,
|
|
381
|
+
...(finalized.delivery.pullRequest?.url === undefined
|
|
382
|
+
? {}
|
|
383
|
+
: { pullRequestUrl: finalized.delivery.pullRequest.url }),
|
|
384
|
+
nextAction: finalized.run.status === "closed"
|
|
385
|
+
? "Promote the next approved outcome in product/plan.yaml through an ordinary reviewed change."
|
|
386
|
+
: "Wait for exact resulting-main checks, then rerun start.",
|
|
387
|
+
...(dependencyPreparation === undefined
|
|
388
|
+
? {}
|
|
389
|
+
: { dependencyPreparation }),
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
if (run.status === "running" ||
|
|
393
|
+
(run.status === "blocked" &&
|
|
394
|
+
[
|
|
395
|
+
"REVIEW_FINDINGS",
|
|
396
|
+
"REVIEW_NON_CONVERGENCE",
|
|
397
|
+
"INTERRUPTED_RUN",
|
|
398
|
+
"CODEX_CANCELLED",
|
|
399
|
+
"CODEX_DEADLINE_EXCEEDED",
|
|
400
|
+
"CODEX_OUTPUT_BUDGET_EXCEEDED",
|
|
401
|
+
"CODEX_EXECUTION_FAILED",
|
|
402
|
+
].includes(run.blockCode ?? ""))) {
|
|
403
|
+
status = {
|
|
404
|
+
run: await resumeRun({
|
|
405
|
+
root: input.root,
|
|
406
|
+
taskPath: outcome.taskPath,
|
|
407
|
+
runId: run.id,
|
|
408
|
+
}),
|
|
409
|
+
};
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
return {
|
|
413
|
+
outcome,
|
|
414
|
+
stage: run.status,
|
|
415
|
+
run,
|
|
416
|
+
nextAction: "Inspect the typed blocker and use the matching expert recovery command.",
|
|
417
|
+
...(dependencyPreparation === undefined ? {} : { dependencyPreparation }),
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
throw new MillError("START_ADVANCE_BUDGET_EXHAUSTED", "The coordinator reached its bounded transition budget.", ExitCode.temporary);
|
|
421
|
+
}
|
|
422
|
+
//# sourceMappingURL=founder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"founder.js","sourceRoot":"","sources":["../../src/workflows/founder.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAkB,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cA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AAiB;oBACjB,iBAAiB;oBACjB,yBAAyB;oBACzB,8BAA8B;oBAC9B,wBAAwB;iBACzB,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,EAClC,CAAC;YACD,MAAM,GAAG;gBACP,GAAG,EAAE,MAAM,SAAS,CAAC;oBACnB,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,KAAK,EAAE,GAAG,CAAC,EAAE;iBACd,CAAC;aACH,CAAC;YACF,SAAS;QACX,CAAC;QACD,OAAO;YACL,OAAO;YACP,KAAK,EAAE,GAAG,CAAC,MAAM;YACjB,GAAG;YACH,UAAU,EACR,yEAAyE;YAC3E,GAAG,CAAC,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC;SAC1E,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,SAAS,CACjB,gCAAgC,EAChC,wDAAwD,EACxD,QAAQ,CAAC,SAAS,CACnB,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@davidahmann/mill",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "A local-first, repo-native software factory from approved product intent to reviewed draft PRs.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "David Ahmann",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"millctl": "dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/",
|
|
13
|
+
"recipes/",
|
|
14
|
+
"schemas/",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./schemas/*.json": "./schemas/*.json"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=24.20.0 <25"
|
|
27
|
+
},
|
|
28
|
+
"packageManager": "npm@11.19.0",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public",
|
|
31
|
+
"provenance": true
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -p tsconfig.build.json",
|
|
35
|
+
"clean": "node scripts/clean.mjs",
|
|
36
|
+
"check:workflows": "node scripts/check-workflows.mjs",
|
|
37
|
+
"schemas:generate": "npm run build && node scripts/generate-schemas.mjs",
|
|
38
|
+
"schemas:check": "npm run build && node scripts/generate-schemas.mjs --check",
|
|
39
|
+
"format": "prettier --write .",
|
|
40
|
+
"format:check": "prettier --check .",
|
|
41
|
+
"lint": "eslint . --max-warnings 0",
|
|
42
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"test:coverage": "vitest run --coverage",
|
|
45
|
+
"test:package": "npm run clean && npm run build && node scripts/test-package.mjs",
|
|
46
|
+
"check": "npm run format:check && npm run lint && npm run typecheck && npm run check:workflows && npm run schemas:check && npm run test:coverage && npm run test:package",
|
|
47
|
+
"prepack": "npm run clean && npm run build"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"commander": "15.0.0",
|
|
51
|
+
"yaml": "2.9.0",
|
|
52
|
+
"zod": "4.5.4"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@eslint/js": "10.0.1",
|
|
56
|
+
"@types/node": "24.13.3",
|
|
57
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
58
|
+
"ajv": "8.20.0",
|
|
59
|
+
"eslint": "10.9.1",
|
|
60
|
+
"prettier": "3.9.6",
|
|
61
|
+
"typescript": "6.0.3",
|
|
62
|
+
"typescript-eslint": "8.68.0",
|
|
63
|
+
"vitest": "4.1.11"
|
|
64
|
+
},
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "git+https://github.com/davidahmann/mill.git"
|
|
68
|
+
},
|
|
69
|
+
"bugs": {
|
|
70
|
+
"url": "https://github.com/davidahmann/mill/issues"
|
|
71
|
+
},
|
|
72
|
+
"homepage": "https://github.com/davidahmann/mill#readme",
|
|
73
|
+
"keywords": [
|
|
74
|
+
"codex",
|
|
75
|
+
"software-factory",
|
|
76
|
+
"developer-tools",
|
|
77
|
+
"cli"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
validate:
|
|
17
|
+
runs-on: ubuntu-24.04
|
|
18
|
+
timeout-minutes: 15
|
|
19
|
+
container:
|
|
20
|
+
image: mcr.microsoft.com/playwright:v1.62.1-noble@sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
26
|
+
with:
|
|
27
|
+
node-version: 24.18.1
|
|
28
|
+
cache: npm
|
|
29
|
+
- name: Install without lifecycle scripts
|
|
30
|
+
run: npm ci --ignore-scripts
|
|
31
|
+
- name: Full native gate
|
|
32
|
+
env:
|
|
33
|
+
NEXT_TELEMETRY_DISABLED: "1"
|
|
34
|
+
run: npm run check
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24.18.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodejs 24.18.1
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Repository agent operating contract
|
|
2
|
+
|
|
3
|
+
This generated repository owns its product truth and remains operable without
|
|
4
|
+
Mill. A coding agent must read, in order:
|
|
5
|
+
|
|
6
|
+
1. this file;
|
|
7
|
+
2. `README.md`;
|
|
8
|
+
3. `product/PRD.md` and `product/contract.yaml`;
|
|
9
|
+
4. `quality/scenarios.yaml`;
|
|
10
|
+
5. `architecture/blueprint.yaml`;
|
|
11
|
+
6. `WORKFLOW.md`;
|
|
12
|
+
7. the active version 2 task and its approved impact manifest.
|
|
13
|
+
|
|
14
|
+
The approved product contract and stable invariants outrank the task. The task
|
|
15
|
+
and impact approval define what may change. Native command results and exact Git
|
|
16
|
+
identities decide promotion. Model output is only a proposal.
|
|
17
|
+
|
|
18
|
+
Change only paths granted by the active task. Do not edit the task, impact,
|
|
19
|
+
product, scenario, instruction, or command-control files and then use those
|
|
20
|
+
changes to certify the same candidate. Do not read or write `.env*`, `.npmrc`,
|
|
21
|
+
credentials, local Mill state, raw model logs, or unrelated host files.
|
|
22
|
+
|
|
23
|
+
Run the complete native gate before proposing delivery:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npm ci --ignore-scripts
|
|
27
|
+
npm run check
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The gate includes format, lint, type, unit, integration, Accessibility and
|
|
31
|
+
browser behavior, build, and package checks. Required skipped evidence blocks.
|
|
32
|
+
Keep these commands authoritative even when Mill is absent.
|
|
33
|
+
|
|
34
|
+
Mill's builder may edit only the disposable worktree. It cannot push, merge,
|
|
35
|
+
deploy, broaden scope, approve escalation, or rewrite acceptance oracles. The
|
|
36
|
+
reviewer is read-only. Only the attended shipper may use the operator's GitHub
|
|
37
|
+
identity, and it may open only the exact verified candidate as a draft PR.
|
|
38
|
+
|
|
39
|
+
If execution is interrupted, inspect `millctl status` and use the documented
|
|
40
|
+
`resume`, `cancel`, or `pr reconcile` path. Never blindly replay a possibly
|
|
41
|
+
started worker or GitHub effect. Stop on drift, ambiguous authority, unknown
|
|
42
|
+
external effects, failing native checks, unsupported stack changes, or missing
|
|
43
|
+
credentials/provider disclosure. A human marks the PR ready, merges, and owns
|
|
44
|
+
deployment.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# MILL_PRODUCT_TITLE_MARKDOWN_TOKEN
|
|
2
|
+
|
|
3
|
+
This repository is independently operable with ordinary npm commands.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm ci --ignore-scripts
|
|
7
|
+
npm run check
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Mill coordinates approved product work but is not the build system. See
|
|
11
|
+
`product/contract.yaml`, `architecture/blueprint.yaml`, and
|
|
12
|
+
`quality/scenarios.yaml` for approved product truth.
|
|
13
|
+
|
|
14
|
+
The exact repository runtime is Node.js 24.18.1 with npm 11.16.0. Generated
|
|
15
|
+
build and browser artifacts stay under `.next` and `.mill-output`; neither path
|
|
16
|
+
is product source or delivery evidence.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Delivery workflow
|
|
2
|
+
|
|
3
|
+
Every product change binds approved product, scenario, architecture, impact,
|
|
4
|
+
task, and exact-base identities. A candidate is committed before the complete
|
|
5
|
+
native gate and independent review. Only the attended shipper may open a draft
|
|
6
|
+
pull request, and a configured human remains the merge authority.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
import "./styles.css";
|
|
5
|
+
|
|
6
|
+
export const metadata: Metadata = {
|
|
7
|
+
title: __MILL_PRODUCT_TITLE_LITERAL__,
|
|
8
|
+
description: "A Mill-managed product foundation.",
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default function RootLayout({
|
|
12
|
+
children,
|
|
13
|
+
}: Readonly<{ children: ReactNode }>) {
|
|
14
|
+
return (
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<body>{children}</body>
|
|
17
|
+
</html>
|
|
18
|
+
);
|
|
19
|
+
}
|