commitgate 0.1.0 โ 0.1.2
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/README.en.md +217 -0
- package/README.md +126 -133
- package/package.json +3 -2
package/README.en.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# CommitGate
|
|
2
|
+
|
|
3
|
+
๐ [ํ๊ตญ์ด](./README.md) ยท **English**
|
|
4
|
+
|
|
5
|
+
**A commit gate that blocks AI-generated code from being committed until Codex has reviewed and approved it.**
|
|
6
|
+
|
|
7
|
+
AI coding agents can move quickly, but unreviewed changes should not go straight into your history. CommitGate wraps each change in a REQ ticket and only allows the staged tree approved by Codex to be committed. If the code changes after approval, or if evidence is missing, it fails closed.
|
|
8
|
+
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
Run this from your project root. The project must be a **git repository with a `package.json`**.
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npx commitgate
|
|
19
|
+
npm install
|
|
20
|
+
codex --version
|
|
21
|
+
codex login status
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then paste this prompt into your AI coding agent.
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
Do not handle this as a normal implementation. Use the CommitGate workflow installed in this project.
|
|
28
|
+
|
|
29
|
+
Create a new REQ ticket and run this flow end to end:
|
|
30
|
+
req:new โ write design docs โ Codex design review โ implement and test โ req:doctor โ Codex phase review โ req:commit
|
|
31
|
+
|
|
32
|
+
Proceed automatically:
|
|
33
|
+
- If Codex returns NEEDS_FIX, fix the findings and rerun review until approved.
|
|
34
|
+
- The review target is only what has been staged with git add.
|
|
35
|
+
- Do not manually git add state.json or responses/.
|
|
36
|
+
|
|
37
|
+
Stop for human confirmation only:
|
|
38
|
+
- Right before req:commit --run
|
|
39
|
+
- Before merging to main or pushing
|
|
40
|
+
- Before destructive actions such as reset, clean, or force push
|
|
41
|
+
- When the requested scope must change
|
|
42
|
+
- When Codex review is still not approved after 3 rounds
|
|
43
|
+
|
|
44
|
+
Requirement:
|
|
45
|
+
- What:
|
|
46
|
+
- Why:
|
|
47
|
+
- Constraints:
|
|
48
|
+
- Done when:
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The agent's first reply should look roughly like this.
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
REQ-2026-002 created
|
|
55
|
+
Branch: feat/req-2026-002-profile-edit-api
|
|
56
|
+
Phases:
|
|
57
|
+
- phase-1: implement PATCH /profile
|
|
58
|
+
- phase-2: tests and regression checks
|
|
59
|
+
Control points: before req:commit --run, before push
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
After that, the agent runs design, implementation, tests, and Codex review. You only confirm at control points such as commit or push.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## What Does It Enforce?
|
|
67
|
+
|
|
68
|
+
CommitGate is designed to block **unreviewed changes from being committed**, not just to wrap commands.
|
|
69
|
+
|
|
70
|
+
- No Codex approval means no commit.
|
|
71
|
+
- If the approved staged tree differs from the current staged tree, the commit is blocked.
|
|
72
|
+
- Workflow files such as `state.json` and `responses/` cannot be mixed into the source commit.
|
|
73
|
+
- If Codex CLI is missing or fails, the workflow fails instead of silently passing.
|
|
74
|
+
- Approval responses and evidence are kept under `workflow/REQ-.../responses/`.
|
|
75
|
+
|
|
76
|
+
In short: **approved changes pass, ambiguous changes stop.**
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## What Installation Adds
|
|
81
|
+
|
|
82
|
+
`npx commitgate` adds the following to the target project. Existing files are not overwritten by default.
|
|
83
|
+
|
|
84
|
+
| Added item | Purpose |
|
|
85
|
+
|---|---|
|
|
86
|
+
| `scripts/req/` | `req:new`, `req:review-codex`, `req:doctor`, `req:commit` scripts |
|
|
87
|
+
| `workflow/*.schema.json` | Schemas for Codex responses and config |
|
|
88
|
+
| `req.config.json` | Project-level configuration |
|
|
89
|
+
| `AGENTS.md` | Template rules for the agent and reviewer |
|
|
90
|
+
| `package.json` scripts | `req:*` commands and required devDependencies |
|
|
91
|
+
|
|
92
|
+
Preview without writing files:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
npx commitgate --dry-run
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Prerequisites
|
|
101
|
+
|
|
102
|
+
| Requirement | Check | Notes |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| Git | `git --version` | Required |
|
|
105
|
+
| Node.js 18.17+ | `node --version` | Required |
|
|
106
|
+
| npm, pnpm, or yarn | `npm --version` | Examples use npm |
|
|
107
|
+
| Codex CLI | `codex --version` | Required for review runs |
|
|
108
|
+
|
|
109
|
+
If Codex CLI is not installed:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
npm install -g @openai/codex
|
|
113
|
+
codex login
|
|
114
|
+
codex login status
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
On Windows, if `codex` is not found right after installation, open a new terminal so PATH is reloaded.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Manual Commands
|
|
122
|
+
|
|
123
|
+
Most users should use the prompt flow above. This section is for understanding what the workflow runs internally or for debugging.
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
# 1. Create a ticket and branch
|
|
127
|
+
npm run req:new -- my-feature --run
|
|
128
|
+
|
|
129
|
+
# 2. Write design docs, then stage them
|
|
130
|
+
git add workflow/REQ-2026-001/00-requirement.md workflow/REQ-2026-001/01-design.md workflow/REQ-2026-001/02-plan.md
|
|
131
|
+
|
|
132
|
+
# 3. Design review
|
|
133
|
+
npm run req:review-codex -- 2026-001 --kind design --run
|
|
134
|
+
|
|
135
|
+
# 4. Implement code, then stage source files
|
|
136
|
+
git add <changed-source-files>
|
|
137
|
+
|
|
138
|
+
# 5. Gate check
|
|
139
|
+
npm run req:doctor -- 2026-001
|
|
140
|
+
|
|
141
|
+
# 6. Implementation review
|
|
142
|
+
npm run req:review-codex -- 2026-001 --kind phase --run
|
|
143
|
+
|
|
144
|
+
# 7. Commit approved code
|
|
145
|
+
npm run req:commit -- 2026-001 --run -m "feat: my feature"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Important: only stage code and documents you authored for the source commit. `state.json` and `responses/` are managed by the tool.
|
|
149
|
+
|
|
150
|
+
For multi-line commit messages, use a file instead of `-m`.
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
npm run req:commit -- 2026-001 --run --message-file commit-message.txt
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Command Cheat Sheet
|
|
159
|
+
|
|
160
|
+
| Command | Purpose |
|
|
161
|
+
|---|---|
|
|
162
|
+
| `npx commitgate` | Install CommitGate into a project |
|
|
163
|
+
| `req:new <slug> --run` | Create a REQ ticket, branch, and design docs |
|
|
164
|
+
| `req:review-codex <id> --kind design --run` | Review the design |
|
|
165
|
+
| `req:review-codex <id> --kind phase --run` | Review the implementation |
|
|
166
|
+
| `req:doctor <id>` | Check gate status |
|
|
167
|
+
| `req:commit <id> --run -m "message"` | Commit approved changes |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Configuration
|
|
172
|
+
|
|
173
|
+
Defaults are enough for most projects. If needed, edit `req.config.json` in the project root.
|
|
174
|
+
|
|
175
|
+
| Key | Default | Meaning |
|
|
176
|
+
|---|---|---|
|
|
177
|
+
| `branchPrefix` | `"feat/req-"` | Prefix for new branches |
|
|
178
|
+
| `ticketRoot` | `"workflow"` | REQ ticket directory |
|
|
179
|
+
| `packageManager` | auto-detected | `npm`, `pnpm`, or `yarn` |
|
|
180
|
+
| `designDocs` | `00/01/02` docs | Design document filenames |
|
|
181
|
+
|
|
182
|
+
Empty `branchPrefix` values and paths that escape the project root are rejected.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## FAQ
|
|
187
|
+
|
|
188
|
+
**What happens if Codex CLI is missing?**
|
|
189
|
+
The review command fails. It is not treated as approval.
|
|
190
|
+
|
|
191
|
+
**Can I edit code after approval and still commit?**
|
|
192
|
+
No. If the staged tree changes after approval, CommitGate treats the approval as stale and requires review again.
|
|
193
|
+
|
|
194
|
+
**Why should I not stage `state.json` or `responses/`?**
|
|
195
|
+
They are workflow state and evidence files. Mixing them into the source commit weakens the approval binding, so `req:commit` blocks it.
|
|
196
|
+
|
|
197
|
+
**Does running install twice overwrite files?**
|
|
198
|
+
No. Existing files are skipped. Use `--force` if you intentionally want to refresh them.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Current Scope
|
|
203
|
+
|
|
204
|
+
The current release is **Stage A: vendored scaffold model**. `npx commitgate` copies workflow files into the target project.
|
|
205
|
+
|
|
206
|
+
Future scope:
|
|
207
|
+
|
|
208
|
+
- Running directly from `node_modules` as a library-style model
|
|
209
|
+
- Non-git VCS support
|
|
210
|
+
- More design document templates
|
|
211
|
+
- Broader Linux/macOS CI smoke coverage
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
[MIT](./LICENSE) ยฉ 2026 sol5288
|
package/README.md
CHANGED
|
@@ -1,224 +1,217 @@
|
|
|
1
|
-
# CommitGate
|
|
1
|
+
# CommitGate
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
๐ **ํ๊ตญ์ด** ยท [English](./README.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**AI ์ฝ๋ฉ ๋ณ๊ฒฝ์ Codex ๋ฆฌ๋ทฐ ์น์ธ ์์ด๋ ์ปค๋ฐํ์ง ๋ชปํ๊ฒ ๋ง๋ ์ปค๋ฐ ๊ฒ์ดํธ์
๋๋ค.**
|
|
6
|
+
|
|
7
|
+
AI ์์ด์ ํธ๊ฐ ์ฝ๋๋ฅผ ๋น ๋ฅด๊ฒ ๋ง๋ค๋๋ผ๋, ๋ฆฌ๋ทฐ ์์ด ๋ฐ๋ก ์ปค๋ฐ๋๋ฉด ์ํํฉ๋๋ค. CommitGate๋ ๋ณ๊ฒฝ์ ํฐ์ผ ๋จ์๋ก ๋ฌถ๊ณ , Codex๊ฐ ์น์ธํ staged tree๋ง ์ปค๋ฐ๋๊ฒ ํฉ๋๋ค. ์น์ธ ํ ์ฝ๋๊ฐ ๋ฐ๋๊ฑฐ๋ ์ฆ๊ฑฐ๊ฐ ๋ถ์กฑํ๋ฉด ๊ธฐ๋ณธ์ ์ผ๋ก ๋ง์ต๋๋ค.
|
|
6
8
|
|
|
7
9
|
[](./LICENSE)
|
|
8
10
|
|
|
9
11
|
---
|
|
10
12
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
๊ณตํญ ๋ณด์ ๊ฒ์๋๋ฅผ ๋ ์ฌ๋ ค ๋ณด์ธ์. ์๋ฌด๋ฆฌ ๊ธํด๋ **๊ฒ์๋๋ฅผ ํต๊ณผํ์ง ์์ผ๋ฉด** ํ์น๊ตฌ๋ก ๊ฐ ์ ์์ฃ .
|
|
13
|
+
## Quick Start
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
์๋๋ ๊ฐ์ฅ ์งง์ ์ฌ์ฉ ๊ฒฝ๋ก์
๋๋ค. ํ๋ก์ ํธ ๋ฃจํธ๋ **git ์ ์ฅ์์ด๊ณ `package.json`์ด ์๋ ํด๋**์ฌ์ผ ํฉ๋๋ค.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
```sh
|
|
18
|
+
npx commitgate
|
|
19
|
+
npm install
|
|
20
|
+
codex --version
|
|
21
|
+
codex login status
|
|
22
|
+
```
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
๊ทธ๋ค์ AI ์ฝ๋ฉ ์์ด์ ํธ์๊ฒ ์๋ ํ๋กฌํํธ๋ฅผ ๋ถ์ฌ๋ฃ์ต๋๋ค.
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
```text
|
|
27
|
+
์ด ์์ฒญ์ ์ผ๋ฐ ๊ตฌํ์ผ๋ก ์ฒ๋ฆฌํ์ง ๋ง๊ณ , ์ด ํ๋ก์ ํธ์ ์ค์น๋ CommitGate๋ฅผ ์ฌ์ฉํด๋ผ.
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
์ REQ ํฐ์ผ์ ๋ง๋ค๊ณ ๋ค์ ํ๋ฆ์ ๋๊น์ง ์งํํด๋ผ:
|
|
30
|
+
req:new โ ์ค๊ณ๋ฌธ์ ์์ฑ โ Codex design ๋ฆฌ๋ทฐ โ ๊ตฌํยทํ
์คํธ โ req:doctor โ Codex phase ๋ฆฌ๋ทฐ โ req:commit
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
32
|
+
์๋์ผ๋ก ์งํํ ๊ฒ:
|
|
33
|
+
- NEEDS_FIX๊ฐ ๋์ค๋ฉด ์์ ํ๊ณ ์ฌ๋ฆฌ๋ทฐํด ์น์ธ๊น์ง ๋ฐ๋ณตํ๋ค.
|
|
34
|
+
- ๋ฆฌ๋ทฐ ๋์์ git add ํ ํ์ผ๋ง์ด๋ค.
|
|
35
|
+
- `state.json`๊ณผ `responses/`๋ ์ง์ `git add`ํ์ง ์๋๋ค.
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
๋ฉ์ถฐ์ ํ์ธ๋ฐ์ ๋:
|
|
38
|
+
- req:commit --run ์ง์
|
|
39
|
+
- main ๋ณํฉ ๋๋ push ์ง์
|
|
40
|
+
- reset, clean, force push ๊ฐ์ destructive ์์
์
|
|
41
|
+
- ์๊ตฌ์ฌํญ ๋ฒ์๋ฅผ ๋ฐ๊ฟ์ผ ํ ๋
|
|
42
|
+
- Codex ๋ฆฌ๋ทฐ๊ฐ 3๋ผ์ด๋๋ฅผ ๋์ด๋ ์น์ธ๋์ง ์์ ๋
|
|
33
43
|
|
|
44
|
+
์๊ตฌ์ฌํญ:
|
|
45
|
+
- ๋ฌด์์:
|
|
46
|
+
- ์:
|
|
47
|
+
- ์ ์ฝ:
|
|
48
|
+
- ์๋ฃ ๊ธฐ์ค:
|
|
34
49
|
```
|
|
35
|
-
โ ํฐ์ผ ๋ง๋ค๊ธฐ โ โก ์ค๊ณ ์์ฑ โ โข ์ค๊ณ ๋ฆฌ๋ทฐ(Codex) โ โฃ ์ฝ๋ ๊ตฌํ
|
|
36
|
-
req:new req:review-codex
|
|
37
50
|
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
์ฒซ ์๋ต์ ๋ณดํต ์ด๋ ๊ฒ ๋์์ผ ํฉ๋๋ค.
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
REQ-2026-002 ๋ฐํ
|
|
55
|
+
๋ธ๋์น: feat/req-2026-002-profile-edit-api
|
|
56
|
+
phase:
|
|
57
|
+
- phase-1: PATCH /profile ๊ตฌํ
|
|
58
|
+
- phase-2: ํ
์คํธ์ ํ๊ท ํ์ธ
|
|
59
|
+
ํต์ ์ : req:commit --run ์ง์ , push ์ง์
|
|
40
60
|
```
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
์ดํ์๋ ์์ด์ ํธ๊ฐ ์ค๊ณ, ๊ตฌํ, ํ
์คํธ, Codex ๋ฆฌ๋ทฐ๋ฅผ ์งํํฉ๋๋ค. ์ฌ์ฉ์๋ ์ปค๋ฐ์ด๋ push ๊ฐ์ ํต์ ์ ์์๋ง ํ์ธํ๋ฉด ๋ฉ๋๋ค.
|
|
43
63
|
|
|
44
64
|
---
|
|
45
65
|
|
|
46
|
-
##
|
|
66
|
+
## ๋ฌด์์ ๋ณด์ฅํ๋์?
|
|
47
67
|
|
|
48
|
-
|
|
68
|
+
CommitGate๊ฐ ๋ง๋ ๊ฒ์ ๋จ์ํ ๋ช
๋ น ์ค์๊ฐ ์๋๋ผ **๋ฆฌ๋ทฐ๋ฐ์ง ์์ ๋ณ๊ฒฝ์ด ์ปค๋ฐ๋๋ ์ํฉ**์
๋๋ค.
|
|
49
69
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| **ํจํค์ง ๋งค๋์ ** | `npm --version` | Node ์ค์น ์ `npm`์ ๊ธฐ๋ณธ ํฌํจ (๋๋ `pnpm`/`yarn`) |
|
|
70
|
+
- Codex ๋ฆฌ๋ทฐ๊ฐ ์คํจํ๊ฑฐ๋ ์์ผ๋ฉด ์ปค๋ฐํ ์ ์์ต๋๋ค.
|
|
71
|
+
- ์น์ธ๋ staged tree์ ์ง๊ธ ์ปค๋ฐํ๋ ค๋ staged tree๊ฐ ๋ค๋ฅด๋ฉด ๋ง์ต๋๋ค.
|
|
72
|
+
- `state.json`, `responses/` ๊ฐ์ ์ํฌํ๋ก ๋ด๋ถ ํ์ผ์ source ์ปค๋ฐ์ ์์ผ๋ฉด ๋ง์ต๋๋ค.
|
|
73
|
+
- Codex CLI๊ฐ ์๊ฑฐ๋ ์คํ์ ์คํจํ๋ฉด ์กฐ์ฉํ ํต๊ณผํ์ง ์๊ณ ์คํจํฉ๋๋ค.
|
|
74
|
+
- ์น์ธ ์๋ต๊ณผ ์ฆ๊ฑฐ ํ์ผ์ `workflow/REQ-.../responses/`์ ๋จ์ต๋๋ค.
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
ํ ์ค๋ก ๋งํ๋ฉด, **ํ์คํ ์น์ธ๋ ๋ณ๊ฒฝ๋ง ํต๊ณผํ๊ณ ์ ๋งคํ๋ฉด ๋ฉ์ถ๋ ๋ฐฉ์**์
๋๋ค.
|
|
58
77
|
|
|
59
78
|
---
|
|
60
79
|
|
|
61
|
-
##
|
|
80
|
+
## ์ค์น๊ฐ ํ๋ ์ผ
|
|
62
81
|
|
|
63
|
-
|
|
82
|
+
`npx commitgate`๋ ๋์ ํ๋ก์ ํธ์ ์๋ ํ์ผ๊ณผ ์ค์ ์ ์ถ๊ฐํฉ๋๋ค. ๊ธฐ์กด ํ์ผ์ ๊ธฐ๋ณธ์ ์ผ๋ก ๋ฎ์ด์ฐ์ง ์์ต๋๋ค.
|
|
64
83
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
2. `req.config.json`(์ค์ ํ์ผ)์ ๋ง๋ค์ด ๋ก๋๋ค.
|
|
73
|
-
3. `package.json`์ `req:*` ๋ช
๋ น๋ค๊ณผ ํ์ํ devDependencies(`tsx`, `ajv`)๋ฅผ ์ถ๊ฐํฉ๋๋ค.
|
|
74
|
-
4. `AGENTS.md`(Reviewer๊ฐ ์ฝ๋ ๊ท์น ํ์ผ)๊ฐ ์์ผ๋ฉด ํ
ํ๋ฆฟ์ ๋ง๋ค์ด ์ค๋๋ค.
|
|
84
|
+
| ์ถ๊ฐ ํญ๋ชฉ | ์ค๋ช
|
|
|
85
|
+
|---|---|
|
|
86
|
+
| `scripts/req/` | `req:new`, `req:review-codex`, `req:doctor`, `req:commit` ์คํฌ๋ฆฝํธ |
|
|
87
|
+
| `workflow/*.schema.json` | Codex ์๋ต๊ณผ ์ค์ ๊ฒ์ฆ ์คํค๋ง |
|
|
88
|
+
| `req.config.json` | ํ๋ก์ ํธ๋ณ ์ค์ |
|
|
89
|
+
| `AGENTS.md` | ์์ด์ ํธ์ Reviewer๊ฐ ์ฝ๋ ๊ท์น ํ
ํ๋ฆฟ |
|
|
90
|
+
| `package.json` ์คํฌ๋ฆฝํธ | `req:*` ๋ช
๋ น๊ณผ ํ์ํ devDependencies |
|
|
75
91
|
|
|
76
|
-
|
|
92
|
+
๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ง ํ๋ ค๋ฉด:
|
|
77
93
|
|
|
78
94
|
```sh
|
|
79
|
-
|
|
95
|
+
npx commitgate --dry-run
|
|
80
96
|
```
|
|
81
97
|
|
|
82
|
-
> `--dry-run` ์ ๋ถ์ด๋ฉด **์ค์ ๋ก ๋ฐ๊พธ์ง ์๊ณ ** ๋ฌด์์ ํ ์ง ๋ฏธ๋ฆฌ ๋ณผ ์ ์์ด์: `npx commitgate --dry-run`
|
|
83
|
-
|
|
84
98
|
---
|
|
85
99
|
|
|
86
|
-
##
|
|
100
|
+
## ์ค๋น๋ฌผ
|
|
87
101
|
|
|
88
|
-
|
|
102
|
+
| ํ์ | ํ์ธ ๋ช
๋ น | ๋น๊ณ |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| Git | `git --version` | ํ์ |
|
|
105
|
+
| Node.js 18.17+ | `node --version` | ํ์ |
|
|
106
|
+
| npm, pnpm, yarn ์ค ํ๋ | `npm --version` | npm ๊ธฐ์ค์ผ๋ก ์๋ด |
|
|
107
|
+
| Codex CLI | `codex --version` | ๋ฆฌ๋ทฐ ์คํ์ ํ์ |
|
|
89
108
|
|
|
90
|
-
|
|
109
|
+
Codex CLI๊ฐ ์๋ค๋ฉด:
|
|
91
110
|
|
|
92
111
|
```sh
|
|
93
|
-
npm
|
|
112
|
+
npm install -g @openai/codex
|
|
113
|
+
codex login
|
|
114
|
+
codex login status
|
|
94
115
|
```
|
|
95
116
|
|
|
96
|
-
|
|
97
|
-
- ์ถ๋ ฅ์ **ํฐ์ผ ๋ฒํธ**(์: `REQ-2026-001`)๊ฐ ๋์ต๋๋ค. ์ดํ ๋ช
๋ น์์ ๋ฒํธ๋ง ์๋๋ค โ `2026-001`
|
|
98
|
-
|
|
99
|
-
### 2๋จ๊ณ โ ์ค๊ณ ๋ฌธ์ ์์ฑ
|
|
117
|
+
Windows์์ ์ค์น ์งํ `codex` ๋ช
๋ น์ ๋ชป ์ฐพ์ผ๋ฉด ์ ํฐ๋ฏธ๋์ ์ด์ด PATH๋ฅผ ๋ค์ ์ฝ๊ฒ ํ์ธ์.
|
|
100
118
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- `00-requirement.md` โ **๋ฌด์์** ์ ๋ง๋๋๊ฐ
|
|
104
|
-
- `01-design.md` โ **์ด๋ป๊ฒ** ๋ง๋ค ๊ฒ์ธ๊ฐ
|
|
105
|
-
- `02-plan.md` โ ์ด๋ค **์์/๋จ๊ณ**๋ก ์งํํ ๊ฒ์ธ๊ฐ
|
|
119
|
+
---
|
|
106
120
|
|
|
107
|
-
|
|
121
|
+
## ์๋ ๋ช
๋ น
|
|
108
122
|
|
|
109
|
-
|
|
123
|
+
๋๋ถ๋ถ์ ์ฌ์ฉ์๋ ์ ํ๋กฌํํธ ๋ฐฉ์์ผ๋ก ์ถฉ๋ถํฉ๋๋ค. ์๋๋ ๋ด๋ถ์์ ์ด๋ค ๋ช
๋ น์ด ์คํ๋๋์ง ์ดํดํ๊ฑฐ๋ ์ง์ ๋๋ฒ๊น
ํ ๋๋ง ๋ณด๋ฉด ๋ฉ๋๋ค.
|
|
110
124
|
|
|
111
125
|
```sh
|
|
112
|
-
|
|
113
|
-
npm run req:
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
- Codex๊ฐ ์ค๊ณ๋ฅผ ์ฝ๊ณ **์น์ธ** ๋๋ **๋ณด์ ์์ฒญ(NEEDS_FIX)** ์ ๋๋ ค์ค๋๋ค.
|
|
117
|
-
- ๋ณด์ ์์ฒญ์ด๋ฉด ์ง์ ์ฌํญ์ ๋ฐ์ํ๊ณ **๋ค์ `git add` โ ์ ๋ช
๋ น์ ์ฌ์คํ**ํ์ธ์. ์น์ธ๋ ๋๊น์ง ๋ฐ๋ณตํฉ๋๋ค.
|
|
118
|
-
|
|
119
|
-
### 4๋จ๊ณ โ ์ฝ๋ ๊ตฌํ + ํ
์คํธ
|
|
126
|
+
# 1. ํฐ์ผ๊ณผ ๋ธ๋์น ์์ฑ
|
|
127
|
+
npm run req:new -- my-feature --run
|
|
120
128
|
|
|
121
|
-
|
|
129
|
+
# 2. ์ค๊ณ ๋ฌธ์ ์์ฑ ํ stage
|
|
130
|
+
git add workflow/REQ-2026-001/00-requirement.md workflow/REQ-2026-001/01-design.md workflow/REQ-2026-001/02-plan.md
|
|
122
131
|
|
|
123
|
-
|
|
132
|
+
# 3. ์ค๊ณ ๋ฆฌ๋ทฐ
|
|
133
|
+
npm run req:review-codex -- 2026-001 --kind design --run
|
|
124
134
|
|
|
125
|
-
|
|
135
|
+
# 4. ์ฝ๋ ๊ตฌํ ํ stage
|
|
136
|
+
git add <changed-source-files>
|
|
126
137
|
|
|
127
|
-
|
|
128
|
-
git add <๋ด๊ฐ-๋ฐ๊พผ-์ฝ๋-ํ์ผ๋ค>
|
|
138
|
+
# 5. ๊ฒ์ดํธ ์ ๊ฒ
|
|
129
139
|
npm run req:doctor -- 2026-001
|
|
130
|
-
```
|
|
131
140
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
> โ ๏ธ **์ค์:** `git add` ๋ **๋น์ ์ด ๋ง๋ ์ฝ๋/๋ฌธ์๋ง** ์ฌ๋ฆฌ์ธ์. `state.json` ์ด๋ `responses/` ๊ฐ์ ์ํฌํ๋ก ๋ด๋ถ ํ์ผ์ **์ฌ๋ฆฌ์ง ๋ง์ธ์.** (๋๊ตฌ๊ฐ ์์์ ๊ด๋ฆฌํฉ๋๋ค. ์ค์๋ก ์ฌ๋ฆฌ๋ฉด ์ปค๋ฐ ๋จ๊ณ์์ ๋งํ๋๋ค.)
|
|
135
|
-
|
|
136
|
-
### 6๋จ๊ณ โ ๊ตฌํ ๋ฆฌ๋ทฐ ๋ฐ๊ธฐ (Codex)
|
|
137
|
-
|
|
138
|
-
```sh
|
|
141
|
+
# 6. ๊ตฌํ ๋ฆฌ๋ทฐ
|
|
139
142
|
npm run req:review-codex -- 2026-001 --kind phase --run
|
|
143
|
+
|
|
144
|
+
# 7. ์น์ธ๋ ์ฝ๋ ์ปค๋ฐ
|
|
145
|
+
npm run req:commit -- 2026-001 --run -m "feat: my feature"
|
|
140
146
|
```
|
|
141
147
|
|
|
142
|
-
|
|
143
|
-
- ์น์ธ๋๋ฉด `commit_allowed=true` ๊ฐ ๋์ด ์ปค๋ฐ์ด ์ด๋ฆฝ๋๋ค.
|
|
148
|
+
์ค์: source ์ปค๋ฐ์๋ ๋ด๊ฐ ๋ง๋ ์ฝ๋์ ๋ฌธ์๋ง stageํ์ธ์. `state.json`๊ณผ `responses/`๋ ๋๊ตฌ๊ฐ ๊ด๋ฆฌํฉ๋๋ค.
|
|
144
149
|
|
|
145
|
-
|
|
150
|
+
์ฌ๋ฌ ์ค ์ปค๋ฐ ๋ฉ์์ง๋ `-m` ๋์ ํ์ผ์ ์ฌ์ฉํ์ธ์.
|
|
146
151
|
|
|
147
152
|
```sh
|
|
148
|
-
npm run req:commit -- 2026-001 --run -
|
|
153
|
+
npm run req:commit -- 2026-001 --run --message-file commit-message.txt
|
|
149
154
|
```
|
|
150
155
|
|
|
151
|
-
- ๊ด๋ฌธ(doctor ๊ฒ์ดํธ)์ ๋ง์ง๋ง์ผ๋ก ํต๊ณผํ ๋ค **์ฝ๋ ์ปค๋ฐ + ์ฆ๊ฑฐ ์ปค๋ฐ** ์ ๋จ๊น๋๋ค.
|
|
152
|
-
- ์น์ธ๋์ง ์์๊ฑฐ๋, ์น์ธ ํ ์ฝ๋๊ฐ ๋ฐ๋์์ผ๋ฉด **์ฌ๊ธฐ์ ๋งํ๋๋ค.** (๊ทธ๊ฒ CommitGate์ ํต์ฌ)
|
|
153
|
-
|
|
154
|
-
๐ ๋! ์ด์ ๋ฆฌ๋ทฐยท์น์ธยท์ฆ๊ฑฐ๊ฐ ๋ชจ๋ ๋จ์ ์ํ๋ก ์์ ํ๊ฒ ์ปค๋ฐ๋์์ต๋๋ค.
|
|
155
|
-
|
|
156
156
|
---
|
|
157
157
|
|
|
158
|
-
##
|
|
158
|
+
## ๋ช
๋ น์ด ์์ฝ
|
|
159
159
|
|
|
160
|
-
| ๋ช
๋ น |
|
|
160
|
+
| ๋ช
๋ น | ์ฉ๋ |
|
|
161
161
|
|---|---|
|
|
162
|
-
| `npx commitgate` | ํ๋ก์ ํธ์ CommitGate ์ค์น
|
|
163
|
-
| `req:new
|
|
164
|
-
| `req:review-codex
|
|
165
|
-
| `req:review-codex
|
|
166
|
-
| `req:doctor
|
|
167
|
-
| `req:commit
|
|
168
|
-
|
|
169
|
-
> `-m "๋ฉ์์ง"` ๋์ ์ฌ๋ฌ ์ค ๋ฉ์์ง๋ `--message-file ๋ฉ์์ง.txt` ๋ก ํ์ผ์์ ์ฝ์ ์ ์์ต๋๋ค.
|
|
162
|
+
| `npx commitgate` | ํ๋ก์ ํธ์ CommitGate ์ค์น |
|
|
163
|
+
| `req:new <slug> --run` | REQ ํฐ์ผ, ๋ธ๋์น, ์ค๊ณ๋ฌธ์ ์์ฑ |
|
|
164
|
+
| `req:review-codex <id> --kind design --run` | ์ค๊ณ ๋ฆฌ๋ทฐ |
|
|
165
|
+
| `req:review-codex <id> --kind phase --run` | ๊ตฌํ ๋ฆฌ๋ทฐ |
|
|
166
|
+
| `req:doctor <id>` | ๊ฒ์ดํธ ์ํ ํ์ธ |
|
|
167
|
+
| `req:commit <id> --run -m "message"` | ์น์ธ๋ ๋ณ๊ฒฝ ์ปค๋ฐ |
|
|
170
168
|
|
|
171
169
|
---
|
|
172
170
|
|
|
173
|
-
##
|
|
171
|
+
## ์ค์
|
|
174
172
|
|
|
175
|
-
ํ๋ก์ ํธ ๋ฃจํธ์ `req.config.json
|
|
173
|
+
๋๋ถ๋ถ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ถฉ๋ถํฉ๋๋ค. ํ์ํ๋ฉด ํ๋ก์ ํธ ๋ฃจํธ์ `req.config.json`์ ์์ ํ์ธ์.
|
|
176
174
|
|
|
177
|
-
| ํญ๋ชฉ | ๊ธฐ๋ณธ๊ฐ |
|
|
175
|
+
| ํญ๋ชฉ | ๊ธฐ๋ณธ๊ฐ | ์ค๋ช
|
|
|
178
176
|
|---|---|---|
|
|
179
|
-
| `branchPrefix` | `"feat/req-"` |
|
|
180
|
-
| `ticketRoot` | `"workflow"` | ํฐ์ผ ํด๋
|
|
181
|
-
| `packageManager` | ์๋ ๊ฐ์ง | `npm
|
|
182
|
-
| `designDocs` | `00
|
|
177
|
+
| `branchPrefix` | `"feat/req-"` | ์ ๋ธ๋์น prefix |
|
|
178
|
+
| `ticketRoot` | `"workflow"` | REQ ํฐ์ผ ํด๋ |
|
|
179
|
+
| `packageManager` | ์๋ ๊ฐ์ง | `npm`, `pnpm`, `yarn` |
|
|
180
|
+
| `designDocs` | `00/01/02` ๋ฌธ์ | ์ค๊ณ ๋ฌธ์ ํ์ผ๋ช
|
|
|
183
181
|
|
|
184
|
-
|
|
182
|
+
๋น `branchPrefix`๋ ํ๋ก์ ํธ ๋ฐ์ผ๋ก ๋๊ฐ๋ ๊ฒฝ๋ก๋ ๊ฑฐ๋ถ๋ฉ๋๋ค.
|
|
185
183
|
|
|
186
184
|
---
|
|
187
185
|
|
|
188
|
-
##
|
|
186
|
+
## FAQ
|
|
189
187
|
|
|
190
|
-
**
|
|
191
|
-
|
|
188
|
+
**Codex CLI๊ฐ ์์ผ๋ฉด ์ด๋ป๊ฒ ๋๋์?**
|
|
189
|
+
๋ฆฌ๋ทฐ ๋ช
๋ น์ด ์คํจํฉ๋๋ค. ์กฐ์ฉํ ์น์ธ ์ฒ๋ฆฌํ์ง ์์ต๋๋ค.
|
|
192
190
|
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
**์น์ธ ํ ์ฝ๋๋ฅผ ์กฐ๊ธ ๊ณ ์น๋ฉด ์ปค๋ฐ๋๋์?**
|
|
192
|
+
์ ๋ฉ๋๋ค. ์น์ธ๋ staged tree์ ๋ฌ๋ผ์ง๋ฉด stale ์น์ธ์ผ๋ก ๋ณด๊ณ ๋ค์ ๋ฆฌ๋ทฐ๋ฅผ ์๊ตฌํฉ๋๋ค.
|
|
195
193
|
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
**`state.json`์ด๋ `responses/`๋ ์ stageํ๋ฉด ์ ๋๋์?**
|
|
195
|
+
์ํฌํ๋ก ์ฆ๊ฑฐ์ ์ํ ํ์ผ์
๋๋ค. source ์ปค๋ฐ์ ์์ด๋ฉด ์น์ธ ๋ฐ์ธ๋ฉ์ด ํ๋ ค์ง๋ฏ๋ก `req:commit`์ด ๋ง์ต๋๋ค.
|
|
198
196
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
**Q. Windows์ธ๋ฐ ์ปค๋ฐ ๋ฉ์์ง ์ค๋ฐ๊ฟ์ด ์ด์ํด์.**
|
|
203
|
-
A. ์ฌ๋ฌ ์ค ๋ฉ์์ง๋ `-m` ๋์ `--message-file ํ์ผ.txt` ๋ฅผ ์ฐ๋ฉด ๊น๋ํฉ๋๋ค.
|
|
197
|
+
**๋ ๋ฒ ์ค์นํ๋ฉด ๋ฎ์ด์ฐ๋์?**
|
|
198
|
+
์๋์. ๊ธฐ์กด ํ์ผ์ ๊ฑด๋๋๋๋ค. ๊ฐ์ ๋ก ๊ฐฑ์ ํ๋ ค๋ฉด `--force`๋ฅผ ์ฌ์ฉํ์ธ์.
|
|
204
199
|
|
|
205
200
|
---
|
|
206
201
|
|
|
207
|
-
##
|
|
202
|
+
## ํ์ฌ ๋ฒ์
|
|
208
203
|
|
|
209
|
-
|
|
204
|
+
ํ์ฌ ๋ฒ์ ์ **Stage A: vendored scaffold ๋ชจ๋ธ**์
๋๋ค. ์ฆ `npx commitgate`๊ฐ ๋์ ํ๋ก์ ํธ์ ์ํฌํ๋ก ํ์ผ์ ๋ณต์ฌํฉ๋๋ค.
|
|
210
205
|
|
|
211
|
-
|
|
212
|
-
- Codex๊ฐ ์ค์น ์ ๋จ / ๋ฆฌ๋ทฐ ์คํจ โ ํต๊ณผ ์๋, ๋ช
ํํ ์คํจ
|
|
213
|
-
- ์น์ธ๋ ์ฝ๋ ์ง๋ฌธ๊ณผ ์ง๊ธ ์ฝ๋๊ฐ ๋ค๋ฅด๋ฉด โ ์ปค๋ฐ ๊ฑฐ๋ถ
|
|
214
|
-
- ์ํนํธ๋ฆฌ๊ฐ ์ง์ ๋ถํ๋ฉด(๋ฆฌ๋ทฐ ์ ํ ๋ณ๊ฒฝ ์์) โ ๋ฆฌ๋ทฐ/์ปค๋ฐ ๊ฑฐ๋ถ
|
|
206
|
+
์๋๋ ํ์ ๋ฒ์์
๋๋ค.
|
|
215
207
|
|
|
216
|
-
|
|
208
|
+
- `node_modules`์์ ์ง์ ์คํํ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ชจ๋ธ
|
|
209
|
+
- ๋น-git VCS ์ง์
|
|
210
|
+
- ๋ ๋ค์ํ ์ค๊ณ๋ฌธ์ ํ
ํ๋ฆฟ
|
|
211
|
+
- Linux/macOS CI smoke ํ๋
|
|
217
212
|
|
|
218
213
|
---
|
|
219
214
|
|
|
220
|
-
##
|
|
215
|
+
## License
|
|
221
216
|
|
|
222
217
|
[MIT](./LICENSE) ยฉ 2026 sol5288
|
|
223
|
-
|
|
224
|
-
> ์ด ์ํฌํ๋ก๋ `palm-kiosk-app`์ REQ-2026-017 portability kit์์ ๋
๋ฆฝ ํจํค์ง๋ก ์ถ์ถ๋์๊ณ , **์๊ธฐ ์์ ์ ์ด ์ํฌํ๋ก๋ก ๋ฆฌ๋ทฐยท์น์ธ(dogfood)** ํ์ฌ ๊ฒ์ฆ๋์์ต๋๋ค.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commitgate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CommitGate โ BuilderโReviewer(ClaudeโCodex) fail-closed ์ปค๋ฐ ๊ฒ์ดํธ: ๋ฆฌ๋ทฐยท์น์ธยท์ฆ๊ฑฐ ์์ธ ์ปค๋ฐ์ ํต๊ณผ์ํค์ง ์๋ AI REQ ์ํฌํ๋ก kit (req:new/review-codex/doctor/commit)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"bin",
|
|
44
44
|
"AGENTS.template.md",
|
|
45
45
|
"req.config.json.sample",
|
|
46
|
-
"README.md"
|
|
46
|
+
"README.md",
|
|
47
|
+
"README.en.md"
|
|
47
48
|
],
|
|
48
49
|
"engines": {
|
|
49
50
|
"node": ">=18.17"
|