claude-context-auto-handoff 1.0.4 → 1.0.6
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/.claude-plugin/marketplace.json +29 -28
- package/.claude-plugin/plugin.json +20 -20
- package/LICENSE +21 -21
- package/README.ko.md +206 -196
- package/README.md +206 -196
- package/build/index.js +77 -5
- package/hooks/hooks.json +48 -37
- package/hooks/lib/frontmatter.js +52 -0
- package/hooks/session-start.js +25 -0
- package/hooks/user-prompt-submit.js +20 -0
- package/package.json +1 -1
- package/scripts/setup.js +12 -12
- package/scripts/setup.ps1 +35 -35
- package/scripts/setup.sh +34 -34
- package/skills/{resume → handoff-resume}/SKILL.md +16 -16
- package/skills/{handoff → handoff-save}/SKILL.md +42 -37
- package/skills/handoff-search/SKILL.md +17 -0
- package/templates/.codex/config.toml +2 -2
- package/templates/.codex/hooks.json +43 -43
- package/templates/AGENTS.md +33 -33
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "context-handoff",
|
|
3
|
-
"description": "Claude Code plugin for automatic session context handoff across compactions and stops.",
|
|
4
|
-
"owner": {
|
|
5
|
-
"name": "Ethualo",
|
|
6
|
-
"email": "lkh0926ym@naver.com"
|
|
7
|
-
},
|
|
8
|
-
"plugins": [
|
|
9
|
-
{
|
|
10
|
-
"name": "claude-context-handoff",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "context-handoff",
|
|
3
|
+
"description": "Claude Code plugin for automatic session context handoff across compactions and stops.",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "Ethualo",
|
|
6
|
+
"email": "lkh0926ym@naver.com"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "claude-context-handoff",
|
|
11
|
+
"version": "1.0.6",
|
|
12
|
+
"displayName": "Context Auto-Handoff",
|
|
13
|
+
"description": "Automatically saves session context and generates handoff manifests before Claude compacts or stops.",
|
|
14
|
+
"source": {
|
|
15
|
+
"source": "npm",
|
|
16
|
+
"package": "claude-context-auto-handoff"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/Ethualo/claude-context-auto-handoff",
|
|
19
|
+
"repository": "https://github.com/Ethualo/claude-context-auto-handoff",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Ethualo",
|
|
23
|
+
"email": "lkh0926ym@naver.com"
|
|
24
|
+
},
|
|
25
|
+
"keywords": ["context", "handoff", "session", "memory", "compaction", "claude-code"],
|
|
26
|
+
"category": "productivity"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "claude-context-handoff",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Automatically saves session context and generates handoff manifests before Claude compacts or stops.",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Ethualo",
|
|
7
|
-
"email": "lkh0926ym@naver.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/Ethualo/claude-context-auto-handoff",
|
|
10
|
-
"repository": "https://github.com/Ethualo/claude-context-auto-handoff",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"keywords": ["context", "handoff", "session", "memory", "compaction", "claude-code"],
|
|
13
|
-
"category": "productivity",
|
|
14
|
-
"mcpServers": {
|
|
15
|
-
"context-handoff-manager": {
|
|
16
|
-
"command": "node",
|
|
17
|
-
"args": ["${CLAUDE_PLUGIN_ROOT}/build/index.js"]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-context-handoff",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "Automatically saves session context and generates handoff manifests before Claude compacts or stops.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Ethualo",
|
|
7
|
+
"email": "lkh0926ym@naver.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/Ethualo/claude-context-auto-handoff",
|
|
10
|
+
"repository": "https://github.com/Ethualo/claude-context-auto-handoff",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": ["context", "handoff", "session", "memory", "compaction", "claude-code"],
|
|
13
|
+
"category": "productivity",
|
|
14
|
+
"mcpServers": {
|
|
15
|
+
"context-handoff-manager": {
|
|
16
|
+
"command": "node",
|
|
17
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/build/index.js"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Ethualo
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ethualo
|
|
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.ko.md
CHANGED
|
@@ -1,196 +1,206 @@
|
|
|
1
|
-
# claude-context-auto-handoff
|
|
2
|
-
|
|
3
|
-
**[English](README.md)** | 한국어
|
|
4
|
-
|
|
5
|
-
컨텍스트
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-

|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 필수 요구사항
|
|
13
|
-
|
|
14
|
-
- **Node.js 18+** — `node` 명령어가 `PATH`에 있어야 함
|
|
15
|
-
- **Claude Code** 또는 **Codex** — 플러그인 및 훅 실행에 Claude Code CLI 또는 Codex CLI 필요
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 개요
|
|
20
|
-
|
|
21
|
-
Claude의 컨텍스트 창이 가득 차면 대화가 자동으로 압축됩니다.
|
|
22
|
-
|
|
23
|
-
핸드오프 내용은 **텔레그래피즘**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
**
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
**수동
|
|
146
|
-
```
|
|
147
|
-
/
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
###
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
*
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
*
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
1
|
+
# claude-context-auto-handoff
|
|
2
|
+
|
|
3
|
+
**[English](README.md)** | 한국어
|
|
4
|
+
|
|
5
|
+
컨텍스트 압축이나 세션 종료 직전, 다음 세션이 현재 맥락을 그대로 이어받도록 토큰 효율적인 핸드오프 문서를 자동으로 써 두는 Claude Code 플러그인.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 필수 요구사항
|
|
13
|
+
|
|
14
|
+
- **Node.js 18+** — `node` 명령어가 `PATH`에 있어야 함
|
|
15
|
+
- **Claude Code** 또는 **Codex** — 플러그인 및 훅 실행에 Claude Code CLI 또는 Codex CLI 필요
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 개요
|
|
20
|
+
|
|
21
|
+
Claude의 컨텍스트 창이 가득 차면 대화가 자동으로 압축됩니다. 이때 방금 내린 설계 결정, 해결 중이던 버그, 다음 할 일이 흐릿해집니다. 이 플러그인은 `PreCompact`와 `Stop` 이벤트를 감지해 압축 전에 AI가 직접 핸드오프 문서를 씁니다. 다음 세션은 그 파일 하나로 즉시 이어집니다.
|
|
22
|
+
|
|
23
|
+
핸드오프 내용은 **텔레그래피즘**(관사·군더더기·코드 스니펫 없음)으로 작성해 토큰은 아끼면서도 다음 세션에 필요한 결정 맥락은 그대로 남깁니다.
|
|
24
|
+
|
|
25
|
+
초안 작성(1회 저장당 3-6k 토큰 규모)은 Haiku 서브에이전트에 위임되며, 서브에이전트가 `generate_handoff_manifest` 호출까지 직접 수행합니다 — 초안이 메인 세션 모델 컨텍스트를 거치지 않습니다.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 구성 요소
|
|
30
|
+
|
|
31
|
+
### 도구 (Tools)
|
|
32
|
+
|
|
33
|
+
- **`generate_handoff_manifest`** — 현재 프로젝트의 `.claude/handoff.md`에 구조화된 핸드오프 문서를 저장합니다. `.claude/handoffs/{YYYY-MM-DD}/handoff-{timestamp}.md`에도 아카이브됩니다 (최근 50개 파일만 유지, 자동 정리). 동시에 `.claude/handoffs/index.md`에 한 줄 요약(날짜, 키워드, 헤드라인, 경로)을 upsert해 — 아카이브 파일을 전부 열지 않고도 grep 한 번으로 과거 세션을 찾을 수 있는 경량 인덱스를 유지합니다. 한 세션 안에서 여러 번 저장돼도(예: 긴 세션에서 `PreCompact`와 `Stop`이 둘 다 발동) 새 파일을 쌓지 않고 그 세션의 아카이브 파일·인덱스 줄을 그대로 갱신합니다 — MCP 서버 프로세스 하나당 세션ID 하나를 부여해 frontmatter `session:` 필드에 기록합니다.
|
|
34
|
+
|
|
35
|
+
| 파라미터 | 타입 | 필수 | 설명 |
|
|
36
|
+
|----------|------|------|------|
|
|
37
|
+
| `nextSteps` | `string[]` | ✅ | 다음 세션에서 즉시 이어받을 할 일 목록 |
|
|
38
|
+
| `summary` | `string` | ✗ | 간결한 세션 요약 (텔레그래피즘) — 다른 필드로 충분하면 생략 |
|
|
39
|
+
| `taskDescription` | `string` | ✗ | 상위 목표 + 핵심 의도 (왜 중요한가) |
|
|
40
|
+
| `currentStatus` | `string` | ✗ | 완료된 것 vs 남은 것 — 무엇이 아닌 왜를 명시 |
|
|
41
|
+
| `keyDecisions` | `string[]` | ✗ | 아키텍처 결정과 이유. 형식: `"Decision: X — Reason: Y"` |
|
|
42
|
+
| `failedApproaches` | `string[]` | ✗ | 이미 실패한 시도. 형식: `"Approach: X → Result: Y → Lesson: Z"` |
|
|
43
|
+
| `modifiedFiles` | `string[]` | ✗ | 변경 파일과 델타 메모. 형식: `"경로/파일: 무엇을 변경"` — 코드 금지 |
|
|
44
|
+
| `implicitRules` | `string[]` | ✗ | 기술 스택, 네이밍 컨벤션, 환경변수 — 코드에서 유추 불가한 규칙 |
|
|
45
|
+
| `blockers` | `string` | ✗ | 미해결 에러 또는 막혀 있는 문제 |
|
|
46
|
+
| `workingDirectory` | `string` | ✗ | handoff.md를 쓸 프로젝트 루트 절대 경로 — Windows에서 `process.cwd()`가 System32를 가리킬 때 필요 |
|
|
47
|
+
|
|
48
|
+
### 스킬 (Skills)
|
|
49
|
+
|
|
50
|
+
| 명령어 | 동작 |
|
|
51
|
+
|--------|------|
|
|
52
|
+
| `/handoff-save` | Haiku 서브에이전트에 위임 — 세션 컨텍스트 초안 작성 + `generate_handoff_manifest` 호출까지 직접 수행 (3-6k 토큰 초안이 비싼 메인 모델을 거치지 않음) |
|
|
53
|
+
| `/handoff-resume` | `.claude/handoff.md` 읽어 새 세션에서 컨텍스트 복원 |
|
|
54
|
+
| `/handoff-search` | `.claude/handoffs/index.md`를 grep해 주제와 일치하는 과거 세션 검색 — DB·임베딩 없음 |
|
|
55
|
+
|
|
56
|
+
### 훅 (Hooks)
|
|
57
|
+
|
|
58
|
+
Claude Code 훅은 기본 내장. Codex 훅은 `templates/.codex`를 프로젝트 루트에 복사해야 활성화됩니다 ([Codex 설치](#codex) 참조).
|
|
59
|
+
|
|
60
|
+
| 이벤트 | 동작 |
|
|
61
|
+
|--------|------|
|
|
62
|
+
| `PreCompact` | 컨텍스트 압축 직전 `handoff-save` 스킬(Haiku 서브에이전트) 호출 지시 |
|
|
63
|
+
| `Stop` | 핸드오프 파일이 오래됐거나 없으면 경고 |
|
|
64
|
+
| `SessionStart` | 핸드오프 존재 시 짧은 힌트(경과 시간, 주제)만 노출 — 전체 내용은 키워드 매칭이나 `/handoff-resume`으로 로드 |
|
|
65
|
+
| `UserPromptSubmit` | 프롬프트가 직전 핸드오프의 키워드와 일치하면 전체 컨텍스트 자동 주입 |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 빠른 시작
|
|
70
|
+
|
|
71
|
+
**Linux / macOS**
|
|
72
|
+
```bash
|
|
73
|
+
curl -fsSL https://raw.githubusercontent.com/Ethualo/context-handoff-mcp-server/main/scripts/setup.sh | bash
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Windows (PowerShell)**
|
|
77
|
+
```powershell
|
|
78
|
+
irm https://raw.githubusercontent.com/Ethualo/context-handoff-mcp-server/main/scripts/setup.ps1 | iex
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**npm (크로스플랫폼)**
|
|
82
|
+
```bash
|
|
83
|
+
npm install -g claude-context-auto-handoff
|
|
84
|
+
claude-context-handoff-setup
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 설치
|
|
90
|
+
|
|
91
|
+
### Claude Code 플러그인으로 설치
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
claude plugin install claude-context-auto-handoff
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### npm 패키지로 설치
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm install -g claude-context-auto-handoff
|
|
101
|
+
claude-context-handoff-setup # hooks.json 자동 배치
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### MCP 수동 설정 (Claude Code)
|
|
105
|
+
|
|
106
|
+
Claude Code `settings.json`에 추가:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"mcpServers": {
|
|
111
|
+
"context-handoff-manager": {
|
|
112
|
+
"command": "node",
|
|
113
|
+
"args": ["/path/to/build/index.js"]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Codex
|
|
120
|
+
|
|
121
|
+
`~/.codex/config.toml`에 추가 (전역 MCP 설정):
|
|
122
|
+
|
|
123
|
+
```toml
|
|
124
|
+
[mcp_servers.context-handoff]
|
|
125
|
+
command = "node"
|
|
126
|
+
args = ["/path/to/build/index.js"]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
그런 다음 훅 템플릿을 프로젝트 루트에 복사:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
cp -r /path/to/claude-context-auto-handoff/templates/.codex ./.codex
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Claude Code와 동일한 `SessionStart`, `PreCompact`, `Stop` 훅이 활성화됩니다.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 사용법
|
|
140
|
+
|
|
141
|
+
### Claude Code
|
|
142
|
+
|
|
143
|
+
네 훅 모두 자동으로 돕니다 — `SessionStart`는 핸드오프 있으면 짧은 힌트 노출, `UserPromptSubmit`은 프롬프트가 저장된 키워드와 일치하면 전체 컨텍스트 자동 로드, `PreCompact`는 압축 전 저장, `Stop`은 핸드오프가 오래됐을 때 경고. 생성된 문서는 `.claude/handoff.md`에 저장됩니다.
|
|
144
|
+
|
|
145
|
+
**수동 체크포인트:**
|
|
146
|
+
```
|
|
147
|
+
/handoff-save
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**수동 복원 (키워드 매칭이 안 됐을 경우):**
|
|
151
|
+
```
|
|
152
|
+
/handoff-resume
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**과거 세션 검색:**
|
|
156
|
+
```
|
|
157
|
+
/handoff-search <주제>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Codex
|
|
161
|
+
|
|
162
|
+
같은 세 훅이 `.codex/hooks.json`으로 자동 실행됩니다. 슬래시 명령어 없음 — 훅이 모두 처리.
|
|
163
|
+
|
|
164
|
+
| 이벤트 | 동작 |
|
|
165
|
+
|--------|------|
|
|
166
|
+
| `SessionStart` | `.claude/handoff.md`를 읽어 컨텍스트로 주입 |
|
|
167
|
+
| `PreCompact` | 압축 전 handoff-save 스킬(Haiku 서브에이전트) 호출 지시 |
|
|
168
|
+
| `Stop` | 핸드오프가 오래됐거나 없으면 경고 |
|
|
169
|
+
|
|
170
|
+
### 출력 형식
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
# Session Handoff Snapshot
|
|
174
|
+
> **Generated:** 2026. 6. 22. 오후 3:30:00
|
|
175
|
+
|
|
176
|
+
## 🎯 High-Level Objective
|
|
177
|
+
* **Goal:** Supabase + Notion 주식 데이터 실시간 동기화 Next.js 15 앱 구축
|
|
178
|
+
* **Core Intent:** Zustand 스토어로 클라이언트 재요청 최소화 — 비용 절감
|
|
179
|
+
|
|
180
|
+
## 📌 Current State & Next Steps
|
|
181
|
+
* **Status:** Task 3 (Zustand 스토어) 완료
|
|
182
|
+
* **Blocker:** Notion API rate limit (3 req/s) — 버퍼 레이어 필요
|
|
183
|
+
* **Next Action:** Supabase Edge Functions 디바운스 큐 구현
|
|
184
|
+
|
|
185
|
+
## 🛠️ Modified Files Delta
|
|
186
|
+
* src/store/stockStore.ts: Zustand 스토어 뼈대 + syncStatus 상태 정의
|
|
187
|
+
* src/app/api/notion/sync/route.ts: POST 핸들러 작성 완료, Supabase 미연결
|
|
188
|
+
|
|
189
|
+
## 🚫 Failed Approaches (DO NOT RETRY)
|
|
190
|
+
* Approach: Server Actions에서 Notion API 직접 호출 → Result: 리렌더 시 rate limit 즉시 터짐 → Lesson: 큐 미들웨어 필수
|
|
191
|
+
* Approach: useEffect 주기 폴링 → Result: Supabase 읽기 사용량 급증 → Lesson: 폐기
|
|
192
|
+
|
|
193
|
+
## 🔑 Crucial Context & Implicit Rules
|
|
194
|
+
* Stack: Next.js 15 (App Router), Supabase v2, Zustand v5
|
|
195
|
+
* Naming: API 엔드포인트 항상 route.ts, 스토어 PascalCase
|
|
196
|
+
* Env: NEXT_PUBLIC_SUPABASE_ANON_KEY 사용 중
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
*세션 시작 시 짧은 힌트만 노출됩니다. 전체 컨텍스트는 다음 프롬프트가 위 키워드와 일치할 때, 또는 수동 `/handoff-resume`으로 로드됩니다.*
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 라이선스
|
|
205
|
+
|
|
206
|
+
MIT
|