Skip to content

Commit e7ca92b

Browse files
docs: add pr-title skill guidance
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Assisted-by: openai/gpt-5.3-codex on opencode
1 parent a72e17a commit e7ca92b

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.agents/skills/pr-title/SKILL.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: pr-title
3+
description: Chooses and validates the best PR title type and optional scope using changed files. Enforces docs-heavy PRs to use docs type and refreshes semantic scopes when new mods are added.
4+
---
5+
6+
# PR Title
7+
8+
Use this skill when drafting or reviewing pull request titles.
9+
10+
## Goal
11+
12+
- Choose an appropriate Conventional Commit type.
13+
- Choose an optional scope only when it clearly improves precision.
14+
- Prevent misleading types (for example `feat` for docs-only work).
15+
16+
## Rules
17+
18+
1. PR title format must be `<type>: <subject>` or `<type>(<scope>): <subject>`.
19+
2. Type must follow project changelog categories in `docs/en/contribute/changelog_guidelines.md`.
20+
3. If changes are mostly under `docs/` (>80% of changed files), type must be `docs`.
21+
4. Scope is optional. Use it only when specific and accurate (`UI`, `i18n`, `balance`, `port`, `lua`, `mods`, `mods/<MOD_ID>`).
22+
5. Do not use `feat` for documentation-only PRs.
23+
24+
## Workflow
25+
26+
1. Gather changed files for the branch against `upstream/main`.
27+
2. Propose a PR title with best type and optional scope.
28+
3. Validate it with:
29+
30+
```sh
31+
deno task pr-title --title "<type>(<scope>): <subject>"
32+
```
33+
34+
4. If validation fails, adjust type/scope and rerun.
35+
36+
## Semantic Scope Refresh
37+
38+
When new mods are added (`data/mods/<MOD_ID>/modinfo.json` as added files), this skill must ensure semantic scopes are refreshed.
39+
40+
- The validator handles this automatically by running `deno task semantic`.
41+
- Commit any resulting `.github/semantic.yml` update together with the PR-title changes.

0 commit comments

Comments
 (0)