Skip to content

Conversation

@theodorosploumis
Copy link
Owner

Summary

  • add AI-focused guidance files, rules, and command triggers aligned to Drupal 10+ site-building and theming best practices
  • provide validation scripts to check section 2 and section 3 conventions using drush
  • document AI resources and contribution expectations in the new ai folder

Testing

  • not run (not requested)

Codex Task

Copy link

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

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.

ℹ️ 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 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 address that feedback".

Comment on lines +31 to +34
check_twig() {
echo "[CHECK] 3 Theming: preprocess coverage and template organization"
run_drush "ev 'print json_encode(array_keys(\\Drupal\\theme_handler\\ThemeHandler::defaultThemeList()));'" \
| jq 'keys[]' >/dev/null

Choose a reason for hiding this comment

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

P1 Badge Use existing ThemeHandler namespace in twig check

The twig validation runs drush ev against \Drupal\theme_handler\ThemeHandler::defaultThemeList(), but Drupal core exposes the theme handler as \Drupal\Core\Extension\ThemeHandler (usually accessed via the theme_handler service) and there is no \Drupal\theme_handler\ThemeHandler class. As written, drush ev will fatally error with “Class … not found” whenever the twig check (or all) is executed, stopping the script before any theming validation runs.

Useful? React with 👍 / 👎.

Comment on lines +37 to +40
check_assets() {
echo "[CHECK] 3 Theming: browser support and utility-first frameworks used selectively"
run_drush "ev 'print json_encode(\\Drupal\\core\\Asset\\LibraryDiscovery::getInfo());'" \
| jq 'keys[]' >/dev/null

Choose a reason for hiding this comment

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

P1 Badge Fix LibraryDiscovery namespace casing in assets check

The assets check calls \Drupal\core\Asset\LibraryDiscovery::getInfo(), but the class lives under \Drupal\Core\Asset\LibraryDiscovery. Because Composer’s PSR‑4 autoloader is case sensitive, the lowercase core prefix will not resolve on a typical Linux install, causing drush ev to throw a class-not-found error and abort the script whenever the assets check runs.

Useful? React with 👍 / 👎.

Comment on lines +58 to +60
check_forms() {
echo "[CHECK] 2.7 Forms: prefer Webform over core Contact for complex needs"
run_drush "pm:list webform" >/dev/null

Choose a reason for hiding this comment

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

P1 Badge Avoid unsupported argument to pm:list in forms check

The forms validation uses drush pm:list webform, but pm:list (pml) does not take module names as positional arguments—it only accepts options like --type or --status. Passing webform causes Drush to exit with a “too many arguments” error, and with set -e the entire site-building validation halts whenever the forms check (or all) is selected.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants