Skip to content

Commit 5b4480e

Browse files
authored
Merge pull request #345 from domaframework/document/add-claude-code-document
Add CLAUDE.md and PR creation rules for development guidance
2 parents 8fb633b + 68481c9 commit 5b4480e

File tree

7 files changed

+109
-0
lines changed

7 files changed

+109
-0
lines changed

.claude/commands/create_pr.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# PR Creation Rules
2+
This document describes the format and rules for creating a Pull Request (PR) on GitHub.
3+
4+
# Execution Details
5+
## Commit Guidelines
6+
- Use imperative mood for commit messages (e.g., "Fix bug" instead of "Fixed
7+
- Write Commit messages in English
8+
9+
## PR Guidelines
10+
- If there are unstaged changes when creating a pull request, please split them appropriately and commit them separately.
11+
- When using the gh command, first authenticate with ```gh auth login```.
12+
- Use the [PR Template](../templates/PR_TEMPLATE.md) for PR descriptions
13+
- PR titles should be concise and descriptive
14+
- Ensure all tests pass before submitting a PR
15+
- Write PR title and descriptions in English
16+
17+
## Command to Execute
18+
19+
To create a PR, execute the following command. Add options as needed to construct the title, body, etc.
20+
```bash
21+
gh pr create
22+
```
23+
24+
The rules for describing the content of the PR are as follows.
25+
## Title
26+
Follow these rules for the PR title:
27+
- Write the title in English.
28+
- Keep the title concise and clearly indicate the changes.
29+
30+
## Body
31+
Follow these rules for the PR body:
32+
- Write the body in English.
33+
- It is recommended to divide the body into the following sections:
34+
- Refer to the [PR Template](../templates/PR_TEMPLATE.md) for the PR body template.
35+
- Briefly explain the purpose and impact of the changes.
36+
- Include related issue numbers or ticket numbers, if possible.
37+
38+
## Labels
39+
Labels are automatically assigned by GitHub Actions, so no manual configuration is required.

.claude/settings.local.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(./gradlew test:*)"
5+
],
6+
"deny": []
7+
}
8+
}

.claude/templates/PR_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
**Description**
2+
3+
---
4+
**Related Issue**
5+
6+
---
7+
**Type of Change**
8+
- [ ] Bug fix
9+
- [ ] New feature
10+
- [ ] Documentation update
11+
- [ ] Other (please specify)
12+
- [ ] Refactor
13+
- [ ] Test
14+
- [ ] Build system change
15+
- [ ] Chore
16+
- [ ] Performance improvement
17+
- [ ] Code style update
18+
- [ ] Security fix
19+
- [ ] Other (please specify)
20+
21+
---
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Generate Commit Messages in English
2+
3+
## Purpose
4+
Generate an English commit message based on the provided description of code changes.
5+
6+
## Instruction
7+
Please create a concise and clear **commit message in English** for the described modifications.
8+
9+
## Input
10+
- A description of what was changed or implemented in the code (in any language)
11+
12+
## Output
13+
- A corresponding commit message in English that reflects the intent and content of the changes

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
3030
# Verify plugin compatibility
3131
./gradlew verifyPlugin
3232
```
33+
3334
---
3435
## Architecture Overview
3536

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**content
2+
* Content Main
3+
* This is a demonstration of how to format SQL code using block comments.
4+
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package doma.example.dao.formatter;
2+
3+
import doma.example.entity.Employee;
4+
import org.seasar.doma.Dao;
5+
import org.seasar.doma.Select;
6+
import org.seasar.doma.Sql;
7+
8+
@Dao
9+
public interface SqlInjectionDao {
10+
@Select
11+
@Sql("""
12+
SELECT *
13+
FROM tableName
14+
WHERE id = 0""")
15+
Employee selectInjection();
16+
17+
@Select
18+
@Sql("""
19+
SELECT *
20+
FROM tableName
21+
WHERE id = /* id */1""")
22+
Employee selectInjection2(Integer id);
23+
}

0 commit comments

Comments
 (0)