Repository navigation
Let AI agents ask Ipsum how it's designed using the abilities API - #182
Conversation
mikachan
left a comment
There was a problem hiding this comment.
Nice, these colour descriptions read well. All of the roles describe how a colour relates to the rest of the palette rather than whether it's light or dark.
I've left some other inline comments. Most of them are about giving agents a bit more detail in the role descriptions, as some of the colours behave differently from what their slugs suggest. I've mostly looked at the design side of this rather than the PHP.
Register a read-only ipsum/get-design-guide ability with the Abilities API. It reads the active palette with each color's role, the type and spacing scales, style variations, block styles, patterns, templates and template parts live from the site, so an agent working through the API learns how Ipsum is meant to be used. Part of #75. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3ccca2f to
f25903c
Compare
|
@mikachan do you think the name of the colors should change to reflect more what they actually are for? |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
You mean Base, Contrast, Accent, etc? I don't think so, as if we keep the names like this, it makes carrying over colours easier when switching themes. I'm also personally a fan of this naming structure, but that's just my opinion. Were you thinking we should update the names too? |
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
no, it's because you said
|
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
|
Ah sorry, no I think it's fine to keep the slugs and names as they are. |
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
Ipsum registers a read-only `ipsum/get-design-guide` ability with the Abilities API. It returns the theme's colors and what each one is for, its fonts, sizes and spacing, its style variations, and its patterns and templates, so agents building pages can follow the design without seeing the theme's files. Synced from WordPress/ipsum#182. See #66352. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Description
Part of #75. It builds on #179, so it merges after it.
AI agents that build pages on a site usually can't see the theme's files, so they guess how it's meant to look. Now they can ask Ipsum directly and get its colors and what each one is for, its fonts, sizes and spacing, its style variations, and its patterns and templates.
Most of that is read from the theme as it is. The part worth a design review is the wording Ipsum adds itself. First, what each color is for:
Then three short guidelines:
Testing Instructions
await wp.apiFetch( { path: '/wp-abilities/v1/abilities/ipsum/get-design-guide/run' } ).colors, each color has the description above.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: The code, testing it, and this description.
🤖 Generated with Claude Code