Skip to content

Contributing

The AI Context module is a community project. Contributions are welcome.

For the quick-reference guide, see CONTRIBUTING.md in the module root.

Getting started

  1. Check the issue queue for existing issues or feature requests
  2. Create a new issue if one doesn't exist for your contribution
  3. Fork the repository and create a merge request

Contribution process

This project follows the standard Drupal contribution process:

  1. Create an issue in the project issue queue
  2. Create a merge request referencing the issue
  3. Ensure all quality checks pass -- see Code quality for the full list of tools
  4. Ensure tests pass -- see Testing
  5. Request a review from a maintainer

Coding standards

All code must adhere to Drupal coding standards. Code that fails Drupal Coder sniffs will not be accepted.

Documentation

Documentation lives in the docs/ directory and is built with MkDocs. When adding features, update the relevant documentation pages.

AI agent coding standards skill

The drupal-coding-standards-skill provides AI agents with Drupal's official coding standards, enabling them to review and write code that follows Drupal conventions.

  1. Set minimum stability in your dev project's composer.json:

json "minimum-stability": "dev"

  1. Require the Surge package:

bash ddev composer require drupal/surge --dev

Answer yes to all questions during installation.

  1. Require the coding standards skill:

bash ddev composer require ronaldtebrake/drupal-coding-standards-skill --dev

  1. Uncomment the relevant lines in generated surge/config.php to enable skills auto discovery.

  2. Verify the drupal-coding-standards-skill skill is available:

bash ddev composer surge skills-list

  1. Install the drupal-coding-standards-skill skill:

bash ddev composer surge skills-install

  1. Tell your AI agent to generate AGENTS.md and/or CLAUDE.md using the drupal-agents-generator skill. Example prompt:

Use the drupal-agents-generator skill to generate AGENTS.md and CLAUDE.md for this project.

  1. Optionally, ask your AI agent to review code using drupal-coding-standards, or modify AGENTS.md to conditionally use the drupal-coding-standards skill. Example prompts:

Review my code using the drupal-coding-standards skill in web/modules/contrib/ai_context

Review my code using the drupal-coding-standards skill in web/modules/contrib/ai_context/ai_context.module and fix the coding standards issues.