Skip to content

RG-2788 Add Ring UI consumption skill - #9366

Open
Andrey Skladchikov (andrey-skl) wants to merge 1 commit into
masterfrom
askl/usage-skill-pr
Open

Andrey Skladchikov (andrey-skl) wants to merge 1 commit into
masterfrom
askl/usage-skill-pr

Conversation

@andrey-skl

Copy link
Copy Markdown
Collaborator

Summary

  • Add a package-local Ring UI Skill with focused page-layout and form/feedback references.
  • Publish it in both @jetbrains/ring-ui and @jetbrains/ring-ui-built.
  • Verify the Skill files during package publication.

Benchmark methodology

We use a repeatable clean-room benchmark: a CLI agent receives a fresh Vite React/TypeScript app and may inspect only the installed Ring UI package. It must compose a complete project-settings page with navigation, form states, theming, accessibility, and responsive behavior. The frozen result is built and verified at 1280×800 and 390×844, with interactions and screenshots recorded.

Result

Against 7.0.122, the benchmark remains all-pass, while package consumption improves: the agent discovers the Skill directly and follows the intended semantic layout, token, responsive, typed Select, and saved/draft-state patterns instead of inferring them from declarations.

Validation

  • npm run verify-package-skills
  • npm run lint:js -- scripts/verify-package-skills.mjs scripts/prepare-built-package.js
  • @jetbrains/ring-ui-built@7.0.123-beta.0 benchmark: build, wide, narrow, and interactions pass

RG-2788

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a package-local “Ring UI consumption” Skill (plus reference docs) intended to improve agent-driven consumption of @jetbrains/ring-ui-built, and ensures the Skill is published and validated as part of package publication.

Changes:

  • Added skills/ring-ui Skill definition and two reference documents (page layouts + forms/feedback).
  • Ensured skills/ is included in both @jetbrains/ring-ui and @jetbrains/ring-ui-built published file sets.
  • Added scripts/verify-package-skills.mjs and wired it into prepublishOnly to validate the packed artifact includes the Skill files.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
skills/ring-ui/SKILL.md Adds the Ring UI Skill entrypoint and high-level usage rules for agents.
skills/ring-ui/references/page-layouts.md Provides page shell/layout, responsiveness, and theming/accessibility guidance.
skills/ring-ui/references/forms-and-feedback.md Provides controlled form + feedback/state patterns and accessibility guidance.
scripts/verify-package-skills.mjs Adds a publish-time check to ensure Skill files are included in npm pack.
scripts/prepare-built-package.js Updates built-package publication file list to include skills/.
README.md Documents that Skill guidance is included in the published npm artifacts.
package.json Publishes skills/ and adds/verifies the Skill-file validation script during prepublish.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +13 to +19
const jsonStart = output.search(/^\[\r?$/m);

if (jsonStart === -1) {
throw new Error('npm pack output does not contain a top-level JSON array');
}

const [packResult] = JSON.parse(output.slice(jsonStart));

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 80aa8389dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

if (option) updateDraft({...draft, visibility: option.value});
}}
/>
<p className={styles.help}>Controls who can discover and open this project.</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Associate the Select help text with its control

When a screen-reader user focuses the visibility Select in this complete reference example, the explanatory text is not announced because this <p> has no ID and the Select receives no aria-describedby. This also contradicts the document's form-state rule to connect help and error IDs; give the help text a stable ID and pass it to the control so consumers copying the example retain the intended context.

Useful? React with 👍 / 👎.

const NOTIFICATIONS_ID = 'project-settings-notifications';

export function ProjectSettingsForm({initialValue, onSave}: ProjectSettingsFormProps) {
const [saved, setSaved] = useState(initialValue);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm a little bit sceptical if we need to add the example with the vanilla React form handling.
The problem is that the user may want to use some other library for more complex cases. Maybe even we can have at least mention it.
Also, there is a new hook https://react.dev/reference/react-dom/hooks/useFormStatus, maybe use it?

Comment thread README.md

## Guidance for coding agents

The npm packages include [`skills/ring-ui/SKILL.md`](./skills/ring-ui/SKILL.md), which teaches coding agents to consume Ring UI through `@jetbrains/ring-ui-built` when composing complete pages, responsive layouts, forms, themes, and feedback. The same Skill files are published in both npm artifacts.

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.

But those using @jetbrains/ring-ui don't have @jetbrains/ring-ui-built, do they?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants