Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/skills/git-commit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Format: `type(scope): 설명`

## Scope Selection

For the full scope selection table and examples, read `references/scope-guide.md`.
For commit type and scope naming conventions, read `references/commit-conventions.md`.
For the full scope selection table and examples, read `.agents/skills/git-commit/references/scope-guide.md`.
For commit type and scope naming conventions, read `.agents/skills/git-commit/references/commit-conventions.md`.

Quick rule: infer domain from changed file paths and directory structure. Use `global` / `ci/cd` / module names only for cross-cutting changes.

Expand Down
65 changes: 65 additions & 0 deletions .agents/skills/java-spring-arch/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: java-spring-arch
description: Architecture reference for Java + Spring Boot 4.0 projects — Controller/Service/Repository layer responsibilities, @Transactional strategy (readOnly optimization, N+1 prevention), ExpectedException usage, and Entity↔DTO conversion patterns.
---

# Java + Spring Boot Architecture Guide

## Layer Structure

### Controller
- Role: Request validation, DTO conversion, HTTP response
- Annotations: `@RestController`, `@RequestMapping`
- Validation: `@Valid`, `@Validated`
- Response: Use `CommonApiResponse` wrapper

### Service
- Role: Business logic, transaction management
- Pattern: interface + implementation
- Transaction:
- Read: `@Transactional(readOnly = true)`
- Write: `@Transactional`
- Dependencies: Inject Repository via constructor injection

### Repository
- Role: Data access
- JPA: Extend `JpaRepository`
- Avoid N+1: Fetch Join, `@EntityGraph`

## Transaction Strategy

### Read-only Optimization
```java
@Transactional(readOnly = true)
public List<StudentResDto> findStudents() {
return repository.findAll().stream()
.map(StudentResDto::from)
.toList();
}
```

### N+1 Problem Resolution
```java
// ❌ N+1 occurs
repository.findAll(); // 1 query
entity.getRelatedEntities(); // N queries

// ✅ Fetch Join
@Query("SELECT e FROM Entity e JOIN FETCH e.relatedEntities")
List<Entity> findAllWithRelated();
```

## Exception Handling

```java
throw new ExpectedException("학생을 찾을 수 없습니다.", HttpStatus.NOT_FOUND);
```

## DTO Conversion Pattern

```java
// Entity → ResDto (static factory)
public static StudentResDto from(Student student) {
return new StudentResDto(student.getId(), student.getName());
}
```
4 changes: 2 additions & 2 deletions .agents/skills/resolve-reviews/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ allowed-tools: Bash(bash *get-pr-data.sh:*), Bash(gh api:*), Bash(gh pr view:*),
## Step 1 — Collect PR Data

```bash
bash scripts/get-pr-data.sh
bash .agents/skills/resolve-reviews/scripts/get-pr-data.sh
```

Output files:
Expand Down Expand Up @@ -105,7 +105,7 @@ gh api "repos/<owner>/<repo>/pulls/<pr_number>/comments/<comment_id>/replies" \
-f body="<reply_body>"
```

For reply body templates, read `references/reply-formats.md`.
For reply body templates, read `.agents/skills/resolve-reviews/references/reply-formats.md`.

## Step 7 — Cleanup

Expand Down
16 changes: 16 additions & 0 deletions .agents/skills/the-sdk/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: the-sdk
description: Usage guide for the-sdk common library — HTTP request/response logging with UUID Log-ID, CommonApiResponse wrapping, ExpectedException handling, and Swagger auto-configuration.
---

# the-sdk Usage Guide

`com.github.themoment-team:the-sdk:1.5` — the core common library for this project.
Controlled via `sdk.*` settings in `application.yml`.

## Features

- **Logging**: Assigns a UUID `Log-ID` to every HTTP request/response; automatic logging
- **Response Wrapper**: Automatically wraps controller return values in `CommonApiResponse`. Use `success()` / `created()` / `error()` factory methods
- **Exception Handler**: Throwing `ExpectedException(message, HttpStatus)` returns a standard error response automatically
- **Swagger**: Auto-configured at `/v3/api-docs` and `/swagger-ui`. Only `/v1/**` paths are documented
6 changes: 3 additions & 3 deletions .agents/skills/write-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ cat .github/PULL_REQUEST_TEMPLATE.md

## Step 2 — Determine Labels

Read `references/labels.md` and select 1–2 appropriate labels based on the nature of the changes.
Read `references/commit-conventions.md` for commit type and scope naming rules.
Read `.agents/skills/write-pr/references/labels.md` and select 1–2 appropriate labels based on the nature of the changes.
Read `.agents/skills/write-pr/references/commit-conventions.md` for commit type and scope naming rules.

## Step 3 — Generate PR Content

Expand Down Expand Up @@ -61,7 +61,7 @@ Ask the user which title to use (present options 1/2/3). Wait for the answer bef
Run the creation script with the confirmed title and labels:

```bash
bash scripts/create-pr.sh "<confirmed-title>" "PR_BODY.md" "<label1>,<label2>"
bash .agents/skills/write-pr/scripts/create-pr.sh "<confirmed-title>" "PR_BODY.md" "<label1>,<label2>"
```

After creation, display the PR URL.
Expand Down
5 changes: 2 additions & 3 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"hooks": [
{
"type": "command",
"command": ".claude/hooks/preToolUse.sh"
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/preToolUse.sh"
}
]
}
Expand All @@ -37,15 +37,14 @@
"hooks": [
{
"type": "command",
"command": ".claude/hooks/postToolUse.sh"
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/postToolUse.sh"
}
]
}
]
},
"enabledPlugins": {
"claude-hud@claude-hud": true,
"github@claude-plugins-official": true,
"context7@claude-plugins-official": true
},
"language": "korean",
Expand Down
65 changes: 65 additions & 0 deletions .claude/skills/java-spring-arch/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: java-spring-arch
description: Architecture reference for Java + Spring Boot 4.0 projects — Controller/Service/Repository layer responsibilities, @Transactional strategy (readOnly optimization, N+1 prevention), ExpectedException usage, and Entity↔DTO conversion patterns.
---

# Java + Spring Boot Architecture Guide

## Layer Structure

### Controller
- Role: Request validation, DTO conversion, HTTP response
- Annotations: `@RestController`, `@RequestMapping`
- Validation: `@Valid`, `@Validated`
- Response: Use `CommonApiResponse` wrapper

### Service
- Role: Business logic, transaction management
- Pattern: interface + implementation
- Transaction:
- Read: `@Transactional(readOnly = true)`
- Write: `@Transactional`
- Dependencies: Inject Repository via constructor injection

### Repository
- Role: Data access
- JPA: Extend `JpaRepository`
- Avoid N+1: Fetch Join, `@EntityGraph`

## Transaction Strategy

### Read-only Optimization
```java
@Transactional(readOnly = true)
public List<StudentResDto> findStudents() {
return repository.findAll().stream()
.map(StudentResDto::from)
.toList();
}
```

### N+1 Problem Resolution
```java
// ❌ N+1 occurs
repository.findAll(); // 1 query
entity.getRelatedEntities(); // N queries

// ✅ Fetch Join
@Query("SELECT e FROM Entity e JOIN FETCH e.relatedEntities")
List<Entity> findAllWithRelated();
```

## Exception Handling

```java
throw new ExpectedException("학생을 찾을 수 없습니다.", HttpStatus.NOT_FOUND);
```

## DTO Conversion Pattern

```java
// Entity → ResDto (static factory)
public static StudentResDto from(Student student) {
return new StudentResDto(student.getId(), student.getName());
}
```
16 changes: 16 additions & 0 deletions .claude/skills/the-sdk/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: the-sdk
description: Usage guide for the-sdk common library — HTTP request/response logging with UUID Log-ID, CommonApiResponse wrapping, ExpectedException handling, and Swagger auto-configuration.
---

# the-sdk Usage Guide

`com.github.themoment-team:the-sdk:1.5` — the core common library for this project.
Controlled via `sdk.*` settings in `application.yml`.

## Features

- **Logging**: Assigns a UUID `Log-ID` to every HTTP request/response; automatic logging
- **Response Wrapper**: Automatically wraps controller return values in `CommonApiResponse`. Use `success()` / `created()` / `error()` factory methods
- **Exception Handler**: Throwing `ExpectedException(message, HttpStatus)` returns a standard error response automatically
- **Swagger**: Auto-configured at `/v3/api-docs` and `/swagger-ui`. Only `/v1/**` paths are documented
14 changes: 7 additions & 7 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
model = "gpt-5.5"
model_reasoning_effort = "high"
web_search = "live"

[approval]
policy = "on-request"

sandbox_mode = "workspace-write"
project_doc_max_bytes = 32768
[sandbox_workspace_write]
network_access = true
[shell]
login_shell_allowed = true

[features]
hooks = true
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
14 changes: 12 additions & 2 deletions .codex/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
"hooks": {
"PreToolUse": [
{
"command": ".codex/hooks/pre-tool-use.sh"
"hooks": [
{
"type": "command",
"command": "bash -c 'root=\"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\"; hook=\"$root/.codex/hooks/pre-tool-use.sh\"; if [[ ! -f \"$hook\" ]]; then hook=\"$root/.codex/hooks/dispatcher/pre-tool-use.sh\"; fi; if [[ -f \"$hook\" ]]; then exec bash \"$hook\"; fi; exit 0'"
}
]
}
],
"PostToolUse": [
{
"command": ".codex/hooks/post-tool-use.sh"
"hooks": [
{
"type": "command",
"command": "bash -c 'root=\"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\"; hook=\"$root/.codex/hooks/post-tool-use.sh\"; if [[ ! -f \"$hook\" ]]; then hook=\"$root/.codex/hooks/dispatcher/post-tool-use.sh\"; fi; if [[ -f \"$hook\" ]]; then exec bash \"$hook\"; fi; exit 0'"
}
]
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion .codex/hooks/post-tool-use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
INPUT=$(cat)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MODULES_DIR="$SCRIPT_DIR/modules"
[[ -d "$MODULES_DIR" ]] || MODULES_DIR="${SCRIPT_DIR%/*}/modules"

[[ -d "$MODULES_DIR" ]] || exit 0

Expand All @@ -10,4 +11,4 @@ for hook in "$MODULES_DIR"/*/post-tool-use.sh; do
echo "$INPUT" | bash "$hook"
done

exit 0
exit 0
3 changes: 2 additions & 1 deletion .codex/hooks/pre-tool-use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
INPUT=$(cat)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MODULES_DIR="$SCRIPT_DIR/modules"
[[ -d "$MODULES_DIR" ]] || MODULES_DIR="${SCRIPT_DIR%/*}/modules"

[[ -d "$MODULES_DIR" ]] || exit 0

Expand All @@ -14,4 +15,4 @@ for hook in "$MODULES_DIR"/*/pre-tool-use.sh; do
fi
done

exit 0
exit 0