oh-my-ag 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/skills/_shared/api-contracts/README.md +56 -0
- package/.agent/skills/_shared/api-contracts/template.md +88 -0
- package/.agent/skills/_shared/clarification-protocol.md +217 -0
- package/.agent/skills/_shared/common-checklist.md +31 -0
- package/.agent/skills/_shared/context-budget.md +118 -0
- package/.agent/skills/_shared/context-loading.md +105 -0
- package/.agent/skills/_shared/difficulty-guide.md +55 -0
- package/.agent/skills/_shared/lessons-learned.md +113 -0
- package/.agent/skills/_shared/memory-protocol.md +79 -0
- package/.agent/skills/_shared/reasoning-templates.md +161 -0
- package/.agent/skills/_shared/skill-routing.md +80 -0
- package/.agent/skills/_shared/verify.sh +252 -0
- package/.agent/skills/backend-agent/SKILL.md +47 -0
- package/.agent/skills/backend-agent/resources/api-template.py +326 -0
- package/.agent/skills/backend-agent/resources/checklist.md +36 -0
- package/.agent/skills/backend-agent/resources/error-playbook.md +98 -0
- package/.agent/skills/backend-agent/resources/examples.md +85 -0
- package/.agent/skills/backend-agent/resources/execution-protocol.md +45 -0
- package/.agent/skills/backend-agent/resources/snippets.md +197 -0
- package/.agent/skills/backend-agent/resources/tech-stack.md +39 -0
- package/.agent/skills/commit/SKILL.md +121 -0
- package/.agent/skills/commit/config/commit-config.yaml +55 -0
- package/.agent/skills/commit/resources/conventional-commits.md +166 -0
- package/.agent/skills/debug-agent/SKILL.md +51 -0
- package/.agent/skills/debug-agent/resources/bug-report-template.md +332 -0
- package/.agent/skills/debug-agent/resources/checklist.md +30 -0
- package/.agent/skills/debug-agent/resources/common-patterns.md +734 -0
- package/.agent/skills/debug-agent/resources/debugging-checklist.md +362 -0
- package/.agent/skills/debug-agent/resources/error-playbook.md +94 -0
- package/.agent/skills/debug-agent/resources/examples.md +87 -0
- package/.agent/skills/debug-agent/resources/execution-protocol.md +51 -0
- package/.agent/skills/frontend-agent/SKILL.md +48 -0
- package/.agent/skills/frontend-agent/resources/checklist.md +38 -0
- package/.agent/skills/frontend-agent/resources/component-template.tsx +92 -0
- package/.agent/skills/frontend-agent/resources/error-playbook.md +108 -0
- package/.agent/skills/frontend-agent/resources/examples.md +77 -0
- package/.agent/skills/frontend-agent/resources/execution-protocol.md +49 -0
- package/.agent/skills/frontend-agent/resources/snippets.md +205 -0
- package/.agent/skills/frontend-agent/resources/tailwind-rules.md +343 -0
- package/.agent/skills/frontend-agent/resources/tech-stack.md +36 -0
- package/.agent/skills/mobile-agent/SKILL.md +46 -0
- package/.agent/skills/mobile-agent/resources/checklist.md +35 -0
- package/.agent/skills/mobile-agent/resources/error-playbook.md +106 -0
- package/.agent/skills/mobile-agent/resources/examples.md +79 -0
- package/.agent/skills/mobile-agent/resources/execution-protocol.md +49 -0
- package/.agent/skills/mobile-agent/resources/screen-template.dart +298 -0
- package/.agent/skills/mobile-agent/resources/snippets.md +235 -0
- package/.agent/skills/mobile-agent/resources/tech-stack.md +45 -0
- package/.agent/skills/orchestrator/SKILL.md +99 -0
- package/.agent/skills/orchestrator/config/cli-config.yaml +78 -0
- package/.agent/skills/orchestrator/resources/memory-schema.md +212 -0
- package/.agent/skills/orchestrator/resources/subagent-prompt-template.md +153 -0
- package/.agent/skills/orchestrator/scripts/parallel-run.sh +330 -0
- package/.agent/skills/orchestrator/scripts/spawn-agent.sh +263 -0
- package/.agent/skills/orchestrator/templates/backend-task.md +18 -0
- package/.agent/skills/orchestrator/templates/debug-task.md +16 -0
- package/.agent/skills/orchestrator/templates/frontend-task.md +17 -0
- package/.agent/skills/orchestrator/templates/mobile-task.md +17 -0
- package/.agent/skills/orchestrator/templates/qa-task.md +16 -0
- package/.agent/skills/orchestrator/templates/tasks-example.yaml +15 -0
- package/.agent/skills/pm-agent/SKILL.md +47 -0
- package/.agent/skills/pm-agent/resources/error-playbook.md +75 -0
- package/.agent/skills/pm-agent/resources/examples.md +121 -0
- package/.agent/skills/pm-agent/resources/execution-protocol.md +46 -0
- package/.agent/skills/pm-agent/resources/task-template.json +57 -0
- package/.agent/skills/qa-agent/SKILL.md +43 -0
- package/.agent/skills/qa-agent/resources/checklist.md +294 -0
- package/.agent/skills/qa-agent/resources/error-playbook.md +95 -0
- package/.agent/skills/qa-agent/resources/examples.md +100 -0
- package/.agent/skills/qa-agent/resources/execution-protocol.md +50 -0
- package/.agent/skills/qa-agent/resources/self-check.md +27 -0
- package/.agent/skills/workflow-guide/SKILL.md +57 -0
- package/.agent/skills/workflow-guide/resources/examples.md +68 -0
- package/README.ko.md +459 -0
- package/README.md +563 -0
- package/bin/cli.js +205 -0
- package/package.json +75 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Backend Agent - Code Snippets
|
|
2
|
+
|
|
3
|
+
Copy-paste ready patterns. Use these as starting points, adapt to the specific task.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## FastAPI Route with Auth
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
from fastapi import APIRouter, Depends, HTTPException, status
|
|
11
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
|
12
|
+
|
|
13
|
+
from app.core.deps import get_current_user, get_db
|
|
14
|
+
from app.models.user import User
|
|
15
|
+
from app.schemas.resource import ResourceCreate, ResourceResponse
|
|
16
|
+
|
|
17
|
+
router = APIRouter(prefix="/api/resources", tags=["resources"])
|
|
18
|
+
|
|
19
|
+
@router.post("/", response_model=ResourceResponse, status_code=status.HTTP_201_CREATED)
|
|
20
|
+
async def create_resource(
|
|
21
|
+
data: ResourceCreate,
|
|
22
|
+
db: AsyncSession = Depends(get_db),
|
|
23
|
+
current_user: User = Depends(get_current_user),
|
|
24
|
+
):
|
|
25
|
+
resource = Resource(**data.model_dump(), user_id=current_user.id)
|
|
26
|
+
db.add(resource)
|
|
27
|
+
await db.commit()
|
|
28
|
+
await db.refresh(resource)
|
|
29
|
+
return resource
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Pydantic Schema Pair
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from datetime import datetime
|
|
38
|
+
from uuid import UUID
|
|
39
|
+
from pydantic import BaseModel, Field
|
|
40
|
+
|
|
41
|
+
class ResourceCreate(BaseModel):
|
|
42
|
+
title: str = Field(..., min_length=1, max_length=200)
|
|
43
|
+
description: str | None = None
|
|
44
|
+
|
|
45
|
+
class ResourceResponse(BaseModel):
|
|
46
|
+
id: UUID
|
|
47
|
+
title: str
|
|
48
|
+
description: str | None
|
|
49
|
+
user_id: UUID
|
|
50
|
+
created_at: datetime
|
|
51
|
+
|
|
52
|
+
model_config = {"from_attributes": True}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## SQLAlchemy Model
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
import uuid
|
|
61
|
+
from datetime import datetime
|
|
62
|
+
from sqlalchemy import ForeignKey, String, Text
|
|
63
|
+
from sqlalchemy.dialects.postgresql import UUID
|
|
64
|
+
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
65
|
+
|
|
66
|
+
from app.core.database import Base
|
|
67
|
+
|
|
68
|
+
class Resource(Base):
|
|
69
|
+
__tablename__ = "resources"
|
|
70
|
+
|
|
71
|
+
id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
|
72
|
+
title: Mapped[str] = mapped_column(String(200), nullable=False)
|
|
73
|
+
description: Mapped[str | None] = mapped_column(Text, nullable=True)
|
|
74
|
+
user_id: Mapped[uuid.UUID] = mapped_column(ForeignKey("users.id"), nullable=False, index=True)
|
|
75
|
+
created_at: Mapped[datetime] = mapped_column(default=datetime.utcnow)
|
|
76
|
+
|
|
77
|
+
user: Mapped["User"] = relationship(back_populates="resources")
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## JWT Auth Dependency
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from fastapi import Depends, HTTPException, status
|
|
86
|
+
from fastapi.security import OAuth2PasswordBearer
|
|
87
|
+
from jose import JWTError, jwt
|
|
88
|
+
|
|
89
|
+
from app.core.config import settings
|
|
90
|
+
|
|
91
|
+
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/api/auth/login")
|
|
92
|
+
|
|
93
|
+
async def get_current_user(
|
|
94
|
+
token: str = Depends(oauth2_scheme),
|
|
95
|
+
db: AsyncSession = Depends(get_db),
|
|
96
|
+
) -> User:
|
|
97
|
+
try:
|
|
98
|
+
payload = jwt.decode(token, settings.SECRET_KEY, algorithms=["HS256"])
|
|
99
|
+
user_id = payload.get("sub")
|
|
100
|
+
if user_id is None:
|
|
101
|
+
raise HTTPException(status_code=401, detail="Invalid token")
|
|
102
|
+
except JWTError:
|
|
103
|
+
raise HTTPException(status_code=401, detail="Invalid token")
|
|
104
|
+
|
|
105
|
+
user = await db.get(User, user_id)
|
|
106
|
+
if user is None:
|
|
107
|
+
raise HTTPException(status_code=401, detail="User not found")
|
|
108
|
+
return user
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Password Hashing
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
from passlib.context import CryptContext
|
|
117
|
+
|
|
118
|
+
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
|
119
|
+
|
|
120
|
+
def hash_password(password: str) -> str:
|
|
121
|
+
return pwd_context.hash(password)
|
|
122
|
+
|
|
123
|
+
def verify_password(plain: str, hashed: str) -> bool:
|
|
124
|
+
return pwd_context.verify(plain, hashed)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Paginated Query
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from sqlalchemy import select, func
|
|
133
|
+
|
|
134
|
+
async def paginate(
|
|
135
|
+
db: AsyncSession,
|
|
136
|
+
query,
|
|
137
|
+
page: int = 1,
|
|
138
|
+
size: int = 20,
|
|
139
|
+
):
|
|
140
|
+
total = await db.scalar(select(func.count()).select_from(query.subquery()))
|
|
141
|
+
items = await db.scalars(query.offset((page - 1) * size).limit(size))
|
|
142
|
+
return {
|
|
143
|
+
"items": list(items),
|
|
144
|
+
"total": total,
|
|
145
|
+
"page": page,
|
|
146
|
+
"size": size,
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Alembic Migration
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
"""add resources table
|
|
156
|
+
|
|
157
|
+
Revision ID: xxxx
|
|
158
|
+
"""
|
|
159
|
+
from alembic import op
|
|
160
|
+
import sqlalchemy as sa
|
|
161
|
+
from sqlalchemy.dialects.postgresql import UUID
|
|
162
|
+
|
|
163
|
+
def upgrade() -> None:
|
|
164
|
+
op.create_table(
|
|
165
|
+
"resources",
|
|
166
|
+
sa.Column("id", UUID(as_uuid=True), primary_key=True),
|
|
167
|
+
sa.Column("title", sa.String(200), nullable=False),
|
|
168
|
+
sa.Column("description", sa.Text, nullable=True),
|
|
169
|
+
sa.Column("user_id", UUID(as_uuid=True), sa.ForeignKey("users.id"), nullable=False),
|
|
170
|
+
sa.Column("created_at", sa.DateTime, server_default=sa.func.now()),
|
|
171
|
+
)
|
|
172
|
+
op.create_index("ix_resources_user_id", "resources", ["user_id"])
|
|
173
|
+
|
|
174
|
+
def downgrade() -> None:
|
|
175
|
+
op.drop_table("resources")
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Test with httpx
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
import pytest
|
|
184
|
+
from httpx import AsyncClient
|
|
185
|
+
|
|
186
|
+
@pytest.mark.asyncio
|
|
187
|
+
async def test_create_resource(client: AsyncClient, auth_headers: dict):
|
|
188
|
+
response = await client.post(
|
|
189
|
+
"/api/resources/",
|
|
190
|
+
json={"title": "Test", "description": "Test desc"},
|
|
191
|
+
headers=auth_headers,
|
|
192
|
+
)
|
|
193
|
+
assert response.status_code == 201
|
|
194
|
+
data = response.json()
|
|
195
|
+
assert data["title"] == "Test"
|
|
196
|
+
assert "id" in data
|
|
197
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Backend Agent - Tech Stack Reference
|
|
2
|
+
|
|
3
|
+
## Python (Preferred)
|
|
4
|
+
- **Framework**: FastAPI 0.110+
|
|
5
|
+
- **ORM**: SQLAlchemy 2.0 (async)
|
|
6
|
+
- **Validation**: Pydantic v2
|
|
7
|
+
- **Database**: PostgreSQL 16+, Redis 7+
|
|
8
|
+
- **Auth**: python-jose (JWT), passlib (bcrypt)
|
|
9
|
+
- **Testing**: pytest, httpx (async test client)
|
|
10
|
+
- **Migrations**: Alembic
|
|
11
|
+
|
|
12
|
+
## Node.js (Alternative)
|
|
13
|
+
- **Framework**: Express.js, NestJS, Hono
|
|
14
|
+
- **ORM**: Prisma, Drizzle
|
|
15
|
+
- **Validation**: Zod
|
|
16
|
+
- **Auth**: jsonwebtoken, bcrypt
|
|
17
|
+
- **Testing**: Jest, Supertest
|
|
18
|
+
|
|
19
|
+
## Architecture
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
backend/
|
|
23
|
+
domain/ # Business logic (pure Python, no framework deps)
|
|
24
|
+
application/ # Use cases, services
|
|
25
|
+
infrastructure/ # Database, cache, external APIs
|
|
26
|
+
presentation/ # API endpoints, middleware
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Security Requirements
|
|
30
|
+
- Password hashing: bcrypt (cost factor 10-12)
|
|
31
|
+
- JWT: 15min access tokens, 7 day refresh tokens
|
|
32
|
+
- Rate limiting on auth endpoints
|
|
33
|
+
- Input validation with Pydantic/Zod
|
|
34
|
+
- Parameterized queries (never string interpolation)
|
|
35
|
+
|
|
36
|
+
## Serena MCP Shortcuts
|
|
37
|
+
- `find_symbol("create_todo")`: Locate existing function
|
|
38
|
+
- `get_symbols_overview("app/api")`: List all endpoints
|
|
39
|
+
- `find_referencing_symbols("User")`: Find all usages of a model
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit
|
|
3
|
+
description: Create git commits following Conventional Commits specification with project-specific branch naming rules
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Commit Skill - Conventional Commits
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
- 사용자가 "커밋해줘", "commit", "변경사항 저장" 요청 시
|
|
10
|
+
- `/commit` 명령 시
|
|
11
|
+
|
|
12
|
+
## Configuration
|
|
13
|
+
프로젝트별 설정: `.agent/skills/commit/config/commit-config.yaml`
|
|
14
|
+
|
|
15
|
+
## Commit Types
|
|
16
|
+
| Type | Description | Branch Prefix |
|
|
17
|
+
|------|-------------|---------------|
|
|
18
|
+
| feat | 새 기능 추가 | feature/ |
|
|
19
|
+
| fix | 버그 수정 | fix/ |
|
|
20
|
+
| refactor | 코드 개선 | refactor/ |
|
|
21
|
+
| docs | 문서 변경 | docs/ |
|
|
22
|
+
| test | 테스트 추가/수정 | test/ |
|
|
23
|
+
| chore | 빌드, 설정 등 | chore/ |
|
|
24
|
+
| style | 코드 스타일 변경 | style/ |
|
|
25
|
+
| perf | 성능 개선 | perf/ |
|
|
26
|
+
|
|
27
|
+
## Commit Format
|
|
28
|
+
```
|
|
29
|
+
<type>(<scope>): <description>
|
|
30
|
+
|
|
31
|
+
[optional body]
|
|
32
|
+
|
|
33
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
### Step 1: Analyze Changes
|
|
39
|
+
```bash
|
|
40
|
+
git status
|
|
41
|
+
git diff --staged
|
|
42
|
+
git log --oneline -5
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Step 1.5: Split by Feature (if needed)
|
|
46
|
+
변경 파일이 여러 기능/도메인에 걸쳐 있으면, **기능 단위로 커밋을 분리**하라.
|
|
47
|
+
|
|
48
|
+
**분리 기준:**
|
|
49
|
+
- 서로 다른 scope (예: workflows vs skills vs docs)
|
|
50
|
+
- 서로 다른 type (예: feat vs fix vs docs)
|
|
51
|
+
- 논리적으로 독립된 변경사항
|
|
52
|
+
|
|
53
|
+
**예시:**
|
|
54
|
+
```
|
|
55
|
+
# 변경 파일 목록:
|
|
56
|
+
.agent/workflows/*.md (7개) → fix(workflows): ...
|
|
57
|
+
.agent/skills/**/*.md (4개) → fix(skills): ...
|
|
58
|
+
USAGE.md, USAGE-ko.md → docs: ...
|
|
59
|
+
|
|
60
|
+
# 3개의 커밋으로 분리
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**분리하지 않는 경우:**
|
|
64
|
+
- 모든 변경이 하나의 기능에 속함
|
|
65
|
+
- 변경 파일 수가 적음 (5개 이하)
|
|
66
|
+
- 사용자가 단일 커밋 요청
|
|
67
|
+
|
|
68
|
+
### Step 2: Determine Commit Type
|
|
69
|
+
변경 내용 분석 → 적절한 type 선택:
|
|
70
|
+
- 새 파일 추가 → `feat`
|
|
71
|
+
- 버그 수정 → `fix`
|
|
72
|
+
- 리팩토링 → `refactor`
|
|
73
|
+
- 문서만 변경 → `docs`
|
|
74
|
+
- 테스트 추가 → `test`
|
|
75
|
+
- 빌드/설정 변경 → `chore`
|
|
76
|
+
|
|
77
|
+
### Step 3: Determine Scope
|
|
78
|
+
변경된 모듈/컴포넌트를 scope로 사용:
|
|
79
|
+
- `feat(auth)`: 인증 관련
|
|
80
|
+
- `fix(api)`: API 관련
|
|
81
|
+
- `refactor(ui)`: UI 관련
|
|
82
|
+
- scope 없이도 가능: `chore: update dependencies`
|
|
83
|
+
|
|
84
|
+
### Step 4: Write Description
|
|
85
|
+
- 72자 이내
|
|
86
|
+
- 명령형 사용 (add, fix, update, remove...)
|
|
87
|
+
- 첫 글자 소문자
|
|
88
|
+
- 마침표 없음
|
|
89
|
+
|
|
90
|
+
### Step 5: Confirm with User
|
|
91
|
+
```
|
|
92
|
+
📝 커밋 메시지 미리보기:
|
|
93
|
+
|
|
94
|
+
feat(orchestrator): add multi-CLI agent mapping support
|
|
95
|
+
|
|
96
|
+
- Add user-preferences.yaml for CLI configuration
|
|
97
|
+
- Update spawn-agent.sh to read agent-CLI mapping
|
|
98
|
+
- Update memory schema with CLI field
|
|
99
|
+
|
|
100
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
101
|
+
|
|
102
|
+
이대로 커밋하시겠습니까? (Y/N/수정)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 6: Execute Commit
|
|
106
|
+
사용자 확인 후:
|
|
107
|
+
```bash
|
|
108
|
+
git add <specific-files>
|
|
109
|
+
git commit -m "<message>"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## References
|
|
113
|
+
- 설정: `config/commit-config.yaml`
|
|
114
|
+
- 가이드: `resources/conventional-commits.md`
|
|
115
|
+
|
|
116
|
+
## Important Notes
|
|
117
|
+
- **NEVER** commit without user confirmation
|
|
118
|
+
- **NEVER** use `git add -A` or `git add .` without explicit permission
|
|
119
|
+
- **NEVER** commit files that may contain secrets (.env, credentials, etc.)
|
|
120
|
+
- **ALWAYS** use specific file names when staging
|
|
121
|
+
- **ALWAYS** use HEREDOC for multi-line commit messages
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Commit Configuration
|
|
2
|
+
|
|
3
|
+
# Conventional Commits 활성화
|
|
4
|
+
conventional_commits: true
|
|
5
|
+
|
|
6
|
+
# 허용되는 커밋 타입
|
|
7
|
+
types:
|
|
8
|
+
- feat
|
|
9
|
+
- fix
|
|
10
|
+
- refactor
|
|
11
|
+
- docs
|
|
12
|
+
- test
|
|
13
|
+
- chore
|
|
14
|
+
- style
|
|
15
|
+
- perf
|
|
16
|
+
|
|
17
|
+
# 브랜치 접두사 규칙
|
|
18
|
+
branch_prefixes:
|
|
19
|
+
feat: "feature/"
|
|
20
|
+
fix: "fix/"
|
|
21
|
+
refactor: "refactor/"
|
|
22
|
+
docs: "docs/"
|
|
23
|
+
test: "test/"
|
|
24
|
+
chore: "chore/"
|
|
25
|
+
hotfix: "hotfix/"
|
|
26
|
+
style: "style/"
|
|
27
|
+
perf: "perf/"
|
|
28
|
+
|
|
29
|
+
# 커밋 메시지 규칙
|
|
30
|
+
message:
|
|
31
|
+
max_subject_length: 72
|
|
32
|
+
require_body: false
|
|
33
|
+
body_wrap_length: 100
|
|
34
|
+
|
|
35
|
+
# Scope 규칙
|
|
36
|
+
scope:
|
|
37
|
+
required: false
|
|
38
|
+
# 허용되는 scope 목록 (비어있으면 모두 허용)
|
|
39
|
+
allowed: []
|
|
40
|
+
|
|
41
|
+
# Co-Author 설정
|
|
42
|
+
co_author:
|
|
43
|
+
enabled: true
|
|
44
|
+
name: "Claude Opus 4.5"
|
|
45
|
+
email: "noreply@anthropic.com"
|
|
46
|
+
|
|
47
|
+
# 금지된 파일 패턴 (커밋 경고)
|
|
48
|
+
forbidden_patterns:
|
|
49
|
+
- "*.env"
|
|
50
|
+
- "*.env.*"
|
|
51
|
+
- "credentials.json"
|
|
52
|
+
- "secrets.yaml"
|
|
53
|
+
- "*.pem"
|
|
54
|
+
- "*.key"
|
|
55
|
+
- ".env.local"
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Conventional Commits Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Conventional Commits는 커밋 메시지에 일관된 규칙을 적용하여:
|
|
6
|
+
- 자동화된 CHANGELOG 생성
|
|
7
|
+
- Semantic Versioning 자동화
|
|
8
|
+
- 팀원 간 커밋 히스토리 이해도 향상
|
|
9
|
+
|
|
10
|
+
## Commit Message Structure
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
<type>[optional scope]: <description>
|
|
14
|
+
|
|
15
|
+
[optional body]
|
|
16
|
+
|
|
17
|
+
[optional footer(s)]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Types
|
|
21
|
+
|
|
22
|
+
### Primary Types
|
|
23
|
+
|
|
24
|
+
| Type | Description | SemVer | Example |
|
|
25
|
+
|------|-------------|--------|---------|
|
|
26
|
+
| `feat` | 새로운 기능 추가 | MINOR | `feat: add user authentication` |
|
|
27
|
+
| `fix` | 버그 수정 | PATCH | `fix: resolve login timeout issue` |
|
|
28
|
+
|
|
29
|
+
### Secondary Types
|
|
30
|
+
|
|
31
|
+
| Type | Description | SemVer | Example |
|
|
32
|
+
|------|-------------|--------|---------|
|
|
33
|
+
| `docs` | 문서 변경 | - | `docs: update API documentation` |
|
|
34
|
+
| `style` | 코드 스타일 변경 (포맷팅, 세미콜론 등) | - | `style: fix indentation` |
|
|
35
|
+
| `refactor` | 기능 변경 없는 코드 개선 | - | `refactor: extract helper function` |
|
|
36
|
+
| `perf` | 성능 개선 | PATCH | `perf: optimize database queries` |
|
|
37
|
+
| `test` | 테스트 추가/수정 | - | `test: add unit tests for auth` |
|
|
38
|
+
| `chore` | 빌드, 설정, 패키지 관련 | - | `chore: update dependencies` |
|
|
39
|
+
|
|
40
|
+
## Scope
|
|
41
|
+
|
|
42
|
+
Scope는 변경된 코드의 영역을 나타냅니다:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
feat(auth): add OAuth2 support
|
|
46
|
+
fix(api): handle null response
|
|
47
|
+
refactor(ui): simplify button component
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Common Scopes
|
|
51
|
+
- `auth` - 인증/인가
|
|
52
|
+
- `api` - API 엔드포인트
|
|
53
|
+
- `ui` - 사용자 인터페이스
|
|
54
|
+
- `db` - 데이터베이스
|
|
55
|
+
- `config` - 설정
|
|
56
|
+
- `deps` - 의존성
|
|
57
|
+
|
|
58
|
+
## Description
|
|
59
|
+
|
|
60
|
+
- **명령형** 사용: "add", "fix", "update" (NOT "added", "fixed", "updates")
|
|
61
|
+
- **첫 글자 소문자**
|
|
62
|
+
- **마침표 없음**
|
|
63
|
+
- **72자 이내**
|
|
64
|
+
|
|
65
|
+
### Good Examples
|
|
66
|
+
```
|
|
67
|
+
feat(auth): add JWT token refresh mechanism
|
|
68
|
+
fix(api): handle empty response from payment gateway
|
|
69
|
+
refactor(ui): extract common button styles
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Bad Examples
|
|
73
|
+
```
|
|
74
|
+
feat(auth): Added JWT token refresh mechanism. # 과거형, 마침표
|
|
75
|
+
fix: fix bug # 설명 부족
|
|
76
|
+
Update the authentication system to support OAuth2 tokens and refresh mechanism # 너무 김
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Body
|
|
80
|
+
|
|
81
|
+
Body는 선택사항이지만, 복잡한 변경사항에 유용합니다:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
feat(auth): add multi-factor authentication
|
|
85
|
+
|
|
86
|
+
Implement TOTP-based two-factor authentication:
|
|
87
|
+
- Add QR code generation for authenticator apps
|
|
88
|
+
- Store encrypted TOTP secrets in database
|
|
89
|
+
- Add backup codes for account recovery
|
|
90
|
+
|
|
91
|
+
Closes #123
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Breaking Changes
|
|
95
|
+
|
|
96
|
+
Breaking change는 `!` 또는 footer로 표시:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
feat(api)!: change response format for user endpoint
|
|
100
|
+
|
|
101
|
+
BREAKING CHANGE: The user endpoint now returns a nested object
|
|
102
|
+
instead of a flat structure. Update client code accordingly.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Footer
|
|
106
|
+
|
|
107
|
+
### Issue References
|
|
108
|
+
```
|
|
109
|
+
feat(auth): add password reset flow
|
|
110
|
+
|
|
111
|
+
Closes #456
|
|
112
|
+
Refs #123, #789
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Co-Authors
|
|
116
|
+
```
|
|
117
|
+
feat(ui): redesign dashboard
|
|
118
|
+
|
|
119
|
+
Co-Authored-By: Jane Doe <jane@example.com>
|
|
120
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Branch Naming Convention
|
|
124
|
+
|
|
125
|
+
| Type | Branch Prefix | Example |
|
|
126
|
+
|------|---------------|---------|
|
|
127
|
+
| feat | `feature/` | `feature/user-auth` |
|
|
128
|
+
| fix | `fix/` | `fix/login-timeout` |
|
|
129
|
+
| refactor | `refactor/` | `refactor/api-cleanup` |
|
|
130
|
+
| docs | `docs/` | `docs/api-guide` |
|
|
131
|
+
| hotfix | `hotfix/` | `hotfix/security-patch` |
|
|
132
|
+
|
|
133
|
+
## Commit Workflow
|
|
134
|
+
|
|
135
|
+
1. **Stage specific files** (NOT `git add .`):
|
|
136
|
+
```bash
|
|
137
|
+
git add src/auth/login.ts
|
|
138
|
+
git add tests/auth/login.test.ts
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
2. **Write commit message**:
|
|
142
|
+
```bash
|
|
143
|
+
git commit -m "$(cat <<'EOF'
|
|
144
|
+
feat(auth): add login rate limiting
|
|
145
|
+
|
|
146
|
+
- Limit failed attempts to 5 per minute
|
|
147
|
+
- Add exponential backoff for repeated failures
|
|
148
|
+
- Log suspicious activity
|
|
149
|
+
|
|
150
|
+
Closes #234
|
|
151
|
+
|
|
152
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
153
|
+
EOF
|
|
154
|
+
)"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
3. **Verify**:
|
|
158
|
+
```bash
|
|
159
|
+
git log -1 --format=full
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Resources
|
|
163
|
+
|
|
164
|
+
- [Conventional Commits Specification](https://www.conventionalcommits.org/)
|
|
165
|
+
- [Semantic Versioning](https://semver.org/)
|
|
166
|
+
- [Angular Commit Guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-agent
|
|
3
|
+
description: Bug diagnosis and fixing specialist - analyzes errors, identifies root causes, provides fixes, and writes regression tests
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debug Agent - Bug Fixing Specialist
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
- User reports a bug with error messages
|
|
10
|
+
- Something is broken and needs fixing
|
|
11
|
+
- Performance issues or slowdowns
|
|
12
|
+
- Intermittent failures or race conditions
|
|
13
|
+
- Regression bugs
|
|
14
|
+
|
|
15
|
+
## When NOT to use
|
|
16
|
+
- Building new features -> use Frontend/Backend/Mobile agents
|
|
17
|
+
- General code review -> use QA Agent
|
|
18
|
+
|
|
19
|
+
## Core Rules
|
|
20
|
+
1. Reproduce first, then diagnose - never guess at fixes
|
|
21
|
+
2. Identify root cause, not just symptoms
|
|
22
|
+
3. Minimal fix: change only what's necessary
|
|
23
|
+
4. Every fix gets a regression test
|
|
24
|
+
5. Search for similar patterns elsewhere after fixing
|
|
25
|
+
6. Document in `.gemini/antigravity/brain/bugs/`
|
|
26
|
+
|
|
27
|
+
## How to Execute
|
|
28
|
+
Follow `resources/execution-protocol.md` step by step.
|
|
29
|
+
See `resources/examples.md` for input/output examples.
|
|
30
|
+
Before submitting, run `resources/checklist.md`.
|
|
31
|
+
|
|
32
|
+
## Serena MCP
|
|
33
|
+
- `find_symbol("functionName")`: Locate the function
|
|
34
|
+
- `find_referencing_symbols("Component")`: Find all usages
|
|
35
|
+
- `search_for_pattern("error pattern")`: Find similar issues
|
|
36
|
+
|
|
37
|
+
## Serena Memory (CLI Mode)
|
|
38
|
+
See `../_shared/serena-memory-protocol.md`.
|
|
39
|
+
|
|
40
|
+
## References
|
|
41
|
+
- Execution steps: `resources/execution-protocol.md`
|
|
42
|
+
- Code examples: `resources/examples.md`
|
|
43
|
+
- Checklist: `resources/checklist.md`
|
|
44
|
+
- Error recovery: `resources/error-playbook.md`
|
|
45
|
+
- Bug report template: `resources/bug-report-template.md`
|
|
46
|
+
- Common patterns: `resources/common-patterns.md`
|
|
47
|
+
- Debugging checklist: `resources/debugging-checklist.md`
|
|
48
|
+
- Context loading: `../_shared/context-loading.md`
|
|
49
|
+
- Reasoning templates: `../_shared/reasoning-templates.md`
|
|
50
|
+
- Context budget: `../_shared/context-budget.md`
|
|
51
|
+
- Lessons learned: `../_shared/lessons-learned.md`
|