@astryxdesign/cli 0.7.2 → 0.7.3-canary.02f5fe4
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/README.md +104 -71
- package/api/build/_adapter.d.mts +58 -0
- package/api/build/_adapter.mjs +127 -3
- package/api/build/blocks/blocks.d.mts +92 -0
- package/api/build/blocks/blocks.mjs +528 -0
- package/api/build/blocks/blocks.test.mjs +238 -0
- package/api/build/blocks/blocks.weights.json +1 -0
- package/api/build/build.mjs +25 -6
- package/api/build/build.type.mjs +1 -1
- package/api/build/kit/answer.d.mts +18 -0
- package/api/build/kit/answer.mjs +195 -0
- package/api/build/kit/answer.test.mjs +108 -0
- package/api/build/kit/kind.d.mts +25 -0
- package/api/build/kit/kind.mjs +170 -0
- package/api/build/kit/kit.d.mts +2 -4
- package/api/build/kit/kit.mjs +8 -398
- package/api/build/kit/rank.d.mts +3 -32
- package/api/build/kit/rank.mjs +25 -342
- package/api/build/kit/rank.test.mjs +2 -1
- package/api/build/kit/signals.d.mts +79 -0
- package/api/build/kit/signals.mjs +295 -0
- package/api/build/kit/start.d.mts +32 -0
- package/api/build/kit/start.mjs +163 -0
- package/api/build/kit/words.d.mts +72 -0
- package/api/build/kit/words.mjs +202 -0
- package/api/build/tree.d.mts +20 -0
- package/api/build/tree.mjs +53 -0
- package/api/build/tree.test.mjs +185 -0
- package/api/build/tree.weights.json +1 -0
- package/api/component/_adapter.mjs +39 -5
- package/api/component/component-replacement.test.mjs +1 -0
- package/api/component/component.mjs +17 -3
- package/api/component/component.test.mjs +15 -0
- package/api/component/doc-links.test.mjs +2 -2
- package/api/discover/_adapter.d.mts +1 -2
- package/api/discover/_adapter.mjs +42 -17
- package/api/discover/_adapter.test.mjs +42 -0
- package/api/discover/discover.mjs +0 -1
- package/api/docs/_adapter.d.mts +2 -2
- package/api/docs/_adapter.mjs +82 -23
- package/api/docs/docs-homes.test.mjs +127 -0
- package/api/docs/docs.doc.mjs +3 -3
- package/api/docs/docs.test.mjs +35 -19
- package/api/docs/integration-tree.test.mjs +20 -20
- package/api/docs/integrationDocs.test.mjs +1 -1
- package/api/docs/namespace-section.test.mjs +6 -6
- package/api/docs/reference-blocks.test.mjs +2 -2
- package/api/doctor/_adapter.d.mts +33 -13
- package/api/doctor/_adapter.mjs +55 -25
- package/api/doctor/doctor.d.mts +23 -5
- package/api/doctor/doctor.mjs +183 -40
- package/api/doctor/doctor.test.mjs +95 -12
- package/api/hook/hook.mjs +1 -1
- package/api/init/init.doc.mjs +20 -6
- package/api/init/init.test.mjs +18 -2
- package/api/init/init.type.d.mts +3 -3
- package/api/init/init.type.mjs +3 -3
- package/api/init/remove/remove.mjs +17 -4
- package/api/init/remove/remove.test.mjs +114 -2
- package/api/init/run/run.mjs +69 -6
- package/api/integration/_adapter.d.mts +8 -0
- package/api/integration/_adapter.mjs +21 -1
- package/api/integration/authoring-checks.mjs +83 -9
- package/api/integration/authoring-checks.test.mjs +220 -0
- package/api/integration/pack-check.mjs +123 -4
- package/api/integration/pack-check.test.mjs +87 -0
- package/api/integration/validate-integration-case-disk.test.mjs +111 -0
- package/api/integration/validate-integration-fixes.test.mjs +6 -5
- package/api/integration/validate-integration-gaps.test.mjs +1975 -0
- package/api/integration/validate-integration.d.mts +15 -2
- package/api/integration/validate-integration.mjs +298 -39
- package/api/integration/validate-integration.type.d.mts +90 -1
- package/api/integration/validate-integration.type.mjs +67 -2
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/search/ORDERING.md +28 -0
- package/api/search/_adapter.d.mts +82 -2
- package/api/search/_adapter.mjs +157 -10
- package/api/search/_adapter.test.mjs +173 -0
- package/api/search/_candidate-score.d.mts +40 -0
- package/api/search/_candidate-score.mjs +238 -0
- package/api/search/_cards.json +6098 -0
- package/api/search/_compound.d.mts +50 -0
- package/api/search/_compound.mjs +170 -0
- package/api/search/_doc-searcher.d.mts +4 -0
- package/api/search/_doc-searcher.mjs +23 -0
- package/api/search/_doc-searcher.test.mjs +36 -0
- package/api/search/_doc-searcher.weights.json +1 -0
- package/api/search/_doc-text.d.mts +30 -0
- package/api/search/_doc-text.mjs +87 -0
- package/api/search/_entries.d.mts +63 -0
- package/api/search/_entries.mjs +232 -0
- package/api/search/_entries.test.mjs +48 -0
- package/api/search/_features.d.mts +35 -0
- package/api/search/_features.mjs +155 -0
- package/api/search/_gather-components.d.mts +26 -0
- package/api/search/_gather-components.mjs +284 -0
- package/api/search/_gather-docs.d.mts +20 -0
- package/api/search/_gather-docs.mjs +254 -0
- package/api/search/_gather-hooks.d.mts +12 -0
- package/api/search/_gather-hooks.mjs +52 -0
- package/api/search/_gather-templates.d.mts +25 -0
- package/api/search/_gather-templates.mjs +107 -0
- package/api/search/_lexical.d.mts +135 -0
- package/api/search/_lexical.mjs +351 -0
- package/api/search/_main-searcher.d.mts +19 -0
- package/api/search/_main-searcher.mjs +115 -0
- package/api/search/_main-searcher.test.mjs +106 -0
- package/api/search/_main-searcher.weights.json +1 -0
- package/api/search/_module-doc.d.mts +32 -0
- package/api/search/_module-doc.mjs +78 -0
- package/api/search/_order.d.mts +32 -0
- package/api/search/_order.mjs +162 -0
- package/api/search/_order.test.mjs +72 -0
- package/api/search/_priority.d.mts +50 -0
- package/api/search/_priority.mjs +139 -0
- package/api/search/_query-words.d.mts +25 -0
- package/api/search/_query-words.mjs +92 -0
- package/api/search/_query.d.mts +65 -0
- package/api/search/_query.mjs +176 -0
- package/api/search/_result.d.mts +97 -0
- package/api/search/_result.mjs +150 -0
- package/api/search/_score.d.mts +60 -0
- package/api/search/_score.mjs +283 -0
- package/api/search/_synonyms.d.mts +21 -0
- package/api/search/_synonyms.mjs +67 -0
- package/api/search/_template-searcher.d.mts +4 -0
- package/api/search/_template-searcher.mjs +23 -0
- package/api/search/_template-searcher.test.mjs +40 -0
- package/api/search/_template-searcher.weights.json +1 -0
- package/api/search/_titles.d.mts +33 -0
- package/api/search/_titles.mjs +65 -0
- package/api/search/_words.d.mts +64 -0
- package/api/search/_words.mjs +157 -0
- package/api/search/search.d.mts +22 -305
- package/api/search/search.doc.mjs +8 -6
- package/api/search/search.mjs +56 -2482
- package/api/search/search.test.mjs +14 -14
- package/api/search/search.type.d.mts +6 -1
- package/api/search/search.type.mjs +6 -1
- package/api/search/tree.d.mts +15 -0
- package/api/search/tree.mjs +40 -0
- package/api/search/tree.test.mjs +66 -0
- package/api/search/tree.weights.json +1 -0
- package/api/template/template.mjs +5 -1
- package/api/theme/build/build.packed-old-core.test.mjs +1 -0
- package/api/upgrade/_adapter.d.mts +57 -9
- package/api/upgrade/_adapter.mjs +198 -28
- package/api/upgrade/registry/registry.d.mts +10 -4
- package/api/upgrade/registry/registry.mjs +33 -16
- package/api/upgrade/registry/registry.test.mjs +85 -0
- package/api/upgrade/run/run.d.mts +4 -2
- package/api/upgrade/run/run.mjs +13 -2
- package/api/upgrade/run/run.test.mjs +417 -3
- package/api/upgrade/upgrade.doc.mjs +10 -5
- package/api/upgrade/upgrade.mjs +13 -2
- package/api/upgrade/upgrade.test.mjs +194 -0
- package/api/upgrade/upgrade.type.d.mts +5 -3
- package/api/upgrade/upgrade.type.mjs +8 -6
- package/assets/codemods/transforms/v0.7.0/__tests__/validate-data-token-ownership.test.mjs +11 -0
- package/assets/codemods/transforms/v0.7.0/validate-data-token-ownership.mjs +3 -3
- package/assets/docs/author-a-theme.doc.mjs +2 -2
- package/assets/docs/is-my-code-good.doc.mjs +287 -0
- package/assets/docs/tree/add-a-component.doc.mjs +1 -1
- package/assets/docs/tree/add-a-theme.doc.mjs +1 -1
- package/assets/docs/tree/add-a-topic.doc.mjs +2 -2
- package/assets/docs/tree/agent-guidance.doc.mjs +1 -1
- package/assets/docs/tree/api.doc.mjs +6 -0
- package/assets/docs/tree/{integrations.doc.mjs → authoring.doc.mjs} +15 -6
- package/assets/docs/tree/block-template.doc.mjs +1 -1
- package/assets/docs/tree/build-the-template.doc.mjs +1 -1
- package/assets/docs/tree/building-blocks.doc.mjs +2 -2
- package/assets/docs/tree/check-the-props.doc.mjs +1 -1
- package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
- package/assets/docs/tree/checks.doc.mjs +3 -3
- package/assets/docs/tree/ci-and-containers.doc.mjs +13 -0
- package/assets/docs/tree/cli-command.doc.mjs +1 -1
- package/assets/docs/tree/cli.doc.mjs +1 -1
- package/assets/docs/tree/codemods.doc.mjs +1 -1
- package/assets/docs/tree/component-family.doc.mjs +1 -1
- package/assets/docs/tree/component-imports.doc.mjs +1 -1
- package/assets/docs/tree/components.doc.mjs +1 -1
- package/assets/docs/tree/configuration.doc.mjs +1 -1
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
- package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
- package/assets/docs/tree/docs.doc.mjs +1 -1
- package/assets/docs/tree/document-the-template.doc.mjs +1 -1
- package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
- package/assets/docs/tree/extend-or-replace.doc.mjs +1 -1
- package/assets/docs/{authoring.doc.mjs → tree/field-reference.doc.mjs} +4 -3
- package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
- package/assets/docs/tree/generate-a-palette.doc.mjs +1 -1
- package/assets/docs/tree/global-integrations.doc.mjs +2 -2
- package/assets/docs/tree/grade-template-with-agent.doc.mjs +4 -4
- package/assets/docs/tree/help.doc.mjs +2 -2
- package/assets/docs/tree/host-entry.doc.mjs +128 -0
- package/assets/docs/tree/links.doc.mjs +1 -1
- package/assets/docs/tree/package-and-test.doc.mjs +1 -1
- package/assets/docs/tree/page-template.doc.mjs +1 -1
- package/assets/docs/tree/publishing.doc.mjs +1 -1
- package/assets/docs/tree/quick-start.doc.mjs +1 -1
- package/assets/docs/tree/replace-a-core-component.doc.mjs +1 -1
- package/assets/docs/tree/replace-a-core-template.doc.mjs +1 -1
- package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
- package/assets/docs/tree/see-it-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/ship.doc.mjs +2 -2
- package/assets/docs/tree/short-and-findable.doc.mjs +1 -1
- package/assets/docs/tree/single-component.doc.mjs +1 -1
- package/assets/docs/tree/start-a-template.doc.mjs +1 -1
- package/assets/docs/tree/subcomponent.doc.mjs +1 -1
- package/assets/docs/tree/template-assets.doc.mjs +1 -1
- package/assets/docs/tree/template-doc-overview.doc.mjs +2 -2
- package/assets/docs/tree/template-fonts.doc.mjs +1 -1
- package/assets/docs/tree/template-grading-rubric.doc.mjs +17 -38
- package/assets/docs/tree/template-icons.doc.mjs +1 -1
- package/assets/docs/tree/template-images-media.doc.mjs +1 -1
- package/assets/docs/tree/template-styles.doc.mjs +1 -1
- package/assets/docs/tree/templates.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/test-template-in-app.doc.mjs +1 -1
- package/assets/docs/tree/themes.doc.mjs +1 -1
- package/assets/docs/tree/tokens-data.doc.mjs +2 -2
- package/assets/docs/tree/troubleshooting.doc.mjs +1 -1
- package/assets/docs/tree/upgrading.doc.mjs +1 -1
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/verify-packed-template.doc.mjs +1 -1
- package/assets/docs/tree/versioning.doc.mjs +5 -1
- package/assets/docs/tree/write-good-templates.doc.mjs +1 -1
- package/assets/docs/tree/write-the-template-file.doc.mjs +1 -1
- package/assets/docs/use-integrations.doc.mjs +120 -0
- package/assets/docs/working-with-ai.doc.mjs +6 -2
- package/assets/templates/themes/butter/butterTheme.ts +4 -2
- package/assets/templates/themes/stone/stoneTheme.ts +4 -2
- package/assets/templates/themes/y2k/y2kTheme.ts +4 -2
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/integration/integration.doc.mjs +1 -1
- package/authoring/integration/type.ts +1 -1
- package/clients/cli/bin/astryx.mjs +7 -78
- package/clients/cli/command-result-coverage.test.mjs +6 -5
- package/clients/cli/commands/build-theme.color-scheme.test.mjs +1 -1
- package/clients/cli/commands/{component/index.mjs → component.mjs} +37 -37
- package/clients/cli/commands/component.test.mjs +6 -6
- package/clients/cli/commands/docs.doc.mjs +2 -2
- package/clients/cli/commands/docs.mjs +1 -1
- package/clients/cli/commands/docs.test.mjs +14 -14
- package/clients/cli/commands/doctor-integration.test.mjs +49 -1
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +40 -0
- package/clients/cli/commands/doctor.test.mjs +65 -0
- package/clients/cli/commands/{hook/index.mjs → hook.mjs} +22 -22
- package/clients/cli/commands/import-hint-correctness.test.mjs +1 -1
- package/clients/cli/commands/init.behavior.test.mjs +230 -1
- package/clients/cli/commands/init.doc.mjs +28 -9
- package/clients/cli/commands/init.flag-help.test.mjs +1 -0
- package/clients/cli/commands/init.mjs +2 -2
- package/clients/cli/commands/integration-check.test.mjs +48 -0
- package/clients/cli/commands/integration.doc.mjs +1 -1
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/manifest.mjs +67 -0
- package/clients/cli/commands/outside-project.test.mjs +101 -1
- package/clients/cli/commands/postinstall.doc.mjs +23 -0
- package/clients/cli/commands/postinstall.mjs +31 -0
- package/clients/cli/commands/setup-nudge.test.mjs +78 -0
- package/clients/cli/commands/{build-theme.mjs → theme.mjs} +1 -1
- package/clients/cli/commands/upgrade.doc.mjs +4 -2
- package/clients/cli/commands/upgrade.mjs +9 -2
- package/clients/cli/commands/upgrade.subfolder-path.test.mjs +97 -0
- package/clients/cli/index.mjs +54 -94
- package/clients/cli/lib/component-format.mjs +1 -1
- package/clients/cli/lib/define-command.mjs +12 -7
- package/clients/cli/lib/exit-codes.test.mjs +5 -0
- package/clients/cli/lib/manifest.test.mjs +12 -0
- package/clients/cli/lib/welcome-box.mjs +50 -0
- package/clients/cli/run.mjs +108 -0
- package/foundation/agent-docs/agent-doc-state.d.mts +32 -7
- package/foundation/agent-docs/agent-doc-state.mjs +58 -9
- package/foundation/agent-docs/agent-docs.d.mts +100 -12
- package/foundation/agent-docs/agent-docs.mjs +1017 -105
- package/foundation/agent-docs/agent-docs.path-safety.test.mjs +1239 -17
- package/foundation/agent-docs/agent-docs.test.mjs +683 -39
- package/foundation/agent-docs/computer-agent-text.d.mts +39 -2
- package/foundation/agent-docs/computer-agent-text.mjs +135 -8
- package/foundation/agent-docs/computer-agent-text.test.mjs +99 -2
- package/foundation/config/project.mjs +20 -22
- package/foundation/config/project.test.mjs +56 -0
- package/foundation/discovery/authoring-self-docs.d.mts +7 -0
- package/foundation/discovery/authoring-self-docs.mjs +16 -4
- package/foundation/discovery/authoring-self-docs.test.mjs +15 -3
- package/foundation/discovery/authoring-surface.d.mts +1 -1
- package/foundation/discovery/authoring-surface.mjs +2 -2
- package/foundation/discovery/authoring-surface.test.mjs +1 -1
- package/foundation/discovery/cli-self-docs.d.mts +2 -1
- package/foundation/discovery/cli-self-docs.mjs +4 -3
- package/foundation/discovery/cli-self-docs.test.mjs +2 -2
- package/foundation/discovery/component-discovery.d.mts +37 -0
- package/foundation/discovery/component-discovery.mjs +80 -5
- package/foundation/discovery/component-loader.d.mts +1 -1
- package/foundation/discovery/docs-discovery.mjs +14 -1
- package/foundation/discovery/module-exports.d.mts +41 -0
- package/foundation/discovery/module-exports.mjs +253 -0
- package/foundation/discovery/runner-allowlist.d.mts +2 -4
- package/foundation/discovery/runner-allowlist.mjs +2 -4
- package/foundation/discovery/runner-commands.d.mts +77 -0
- package/foundation/discovery/runner-commands.mjs +294 -0
- package/foundation/discovery/runner-commands.test.mjs +128 -0
- package/foundation/discovery/stray-pointers.test.mjs +1 -1
- package/foundation/discovery/template-adapter.mjs +18 -1
- package/foundation/discovery/template-needs.mjs +1 -44
- package/foundation/discovery/theme-discovery.mjs +147 -3
- package/foundation/doc-compiler/doc-loads.test.mjs +33 -9
- package/foundation/doc-compiler/read.mjs +59 -1
- package/foundation/doc-compiler/read.test.mjs +11 -2
- package/foundation/doc-compiler/split-topic-keywords.test.mjs +3 -2
- package/foundation/doc-compiler/tree.d.mts +32 -6
- package/foundation/doc-compiler/tree.mjs +77 -43
- package/foundation/doc-compiler/tree.test.mjs +7 -7
- package/foundation/fs/paths.d.mts +70 -8
- package/foundation/fs/paths.mjs +556 -38
- package/foundation/fs/paths.test.mjs +430 -54
- package/foundation/fs/read-record.d.mts +18 -0
- package/foundation/fs/read-record.mjs +131 -0
- package/foundation/fs/read-record.test.mjs +77 -0
- package/foundation/integrations/autolink.d.mts +2 -1
- package/foundation/integrations/autolink.mjs +4 -13
- package/foundation/integrations/cli-peer-version.d.mts +36 -0
- package/foundation/integrations/cli-peer-version.mjs +132 -0
- package/foundation/integrations/cli-peer-version.test.mjs +354 -0
- package/foundation/integrations/computer-integrations.d.mts +6 -3
- package/foundation/integrations/computer-integrations.mjs +38 -9
- package/foundation/integrations/contribution-inventory.d.mts +15 -20
- package/foundation/integrations/contribution-inventory.mjs +41 -5
- package/foundation/integrations/exports-subpaths.d.mts +57 -0
- package/foundation/integrations/exports-subpaths.mjs +113 -0
- package/foundation/integrations/integrations.d.mts +27 -1
- package/foundation/integrations/integrations.mjs +61 -2
- package/foundation/integrations/public-imports.d.mts +118 -0
- package/foundation/integrations/public-imports.mjs +1769 -0
- package/foundation/integrations/public-imports.test.mjs +1793 -0
- package/foundation/integrations/validate-contributions.d.mts +115 -0
- package/foundation/integrations/validate-contributions.mjs +1168 -13
- package/foundation/release/cache.test.mjs +24 -21
- package/foundation/release/global-state.d.mts +8 -4
- package/foundation/release/global-state.mjs +4 -2
- package/foundation/release/handoff.d.mts +23 -4
- package/foundation/release/handoff.mjs +175 -8
- package/foundation/release/notices.d.mts +62 -8
- package/foundation/release/notices.mjs +136 -25
- package/foundation/release/notices.test.mjs +21 -0
- package/foundation/release/run-context.mjs +14 -0
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/route/route.d.mts +285 -0
- package/foundation/route/route.mjs +324 -0
- package/foundation/route/route.test.mjs +153 -0
- package/foundation/runtime/hosted-runtime.test.mjs +403 -0
- package/foundation/runtime/locked-versions.d.mts +32 -0
- package/foundation/runtime/locked-versions.mjs +65 -0
- package/foundation/runtime/package-root.d.mts +91 -0
- package/foundation/runtime/package-root.mjs +174 -0
- package/foundation/runtime/package-set.d.mts +62 -0
- package/foundation/runtime/package-set.mjs +130 -0
- package/foundation/runtime/package-set.test.mjs +432 -0
- package/foundation/text/string-utils.d.mts +2 -1
- package/foundation/text/string-utils.mjs +16 -5
- package/foundation/text/suggest-order.d.mts +72 -0
- package/foundation/text/suggest-order.mjs +363 -0
- package/foundation/text/suggest-order.test.mjs +259 -0
- package/host/door-conformance.test.mjs +274 -0
- package/host/index.d.ts +116 -0
- package/host/index.mjs +295 -0
- package/host/index.test.mjs +302 -0
- package/package.json +14 -9
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file `astryx docs is-my-code-good`: one evidence-first guide for checking
|
|
5
|
+
* whether a product surface uses Astryx well and improving it with an agent.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
9
|
+
export const docs = {
|
|
10
|
+
type: 'generic',
|
|
11
|
+
name: 'is-my-code-good',
|
|
12
|
+
title: 'Is my Astryx code good?',
|
|
13
|
+
category: 'guide',
|
|
14
|
+
keywords: [
|
|
15
|
+
'is my code good',
|
|
16
|
+
'review my code',
|
|
17
|
+
'code review',
|
|
18
|
+
'check my code',
|
|
19
|
+
'evaluate my code',
|
|
20
|
+
'review astryx code',
|
|
21
|
+
'rubric',
|
|
22
|
+
'astryx quality rubric',
|
|
23
|
+
'custom code audit',
|
|
24
|
+
],
|
|
25
|
+
description:
|
|
26
|
+
'Check whether a product surface fits its app and uses Astryx well, require evidence for every claim, and improve it with a repeatable agent review.',
|
|
27
|
+
sections: [
|
|
28
|
+
{
|
|
29
|
+
id: 'understand-the-app',
|
|
30
|
+
title: 'Understand the app',
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: 'prose',
|
|
34
|
+
text: 'Do not judge a file or surface in isolation. First learn the app context that makes a pattern correct, inconsistent, or incomplete.',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: 'list',
|
|
38
|
+
style: 'ordered',
|
|
39
|
+
items: [
|
|
40
|
+
'Name what the app is for, who uses it, and the task this surface helps them complete.',
|
|
41
|
+
'Trace where the surface sits: its route, entry point, navigation path, parent shell, and the page or block pattern it is meant to use.',
|
|
42
|
+
'Inspect sibling surfaces that do the same or adjacent jobs. Record their shared headers, actions, layout primitives, spacing, density, states, and narrow-screen behavior.',
|
|
43
|
+
'Read project guidance, including the root and relevant nested `AGENTS.md` files. Record app-owned wrapper components and intentional app conventions.',
|
|
44
|
+
'Record the installed `@astryxdesign/core`, `@astryxdesign/cli`, and integration-package versions from the project manifest and lockfile. Run the installed invocation of `astryx component --list` to see core and integration components, then inspect app-owned wrappers that do not appear in that catalog.',
|
|
45
|
+
'List the real data states, roles and permissions, supported locales and RTL behavior, and mobile or narrow-width needs that affect the task.',
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'prose',
|
|
50
|
+
text: 'Keep this context with the review. Mark anything you could not learn as `not inspected`. Do not flag a documented, intentional app convention merely because it differs from a generic pattern; cite the convention and verify that the user task and accessibility requirements still work.',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'choose-the-review',
|
|
56
|
+
title: 'Choose the review',
|
|
57
|
+
content: [
|
|
58
|
+
{
|
|
59
|
+
type: 'prose',
|
|
60
|
+
text: 'Review one exact revision and one named product surface, route, or component in its app context. Pick the smallest review that can answer your question.',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'table',
|
|
64
|
+
headers: ['Review', 'Use it for', 'What it can prove'],
|
|
65
|
+
rows: [
|
|
66
|
+
[
|
|
67
|
+
'Source check',
|
|
68
|
+
'A fast check for raw elements, direct icons, custom styles, and unsupported imports',
|
|
69
|
+
'Source findings plus app context visible in the project. It cannot call the rendered product good.',
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
'Full product review',
|
|
73
|
+
'Calling a surface done',
|
|
74
|
+
'App fit and task completion plus source quality, rendered layout, states, assets, project checks, and accessibility evidence.',
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
'Template publication grade',
|
|
78
|
+
'An integration template that people copy',
|
|
79
|
+
'The shared criteria plus versioned scoring, metadata, packaging, copy, and clean-app checks in {@link generic:grade-template-with-agent}.',
|
|
80
|
+
],
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'prose',
|
|
85
|
+
text: 'If all you have is one source file, run the source check anyway and use any project context that is available. Report clear source blockers; list missing app purpose, route, sibling patterns, shell, theme and density, installed components and versions, real states and roles, locale and mobile needs, revision, runnable app, rendered states, and project checks; and do not call the full product good.',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'prose',
|
|
89
|
+
text: "`astryx` in this guide means the project's installed CLI invocation, such as its local binary or existing package script. If the project has no installed invocation, report that evidence gap instead of downloading a different CLI version for the review.",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'prose',
|
|
93
|
+
text: 'A screenshot can prove a visible result, but it cannot prove which imports, components, or styles produced it. Source alone cannot prove responsive behavior, interaction, color modes, or whether an asset loads. Mark anything outside the supplied evidence as `not inspected`.',
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: 'apply-the-rubric',
|
|
99
|
+
title: 'Apply the shared rubric',
|
|
100
|
+
content: [
|
|
101
|
+
{
|
|
102
|
+
type: 'prose',
|
|
103
|
+
text: 'Mark each category `good`, `needs work`, or `not inspected`. Cite the route, sibling surface, project guidance, theme, component catalog, or user requirement behind every context-dependent result; cite a file and line for every source result; and name the rendered state for every visual result. Never turn missing evidence into a pass. A blocker is a finding that prevents the surface from building, rendering, operating, letting the target user complete the task, or meeting an accessibility requirement. Other departures from the rubric are `needs work`.',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: 'table',
|
|
107
|
+
headers: ['Category', 'What good means'],
|
|
108
|
+
rows: [
|
|
109
|
+
[
|
|
110
|
+
'App fit and task completion',
|
|
111
|
+
"The surface uses the app's established shell, page pattern, theme, density, wrappers, integrations, and interaction conventions unless a deviation is intentional and evidenced. The target user can complete the surface's job across the real states and permissions in scope.",
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
'Astryx components',
|
|
115
|
+
'Astryx owns each visible or interactive pattern for which it has a suitable component. Raw elements remain only when their native semantics are necessary or Astryx has no equivalent.',
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
'Icons',
|
|
119
|
+
'Icons render through `Icon`, `IconButton`, or the receiving component icon prop, not as raw SVG or a library component used directly.',
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
'Styling',
|
|
123
|
+
'Component props and design tokens do the work before custom StyleX declarations, inline styles, or classes. Each custom rule has a reason because no supported Astryx surface fits.',
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
'Layout',
|
|
127
|
+
'Astryx layout primitives express the visible structure, hierarchy, spacing, and responsive behavior without rebuilding the same patterns in raw containers or CSS.',
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
'Images and assets',
|
|
131
|
+
'Every image, font, and other asset is intentional, accessible, stable, and working from the product build path.',
|
|
132
|
+
],
|
|
133
|
+
[
|
|
134
|
+
'Code health',
|
|
135
|
+
'Public imports resolve, client boundaries are necessary, reachable states are handled, and no dead code or wrapper hides a finding.',
|
|
136
|
+
],
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'prose',
|
|
141
|
+
text: "Before calling a pattern custom or wrong, compare sibling surfaces and the installed component catalog. Reuse an app-owned wrapper or integration component when it already owns the job. A documented app convention is not a finding merely because it differs from a generic pattern; cite the convention and verify the user's task and accessibility requirements.",
|
|
142
|
+
},
|
|
143
|
+
{type: 'heading', level: 3, text: 'Common component replacements'},
|
|
144
|
+
{
|
|
145
|
+
type: 'table',
|
|
146
|
+
headers: ['Raw pattern', 'Common Astryx owner'],
|
|
147
|
+
rows: [
|
|
148
|
+
[
|
|
149
|
+
'Layout `div`',
|
|
150
|
+
'`VStack`, `HStack`, `Grid`, `Card`, `Section`, or `Center`',
|
|
151
|
+
],
|
|
152
|
+
['`span`, `p`, or `h1` through `h6`', '`Text` or `Heading`'],
|
|
153
|
+
['`button` or linked action', '`Button`, `IconButton`, or `Link`'],
|
|
154
|
+
['In-page `nav` or `aside`', '`LayoutPanel`'],
|
|
155
|
+
[
|
|
156
|
+
'`header` or `main`',
|
|
157
|
+
'`LayoutHeader` or `LayoutContent` inside `Layout`',
|
|
158
|
+
],
|
|
159
|
+
['`ul`, `ol`, or `li`', '`List` and `ListItem`'],
|
|
160
|
+
[
|
|
161
|
+
'`input`, `textarea`, or `select`',
|
|
162
|
+
'The matching Astryx form control',
|
|
163
|
+
],
|
|
164
|
+
['`table`, `tr`, or `td`', '`Table`'],
|
|
165
|
+
[
|
|
166
|
+
'`hr`, `dialog`, `details`, or `summary`',
|
|
167
|
+
'`Divider`, `Dialog`, or `Collapsible`',
|
|
168
|
+
],
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: 'prose',
|
|
173
|
+
text: 'Keep a native element when its semantics are necessary and Astryx has no equivalent. Common examples are a `form` that provides native submission, `input type="hidden"` for native form state, and an `img` when no general Astryx image component fits.',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: 'list',
|
|
177
|
+
style: 'unordered',
|
|
178
|
+
items: [
|
|
179
|
+
"Compare the route with sibling surfaces that do the same job. Identify the app's shared header, actions, shell, page pattern, spacing, and density before judging the target.",
|
|
180
|
+
'Inspect every JSX opening tag. Moving raw HTML behind a PascalCase helper does not make the underlying pattern an Astryx component.',
|
|
181
|
+
'Count every raw SVG element used as an icon, including `svg`, `path`, `circle`, `rect`, `line`, `polyline`, `polygon`, `ellipse`, and `g`. For an inline SVG helper, count its raw SVG elements once in the helper definition, not again at each render. Count each icon-library component rendered directly outside an Astryx icon surface.',
|
|
182
|
+
'Look up a possible replacement with `astryx component <Name> --dense`. Do not invent a component or prop that the installed version does not provide.',
|
|
183
|
+
'Run the installed `astryx component --list` and inspect app-owned wrappers before rebuilding a pattern. Prefer the component the app or one of its installed integrations already uses for the job.',
|
|
184
|
+
'Inspect every `stylex.create` declaration, inline style, `className`, and `stylex.props` use. Look for a component prop or token first.',
|
|
185
|
+
"When replacing a literal spacing value, read `astryx docs spacing --full` for the matching step or token and the target component doc for the prop's accepted scale. Do not guess a pixel-to-step mapping.",
|
|
186
|
+
'Choose the root that matches the surface. Use `Layout` for a page, `Center` for centered content, and `AppShell` only when the surface owns global application chrome.',
|
|
187
|
+
'Render realistic empty, loading, error, long-content, and interactive states. Check narrow and wide widths plus each supported color mode.',
|
|
188
|
+
'Verify the target roles and permissions, supported locales and RTL behavior, and mobile needs. Follow the real task from entry to completion instead of judging only the static page.',
|
|
189
|
+
'Run the product build, type check, tests, and accessibility checks. Keep a missing or failed check visible instead of calling the result good.',
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
type: 'prose',
|
|
194
|
+
text: 'This shared rubric has no numeric score. It answers whether ordinary product code uses Astryx well without pretending that an inapplicable template field or missing browser state earned points. Integration templates add a versioned score in {@link generic:template-grading-rubric}.',
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'collect-the-evidence',
|
|
200
|
+
title: 'Collect the evidence',
|
|
201
|
+
content: [
|
|
202
|
+
{
|
|
203
|
+
type: 'list',
|
|
204
|
+
style: 'ordered',
|
|
205
|
+
items: [
|
|
206
|
+
'Record the exact revision, named surface, route, and source files in scope. If the files are outside version control, record a content hash for each file and say that no project revision was available.',
|
|
207
|
+
"Write down the app's purpose, target users, surface task, entry point, navigation path, parent shell, expected page pattern, and sibling surfaces used for comparison.",
|
|
208
|
+
'Record project guidance, theme, density, installed Astryx and integration versions, the relevant output of `astryx component --list`, and app-owned wrappers or conventions.',
|
|
209
|
+
'List the states and context that matter, including real data shapes, roles and permissions, empty, loading, error, long content, interaction, narrow width, wide width, supported color modes, locales, and RTL behavior when they apply.',
|
|
210
|
+
'Run the product and capture each named rendered state. Use screenshots or a live browser result for visible claims, and follow the target user task from entry to completion.',
|
|
211
|
+
'Run the build, type check, tests, and accessibility checks. Keep their commands and results with the review.',
|
|
212
|
+
'For each Astryx component whose replacement, prop, or composition is in question, read `astryx component <Name> --dense`.',
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: 'ask-an-agent',
|
|
219
|
+
title: 'Ask an agent',
|
|
220
|
+
content: [
|
|
221
|
+
{
|
|
222
|
+
type: 'prose',
|
|
223
|
+
text: 'Start with a read-only pass so the original findings stay visible. Replace every angle-bracket value in this prompt.',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
type: 'code',
|
|
227
|
+
lang: 'text',
|
|
228
|
+
label: 'Agent evaluation prompt',
|
|
229
|
+
code: `Evaluate how well <surface> at <revision> fits <app> and uses Astryx. Do not edit files during this first pass.
|
|
230
|
+
|
|
231
|
+
\`astryx\` below means the project's installed CLI invocation, such as its local binary or existing package script. If none is installed, report that evidence gap instead of downloading a different version.
|
|
232
|
+
|
|
233
|
+
Before evaluating:
|
|
234
|
+
1. Read \`astryx docs is-my-code-good --full\`.
|
|
235
|
+
2. Read the root and relevant nested \`AGENTS.md\` files plus other project guidance. State what the app is for, who uses it, and the task this surface supports.
|
|
236
|
+
3. Trace the surface's route, entry point, navigation path, parent shell, and expected page or block pattern.
|
|
237
|
+
4. Inspect at least two sibling surfaces that do the same or adjacent jobs. Record their shared headers, actions, layout, spacing, density, states, and narrow-screen behavior.
|
|
238
|
+
5. Record the app's theme, density, app-owned wrappers, and documented intentional conventions.
|
|
239
|
+
6. Read the project manifest and lockfile for the installed Astryx, CLI, and integration versions. Run \`astryx component --list\`, then identify relevant integration components and app-owned wrappers.
|
|
240
|
+
7. List the real data states, roles and permissions, supported locales and RTL behavior, and mobile or narrow-width needs.
|
|
241
|
+
8. Inspect every source file in scope and its public imports.
|
|
242
|
+
9. Run \`astryx component <Name> --dense\` for each Astryx component whose replacement, prop, or composition you question.
|
|
243
|
+
10. Read \`astryx docs spacing --full\` and the target component's docs before mapping a literal spacing value to a prop or token.
|
|
244
|
+
11. Render every supplied state at narrow and wide widths and in each supported color mode.
|
|
245
|
+
12. Read the build, type-check, test, and accessibility-check results.
|
|
246
|
+
|
|
247
|
+
If only source is supplied, continue with a source check. Report blockers visible in the source, list every missing app-context and product-evidence item, and do not call the full product good. Do not leave the blocker list empty only because no checks were supplied.
|
|
248
|
+
|
|
249
|
+
Judge the code against the app as well as Astryx. Ask whether it matches sibling surfaces, uses the right shell and page pattern, reuses app or integration components instead of rebuilding them, preserves intentional app conventions, and lets the target user complete the task.
|
|
250
|
+
|
|
251
|
+
For each rubric category, return \`good\`, \`needs work\`, or \`not inspected\`. Every context-dependent finding must cite the route, sibling file, project guidance, theme, component catalog, wrapper, or user requirement it relies on. Cite file and line evidence for source findings and name the rendered state for visual findings. Mark context you could not learn as \`not inspected\`. Do not flag a documented intentional app convention merely because it differs from a generic pattern. Never turn missing evidence into a pass. Do not hide raw HTML or custom styles behind a helper. Do not calculate a template score for ordinary product code.
|
|
252
|
+
|
|
253
|
+
Return:
|
|
254
|
+
- app purpose, target users, surface job, route, and entry path
|
|
255
|
+
- app context inspected and app context missing
|
|
256
|
+
- product evidence inspected and product evidence missing
|
|
257
|
+
- one row per rubric category with result, evidence, and fix
|
|
258
|
+
- task-completion, functional, or accessibility blockers visible in the source or found by the supplied checks
|
|
259
|
+
- the top three fixes in order
|
|
260
|
+
- every claim that still needs a person to verify`,
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: 'verify-and-repeat',
|
|
266
|
+
title: 'Verify, improve, and repeat',
|
|
267
|
+
content: [
|
|
268
|
+
{
|
|
269
|
+
type: 'list',
|
|
270
|
+
style: 'ordered',
|
|
271
|
+
items: [
|
|
272
|
+
'Reject a `good` result without app-context, source, and rendered evidence. Open every cited route, sibling file, guidance file, and source location, and reproduce every named visible state.',
|
|
273
|
+
'Check that documented intentional app conventions were not flagged merely for differing from a generic pattern, and that context the reviewer could not learn stayed `not inspected`.',
|
|
274
|
+
'Fix task-completion, build, functional, and accessibility blockers first.',
|
|
275
|
+
'Reuse the app shell, page pattern, wrappers, and installed integration components before replacing unnecessary raw elements, direct icons, and custom styles.',
|
|
276
|
+
'Follow the target user task again, render the full state set, and rerun the project checks.',
|
|
277
|
+
'Repeat the read-only review on the new revision. Keep the first report so the improvement and every remaining tradeoff stay visible.',
|
|
278
|
+
],
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
type: 'prose',
|
|
282
|
+
text: 'For an integration template, finish with the scored package and copy workflow in {@link generic:grade-template-with-agent}. Ordinary product code stops with the evidence-backed category report and does not receive a template publication grade.',
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
@@ -20,6 +20,12 @@ export const docs = {
|
|
|
20
20
|
slots: {
|
|
21
21
|
kinds: {title: 'Reference', accepts: {kinds: ['namespace']}},
|
|
22
22
|
},
|
|
23
|
+
blocks: [
|
|
24
|
+
{
|
|
25
|
+
type: 'prose',
|
|
26
|
+
text: 'To run the whole CLI from your own command-line tool, with its arguments, folder, and command name, use the host entry: {@link generic:host-entry}.',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
23
29
|
adopts: [
|
|
24
30
|
{
|
|
25
31
|
source: {group: 'cli/api', kinds: ['function', 'schema', 'enum']},
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
|
-
/**
|
|
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: '
|
|
9
|
-
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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,9 +30,9 @@ 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
|
-
"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",
|
|
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`). Since 0.7.3 it also lists, from source and without failing, what the package tells apps to import that they cannot: a component's import (the doc's `import`, or the one the CLI derives) or a template's public import whose subpath package.json `exports` does not declare (`component_import_not_exported`, `template_import_not_exported`) or that names another package (`component_import_other_package`); an example that imports an undeclared subpath (`example_import_not_exported`); a template that imports a path outside the templates root (`template_import_outside_root`) or a path its package or Core does not export (`template_private_import`). It lists the same way a component's import whose module does not export the component (`component_import_missing_name`), an example or a template that imports a name its package does not export (`example_import_missing_name`, `template_import_missing_name`), and a template source with no default export (`template_no_default_export`). Each is a note, printed with its fix, that fails `--strict` from the next minor; an import it cannot judge, such as an `exports` target not built yet or a deep path into a `dist/` not built yet, is listed under `publicImports` as not checked. 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
|
],
|
|
37
37
|
[
|
|
38
38
|
'`astryx doctor integration components`',
|
|
@@ -24,6 +24,9 @@ export const docs = {
|
|
|
24
24
|
'docker',
|
|
25
25
|
'read-only home',
|
|
26
26
|
'cache the release cache',
|
|
27
|
+
'agent machine',
|
|
28
|
+
'restart',
|
|
29
|
+
'ephemeral machine',
|
|
27
30
|
],
|
|
28
31
|
description:
|
|
29
32
|
"What Astryx does in CI and containers: no update checks or notices, the project's version as always, and how to cache versions or work with a read-only home folder.",
|
|
@@ -74,6 +77,16 @@ export const docs = {
|
|
|
74
77
|
},
|
|
75
78
|
],
|
|
76
79
|
},
|
|
80
|
+
{
|
|
81
|
+
id: 'short-lived',
|
|
82
|
+
title: 'Machines that keep only the home folder',
|
|
83
|
+
content: [
|
|
84
|
+
{
|
|
85
|
+
type: 'prose',
|
|
86
|
+
text: 'Some agent machines keep the home folder across restarts but not system folders. A global install there disappears on restart while the agent guide in the home folder stays, so agents are told to run a global astryx command that is gone; the guide says to run the command that installed the CLI, such as `npm i -g @astryxdesign/cli`, when that command is not found, and `astryx doctor` names the same step. To keep the CLI across restarts, install it into a folder in your home and put its `bin` folder on your PATH, as for a permission error ({@link generic:install-once}), or run that command when the machine starts.',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
77
90
|
{
|
|
78
91
|
id: 'more',
|
|
79
92
|
title: 'More on global mode',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `astryx docs
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
*/
|