Uh oh!
There was an error while loading. Please reload this page.
docs(getting-started): map every authorable defineStack collection to its directory and guide - #10357
Merged
Merged
Conversation
… its directory and guide The project-layout tree showed seven directories — exactly the `os g <type>` generator defaults — for a stack that declares 32 authorable collections. A developer holding a report, a job, an email template or a permission set had no way to answer "where does this go" from the page that exists to teach project navigation. Two additions, both derived rather than recalled: - The layout tree now carries the union of what `examples/app-todo` and `examples/app-crm` lay out flat plus the `os g` defaults, and a second tree shows the group-by-domain variant `examples/app-showcase` actually ships. The two trees disagree about paths and agree about keys, which is the point the section already made about there being no filename-suffix magic. - A routing table: every authorable `defineStack()` key, one clause for what it declares, and the page to read next. Keys with no hand-written guide link their generated reference under /docs/references/ and nothing else. The key list is enumerated from ObjectStackDefinitionSchema's runtime shape (44 keys), not transcribed. The 12 excluded keys are named in the page with their reason. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GawRwpD44VwBDVy3hs77AX
os-elon
marked this pull request as ready for review
August 20, 2026 16:52
Uh oh!
There was an error while loading. Please reload this page.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#10218
getting-started/quick-start.mdx→ "Reading a project's layout" showed sevendirectories. Those seven turn out to be a precise set, just not the one the page
claims: they are exactly the
defaultDirvalues inpackages/cli/src/commands/generate.ts— theos ggenerator defaults(
objects,views,actions,flows,agents,dashboards,apps). Thepage presented the generator's seven as the layout of "any ObjectStack project"
while
defineStack()declares 32 authorable collections.What the schema actually declares
Enumerated from the runtime shape, not transcribed:
44 declared keys, 32 authorable collections, 12 excluded. The page names all 12
exclusions and why.
One correction to the card's candidate exclusion list
The card asked for each classification to be verified rather than copied. Ten of
its twelve hold.
surface/history/guidanceare not stack keys at all —they are the first argument to the
strictObject(meta, shape)helper(
packages/spec/src/shared/strict-object.ts), which carries the surface name,the history sentence and the retired-key guidance map used to build the
unknown-key error. They never appear in
Object.keys(shape), so classifying themas "config or code wiring" would have described them as a thing an author could
write. The remaining nine on the card's list (
manifest,server,api,plugins,tiers,devPlugins,requires,onEnable, plusviewItemsandruntimeModule) are real keys and are excluded as stated.Three exclusions the card did not name are added, one of them load-bearing:
functionsobjectstack buildlowers each to a handler ref. Same class asonEnable.i18nTranslationConfigSchema— a single config object. The authored content istranslations, which is in the table.manifestviewItemsverified asz.never()atstack.zod.ts:322;runtimeModule's own.describe()reads "Set byobjectstack build; do not author by hand."The layout tree
Derived from
examples/, as the card asked, and the derivation found twoconventions shipping side by side:
examples/app-todoandexamples/app-crmlay out one directory per collection(
src/objects/,src/views/,src/flows/,src/security/, …).examples/app-showcasegroups by domain:src/data/,src/ui/,src/automation/,src/security/,src/system/,src/docs/.Both trees are now on the page. The flat one is the union of what todo and crm
actually ship plus the
os gdefaults — no directory in it was invented; thegrouped one is
app-showcase's real subdirectory list. That the two disagreeabout paths and agree exactly about keys is the point the section already made
about there being no filename-suffix magic, so the cross-link into the table is
written as that consequence rather than as a "see also".
Two observations from the derivation, recorded because they are the kind of thing
that reads as an error later:
src/agents/, and none writesagents:orskills:inits
objectstack.config.ts.src/agents/stays in the tree becausegenerate.ts:130writes there andcontent/docs/deployment/cli.mdx:1046documents it. The
agentsrow carries the ADR-0063 clause — platform-internal,third parties extend through
skills.src/data/means two different things. Seed records in todo/crm; the wholedata domain (objects, extensions, hooks, mappings, analytics, seed) in showcase.
Both trees show it in its own context rather than picking a winner.
The map
One table, 32 rows,
defineStack()key → one clause → guide. Ordereddata → interface → automation → integration → access → AI.
Twenty-one rows reach a hand-written guide. Eleven have none and link only the
generated reference under
/docs/references/…, per the card's rule:objectExtensions,mappings,analyticsCubes,reports,themes,books,jobs,emailTemplates,apis,capabilities,tools. Every one of those wasresolved by locating the schema symbol in the generated
corpus (e.g.
CapabilityDeclarationSchema→references/security/misc.mdx,CubeSchema→references/data/analytics.mdx), not guessed from the key name.A line under the table says what a Reference link means, so the honest gap is
visible instead of looking like an arbitrary link choice.
No path in the diff was invented: all 39 internal
/docs/…links on the pagewere resolved against files present on
mainbefore commit, andcheck:doc-anchorsre-verifies the one intra-page fragment.Three near-misses worth naming, since each would have shipped a plausible-looking
wrong link:
content/docs/api/plugin-endpoints.mdxis about plugin-contributedroutes, not the
apis:collection;permissions/permission-metadata.mdx'sreports:is a permission-set grant key, not the stack collection; andai/actions-as-tools.mdxteaches actions becoming tools, not thetools:record.All three route to the generated reference instead.
Gates
node scripts/pm/dispatch-gates.mjswith no path args — the script derives thechange set itself (1 path, three-dot against merge base
d7283250d). It named 11families. All 11 green at
a992871c3, the final commit:check:cross-package-test-inputs·check:doc-anchors·check:docs-audit-scope·check:docs-redirects·check:published-readme-links·check:role-word·node scripts/check-cross-package-test-inputs.mjs·spec check:empty-state·spec check:liveness·spec check:strictness-ledger·spec check:variant-docsAlso green, named at dispatch but not by the re-derivation:
check:doc-authoring(380 files clean) andspec check:skill-examples(209 prose examples type-check).
check:docs-audit-scopestayed green with no.claude/workflows/docs-accuracy-audit.jsregeneration, which is the outcome the card asked to have confirmed either way.
That is consistent with the gate's own definition — its scope is
content/docs/**/*.mdxminusreferences/, so it reacts to a page being added orremoved, and this diff edits one existing page and adds none. Its verdict line is
unchanged at
180 hand-written doc(s). So this PR's path surface is clean and itis not human-merge-only.
check:role-worddeserves one note:quick-start.mdxsits inscripts/role-word-baseline.jsonat exactly 1, and that ratchet fails in bothdirections. The additions carry zero new occurrences and the pre-existing one on
line 39 is untouched, so the count is still 1 and the baseline needs no edit.
No changeset:
content/docs/only, no published package changes —skip-changeset.content/docs/getting-started/quick-reference.mdxis untouched, per the card. Its(N of M schemas)counts andcheck:quick-reference-countsare unaffected. Iagree with the card's placement call: the map is a navigation aid for someone
reading a project, which is what
quick-start.mdxis for, and it carries nocounted table.
Generated by Claude Code