> For the complete documentation index, see [llms.txt](https://php-fhir-tools.ardenexal.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://php-fhir-tools.ardenexal.net/contributing/commit-standards.md).

# Commit Standards

This project uses [Conventional Commits](https://www.conventionalcommits.org/). Roughly 80% of sampled history follows this style, so new commits must too.

## Format

```
<type>(<scope>): <subject>

[optional body]

[optional footer]
```

* Use `type(scope): subject` or `type: subject`.
* **Scope** is optional and names the affected component, e.g. `serialization`, `codegen`, `fhirpath`, `validation`.

## Types

| Type       | When to use                               |
| ---------- | ----------------------------------------- |
| `feat`     | New feature or user-visible capability    |
| `fix`      | Bug fix                                   |
| `chore`    | Build scripts, dependencies, tooling, CI  |
| `test`     | Adding or updating tests                  |
| `docs`     | Documentation only                        |
| `refactor` | Code restructure with no behaviour change |

## Rules

* **Subject line:** imperative mood ("add support for X", not "added"), no trailing period. Keep it concrete — name the behavior, file family, or command that changed. Observed subject length is short (p95 around 96 characters); aim for `≤ 72`.
* **Body:** explain *why*, not *what*; wrap at 72 characters. Add a body when the subject covers more than one axis or the motivation is not obvious.
* **No AI mentions:** do not reference AI tools, Claude, or AI assistance in commit messages or PR descriptions.
* **GPG-sign** commits when possible (`git commit -S`).
* **No `--no-verify`:** pre-commit hooks must pass; fix the underlying issue instead of bypassing them.

## Examples

```
feat(serialization): add strict validation mode to JSON deserializer

fix(fhirpath): handle empty collection in where() function

chore: upgrade phpstan to 2.x

test(codegen): add coverage for profile inheritance resolution
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://php-fhir-tools.ardenexal.net/contributing/commit-standards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
