Implement automatic community guidelines detection and merging system

Created on 30 August 2025, 12 days ago

Problem/Motivation

Currently, Drupal Surge only provides static coding standards without the ability for community members to contribute their own guidelines. Package authors and project teams cannot easily share their best practices, limiting the tool's usefulness for collaborative development.

Imagine for example all the work done in the Group module, or specific DDEV related commands and instructions.
We could add that, but it will eat up valuable tokens whilst not everybody works with DDEV or uses Group.

Proposed resolution

Implement an automatic community guidelines detection and merging system that:

- Scans for surge-guidelines/ directories throughout the project structure
- Automatically merges community guidelines with base standards
- Integrates with existing standards command for seamless workflow
- Make it transparent what guidelines are being added, so we don't inject guidelines unknowingly
-- Ignore vendor folders for that matter

Remaining steps

- Determine what the directory name would be to scan for, right now we use surge-guidelines, which is very specific so should not be in the way of any other implementations.

Feature request
Status

Active

Component

Code

Created by

🇳🇱Netherlands ronaldtebrake

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ronaldtebrake
    • 9be32f9c committed on 1.0.x
      [#3543959] feat: Implement automatic community guidelines detection and...
  • 🇳🇱Netherlands ronaldtebrake

    It's done.

    If you add markdown files to your custom module / project, in a surge-guidelines directory it should be merged if you run composer surge-standards.

    We currently also have composer surge-scan which allows you to dry run this, it will create a standards directory and it will write a community standard one, merged with your markdown files and also one without. Allowing you to see what it would generate.

Production build 0.71.5 2024