docs(spec): promote F6-L2 git sync MVP + README setup section
- 신규 spec docs/superpowers/specs/2026-04-26-f6-l2-git-sync.md
결정 표 + 범위 + 시스템 의존 + 동작 요약 + 후속 후보
- 2026-04-25-dogfood-feedback.md F6 진행 상태 line 갱신:
L2 — 🌱 raw → 🚀 promoted (MVP)
- README.md '원격 백업 (선택, F6-L2)' 섹션:
일회 설정 (git init + remote add + 자격증명) + 사용법
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #8.
This commit is contained in:
@@ -593,7 +593,7 @@ inkling_export_version: 1
|
||||
|
||||
**진행 상태:**
|
||||
- L1 (로컬 스냅샷) — 🚀 promoted → `docs/superpowers/specs/2026-04-26-f6-l1-local-snapshot.md`
|
||||
- L2 (git sync) — 🌱 raw, 7번 항목으로 예정
|
||||
- L2 (git sync) — 🚀 promoted (MVP) → `docs/superpowers/specs/2026-04-26-f6-l2-git-sync.md`
|
||||
- L3 (import) — 🚀 promoted → `docs/superpowers/specs/2026-04-26-f6-l3-import.md`
|
||||
|
||||
**발견:** 2026-04-26 dogfood 시작 직전 사고 실험. 슬라이스 v0.4 의 메모 데이터는 `%APPDATA%\Inkling\Inkling\profiles\default\` 단 한 위치에만 존재. 디스크 고장·실수 삭제·DB 손상·OS 재설치 = 총 손실. Strategy.md §1 의 "이제 잊어도 됩니다" 보상이 **데이터 영속성 신뢰** 위에 서 있어서, 이 신뢰가 깨지면 슬라이스 §1.3 의 종료 조건 ("본인 2주 dogfood 완주") 자체가 위협받음.
|
||||
|
||||
55
docs/superpowers/specs/2026-04-26-f6-l2-git-sync.md
Normal file
55
docs/superpowers/specs/2026-04-26-f6-l2-git-sync.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# F6-L2 Git Sync Spec (Promoted, MVP)
|
||||
|
||||
**Extracted from:** `2026-04-25-dogfood-feedback.md` F6 §"L2 — git remote 마크다운 동기화"
|
||||
**Status:** 🚀 promoted — implemented 2026-04-26 (MVP scope only)
|
||||
|
||||
## 결정 (mini-brainstorm 결과)
|
||||
|
||||
| 결정 | 값 | 근거 |
|
||||
|------|-----|------|
|
||||
| Sync 형식 | F5 export tree (마크다운 + 미디어 + manifest) | 기존 형식 재사용, RAG / Obsidian 호환 |
|
||||
| Working tree 위치 | `<profileDir>/sync/` | 프로필 단위 격리 |
|
||||
| 초기 설정 | 사용자 수동 (`git init` + `git remote add`) | MVP 단순화, OS credential helper 활용 |
|
||||
| 자격증명 | OS git credential helper | 별도 safeStorage 도입 비용 회피 |
|
||||
| 트리거 | 트레이 "지금 동기화" + 종료 시 1회 | 5분 debounce 는 MVP 외 |
|
||||
| Conflict 정책 | push 실패 시 토스트 + 로그, 사용자 수동 해결 | dogfood 단일 디바이스 가정 |
|
||||
| Settings UI | 미구현 (후속) | 슬라이스 §5 의 "Settings 창 없음" 결정 유지 |
|
||||
| 미디어 포함 | 기본 ON (F5 와 동일) | 일관성 |
|
||||
| LFS | 미사용 | 사이즈 모니터링만 |
|
||||
| 암호화 | 미사용 | 후속 |
|
||||
|
||||
## 범위 (PR 안에 포함됨)
|
||||
|
||||
- `src/main/services/GitClient.ts` (신규) — 얇은 git CLI 래퍼
|
||||
- `src/main/services/SyncService.ts` (신규) — F5 export → git add → commit → push
|
||||
- `src/main/index.ts` 수정 — SyncService instantiate, 6번째 트레이 콜백, on-quit drain
|
||||
- `src/main/tray.ts` 수정 — 6번째 콜백 + "지금 동기화" 메뉴
|
||||
- `tests/unit/GitClient.test.ts` (신규)
|
||||
- `tests/unit/SyncService.test.ts` (신규)
|
||||
- `README.md` — 원격 백업 섹션
|
||||
|
||||
## 시스템 의존
|
||||
|
||||
- `git` CLI 가 사용자 PATH 에 있어야 함 (Windows: Git for Windows). README 사전 요구에 명시되어 있음 (이미 슬라이스에서 요구)
|
||||
- OS credential helper 가 git push 시 인증 자동 처리 (Windows: Git Credential Manager)
|
||||
|
||||
## 동작 요약
|
||||
|
||||
1. 트레이 "지금 동기화" 또는 앱 종료 시 1회
|
||||
2. `<profileDir>/sync/` 가 git repo + origin remote 갖췄는지 확인 — 미설정이면 토스트로 안내
|
||||
3. F5 ExportService 가 syncDir 에 마크다운 트리 덮어쓰기 (idempotent)
|
||||
4. `git add -A` → `git commit -m "chore(notes): sync <ISO>"` (변경 없으면 changed=false)
|
||||
5. `git push` (upstream 미설정이면 `-u origin <branch>` 자동 설정)
|
||||
6. 결과 로그: sha, changed, pushed
|
||||
|
||||
## 후속 (별 spec 후보)
|
||||
|
||||
- 5분 debounce + 노트 변경 이벤트 감지 (auto-sync)
|
||||
- Settings UI (URL · 토글 · 미디어 포함 여부 · 충돌 정책)
|
||||
- safeStorage 기반 토큰 직접 관리
|
||||
- 충돌 해결 다이얼로그 (3-way 선택)
|
||||
- 다중 활성 디바이스 sync
|
||||
- Git LFS for media
|
||||
- 암호화 (SQLCipher / age) at-rest
|
||||
- 첫 설정 wizard / repo init helper
|
||||
- Sync 상태 트레이 아이콘 색 (green=synced, yellow=dirty, red=error)
|
||||
Reference in New Issue
Block a user