Skip to content

chore: move to skills only for LLMs [AR-55502]#495

Open
mmurawski-dn wants to merge 6 commits into
drivenets:mainfrom
mmurawski-dn:drivenets/michal/AR-55502-llm-docs-improvement
Open

chore: move to skills only for LLMs [AR-55502]#495
mmurawski-dn wants to merge 6 commits into
drivenets:mainfrom
mmurawski-dn:drivenets/michal/AR-55502-llm-docs-improvement

Conversation

@mmurawski-dn
Copy link
Copy Markdown
Collaborator

No description provided.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for drivenets-design-system ready!

Name Link
🔨 Latest commit c7787e4
🔍 Latest deploy log https://app.netlify.com/projects/drivenets-design-system/deploys/6a183a8d1a78ce000868d4d6
😎 Deploy Preview https://deploy-preview-495--drivenets-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added documentation Improvements or additions to documentation cursor PR that changes cursor rules, skills, etc. labels May 22, 2026
@mmurawski-dn mmurawski-dn force-pushed the drivenets/michal/AR-55502-llm-docs-improvement branch 3 times, most recently from 8b0fc60 to 6274c45 Compare May 22, 2026 13:29
@mmurawski-dn mmurawski-dn changed the title save chore: move to skills only for LLMs [AR-55502] May 22, 2026
@mmurawski-dn mmurawski-dn force-pushed the drivenets/michal/AR-55502-llm-docs-improvement branch 2 times, most recently from 800aeac to 70f70b9 Compare May 22, 2026 13:59
@mmurawski-dn mmurawski-dn marked this pull request as ready for review May 22, 2026 13:59
@mmurawski-dn mmurawski-dn force-pushed the drivenets/michal/AR-55502-llm-docs-improvement branch 2 times, most recently from 61c7255 to 3c0a755 Compare May 22, 2026 14:10
@iromanchuk-dn iromanchuk-dn self-requested a review May 22, 2026 14:31
Comment thread docs/adr/0001-primitive-stack.md
Comment thread AGENTS.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the AGENTS.md & CONTEXT.md have to be at the top-level?
and isn't it a duplication of the readme?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be best. The root is the source/entry point of the whole map of skills for every LLM

Probably we will reduce the readme, as to reduce the noise 💯

@github-actions github-actions Bot added the ci label May 26, 2026
Comment thread .github/CODEOWNERS Outdated
StyleShit
StyleShit previously approved these changes May 27, 2026
Comment thread .agents/skills/code-review/SKILL.md Outdated
- [ ] Matches Figma design
- [ ] Storybook examples show all states (controlled + localized)
- [ ] No cross-component internal imports
- [ ] No unnecessary `useMemo`/`useCallback`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DsTable is the exclusion

Comment on lines +36 to +37
value?: string | null;
onValueChange?: (value: string | null) => void;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All props should have JSdocs, except maybe ref, className, style

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually we follow a "common sense". If the prop is not so straightforward then we add the JSDocs, that's my impression. I will add this rule and we will see how it goes 👍

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this skill? It's a general guidance, it doesn't have anything domain specific. In Cursor you can chose Debug option and achieve better result

Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets some praise from the devs using https://www.aihero.dev/ guidance. It can be worth adding and experimenting. The idea is, you try new skills/plugins when another one fails to debug,

If we end up not using it at all, we can remove it 💯

achieve better result How can you know without using it?

Comment on lines 34 to 41
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is a lie here. I think the whole skill is heavily outdated and misleading.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I was updating this skill with the annotation to the root_new 🤔 Good catch and I will verify other figma related skills 👍

Comment on lines 24 to 28
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure Figma MCP server instructios already provide this info.

Copy link
Copy Markdown
Collaborator Author

@mmurawski-dn mmurawski-dn May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On paper if you provide direct MCP methods the LLM does not need to scrap the whole MCP and look for a proper method, tokens saving which is crucial for keeping the context for MCPs as small as possible

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the whole skill is heavily outdated and misleading. I would remove everything and write that Figma may use outdated tokens, components and do not use DS component's where they should have been used. This information can live in this skill or you can add it to a different place, I don't mind. But this skill as it is no - harms more than helps.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only tokens reference is outdated, right? The rest is what we do (naming conventions, pointing LLM to a proper MCP methods, API conventions matching figma props).

"that Figma may use outdated tokens, components and do not use" I know we are aware this can happen in the DAP, but in the DS it's a no-no, right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this file? The skill is described in SKILL.md.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skill is one thing, this is the format file which tells LLM to follow the proper format, copied one to one from the https://www.aihero.dev/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this file? The skill is described in SKILL.md.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skill is one thing, this is the format file which tells LLM to follow the proper format, copied one to one from the https://www.aihero.dev/

Comment thread .agents/skills/pr-prep/SKILL.md Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? I remember we had problems with vi time mocks and we had to use mockdate, didn't we?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aa! It probably works since we have browser tests, si?

Comment thread .agents/skills/pr-prep/SKILL.md Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is specific to a single use case we had in the past. It doesn't make sense to keep this instruction in the skill.

Comment thread .agents/skills/react-patterns/SKILL.md Outdated
Comment on lines +12 to +25
| Requirement | Details |
| ------------------------------------------ | -------------------------------------- |
| **No unnecessary `useMemo`/`useCallback`** | React Compiler handles most cases |
| **Justify memoization** | Only when profiling shows real benefit |

```typescript
// Bad
const filteredItems = useMemo(() => items.filter((i) => i.active), [items]);
const handleClick = useCallback(() => onChange(value), [onChange, value]);

// Good
const filteredItems = items.filter((i) => i.active);
const handleClick = () => onChange(value);
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except DsTable, because we excluded it from React Compiler

Comment on lines +35 to +42
```typescript
// Bad
const [local, setLocal] = useState(prop);
useEffect(() => setLocal(prop), [prop]);

// Good
const value = isControlled ? externalValue : internalValue;
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We useControlled hook now, let's recommend it here instead


| Requirement | Details |
| ------------------------------------- | -------------------------------------------- |
| **Don't spread native objects** | `{...file}` loses `File` prototype |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate and again it's a single use case scenario, we don't need it here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand, we will work with files 100% in the future so it will definitely be useful but not all the time 🤔

Comment thread .agents/skills/react-patterns/SKILL.md Outdated
Comment on lines +73 to +75
```tsx
const copy = new File([originalFile], originalFile.name, { type: originalFile.type });
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come it is a common pitfall? In how many components we deal with File?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the only example we have in the repo, so it's a native file pitfall, not common one

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The benefits from this skill are questionable, almost no usefull info

Copy link
Copy Markdown
Collaborator Author

@mmurawski-dn mmurawski-dn May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that? What specifically is not useful? For me most of the things are common and straightforward patterns we use in the repo

Comment thread .agents/skills/scss/SKILL.md Outdated
| **No `!important`** | Refactor selectors instead |
| **Transitions** | `0.2s` standard |
| **Component-scoped variables** | In component file |
| **Avoid `overflow: hidden` band-aid** | Fix root layout cause |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange rule, to abstract, even I have no idea what it s about

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was mentioned in the past code reviews a few times

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integrate Storybook MCP best practises into this skill.
https://storybook.js.org/docs/ai/best-practices

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see use case for this skill.

Copy link
Copy Markdown
Collaborator Author

@mmurawski-dn mmurawski-dn May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you can play with it. You start with discussing the issue/feature in the agent mode with /grill-me or /grill-with-docs (to keep the new context in the repo) and after final conclusion you run /to-plan in plan mode. That way you will create a brand new file with all the instructions which you use in the brand new context window (agents enter the dumb zone around 100-120k tokens per session)

Comment on lines +10 to +30
## Types and exports

| Requirement | Details |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **No redundant JSDoc** | Don't restate prop name or type; skip `@interface` / `@type` |
| **Descriptive prop JSDoc** | Non-trivial props in `*.types.ts` for AI manifest; `@default` when helpful. Reference: `DsTextInput` |
| **Full type references** | Import named types |
| **Export from `.types.ts`** | Dedicated type files for components |
| **Export variant arrays** | `as const` for Storybook `argTypes.options` — see [component-api](../component-api/SKILL.md) |
| **`Object.freeze` config exports** | Prevent mutation on mapping objects |

```typescript
export const loaderVariants = ['spinner', 'pulsing'] as const;
export type LoaderVariant = (typeof loaderVariants)[number];

export const circleSizeMap: Record<AvatarSize, number> = Object.freeze({
small: 24,
medium: 32,
large: 48,
});
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move all that to skills related to component development. It's not general Typescript rules

Comment on lines +34 to +39
| Requirement | Details |
| ------------------------------ | --------------------------------- |
| **Let code breathe** | Whitespace between logical chunks |
| **Name magic numbers** | Descriptive constants |
| **Early returns** | Simplify conditionals |
| **No cross-component imports** | Extract shared logic to utils |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this falls into general TS best practises, I think LLM is trained to behave like this

Copy link
Copy Markdown
Collaborator Author

@mmurawski-dn mmurawski-dn May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assume nothing in the LLM world 💯 😄 it's trained on everything, it does not understand what's good or bad in any way

Comment thread .cursor/agents/ds-review.md Outdated
Comment on lines +16 to +24
## Focus areas

- Cross-component internal imports (`../ds-other/...` utilities)
- Props layer exposes library internals; missing `className` / `style` / `ref`
- SCSS: hardcoded colors/spacing, `!important`, `overflow: hidden` band-aids
- Stories: inline styles, missing controlled/localized stories, leftover `play`
- Browser tests: `getByTestId` without reason, `toBeVisible()`-only tests, no behavior assertion
- `useMemo`/`useCallback` without justification
- Raw `<img>` instead of DS image components
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we repeat staff mentioned in skills?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, same issue as always when working with many files with agents. It reverted the old version while making changes in another files. This skill was calling another skills with explanation. I will fix that 👍

Comment thread README.md Outdated

7. All green → push and open PR
```
Add to `.cursor/mcp.json` (project) or your client’s global MCP config. Local dev: `pnpm --filter @drivenets/ds-storybook-mcp dev`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drivenets/design-system-mcp

Comment thread README.md Outdated
- [docs/adr/](docs/adr/) — load-bearing decisions agents must not contradict (primitive stack, props layer, interaction testing, doc layout)

Auto-applied contextual guidance for the AI agent.
#### Storybook MCP (`@drivenets/ds-storybook-mcp`)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drivenets/design-system-mcp

Comment thread README.md Outdated
"drivenets-ds": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@drivenets/ds-storybook-mcp"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drivenets/design-system-mcp

Copy link
Copy Markdown
Collaborator

@iromanchuk-dn iromanchuk-dn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great staff! I've left some comments

@mmurawski-dn mmurawski-dn force-pushed the drivenets/michal/AR-55502-llm-docs-improvement branch from 96cf73a to c7787e4 Compare May 28, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci cursor PR that changes cursor rules, skills, etc. documentation Improvements or additions to documentation skip changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants