feat: context harvester - Composer plugin + progressive disclosure artifacts

Adds a Composer plugin (type: composer-plugin) that hooks into post-install-cmd and post-update-cmd to harvest project-specific context from any Drupal project that requires drupal/ai_best_practices.

Generated artifacts (docs/ai/):

  • PROJECT.md — L1, always-load: stack, DDEV URL, inventory
  • PROJECT_MODULES.md — L2: custom module descriptions
  • PROJECT_SERVICES.md — L2: services.yml index
  • PROJECT_HOOKS.md — L2: hook_* implementations
  • PROJECT_ENTITIES.md — L2: entity bundles from config/sync

AGENTS.md injection is idempotent (marker comments). cleanup() removes artifacts when the package is uninstalled.

Safety: all entry points catch Throwable and never re-throw, so composer install/update/require/remove always exit 0.

Adds evals/drupal-context-harvester/ with 15 static checks and 5 behavioral evals (including php-lint assertions). Extends run-evals.py with file_contains check type.

Merge request reports

Loading