@astryxdesign/cli 0.7.3-canary.31e06f4 → 0.7.3-canary.641d08e

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 (122) hide show
  1. package/README.md +68 -68
  2. package/api/component/doc-links.test.mjs +2 -2
  3. package/api/docs/_adapter.d.mts +2 -2
  4. package/api/docs/_adapter.mjs +61 -18
  5. package/api/docs/docs-homes.test.mjs +127 -0
  6. package/api/docs/docs.doc.mjs +3 -3
  7. package/api/docs/docs.test.mjs +28 -18
  8. package/api/docs/integration-tree.test.mjs +20 -20
  9. package/api/docs/integrationDocs.test.mjs +1 -1
  10. package/api/docs/namespace-section.test.mjs +6 -6
  11. package/api/docs/reference-blocks.test.mjs +2 -2
  12. package/api/doctor/doctor.mjs +16 -12
  13. package/api/doctor/doctor.test.mjs +9 -9
  14. package/api/integration/_adapter.d.mts +8 -0
  15. package/api/integration/_adapter.mjs +21 -1
  16. package/api/integration/authoring-checks.test.mjs +220 -0
  17. package/api/integration/validate-integration.mjs +24 -0
  18. package/api/integration/validate-integration.type.d.mts +2 -1
  19. package/api/integration/validate-integration.type.mjs +2 -1
  20. package/api/integration/validateIntegration.doc.mjs +1 -1
  21. package/api/search/_candidate-score.mjs +1 -1
  22. package/api/search/_entries.mjs +57 -1
  23. package/api/search/_gather-docs.mjs +3 -3
  24. package/api/search/search.doc.mjs +1 -1
  25. package/api/search/search.test.mjs +14 -14
  26. package/assets/docs/author-a-theme.doc.mjs +2 -2
  27. package/assets/docs/tree/add-a-component.doc.mjs +1 -1
  28. package/assets/docs/tree/add-a-theme.doc.mjs +1 -1
  29. package/assets/docs/tree/add-a-topic.doc.mjs +2 -2
  30. package/assets/docs/tree/agent-guidance.doc.mjs +1 -1
  31. package/assets/docs/tree/{integrations.doc.mjs → authoring.doc.mjs} +15 -6
  32. package/assets/docs/tree/block-template.doc.mjs +1 -1
  33. package/assets/docs/tree/build-the-template.doc.mjs +1 -1
  34. package/assets/docs/tree/building-blocks.doc.mjs +2 -2
  35. package/assets/docs/tree/check-the-props.doc.mjs +1 -1
  36. package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
  37. package/assets/docs/tree/checks.doc.mjs +2 -2
  38. package/assets/docs/tree/cli-command.doc.mjs +1 -1
  39. package/assets/docs/tree/cli.doc.mjs +1 -1
  40. package/assets/docs/tree/codemods.doc.mjs +1 -1
  41. package/assets/docs/tree/component-family.doc.mjs +1 -1
  42. package/assets/docs/tree/component-imports.doc.mjs +1 -1
  43. package/assets/docs/tree/components.doc.mjs +1 -1
  44. package/assets/docs/tree/configuration.doc.mjs +1 -1
  45. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
  46. package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
  47. package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
  48. package/assets/docs/tree/docs.doc.mjs +1 -1
  49. package/assets/docs/tree/document-the-template.doc.mjs +1 -1
  50. package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
  51. package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
  52. package/assets/docs/tree/extend-or-replace.doc.mjs +1 -1
  53. package/assets/docs/{authoring.doc.mjs → tree/field-reference.doc.mjs} +4 -3
  54. package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
  55. package/assets/docs/tree/generate-a-palette.doc.mjs +1 -1
  56. package/assets/docs/tree/global-integrations.doc.mjs +2 -2
  57. package/assets/docs/tree/grade-template-with-agent.doc.mjs +4 -4
  58. package/assets/docs/tree/help.doc.mjs +2 -2
  59. package/assets/docs/tree/links.doc.mjs +1 -1
  60. package/assets/docs/tree/package-and-test.doc.mjs +1 -1
  61. package/assets/docs/tree/page-template.doc.mjs +1 -1
  62. package/assets/docs/tree/publishing.doc.mjs +1 -1
  63. package/assets/docs/tree/quick-start.doc.mjs +1 -1
  64. package/assets/docs/tree/replace-a-core-component.doc.mjs +1 -1
  65. package/assets/docs/tree/replace-a-core-template.doc.mjs +1 -1
  66. package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
  67. package/assets/docs/tree/see-it-in-an-app.doc.mjs +1 -1
  68. package/assets/docs/tree/ship.doc.mjs +2 -2
  69. package/assets/docs/tree/short-and-findable.doc.mjs +1 -1
  70. package/assets/docs/tree/single-component.doc.mjs +1 -1
  71. package/assets/docs/tree/start-a-template.doc.mjs +1 -1
  72. package/assets/docs/tree/subcomponent.doc.mjs +1 -1
  73. package/assets/docs/tree/template-assets.doc.mjs +1 -1
  74. package/assets/docs/tree/template-doc-overview.doc.mjs +2 -2
  75. package/assets/docs/tree/template-fonts.doc.mjs +1 -1
  76. package/assets/docs/tree/template-grading-rubric.doc.mjs +1 -1
  77. package/assets/docs/tree/template-icons.doc.mjs +1 -1
  78. package/assets/docs/tree/template-images-media.doc.mjs +1 -1
  79. package/assets/docs/tree/template-styles.doc.mjs +1 -1
  80. package/assets/docs/tree/templates.doc.mjs +1 -1
  81. package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
  82. package/assets/docs/tree/test-template-in-app.doc.mjs +1 -1
  83. package/assets/docs/tree/themes.doc.mjs +1 -1
  84. package/assets/docs/tree/troubleshooting.doc.mjs +1 -1
  85. package/assets/docs/tree/upgrading.doc.mjs +1 -1
  86. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +1 -1
  87. package/assets/docs/tree/verify-packed-template.doc.mjs +1 -1
  88. package/assets/docs/tree/versioning.doc.mjs +1 -1
  89. package/assets/docs/tree/write-good-templates.doc.mjs +1 -1
  90. package/assets/docs/tree/write-the-template-file.doc.mjs +1 -1
  91. package/authoring/doctypes/schema/schema.doc.mjs +1 -1
  92. package/authoring/integration/integration.doc.mjs +1 -1
  93. package/authoring/integration/type.ts +1 -1
  94. package/clients/cli/commands/docs.doc.mjs +2 -2
  95. package/clients/cli/commands/docs.mjs +1 -1
  96. package/clients/cli/commands/docs.test.mjs +14 -14
  97. package/clients/cli/commands/integration-check.test.mjs +48 -0
  98. package/clients/cli/commands/integration.doc.mjs +1 -1
  99. package/foundation/agent-docs/agent-docs.mjs +2 -1
  100. package/foundation/agent-docs/agent-docs.test.mjs +5 -4
  101. package/foundation/discovery/authoring-self-docs.d.mts +7 -0
  102. package/foundation/discovery/authoring-self-docs.mjs +16 -4
  103. package/foundation/discovery/authoring-self-docs.test.mjs +15 -3
  104. package/foundation/discovery/authoring-surface.d.mts +1 -1
  105. package/foundation/discovery/authoring-surface.mjs +2 -2
  106. package/foundation/discovery/authoring-surface.test.mjs +1 -1
  107. package/foundation/discovery/cli-self-docs.d.mts +2 -1
  108. package/foundation/discovery/cli-self-docs.mjs +4 -3
  109. package/foundation/discovery/cli-self-docs.test.mjs +2 -2
  110. package/foundation/discovery/runner-allowlist.d.mts +2 -4
  111. package/foundation/discovery/runner-allowlist.mjs +2 -4
  112. package/foundation/discovery/runner-commands.d.mts +77 -0
  113. package/foundation/discovery/runner-commands.mjs +293 -0
  114. package/foundation/discovery/runner-commands.test.mjs +128 -0
  115. package/foundation/discovery/stray-pointers.test.mjs +1 -1
  116. package/foundation/doc-compiler/doc-loads.test.mjs +4 -0
  117. package/foundation/doc-compiler/split-topic-keywords.test.mjs +3 -2
  118. package/foundation/doc-compiler/tree.d.mts +32 -6
  119. package/foundation/doc-compiler/tree.mjs +77 -43
  120. package/foundation/doc-compiler/tree.test.mjs +7 -7
  121. package/foundation/response/response-types.doc.mjs +1 -1
  122. package/package.json +9 -9
@@ -58,7 +58,7 @@ export const doc = {
58
58
  {
59
59
  type: 'search',
60
60
  description:
61
- 'The query echoed back, `matchCount` (how many candidates matched in total, before `limit`), plus a ranked SearchResultEntry[] bounded by `limit`: each has domain, name, score, reason, description, and follow-up command, plus `import` for components and hooks, `title` for docs, `displayName` and `kind` for templates, and `displayName` for themes. A doc result is the smallest part that answers: one section (with `section`, and a command that reads only it), one docs-tree route, or a topic, whose command lists its sections. `parent` is the command that opens the level above it: the section list of its topic, the namespace a tree node sits in, the Unorganized level for a flat topic, or the topic list for a top-level namespace. Every doc result also carries `package`, the npm package that authored it (for a section, the package its file came from). A theme result is one theme you can import: `name` is its slug, its command is `astryx theme add <slug>` (outside a project, where there is no app to add it to, `astryx theme eject <slug>`), and `package` is the npm package that ships it (`@astryxdesign/cli` for the CLI\'s own themes). When a search with no `type` could not obtain @astryxdesign/core, `meta.partial` is `{skipped, reason}`: the domains it skipped (`component`, `hook`, `template`) and why; the results are the docs and themes, and text mode prints one line on standard error.',
61
+ 'The query echoed back, `matchCount` (how many candidates matched in total, before `limit`), plus a ranked SearchResultEntry[] bounded by `limit`: each has domain, name, score, reason, description, and follow-up command, plus `import` for components and hooks, `title` for docs, `displayName` and `kind` for templates, and `displayName` for themes. A doc result is the smallest part that answers: one section (with `section`, and a command that reads only it), one docs-tree route, or a topic, whose command lists its sections. `parent` is the command that opens the level above it: the section list of its topic, the namespace a tree node sits in, the topic level (Guides or Foundations) for a flat topic, or the topic list for a top-level namespace. Every doc result also carries `package`, the npm package that authored it (for a section, the package its file came from). A theme result is one theme you can import: `name` is its slug, its command is `astryx theme add <slug>` (outside a project, where there is no app to add it to, `astryx theme eject <slug>`), and `package` is the npm package that ships it (`@astryxdesign/cli` for the CLI\'s own themes). When a search with no `type` could not obtain @astryxdesign/core, `meta.partial` is `{skipped, reason}`: the domains it skipped (`component`, `hook`, `template`) and why; the results are the docs and themes, and text mode prints one line on standard error.',
62
62
  },
63
63
  ],
64
64
  throws: [
@@ -117,16 +117,16 @@ describe('search leaf — docs at the grain a reader reads them', () => {
117
117
  .find(result => result.section === 'which-codemods-run');
118
118
  expect(hit).toMatchObject({
119
119
  domain: 'doc',
120
- name: expect.stringMatching(/^cli\/integrations\/(?:.+\/)?codemods$/),
120
+ name: expect.stringMatching(/^authoring\/(?:.+\/)?codemods$/),
121
121
  title: expect.stringMatching(/ › Codemods › Choose when a codemod runs$/),
122
122
  });
123
123
  expect(hit.parent).toBe(`astryx docs ${hit.name} --index`);
124
124
  expect(hit.command).toBe(`astryx docs ${hit.name} which-codemods-run`);
125
125
  const block = await search('token-ref', {cwd});
126
126
  expect(block.data.results[0]).toMatchObject({
127
- name: 'authoring',
127
+ name: 'authoring/field-reference',
128
128
  section: 'reference-doc',
129
- command: 'astryx docs authoring reference-doc',
129
+ command: 'astryx docs authoring/field-reference reference-doc',
130
130
  });
131
131
  const fn = await search('assertResponse', {cwd, type: 'doc'});
132
132
  expect(fn.data.results[0]).toMatchObject({
@@ -148,13 +148,13 @@ describe('search leaf — docs at the grain a reader reads them', () => {
148
148
  // keywords and the title the guides declare. A namespace's own
149
149
  // keywords count, and a plural name is the name.
150
150
  for (const [query, route] of [
151
- ['make an integration', /^cli\/integrations$/],
152
- ['build an integration', /^cli\/integrations$/],
153
- ['create an integration', /^cli\/integrations$/],
154
- ['integration', /^cli\/integrations$/],
155
- ['publish an integration', /^cli\/integrations$/],
151
+ ['make an integration', /^authoring$/],
152
+ ['build an integration', /^authoring$/],
153
+ ['create an integration', /^authoring$/],
154
+ ['integration', /^authoring$/],
155
+ ['publish an integration', /^authoring$/],
156
156
  // The troubleshooting guide, wherever the tree places it.
157
- ['troubleshoot integration', /^cli\/integrations\/(?:.+\/)?troubleshooting$/],
157
+ ['troubleshoot integration', /^authoring\/(?:.+\/)?troubleshooting$/],
158
158
  ]) {
159
159
  const r = await search(query, {cwd, type: 'doc'});
160
160
  const names = r.data.results.slice(0, 3).map(result => result.name);
@@ -167,7 +167,7 @@ describe('search leaf — docs at the grain a reader reads them', () => {
167
167
  it(
168
168
  'gives a top-level namespace hit the topic list as its parent',
169
169
  async () => {
170
- for (const [query, route] of [['unorganized', 'unorganized'], ['Astryx CLI', 'cli']]) {
170
+ for (const [query, route] of [['foundations', 'foundations'], ['Astryx CLI', 'cli']]) {
171
171
  const r = await search(query, {cwd, type: 'doc'});
172
172
  expect(r.data.results).toContainEqual(
173
173
  expect.objectContaining({
@@ -185,7 +185,7 @@ describe('search leaf — docs at the grain a reader reads them', () => {
185
185
  'points a topic hit at its index, never a whole-topic read',
186
186
  async () => {
187
187
  // A guide the tree places, read from the tree rather than named.
188
- const {data: integrations} = await docs('cli/integrations');
188
+ const {data: integrations} = await docs('authoring');
189
189
  const guide = integrations.slots
190
190
  .flatMap(slot => slot.children)
191
191
  .find(child => child.kind === 'generic').route;
@@ -440,9 +440,9 @@ describe('search leaf — a candidate that matches every word outranks a partial
440
440
  const tokens = await search('tokens', {cwd});
441
441
  expect(tokens.data.results[0]).toMatchObject({domain: 'doc', name: 'tokens'});
442
442
  for (const [query, route] of [
443
- ['codemods', /^cli\/integrations\/(?:.+\/)?codemods$/],
444
- ['quick start', /^cli\/integrations\/(?:.+\/)?quick-start$/],
445
- ['test in an app', /^cli\/integrations\/(?:.+\/)?test-in-an-app$/],
443
+ ['codemods', /^authoring\/(?:.+\/)?codemods$/],
444
+ ['quick start', /^authoring\/(?:.+\/)?quick-start$/],
445
+ ['test in an app', /^authoring\/(?:.+\/)?test-in-an-app$/],
446
446
  ]) {
447
447
  const r = await search(query, {cwd, type: 'doc'});
448
448
  // The guide is among the hits that share the top score: two guides
@@ -28,7 +28,7 @@ export const docs = {
28
28
  {type: 'code', lang: 'json', label: 'Minimal palette config (palette.config.json)', code: '{"families": [{"id": "ocean", "seed": "#0074e2"}]}'},
29
29
  {type: 'code', lang: 'bash', label: 'Generate and preview', code: '# Print the palette without writing files\nastryx theme palette generate palette.config.json\n\n# Write palette + receipt, and open a visual preview\nastryx theme palette generate palette.config.json \\\n --out src/themes/ocean/tokens/ocean.palette.ts \\\n --preview preview.html'},
30
30
  {type: 'prose', text: "The command writes a `.ts` file exporting 21 shades (stops 0–100) for both light and dark, plus a `.receipt.json` to regenerate later. Point your theme's tokens at the palette, then run defineTheme (see below)."},
31
- {type: 'prose', text: 'For the full palette config fields and CLI flags, run `astryx docs cli/commands/theme-palette-generate`. For the integration-authoring walkthrough of connecting a palette to theme tokens, run `astryx docs cli/integrations/building-blocks/themes/generate-a-palette`.'},
31
+ {type: 'prose', text: 'For the full palette config fields and CLI flags, run `astryx docs cli/commands/theme-palette-generate`. For the integration-authoring walkthrough of connecting a palette to theme tokens, run `astryx docs authoring/building-blocks/themes/generate-a-palette`.'},
32
32
  ],
33
33
  },
34
34
  {
@@ -61,7 +61,7 @@ export const docs = {
61
61
  ['adaptations', 'Width-breakpoint overrides merge by fixed name. Inherited ordered rules keep their relative order; child rules append and re-resolve against the child root axes.'],
62
62
  ]},
63
63
  {type: 'prose', text: "Inheritance is resolved when the theme is defined, so an extended theme is flat: `astryx theme build` emits one self-contained stylesheet holding everything the child inherited, and the base theme's CSS does not need to be loaded next to it. A base that is not a theme (most often an import that missed) throws when `defineTheme` runs, rather than producing a theme that silently inherits nothing."},
64
- {type: 'prose', text: 'For the integration-specific guidance on mapping a palette to tokens when extending, see `astryx docs cli/integrations/building-blocks/themes/define-the-theme`.'},
64
+ {type: 'prose', text: 'For the integration-specific guidance on mapping a palette to tokens when extending, see `astryx docs authoring/building-blocks/themes/define-the-theme`.'},
65
65
  ],
66
66
  },
67
67
  {
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/components/add-a-component`: choose a
4
+ * @file `astryx docs authoring/building-blocks/components/add-a-component`: choose a
5
5
  * component name and generate its first source and doc files.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/themes/add-a-theme`:
4
+ * @file `astryx docs authoring/building-blocks/themes/add-a-theme`:
5
5
  * scaffold a theme in a package — blank, or forked from an existing theme.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/docs/add-a-topic`: add a
4
+ * @file `astryx docs authoring/building-blocks/docs/add-a-topic`: add a
5
5
  * doc topic to an integration package, write its sections, and pick the doc
6
6
  * kind for each thing the package ships.
7
7
  */
@@ -79,7 +79,7 @@ export const docs = {
79
79
  content: [
80
80
  {
81
81
  type: 'prose',
82
- text: 'Start every CLI command in a doc with the word astryx alone, with no runner such as npx or pnpm exec in front. The CLI prefixes each one when it prints the doc, with the command the reader runs: `pnpm exec astryx` or `yarn astryx` from their package manager, or the `cliCommand` an integration sets. See {@link generic:cli-command}.',
82
+ text: 'Start every CLI command in a doc with the word astryx alone, with no runner such as npx or pnpm exec in front. The CLI prefixes each one when it prints the doc, with the command the reader runs: `pnpm exec astryx` or `yarn astryx` from their package manager, or the `cliCommand` an integration sets. See {@link generic:cli-command}. `doctor integration validate` (and so `integration check`) lists each command written with a runner as a `runner_command` note, with its file, line and the bare command to write. A note fails nothing. An install step, which runs before the CLI is installed, is the one exception: write the scoped package name, `@astryxdesign/cli`, after the download runner. The unscoped name after a download runner is always listed, because it fetches an unrelated package.',
83
83
  },
84
84
  {
85
85
  type: 'code',
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/configuration/agent-guidance`: add short lines of
4
+ * @file `astryx docs authoring/building-blocks/configuration/agent-guidance`: add short lines of
5
5
  * guidance that apps put in front of their AI agents, within the limits.
6
6
  */
7
7
 
@@ -1,27 +1,36 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @file astryx docs cli/integrations — build an integration package. */
3
+ /**
4
+ * @file `astryx docs authoring`: everything for integration authors. The
5
+ * guides build, ship, and fix an integration package; the field reference
6
+ * covers every file it holds.
7
+ */
4
8
 
5
9
  /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
6
10
  export const docs = {
7
11
  type: 'namespace',
8
- name: 'integrations',
9
- placement: {parent: 'namespace:cli', slot: 'guides', order: 10},
10
- title: 'Build an integration',
12
+ name: 'authoring',
13
+ title: 'Authoring',
11
14
  summary:
12
- 'Build an npm package that adds components, templates, themes, docs, and codemods to Astryx apps.',
15
+ 'Build an npm package that adds components, templates, themes, docs, and codemods to Astryx apps, and look up every field of every file it holds.',
13
16
  keywords: [
17
+ 'authoring',
14
18
  'integration',
15
19
  'integration package',
16
20
  'make an integration',
17
21
  'publish an integration',
18
22
  'integration authoring',
23
+ 'authoring reference',
19
24
  ],
20
25
  slots: {
21
26
  guides: {
22
27
  title: 'Build an integration',
23
28
  accepts: {kinds: ['generic', 'namespace']},
24
29
  },
30
+ reference: {
31
+ title: 'Reference',
32
+ accepts: {kinds: ['generic']},
33
+ },
25
34
  },
26
35
  blocks: [
27
36
  {
@@ -42,7 +51,7 @@ export const docs = {
42
51
  },
43
52
  {
44
53
  type: 'prose',
45
- text: 'Every field of every file you write for an integration is in {@link generic:authoring}.',
54
+ text: 'Every field of every file you write for an integration is in {@link generic:field-reference}.',
46
55
  },
47
56
  {
48
57
  type: 'prose',
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/document-the-template/block-template`:
4
+ * @file `astryx docs authoring/building-blocks/templates/document-the-template/block-template`:
5
5
  * the block-only fields: component relationships and the preview shape.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template`:
4
+ * @file `astryx docs authoring/building-blocks/templates/build-the-template`:
5
5
  * author portable template source and every asset that source needs.
6
6
  */
7
7
 
@@ -1,12 +1,12 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @file astryx docs cli/integrations/building-blocks — the kinds you can add. */
3
+ /** @file astryx docs authoring/building-blocks — the kinds you can add. */
4
4
 
5
5
  /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
6
6
  export const docs = {
7
7
  type: 'namespace',
8
8
  name: 'building-blocks',
9
- placement: {parent: 'namespace:integrations', slot: 'guides', order: 20},
9
+ placement: {parent: 'namespace:authoring', slot: 'guides', order: 20},
10
10
  title: 'Building Blocks',
11
11
  summary:
12
12
  'Add components, templates, themes, docs, and codemods, and configure how it behaves.',
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/components/describe-the-component/check-the-props`:
4
+ * @file `astryx docs authoring/building-blocks/components/describe-the-component/check-the-props`:
5
5
  * compare each component doc's props table with the component's TypeScript
6
6
  * props, read each finding, and fix the doc or the code.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/docs/check-your-docs`:
4
+ * @file `astryx docs authoring/building-blocks/docs/check-your-docs`:
5
5
  * what each check proves about an integration's docs: the docs check, each
6
6
  * doc's fields, the read size, and the CLI peer.
7
7
  */
@@ -133,7 +133,7 @@ fix: Remove \`summary\`: SingleComponentDoc has no field \`summary\`.`,
133
133
  "The folder decides the type: `ComponentDoc` in your components root, `IntegrationTemplateDoc` in your templates root, `ThemeDoc` in your themes root, and in your docs root the type the doc's `type` names. Keep the `@type` comment above each doc's export too, so your editor shows the same problems as you type.",
134
134
  'Every finding is a warning, so the exit code stays 0. With `--json`, they are in `data.docTypes.findings`.',
135
135
  'It uses the `typescript` your package installs. Where `typescript` is missing or has no JavaScript compiler API, as TypeScript 7 does, it uses `@typescript/typescript6`, the TypeScript 6 API package, if your package installs it. Without either, it prints `[skip] Docs not type-checked` and the reason.',
136
- 'Every field of every doc type is in {@link generic:authoring}.',
136
+ 'Every field of every doc type is in {@link generic:field-reference}.',
137
137
  ],
138
138
  },
139
139
  ],
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/ship/checks`: what each package check
4
+ * @file `astryx docs authoring/ship/checks`: what each package check
5
5
  * proves, what fails and what only warns, and one command to run them all.
6
6
  */
7
7
 
@@ -30,7 +30,7 @@ export const docs = {
30
30
  rows: [
31
31
  [
32
32
  '`astryx doctor integration validate`',
33
- 'The manifest loads, each root holds contributions the CLI can read, and each doc matches its authoring type',
33
+ 'The manifest loads, each root holds contributions the CLI can read, and each doc matches its authoring type. Notes, which fail nothing, list a malformed `cliCommand` and each command a topic writes with a package runner (`runner_command`)',
34
34
  'A declared root is missing (`missing_root`), a contribution does not load (`invalid_doc`, `invalid_component`, `invalid_theme`), or two templates in the package replace one Core id (`ambiguous_template_replacement`)',
35
35
  "The manifest has a key this CLI does not know (`unknown_manifest_key`), or a doc field does not match the doc's authoring type: a field the type does not have, a missing required field, or a value outside the field's type. It also warns on what no reader can serve: a prop listed twice (`duplicate_prop`), a `propDescriptions` key that names no documented prop (`unknown_translated_prop`), a section with no content (`empty_section`), two sections of a topic with one key (`duplicate_section_key`), or a `.doc.zh.mjs` or `.doc.dense.mjs` overlay beside no topic file (`orphan_doc_overlay`). It checks docs with your installed `typescript`, or, where that is missing or has no JavaScript compiler API (TypeScript 7), with an installed `@typescript/typescript6`; without either, it prints `[skip] Docs not type-checked`. With no `astryx.integration.mjs` it prints a hint and exits 0",
36
36
  ],
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/configuration/cli-command`:
4
+ * @file `astryx docs authoring/building-blocks/configuration/cli-command`:
5
5
  * name the command an integration's users run the CLI with, so every command
6
6
  * the CLI prints in their apps starts with it.
7
7
  */
@@ -14,7 +14,7 @@ export const docs = {
14
14
  name: 'cli',
15
15
  title: 'Astryx CLI',
16
16
  summary:
17
- 'Commands, programmatic APIs, integration authoring, and output contracts.',
17
+ 'Commands, programmatic APIs, and output contracts. Building an integration is under {@link namespace:authoring}.',
18
18
  keywords: ['cli', 'commands', 'api', 'reference'],
19
19
  slots: {
20
20
  guides: {title: 'Guides', accepts: {kinds: ['generic', 'namespace']}},
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/codemods`: add codemods to an
4
+ * @file `astryx docs authoring/building-blocks/codemods`: add codemods to an
5
5
  * integration package, and know which of them `astryx upgrade` runs in an app.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/components/describe-the-component/component-family`:
4
+ * @file `astryx docs authoring/building-blocks/components/describe-the-component/component-family`:
5
5
  * author one ComponentDoc for several public exports in a component family.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/components/component-imports`: make an
4
+ * @file `astryx docs authoring/building-blocks/components/component-imports`: make an
5
5
  * integration component's documented import resolve from the packed package.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/components`: guides for adding and
4
+ * @file `astryx docs authoring/building-blocks/components`: guides for adding and
5
5
  * documenting components in an integration package.
6
6
  */
7
7
 
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @file astryx docs cli/integrations/building-blocks/configuration — set how your integration behaves. */
3
+ /** @file astryx docs authoring/building-blocks/configuration — set how your integration behaves. */
4
4
 
5
5
  /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
6
6
  export const docs = {
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/configuration/debug-and-gap-reports`: receive a record
4
+ * @file `astryx docs authoring/building-blocks/configuration/debug-and-gap-reports`: receive a record
5
5
  * of each CLI run with `debug`, and handle `astryx gap-report` with
6
6
  * `gapReport`, both named exports of the integration manifest.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/themes/define-the-theme`:
4
+ * @file `astryx docs authoring/building-blocks/themes/define-the-theme`:
5
5
  * map the palette to tokens, keep light-dark() to colors, and avoid Core internals.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/components/describe-the-component`:
4
+ * @file `astryx docs authoring/building-blocks/components/describe-the-component`:
5
5
  * choose and maintain the ComponentDoc shape that matches a component's public
6
6
  * source.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/docs`: the guides to
4
+ * @file `astryx docs authoring/building-blocks/docs`: the guides to
5
5
  * writing docs for an integration package, which join the same docs tree as
6
6
  * the CLI's own (spec:AST-046, spec:AST-047).
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/document-the-template`:
4
+ * @file `astryx docs authoring/building-blocks/templates/document-the-template`:
5
5
  * document page and block templates for discovery and correct reuse.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/themes/document-the-theme`:
4
+ * @file `astryx docs authoring/building-blocks/themes/document-the-theme`:
5
5
  * document a theme by extending the core theme topic, not in agent guidance.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/package-and-test/export-template-assets`:
4
+ * @file `astryx docs authoring/building-blocks/templates/build-the-template/package-and-test/export-template-assets`:
5
5
  * expose and include everything a copied template imports, and declare the
6
6
  * packages it needs.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/docs/extend-or-replace`:
4
+ * @file `astryx docs authoring/building-blocks/docs/extend-or-replace`:
5
5
  * take over an existing topic with `replaces`, merge sections into one with
6
6
  * `extends`, and check overlaps with Core topics.
7
7
  */
@@ -1,14 +1,15 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs authoring`: every authoring schema, one section each.
4
+ * @file `astryx docs authoring/field-reference`: every authoring schema, one
5
+ * section each. `astryx docs authoring <name>` reads one of them.
5
6
  *
6
7
  * Built from the self-docs colocated under packages/cli/authoring, so it cannot
7
8
  * drift from the schemas it describes. `astryx doctor` names a self-doc this
8
- * topic cannot reach.
9
+ * guide cannot reach.
9
10
  */
10
11
 
11
- import {buildAuthoringTopic} from '../../foundation/discovery/authoring-self-docs.mjs';
12
+ import {buildAuthoringTopic} from '../../../foundation/discovery/authoring-self-docs.mjs';
12
13
 
13
14
  /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
14
15
  export const docs = await buildAuthoringTopic();
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/themes/fonts-and-assets`:
4
+ * @file `astryx docs authoring/building-blocks/themes/fonts-and-assets`:
5
5
  * ship a theme's optional font loader beside its built module and CSS.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/themes/generate-a-palette`:
4
+ * @file `astryx docs authoring/building-blocks/themes/generate-a-palette`:
5
5
  * turn a few seed colors into a full light and dark color palette.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/global-integrations`: make an
4
+ * @file `astryx docs authoring/global-integrations`: make an
5
5
  * integration work when people install it next to their global Astryx
6
6
  * install; a checklist and the commands to try it (spec AST-081 FR12).
7
7
  */
@@ -11,7 +11,7 @@ export const docs = {
11
11
  type: 'generic',
12
12
  name: 'global-integrations',
13
13
  placement: {
14
- parent: 'namespace:integrations',
14
+ parent: 'namespace:authoring',
15
15
  slot: 'guides',
16
16
  order: 25,
17
17
  },
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/write-good-templates/grade-template-with-agent`:
4
+ * @file `astryx docs authoring/building-blocks/templates/write-good-templates/grade-template-with-agent`:
5
5
  * give an agent the canonical rubric and require a reproducible template grade.
6
6
  */
7
7
 
@@ -36,11 +36,11 @@ export const docs = {
36
36
  code: `Grade integration template <id> from <package> at <revision>.
37
37
 
38
38
  Before scoring:
39
- 1. Read \`astryx docs cli/integrations/building-blocks/templates/write-good-templates --full\`.
40
- 2. Read \`astryx docs cli/integrations/building-blocks/templates/write-good-templates/template-grading-rubric --full\` and every guide it links.
39
+ 1. Read \`astryx docs authoring/building-blocks/templates/write-good-templates --full\`.
40
+ 2. Read \`astryx docs authoring/building-blocks/templates/write-good-templates/template-grading-rubric --full\` and every guide it links.
41
41
  3. Inspect the template source, its matching .doc.mjs file, package.json exports and files, and astryx.integration.mjs.
42
42
  4. Run \`astryx integration verify\` in the package.
43
- 5. Follow \`astryx docs cli/integrations/building-blocks/templates/build-the-template/package-and-test/test-template-in-app --full\`: install the packed package in the clean app, copy the template, build the app, and render the behavior matrix.
43
+ 5. Follow \`astryx docs authoring/building-blocks/templates/build-the-template/package-and-test/test-template-in-app --full\`: install the packed package in the clean app, copy the template, build the app, and render the behavior matrix.
44
44
 
45
45
  Score all seven rubric categories. Cite file and line evidence for every deduction. Do not award points for a state you did not inspect. If browser or build evidence is unavailable, say so and mark the template not publishable.
46
46
 
@@ -1,12 +1,12 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @file astryx docs cli/integrations/help — find a CLI message and its fix. */
3
+ /** @file astryx docs authoring/help — find a CLI message and its fix. */
4
4
 
5
5
  /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
6
6
  export const docs = {
7
7
  type: 'namespace',
8
8
  name: 'help',
9
- placement: {parent: 'namespace:integrations', slot: 'guides', order: 40},
9
+ placement: {parent: 'namespace:authoring', slot: 'guides', order: 40},
10
10
  title: 'Help',
11
11
  summary: 'Find a CLI message and how to fix it.',
12
12
  keywords: ['help', 'troubleshooting', 'error'],
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/docs/links`: link one doc
4
+ * @file `astryx docs authoring/building-blocks/docs/links`: link one doc
5
5
  * to another by identity, link the CLI's docs, and fix a link that names no
6
6
  * doc.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/package-and-test`:
4
+ * @file `astryx docs authoring/building-blocks/templates/build-the-template/package-and-test`:
5
5
  * expose a template from its package and prove the copied result in an app.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/document-the-template/page-template`:
4
+ * @file `astryx docs authoring/building-blocks/templates/document-the-template/page-template`:
5
5
  * the page-only fields that help people find a page.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/ship/publishing`: publish an integration to
4
+ * @file `astryx docs authoring/ship/publishing`: publish an integration to
5
5
  * npm, use release tags, and check the package before and after.
6
6
  */
7
7
 
@@ -5,7 +5,7 @@ export const docs = {
5
5
  type: 'generic',
6
6
  name: 'quick-start',
7
7
  placement: {
8
- parent: 'namespace:integrations',
8
+ parent: 'namespace:authoring',
9
9
  slot: 'guides',
10
10
  order: 10,
11
11
  },
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/components/replace-a-core-component`:
4
+ * @file `astryx docs authoring/building-blocks/components/replace-a-core-component`:
5
5
  * intentionally make an integration component the default for a Core identity.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/document-the-template/replace-a-core-template`:
4
+ * @file `astryx docs authoring/building-blocks/templates/document-the-template/replace-a-core-template`:
5
5
  * deliberately replace one Core template through template metadata.
6
6
  */
7
7