Skip to content

Commit 4edb6c5

Browse files
dmealingclaude
andcommitted
fix(cli): meta init switched off two docs surfaces for every scaffolded project
`resolveDocsConfig` defaults `surfaces` to all four — model, api, requirements, agent — and its comment states the reason for the last one: "Turning it on by default is what makes the always-on agent-context pointer able to name the files: a pointer to a page an adopter has to opt into is a pointer at nothing." `meta init` then scaffolded `surfaces: ["model", "api"]`, switching `requirements` and `agent` OFF for every project it creates — defeating precisely that, on the exact projects the pointer is scaffolded into. The scaffold now says nothing about `surfaces` and takes the default, which is also what lets a project pick up a new surface without editing config. Safe for the same reason the default is: both surfaces emit ZERO files for a project with nothing for them to describe, so a scaffolded project sees no new output until it has something to document. The comment left in its place also names the distinction the estate loop found people reaching for `surfaces` to express: it says what your docs ARE, not which of them you COMMIT — a page you do not commit is exempt from `verify --docs` once it is git-ignored. The existing test asserted `surfaces:` was present, incidentally, while proving a different point (docs intent goes in the `docs:` block, not the generators array). That assertion is now the ABSENCE, with the reason attached, since the correct scaffold says nothing there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3v6M6uqECZ2Sb5eUv6YY
1 parent 177751c commit 4edb6c5

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

server/typescript/packages/cli/src/commands/init.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,15 @@ export default defineConfig({
138138
barrel(),
139139
],
140140
docs: {
141-
outDir: "./docs", // model + api surfaces both land here (run: meta docs)
141+
outDir: "./docs", // every surface lands here (run: meta docs)
142142
layout: "flat", // or "package" for multi-package models
143-
surfaces: ["model", "api"],
143+
// surfaces defaults to ["model", "api", "requirements", "agent"] — all four.
144+
// Deliberately NOT narrowed here: the requirements and agent surfaces emit ZERO
145+
// files for a project that has nothing for them to describe, and the always-on
146+
// agent context points at the agent/ pages by name. Scaffolding a narrower list
147+
// turned that pointer into a pointer at nothing. Narrow it yourself if you want
148+
// fewer docs — but note it says what your docs ARE, not which of them you commit
149+
// (a page you do not commit is exempt from verify --docs once it is git-ignored).
144150
},
145151
});
146152
`;

server/typescript/packages/cli/test/unit/init-scaffold-config.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ describe("meta init scaffolds metaobjects.config.ts", () => {
3535
// `docs:` config block consumed by `meta docs`, not via a deprecated generator.
3636
expect(body).not.toContain("apiDocsFile");
3737
expect(body).toContain("docs:");
38-
expect(body).toContain("surfaces:");
38+
// ...and does NOT narrow `surfaces`. The resolver defaults to all four, and its
39+
// own rationale is that `agent` must default ON "so the always-on agent-context
40+
// pointer can name the files: a pointer to a page an adopter has to opt into is a
41+
// pointer at nothing." The scaffold used to write ["model", "api"], switching off
42+
// `requirements` and `agent` for every scaffolded project and defeating exactly
43+
// that. Asserted as an ABSENCE because the correct scaffold says nothing here.
44+
expect(body).not.toMatch(/^\s*surfaces:\s*\[/m);
3945
expect(nextStepsBlock(true)).toContain("meta docs");
4046
});
4147

0 commit comments

Comments
 (0)