task: #3608437 Initialize the AI Figma module scaffold.

What

Adds the initial 1.0.x scaffold for the AI Figma module (currently an empty repository except for the README.md / .gitignore seed commit on 1.0.x).

The module reads live Figma design context via the Figma REST API and exposes that context as AI Agent tools, so the Drupal Canvas AI assistant can build Canvas pages using the active theme's own Single Directory Components (SDCs) instead of generic or mocked markup. It is config-driven (Figma personal access token, file keys, and node references held in configuration, never hardcoded) and theme-agnostic (discovers whatever components the active theme ships).

Why

Issue: https://www.drupal.org/project/ai_figma/issues/3608437 — "Initialize AI Figma Module". Before any functionality can be reviewed or released, an initial 1.0.x codebase needs to be committed.

File inventory

  • ai_figma.info.yml, ai_figma.install, ai_figma.routing.yml, ai_figma.services.yml, ai_figma.links.menu.yml, ai_figma.permissions.yml — module scaffold
  • composer.json — package metadata
  • config/install/ai_figma.settings.yml, config/schema/ai_figma.schema.yml — config-driven Figma API settings
  • src/FigmaContextClient.php — service that talks to the Figma REST API and returns live design context
  • src/Plugin/AiFunctionCall/FigmaListDesignPages.php — first AI Agent Function Call plugin exposing that context to the Drupal Canvas AI assistant
  • src/Form/SettingsForm.php — admin settings form for the Figma token/file configuration
  • src/AiFigmaInstaller.php — install-time helper
  • tests/features/*.feature, tests/selectors/*.json, tests/step-definitions/ai_figma.steps.js, cucumber.js, playwright.config.ts, tsconfig.json, package.json — Cucumber/BDD (webship-js) test suite
  • tests/src/Unit/FigmaUrlParseTest.php, tests/src/Kernel/InstallTest.php — PHPUnit Unit/Kernel tests
  • .cspell.json, .eslintrc.json, .eslintignore — JS/spelling lint config
  • .github/workflows/test.yml — CI workflow (GitHub mirror)

Note for reviewers: CLAUDE.md (an AI-agent developer-context doc) is included in this scaffold. Maintainers may prefer to drop it from the module payload (e.g. move it out of the packaged release, or exclude via .gitattributes/rsync excludes) — flagging this explicitly in case it's not wanted in the reviewed/released codebase.

AI-assistance disclosure

Per the Drupal policy on the use of AI: Claude Code (Anthropic) was used to scaffold this module's info/routing/services/permissions/menu YAML, config schema, the FigmaContextClient service, the FigmaListDesignPages AI Agent Function Call plugin, SettingsForm, AiFigmaInstaller, composer.json, and the PHPUnit Kernel/Unit + Cucumber/BDD test suite. All AI-generated code will be reviewed by a human maintainer before this MR is merged.

Checkpoints

  • File an issue about this project
  • Addition/Change/Update/Fix to this project
  • Testing to ensure no regression
  • Automated unit/functional testing coverage
  • Developer Documentation support on feature change/addition
  • User Guide Documentation support on feature change/addition
  • UX/UI designer responsibilities
  • Accessibility and Readability
  • Reviewed by a human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Update Release Notes
  • Release
Edited by Rajab Natshah

Merge request reports

Loading