Problem/Motivation

Designers work in Penpot, but there is no way for the Drupal Canvas AI assistant to read a Penpot design. AI Penpot is the Penpot counterpart of AI Figma: it reads live Penpot design context (colours, typography, verbatim text and a shape outline) via the Penpot RPC API from server-side PHP and exposes it as AI Agent tools, so an author can paste a Penpot link and have the Drupal Canvas AI assistant build from the real design. Config-driven, theme- and framework-agnostic.

Steps to reproduce

Fresh project — no module code exists yet (the 1.0.x branch contains only a README).

Proposed resolution

Add the base module:

  • PenpotContextClient — Penpot RPC client (Authorization: Token access token from the Key module, SSRF-guarded base URL, Penpot URL parsing, get-file / get-page, design-token summary).
  • Settings form at /admin/config/ai/penpot (instance URL, token Key, default file id, Test connection) + install hook provisioning an encrypted penpot Key.
  • Two AI Agent tools: ai_penpot:list_design_pages and ai_penpot:design_context.
  • Editable AI guidance seeded as AI Context items.

Remaining tasks

  • ✅ Base connection module (client + settings + Key)
  • ✅ AI Agent read tools (list pages, read design context)
  • ✅ Verified end-to-end with Drupal Canvas AI (paste a Penpot link → reads the design)
  • ❌ Reviewed by a human

User interface changes

New admin settings form at /admin/config/ai/penpot (Configuration → AI → AI Penpot).

API changes

None (new module).

Data model changes

None. Adds a penpot Key entity and the module configuration.

Release notes snippet

Initial release of AI Penpot: read Penpot design context into the Drupal Canvas AI assistant via AI Agent tools.

Issue fork ai_penpot-3611165

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Version: » 1.0.x-dev
Issue summary: View changes

  • rajab natshah committed d5ac2cef on 1.0.x
    docs: #3611165 Add module documentation (MkDocs) and GitLab Pages
    

  • rajab natshah committed 004925d8 on 1.0.x
    test: #3611165 Add PHPUnit unit tests + more webship-js coverage; Penpot...
rajab natshah’s picture

Status: Active » Fixed
Issue tags: +ai_penpot-1.0.0-alpha1

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.