commitgate 0.2.0 → 0.2.1

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.
Files changed (3) hide show
  1. package/README.en.md +22 -1
  2. package/README.md +22 -1
  3. package/package.json +1 -1
package/README.en.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
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
8
 
9
+ [![CI](https://github.com/sol5288/commitgate/actions/workflows/ci.yml/badge.svg)](https://github.com/sol5288/commitgate/actions/workflows/ci.yml)
10
+ [![npm version](https://img.shields.io/npm/v/commitgate.svg)](https://www.npmjs.com/package/commitgate)
9
11
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
10
12
 
11
13
  ---
@@ -71,6 +73,7 @@ CommitGate is designed to block **unreviewed changes from being committed**, not
71
73
  - If the approved staged tree differs from the current staged tree, the commit is blocked.
72
74
  - Workflow files such as `state.json` and `responses/` cannot be mixed into the source commit.
73
75
  - If Codex CLI is missing or fails, the workflow fails instead of silently passing.
76
+ - During install, existing `cross-spawn` versions below the verified floor warn by default and fail with `--strict`.
74
77
  - Approval responses and evidence are kept under `workflow/REQ-.../responses/`.
75
78
 
76
79
  In short: **approved changes pass, ambiguous changes stop.**
@@ -95,6 +98,14 @@ Preview without writing files:
95
98
  npx commitgate --dry-run
96
99
  ```
97
100
 
101
+ Treat the security floor warning as an install failure:
102
+
103
+ ```sh
104
+ npx commitgate --strict
105
+ ```
106
+
107
+ If an existing `cross-spawn` is below the verified floor, CommitGate stops before copying files.
108
+
98
109
  ---
99
110
 
100
111
  ## Prerequisites
@@ -160,6 +171,8 @@ npm run req:commit -- 2026-001 --run --message-file commit-message.txt
160
171
  | Command | Purpose |
161
172
  |---|---|
162
173
  | `npx commitgate` | Install CommitGate into a project |
174
+ | `npx commitgate --dry-run` | Preview the install plan without writing files |
175
+ | `npx commitgate --strict` | Treat low `cross-spawn` version warnings as install failures |
163
176
  | `req:new <slug> --run` | Create a REQ ticket, branch, and design docs |
164
177
  | `req:review-codex <id> --kind design --run` | Review the design |
165
178
  | `req:review-codex <id> --kind phase --run` | Review the implementation |
@@ -194,6 +207,9 @@ No. If the staged tree changes after approval, CommitGate treats the approval as
194
207
  **Why should I not stage `state.json` or `responses/`?**
195
208
  They are workflow state and evidence files. Mixing them into the source commit weakens the approval binding, so `req:commit` blocks it.
196
209
 
210
+ **What should I do if I see a cross-spawn version warning?**
211
+ It means the target project may already have a `cross-spawn` version below CommitGate's verified floor. Upgrade it with `npm i -D cross-spawn@^7.0.6`. In CI or security-sensitive installs, use `npx commitgate --strict` to treat the warning as a failure.
212
+
197
213
  **Does running install twice overwrite files?**
198
214
  No. Existing files are skipped. Use `--force` if you intentionally want to refresh them.
199
215
 
@@ -203,12 +219,17 @@ No. Existing files are skipped. Use `--force` if you intentionally want to refre
203
219
 
204
220
  The current release is **Stage A: vendored scaffold model**. `npx commitgate` copies workflow files into the target project.
205
221
 
222
+ Current verification:
223
+
224
+ - GitHub Actions runs a `ubuntu-latest`, `macos-latest`, `windows-latest` × Node 18/20/22 matrix.
225
+ - `npm run smoke` installs the packed tarball and runs the installed `commitgate` bin.
226
+ - A Windows `.cmd` wrapper injection regression test protects package-manager and Codex wrapper paths.
227
+
206
228
  Future scope:
207
229
 
208
230
  - Running directly from `node_modules` as a library-style model
209
231
  - Non-git VCS support
210
232
  - More design document templates
211
- - Broader Linux/macOS CI smoke coverage
212
233
 
213
234
  ---
214
235
 
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  AI 에이전트가 코드를 빠르게 만들더라도, 리뷰 없이 바로 커밋되면 위험합니다. CommitGate는 변경을 티켓 단위로 묶고, Codex가 승인한 staged tree만 커밋되게 합니다. 승인 후 코드가 바뀌거나 증거가 부족하면 기본적으로 막습니다.
8
8
 
9
+ [![CI](https://github.com/sol5288/commitgate/actions/workflows/ci.yml/badge.svg)](https://github.com/sol5288/commitgate/actions/workflows/ci.yml)
10
+ [![npm version](https://img.shields.io/npm/v/commitgate.svg)](https://www.npmjs.com/package/commitgate)
9
11
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
10
12
 
11
13
  ---
@@ -71,6 +73,7 @@ CommitGate가 막는 것은 단순한 명령 실수가 아니라 **리뷰받지
71
73
  - 승인된 staged tree와 지금 커밋하려는 staged tree가 다르면 막습니다.
72
74
  - `state.json`, `responses/` 같은 워크플로 내부 파일을 source 커밋에 섞으면 막습니다.
73
75
  - Codex CLI가 없거나 실행에 실패하면 조용히 통과하지 않고 실패합니다.
76
+ - 설치 시 기존 `cross-spawn`이 검증 하한보다 낮으면 경고하고, `--strict`에서는 중단합니다.
74
77
  - 승인 응답과 증거 파일은 `workflow/REQ-.../responses/`에 남습니다.
75
78
 
76
79
  한 줄로 말하면, **확실히 승인된 변경만 통과하고 애매하면 멈추는 방식**입니다.
@@ -95,6 +98,14 @@ CommitGate가 막는 것은 단순한 명령 실수가 아니라 **리뷰받지
95
98
  npx commitgate --dry-run
96
99
  ```
97
100
 
101
+ 보안 하한 경고를 설치 실패로 취급하려면:
102
+
103
+ ```sh
104
+ npx commitgate --strict
105
+ ```
106
+
107
+ 기존 `cross-spawn`이 검증 하한보다 낮으면 파일을 복사하기 전에 중단합니다.
108
+
98
109
  ---
99
110
 
100
111
  ## 준비물
@@ -160,6 +171,8 @@ npm run req:commit -- 2026-001 --run --message-file commit-message.txt
160
171
  | 명령 | 용도 |
161
172
  |---|---|
162
173
  | `npx commitgate` | 프로젝트에 CommitGate 설치 |
174
+ | `npx commitgate --dry-run` | 파일을 쓰지 않고 설치 계획 확인 |
175
+ | `npx commitgate --strict` | 낮은 `cross-spawn` 버전 경고를 설치 실패로 처리 |
163
176
  | `req:new <slug> --run` | REQ 티켓, 브랜치, 설계문서 생성 |
164
177
  | `req:review-codex <id> --kind design --run` | 설계 리뷰 |
165
178
  | `req:review-codex <id> --kind phase --run` | 구현 리뷰 |
@@ -194,6 +207,9 @@ npm run req:commit -- 2026-001 --run --message-file commit-message.txt
194
207
  **`state.json`이나 `responses/`는 왜 stage하면 안 되나요?**
195
208
  워크플로 증거와 상태 파일입니다. source 커밋에 섞이면 승인 바인딩이 흐려지므로 `req:commit`이 막습니다.
196
209
 
210
+ **cross-spawn 버전 경고가 나오면 어떻게 하나요?**
211
+ 대상 프로젝트의 기존 `cross-spawn`이 CommitGate가 검증한 하한보다 낮을 수 있다는 뜻입니다. `npm i -D cross-spawn@^7.0.6`으로 올리세요. CI나 보안 민감 환경에서는 `npx commitgate --strict`를 사용해 경고를 실패로 다루세요.
212
+
197
213
  **두 번 설치하면 덮어쓰나요?**
198
214
  아니요. 기존 파일은 건너뜁니다. 강제로 갱신하려면 `--force`를 사용하세요.
199
215
 
@@ -203,12 +219,17 @@ npm run req:commit -- 2026-001 --run --message-file commit-message.txt
203
219
 
204
220
  현재 버전은 **Stage A: vendored scaffold 모델**입니다. 즉 `npx commitgate`가 대상 프로젝트에 워크플로 파일을 복사합니다.
205
221
 
222
+ 현재 운영 중인 검증입니다.
223
+
224
+ - GitHub Actions에서 `ubuntu-latest`, `macos-latest`, `windows-latest` × Node 18/20/22 매트릭스를 실행합니다.
225
+ - `npm run smoke`는 pack tarball 설치본의 `commitgate` bin을 실행합니다.
226
+ - Windows `.cmd` 래퍼 주입 회귀 테스트가 패키지 매니저와 Codex wrapper 경로를 보호합니다.
227
+
206
228
  아래는 후속 범위입니다.
207
229
 
208
230
  - `node_modules`에서 직접 실행하는 라이브러리 모델
209
231
  - 비-git VCS 지원
210
232
  - 더 다양한 설계문서 템플릿
211
- - Linux/macOS CI smoke 확대
212
233
 
213
234
  ---
214
235
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commitgate",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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",