Skip to content

Commit ac589a8

Browse files
docs(agents): cut more redundant content
Second redundancy audit. Drop content that duplicated other docs: * agents/index.md: remove `Source-of-truth map` table; it duplicated the `When to read what` table below it. The dedup rule is still enforced by the `Updating these pages` section. * agents/index.md: collapse the `fall back to the general flow` numbered list to a single sentence; the steps were generic engineering advice already covered by `AGENTS.md` and the pull-request template. * validation.md: drop the `mypy --python-version 3.10` snippet; the identical command already lives in `contributing_tldr.md`. * validation.md: drop the `Pre-commit hooks` section; `contributing.md` already covers `poe setup-pre-commit` and how hooks run. * AGENTS.md: trim `When unsure` to the backward-compatibility rule; the other two bullets were generic agent etiquette. * AGENTS.md: drop the `Follow Conventional Commits` reminder; every commitizen contributor knows this and prek enforces it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f1d1fcd commit ac589a8

3 files changed

Lines changed: 3 additions & 44 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ These are easy to miss when working from an agent and are required by the PR tem
5656
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).
5757
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).
5858
3. **Fill in "Steps to Test This Pull Request"** with the exact commands you ran locally — the maintainers re-run them.
59-
4. **Follow Conventional Commits** — the project uses itself to validate commit messages.
6059

6160
## When unsure
6261

63-
- Read the existing tests and user docs to understand the expected behavior before changing code.
64-
- 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).
65-
- Cross-platform parity matters — if you cannot test on macOS or Windows locally, surface that in the PR description.
62+
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).

docs/contributing/agents/index.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,6 @@ These pages are written for AI agents contributing to Commitizen. Human contribu
77
> definition at `.agents/skills/commitizen/SKILL.md` in the repo root.
88
> The pages here are for working **on** Commitizen itself.
99
10-
## Source-of-truth map
11-
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.
13-
14-
| Topic | Lives in | Why |
15-
|---|---|---|
16-
| Setup, dev workflow, PR lifecycle, labels | [Contributing](../contributing.md) | Same for humans and agents |
17-
| poe command reference | [Contributing TL;DR](../contributing_tldr.md) | One canonical cheat sheet |
18-
| PR etiquette, AI-assisted policy | [Pull Request Guidelines](../pull_request.md) and [PR template](https://github.com/commitizen-tools/commitizen/blob/master/.github/pull_request_template.md) | One canonical policy |
19-
| Codebase topology and extension points | [Architecture Overview](../architecture.md) | Useful to humans too |
20-
| Always-loaded agent rules | [`AGENTS.md`](https://github.com/commitizen-tools/commitizen/blob/master/AGENTS.md) | Auto-loaded as system context every session |
21-
| Targeted test selectors and CI failure recipes | [Validation Guide](validation.md) | Agent-specific |
22-
| Recipes for recurring task types | [Playbooks](#playbooks) | Agent-specific |
23-
2410
## When to read what
2511

2612
| You want to... | Read |
@@ -45,14 +31,8 @@ Recipes for recurring task types. Each playbook is self-contained: trigger, file
4531
- [Deprecate a public API](playbooks/deprecate-public-api.md)
4632
- [Update generated snapshots and screenshots](playbooks/update-snapshots.md)
4733

48-
If your task does not match a playbook, fall back to the general flow:
49-
50-
1. Read the [Architecture Overview](../architecture.md) for the relevant subsystem.
51-
2. Read 1–2 existing examples in the same directory to match local conventions.
52-
3. Make the change, plus tests, plus user-facing docs.
53-
4. Iterate with targeted tests; finish with `uv run poe all`.
54-
5. Open the PR using the template; check the AI-disclosure box.
34+
If no playbook matches, read the [Architecture Overview](../architecture.md) for the relevant subsystem and follow 1-2 existing examples in the same directory before changing code.
5535

5636
## Updating these pages
5737

58-
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.
38+
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. If you find yourself restating something that already lives in a human-facing doc, link to it instead and shorten the agent doc.

docs/contributing/agents/validation.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ During iteration, prefer running only the tests that cover what you changed. The
2424
| A deprecation | `uv run pytest tests/test_deprecated.py -n auto` plus the affected subsystem's tests |
2525
| Exception classes | `uv run pytest tests/test_exceptions.py -n auto` |
2626

27-
Run mypy against the oldest supported Python version when adding type annotations:
28-
29-
```bash
30-
uv run mypy --python-version 3.10
31-
```
32-
33-
This catches `typing-extensions` vs stdlib import issues that the default mypy run does not flag.
34-
3527
## Choosing a final check
3628

3729
| Command | When to run | What it does |
@@ -99,13 +91,3 @@ Most often a path-separator or encoding assumption:
9991
### Coverage drop on CodeCov
10092

10193
The `cover` task generates `coverage.xml` consumed by CodeCov. If coverage drops, add tests for the new code paths before pushing. Inspect `coverage.xml` locally or re-run `uv run poe cover` and inspect the terminal report.
102-
103-
## Pre-commit hooks
104-
105-
Hooks are defined in `.pre-commit-config.yaml` and executed via [`prek`](https://github.com/j178/prek), a `pre-commit`-compatible runner. Install once:
106-
107-
```bash
108-
uv run poe setup-pre-commit
109-
```
110-
111-
After install, `prek` runs on every `git commit`. `poe ci` invokes `prek run --all-files` to mirror what CI will do.

0 commit comments

Comments
 (0)