> For the complete documentation index, see [llms.txt](https://ispectra.gitbook.io/mutamad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ispectra.gitbook.io/mutamad/contributing/development.md). Agents can also search and read this documentation through its [MCP server](https://ispectra.gitbook.io/mutamad/~gitbook/mcp).

# Development

How Mutamad is developed, and the rules a change must follow.

## The workspace

Mutamad is developed in one workspace holding its separate drupal.org projects. Each project has one branch, `1.0.x`, and its own issue queue.

```
projects/
├── mutamad_project      Composer project template, DDEV, mutamad-verify
├── mutamad              installation profile
├── mutamad_starter      site template
├── mutamad_*            recipes, modules and the theme
└── mutamad_ci           CI: builds, installs in Arabic and English, checks
```

## Before you change anything

Read the [architecture rules](https://ispectra.gitbook.io/mutamad/concepts/architecture.md#the-rules-that-keep-it-this-way). In short:

1. Configuration in recipes, never in the profile.
2. One concern per recipe, applicable alone to bare core.
3. Never edit core or contrib in place; override from a later recipe, or fix upstream.
4. Nothing entity-specific in a `mutamad_*` project.
5. Every new dependency is a recorded decision.
6. Respect the recipe order: roles before grants, providers before grants, the default language before fields.

## A change that touches a control

In the same change:

* add an entry under `## [Unreleased]` in that project's `CHANGELOG.md`
* add or update the check that proves the control, in `mutamad_project/.ddev/commands/web/mutamad-verify`

**A control without a check is a claim, not a control.**

## Verify your work

```bash
cd projects/mutamad_project
composer quality        # phpcs (Drupal standards) + PHPStan level 6 + composer audit
ddev install-mutamad    # a full install, with every check
ddev mutamad-verify     # every control on the running site
```

CI does the same on every change and every night: a fresh install in Arabic and in English, every check, the workflow tests, browser tests, and a WCAG 2 AA scan.

## Patches

When Mutamad needs a fix in core or a contributed module, the fix goes to drupal.org as an issue and merge request. Until it is released, the patch lives in `mutamad_project/patches/`, each citing its drupal.org issue. Composer applies them and stops if one no longer applies.

## Commits

Drupal's commit format:

```
{type}: #{issueID} Summary
```

For example `fix: #3607089 Correct the NCA ECC-2:2024 control numbers`. See [drupal.org's guidance](https://www.drupal.org/node/3586390).

## Releases

Releases are tagged on drupal.org, in dependency order, by the maintainers. A tag on drupal.org is a release; never tag without the maintainers' approval.

## Translations

Mutamad ships no translation file. Translate its strings on [localize.drupal.org](https://localize.drupal.org/); sites download them automatically.
