# AGENTS.md ## Overview Custom Drupal 10 theme for Kindred Spaces (`kspaces2.islandarchives.ca`), derived from Drupal core's Olivero. ## Toolchain & Workflow Gotchas - **Direct Asset Editing**: Edit `.css` files in `css/` and `.js` files in `js/` directly. Do **not** run `yarn build` or `yarn build:css`/`watch`; `package.json` contains leftover Olivero scripts referencing a missing `scripts/` directory. - **Local Dev Proxy**: Run `node bs.js` to start BrowserSync proxying `https://kspaces2.islandarchives.ca`. - **Deployment**: `./deploy.sh ""` automatically runs `git add --all`, commits, pushes, and executes remote `git pull` + `drush cr` on `kspaces2.islandarchives.ca`. ## Verification Commands - **PHP Syntax Check**: `php -l oliveskspaces.theme && find . -not -path "*/node_modules/*" -name "*.php" -exec php -l {} \;` - **PHP Code Style**: `php-cs-fixer fix --dry-run --diff .` (omit `--dry-run` to auto-fix). ## Codebase Architecture - `oliveskspaces.info.yml`: Drupal 10 theme definition, region layouts, library overrides/extends. - `oliveskspaces.libraries.yml`: CSS/JS asset bundle declarations (`global-styling`, `navigation-primary`, `color-picker`, etc.). - `oliveskspaces.theme`: Main PHP theme file containing preprocess hooks (`html`, `block`, `mirador`), dynamic HSL primary color variable setting, and Islandora collection/model class alterations. - `theme-settings.php`: Theme configuration form alters (color scheme options & mobile menu settings). - `src/OliveskspacesPreRender.php`: Trusted `#pre_render` callbacks (`textFormat`, `messagePlaceholder`). - `templates/`: Twig overrides for blocks, navigation, menus, forms, and views.