@atlaskit/ads-mcp 1.2.1 → 1.3.1
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/CHANGELOG.md +18 -0
- package/README.md +65 -16
- package/dist/cjs/instructions.js +1 -1
- package/dist/cjs/tools/get-all-components/list-get-all-components-tool.js +1 -1
- package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +1694 -41
- package/dist/cjs/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +1 -1
- package/dist/cjs/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +1 -1
- package/dist/cjs/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +1 -1
- package/dist/cjs/tools/get-lint-rules/lint-rules-structured-content.codegen.js +4 -4
- package/dist/cjs/tools/plan/list-plan-tool.js +1 -1
- package/dist/cjs/tools/plan/plan-input-schema.js +3 -3
- package/dist/cjs/tools/plan/plan-tool.js +1 -1
- package/dist/cjs/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +1 -1
- package/dist/cjs/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +1 -1
- package/dist/cjs/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +1 -1
- package/dist/cjs/tools/search-components/list-search-components-tool.js +1 -1
- package/dist/cjs/tools/search-components/search-components-tool.js +1 -1
- package/dist/es2019/instructions.js +2 -0
- package/dist/es2019/tools/get-all-components/list-get-all-components-tool.js +1 -1
- package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +1694 -41
- package/dist/es2019/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +2 -2
- package/dist/es2019/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +2 -2
- package/dist/es2019/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +2 -2
- package/dist/es2019/tools/get-lint-rules/lint-rules-structured-content.codegen.js +4 -4
- package/dist/es2019/tools/plan/list-plan-tool.js +6 -3
- package/dist/es2019/tools/plan/plan-input-schema.js +3 -3
- package/dist/es2019/tools/plan/plan-tool.js +1 -1
- package/dist/es2019/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +2 -2
- package/dist/es2019/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +2 -2
- package/dist/es2019/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +2 -2
- package/dist/es2019/tools/search-components/list-search-components-tool.js +3 -1
- package/dist/es2019/tools/search-components/search-components-tool.js +1 -1
- package/dist/esm/instructions.js +1 -1
- package/dist/esm/tools/get-all-components/list-get-all-components-tool.js +1 -1
- package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +1694 -41
- package/dist/esm/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +1 -1
- package/dist/esm/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +1 -1
- package/dist/esm/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +1 -1
- package/dist/esm/tools/get-lint-rules/lint-rules-structured-content.codegen.js +4 -4
- package/dist/esm/tools/plan/list-plan-tool.js +1 -1
- package/dist/esm/tools/plan/plan-input-schema.js +3 -3
- package/dist/esm/tools/plan/plan-tool.js +1 -1
- package/dist/esm/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +1 -1
- package/dist/esm/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +1 -1
- package/dist/esm/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +1 -1
- package/dist/esm/tools/search-components/list-search-components-tool.js +1 -1
- package/dist/esm/tools/search-components/search-components-tool.js +1 -1
- package/dist/types/instructions.d.ts +1 -1
- package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +2 -2
- package/dist/types/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +1 -1
- package/package.json +4 -4
|
@@ -10,7 +10,7 @@ var _helpers = require("../../helpers");
|
|
|
10
10
|
|
|
11
11
|
var listGetAtlaskitComponentsTool = exports.listGetAtlaskitComponentsTool = {
|
|
12
12
|
name: 'atlaskit_get_components',
|
|
13
|
-
description: "Returns
|
|
13
|
+
description: "Returns a compact inventory of public `@atlaskit/*` component packages that are not covered by the Atlassian Design System (ADS) component catalog. Output is names and packages only.\n\nWHEN TO USE:\nUse this for fallback discovery after ADS component search is not enough, or when you need to see which non-ADS `@atlaskit/*` components are available without the full metadata payload. For implementation examples and props, use `atlaskit_search_components`.\n\nNo parameters.",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Get all Atlaskit components',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -10,7 +10,7 @@ var _helpers = require("../../helpers");
|
|
|
10
10
|
|
|
11
11
|
var listGetAtlaskitHooksTool = exports.listGetAtlaskitHooksTool = {
|
|
12
12
|
name: 'atlaskit_get_hooks',
|
|
13
|
-
description: "Returns
|
|
13
|
+
description: "Returns a compact inventory of public `@atlaskit/*` hooks that are not covered by the Atlassian Design System (ADS) catalog. Output is names and packages only.\n\nWHEN TO USE:\nUse this for fallback discovery when you need a non-ADS `@atlaskit/*` hook inventory without the full metadata payload. For usage guidance, parameters, and return values, use `atlaskit_search_hooks`.\n\nNo parameters.",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Get all Atlaskit hooks',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -10,7 +10,7 @@ var _helpers = require("../../helpers");
|
|
|
10
10
|
|
|
11
11
|
var listGetAtlaskitUtilitiesTool = exports.listGetAtlaskitUtilitiesTool = {
|
|
12
12
|
name: 'atlaskit_get_utilities',
|
|
13
|
-
description: "Returns
|
|
13
|
+
description: "Returns a compact inventory of public `@atlaskit/*` utilities (functions, constants, types) that are not covered by the Atlassian Design System (ADS) catalog. Output is names and packages only.\n\nWHEN TO USE:\nUse this for fallback discovery when you need a non-ADS `@atlaskit/*` utility inventory without the full metadata payload. For usage guidance and signatures, use `atlaskit_search_utilities`.\n\nNo parameters.",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Get all Atlaskit utilities',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -9,7 +9,7 @@ exports.lintRulesMcpStructuredContent = void 0;
|
|
|
9
9
|
*
|
|
10
10
|
* Structured content for MCP (JSON) for ESLint rule docs from constellation.
|
|
11
11
|
*
|
|
12
|
-
* @codegen <<SignedSource::
|
|
12
|
+
* @codegen <<SignedSource::70c36a35137c1dd6f1a626ad947c0f42>>
|
|
13
13
|
* @codegenCommand yarn build structured-docs
|
|
14
14
|
*/
|
|
15
15
|
/* eslint-disable no-template-curly-in-string */
|
|
@@ -47,7 +47,7 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
|
|
|
47
47
|
ruleName: 'ensure-proper-xcss-usage',
|
|
48
48
|
description: 'This ESLint rule enforces proper usage of the `xcss` prop with compiled Primitives from'
|
|
49
49
|
}, {
|
|
50
|
-
content: "{\"ruleName\":\"expand-motion-shorthand\",\"description\":\"This rule expands `transition` and `animation` CSS shorthand properties into their individual\",\"content\":\"# expand-motion-shorthand\\n\\n## Examples\\n\\nThis rule expands `transition` and `animation` CSS shorthand properties into their individual\\nsub-properties. Expanding shorthands enables the\\n[`use-tokens-motion`](/components/eslint-plugin-design-system/use-tokens-motion/usage)
|
|
50
|
+
content: "{\"ruleName\":\"expand-motion-shorthand\",\"description\":\"This rule expands `transition` and `animation` CSS shorthand properties into their individual\",\"content\":\"# expand-motion-shorthand\\n\\n## Examples\\n\\nThis rule expands `transition` and `animation` CSS shorthand properties into their individual\\nsub-properties. Expanding shorthands enables the\\n[`use-tokens-motion`](/components/eslint-plugin-design-system/use-tokens-motion/usage) rule to\\ntarget `transitionDuration`, `transitionTimingFunction`, `animationDuration`, and\\n`animationTimingFunction` individually. This rule auto-fixes the expansion.\\n\\n### Incorrect\\n\\n```jsx\\nconst styles = css({\\n transition: 'opacity 200ms cubic-bezier(0.4, 0, 0, 1) 0ms',\\n ^^^^^^^^^^^\\n animation: 'fade 150ms ease-in 0ms 1 normal none running',\\n ^^^^^^^^^^\\n});\\n```\\n\\n### Correct\\n\\n```jsx\\nconst styles = css({\\n\\ttransitionProperty: 'opacity',\\n\\ttransitionDuration: '200ms',\\n\\ttransitionTimingFunction: 'cubic-bezier(0.4, 0, 0, 1)',\\n\\ttransitionDelay: '0ms',\\n\\tanimationName: 'fade',\\n\\tanimationDuration: '150ms',\\n\\tanimationTimingFunction: 'ease-in',\\n\\tanimationDelay: '0ms',\\n\\tanimationIterationCount: '1',\\n\\tanimationDirection: 'normal',\\n\\tanimationFillMode: 'none',\\n\\tanimationPlayState: 'running',\\n});\\n```\\n\"}",
|
|
51
51
|
ruleName: 'expand-motion-shorthand',
|
|
52
52
|
description: 'This rule expands `transition` and `animation` CSS shorthand properties into their individual'
|
|
53
53
|
}, {
|
|
@@ -67,9 +67,9 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
|
|
|
67
67
|
ruleName: 'lozenge-badge-appearance-migration',
|
|
68
68
|
description: 'This rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, and'
|
|
69
69
|
}, {
|
|
70
|
-
content: '{"ruleName":"lozenge-badge-tag-labelling-system-migration","description":"This rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, migrate","content":"# lozenge-badge-tag-labelling-system-migration\\n\\nThis rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, migrate\\n`<Badge>` component appearance prop to new semantic values, and migrate `<SimpleTag>` and\\n`<RemovableTag>` components to the new `<Tag>` or `<avatarTag>` components as part of the Labelling\\nSystem Phase 1 migration.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```tsx\\n// Non-bold Lozenge variants should migrate to Tag\\n<Lozenge isBold={false} />\\n<Lozenge /> // no isBold means implicit false\\n\\n// Dynamic isBold expressions require manual review\\n<Lozenge isBold={someVariable} />\\n<Lozenge isBold={condition ? true : false} />\\n\\n// Badge: Old appearance values that need migration\\n<Badge appearance=\\"added\\">{5}</Badge>\\n<Badge appearance=\\"removed\\">{10}</Badge>\\n<Badge appearance=\\"default\\">{3}</Badge>\\n<Badge appearance=\\"primary\\">{7}</Badge>\\n<Badge appearance=\\"primaryInverted\\">{2}</Badge>\\n<Badge appearance=\\"important\\">{99}</Badge>\\n\\n// Badge: Dynamic appearance expressions require manual review\\n<Badge appearance={getStatus()}>{count}</Badge>\\n<Badge appearance={condition ? \'added\' : \'removed\'}>{num}</Badge>\\n\\n// SimpleTag/RemovableTag: Old tag components that need migration\\n<SimpleTag>Hello</SimpleTag>\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n<SimpleTag elemBefore={<Avatar src=\\"x\\" />}>Hello</SimpleTag>\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n<RemovableTag elemBefore={<Avatar />}>Hello</RemovableTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also need migration\\nimport SimpleTag from \'@atlaskit/tag/simple-tag\';\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n\\nimport RemovableTag from \'@atlaskit/tag/removable-tag\';\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n```\\n\\n### Correct\\n\\n```tsx\\n// Non-bold variants should use Tag component with migration_fallback for safe rollout\\n// migration_fallback=\\"lozenge\\" renders as Lozenge when feature flag is off\\n<Tag text=\\"Label\\" color=\\"lime\\" isRemovable={false} migration_fallback=\\"lozenge\\" />\\n<Tag text=\\"Status\\" color=\\"gray\\" isRemovable={false} migration_fallback=\\"lozenge\\" />\\n\\n// Bold Lozenge variants can stay as Lozenge\\n<Lozenge isBold />\\n<Lozenge isBold={true} />\\n<Lozenge appearance=\\"success\\" isBold />\\n\\n// Badge: New semantic appearance values\\n<Badge appearance=\\"success\\">{5}</Badge>\\n<Badge appearance=\\"danger\\">{10}</Badge>\\n<Badge appearance=\\"neutral\\">{3}</Badge>\\n<Badge appearance=\\"information\\">{7}</Badge>\\n<Badge appearance=\\"inverse\\">{2}</Badge>\\n<Badge appearance=\\"danger\\">{99}</Badge>\\n\\n// Badge: Already using semantic values\\n<Badge appearance=\\"success\\">{42}</Badge>\\n\\n// SimpleTag/RemovableTag: Migrate to Tag component\\nimport Tag from \'@atlaskit/tag\';\\n<Tag>Hello</Tag>\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n\\n// SimpleTag/RemovableTag: Migrate to AvatarTag with render props\\nimport { AvatarTag } from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<AvatarTag avatar={(props) => <Avatar {...props} src=\\"x\\" />}>Hello</AvatarTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also migrate to main module\\nimport Tag from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n<AvatarTag avatar={(props) => <Avatar {...props} />}>Hello</AvatarTag>\\n```\\n\\n## Rule Details\\n\\nThis rule enforces multiple migration patterns:\\n\\n1. **Migrate `isBold={false}` or missing `isBold` → `<Tag />`**: Detects non-bold Lozenge variants\\n and suggests migrating to the Tag component, preserving other props including the `appearance`\\n prop with its value.\\n\\n2. **Warn on dynamic `isBold` expressions**: Detects dynamic `isBold` props that cannot be safely\\n auto-fixed and require manual review.\\n\\n3. **Migrate Badge appearance values**: Detects Badge components using old appearance values and\\n migrates them to new semantic values.\\n\\n4. **Warn on dynamic Badge appearance expressions**: Detects dynamic `appearance` props on Badge\\n components that cannot be safely auto-fixed and require manual review.\\n\\n5. **Migrate SimpleTag/RemovableTag to Tag**: Detects SimpleTag and RemovableTag components (from\\n named imports or subpaths) and migrates them to the new Tag component, updating imports and\\n handling color prop mapping.\\n\\n6. **Migrate SimpleTag/RemovableTag with Avatar to AvatarTag**: Detects SimpleTag and RemovableTag\\n components that use an Avatar component in the `elemBefore` prop and migrates them to the new\\n `AvatarTag` component with render props pattern: `avatar={(props) => <Avatar {...props} />}`.\\n Removes `appearance` and `color` props from AvatarTag migrations.\\n\\n7. **Handle subpath imports**: Detects default imports from `@atlaskit/tag/simple-tag` and\\n `@atlaskit/tag/removable-tag` and migrates them to the main `@atlaskit/tag` module with the\\n appropriate component (Tag or AvatarTag).\\n\\n8. **Handle default Tag imports**: Detects default imports from `@atlaskit/tag` (old RemovableTag)\\n and checks if they need migration. If nothing needs migration, treats them as the new Tag\\n component.\\n\\n## Flowcharts\\n\\n### Tag Migration Flowchart (SimpleTag/RemovableTag/Tag)\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Tag Migration (SimpleTag/RemovableTag/Tag) │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Is default │\\n │ Tag import │\\n │ from │\\n │ @atlaskit/ │\\n │ tag? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ │\\n ┌───────────────┐ │\\n │ Check if │ │\\n │ already new │ │\\n │ Tag (nothing │ │\\n │ to migrate) │ │\\n └───────┬───────┘ │\\n │ │\\n ┌───────┴───────┐ │\\n │ │ │\\n YES │ │ NO │\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ SKIP │ │ Check │\\n│ (Already │ │ elemBefore │\\n│ migrated) │ │ for Avatar │\\n└───────────────┘ └───────┬───────┘\\n │\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Migrate to │ │ Migrate to │\\n │ AvatarTag │ │ Tag │\\n │ - Convert │ │ - Map colors │\\n │ elemBefore │ │ - Add │\\n │ to avatar │ │ isRemovable │\\n │ render prop │ │ ={false} │\\n │ - Remove │ │ (if │\\n │ appearance/ │ │ SimpleTag) │\\n │ color │ │ - Update │\\n │ │ │ imports │\\n └───────────────┘ └───────────────┘\\n```\\n\\n### Badge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Badge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Has │\\n │ appearance │\\n │ prop? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───────────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Is dynamic? │ │ SKIP │\\n │ (variable/ │ │ (no │\\n │ expression) │ │ migration │\\n └───────┬───────┘ │ needed) │\\n │ └───────────────┘\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Map & fix │\\n│ warning │ │ appearance │\\n│ (manual │ │ value: │\\n│ review) │ │ - added → │\\n│ │ │ success │\\n│ │ │ - removed → │\\n│ │ │ danger │\\n│ │ │ - default → │\\n│ │ │ neutral │\\n│ │ │ - primary → │\\n│ │ │ information │\\n│ │ │ - primaryIn │\\n│ │ │ verted → │\\n│ │ │ inverse │\\n│ │ │ - important → │\\n│ │ │ danger │\\n└───────────────┘ └───────────────┘\\n```\\n\\n### Lozenge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Lozenge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Check isBold │\\n │ prop │\\n └───────┬───────┘\\n │\\n ┌───────────────────┼───────────────────┐\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌────────────────┐ ┌───────────────┐\\n│ isBold={false}│ │ No isBold prop │ │ isBold={true} │\\n│ │ │ (implicit │ │ OR │\\n│ │ │ false) │ │ isBold │\\n│ │ │ │ │ (implicit) │\\n└───────┬───────┘ └───────┬────────┘ └───────┬───────┘\\n │ │ │\\n │ │ │\\n ▼ ▼ ▼\\n┌────────────────────────────┐ ┌───────────────┐\\n│ Check if │ │ Stay as │\\n│ appearance is │ │ Lozenge │\\n│ dynamic | │ - Update │\\n└───────┬────────────────────┘ │ appearance │\\n │ │ if needed │\\n┌───────┴─────────────────┐ └───────────────┘\\n│ │\\n│ DYNAMIC │ NOT DYNAMIC\\n│ │\\n▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Migrate to │\\n│ warning │ │ Tag │\\n│ (manual │ │ - appearance │\\n│ review) │ │ → color │\\n│ │ │ - Map values: │\\n│ │ │ success → │\\n│ │ │ lime │\\n│ │ │ default → │\\n│ │ │ gray │\\n│ │ │ removed → │\\n│ │ │ red │\\n│ │ │ inprogress │\\n│ │ │ → blue │\\n│ │ │ new → │\\n│ │ │ purple │\\n│ │ │ moved → │\\n│ │ │ yellow │\\n│ │ │ - Remove │\\n│ │ │ isBold │\\n│ │ │ - Add │\\n│ │ │ isRemov │\\n│ │ │ able= │\\n│ │ │ {false} │\\n│ │ │ - Add │\\n│ │ │ migration_ │\\n│ │ │ fallback= │\\n│ │ │ \\"lozenge\\" │\\n└───────────────┘ └───────────────┘\\n```\\n\\n## Appearance Prop Handling\\n\\n### Lozenge → Tag Migration\\n\\nWhen migrating `<Lozenge>` to `<Tag>`, the `appearance` prop is converted to `color` prop with value\\nmapping.\\n\\n### Lozenge Appearance → Tag Color Mapping\\n\\nWhen migrating Lozenge to Tag, appearance values are mapped to color values:\\n\\n| Lozenge Appearance | Tag Color |\\n| ------------------ | --------- |\\n| `success` | `lime` |\\n| `default` | `gray` |\\n| `removed` | `red` |\\n| `inprogress` | `blue` |\\n| `new` | `purple` |\\n| `moved` | `yellow` |\\n\\n**Note**: Dynamic appearance values in Lozenge components require manual review before migration.\\n\\n### Migration Fallback Prop\\n\\nFor safe, staged rollout when migrating from Lozenge to Tag, use the `migration_fallback=\\"lozenge\\"`\\nprop:\\n\\n```tsx\\n// Before (Lozenge)\\n<Lozenge appearance=\\"success\\">{data.label}</Lozenge>\\n\\n// After (Tag with migration_fallback for safe rollout)\\n<Tag\\n text={data.label}\\n color=\\"lime\\"\\n isRemovable={false}\\n migration_fallback=\\"lozenge\\"\\n/>\\n```\\n\\nWhen `migration_fallback=\\"lozenge\\"` is set and the feature flag\\n`platform-dst-lozenge-tag-badge-visual-uplifts` is **OFF**, the Tag component renders as a Lozenge\\nwith `isBold={false}`. When the feature flag is **ON**, it renders as the new Tag component.\\n\\nThis prop is:\\n\\n- **Temporary**: Should be cleaned up via codemod after migration is complete\\n- **Internal**: Intended for staged rollout to support large consumers (like Jira)\\n- **Safe**: Prevents visual regressions during migration\\n\\nThe `migration_fallback` prop will be automatically added by the ESLint auto-fix when migrating from\\nLozenge to Tag.\\n\\n### Badge Appearance Value Mapping\\n\\nBadge components use the following appearance value mapping:\\n\\n| Old Appearance | New Appearance |\\n| ----------------- | -------------- |\\n| `added` | `success` |\\n| `removed` | `danger` |\\n| `default` | `neutral` |\\n| `primary` | `information` |\\n| `primaryInverted` | `inverse` |\\n| `important` | `danger` |\\n\\n### Tag Color Mapping\\n\\nSimpleTag and RemovableTag color props are mapped to new semantic color values when migrating to\\nTag:\\n\\n| Old Color | New Color |\\n| -------------- | --------- |\\n| `limeLight` | `lime` |\\n| `orangeLight` | `orange` |\\n| `magentaLight` | `magenta` |\\n| `greenLight` | `green` |\\n| `blueLight` | `blue` |\\n| `redLight` | `red` |\\n| `purpleLight` | `purple` |\\n| `greyLight` | `gray` |\\n| `tealLight` | `teal` |\\n| `yellowLight` | `yellow` |\\n| `grey` | `gray` |\\n\\n## Auto-fixes\\n\\n- ✅ `isBold={false}` and missing `isBold` migration to `<Tag>` with `migration_fallback=\\"lozenge\\"`\\n for safe rollout\\n- ✅ Static Badge appearance prop values (e.g., `appearance=\\"added\\"` → `appearance=\\"success\\"`)\\n- ✅ SimpleTag/RemovableTag migration to `<Tag>` with color mapping and import updates\\n- ✅ SimpleTag/RemovableTag from subpaths (e.g., `@atlaskit/tag/simple-tag`) migration to main\\n module\\n- ✅ SimpleTag/RemovableTag with Avatar migration to `<AvatarTag>` with render props pattern\\n- ✅ Static Tag color prop mapping (e.g., `color=\\"blueLight\\"` → `color=\\"blue\\"`)\\n- ✅ SimpleTag `isRemovable={false}` prop addition when migrating to Tag\\n- ✅ Subpath import conversion to main `@atlaskit/tag` module\\n- ✅ Lozenge to Tag migration adds `migration_fallback=\\"lozenge\\"` for safe staged rollout\\n- ❌ Dynamic `isBold` expressions (warning only)\\n- ❌ Dynamic Badge appearance expressions (warning only - requires manual review)\\n"}',
|
|
70
|
+
content: '{"ruleName":"lozenge-badge-tag-labelling-system-migration","description":"This rule helps migrate deprecated `<Lozenge>` props and appearance values to the new API, migrate","content":"# lozenge-badge-tag-labelling-system-migration\\n\\nThis rule helps migrate deprecated `<Lozenge>` props and appearance values to the new API, migrate\\n`<Badge>` component appearance prop to new semantic values, and migrate `<SimpleTag>` and\\n`<RemovableTag>` components to the new `<Tag>` or `<AvatarTag>` components as part of the Labelling\\nSystem Phase 1 migration.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```tsx\\n// Lozenge: isBold is deprecated — remove it regardless of value\\n<Lozenge isBold={false} appearance=\\"success\\" />\\n<Lozenge isBold={true} appearance=\\"success\\" />\\n<Lozenge isBold appearance=\\"success\\" />\\n<Lozenge isBold={someVariable} />\\n\\n// Lozenge: Old appearance values that need migration to new semantic values\\n<Lozenge appearance=\\"default\\">Default</Lozenge>\\n<Lozenge appearance=\\"inprogress\\">In Progress</Lozenge>\\n<Lozenge appearance=\\"moved\\">Moved</Lozenge>\\n<Lozenge appearance=\\"removed\\">Removed</Lozenge>\\n<Lozenge appearance=\\"new\\">New</Lozenge>\\n\\n// Badge: Old appearance values that need migration\\n<Badge appearance=\\"added\\">{5}</Badge>\\n<Badge appearance=\\"removed\\">{10}</Badge>\\n<Badge appearance=\\"default\\">{3}</Badge>\\n<Badge appearance=\\"primary\\">{7}</Badge>\\n<Badge appearance=\\"primaryInverted\\">{2}</Badge>\\n<Badge appearance=\\"important\\">{99}</Badge>\\n\\n// Badge: Dynamic appearance expressions require manual review\\n<Badge appearance={getStatus()}>{count}</Badge>\\n<Badge appearance={condition ? \'added\' : \'removed\'}>{num}</Badge>\\n\\n// SimpleTag/RemovableTag: Old tag components that need migration\\n<SimpleTag>Hello</SimpleTag>\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n<SimpleTag elemBefore={<Avatar src=\\"x\\" />}>Hello</SimpleTag>\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n<RemovableTag elemBefore={<Avatar />}>Hello</RemovableTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also need migration\\nimport SimpleTag from \'@atlaskit/tag/simple-tag\';\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n\\nimport RemovableTag from \'@atlaskit/tag/removable-tag\';\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n```\\n\\n### Correct\\n\\n```tsx\\n// Lozenge: Use new semantic appearance values (no isBold prop)\\n<Lozenge appearance=\\"success\\">Success</Lozenge>\\n<Lozenge appearance=\\"neutral\\">Default</Lozenge>\\n<Lozenge appearance=\\"information\\">In Progress</Lozenge>\\n<Lozenge appearance=\\"warning\\">Moved</Lozenge>\\n<Lozenge appearance=\\"danger\\">Removed</Lozenge>\\n<Lozenge appearance=\\"discovery\\">New</Lozenge>\\n\\n// Badge: New semantic appearance values\\n<Badge appearance=\\"success\\">{5}</Badge>\\n<Badge appearance=\\"danger\\">{10}</Badge>\\n<Badge appearance=\\"neutral\\">{3}</Badge>\\n<Badge appearance=\\"information\\">{7}</Badge>\\n<Badge appearance=\\"inverse\\">{2}</Badge>\\n<Badge appearance=\\"danger\\">{99}</Badge>\\n\\n// SimpleTag/RemovableTag: Migrate to Tag component\\nimport Tag from \'@atlaskit/tag\';\\n<Tag>Hello</Tag>\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n\\n// SimpleTag/RemovableTag: Migrate to AvatarTag with render props\\nimport { AvatarTag } from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<AvatarTag avatar={(props) => <Avatar {...props} src=\\"x\\" />}>Hello</AvatarTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also migrate to main module\\nimport Tag from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n<AvatarTag avatar={(props) => <Avatar {...props} />}>Hello</AvatarTag>\\n```\\n\\n## Rule Details\\n\\nThis rule enforces multiple migration patterns:\\n\\n1. **Remove deprecated `isBold` prop from `<Lozenge>`**: The `isBold` prop is deprecated in the new\\n Lozenge API. The rule warns and auto-removes it regardless of value (true, false, or dynamic).\\n Both bold and subtle variants are now expressed via the `appearance` prop alone.\\n\\n2. **Migrate Lozenge appearance values to new semantic values**: Detects old appearance values\\n (`default`, `inprogress`, `moved`, `removed`, `new`) and auto-fixes them to new semantic values\\n (`neutral`, `information`, `warning`, `danger`, `discovery`). The value `success` is unchanged.\\n\\n3. **Migrate Badge appearance values**: Detects Badge components using old appearance values and\\n migrates them to new semantic values.\\n\\n4. **Warn on dynamic Badge appearance expressions**: Detects dynamic `appearance` props on Badge\\n components that cannot be safely auto-fixed and require manual review.\\n\\n5. **Migrate SimpleTag/RemovableTag to Tag**: Detects SimpleTag and RemovableTag components (from\\n named imports or subpaths) and migrates them to the new Tag component, updating imports and\\n handling color prop mapping.\\n\\n6. **Migrate SimpleTag/RemovableTag with Avatar to AvatarTag**: Detects SimpleTag and RemovableTag\\n components that use an Avatar component in the `elemBefore` prop and migrates them to the new\\n `AvatarTag` component with render props pattern: `avatar={(props) => <Avatar {...props} />}`.\\n Removes `appearance` and `color` props from AvatarTag migrations.\\n\\n7. **Handle subpath imports**: Detects default imports from `@atlaskit/tag/simple-tag` and\\n `@atlaskit/tag/removable-tag` and migrates them to the main `@atlaskit/tag` module with the\\n appropriate component (Tag or AvatarTag).\\n\\n8. **Handle default Tag imports**: Detects default imports from `@atlaskit/tag` (old RemovableTag)\\n and checks if they need migration. If nothing needs migration, treats them as the new Tag\\n component.\\n\\n## Flowcharts\\n\\n### Tag Migration Flowchart (SimpleTag/RemovableTag/Tag)\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Tag Migration (SimpleTag/RemovableTag/Tag) │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Is default │\\n │ Tag import │\\n │ from │\\n │ @atlaskit/ │\\n │ tag? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ │\\n ┌───────────────┐ │\\n │ Check if │ │\\n │ already new │ │\\n │ Tag (nothing │ │\\n │ to migrate) │ │\\n └───────┬───────┘ │\\n │ │\\n ┌───────┴───────┐ │\\n │ │ │\\n YES │ │ NO │\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ SKIP │ │ Check │\\n│ (Already │ │ elemBefore │\\n│ migrated) │ │ for Avatar │\\n└───────────────┘ └───────┬───────┘\\n │\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Migrate to │ │ Migrate to │\\n │ AvatarTag │ │ Tag │\\n │ - Convert │ │ - Map colors │\\n │ elemBefore │ │ - Add │\\n │ to avatar │ │ isRemovable │\\n │ render prop │ │ ={false} │\\n │ - Remove │ │ (if │\\n │ appearance/ │ │ SimpleTag) │\\n │ color │ │ - Update │\\n │ │ │ imports │\\n └───────────────┘ └───────────────┘\\n```\\n\\n### Badge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Badge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Has │\\n │ appearance │\\n │ prop? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───────────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Is dynamic? │ │ SKIP │\\n │ (variable/ │ │ (no │\\n │ expression) │ │ migration │\\n └───────┬───────┘ │ needed) │\\n │ └───────────────┘\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Map & fix │\\n│ warning │ │ appearance │\\n│ (manual │ │ value: │\\n│ review) │ │ - added → │\\n│ │ │ success │\\n│ │ │ - removed → │\\n│ │ │ danger │\\n│ │ │ - default → │\\n│ │ │ neutral │\\n│ │ │ - primary → │\\n│ │ │ information │\\n│ │ │ - primaryIn │\\n│ │ │ verted → │\\n│ │ │ inverse │\\n│ │ │ - important → │\\n│ │ │ danger │\\n└───────────────┘ └───────────────┘\\n```\\n\\n### Lozenge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Lozenge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Check isBold │\\n │ prop │\\n └───────┬───────┘\\n │\\n ┌───────────────────┼───────────────────┐\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌────────────────┐ ┌───────────────┐\\n│ isBold={false}│ │ No isBold prop │ │ isBold={true} │\\n│ │ │ (implicit │ │ OR │\\n│ │ │ false) │ │ isBold │\\n│ │ │ │ │ (implicit) │\\n└───────┬───────┘ └───────┬────────┘ └───────┬───────┘\\n │ │ │\\n │ │ │\\n ▼ ▼ ▼\\n┌────────────────────────────┐ ┌───────────────┐\\n│ Check if │ │ Stay as │\\n│ appearance is │ │ Lozenge │\\n│ dynamic | │ - Update │\\n└───────┬────────────────────┘ │ appearance │\\n │ │ if needed │\\n┌───────┴─────────────────┐ └───────────────┘\\n│ │\\n│ DYNAMIC │ NOT DYNAMIC\\n│ │\\n▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Migrate to │\\n│ warning │ │ Tag │\\n│ (manual │ │ - appearance │\\n│ review) │ │ → color │\\n│ │ │ - Map values: │\\n│ │ │ success → │\\n│ │ │ lime │\\n│ │ │ default → │\\n│ │ │ gray │\\n│ │ │ removed → │\\n│ │ │ red │\\n│ │ │ inprogress │\\n│ │ │ → blue │\\n│ │ │ new → │\\n│ │ │ purple │\\n│ │ │ moved → │\\n│ │ │ yellow │\\n│ │ │ - Remove │\\n│ │ │ isBold │\\n│ │ │ - Add │\\n│ │ │ isRemov │\\n│ │ │ able= │\\n│ │ │ {false} │\\n│ │ │ - Add │\\n│ │ │ migration_ │\\n│ │ │ fallback= │\\n│ │ │ \\"lozenge\\" │\\n└───────────────┘ └───────────────┘\\n```\\n\\n## Appearance Prop Handling\\n\\n### Lozenge Appearance Value Migration\\n\\nThe new Lozenge API uses semantic color names. Old legacy appearance values are auto-fixed in-place:\\n\\n| Old Appearance | New Appearance |\\n| -------------- | --------------------- |\\n| `default` | `neutral` |\\n| `inprogress` | `information` |\\n| `moved` | `warning` |\\n| `removed` | `danger` |\\n| `new` | `discovery` |\\n| `success` | `success` (unchanged) |\\n\\nThe `<Lozenge>` component stays as `<Lozenge>` — it no longer migrates to `<Tag>`.\\n\\n### isBold Prop\\n\\nThe `isBold` prop is **not flagged** by this rule. While the feature flag\\n`platform-dst-lozenge-tag-badge-visual-uplifts` is OFF, users still need `isBold` to render subtle\\nLozenges. Removing it prematurely would break subtle Lozenges in those environments.\\n\\nOnce the feature flag is fully rolled out and the new Lozenge (always bold) is the only variant,\\n`isBold` cleanup can be handled in a separate codemod pass.\\n\\n### Badge Appearance Value Mapping\\n\\nBadge components use the following appearance value mapping:\\n\\n| Old Appearance | New Appearance |\\n| ----------------- | -------------- |\\n| `added` | `success` |\\n| `removed` | `danger` |\\n| `default` | `neutral` |\\n| `primary` | `information` |\\n| `primaryInverted` | `inverse` |\\n| `important` | `danger` |\\n\\n### Tag Color Mapping\\n\\nSimpleTag and RemovableTag color props are mapped to new semantic color values when migrating to\\nTag:\\n\\n| Old Color | New Color |\\n| -------------- | --------- |\\n| `limeLight` | `lime` |\\n| `orangeLight` | `orange` |\\n| `magentaLight` | `magenta` |\\n| `greenLight` | `green` |\\n| `blueLight` | `blue` |\\n| `redLight` | `red` |\\n| `purpleLight` | `purple` |\\n| `greyLight` | `gray` |\\n| `tealLight` | `teal` |\\n| `yellowLight` | `yellow` |\\n| `grey` | `gray` |\\n\\n## Auto-fixes\\n\\n- ✅ Lozenge legacy appearance values migrated to new semantic values in-place (e.g.,\\n `appearance=\\"inprogress\\"` → `appearance=\\"information\\"`)\\n- ✅ Static Badge appearance prop values (e.g., `appearance=\\"added\\"` → `appearance=\\"success\\"`)\\n- ✅ SimpleTag/RemovableTag migration to `<Tag>` with color mapping and import updates\\n- ✅ SimpleTag/RemovableTag from subpaths (e.g., `@atlaskit/tag/simple-tag`) migration to main\\n module\\n- ✅ SimpleTag/RemovableTag with Avatar migration to `<AvatarTag>` with render props pattern\\n- ✅ Static Tag color prop mapping (e.g., `color=\\"blueLight\\"` → `color=\\"blue\\"`)\\n- ✅ SimpleTag `isRemovable={false}` prop addition when migrating to Tag\\n- ✅ Subpath import conversion to main `@atlaskit/tag` module\\n- ❌ Dynamic Lozenge `appearance` prop values (warning with FIXME comment only)\\n- ❌ Dynamic Badge appearance expressions (warning only - requires manual review)\\n"}',
|
|
71
71
|
ruleName: 'lozenge-badge-tag-labelling-system-migration',
|
|
72
|
-
description: 'This rule helps migrate deprecated `<Lozenge>`
|
|
72
|
+
description: 'This rule helps migrate deprecated `<Lozenge>` props and appearance values to the new API, migrate'
|
|
73
73
|
}, {
|
|
74
74
|
content: '{"ruleName":"lozenge-isBold-and-lozenge-badge-appearance-migration","description":"This rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, and","content":"# lozenge-isBold-and-lozenge-badge-appearance-migration\\n\\nThis rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, and\\nmigrate `<Badge>` component appearance prop to new semantic values as part of the Labelling System\\nPhase 1 migration.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```tsx\\n// Non-bold Lozenge variants should migrate to Tag\\n<Lozenge isBold={false} />\\n<Lozenge /> // no isBold means implicit false\\n\\n// Dynamic isBold expressions require manual review\\n<Lozenge isBold={someVariable} />\\n<Lozenge isBold={condition ? true : false} />\\n\\n// Badge: Old appearance values that need migration\\n<Badge appearance=\\"added\\">{5}</Badge>\\n<Badge appearance=\\"removed\\">{10}</Badge>\\n<Badge appearance=\\"default\\">{3}</Badge>\\n<Badge appearance=\\"primary\\">{7}</Badge>\\n<Badge appearance=\\"primaryInverted\\">{2}</Badge>\\n<Badge appearance=\\"important\\">{99}</Badge>\\n\\n// Badge: Dynamic appearance expressions require manual review\\n<Badge appearance={getStatus()}>{count}</Badge>\\n<Badge appearance={condition ? \'added\' : \'removed\'}>{num}</Badge>\\n```\\n\\n### Correct\\n\\n```tsx\\n// Non-bold variants should use Tag component with appearance prop\\n<Tag appearance=\\"success\\" />\\n<Tag appearance=\\"default\\" />\\n\\n// Bold Lozenge variants can stay as Lozenge\\n<Lozenge isBold />\\n<Lozenge isBold={true} />\\n<Lozenge appearance=\\"success\\" isBold />\\n\\n// Badge: New semantic appearance values\\n<Badge appearance=\\"success\\">{5}</Badge>\\n<Badge appearance=\\"danger\\">{10}</Badge>\\n<Badge appearance=\\"neutral\\">{3}</Badge>\\n<Badge appearance=\\"information\\">{7}</Badge>\\n<Badge appearance=\\"inverse\\">{2}</Badge>\\n<Badge appearance=\\"danger\\">{99}</Badge>\\n\\n// Badge: Already using semantic values\\n<Badge appearance=\\"success\\">{42}</Badge>\\n```\\n\\n## Rule Details\\n\\nThis rule enforces multiple migration patterns:\\n\\n1. **Migrate `isBold={false}` or missing `isBold` → `<Tag />`**: Detects non-bold Lozenge variants\\n and suggests migrating to the Tag component, preserving other props including the `appearance`\\n prop with its value.\\n\\n2. **Warn on dynamic `isBold` expressions**: Detects dynamic `isBold` props that cannot be safely\\n auto-fixed and require manual review.\\n\\n3. **Migrate Badge appearance values**: Detects Badge components using old appearance values and\\n migrates them to new semantic values.\\n\\n4. **Warn on dynamic Badge appearance expressions**: Detects dynamic `appearance` props on Badge\\n components that cannot be safely auto-fixed and require manual review.\\n\\n## Appearance Prop Handling\\n\\n### Lozenge and Tag\\n\\nBoth `<Lozenge>` and `<Tag>` now use the `appearance` prop with new semantic values. The rule will\\nautomatically map old appearance values to the new semantic values when they differ.\\n\\n### Appearance Value Mapping\\n\\nThe rule includes a mapping function that will update old appearance values to new semantic values:\\n\\n```tsx\\n// Example mappings (to be updated with actual semantic values)\\n\'success\' → \'success\' // or new semantic equivalent\\n\'default\' → \'default\' // or new semantic equivalent\\n\'removed\' → \'removed\' // or new semantic equivalent\\n\'inprogress\' → \'inprogress\' // or new semantic equivalent\\n\'new\' → \'new\' // or new semantic equivalent\\n\'moved\' → \'moved\' // or new semantic equivalent\\n```\\n\\n**Note**: The current implementation preserves existing values. The mapping will be updated once the\\nnew semantic values are finalized.\\n\\n### Badge Appearance Value Mapping\\n\\nBadge components use the following appearance value mapping:\\n\\n| Old Appearance | New Appearance |\\n| ----------------- | -------------- |\\n| `added` | `success` |\\n| `removed` | `danger` |\\n| `default` | `neutral` |\\n| `primary` | `information` |\\n| `primaryInverted` | `inverse` |\\n| `important` | `danger` |\\n\\n## Auto-fixes\\n\\n- ✅ `isBold={false}` and missing `isBold` migration to `<Tag>` with preserved `appearance` prop\\n- ✅ Static Badge appearance prop values (e.g., `appearance=\\"added\\"` → `appearance=\\"success\\"`)\\n- ❌ Dynamic `isBold` expressions (warning only)\\n- ❌ Dynamic Badge appearance expressions (warning only - requires manual review)\\n"}',
|
|
75
75
|
ruleName: 'lozenge-isBold-and-lozenge-badge-appearance-migration',
|
|
@@ -10,7 +10,7 @@ var _planInputSchema = require("./plan-input-schema");
|
|
|
10
10
|
|
|
11
11
|
var listPlanTool = exports.listPlanTool = {
|
|
12
12
|
name: 'ads_plan',
|
|
13
|
-
description: "Runs **ads_search_tokens**, **ads_search_icons**, **ads_search_components**, and **
|
|
13
|
+
description: "Runs **ads_search_tokens**, **ads_search_icons**, **ads_search_components**, and optionally **atlaskit_search_components** in one call and returns a single JSON payload (each section only if that list was non-empty). Use this as the default way to discover ADS **tokens**, **icons**, and **components** for a UI task.\n\nWHEN TO USE:\n**Implementing or iterating on a UI**\u2014new screen, feature, or polish\u2014and you need candidate **token** names, **icon** imports, and **ADS component** packages/props in one pass. Also use when exploring ADS building blocks before you write code.\n\nADS-FIRST ROUTING:\nUse `components` for canonical ADS components. Use `atlaskitComponents` only as explicit fallback research for public `@atlaskit/*` packages outside the ADS catalog, or after ADS component search has no useful match. This tool does not auto-populate `atlaskitComponents` from `components`.\n\nAt least one of `tokens`, `icons`, `components`, or `atlaskitComponents` must contain search terms (use `[]` for lists you do not need).\n\nPrefer supplying **multiple** terms per non-empty array when you know them\u2014broader queries improve recall. Some queries return no rows where metadata is thin; try alternate wording.\n\nThis is equivalent to calling the individual search tools; there are no extra merge semantics beyond concatenating results.\n\nExample request:\n```json\n{\n\t\"tokens\": [\"spacing\", \"inverted text\", \"background primary\", \"animation\"],\n\t\"icons\": [\"search\", \"folder\", \"user\"],\n\t\"components\": [\"button\", \"input\", \"select\", \"heading\"],\n\t\"atlaskitComponents\": [\"editor-core\", \"onboarding\", \"page-layout\"]\n}\n```\n\nExample token usage:\n```tsx\nimport { token } from '@atlaskit/tokens';\nconst styles = css({ color: token('color.text'), padding: token('space.100') });\n```\n\nExample icon usage:\n```tsx\nimport AddIcon from '@atlaskit/icon/core/add';\n<AddIcon label=\"Add work item\" size=\"small\" />\n```",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Search ADS tokens, icons, and components to plan what to build',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -10,7 +10,7 @@ var _zod = require("zod");
|
|
|
10
10
|
var planInputSchema = exports.planInputSchema = _zod.z.object({
|
|
11
11
|
tokens: _zod.z.array(_zod.z.string()).describe('Search terms for ADS design tokens (fuzzy by default). Use `[]` if you only need icons or components. Prefer **at least two** terms per non-empty list when you know what you need.'),
|
|
12
12
|
icons: _zod.z.array(_zod.z.string()).describe('Search terms for ADS icons. Use `[]` if you only need tokens or components. Prefer **at least two** terms per non-empty list when known.'),
|
|
13
|
-
components: _zod.z.array(_zod.z.string()).describe('Search terms for ADS components. Use `[]` if you only need tokens or
|
|
14
|
-
atlaskitComponents: _zod.z.array(_zod.z.string()).describe('Search terms for
|
|
15
|
-
limit: _zod.z.number().default(2).describe('Max matches **per term** for each non-empty list (default 2). Same limit applies to tokens, icons,
|
|
13
|
+
components: _zod.z.array(_zod.z.string()).describe('Search terms for canonical ADS components. Use `[]` if you only need tokens, icons, or explicit Atlaskit fallback research. Prefer **at least two** terms per non-empty list when known.'),
|
|
14
|
+
atlaskitComponents: _zod.z.array(_zod.z.string()).describe('Search terms for public `@atlaskit/*` components outside the ADS catalog. Use only as explicit fallback research when ADS component search is not enough; this is not auto-populated from `components`. Use `[]` if you only need canonical ADS components. Prefer **at least two** terms per non-empty list when known.'),
|
|
15
|
+
limit: _zod.z.number().default(2).describe('Max matches **per term** for each non-empty list (default 2). Same limit applies to tokens, icons, ADS components, and explicit Atlaskit component fallback searches.').optional()
|
|
16
16
|
});
|
|
@@ -29,7 +29,7 @@ var planTool = exports.planTool = /*#__PURE__*/function () {
|
|
|
29
29
|
isError: true,
|
|
30
30
|
content: [{
|
|
31
31
|
type: 'text',
|
|
32
|
-
text: 'Error: At least one search type (
|
|
32
|
+
text: 'Error: At least one search type (tokens, icons, components, or atlaskitComponents) must be provided with search terms'
|
|
33
33
|
}]
|
|
34
34
|
});
|
|
35
35
|
case 1:
|
|
@@ -10,7 +10,7 @@ var _searchAtlaskitComponentsInputSchema = require("./search-atlaskit-components
|
|
|
10
10
|
|
|
11
11
|
var listSearchAtlaskitComponentsTool = exports.listSearchAtlaskitComponentsTool = {
|
|
12
12
|
name: 'atlaskit_search_components',
|
|
13
|
-
description: "Searches the bundled
|
|
13
|
+
description: "Searches the bundled public `@atlaskit/*` component catalog outside the Atlassian Design System (ADS) component catalog. Returns JSON objects with **name**, **package**, **examples**, and **props** for each match (trimmed payload).\n\nWHEN TO USE:\nUse this for fallback research when `ads_search_components` or `ads_plan.components` does not find a useful ADS component, or when the user asks about a specific public `@atlaskit/*` package that is not part of ADS. Prefer canonical ADS components first for standard UI.",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Search Atlaskit components',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -10,7 +10,7 @@ var _searchAtlaskitHooksInputSchema = require("./search-atlaskit-hooks-input-sch
|
|
|
10
10
|
|
|
11
11
|
var listSearchAtlaskitHooksTool = exports.listSearchAtlaskitHooksTool = {
|
|
12
12
|
name: 'atlaskit_search_hooks',
|
|
13
|
-
description: "Search
|
|
13
|
+
description: "Search public `@atlaskit/*` hooks outside the Atlassian Design System (ADS) catalog by name, package, category, description, or keywords.\n\nWHEN TO USE:\nUse this for fallback research when you want to find a non-ADS `@atlaskit/*` hook but do not know its exact name or package.",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Search Atlaskit hooks',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -10,7 +10,7 @@ var _searchAtlaskitUtilitiesInputSchema = require("./search-atlaskit-utilities-i
|
|
|
10
10
|
|
|
11
11
|
var listSearchAtlaskitUtilitiesTool = exports.listSearchAtlaskitUtilitiesTool = {
|
|
12
12
|
name: 'atlaskit_search_utilities',
|
|
13
|
-
description: "Search
|
|
13
|
+
description: "Search public `@atlaskit/*` utilities (functions, constants, types) outside the Atlassian Design System (ADS) catalog by name, package, category, description, or keywords.\n\nWHEN TO USE:\nUse this for fallback research when you want to find a non-ADS `@atlaskit/*` utility but do not know its exact name or package.",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Search Atlaskit utilities',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -10,7 +10,7 @@ var _searchComponentsInputSchema = require("./search-components-input-schema");
|
|
|
10
10
|
|
|
11
11
|
var listSearchComponentsTool = exports.listSearchComponentsTool = {
|
|
12
12
|
name: 'ads_search_components',
|
|
13
|
-
description: "Searches the bundled Atlassian Design System (ADS) component catalog. Returns JSON objects with **name**, **package**, **examples**, and **props** for each match (trimmed payload).\n\nWHEN TO USE:\n**Selecting which ADS component to use**\u2014package name, examples, and props\u2014before implementation. Use when composing a new view or swapping a primitive. Prefer `ads_plan` when you also need token and icon discovery in one shot.",
|
|
13
|
+
description: "Searches the bundled Atlassian Design System (ADS) component catalog. Returns JSON objects with **name**, **package**, **examples**, and **props** for each match (trimmed payload).\n\nWHEN TO USE:\n**Selecting which canonical ADS component to use**\u2014package name, examples, and props\u2014before implementation. Use when composing a new view or swapping a primitive. Prefer `ads_plan` when you also need token and icon discovery in one shot.\n\nIf you are looking for a public `@atlaskit/*` scoped package that is not part of the ADS component catalog, use `atlaskit_search_components` for fallback research instead of this ADS-only search.",
|
|
14
14
|
annotations: {
|
|
15
15
|
title: 'Search ADS components',
|
|
16
16
|
readOnlyHint: true,
|
|
@@ -93,7 +93,7 @@ var searchComponentsTool = exports.searchComponentsTool = /*#__PURE__*/function
|
|
|
93
93
|
return _context.abrupt("return", {
|
|
94
94
|
content: [{
|
|
95
95
|
type: 'text',
|
|
96
|
-
text: "Error: No components found for '".concat(terms.join(', '), "'. Available components: ").concat(components.map(function (c) {
|
|
96
|
+
text: "Error: No ADS components found for '".concat(terms.join(', '), "'. If this is a public @atlaskit/* package outside the ADS catalog, call atlaskit_search_components with the same terms. Available ADS components: ").concat(components.map(function (c) {
|
|
97
97
|
return c.name;
|
|
98
98
|
}).join(', '))
|
|
99
99
|
}]
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export const instructions = `
|
|
2
2
|
You are an expert in the Atlassian Design System (ADS).
|
|
3
3
|
You can search for tokens, icons, and components and return guidance on how to build user interfaces.
|
|
4
|
+
Use ads_* tools for canonical ADS resources: components, tokens, icons, foundations, accessibility, lint rules, i18n, and migrations.
|
|
5
|
+
Use atlaskit_* tools only for further research into public @atlaskit/* scoped packages that are not covered by the ADS catalog, such as non-ADS components, hooks, and utilities. Prefer ADS resources first for standard UI.
|
|
4
6
|
You have special accessibility knowledge and can ensure interfaces built with ADS components are accessible to all users.
|
|
5
7
|
You can analyze code for accessibility violations, provide specific fix suggestions, and offer guidance on accessibility best practices.
|
|
6
8
|
For org-wide standards alongside ADS tools: pair Context Engine \`get_accessibility_docs\` with \`ads_get_a11y_guidelines\`, \`get_content_standards_docs\` with \`ads_get_guidelines\`, and \`get_i18n_docs\` with \`ads_i18n_conversion_guide\` (Traduki/i18n policy plus the bundled formatMessage refactor guide).
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
import { zodToJsonSchema } from '../../helpers/zod-to-json-schema';
|
|
5
5
|
export const listGetAllComponentsTool = {
|
|
6
6
|
name: 'ads_get_all_components',
|
|
7
|
-
description: `Returns **every** Atlassian Design System component record as separate JSON text chunks (full catalog; large payload).
|
|
7
|
+
description: `Returns **every** canonical Atlassian Design System (ADS) component record as separate JSON text chunks (full catalog; large payload). For non-ADS public \`@atlaskit/*\` packages, use \`atlaskit_get_components\` or \`atlaskit_search_components\`.
|
|
8
8
|
|
|
9
9
|
WHEN TO USE:
|
|
10
10
|
Last resort when \`ads_plan\` / \`ads_search_components\` is insufficient and you must enumerate all components. Prefer search for normal component picking.
|