Skip to content

Conversation

@victoreronmosele
Copy link
Contributor

@victoreronmosele victoreronmosele commented Nov 14, 2025

Description

This PR adds descriptions to the schemas of the catalog items.

The descriptions are copied from the doc comments of the catalog item variables.

Fixes #554

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-devrel channel on Discord.


final _schema = S.object(
description: '''
A catalog item representing a Material Design elevated button.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you remove all references to Material Design from this? The idea is that the LLM just needs to know about the API for the components and their functional role, rather than the specifics of their implementation.

A catalog item representing a layout widget that displays its children in a
vertical array.
This widget is analogous to Flutter's [Column] widget. It arranges a list of
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same here - no need to mention Flutter, because the use of Flutter is an implementation detail that the LLM does not need to know about. I think you could just remove the second line here, and perhaps in some of the others too, though I do think the extra info is helpful in some cases e.g. checkbox above, where it explains the data binding relationship.

A catalog item representing a text heading.
Headings are used to title sections of content. The visual appearance is
determined by the `level` parameter, which maps to standard [TextTheme]
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to mention TextTheme. The heading levels are a generic concept, common to HTML, Flutter, Markdown etc.

@jacobsimionato
Copy link
Collaborator

Thank you so much for this PR, Victor!!!

@victoreronmosele
Copy link
Contributor Author

Thanks for the feedback @jacobsimionato. Will attend to it soon.

@victoreronmosele victoreronmosele force-pushed the add-description-catalog-items branch from fb0f807 to f184ff5 Compare November 20, 2025 12:13
@victoreronmosele victoreronmosele marked this pull request as draft November 20, 2025 12:15
@victoreronmosele victoreronmosele force-pushed the add-description-catalog-items branch from f184ff5 to 34238ba Compare November 20, 2025 12:38
@victoreronmosele victoreronmosele marked this pull request as ready for review November 20, 2025 12:39
@victoreronmosele
Copy link
Contributor Author

I've updated the descriptions @jacobsimionato.

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.

Add descriptions to schemas for all catalog items to improve generation quality

2 participants