@agentsmd/preset-github 0.0.0-stage → 0.5.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/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/files/.github/ISSUE_TEMPLATE/bug.yml +43 -0
- package/files/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/files/.github/ISSUE_TEMPLATE/feature.yml +28 -0
- package/files/.github/pull_request_template.md +30 -0
- package/files/docs/github.md +64 -0
- package/package.json +43 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 이태경
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @agentsmd/preset-github
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[`@agentsmd/cli`](https://www.npmjs.com/package/@agentsmd/cli)의 GitHub 프리셋입니다.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @agentsmd/cli init --preset git,github,typescript # Git 규칙 + GitHub + 언어 규칙
|
|
7
|
+
npx @agentsmd/cli init --preset github # GitHub 템플릿만
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
- 이슈 템플릿(기능·버그, 빈 이슈 막기)과 PR 템플릿
|
|
11
|
+
- `docs/github.md`: gh 명령, 머지 방식·룰셋 설정, CI 연결 방법
|
|
12
|
+
- CI 설정 파일은 설치하지 않습니다. GitHub를 써도 CI는 GitHub Actions, Jenkins 등 무엇이든 쓸 수 있어서, 연결 방법만 문서로 안내합니다.
|
|
13
|
+
- Git 작업 규칙과 PR 규칙 검사 스크립트(`.githooks/check-pr`)는 [Git 프리셋](https://www.npmjs.com/package/@agentsmd/preset-git)을 함께 고르면 더해집니다.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub 저장소용 프리셋.
|
|
3
|
+
*
|
|
4
|
+
* 이슈·PR 템플릿과 GitHub 저장소 설정 안내를 담는다. CI 설정 파일은 넣지 않는다.
|
|
5
|
+
* GitHub를 쓰면서 CI는 Jenkins 등으로 돌리는 저장소도 있어서, CI는 사용자가 고르고 문서로만 연결 방법을 안내한다.
|
|
6
|
+
* Git 작업 규칙은 Git 프리셋을 함께 고르면 더해진다.
|
|
7
|
+
*/
|
|
8
|
+
export declare const githubPreset: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
filesDir: string;
|
|
12
|
+
docs: {
|
|
13
|
+
path: string;
|
|
14
|
+
when: string;
|
|
15
|
+
}[];
|
|
16
|
+
rules: string[];
|
|
17
|
+
nextSteps: string[];
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;CAUP,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
/**
|
|
3
|
+
* GitHub 저장소용 프리셋.
|
|
4
|
+
*
|
|
5
|
+
* 이슈·PR 템플릿과 GitHub 저장소 설정 안내를 담는다. CI 설정 파일은 넣지 않는다.
|
|
6
|
+
* GitHub를 쓰면서 CI는 Jenkins 등으로 돌리는 저장소도 있어서, CI는 사용자가 고르고 문서로만 연결 방법을 안내한다.
|
|
7
|
+
* Git 작업 규칙은 Git 프리셋을 함께 고르면 더해진다.
|
|
8
|
+
*/
|
|
9
|
+
export const githubPreset = {
|
|
10
|
+
name: "github",
|
|
11
|
+
description: "GitHub 이슈·PR 템플릿, 저장소 설정 안내",
|
|
12
|
+
filesDir: fileURLToPath(new URL("../files", import.meta.url)),
|
|
13
|
+
docs: [{ path: "docs/github.md", when: "이슈·PR 작성, gh 명령, 저장소 설정, CI 연결" }],
|
|
14
|
+
rules: ["이슈와 PR은 `.github/`의 템플릿을 채워 만든다."],
|
|
15
|
+
nextSteps: [
|
|
16
|
+
"GitHub 저장소 설정에서 머지 방식을 'Allow merge commits'만 허용하세요. → docs/github.md",
|
|
17
|
+
"main 브랜치 룰셋을 만들고 CI 검사를 필수 체크로 거세요. → docs/github.md",
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,6BAA6B;IAC1C,QAAQ,EAAE,aAAa,CAAC,IAAI,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7D,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAAC;IAC1E,KAAK,EAAE,CAAC,kCAAkC,CAAC;IAC3C,SAAS,EAAE;QACT,uEAAuE;QACvE,sDAAsD;KACvD;CACe,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: 버그
|
|
2
|
+
description: 기대와 다르게 동작하는 문제
|
|
3
|
+
title: '[Fix] '
|
|
4
|
+
labels: [bug]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: actual
|
|
8
|
+
attributes:
|
|
9
|
+
label: 현상
|
|
10
|
+
description: 무엇이 잘못 동작하나. 화면 캡처, 로그, 오류 메시지가 있으면 붙인다
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: steps
|
|
15
|
+
attributes:
|
|
16
|
+
label: 재현 방법
|
|
17
|
+
placeholder: |
|
|
18
|
+
1.
|
|
19
|
+
2.
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: expected
|
|
24
|
+
attributes:
|
|
25
|
+
label: 기대 동작
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: input
|
|
29
|
+
id: platform
|
|
30
|
+
attributes:
|
|
31
|
+
label: 기기·브라우저·OS
|
|
32
|
+
description: 화면이나 클라이언트 문제일 때 적는다
|
|
33
|
+
placeholder: 예) iPhone 15 Safari, macOS Chrome
|
|
34
|
+
- type: dropdown
|
|
35
|
+
id: env
|
|
36
|
+
attributes:
|
|
37
|
+
label: 환경
|
|
38
|
+
options:
|
|
39
|
+
- 로컬
|
|
40
|
+
- 개발 서버
|
|
41
|
+
- 운영
|
|
42
|
+
validations:
|
|
43
|
+
required: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: 기능
|
|
2
|
+
description: 기능 추가·변경, 리팩터링, 설정 등 버그가 아닌 작업
|
|
3
|
+
title: '[Feat] '
|
|
4
|
+
labels: [enhancement]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: background
|
|
8
|
+
attributes:
|
|
9
|
+
label: 배경
|
|
10
|
+
description: 왜 이 작업이 필요한가
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: tasks
|
|
15
|
+
attributes:
|
|
16
|
+
label: 할 일
|
|
17
|
+
description: 커밋 단위로 나눈 작업 목록
|
|
18
|
+
value: |
|
|
19
|
+
- [ ]
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: done
|
|
24
|
+
attributes:
|
|
25
|
+
label: 완료 조건
|
|
26
|
+
description: 무엇이 되면 이 이슈를 닫을 수 있나 (동작, 테스트 등)
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
작성 규칙: docs/git-conventions.md, docs/writing-style.md
|
|
3
|
+
- 짧게, 사실만. 빈 섹션은 지운다.
|
|
4
|
+
- 변경 파일 나열 금지.
|
|
5
|
+
- 이 PR로 이슈가 끝나지 않으면 `Closes #` 줄을 지운다.
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
Closes #
|
|
9
|
+
|
|
10
|
+
## 변경 내용
|
|
11
|
+
|
|
12
|
+
-
|
|
13
|
+
|
|
14
|
+
## 확인 방법
|
|
15
|
+
|
|
16
|
+
<!-- 실행한 검증, 추가·수정한 테스트, 확인한 동작 -->
|
|
17
|
+
|
|
18
|
+
## 확인할 부분
|
|
19
|
+
|
|
20
|
+
<!-- 리뷰어가 꼭 봐야 할 지점. 없으면 지운다 -->
|
|
21
|
+
|
|
22
|
+
## 화면
|
|
23
|
+
|
|
24
|
+
<!-- 화면이 바뀌었다면 변경 전·후 캡처. 없으면 지운다 -->
|
|
25
|
+
|
|
26
|
+
## 체크리스트
|
|
27
|
+
|
|
28
|
+
- [ ] PR 제목이 `[<타입>] <한국어 요약>` 형식이다 (예: `[Feat] 주문 취소 사유 필드 추가`)
|
|
29
|
+
- [ ] 커밋 하나에 하나의 책임만 담았다
|
|
30
|
+
- [ ] CI가 통과한다
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# GitHub 사용법
|
|
2
|
+
|
|
3
|
+
이 저장소는 GitHub에서 이슈·PR을 관리한다. 작업 흐름 자체는 Git 작업 규칙 문서를 따르고, 이 문서는 GitHub에서만 필요한 것을 적는다.
|
|
4
|
+
|
|
5
|
+
## 템플릿
|
|
6
|
+
|
|
7
|
+
| 파일 | 용도 |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `.github/ISSUE_TEMPLATE/feature.yml` | 기능 이슈 |
|
|
10
|
+
| `.github/ISSUE_TEMPLATE/bug.yml` | 버그 이슈 |
|
|
11
|
+
| `.github/ISSUE_TEMPLATE/config.yml` | 빈 이슈를 막는다 |
|
|
12
|
+
| `.github/pull_request_template.md` | PR 본문 |
|
|
13
|
+
|
|
14
|
+
이슈는 템플릿 중 하나를 골라 채운다. PR 본문은 템플릿을 채우고, 이 PR로 이슈가 끝나면 `Closes #<이슈번호>`를 넣어 머지 시 이슈가 닫히게 한다.
|
|
15
|
+
이슈·PR 제목은 `[<타입>] <요약>` 형식이다 (예: `[Feat] 주문 취소 사유 필드 추가`). 커밋 메시지(`feat: 요약`)와 다르다.
|
|
16
|
+
|
|
17
|
+
## gh 명령
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
gh issue create --template feature.yml
|
|
21
|
+
gh pr create --base main --title "[<타입>] <요약>" --body-file <본문 파일>
|
|
22
|
+
gh pr view <PR번호> --json reviews,comments
|
|
23
|
+
gh api repos/{owner}/{repo}/pulls/<PR번호>/comments
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
PR 리뷰를 확인할 때는 마지막 두 명령으로 리뷰와 줄 단위 코멘트를 모두 본다.
|
|
27
|
+
|
|
28
|
+
## 저장소 설정
|
|
29
|
+
|
|
30
|
+
사람이 GitHub 화면에서 한 번 설정한다.
|
|
31
|
+
|
|
32
|
+
- **Settings → General → Pull Requests**: `Allow merge commits`만 켠다. squash·rebase 머지는 끈다.
|
|
33
|
+
- **Settings → Rules → Rulesets**: `main`에 룰셋을 만든다.
|
|
34
|
+
- 삭제와 force push를 막는다.
|
|
35
|
+
- PR을 거쳐야 머지되게 한다.
|
|
36
|
+
- CI 검사를 필수 체크로 건다. PR 규칙 검사를 CI에 연결했다면 그 검사도 넣는다.
|
|
37
|
+
|
|
38
|
+
## CI 연결
|
|
39
|
+
|
|
40
|
+
이 프리셋은 CI 설정 파일을 설치하지 않는다. GitHub를 써도 CI는 GitHub Actions, Jenkins 등 무엇이든 쓸 수 있기 때문이다.
|
|
41
|
+
GitHub Actions를 쓰고 Git 프리셋의 PR 규칙 검사(`.githooks/check-pr`)를 함께 설치했다면, 아래 파일을 `.github/workflows/conventions.yml`로 만든다.
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
name: Conventions
|
|
45
|
+
|
|
46
|
+
on:
|
|
47
|
+
pull_request:
|
|
48
|
+
types: [opened, edited, synchronize, reopened]
|
|
49
|
+
|
|
50
|
+
permissions: {}
|
|
51
|
+
|
|
52
|
+
jobs:
|
|
53
|
+
conventions:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v7
|
|
57
|
+
# PR 제목은 작성자가 쓴 값이라 스크립트에 직접 넣지 않고 환경변수로 넘긴다
|
|
58
|
+
- run: .githooks/check-pr
|
|
59
|
+
env:
|
|
60
|
+
BRANCH: ${{ github.head_ref }}
|
|
61
|
+
TITLE: ${{ github.event.pull_request.title }}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
만든 뒤 룰셋의 필수 체크에 `conventions`를 추가한다.
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentsmd/preset-github",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "GitHub 저장소용 AI 작업 지침 프리셋 (이슈·PR 템플릿, 저장소 설정·CI 연결 안내)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"agents.md",
|
|
7
|
+
"ai-agent",
|
|
8
|
+
"github",
|
|
9
|
+
"issue-template",
|
|
10
|
+
"pull-request-template"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/xoruddl/agentsmd-kit#readme",
|
|
13
|
+
"bugs": "https://github.com/xoruddl/agentsmd-kit/issues",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/xoruddl/agentsmd-kit.git",
|
|
17
|
+
"directory": "packages/preset-github"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "이태경 (https://github.com/xoruddl)",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"files"
|
|
31
|
+
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=22"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@agentsmd/core": "0.5.0"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc -p tsconfig.build.json",
|
|
43
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
44
|
+
"test": "vitest run"
|
|
45
|
+
}
|
|
6
46
|
}
|