Skip to content

Commit 741ee63

Browse files
style(docs): unwrap hard-wrapped paragraphs in new agent docs
The repository convention is unwrapped paragraphs (one line per logical paragraph) - see existing contributing.md and pull_request.md where lines run to ~150-250 chars. The newly added AGENTS.md, architecture.md, and docs/contributing/agents/ files were authored with a ~70-char hard wrap, breaking the convention. Unwrap them to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 157cb18 commit 741ee63

11 files changed

Lines changed: 188 additions & 505 deletions

AGENTS.md

Lines changed: 22 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
## Purpose
44

5-
This file is the auto-loaded entry point for AI agents working on the
6-
`commitizen` repository. It holds the rules an agent needs in **every**
7-
session. Deeper guidance lives in:
5+
This file is the auto-loaded entry point for AI agents working on the `commitizen` repository. It holds the rules an agent needs in **every** session. Deeper guidance lives in:
86

97
- [Contributing](docs/contributing/contributing.md) — setup, dev workflow, PR lifecycle.
108
- [Contributing TL;DR](docs/contributing/contributing_tldr.md) — poe command cheat sheet.
@@ -16,11 +14,9 @@ Follow these instructions in addition to any higher-level tool or system rules.
1614

1715
## Project at a glance
1816

19-
- **Project**: `commitizen` — Python CLI for enforcing Conventional Commits,
20-
automating version bumps, and generating changelogs.
17+
- **Project**: `commitizen` — Python CLI for enforcing Conventional Commits, automating version bumps, and generating changelogs.
2118
- **Library + CLI**: code is reachable both via `cz` and `import commitizen`.
22-
- **Cross-platform**: tests run on Linux/macOS/Windows × Python 3.10–3.14.
23-
Avoid POSIX-only assumptions (paths, subprocesses, line endings).
19+
- **Cross-platform**: tests run on Linux/macOS/Windows × Python 3.10–3.14. Avoid POSIX-only assumptions (paths, subprocesses, line endings).
2420
- **Key entrypoints**:
2521
- `commitizen/cli.py` — CLI definition (decli + argparse).
2622
- `commitizen/commands/` — one module per `cz` subcommand.
@@ -41,57 +37,31 @@ Follow these instructions in addition to any higher-level tool or system rules.
4137
| Tag handling | `commitizen/tags.py`, `tests/test_tags.py` |
4238
| Pre-commit / CI | `.pre-commit-config.yaml`, `.github/workflows/`, `pyproject.toml` (poe tasks) |
4339

44-
For recurring task types (add a provider, deprecate an API, regenerate
45-
snapshots, ...), use the matching playbook in
46-
[For AI Agents § Playbooks](docs/contributing/agents/index.md#playbooks)
47-
instead of reinventing the workflow.
40+
For recurring task types (add a provider, deprecate an API, regenerate snapshots, ...), use the matching playbook in [For AI Agents § Playbooks](docs/contributing/agents/index.md#playbooks) instead of reinventing the workflow.
4841

4942
## Do not touch
5043

51-
These files are generated, tracked, or otherwise managed automatically.
52-
Do not edit them directly:
53-
54-
- `CHANGELOG.md` — produced by `cz changelog`. Hand-edits will be
55-
overwritten on the next release.
56-
- `commitizen/__version__.py` — bumped by `cz bump` via the configured
57-
version provider.
58-
- `.pre-commit-config.yaml:rev:` lines under the `Commitizen` repo —
59-
bumped by `cz bump` (`version_files` in `pyproject.toml`).
60-
- `docs/images/cli_help/*.svg` and `docs/images/cli_interactive/*.gif`
61-
regenerated by `uv run poe doc:screenshots`. See the
62-
[update-snapshots playbook](docs/contributing/agents/playbooks/update-snapshots.md).
63-
- `tests/**/*` snapshot files used by `pytest-regressions` — regenerated
64-
via `uv run poe test:regen`.
65-
- `uv.lock` — only modify by changing dependencies in `pyproject.toml`
66-
and running `uv sync`, never by hand-editing.
67-
- Anything under `__pycache__/`, `.mypy_cache/`, `.ruff_cache/`, `.venv/`,
68-
`site/`, `coverage.xml`, `junit.xml`.
44+
These files are generated, tracked, or otherwise managed automatically. Do not edit them directly:
45+
46+
- `CHANGELOG.md` — produced by `cz changelog`. Hand-edits will be overwritten on the next release.
47+
- `commitizen/__version__.py` — bumped by `cz bump` via the configured version provider.
48+
- `.pre-commit-config.yaml:rev:` lines under the `Commitizen` repo — bumped by `cz bump` (`version_files` in `pyproject.toml`).
49+
- `docs/images/cli_help/*.svg` and `docs/images/cli_interactive/*.gif` — regenerated by `uv run poe doc:screenshots`. See the [update-snapshots playbook](docs/contributing/agents/playbooks/update-snapshots.md).
50+
- `tests/**/*` snapshot files used by `pytest-regressions` — regenerated via `uv run poe test:regen`.
51+
- `uv.lock` — only modify by changing dependencies in `pyproject.toml` and running `uv sync`, never by hand-editing.
52+
- Anything under `__pycache__/`, `.mypy_cache/`, `.ruff_cache/`, `.venv/`, `site/`, `coverage.xml`, `junit.xml`.
6953

7054
## Mandatory PR reminders
7155

72-
These are easy to miss when working from an agent and are required by
73-
the PR template:
74-
75-
1. **Complete the AI disclosure**. Check
76-
"Was generative AI tooling used to co-author this PR?" and fill in
77-
the `Generated-by:` trailer with the tool name. Details:
78-
[Pull Request Guidelines § AI-Assisted Contributions](docs/contributing/pull_request.md#ai-assisted-contributions).
79-
2. **Run `uv run poe all` before pushing**. This is the command named in
80-
the PR template; it auto-formats then runs the same lint/check/test
81-
pipeline as CI. To mirror CI exactly afterwards, run
82-
`uv run poe ci` (uses `prek`, does not auto-format).
83-
3. **Fill in "Steps to Test This Pull Request"** with the exact commands
84-
you ran locally — the maintainers re-run them.
85-
4. **Follow Conventional Commits** — the project uses itself to validate
86-
commit messages.
56+
These are easy to miss when working from an agent and are required by the PR template:
57+
58+
1. **Complete the AI disclosure**. Check "Was generative AI tooling used to co-author this PR?" and fill in the `Generated-by:` trailer with the tool name. Details: [Pull Request Guidelines § AI-Assisted Contributions](docs/contributing/pull_request.md#ai-assisted-contributions).
59+
2. **Run `uv run poe all` before pushing**. This is the command named in the PR template; it auto-formats then runs the same lint/check/test pipeline as CI. To mirror CI exactly afterwards, run `uv run poe ci` (uses `prek`, does not auto-format).
60+
3. **Fill in "Steps to Test This Pull Request"** with the exact commands you ran locally — the maintainers re-run them.
61+
4. **Follow Conventional Commits** — the project uses itself to validate commit messages.
8762

8863
## When unsure
8964

90-
- Read the existing tests and user docs to understand the expected
91-
behavior before changing code.
92-
- When behavior is ambiguous, assume **backward compatibility with
93-
current tests and docs** is required. Add a deprecation window
94-
instead of breaking it; see the
95-
[deprecate-public-api playbook](docs/contributing/agents/playbooks/deprecate-public-api.md).
96-
- Cross-platform parity matters — if you cannot test on macOS or
97-
Windows locally, surface that in the PR description.
65+
- Read the existing tests and user docs to understand the expected behavior before changing code.
66+
- When behavior is ambiguous, assume **backward compatibility with current tests and docs** is required. Add a deprecation window instead of breaking it; see the [deprecate-public-api playbook](docs/contributing/agents/playbooks/deprecate-public-api.md).
67+
- Cross-platform parity matters — if you cannot test on macOS or Windows locally, surface that in the PR description.

docs/contributing/agents/index.md

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# For AI Agents
22

3-
These pages are written for AI agents contributing to Commitizen. Human
4-
contributors may also find them useful as a quick reference. They
5-
**complement** the existing human-facing contributor docs rather than
6-
replace them — anything covered by the human docs is linked, not restated.
3+
These pages are written for AI agents contributing to Commitizen. Human contributors may also find them useful as a quick reference. They **complement** the existing human-facing contributor docs rather than replace them — anything covered by the human docs is linked, not restated.
74

85
> If you are an AI agent looking to **use** Commitizen as a tool (validate
96
> commit messages, bump versions in a downstream project), see the skill
@@ -12,9 +9,7 @@ replace them — anything covered by the human docs is linked, not restated.
129
1310
## Source-of-truth map
1411

15-
When two documents could host a piece of guidance, this table is the
16-
tie-breaker. Agent pages that drift from it should be fixed, not the
17-
human pages.
12+
When two documents could host a piece of guidance, this table is the tie-breaker. Agent pages that drift from it should be fixed, not the human pages.
1813

1914
| Topic | Lives in | Why |
2015
|---|---|---|
@@ -38,34 +33,20 @@ human pages.
3833
| Recover from a CI failure | [Validation Guide](validation.md#ci-failure-recipes) |
3934
| Implement a recurring task type | [Playbooks](#playbooks) |
4035

41-
The repo-root [`AGENTS.md`](https://github.com/commitizen-tools/commitizen/blob/master/AGENTS.md)
42-
is the auto-loaded entry point for most agent tools. It holds the rules an
43-
agent needs in every session; this page is the deeper reference.
36+
The repo-root [`AGENTS.md`](https://github.com/commitizen-tools/commitizen/blob/master/AGENTS.md) is the auto-loaded entry point for most agent tools. It holds the rules an agent needs in every session; this page is the deeper reference.
4437

4538
## Agent-specific deltas
4639

4740
Humans absorb these rules through review; agents need them stated:
4841

49-
1. **Complete the PR template fully**, including the AI-disclosure checkbox
50-
and the `Generated-by:` trailer. The maintainers re-run the commands you
51-
list under "Steps to Test This Pull Request" — make them exact.
52-
2. **`uv run poe all` is the pre-push verification command** named in the
53-
PR template. `poe ci` is the CI-equivalent runner (uses `prek` and does
54-
not auto-format); run it too if you want to mirror CI exactly. See the
55-
[Validation Guide](validation.md#choosing-a-final-check) for the
56-
distinction.
57-
3. **Do not touch generated artifacts.** See the do-not-touch list in
58-
[`AGENTS.md`](https://github.com/commitizen-tools/commitizen/blob/master/AGENTS.md).
59-
4. **Prefer targeted test selectors during iteration** — see the
60-
[targeted-test map](validation.md#targeted-test-map). The full suite
61-
is fine for a final pre-push run.
42+
1. **Complete the PR template fully**, including the AI-disclosure checkbox and the `Generated-by:` trailer. The maintainers re-run the commands you list under "Steps to Test This Pull Request" — make them exact.
43+
2. **`uv run poe all` is the pre-push verification command** named in the PR template. `poe ci` is the CI-equivalent runner (uses `prek` and does not auto-format); run it too if you want to mirror CI exactly. See the [Validation Guide](validation.md#choosing-a-final-check) for the distinction.
44+
3. **Do not touch generated artifacts.** See the do-not-touch list in [`AGENTS.md`](https://github.com/commitizen-tools/commitizen/blob/master/AGENTS.md).
45+
4. **Prefer targeted test selectors during iteration** — see the [targeted-test map](validation.md#targeted-test-map). The full suite is fine for a final pre-push run.
6246

6347
## Playbooks
6448

65-
Recipes for recurring task types. Each playbook is self-contained: trigger,
66-
files to read first, ordered steps, verification commands, and known
67-
pitfalls. They link out to the human-facing concept docs rather than
68-
restating concepts.
49+
Recipes for recurring task types. Each playbook is self-contained: trigger, files to read first, ordered steps, verification commands, and known pitfalls. They link out to the human-facing concept docs rather than restating concepts.
6950

7051
- [Add a version provider](playbooks/add-version-provider.md)
7152
- [Add a changelog format](playbooks/add-changelog-format.md)
@@ -75,18 +56,12 @@ restating concepts.
7556

7657
If your task does not match a playbook, fall back to the general flow:
7758

78-
1. Read the [Architecture Overview](../architecture.md) for the relevant
79-
subsystem.
80-
2. Read 1–2 existing examples in the same directory to match local
81-
conventions.
59+
1. Read the [Architecture Overview](../architecture.md) for the relevant subsystem.
60+
2. Read 1–2 existing examples in the same directory to match local conventions.
8261
3. Make the change, plus tests, plus user-facing docs.
8362
4. Iterate with targeted tests; finish with `uv run poe all`.
8463
5. Open the PR using the template; check the AI-disclosure box.
8564

8665
## Updating these pages
8766

88-
Treat these pages like any other code change: open a PR, follow the
89-
template, run `uv run poe doc:build` to verify the mkdocs build, and
90-
check internal links for breakage. If you find yourself restating
91-
something that already lives in a human-facing doc, link to it instead
92-
and shorten the agent doc.
67+
Treat these pages like any other code change: open a PR, follow the template, run `uv run poe doc:build` to verify the mkdocs build, and check internal links for breakage. If you find yourself restating something that already lives in a human-facing doc, link to it instead and shorten the agent doc.

0 commit comments

Comments
 (0)