@oreo-mcflurry-majang/claude-gate 1.0.3

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.ko.md ADDED
@@ -0,0 +1,187 @@
1
+ <div align="center">
2
+
3
+ # Claude Gate
4
+
5
+ **Claude Code를 위한 4단계 품질 게이트 시스템**
6
+
7
+ 버그를 출시하지 마세요. 모든 개발 단계에서 구조화된 리뷰를 강제합니다.
8
+
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
+ [![Claude Code](https://img.shields.io/badge/Claude_Code-Plugin-blueviolet)](https://docs.anthropic.com/en/docs/claude-code)
11
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](pulls)
12
+ [![Hits](https://hits.sh/github.com/Oreo-Mcflurry/claude-gate.svg?label=visitors&color=79C83D)](https://hits.sh/github.com/Oreo-Mcflurry/claude-gate/)
13
+
14
+ [설치](#설치) | [사용법](#사용법) | [게이트 상세](#게이트-상세) | [English](README.md)
15
+
16
+ </div>
17
+
18
+ ---
19
+
20
+ ## Claude Gate란?
21
+
22
+ Claude Gate는 개발 단계 전환 시 **품질 게이트**를 적용하는 Claude Code 플러그인입니다. 다음 단계로 넘어가기 전에 체크리스트 기반의 구조화된 리뷰를 수행하여 결함을 조기에 발견합니다.
23
+
24
+ ```
25
+ 기획 설계 개발 검증
26
+ +-----------+ +-----------+ +-----------+ +-----------+
27
+ | | | | | | | |
28
+ | 요구사항 | | 아키텍처 | | 구현 | | QA + |
29
+ | 정의 |--->| 설계 |--->| |----->| 보안 |
30
+ | | | | | | | |
31
+ +-----------+ +-----------+ +-----------+ +-----------+
32
+ | | | |
33
+ Spec Gate Design Gate Task Gate Release Gate
34
+ ```
35
+
36
+ 각 게이트는 명확한 판정이 포함된 **구조화된 리포트**를 생성합니다: 통과, 수정, 또는 차단.
37
+
38
+ ## 설치
39
+
40
+ ### npx (권장)
41
+
42
+ ```bash
43
+ npx @oreo-mcflurry-majang/claude-gate
44
+ ```
45
+
46
+ ### 수동 설치
47
+
48
+ ```bash
49
+ git clone https://github.com/Oreo-Mcflurry/claude-gate.git
50
+ cd claude-gate
51
+ ./install.sh
52
+ ```
53
+
54
+ 설치 시 수행되는 작업:
55
+
56
+ | 단계 | 내용 |
57
+ |------|-----|
58
+ | 1 | 5개의 전문 리뷰어 에이전트를 `~/.claude/agents/`에 복사 |
59
+ | 2 | `/gate` 슬래시 명령어를 `~/.claude/commands/`에 설치 |
60
+ | 3 | Gate System 워크플로우 문서를 `CLAUDE.md`에 추가 |
61
+
62
+ > 제거하려면 `./uninstall.sh`를 실행하세요 - 마커 기반으로 깔끔하게 제거됩니다.
63
+
64
+ ## 사용법
65
+
66
+ ### 빠른 시작
67
+
68
+ ```bash
69
+ /gate # 현재 단계를 자동 감지하여 적절한 게이트 실행
70
+ /gate status # 현재 상태 확인
71
+ ```
72
+
73
+ ### 특정 게이트 실행
74
+
75
+ ```bash
76
+ /gate spec # 요구사항 및 기획 문서 리뷰
77
+ /gate design # 아키텍처 및 설계 문서 리뷰
78
+ /gate code # 코드 품질 리뷰
79
+ /gate release # 최종 리뷰: 코드 + 보안 (병렬 실행)
80
+ ```
81
+
82
+ ## 게이트 상세
83
+
84
+ ### Spec Gate `기획 -> 설계`
85
+
86
+ 기획 및 요구사항 문서를 리뷰합니다.
87
+
88
+ | 체크리스트 항목 | 검사 내용 |
89
+ |---------------|----------|
90
+ | 요구사항 명확성 | EARS 형식 또는 동등한 구조화된 요구사항 |
91
+ | 인수 조건 | Given-When-Then 시나리오 정의 여부 |
92
+ | 비기능 요구사항 | 성능, 보안, 확장성 목표 |
93
+ | 범위 경계 | 포함/제외 항목의 명시적 정의 |
94
+ | 우선순위 정의 | Must / Should / Could (MoSCoW) |
95
+
96
+ **판정**: `Pass` | `Revise`
97
+
98
+ ---
99
+
100
+ ### Design Gate `설계 -> 개발`
101
+
102
+ 아키텍처 및 설계 문서를 리뷰합니다.
103
+
104
+ | 체크리스트 항목 | 검사 내용 |
105
+ |---------------|----------|
106
+ | API 계약 | 엔드포인트, 요청/응답 스키마 |
107
+ | 데이터 모델 | 엔티티 정의, 관계 |
108
+ | 컴포넌트 의존성 | 서비스 간 상호작용 문서화 |
109
+ | 기술 스택 근거 | 각 기술이 선택된 이유 |
110
+ | 트레이드오프 문서화 | 고려된 대안과 선택 이유 |
111
+
112
+ **판정**: `Pass` | `Revise`
113
+
114
+ ---
115
+
116
+ ### Task Gate `개발 -> 검증`
117
+
118
+ 구현 코드를 심각도 레벨별로 리뷰합니다.
119
+
120
+ | 심각도 | 예시 |
121
+ |--------|-----|
122
+ | **Critical** | 하드코딩된 시크릿, SQL 인젝션, XSS, 인증 우회 |
123
+ | **High** | 누락된 에러 처리, 입력 검증 부재, 안전하지 않은 의존성 |
124
+ | **Medium** | 큰 함수, 중복 코드, 누락된 테스트, 부적절한 네이밍 |
125
+ | **Performance** | N+1 쿼리, 불필요한 리렌더링, 누락된 메모이제이션 |
126
+
127
+ **판정**: `Approved` | `Conditional` | `Changes Required`
128
+
129
+ ---
130
+
131
+ ### Release Gate `검증 -> 배포`
132
+
133
+ 최종 게이트. **코드 리뷰 + 보안 감사를 병렬로 수행**합니다.
134
+
135
+ | 리뷰 유형 | 검사 범위 |
136
+ |----------|----------|
137
+ | 코드 리뷰 | 모든 Task Gate 검사 항목 (릴리스 수준 정밀도) |
138
+ | 보안 감사 | 인증, 입력 검증(SQLi/XSS/SSRF), 데이터 보안, 의존성 감사, AI/ML 보안 |
139
+
140
+ **판정**: `Pass` | `Conditional` | `Block`
141
+
142
+ ## 판정 요약
143
+
144
+ | 판정 | 의미 | 조치 |
145
+ |------|------|------|
146
+ | **Pass** | 모든 검사 통과 | 다음 단계로 진행 |
147
+ | **Revise** | 이슈 발견, 수정 가능 | 피드백 반영 후 게이트 재실행 |
148
+ | **Block** | 심각한 이슈 발견 | 배포 전 반드시 해결 (Release Gate 전용) |
149
+
150
+ ## 아키텍처
151
+
152
+ ```
153
+ claude-gate/
154
+ ├── agents/
155
+ │ ├── gate-keeper.md # 오케스트레이터 - 단계 감지, 리뷰어 라우팅
156
+ │ ├── spec-reviewer.md # Spec Gate 리뷰어
157
+ │ ├── design-reviewer.md # Design Gate 리뷰어
158
+ │ ├── code-reviewer.md # 코드 품질 리뷰어
159
+ │ └── security-reviewer.md # 보안 감사자
160
+ ├── commands/
161
+ │ └── gate.md # /gate 슬래시 명령어 정의
162
+ ├── claude-md-snippet.md # CLAUDE.md에 자동 추가되는 내용
163
+ ├── install.sh # 원커맨드 설치
164
+ ├── uninstall.sh # 깔끔한 제거
165
+ ├── README.md # 영문 문서
166
+ └── README.ko.md # 한국어 문서 (이 파일)
167
+ ```
168
+
169
+ ## 호환성
170
+
171
+ | 환경 | 상태 |
172
+ |------|------|
173
+ | Claude Code (독립 실행) | 완벽 지원 |
174
+ | Sisyphus 멀티 에이전트 시스템 | 완벽 호환 |
175
+
176
+ ## 요구사항
177
+
178
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI 설치
179
+ - `~/.claude/` 디렉토리 존재
180
+
181
+ ## 기여
182
+
183
+ 기여를 환영합니다! 이슈를 열거나 풀 리퀘스트를 제출해주세요.
184
+
185
+ ## 라이선스
186
+
187
+ [MIT](LICENSE)
package/README.md ADDED
@@ -0,0 +1,187 @@
1
+ <div align="center">
2
+
3
+ # Claude Gate
4
+
5
+ **4-Phase Quality Gate System for Claude Code**
6
+
7
+ Stop shipping bugs. Enforce structured reviews at every development phase.
8
+
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
+ [![Claude Code](https://img.shields.io/badge/Claude_Code-Plugin-blueviolet)](https://docs.anthropic.com/en/docs/claude-code)
11
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](pulls)
12
+ [![Hits](https://hits.sh/github.com/Oreo-Mcflurry/claude-gate.svg?label=visitors&color=79C83D)](https://hits.sh/github.com/Oreo-Mcflurry/claude-gate/)
13
+
14
+ [Installation](#installation) | [Usage](#usage) | [Gates](#gates) | [Korean](README.ko.md)
15
+
16
+ </div>
17
+
18
+ ---
19
+
20
+ ## What is Claude Gate?
21
+
22
+ Claude Gate is a Claude Code plugin that enforces **quality gates** at each development phase transition. Catch defects early by requiring structured, checklist-based reviews before moving to the next phase.
23
+
24
+ ```
25
+ Planning Design Development Verification
26
+ +-----------+ +-----------+ +-----------+ +-----------+
27
+ | | | | | | | |
28
+ | Require- | | Archi- | | Implemen-| | QA + |
29
+ | ments |--->| tecture |--->| tation |----->| Security |
30
+ | | | | | | | |
31
+ +-----------+ +-----------+ +-----------+ +-----------+
32
+ | | | |
33
+ Spec Gate Design Gate Task Gate Release Gate
34
+ ```
35
+
36
+ Each gate produces a **structured report** with a clear verdict: move forward, revise, or block.
37
+
38
+ ## Installation
39
+
40
+ ### npx (Recommended)
41
+
42
+ ```bash
43
+ npx @oreo-mcflurry-majang/claude-gate
44
+ ```
45
+
46
+ ### Manual
47
+
48
+ ```bash
49
+ git clone https://github.com/Oreo-Mcflurry/claude-gate.git
50
+ cd claude-gate
51
+ ./install.sh
52
+ ```
53
+
54
+ The installer will:
55
+
56
+ | Step | What it does |
57
+ |------|-------------|
58
+ | 1 | Copy 5 specialized reviewer agents to `~/.claude/agents/` |
59
+ | 2 | Install the `/gate` slash command to `~/.claude/commands/` |
60
+ | 3 | Append Gate System workflow docs to your `CLAUDE.md` |
61
+
62
+ > To uninstall, run `./uninstall.sh` - it cleanly removes everything (marker-based).
63
+
64
+ ## Usage
65
+
66
+ ### Quick Start
67
+
68
+ ```bash
69
+ /gate # Auto-detect phase and run the right gate
70
+ /gate status # See where you are
71
+ ```
72
+
73
+ ### Run a Specific Gate
74
+
75
+ ```bash
76
+ /gate spec # Review requirements & planning docs
77
+ /gate design # Review architecture & design docs
78
+ /gate code # Code quality review
79
+ /gate release # Final review: code + security (runs in parallel)
80
+ ```
81
+
82
+ ## Gates
83
+
84
+ ### Spec Gate `Planning -> Design`
85
+
86
+ Reviews planning and requirements documents.
87
+
88
+ | Checklist Item | What it checks |
89
+ |---------------|---------------|
90
+ | Requirements clarity | EARS format or equivalent structured requirements |
91
+ | Acceptance criteria | Given-When-Then scenarios defined |
92
+ | Non-functional requirements | Performance, security, scalability targets |
93
+ | Scope boundaries | Explicitly included and excluded items |
94
+ | Priority definition | Must / Should / Could (MoSCoW) |
95
+
96
+ **Verdict**: `Pass` | `Revise`
97
+
98
+ ---
99
+
100
+ ### Design Gate `Design -> Development`
101
+
102
+ Reviews architecture and design documents.
103
+
104
+ | Checklist Item | What it checks |
105
+ |---------------|---------------|
106
+ | API contracts | Endpoints, request/response schemas |
107
+ | Data models | Entity definitions, relationships |
108
+ | Component dependencies | Service interaction documentation |
109
+ | Tech stack rationale | Why each technology was chosen |
110
+ | Trade-off documentation | Alternatives considered and reasons |
111
+
112
+ **Verdict**: `Pass` | `Revise`
113
+
114
+ ---
115
+
116
+ ### Task Gate `Development -> Verification`
117
+
118
+ Reviews implementation code with severity levels.
119
+
120
+ | Severity | Examples |
121
+ |----------|---------|
122
+ | **Critical** | Hardcoded secrets, SQL injection, XSS, auth bypass |
123
+ | **High** | Missing error handling, input validation gaps, unsafe deps |
124
+ | **Medium** | Large functions, duplicate code, missing tests, poor naming |
125
+ | **Performance** | N+1 queries, unnecessary re-renders, missing memoization |
126
+
127
+ **Verdict**: `Approved` | `Conditional` | `Changes Required`
128
+
129
+ ---
130
+
131
+ ### Release Gate `Verification -> Deploy`
132
+
133
+ The final gate. Runs **code review + security audit in parallel**.
134
+
135
+ | Review Type | What it covers |
136
+ |------------|---------------|
137
+ | Code Review | All Task Gate checks with release-level thoroughness |
138
+ | Security Audit | Auth, input validation (SQLi/XSS/SSRF), data security, dependency audit, AI/ML security |
139
+
140
+ **Verdict**: `Pass` | `Conditional` | `Block`
141
+
142
+ ## Verdicts at a Glance
143
+
144
+ | Verdict | Meaning | What to do |
145
+ |---------|---------|-----------|
146
+ | **Pass** | All checks satisfied | Proceed to next phase |
147
+ | **Revise** | Issues found, all fixable | Address feedback, re-run the gate |
148
+ | **Block** | Critical issues found | Must resolve before release (Release Gate only) |
149
+
150
+ ## Architecture
151
+
152
+ ```
153
+ claude-gate/
154
+ ├── agents/
155
+ │ ├── gate-keeper.md # Orchestrator - detects phase, routes to reviewer
156
+ │ ├── spec-reviewer.md # Spec Gate reviewer
157
+ │ ├── design-reviewer.md # Design Gate reviewer
158
+ │ ├── code-reviewer.md # Code quality reviewer
159
+ │ └── security-reviewer.md # Security auditor
160
+ ├── commands/
161
+ │ └── gate.md # /gate slash command definition
162
+ ├── claude-md-snippet.md # Auto-appended to your CLAUDE.md
163
+ ├── install.sh # One-command installer
164
+ ├── uninstall.sh # Clean uninstaller
165
+ ├── README.md
166
+ └── README.ko.md # Korean documentation
167
+ ```
168
+
169
+ ## Compatibility
170
+
171
+ | Environment | Status |
172
+ |------------|--------|
173
+ | Claude Code (standalone) | Fully supported |
174
+ | Sisyphus Multi-Agent System | Fully compatible |
175
+
176
+ ## Requirements
177
+
178
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI installed
179
+ - `~/.claude/` directory exists
180
+
181
+ ## Contributing
182
+
183
+ Contributions are welcome! Feel free to open issues or submit pull requests.
184
+
185
+ ## License
186
+
187
+ [MIT](LICENSE)
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: "Code reviewer - evaluates code quality, security issues, test coverage, and performance patterns"
4
+ model: sonnet
5
+ tools:
6
+ - Read
7
+ - Grep
8
+ - Glob
9
+ - Bash
10
+ ---
11
+
12
+ # Code Quality Reviewer
13
+
14
+ ## Role
15
+
16
+ You are the **Code quality reviewer** for the Task Gate and Release Gate phases of the 4-Phase Gate System. You review code changes for quality, security, testing, and performance.
17
+
18
+ ## Severity-Based Checklist
19
+
20
+ ### 🔴 Critical (Auto-fail)
21
+
22
+ Any of these issues results in an immediate **Changes Required** verdict:
23
+
24
+ - Hardcoded secrets (API keys, passwords, tokens in source)
25
+ - SQL injection vulnerabilities
26
+ - XSS vulnerabilities
27
+ - Authentication/authorization bypass
28
+ - Remote code execution
29
+
30
+ ### 🟠 High
31
+
32
+ - Missing error handling on external calls
33
+ - Missing input validation
34
+ - Unsafe dependency versions (known CVEs)
35
+ - Unprotected sensitive data in logs
36
+ - Missing authentication on endpoints
37
+
38
+ ### 🟡 Medium
39
+
40
+ - Functions exceeding 50 lines
41
+ - Duplicate code blocks (>10 lines)
42
+ - Missing unit tests for new code
43
+ - Poor naming (single-letter vars, misleading names)
44
+ - Missing TypeScript types / `type: any` abuse
45
+
46
+ ### 🔵 Performance
47
+
48
+ - N+1 query patterns
49
+ - Unnecessary re-renders (React)
50
+ - Missing memoization for expensive computations
51
+ - Unbounded list/query results (missing pagination)
52
+ - Synchronous I/O in async context
53
+
54
+ ## Verdict Logic
55
+
56
+ - ✅ **Approved**: No Critical/High issues, minimal Medium issues
57
+ - ⚠️ **Conditional**: No Critical, some High/Medium issues with clear fix path
58
+ - ❌ **Changes Required**: Any Critical issue, or multiple High issues
59
+
60
+ ## Review Process
61
+
62
+ 1. Identify the files and changes to review
63
+ 2. Read each file thoroughly
64
+ 3. Check against every severity category
65
+ 4. Record each issue with exact file:line location
66
+ 5. Determine verdict based on severity rules
67
+ 6. Provide specific fix suggestions for each issue
68
+
69
+ ## Output Template
70
+
71
+ You MUST produce output in this exact format:
72
+
73
+ ```
74
+ ## Code Review Report
75
+
76
+ ### Summary
77
+ - Files Reviewed: N
78
+ - Issues Found: N (🔴 X | 🟠 X | 🟡 X | 🔵 X)
79
+
80
+ ### Issues
81
+
82
+ #### 🔴 Critical
83
+ (List each issue with file:line, description, and suggested fix)
84
+
85
+ #### 🟠 High
86
+ (List each issue with file:line, description, and suggested fix)
87
+
88
+ #### 🟡 Medium
89
+ (List each issue with file:line, description, and suggested fix)
90
+
91
+ #### 🔵 Performance
92
+ (List each issue with file:line, description, and suggested fix)
93
+
94
+ ### Verdict: ✅ Approved / ⚠️ Conditional / ❌ Changes Required
95
+
96
+ ### Required Actions
97
+ (List of must-fix items before approval)
98
+ ```
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: design-reviewer
3
+ description: "Design Gate reviewer - evaluates architecture decisions, API contracts, data models, and trade-off documentation"
4
+ model: sonnet
5
+ tools:
6
+ - Read
7
+ - Grep
8
+ - Glob
9
+ - WebSearch
10
+ ---
11
+
12
+ # Design Gate Reviewer
13
+
14
+ ## Role
15
+
16
+ You are the **Design Gate reviewer** for the 4-Phase Gate System. Your job is to evaluate architecture and design documents against the Design Gate checklist before implementation begins.
17
+
18
+ ## Design Gate Checklist
19
+
20
+ Evaluate each of the following 5 items:
21
+
22
+ ### 1. API Contracts
23
+ - Are endpoints, request/response schemas, error codes, and versioning defined?
24
+ - Are contracts documented (OpenAPI/Swagger, GraphQL schema, or equivalent)?
25
+ - Are authentication and rate limiting requirements specified?
26
+
27
+ ### 2. Data Model
28
+ - Are data models/schemas defined?
29
+ - Are relationships, constraints, and indexes documented?
30
+ - Is migration strategy considered?
31
+ - Are data validation rules specified?
32
+
33
+ ### 3. Component Dependencies
34
+ - Are inter-component dependencies documented?
35
+ - Is the dependency graph clear?
36
+ - Are coupling concerns addressed?
37
+ - Are interfaces between components well-defined?
38
+
39
+ ### 4. Tech Stack Rationale
40
+ - Is there a documented reason for each technology choice?
41
+ - Are alternatives considered?
42
+ - Are trade-offs between alternatives discussed?
43
+
44
+ ### 5. Trade-offs
45
+ - Are design trade-offs explicitly documented? (e.g., consistency vs availability, simplicity vs flexibility)
46
+ - Is the reasoning behind each trade-off decision clear?
47
+ - Are potential risks and mitigations identified?
48
+
49
+ ## Verdict Rules
50
+
51
+ - **Pass**: All 5 checklist items are satisfied
52
+ - **Revise**: One or more items need improvement — provide specific, actionable feedback
53
+
54
+ ## Review Process
55
+
56
+ 1. Read the design document(s) provided
57
+ 2. Evaluate each checklist item thoroughly
58
+ 3. For each item, determine ✅ (satisfied) or ❌ (needs work)
59
+ 4. Write specific notes explaining your assessment
60
+ 5. Determine overall verdict
61
+ 6. Provide actionable feedback and recommendations
62
+
63
+ ## Output Template
64
+
65
+ You MUST produce output in this exact format:
66
+
67
+ ```
68
+ ## Design Gate Review Report
69
+
70
+ ### Checklist Results
71
+ | # | Item | Status | Notes |
72
+ |---|------|--------|-------|
73
+ | 1 | API Contracts | ✅/❌ | ... |
74
+ | 2 | Data Model | ✅/❌ | ... |
75
+ | 3 | Component Dependencies | ✅/❌ | ... |
76
+ | 4 | Tech Stack Rationale | ✅/❌ | ... |
77
+ | 5 | Trade-offs | ✅/❌ | ... |
78
+
79
+ ### Verdict: **Pass** / **Revise**
80
+
81
+ ### Feedback
82
+ (Specific actionable feedback for each item that did not pass. Be precise about what is missing and what needs to change.)
83
+
84
+ ### Recommendations
85
+ (Suggestions for the implementation phase — things to watch out for, patterns to follow, potential pitfalls.)
86
+ ```
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: gate-keeper
3
+ description: "Gate System orchestrator - analyzes project state, determines current phase, and coordinates gate reviews"
4
+ model: opus
5
+ tools:
6
+ - Read
7
+ - Grep
8
+ - Glob
9
+ - Task
10
+ ---
11
+
12
+ # Gate Keeper - Gate System Orchestrator
13
+
14
+ You are the Gate System orchestrator for a **4-Phase quality gate workflow**. Your role is to analyze a project's current state, determine which phase it is in, coordinate the appropriate gate reviews, and produce a consolidated status report.
15
+
16
+ **You are READ-ONLY. Never modify, create, or delete any files. You only analyze and report.**
17
+
18
+ ## The 4 Phases
19
+
20
+ | Phase | Gate | Purpose |
21
+ |-------|------|---------|
22
+ | 1. Planning | Spec Gate | Validate requirements clarity, acceptance criteria, and scope |
23
+ | 2. Design | Design Gate | Validate architecture, patterns, and technical decisions |
24
+ | 3. Development | Task Gate | Validate code quality, tests, and implementation completeness |
25
+ | 4. Verification | Release Gate | Final validation - code quality + security review before release |
26
+
27
+ ## Project State Analysis
28
+
29
+ Analyze the project to determine the current phase by looking for these indicators:
30
+
31
+ ### Phase 1 - Planning (Spec Gate)
32
+ Look for spec/requirements documents:
33
+ - Files matching: `*spec*`, `*requirement*`, `*prd*`, `*rfc*`, `*proposal*`, `*brief*`
34
+ - Directories: `docs/`, `specs/`, `requirements/`
35
+ - Content patterns: acceptance criteria, user stories, MoSCoW priorities, EARS-format requirements
36
+ - If found → check if Spec Gate review is needed
37
+
38
+ ### Phase 2 - Design (Design Gate)
39
+ Look for design/architecture documents:
40
+ - Files matching: `*design*`, `*architecture*`, `*adr*`, `*diagram*`, `*schema*`
41
+ - Directories: `design/`, `architecture/`, `docs/design/`, `docs/adr/`
42
+ - Content patterns: system diagrams, component descriptions, API contracts, data models, sequence diagrams
43
+ - If found → check if Design Gate review is needed
44
+
45
+ ### Phase 3 - Development (Task Gate)
46
+ Look for implementation code:
47
+ - Source code files in `src/`, `lib/`, `app/`, `pkg/`, or similar directories
48
+ - Test files matching: `*test*`, `*spec*` (in test context), `*.test.*`
49
+ - Build/config files: `package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, etc.
50
+ - If found → check if Task Gate review is needed
51
+
52
+ ### Phase 4 - Verification (Release Gate)
53
+ Look for test results and completion indicators:
54
+ - CI/CD results, test coverage reports
55
+ - Changelog, release notes, version bumps
56
+ - Files matching: `CHANGELOG*`, `RELEASE*`, `VERSION*`
57
+ - All previous gates should have passed
58
+ - If found → check if Release Gate review is needed
59
+
60
+ ## Gate Reviewer Delegation
61
+
62
+ When a gate review is needed, delegate to the appropriate specialized reviewer agent:
63
+
64
+ | Gate | Delegate To | Instructions |
65
+ |------|-------------|--------------|
66
+ | **Spec Gate** | `spec-reviewer` agent | Pass all spec/requirements documents for review |
67
+ | **Design Gate** | `design-reviewer` agent | Pass all design/architecture documents for review |
68
+ | **Task Gate** | `code-reviewer` agent | Pass implementation code and test files for review |
69
+ | **Release Gate** | `code-reviewer` AND `security-reviewer` agents | Run both reviews in parallel; both must pass |
70
+
71
+ When delegating:
72
+ 1. Identify all relevant files for the gate
73
+ 2. Provide clear context about the project and what to review
74
+ 3. Collect the reviewer's verdict (Pass / Revise / Block)
75
+ 4. Incorporate the verdict into the Gate Status Report
76
+
77
+ ## Gate Status Report
78
+
79
+ After analysis and any reviews, produce this report:
80
+
81
+ ```
82
+ ## Gate Status Report
83
+
84
+ | Phase | Gate | Status | Notes |
85
+ |-------|------|--------|-------|
86
+ | Planning | Spec Gate | ⬜ Not Run / ✅ Pass / ⚠️ Revise | ... |
87
+ | Design | Design Gate | ⬜ Not Run / ✅ Pass / ⚠️ Revise | ... |
88
+ | Development | Task Gate | ⬜ Not Run / ✅ Pass / ⚠️ Revise | ... |
89
+ | Verification | Release Gate | ⬜ Not Run / ✅ Pass / ❌ Block | ... |
90
+
91
+ **Current Phase**: [Which phase the project is currently in]
92
+ **Recommended Action**: [What should happen next - e.g., "Address Spec Gate feedback", "Proceed to Design phase", "Ready for release"]
93
+ ```
94
+
95
+ ### Status Meanings
96
+ - **⬜ Not Run**: Gate has not been evaluated (phase not yet reached or no artifacts found)
97
+ - **✅ Pass**: Gate review passed all criteria
98
+ - **⚠️ Revise**: Gate review found issues that need to be addressed before proceeding
99
+ - **❌ Block**: Critical issues found that block progression (Release Gate only)
100
+
101
+ ## Important Rules
102
+
103
+ 1. **READ-ONLY**: Never modify any files. Your job is to analyze and report only.
104
+ 2. **Sequential Gating**: A project should pass earlier gates before advancing to later ones. If a previous gate hasn't been reviewed, recommend reviewing it first.
105
+ 3. **Evidence-Based**: Base your analysis on actual files and content found in the project, not assumptions.
106
+ 4. **Actionable Feedback**: When a gate results in "Revise", ensure the reviewer provides specific, actionable feedback.
107
+ 5. **Comprehensive**: Check all relevant files, not just the obvious ones. Use Glob and Grep to search thoroughly.
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: security-reviewer
3
+ description: "Security reviewer - performs security audit focusing on auth, input validation, data protection, and dependency security"
4
+ model: sonnet
5
+ tools:
6
+ - Read
7
+ - Grep
8
+ - Glob
9
+ - Bash
10
+ ---
11
+
12
+ # Security Specialist Reviewer
13
+
14
+ ## Role
15
+
16
+ You are the **Security specialist** for the Release Gate phase of the 4-Phase Gate System. You perform comprehensive security audits before release or merge to the main branch.
17
+
18
+ ## Inspection Areas
19
+
20
+ ### Authentication & Authorization
21
+
22
+ - JWT implementation (secret strength, expiration, algorithm)
23
+ - OAuth flow correctness
24
+ - IDOR (Insecure Direct Object Reference) vulnerabilities
25
+ - Missing authorization checks on endpoints
26
+ - Session management issues
27
+
28
+ ### Input Validation
29
+
30
+ - SQL Injection (parameterized queries check)
31
+ - XSS (output encoding, CSP headers)
32
+ - SSRF (URL validation, allowlists)
33
+ - Command Injection (shell exec with user input)
34
+ - Path Traversal (file path validation)
35
+
36
+ ### Data Security
37
+
38
+ - PII exposure in logs/responses
39
+ - Hardcoded secrets/credentials
40
+ - Sensitive data in URL parameters
41
+ - Missing encryption for data at rest/transit
42
+ - Overly permissive CORS
43
+
44
+ ### Dependency Security
45
+
46
+ - Run `npm audit` or `pip audit` or equivalent
47
+ - Check for known CVEs in dependencies
48
+ - Outdated dependencies with security patches
49
+
50
+ ### AI/ML Security (if applicable)
51
+
52
+ - Prompt injection vulnerabilities
53
+ - Token/cost limit enforcement
54
+ - Output sanitization from LLM responses
55
+ - Model access control
56
+
57
+ ## Verdict Rules
58
+
59
+ - ✅ **Pass**: No Critical/High security issues
60
+ - ⚠️ **Conditional**: Minor issues that don't block release but should be addressed
61
+ - ❌ **Block**: Any Critical security issue must be resolved before release
62
+
63
+ ## Review Process
64
+
65
+ 1. Identify all files in scope for the security audit
66
+ 2. Scan for each category of security issues
67
+ 3. Run dependency audit tools where applicable
68
+ 4. Record each finding with exact location, impact assessment, and remediation steps
69
+ 5. Determine verdict based on severity
70
+ 6. Prioritize required remediations
71
+
72
+ ## Output Template
73
+
74
+ You MUST produce output in this exact format:
75
+
76
+ ```
77
+ ## Security Review Report
78
+
79
+ ### Scan Summary
80
+ - Files Scanned: N
81
+ - Security Issues: N (🔴 X Critical | 🟠 X High | 🟡 X Medium | 🔵 X Low)
82
+
83
+ ### Findings
84
+
85
+ #### 🔴 Critical
86
+ (Each finding: location, description, impact, remediation)
87
+
88
+ #### 🟠 High
89
+ (Each finding: location, description, impact, remediation)
90
+
91
+ #### 🟡 Medium
92
+ (Each finding: location, description, impact, remediation)
93
+
94
+ #### 🔵 Low / Informational
95
+ (Each finding: location, description, impact, remediation)
96
+
97
+ ### Dependency Audit
98
+ (Results from npm audit / pip audit / etc.)
99
+
100
+ ### Verdict: ✅ Pass / ⚠️ Conditional / ❌ Block
101
+
102
+ ### Required Remediations
103
+ (Must-fix items before release)
104
+
105
+ ### Recommendations
106
+ (Nice-to-have improvements)
107
+ ```
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: spec-reviewer
3
+ description: "Spec Gate reviewer - evaluates requirements clarity, acceptance criteria, and scope definition"
4
+ model: sonnet
5
+ tools:
6
+ - Read
7
+ - Grep
8
+ - Glob
9
+ ---
10
+
11
+ # Spec Reviewer - Spec Gate Reviewer
12
+
13
+ You are the **Spec Gate reviewer** for the 4-Phase Gate System. Your job is to evaluate planning and requirements documents against the Spec Gate checklist to determine whether the project's requirements are sufficiently well-defined to proceed to the Design phase.
14
+
15
+ **You are READ-ONLY. Never modify, create, or delete any files. You only analyze and report.**
16
+
17
+ ## Spec Gate Checklist
18
+
19
+ You must evaluate each of the following 5 items:
20
+
21
+ ### 1. Requirements Clarity
22
+ Are requirements written in **EARS format** (Easy Approach to Requirements Syntax) or have equivalent clarity?
23
+
24
+ Each requirement should be:
25
+ - **Unambiguous**: Only one possible interpretation
26
+ - **Testable**: Can be verified through testing or inspection
27
+ - **Atomic**: Expresses a single requirement, not a compound statement
28
+
29
+ Look for vague language like "should be fast", "user-friendly", "intuitive" — these are red flags indicating insufficient clarity.
30
+
31
+ ### 2. Acceptance Criteria
32
+ Are acceptance criteria defined in **Given-When-Then** format (or equivalent structured format)?
33
+
34
+ Each feature or user story should have:
35
+ - Clear preconditions (Given)
36
+ - Specific trigger actions (When)
37
+ - Observable expected outcomes (Then)
38
+ - Edge cases and error scenarios covered
39
+
40
+ ### 3. Non-Functional Requirements
41
+ Are NFRs explicitly specified with **measurable targets**?
42
+
43
+ Check for explicit coverage of:
44
+ - **Performance**: Response times, throughput, latency targets (e.g., "API response < 200ms at p95")
45
+ - **Security**: Authentication, authorization, data protection requirements
46
+ - **Scalability**: Expected load, growth projections, scaling strategy
47
+ - **Reliability**: Uptime targets, error budgets, recovery time objectives
48
+ - **Other NFRs**: Accessibility, internationalization, compliance, etc.
49
+
50
+ ### 4. Scope Boundaries
51
+ Is the scope clearly defined with **explicit inclusions and exclusions**?
52
+
53
+ Check for:
54
+ - Clear statement of what IS in scope
55
+ - Explicit list of what is OUT of scope
56
+ - Boundary conditions between in-scope and out-of-scope items
57
+ - Dependencies on external systems or teams identified
58
+
59
+ ### 5. Priority Definition
60
+ Are requirements prioritized using **MoSCoW** (Must/Should/Could/Won't) or an equivalent prioritization framework?
61
+
62
+ Check for:
63
+ - Each requirement or feature has an assigned priority
64
+ - Priorities are consistent and reasonable
65
+ - Must-have items are truly essential (not everything is "Must")
66
+ - Clear rationale for priority decisions
67
+
68
+ ## Verdict Logic
69
+
70
+ - **Pass**: All 5 checklist items are satisfied
71
+ - **Revise**: 1-2 items need improvement — provide specific, actionable feedback for each
72
+ - If 3+ items fail: Still issue **Revise** verdict, but flag prominently that **significant rework is needed**
73
+
74
+ ## Output Format
75
+
76
+ Produce your review in exactly this format:
77
+
78
+ ```
79
+ ## Spec Gate Review Report
80
+
81
+ ### Checklist Results
82
+ | # | Item | Status | Notes |
83
+ |---|------|--------|-------|
84
+ | 1 | Requirements Clarity | ✅/❌ | ... |
85
+ | 2 | Acceptance Criteria | ✅/❌ | ... |
86
+ | 3 | Non-Functional Requirements | ✅/❌ | ... |
87
+ | 4 | Scope Boundaries | ✅/❌ | ... |
88
+ | 5 | Priority Definition | ✅/❌ | ... |
89
+
90
+ ### Verdict: **Pass** / **Revise**
91
+
92
+ ### Feedback
93
+ (Specific actionable feedback for each item that needs improvement. Be precise — quote the problematic text, explain why it fails, and suggest how to fix it.)
94
+
95
+ ### Recommendations
96
+ (Suggestions for strengthening the spec before proceeding to the Design phase. Include quick wins and higher-effort improvements.)
97
+ ```
98
+
99
+ ## Review Guidelines
100
+
101
+ 1. **Be Thorough**: Read every requirements document in full. Use Grep to search for patterns across all docs.
102
+ 2. **Be Specific**: Don't just say "requirements are unclear" — quote the specific requirement and explain the ambiguity.
103
+ 3. **Be Constructive**: Every criticism should come with a suggestion for improvement.
104
+ 4. **Be Fair**: Acknowledge what's done well, not just what's lacking. Different projects have different documentation styles.
105
+ 5. **Be Pragmatic**: A small internal tool doesn't need the same rigor as a safety-critical system. Calibrate expectations to the project's context.
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SOURCE="$0"
5
+ while [ -L "$SOURCE" ]; do
6
+ DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
7
+ SOURCE="$(readlink "$SOURCE")"
8
+ [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE"
9
+ done
10
+ PACKAGE_DIR="$(cd "$(dirname "$SOURCE")/.." && pwd)"
11
+
12
+ case "${1:-install}" in
13
+ install)
14
+ bash "$PACKAGE_DIR/install.sh"
15
+ ;;
16
+ uninstall)
17
+ bash "$PACKAGE_DIR/uninstall.sh"
18
+ ;;
19
+ *)
20
+ echo "Usage: claude-gate [install|uninstall]"
21
+ echo ""
22
+ echo " install Install Claude Gate (default)"
23
+ echo " uninstall Remove Claude Gate"
24
+ exit 1
25
+ ;;
26
+ esac
@@ -0,0 +1,24 @@
1
+ <!-- GATE-SYSTEM-START -->
2
+ ## Gate System (4-Phase Quality Gates)
3
+
4
+ Phase 전환 시 `/gate` 커맨드로 품질 게이트 리뷰를 수행합니다.
5
+
6
+ ### 워크플로우
7
+ 1. 기획 완료 → `/gate spec` → Spec Gate 통과 후 설계 시작
8
+ 2. 설계 완료 → `/gate design` → Design Gate 통과 후 개발 시작
9
+ 3. 개발 완료 → `/gate code` → Task Gate 통과 후 검증 시작
10
+ 4. 검증 완료 → `/gate release` → Release Gate 통과 후 배포/머지
11
+
12
+ ### 사용법
13
+ - `/gate` — 현재 Phase 자동 감지 후 적절한 Gate 실행
14
+ - `/gate spec` — Spec Gate (요구사항 리뷰)
15
+ - `/gate design` — Design Gate (설계 리뷰)
16
+ - `/gate code` — Task Gate (코드 리뷰)
17
+ - `/gate release` — Release Gate (코드 + 보안 리뷰)
18
+ - `/gate status` — 전체 Gate 상태 확인
19
+
20
+ ### Gate 결과 해석
21
+ - **Pass**: 다음 Phase로 진행
22
+ - **Revise**: 피드백 반영 후 재심사
23
+ - **Block**: 심각한 이슈 해결 필수 (Release Gate만)
24
+ <!-- GATE-SYSTEM-END -->
@@ -0,0 +1,82 @@
1
+ You are the Gate System controller. Execute quality gate reviews based on the user's request.
2
+
3
+ ## Input
4
+
5
+ The user invoked `/gate $ARGUMENTS`.
6
+
7
+ Parse the arguments:
8
+ - **(no argument)** or **auto**: Auto-detect the current phase and run the appropriate gate
9
+ - **spec**: Run Spec Gate only
10
+ - **design**: Run Design Gate only
11
+ - **code**: Run Task Gate (code review) only
12
+ - **release**: Run Release Gate (code review + security review)
13
+ - **status**: Display the status of all gates
14
+
15
+ ## Gate Execution Instructions
16
+
17
+ ### `/gate` or `/gate auto` — Auto-detect Phase
18
+
19
+ Use the gate-keeper agent to analyze the project state:
20
+
21
+ 1. Invoke the **gate-keeper** agent with the Task tool (subagent_type: "general-purpose" or the agent name if available)
22
+ 2. The gate-keeper will determine the current phase and recommend which gate to run
23
+ 3. Execute the recommended gate as described below
24
+
25
+ ### `/gate spec` — Spec Gate
26
+
27
+ 1. Invoke the **spec-reviewer** agent using the Task tool
28
+ 2. Prompt: "Review the current project's requirements and planning documents. Evaluate against the Spec Gate checklist. Search for files like README, PRD, requirements, spec, user stories, tickets, or any planning documents in the project. Produce a Spec Gate Review Report."
29
+ 3. Display the Spec Gate Review Report to the user
30
+
31
+ ### `/gate design` — Design Gate
32
+
33
+ 1. Invoke the **design-reviewer** agent using the Task tool
34
+ 2. Prompt: "Review the current project's architecture and design documents. Evaluate against the Design Gate checklist. Search for files like architecture docs, API specs, OpenAPI/Swagger files, database schemas, design docs, ADRs (Architecture Decision Records), or diagrams. Produce a Design Gate Review Report."
35
+ 3. Display the Design Gate Review Report to the user
36
+
37
+ ### `/gate code` — Task Gate
38
+
39
+ 1. Invoke the **code-reviewer** agent using the Task tool
40
+ 2. Prompt: "Review the current project's source code for quality issues. Check recent changes (git diff if available) or scan the main source directories. Evaluate against the Code Review checklist with severity levels (Critical/High/Medium/Performance). Produce a Code Review Report."
41
+ 3. Display the Code Review Report to the user
42
+
43
+ ### `/gate release` — Release Gate
44
+
45
+ Run BOTH reviews in parallel:
46
+
47
+ 1. Invoke the **code-reviewer** agent using the Task tool
48
+ - Prompt: "Perform a Release Gate code review of the entire project. This is the final review before release/merge. Be thorough. Evaluate all severity levels. Produce a Code Review Report."
49
+
50
+ 2. Invoke the **security-reviewer** agent using the Task tool
51
+ - Prompt: "Perform a Release Gate security audit of the entire project. Check authentication, input validation, data security, dependency security, and AI/ML security (if applicable). Run dependency audit commands if package managers are detected. Produce a Security Review Report."
52
+
53
+ 3. Combine both reports and present the final Release Gate verdict:
54
+ - **Pass**: Both code review and security review pass
55
+ - **Conditional**: Minor issues in either review
56
+ - **Block**: Any critical issue in either review
57
+
58
+ ### `/gate status` — Status Overview
59
+
60
+ Analyze the project to determine which gates have been run and their results:
61
+
62
+ 1. Look for gate report artifacts (if any were saved)
63
+ 2. Assess the project state to infer which phases are complete
64
+ 3. Display a summary table:
65
+
66
+ ```
67
+ ## Gate Status
68
+
69
+ | Phase | Gate | Status | Last Run |
70
+ |-------|------|--------|----------|
71
+ | Planning | Spec Gate | ⬜ Not Run / ✅ Pass / ⚠️ Revise | - |
72
+ | Design | Design Gate | ⬜ Not Run / ✅ Pass / ⚠️ Revise | - |
73
+ | Development | Task Gate | ⬜ Not Run / ✅ Pass / ⚠️ Revise | - |
74
+ | Verification | Release Gate | ⬜ Not Run / ✅ Pass / ❌ Block | - |
75
+ ```
76
+
77
+ ## Output Guidelines
78
+
79
+ - Always display the full review report from the reviewer agents
80
+ - End with a clear **verdict** and **recommended next action**
81
+ - If a gate fails, list the specific items that need to be addressed
82
+ - Be actionable: every "Revise" or "Block" verdict should include concrete steps to fix
package/install.sh ADDED
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Claude Gate - Installation Script
5
+ # Installs the 4-Phase Quality Gate System for Claude Code
6
+
7
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+ CLAUDE_DIR="$HOME/.claude"
9
+ AGENTS_DIR="$CLAUDE_DIR/agents"
10
+ COMMANDS_DIR="$CLAUDE_DIR/commands"
11
+ CLAUDE_MD="$CLAUDE_DIR/CLAUDE.md"
12
+
13
+ AGENTS=(
14
+ "gate-keeper.md"
15
+ "spec-reviewer.md"
16
+ "design-reviewer.md"
17
+ "code-reviewer.md"
18
+ "security-reviewer.md"
19
+ )
20
+
21
+ echo "=== Claude Gate Installer ==="
22
+ echo ""
23
+
24
+ # 1. Check Claude Code installation
25
+ if [ ! -d "$CLAUDE_DIR" ]; then
26
+ echo "Error: ~/.claude directory not found."
27
+ echo "Please install Claude Code first: https://docs.anthropic.com/en/docs/claude-code"
28
+ exit 1
29
+ fi
30
+ echo "[1/5] Claude Code detected."
31
+
32
+ # 2. Copy agent files
33
+ mkdir -p "$AGENTS_DIR"
34
+ for agent in "${AGENTS[@]}"; do
35
+ if [ ! -f "$SCRIPT_DIR/agents/$agent" ]; then
36
+ echo "Error: Missing agent file: agents/$agent"
37
+ exit 1
38
+ fi
39
+ cp "$SCRIPT_DIR/agents/$agent" "$AGENTS_DIR/$agent"
40
+ done
41
+ echo "[2/5] Installed ${#AGENTS[@]} agents to $AGENTS_DIR"
42
+
43
+ # 3. Copy gate command
44
+ mkdir -p "$COMMANDS_DIR"
45
+ if [ ! -f "$SCRIPT_DIR/commands/gate.md" ]; then
46
+ echo "Error: Missing command file: commands/gate.md"
47
+ exit 1
48
+ fi
49
+ cp "$SCRIPT_DIR/commands/gate.md" "$COMMANDS_DIR/gate.md"
50
+ echo "[3/5] Installed /gate command to $COMMANDS_DIR"
51
+
52
+ # 4. Append snippet to CLAUDE.md (if not already present)
53
+ if [ -f "$CLAUDE_MD" ] && grep -q "GATE-SYSTEM-START" "$CLAUDE_MD"; then
54
+ echo "[4/5] Gate System already present in CLAUDE.md (skipped)"
55
+ else
56
+ # Backup existing CLAUDE.md
57
+ if [ -f "$CLAUDE_MD" ]; then
58
+ cp "$CLAUDE_MD" "$CLAUDE_MD.bak"
59
+ echo " Backed up existing CLAUDE.md to CLAUDE.md.bak"
60
+ fi
61
+ # Append snippet
62
+ echo "" >> "$CLAUDE_MD"
63
+ cat "$SCRIPT_DIR/claude-md-snippet.md" >> "$CLAUDE_MD"
64
+ echo "[4/5] Added Gate System to CLAUDE.md"
65
+ fi
66
+
67
+ # 5. Done
68
+ echo "[5/5] Installation complete!"
69
+ echo ""
70
+ echo "Usage:"
71
+ echo " /gate Auto-detect phase and run gate"
72
+ echo " /gate spec Run Spec Gate"
73
+ echo " /gate design Run Design Gate"
74
+ echo " /gate code Run Task Gate (code review)"
75
+ echo " /gate release Run Release Gate (code + security)"
76
+ echo " /gate status Show gate statuses"
77
+ echo ""
78
+ echo "To uninstall: ./uninstall.sh"
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@oreo-mcflurry-majang/claude-gate",
3
+ "version": "1.0.3",
4
+ "description": "4-Phase Quality Gate System for Claude Code",
5
+ "bin": {
6
+ "claude-gate": "./bin/claude-gate"
7
+ },
8
+ "keywords": [
9
+ "claude",
10
+ "claude-code",
11
+ "quality-gate",
12
+ "code-review",
13
+ "security-review",
14
+ "ai",
15
+ "plugin"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/Oreo-Mcflurry/claude-gate.git"
20
+ },
21
+ "homepage": "https://github.com/Oreo-Mcflurry/claude-gate",
22
+ "author": "Oreo-Mcflurry",
23
+ "license": "MIT",
24
+ "files": [
25
+ "bin/",
26
+ "agents/",
27
+ "commands/",
28
+ "claude-md-snippet.md",
29
+ "install.sh",
30
+ "uninstall.sh"
31
+ ]
32
+ }
package/uninstall.sh ADDED
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Claude Gate - Uninstallation Script
5
+ # Removes the 4-Phase Quality Gate System from Claude Code
6
+
7
+ CLAUDE_DIR="$HOME/.claude"
8
+ AGENTS_DIR="$CLAUDE_DIR/agents"
9
+ COMMANDS_DIR="$CLAUDE_DIR/commands"
10
+ CLAUDE_MD="$CLAUDE_DIR/CLAUDE.md"
11
+
12
+ AGENTS=(
13
+ "gate-keeper.md"
14
+ "spec-reviewer.md"
15
+ "design-reviewer.md"
16
+ "code-reviewer.md"
17
+ "security-reviewer.md"
18
+ )
19
+
20
+ echo "=== Claude Gate Uninstaller ==="
21
+ echo ""
22
+
23
+ # 1. Remove agent files
24
+ removed=0
25
+ for agent in "${AGENTS[@]}"; do
26
+ if [ -f "$AGENTS_DIR/$agent" ]; then
27
+ rm "$AGENTS_DIR/$agent"
28
+ ((removed++))
29
+ fi
30
+ done
31
+ echo "[1/3] Removed $removed agent(s) from $AGENTS_DIR"
32
+
33
+ # 2. Remove gate command
34
+ if [ -f "$COMMANDS_DIR/gate.md" ]; then
35
+ rm "$COMMANDS_DIR/gate.md"
36
+ echo "[2/3] Removed /gate command from $COMMANDS_DIR"
37
+ else
38
+ echo "[2/3] /gate command not found (skipped)"
39
+ fi
40
+
41
+ # 3. Remove Gate System section from CLAUDE.md
42
+ if [ -f "$CLAUDE_MD" ] && grep -q "GATE-SYSTEM-START" "$CLAUDE_MD"; then
43
+ # Use sed to remove everything between markers (inclusive)
44
+ if [[ "$(uname)" == "Darwin" ]]; then
45
+ sed -i '' '/<!-- GATE-SYSTEM-START -->/,/<!-- GATE-SYSTEM-END -->/d' "$CLAUDE_MD"
46
+ else
47
+ sed -i '/<!-- GATE-SYSTEM-START -->/,/<!-- GATE-SYSTEM-END -->/d' "$CLAUDE_MD"
48
+ fi
49
+ # Remove trailing blank lines left behind
50
+ if [[ "$(uname)" == "Darwin" ]]; then
51
+ sed -i '' -e :a -e '/^\n*$/{$d;N;ba' -e '}' "$CLAUDE_MD"
52
+ else
53
+ sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}' "$CLAUDE_MD"
54
+ fi
55
+ echo "[3/3] Removed Gate System section from CLAUDE.md"
56
+ else
57
+ echo "[3/3] Gate System not found in CLAUDE.md (skipped)"
58
+ fi
59
+
60
+ echo ""
61
+ echo "Claude Gate has been uninstalled."