claude-pro-minmax 1.2.0 → 1.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.
package/README.ko.md CHANGED
@@ -56,7 +56,49 @@ cpmm doctor
56
56
  - 자동 설치 지원: `npm` (mgrep), `brew` (macOS), Linux 패키지 매니저 `apt-get`, `dnf`, `pacman`, `apk`
57
57
  - macOS에서 Homebrew가 없으면 설치 명령을 안내합니다
58
58
 
59
- ### 4. Perplexity/언어 설정 (선택)
59
+ ### 4. 커스텀 & 업데이트 정책
60
+
61
+ - `cpmm setup`은 누락된 의존성을 설치한 뒤, CPMM 설정(설정 파일 복사, 언어 선택, Perplexity 설정)까지 진행합니다.
62
+ - `cpmm doctor`는 수정 없이 의존성 상태만 확인합니다.
63
+ - 재실행 시 CPMM 관리 파일은 최신 버전으로 교체되고, 사용자 데이터는 보존됩니다.
64
+
65
+ ```text
66
+ ~/.claude/* ← Global Baseline (CPMM 관리)
67
+ ├── agents/ 🔄 업데이트 시 교체됨
68
+ ├── commands/ 🔄 업데이트 시 교체됨
69
+ ├── contexts/ 🔄 업데이트 시 교체됨
70
+ ├── scripts/ 🔄 업데이트 시 교체됨
71
+ ├── skills/cli-wrappers/ 🔄 업데이트 시 교체됨
72
+ ├── rules/*.md 🔄 업데이트 시 교체됨
73
+ ├── settings.json 🔄 업데이트 시 교체됨
74
+ ├── settings.local.json ✋ 사용자 소유 — 보존됨
75
+ ├── skills/learned/ ✋ 사용자 소유 — 보존됨
76
+ ├── sessions/ ✋ 사용자 소유 — 보존됨
77
+ ├── plans/ ✋ 사용자 소유 — 보존됨
78
+ ├── projects/ ✋ 사용자 소유 — 보존됨
79
+ └── rules/language.md ✋ 사용자 소유 — 보존됨
80
+
81
+ <project>/.claude/* ← Project-Specific (사용자/팀 커스텀)
82
+ ├── CLAUDE.md 프로젝트별 지침
83
+ ├── commands/ 프로젝트 전용 슬래시 명령어
84
+ ├── skills/ 프로젝트 전용 스킬
85
+ ├── rules/ 프로젝트 전용 규칙
86
+ └── settings.json 프로젝트 전용 권한/훅/MCP 비활성화
87
+ ```
88
+
89
+ > **핵심 규칙 2가지:**
90
+ > 1. 글로벌 커스텀은 `settings.local.json`에만 — `settings.json`은 업데이트 시 덮어쓰기됩니다.
91
+ > 2. 커스텀 명령어/규칙은 프로젝트 `.claude/`에 — 글로벌 `commands/`는 CPMM이 관리합니다.
92
+
93
+ 프로젝트 초기화 팁:
94
+ - `claude` 실행 전에 `project-templates/`를 참고해 프로젝트를 초기화하세요. (설치기는 `project-templates`를 `~/.claude`로 복사하지 않습니다.)
95
+
96
+ ### 5. 고급 (선택)
97
+ <details>
98
+ <summary>Perplexity, 언어, 수동 설치 보기</summary>
99
+
100
+ **Perplexity/언어 설정 (필수 아님):**
101
+ - Perplexity는 `/dplan`의 웹 리서치에 사용됩니다. 설정하지 않아도 `/dplan`은 Sequential Thinking + Context7으로 동작하며, 나머지 모든 기능은 Perplexity와 무관합니다.
60
102
  - 최초 인터랙티브 설치 시 `cpmm setup`이 출력 언어와 Perplexity API 키를 묻습니다.
61
103
  - 영어(기본): 파일이 필요 없습니다. `~/.claude/rules/language.md`가 있으면 삭제하세요.
62
104
  - 비영어: `~/.claude/rules/language.md`를 만들어 원하는 언어를 지정하세요.
@@ -72,11 +114,7 @@ cpmm doctor
72
114
  }
73
115
  ```
74
116
 
75
- ### 5. 고급 (선택)
76
- <details>
77
- <summary>수동 의존성 설치와 소스 설치 보기</summary>
78
-
79
- 수동 의존성 설치:
117
+ **수동 의존성 설치:**
80
118
  ```bash
81
119
  # jq
82
120
  brew install jq # macOS
@@ -97,7 +135,7 @@ sudo pacman -S --noconfirm tmux # Arch
97
135
  sudo apk add tmux # Alpine
98
136
  ```
99
137
 
100
- 소스에서 수동 설치:
138
+ **소스에서 수동 설치:**
101
139
  ```bash
102
140
  git clone https://github.com/move-hoon/claude-pro-minmax.git
103
141
  cd claude-pro-minmax
@@ -106,20 +144,22 @@ node bin/cpmm.js setup
106
144
  # bash install.sh
107
145
  ```
108
146
 
109
- 설치 동작:
110
- - `cpmm setup`은 누락된 의존성을 설치한 뒤, CPMM 설정(설정 파일 복사, 언어 선택, Perplexity 설정)까지 진행합니다.
111
- - `cpmm doctor`는 수정 없이 의존성 상태만 확인합니다.
112
- - 재실행 시 CPMM 관리 파일만 갱신하고, `language.md`, `settings.local.json`, `skills/learned/`, `sessions/` 등 사용자 파일은 보존합니다.
113
-
114
- 프로젝트 초기화 팁:
115
- - `claude` 실행 전에 `project-templates/`를 참고해 프로젝트를 초기화하세요. (설치기는 `project-templates`를 `~/.claude`로 복사하지 않습니다.)
116
-
117
147
  </details>
118
148
 
119
149
  ---
120
150
 
121
151
  ## 🚀 빠른 시작 (Quick Start)
122
152
 
153
+ ### ⚡ 첫 60초 (FTUE)
154
+
155
+ ```bash
156
+ claude
157
+ > /plan 이 저장소를 분석하고 작은 개선 1개에 대한 3단계 실행 계획을 제안해줘.
158
+ > /do 1단계만 최소 변경으로 안전하게 구현해줘.
159
+ > /review .
160
+ > /session-save ftue-first-pass
161
+ ```
162
+
123
163
  ### 🤖 에이전트 워크플로우
124
164
 
125
165
  CPMM은 계층적 모델 라우팅을 제공합니다: `/plan`은 @planner (Sonnet 4.6) → @builder (Haiku 4.5) 체인으로 복잡한 작업을 처리하고, `/do`는 현재 세션 모델에서 직접 실행하여 속도를 높입니다.
@@ -413,7 +453,7 @@ A: 네, 하지만 이러한 최적화가 필요하지 않을 수 있습니다. M
413
453
  <details>
414
454
  <summary><strong>Q: 기존 Claude Code 설정과 충돌하나요?</strong></summary>
415
455
 
416
- A: 최초 `cpmm setup` 시 기존 `~/.claude`를 `~/.claude.pre-cpmm`으로 백업합니다. 재실행 시 CPMM 관리 파일만 갱신하고, 언어 설정·로컬 설정·학습된 패턴·세션 기록은 보존됩니다.
456
+ A: 최초 `cpmm setup` 시 기존 `~/.claude`를 `~/.claude.pre-cpmm`으로 백업합니다. 재실행 시 CPMM 관리 경로는 재생성되고, 사용자 소유 경로(언어 설정, 로컬 설정, 학습 패턴, 세션)는 보존됩니다. 정확한 경계는 설치 섹션의 2-Layer 구조를 참고하세요.
417
457
  </details>
418
458
 
419
459
  <details>
@@ -431,7 +471,22 @@ A: API 가격(컴퓨팅 비용 반영)을 보면 Opus 4.6 ($5/MTok input)은 Son
431
471
  <details>
432
472
  <summary><strong>Q: /do 실행 중 실패하면 어떻게 되나요?</strong></summary>
433
473
 
434
- A: CPMM은 **원자적 롤백**을 사용합니다. `/do` 실행 `git stash push`로 스냅샷을 저장합니다. 2회 재시도 후 실패하면 `git stash pop`이 작업 트리를 실행 전 상태로 복원합니다. dirty state를 방지하고 수동 정리에 소비될 2-4 메시지를 절약합니다.
474
+ A: CPMM은 `scripts/snapshot.sh`를 통한 **best-effort 원자적 롤백**을 사용합니다.
475
+
476
+ - `/do` 실행 전 `snapshot.sh push`로 라벨된 stash 스냅샷을 시도합니다.
477
+ - 실패 시 `snapshot.sh pop`이 복구를 시도하며, 아래 상태 중 하나를 반환합니다:
478
+
479
+ | 상태 | 의미 |
480
+ | --- | --- |
481
+ | `RESTORED` | CPMM 라벨 stash를 정상 pop하여 복구 완료 |
482
+ | `RESTORE_FAILED` | `git stash pop` 실패 (예: 충돌) |
483
+ | `CHECKOUT_CLEAN` | CPMM stash가 없어 fallback `git checkout .` 성공 |
484
+ | `CLEAN_FAILED` | fallback 정리도 실패 |
485
+
486
+ 롤백 후에도 완전히 깨끗하지 않다면:
487
+ 1. `git status` 확인
488
+ 2. `git stash list` 확인
489
+ 3. 충돌 해결/새 untracked 파일 수동 정리 후 재시도
435
490
 
436
491
  - 비용: 0 (git stash는 로컬 작업)
437
492
  - 제한: 기존(tracked) 파일만 추적. 새로 생성된 파일은 수동 제거 필요.
package/README.md CHANGED
@@ -56,7 +56,49 @@ Dependency policy:
56
56
  - auto-install supports `npm` (mgrep), `brew` (macOS), and Linux package managers `apt-get`, `dnf`, `pacman`, `apk`
57
57
  - on macOS without Homebrew, setup prints the Homebrew install command
58
58
 
59
- ### 4. Perplexity and Language (Optional)
59
+ ### 4. Customization & Update Policy
60
+
61
+ - `cpmm setup` installs missing dependencies, then configures CPMM (copies config files, language selection, Perplexity setup).
62
+ - `cpmm doctor` checks dependency status without modifying anything.
63
+ - Re-running `cpmm setup` replaces CPMM-managed files with the latest version while preserving user data.
64
+
65
+ ```text
66
+ ~/.claude/* ← Global Baseline (CPMM-managed)
67
+ ├── agents/ 🔄 Replaced on update
68
+ ├── commands/ 🔄 Replaced on update
69
+ ├── contexts/ 🔄 Replaced on update
70
+ ├── scripts/ 🔄 Replaced on update
71
+ ├── skills/cli-wrappers/ 🔄 Replaced on update
72
+ ├── rules/*.md 🔄 Replaced on update
73
+ ├── settings.json 🔄 Replaced on update
74
+ ├── settings.local.json ✋ User-owned — preserved
75
+ ├── skills/learned/ ✋ User-owned — preserved
76
+ ├── sessions/ ✋ User-owned — preserved
77
+ ├── plans/ ✋ User-owned — preserved
78
+ ├── projects/ ✋ User-owned — preserved
79
+ └── rules/language.md ✋ User-owned — preserved
80
+
81
+ <project>/.claude/* ← Project-Specific (user/team customization)
82
+ ├── CLAUDE.md Project-specific instructions
83
+ ├── commands/ Project-specific slash commands
84
+ ├── skills/ Project-specific skills
85
+ ├── rules/ Project-specific rules
86
+ └── settings.json Project-specific permissions/hooks/MCP disable
87
+ ```
88
+
89
+ > **Two key rules:**
90
+ > 1. Global customization goes in `settings.local.json` only — `settings.json` is overwritten on update.
91
+ > 2. Custom commands/rules go in project `.claude/` — global `commands/` is managed by CPMM.
92
+
93
+ Project initialization tip:
94
+ - Before running `claude`, initialize your project with templates in `project-templates/` (not copied into `~/.claude`).
95
+
96
+ ### 5. Advanced (Optional)
97
+ <details>
98
+ <summary>Perplexity, language, manual install</summary>
99
+
100
+ **Perplexity/Language setup (not required):**
101
+ - Perplexity is used for web research in `/dplan`. Without it, `/dplan` still works via Sequential Thinking + Context7. All other features are unrelated to Perplexity.
60
102
  - On fresh interactive installs, `cpmm setup` asks for output language and Perplexity API key.
61
103
  - English (default): no file needed; remove `~/.claude/rules/language.md` if it exists.
62
104
  - Non-English: create `~/.claude/rules/language.md` with your preferred language.
@@ -72,11 +114,7 @@ Dependency policy:
72
114
  }
73
115
  ```
74
116
 
75
- ### 5. Advanced (Optional)
76
- <details>
77
- <summary>Show manual dependency setup and source install</summary>
78
-
79
- Manual dependency setup:
117
+ **Manual dependency setup:**
80
118
  ```bash
81
119
  # jq
82
120
  brew install jq # macOS
@@ -97,7 +135,7 @@ sudo pacman -S --noconfirm tmux # Arch
97
135
  sudo apk add tmux # Alpine
98
136
  ```
99
137
 
100
- Manual install from source:
138
+ **Manual install from source:**
101
139
  ```bash
102
140
  git clone https://github.com/move-hoon/claude-pro-minmax.git
103
141
  cd claude-pro-minmax
@@ -106,20 +144,22 @@ node bin/cpmm.js setup
106
144
  # bash install.sh
107
145
  ```
108
146
 
109
- Install behavior:
110
- - `cpmm setup` installs missing dependencies, then configures CPMM (copies config files, language selection, Perplexity setup).
111
- - `cpmm doctor` checks dependency status without modifying anything.
112
- - Re-running `cpmm setup` updates CPMM-managed files in place and preserves user-owned files like `language.md`, `settings.local.json`, `skills/learned/`, and `sessions/`.
113
-
114
- Project initialization tip:
115
- - Before running `claude`, initialize your project with templates in `project-templates/` (not copied into `~/.claude`).
116
-
117
147
  </details>
118
148
 
119
149
  ---
120
150
 
121
151
  ## 🚀 Quick Start
122
152
 
153
+ ### ⚡ First 60 Seconds (FTUE)
154
+
155
+ ```bash
156
+ claude
157
+ > /plan Analyze this repository and propose a 3-step implementation plan for one small improvement.
158
+ > /do Implement step 1 only, with minimal and safe changes.
159
+ > /review .
160
+ > /session-save ftue-first-pass
161
+ ```
162
+
123
163
  ### 🤖 Agent Workflow
124
164
 
125
165
  CPMM provides layered model routing: `/plan` chains @planner (Sonnet 4.6) → @builder (Haiku 4.5) for complex tasks, while `/do` executes directly in the current session model for speed.
@@ -413,7 +453,7 @@ This configuration is specifically designed for the Pro Plan's 5-hour rolling re
413
453
  <details>
414
454
  <summary><strong>Q: Does it conflict with existing Claude Code settings?</strong></summary>
415
455
 
416
- A: On first `cpmm setup`, CPMM backs up your existing `~/.claude` to `~/.claude.pre-cpmm`. Re-running `cpmm setup` updates CPMM-managed files in place your language settings, local config, learned patterns, and session history are preserved.
456
+ A: On first `cpmm setup`, CPMM backs up your existing `~/.claude` to `~/.claude.pre-cpmm`. Re-running `cpmm setup` recreates CPMM-managed paths and preserves user-owned paths (language settings, local config, learned patterns, sessions). See the 2-Layer structure in the install section for exact boundaries.
417
457
  </details>
418
458
 
419
459
  <details>
@@ -431,7 +471,22 @@ A: API pricing (reflecting compute cost), Opus 4.6 ($5/MTok input) is much more
431
471
  <details>
432
472
  <summary><strong>Q: What happens when /do fails mid-execution?</strong></summary>
433
473
 
434
- A: CPMM uses **Atomic Rollback**. Before `/do` executes, `git stash push` saves a snapshot. If execution fails after 2 retries, `git stash pop` restores the working tree to its pre-execution state. This prevents dirty state and saves 2-4 messages that would otherwise be spent on manual cleanup.
474
+ A: CPMM uses **best-effort atomic rollback** via `scripts/snapshot.sh`.
475
+
476
+ - Before `/do`, `snapshot.sh push` attempts a labeled stash snapshot.
477
+ - On failure, `snapshot.sh pop` attempts restore and returns one of these statuses:
478
+
479
+ | Status | Meaning |
480
+ | --- | --- |
481
+ | `RESTORED` | Labeled CPMM stash was popped successfully. |
482
+ | `RESTORE_FAILED` | `git stash pop` failed (for example: conflicts). |
483
+ | `CHECKOUT_CLEAN` | No CPMM stash found; fallback `git checkout .` succeeded. |
484
+ | `CLEAN_FAILED` | Fallback cleanup also failed. |
485
+
486
+ If rollback did not fully restore clean state:
487
+ 1. Run `git status`.
488
+ 2. Run `git stash list`.
489
+ 3. Resolve conflicts / remove new untracked files manually, then retry.
435
490
 
436
491
  - Cost: Zero (git stash is a local operation)
437
492
  - Limitation: Only tracks existing (tracked) files. Newly created files require manual removal.
package/lib/cli.js CHANGED
@@ -10,8 +10,10 @@ const DEPS = [
10
10
  key: "claude",
11
11
  command: "claude",
12
12
  required: false,
13
+ prerequisite: true,
13
14
  installKind: "skip",
14
- description: "Claude Code CLI (assumed pre-installed)",
15
+ description: "Claude Code CLI",
16
+ installHint: "curl -fsSL https://claude.ai/install.sh | bash",
15
17
  },
16
18
  {
17
19
  key: "jq",
@@ -40,6 +42,11 @@ const DEPS = [
40
42
  },
41
43
  ];
42
44
 
45
+ function colorize(text, colorCode) {
46
+ if (!process.stdout.isTTY || process.env.NO_COLOR) return text;
47
+ return `\x1b[${colorCode}m${text}\x1b[0m`;
48
+ }
49
+
43
50
  function commandExists(cmd) {
44
51
  try {
45
52
  execSync(`command -v ${cmd}`, { stdio: "ignore" });
@@ -119,9 +126,28 @@ function checkDeps() {
119
126
  }
120
127
 
121
128
  function printStatus(results) {
122
- console.log("");
123
- for (const r of results) {
124
- const icon = r.installed ? "OK" : (r.required ? "MISSING" : "SKIP");
129
+ const prereqs = results.filter((r) => r.prerequisite);
130
+ const deps = results.filter((r) => !r.prerequisite);
131
+
132
+ if (prereqs.length > 0) {
133
+ console.log("\nPrerequisite:");
134
+ for (const r of prereqs) {
135
+ if (r.installed) {
136
+ console.log(` ${colorize("✓", "32")} ${r.key.padEnd(8)} ${r.description}`);
137
+ } else {
138
+ console.log(` ${colorize("⚠", "33")} ${r.key.padEnd(8)} ${r.description} — ${colorize("not found", "33")}`);
139
+ if (r.installHint) {
140
+ console.log(` Install: ${r.installHint}`);
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ console.log("\nDependencies:");
147
+ for (const r of deps) {
148
+ const icon = r.installed
149
+ ? colorize("✓", "32")
150
+ : (r.required ? colorize("✗", "31") : colorize("○", "33"));
125
151
  const tag = r.required ? "[required]" : "[optional]";
126
152
  console.log(` ${icon} ${r.key.padEnd(8)} ${tag} ${r.description}`);
127
153
  }
@@ -197,7 +223,7 @@ function runDoctor() {
197
223
  return 1;
198
224
  }
199
225
 
200
- console.log("All checks passed.");
226
+ console.log(colorize("All checks passed.", "32"));
201
227
  return 0;
202
228
  }
203
229
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-pro-minmax",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Quota-first routing and safety layer for Claude Code Pro workflows.",
5
5
  "author": "donghoon <move-hoon@users.noreply.github.com>",
6
6
  "license": "MIT",