Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(cli): drop the build kit's text-only setup field (#6570)

Joeyb21f0e22c9aa
diff --git a/.changeset/cli-spec-build-kit-text-keys.md b/.changeset/cli-spec-build-kit-text-keys.md
new file mode 100644
index 0000000000..04b413cb3f
--- /dev/null
+++ b/.changeset/cli-spec-build-kit-text-keys.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/cli': patch
+---
+
+[fix] `astryx build "<idea>"` no longer prints a `setup:` line in its text output. That field existed only in the text, never in the `--json` kit, so the two views disagreed. The same guidance is in the no-query `astryx build` playbook.
+
+@josephfarina
diff --git a/packages/cli/clients/cli/commands/build.mjs b/packages/cli/clients/cli/commands/build.mjs
index 7a318a7446..744e0999fc 100644
--- a/packages/cli/clients/cli/commands/build.mjs
+++ b/packages/cli/clients/cli/commands/build.mjs
@@ -251,12 +251,7 @@ export function registerBuild(program) {
'FRAME + FOUNDATION',
'Always-available shell + layout/text/action primitives.',
),
- record({
- frame,
- foundation,
- setup:
- 'import "@astryxdesign/core/reset.css" + "astryx.css"; no <div>/style for layout — use Stack/Grid + tokens',
- }),
+ record({frame, foundation}),
);
// Last, so it is the line the reader leaves with — and only when the kit
diff --git a/packages/cli/clients/cli/commands/build.text-fields.test.mjs b/packages/cli/clients/cli/commands/build.text-fields.test.mjs
new file mode 100644
index 0000000000..085e008e7d
--- /dev/null
+++ b/packages/cli/clients/cli/commands/build.text-fields.test.mjs
@@ -0,0 +1,40 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file `build "<idea>"` text output names only fields the `build.kit`
+ * envelope carries — on the kit itself or on its entries.
+ */
+
+import {describe, it, expect} from 'vitest';
+import * as path from 'node:path';
+import {fileURLToPath} from 'node:url';
+import {runCli} from '../../../test-utils/run-cli.mjs';
+
+// Run against the monorepo root so @astryxdesign/core is discoverable.
+const REPO = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../..');
+const SLOW = 60_000;
+
+describe('build kit text fields mirror the JSON keys', () => {
+ it('prints no field the envelope lacks', async () => {
+ const json = await runCli(['build', 'analytics dashboard', '--json', '--verbose'], REPO);
+ expect(json.status).toBe(0);
+ const {data} = JSON.parse(json.stdout);
+ const keys = new Set([
+ ...Object.keys(data),
+ ...[...data.pages, ...data.blocks, ...data.domain].flatMap(e => Object.keys(e)),
+ ]);
+
+ const human = await runCli(['build', 'analytics dashboard', '--verbose'], REPO);
+ expect(human.status).toBe(0);
+ const fields = [
+ ...new Set(
+ human.stdout
+ .split('\n')
+ .map(line => /^([A-Za-z]+):\s/.exec(line)?.[1])
+ .filter(Boolean),
+ ),
+ ];
+ expect(fields).toContain('frame');
+ for (const field of fields) expect(keys).toContain(field);
+ }, SLOW);
+});