Commit Graph

31 Commits

Author SHA1 Message Date
Claude 4182eba9a6
docs: PRD 2차 갭 분석 체크리스트 추가 (2.7-D~F / N4-C4~C6)
roadmap.md §2.7-A~C(단톡 따라잡기·관계별 페르소나·스팸 감지) 완료 후 PRD.md 재대조로
발견한 잔여 갭 3건을 체크리스트로 등록. 우선순위: D(자율성 상대별 예외, P0 명시 항목인데
오버라이드 메커니즘 자체가 없음) → E(관계 메모 반영, 필드/UI는 있으나 프롬프트 주입 안 됨) →
F(답장 마감 알림, P1이자 완전 미구현). deploy-checklist.md에도 동일 항목을 N4-C4/C5/C6로
동기화.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 05:23:03 +00:00
Claude a8c7b98922
스팸/도배 감지 최소 버전(2.7-C) 구현: 대화방 단위 자동 응대 일시중단 + 재개
PRD.md §4 엣지케이스가 "안전 관련이라 v1 최소 버전 필요"로 명시한 항목(P0)인데
관련 로직이 0건이었던 마지막 콘텐츠 갭(roadmap.md §2.7-C, deploy-checklist.md
N4-C3a/b)을 채운다. Track C(콘텐츠 갭) A/B/C 전체 완료.

- core-backend/flood_detect.go(신규): floodMessageThreshold=5건 /
  floodWindow=2분 상수 + floodDetected()/floodReason(). 안전을 위해 반드시
  있어야 하는 기술적 최소값이라 명시적으로 placeholder로 남기고 구현했다 —
  roadmap.md §3의 "PoC 결과가 있어야 정할 수 있는 것"(자율성 기본값 등 UX
  기본값)과는 성격이 다름. 카운트는 대화방 내 sender_id != 소유자인 메시지만
  집계(트윈 자동발송·소유자 본인 발송은 소유자 ID로 남으므로 자동 제외).
- core-backend/main.go: POST /conversations/:id/messages 하드게이트에
  peer-veto → 그룹 대화 차단 다음, 에스컬레이션 체크 이전 지점으로 추가 —
  트윈 자동발송 시도가 전부 지나가는 동일한 우회 불가 지점. 이미
  TwinDisabledByFlood가 켜져 있으면 재계산 없이 즉시 차단(중복 로그/쿼리
  방지). 새로 임계치를 넘기면 대화방을 영구 차단하고 EscalationLog 기록 +
  notifyUser 푸시.
- core-backend/models.go: Conversation.TwinDisabledByFlood 필드 추가.
  TwinDisabledByPeer(거부권, 사람의 일방적 선택 — v1엔 되돌리기 API 없음)와
  달리 이건 시스템이 자동으로 취하는 조치라서 AGENTS.md "every automatic
  action needs post-hoc notification + one-tap undo"가 그대로 적용됨 —
  POST /conversations/:id/flood-reset로 되돌릴 수 있게 별도 필드로 분리.
- core-backend/a1_a2_routes.go: GET /conversations 응답에
  twin_disabled_by_flood 추가(twin_disabled_by_peer와 동일한 자리).
- core-backend/flood_detect_test.go(신규): 임계치 경계값(정확히 N건은
  통과, N+1건은 차단), 사람 발송은 게이트 안 걸림, 윈도우 밖 과거 메시지는
  집계 제외, flood-reset으로 재개, 존재하지 않는 대화방 404 — 5개 테스트.
- mobile/lib/models/models.dart, services/api_client.dart: 모델·API
  클라이언트에 twinDisabledByFlood/resetFlood() 추가.
- mobile/lib/screens/conversation_list_screen.dart: 대화 목록에 도배 차단
  배지(거부권과 같은 자리, 다른 아이콘/문구).
- mobile/lib/screens/chat_screen.dart: 채팅방을 열면(목록에서 넘어온 초기
  상태) 또는 발송 시도가 다시 차단되면 배너에 "자동응대 재개" 버튼을 보여줌
  — one-tap undo. 새 알림 메커니즘을 만들지 않고 기존 EscalationLog/
  InboxScreen을 그대로 재사용.
- mobile/test/models_test.dart: twin_disabled_by_flood 파싱 테스트 추가.
- docs/roadmap.md §2.7-C, docs/deploy-checklist.md N4-C3a/b·Track C 요약·
  "바로 다음 5개"를 완료로 갱신.

테스트: go test ./... 51/51, python3 -m pytest tests/ -q 47/47,
flutter analyze 클린 + flutter test 5/5 모두 통과.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 05:12:29 +00:00
Claude 5733ec4399
관계별 페르소나(2.7-B) 구현: 관계 티어 필드 + 온보딩/연락처 UI + 톤 프롬프트 분기
PRD.md §2.1-②·§3.1 P0 갭 우선순위 #2. close/formal 2종 관계 티어를 추가하고,
초안 생성 시 상대별 톤을 다르게 낸다.

- core-backend: TwinSettings.RelationshipTier(전역 기본값, 안전 우선 formal
  기본), Contact.RelationshipTier(1:1 연락처별 오버라이드, nullable).
  persona.go의 resolveRelationshipTier()가 연락처 오버라이드 → 전역 기본값 →
  formal 순으로 해석하고, 그룹 대화는 상대가 여럿이라 항상 전역 기본값만 사용.
  POST /conversations/:id/draft는 기존에 인증을 요구하지 않던 동작을 깨지
  않도록 currentUser(..., false)로 선택적 인증 처리 후 티어를 주입.
- 안전 관련 부수 수정: 그룹 대화에서는 전역 자율성 레벨(L1/L2)과 무관하게
  와카뷰 자동 발송을 무조건 차단(단톡 따라잡기는 L0 고정이 맞음).
- ai-service: RELATIONSHIP_TIER_INSTRUCTIONS + system_prompt_for_tier()로
  Gemini system_instruction에 관계 톤 지침을 주입. 에스컬레이션/정체성 게이팅
  로직은 티어와 무관하게 그대로 유지.
- mobile: 온보딩(말투 샘플 다음 단계)과 자율성 설정 화면에 전역 기본값
  SegmentedButton, 연락처 추가/수정 다이얼로그에 _RelationshipTierPicker로
  상대별 오버라이드 추가.
- 테스트: core-backend persona_test.go 6개(해석 순서·그룹 예외·비인증
  기본값 포함), ai-service 6개(system_prompt_for_tier + draft_reply 경로)
  전부 추가, 기존 스위트 모두 통과(go test, pytest 47/47, flutter analyze/test).
  실제 Flutter 빌드 + Playwright로 온보딩→연락처 오버라이드→목록 표시까지
  전체 라운드트립 시각 검증 완료.
- docs: roadmap.md §2.7-B, deploy-checklist.md N4-C2a~d 완료 처리. 다음
  우선순위는 Track C3(스팸/도배 감지 최소 버전).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YSB5PqF38raTxP5ABgr9m
2026-08-03 04:59:34 +00:00
Claude 64323b824e
feat: implement 단톡 따라잡기 (group catch-up summary) — roadmap.md §2.7-A
Closes the biggest content gap found against PRD.md §3.1 P0: group chat
catch-up was one of only two v1 MVP scenarios and had zero implementation.

Backend (core-backend):
- ConversationParticipant.LastReadMessageID read marker.
- POST /conversations/:id/read advances the caller's marker (never backward).
- GET /conversations/:id/summary builds context from messages since that
  marker and calls ai-service's new POST /summarize; returns unread_count
  and needs_reply.
- GET /conversations now reports unread_count per room.
- Safety: group conversations now unconditionally block twin-authored
  sends (POST /conversations/:id/messages), regardless of the sender's
  global autonomy level. PRD.md §2.3-③ requires this scenario stay L0-fixed
  with no auto-send; autonomy level is a per-user global setting today, so
  this closes the only path a global L2 whitelist match could otherwise
  auto-send into a group.

AI service (ai-service): new summarize.py module (same Gemini-call shape as
generation.py's draft_reply, no escalation/identity gating since nothing
generated here is ever sent) + POST /summarize.

Mobile: "새 대화" dialog now supports adding/removing multiple peer fields
(2+ peers -> is_group:true automatically); unread badge on conversation
rows; ChatScreen takes isGroup and renders its L1 panel as L0-locked for
groups; new "안 본 동안 요약" AppBar action opens a dialog with the summary
and, when a reply looks needed, a button that feeds straight into the
existing draft-request flow.

Verified with a real Flutter build against a live core-backend + ai-service
instance (Playwright driving 3 demo accounts through group creation, unread
badges, and the summary dialog) — this caught a real ordering bug: marking
the read marker on chat *open* meant the summary was always empty by the
time you could tap it, since opening the room already advanced the marker
past everything you'd come to catch up on. Fixed by marking read on screen
*exit* (dispose) instead, so the marker reflects what was unread that whole
visit and updates once you leave.

go test / pytest / flutter analyze+test all pass.
2026-08-03 03:16:54 +00:00
Claude 497c0ab537
docs: add PRD content-gap checklist (단톡 따라잡기, 페르소나, 스팸 감지)
PRD.md §3.1 lists 10 P0 features for v1; cross-checking the actual code
against that table found three that are fully unimplemented despite being
required scope, not deferred PoC defaults:

- 단톡 따라잡기 (group catch-up summary) — one of only two v1 MVP
  scenarios, currently 0%: no summary endpoint, no AI-service logic, no
  client UI, and the "new conversation" dialog can't even create a group
  (server already supports is_group + multiple user_ids).
- 관계별 페르소나 (relationship-tier tone, min. 2 tiers) — TwinSettings
  only has AutonomyLevel, no tier concept anywhere.
- 스팸/도배 감지 — PRD explicitly calls this out as needing a v1-minimum
  version for safety, not deferred; nothing implemented.

Added as roadmap.md §2.7 (workstream breakdown, priority A→B→C) and
deploy-checklist.md N4 Track C (mirrors Track A/B's format), cross-linked.
Explicitly scoped out image/file sending, read receipts, and typing
indicators as a separate "not proposed, PRD scope change needed" note,
since AGENTS.md requires calling out in-scope vs future-phase ideas.
2026-08-03 02:20:27 +00:00
Cursor Agent 2eed4e492c
docs: add deploy/residual checklist (N1–N5) after Phase 1 A–C
Consolidate Claude + Cursor DONE state and the next execution track
(smoke → Docker msn.iykyka.com → stabilize → FCM/Android QA → human PoC).
Sync stale PLANNING Q1–Q7/stack status and point AGENTS/README/CLAUDE/roadmap
at docs/deploy-checklist.md.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-31 01:54:55 +00:00
Claude ebf333d287
제품명 변경(분신→와카뷰) + 소프트 그라디언트/글래스모피즘 UI + 브랜드 로딩 화면
명칭 변경:
- decision-log.md Q6 확정: "분신"(가칭) → "와카뷰 (Ykavu)" — 焚身(분신자살)
  동음이의 리스크도 있었고 메신저 브랜드로 부르기 무거웠음. Master가 최종
  선택한 이름으로 변경(2026-07-31), 파생 문서(AGENTS.md/CLAUDE.md/PRD 등)·
  Flutter 앱 텍스트·web manifest/index.html·AndroidManifest 라벨까지 전부 반영
- ai-service: 본인확인 고정 문구(identity.py)·시스템 프롬프트(generation.py)도
  갱신 — 새 이름 기준으로 "본인이야 와카뷰야?" 류 질문을 감지하도록 정규식도
  같이 손봄(단순 문자열 치환만으론 어미 형태가 안 맞아서 테스트 추가/조정)
- poc/tone-corpus/의 실험용 프롬프트는 의도적으로 그대로 둠(ai-service README에
  이미 명시된 대로 프로덕션과 분리된 실험 도구)

UI/UX:
- mobile/lib/theme/app_theme.dart: 시드 컬러를 인디고/라벤더로 변경, 화면 전체에
  깔리는 소프트 그라디언트(라이트: 라벤더→스카이→핑크 파스텔, 다크: 딥 인디고→
  네이비→플럼) + 카드/인풋/칩을 반투명 "글래스" 서피스로 전환
- mobile/lib/widgets/gradient_backdrop.dart(신규): MaterialApp.builder에 연결해
  모든 화면에 자동으로 그라디언트 배경 적용
- mobile/lib/screens/splash_screen.dart(신규) + main.dart 재구성: 기존엔
  session.restore()를 기다리는 동안 아무 것도 안 그려서 흰 화면/텍스트만 뜨는
  구간이 있었음 — runApp을 먼저 하고 restore 동안 브랜드 스플래시가 뜨도록 변경
- chat_screen·autonomy_settings_screen·data_flow_screen의 커스텀 패널들도
  글래스 스타일로 맞춤

BunsinApp -> YkavuApp (mobile/lib/main.dart, test/widget_test.dart 동기화)

Flutter SDK가 없는 환경이라 flutter analyze/run으로 직접 컴파일 검증은 못했음 —
중괄호/괄호 균형과 기존에 검증된 API 패턴 위주로 신중하게 작성함. go test·
pytest는 전부 통과.
2026-07-31 01:15:42 +00:00
Cursor Agent 4f2c9df160
Complete Phase 1 C: decisions, invite ops, release path, prototype anchor
- Confirm Q1~Q7 in decision-log (Master-approved Phase C)
- Invite ops doc + note/expiry/batch/revoke APIs and tests
- Android release docs/scripts + optional key.properties signing
- Fix prototype share-link docs anchor (SHARE_URL for Master)

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 05:48:50 +00:00
Cursor Agent 93c5523a6d
Docs: FCM_SERVER_KEY in .env.example; sync roadmap B status
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 05:28:54 +00:00
Cursor Agent d8e95540ec
Docs: mark on-device tone storage done; document FCM_SERVER_KEY
Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 05:28:48 +00:00
Cursor Agent 9b02c59dd6
Complete Phase 1 B: encrypted drift DB, FCM notify, session revoke
- Flutter: drift + SQLCipher local store for tone samples/KV with
  secure-storage passphrase; migrate legacy SharedPreferences
- Core: FCM notifyUser on escalation, admin push-test, push metrics,
  DELETE session for multi-device logout
- Docs/roadmap B checkboxes updated; Linux SQLCipher apt notes

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 05:28:39 +00:00
Cursor Agent a51fc1490f
Start Phase 1 B: metrics, identity phrase, data-flow, sessions
- Record draft/escalate latency and error rates on /admin/metrics
- Add minimal /admin/dashboard and full message JSON on send
- Fix identity answers in ai-service with stable copy + tests
- Flutter DataFlowScreen + SessionsScreen; device-token API stub
- Update roadmap B checkboxes after A3 API E2E

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 05:08:08 +00:00
Cursor Agent 5033cb56ea
Implement A3 Flutter polish: conversations, contacts, L1, inbox
Wire conversation list and contacts to A1 APIs, add tone-sample
onboarding skeleton, polish L1 approve UX with editable draft panel,
and add post-hoc escalation inbox. Update roadmap A3 checklist.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 04:55:22 +00:00
Cursor Agent b288d5ed90
Implement Phase 1 A1/A2 APIs and record build plan in roadmap
Add conversation/contact/history/escalation-log endpoints, contact-scoped
whitelist matching, bearer sessions, ADMIN_API_TOKEN guards, and
`go run . migrate`. Update Flutter client to persist/send session tokens
and mark A1/A2 complete in the prioritized checklist.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 04:47:06 +00:00
Cursor Agent e1714ec5d5
Add Flutter mobile client skeleton and defer human PoC to last
Scaffold `mobile/` against core-backend APIs (signup, chat, draft,
veto, retract, autonomy/whitelist). Update roadmap/README/AGENTS so
participant PoC #1/#3 stays the final Phase 1 step after app build.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-30 04:16:41 +00:00
Claude a741001197
화이트리스트 규칙 CRUD API + 메시지 되돌리기(undo) API 추가
화이트리스트 CRUD:
- POST/GET /users/:id/whitelist-rules, DELETE /users/:id/whitelist-rules/:ruleId
- Flutter의 자율성 설정 화면(roadmap.md 2.3)이 바로 붙여 쓸 수 있게
  준비. contact_id는 저장되지만 매칭 로직(whitelistMatches)은 아직
  전역 키워드만 봄 -- 대화방-연락처 연결 모델링 필요(기존에 문서화된
  한계, 그대로 유지)

되돌리기(one-tap undo, AGENTS.md 안전 불변식):
- Message.Retracted 필드 추가
- POST /messages/:id/retract -- 트윈이 자동발송한 메시지만 대상(사람이
  쓴 메시지는 400), 이미 되돌린 건 409
- 성공 시 같은 대화방 WebSocket에 {"type":"retraction", "id":...}
  브로드캐스트. 일반 메시지 브로드캐스트도 {"type":"message"}를 붙여서
  클라이언트가 두 이벤트를 구분할 수 있게 함

되돌리기 버튼/사후알림 UI 자체는 여전히 Flutter 쪽 몫으로 남아있음
2026-07-30 03:01:06 +00:00
Claude f79108b9cd
2.6 베타 배포 준비: 실제 초대 코드 시스템 + 운영 지표 + 거부권 안전 불변식 수정
발견한 문제(2.6 진행 중): 거부권(peer veto) 안전 불변식이 코드에 전혀
구현되어 있지 않았음. Contact.TwinDisabledByPeer는 스키마에만 있고
어디서도 읽거나 쓰지 않았고, tech-design.md §4는 "대화방 단위 플래그"
라는데 실제로는 상대(Contact) 단위로 모델링돼 있어 설계 문서와도
불일치. Conversation.TwinDisabledByPeer로 옮기고 POST
/conversations/:id/veto 추가, 메시지 발송 시 거부권 -> 에스컬레이션
-> 자율성 레벨 순으로 체크(앞 단계가 뒤 단계를 항상 이김)하도록 수정.

2.6 본작업:
- 초대 기반 가입: 기존엔 아무 문자열이나 처음 쓰면 통과돼서 실제로는
  초대 기반이 아니었음. InviteCode 테이블 + POST /invites(발급)
  추가하고 /auth/signup이 미리 발급된 미사용 코드인지 검증하도록 변경
  (모르는 코드 400, 이미 쓴 코드 409). 계정 삭제 시 코드는 "사용됨"
  상태를 유지한 채 유저 참조만 지움
- GET /admin/metrics 추가 -- 메시지 수(휴먼/트윈), 에스컬레이션
  사유별 집계, 거부권 발동률(vision.md 거부율 지표의 1차 근사),
  초대 코드 발급/사용 수. 생성 지연시간·오류율은 별도 계측 계층이
  없어 넣지 않고 문서에 명시

실제 베타 오픈 시점 자체는 roadmap.md §3(PoC 결과 필요)이 끝나야
정할 수 있어서 여전히 보류 -- 이번엔 서버 인프라만 준비함
2026-07-30 02:51:15 +00:00
Claude de8b44d536
2.5 QA: ai-service pytest 스위트 승격 + 자율성 플로우(L0~L2) 통합 테스트
ai-service:
- escalation_filter/retrieve_style/generation/main(FastAPI)의 ad-hoc
  TestClient 검증을 ai-service/tests/ 정식 pytest 스위트로 승격(34개).
  Gemini 호출은 mock, retrieve_style은 overlap이 recency를 항상
  이긴다는 것(과거 버그 재발 방지)까지 포함
- on_event(deprecated) -> lifespan 컨텍스트 매니저로 교체

core-backend: 자율성 플로우(L0->L1->L2) 통합 테스트를 쓰려면 실제 분기
로직이 있어야 해서, roadmap.md §2.2에서 미결로 남아있던 자율성 엔진
오케스트레이션 최소 버전을 이번에 구현:
- PATCH /users/:id/twin-settings -- 자율성 레벨 변경 (기본값 L0)
- 트윈 발송 시 에스컬레이션 통과 후 레벨 확인: L0는 항상 차단, L1은
  approved:true 필요, L2는 화이트리스트 매칭 시 즉시 자동발송·매칭
  없으면 L1과 동일하게 승인 필요. 에스컬레이션은 레벨/화이트리스트/
  승인 여부와 무관하게 항상 우선(테스트로 확인)
- 화이트리스트 매칭은 v1 최소 구현(전역 키워드 매칭, 상대별 예외는
  아직) -- 대화방↔연락처 연결이 모델링되지 않아 보류, README에 명시

온보딩·채팅·설정 수동 QA는 Flutter 클라이언트가 없어 이 환경에서는
보류, roadmap.md에 근거 남김
2026-07-30 02:37:36 +00:00
Claude 9041dc9b64
에스컬레이션 하드게이트 우회 구멍 차단 + 서버 측 삭제 플로우 추가
발견한 문제: POST /conversations/:id/messages가 sender_mode=twin을
검증 없이 그대로 저장·브로드캐스트하고 있었음 -- 에스컬레이션 게이트는
초안 생성(/draft) 경로에만 있었고 실제 발송 경로엔 없어서, 클라이언트가
/draft를 거치지 않고 바로 twin 메시지를 보내면 안전선을 완전히
우회할 수 있었다.

- ai-service: /draft와 별개인 POST /escalate/check 하드게이트 엔드포인트 추가
- core-backend: AIServiceClient.checkEscalation 추가, 메시지 저장 직전에
  twin 발송이면 무조건 호출하도록 해서 발송이 실제로 일어나는 단
  하나의 지점에서 막음. AI 서비스 응답 불가 시 fail-safe로 발송 차단.
  에스컬레이션되면 저장/브로드캐스트 없이 escalation_logs에만 기록.
  사람이 직접 보내는 메시지는 게이트 대상 아님
- core-backend: DELETE /users/:id 추가 -- 유저가 걸린 모든 행(트윈 설정·
  화이트리스트·연락처·대화참여·메시지·에스컬레이션로그·유저 본인)을
  트랜잭션으로 삭제 (tech-design.md §5 "사용자가 언제든 초기화 가능")
- 온디바이스 암호화·데이터 흐름 대시보드는 Flutter 클라이언트 책임이라
  이 환경에서는 보류, roadmap.md에 근거 남김
2026-07-30 02:26:02 +00:00
Claude fb06306d04
Go 코어에서 AI 서비스를 실제로 호출하는 연동 코드 추가
AIServiceClient.requestDraft가 ai-service/의 POST /draft를 호출하고,
core-backend에 POST /conversations/:id/draft 라우트를 추가해 프록시한다.
mock AI 서비스로 정상 응답·404(대화 없음)·400(스타일 소스 없음) 케이스를
테스트로 확인. roadmap.md Phase 1 §2.2 체크리스트 반영.
2026-07-30 02:15:32 +00:00
Claude e8cf48074f
Promote PoC scripts to the AI service (item 2.2)
ai-service/ wraps generate_draft/escalation_filter/retrieve_style
behind a single POST /draft endpoint that the Go core will call
internally. poc/tone-corpus/ stays untouched for corpus experiments
and blind-eval; this is the promoted copy meant for the real service.

Verified with TestClient: style_examples path, history/retrieval
path (confirms the earlier scoring fix still ranks the on-topic
exemplar first), escalation short-circuit, and 422 validation when
zero or both of style_examples/history are given.

Still missing: the Go core's actual HTTP client calling this service.
2026-07-30 02:09:19 +00:00
Claude 0abe97def8
Reorder build: AI service before Flutter client
2.3 (Flutter) needs a Flutter/Dart SDK this environment doesn't
have, so it can't be built or verified here the way core-backend
and the AI pipeline can. Swapping it with 2.2 (Python AI service)
keeps work unblocked instead of writing unverifiable Flutter code;
2.3 moves to wherever the user has the Flutter SDK installed.
2026-07-30 02:06:11 +00:00
Claude 3902597418
Implement core backend in Go (item 2 of the build order)
Ports the Python prototype (backend/) to the actual chosen stack --
Gin + gorilla/websocket + GORM, same DB schema (models.go mirrors
backend/app/models.py), same endpoints (signup, message send,
WebSocket relay). backend/ stays as a reference prototype, not
removed.

Verified with go test: signup, duplicate-invite-code rejection (409),
404 on an unknown conversation, and WebSocket broadcast delivery all
pass -- the same cases the Python version was checked against.

Push notifications, AI service integration, and multi-device sync
are not in this commit -- see core-backend/README.md.
2026-07-30 01:42:48 +00:00
Claude 87b9bf3505
Make explicit: PoC-dependent items wait until everything else is done
The build order already ended with the PoC-gated section, but it
wasn't stated as a hard rule. Now roadmap.md and AGENTS.md both say
not to touch Phase 1 §3 until items 1-5 of the build order are fully
finished, even if PoC data happens to land earlier -- no jumping the
queue to fill in a value early.
2026-07-30 01:37:24 +00:00
Claude 874e965665
Split backend into a Go core service + Python AI service
Reconsidered pure Go (would mean reimplementing and re-verifying the
already-tested AI pipeline) and pure Python (leaves perceived
performance/concurrency headroom on the table for a preemptive
scale bet). Landed on: Go handles auth/messaging/DB, Python keeps
owning generate_draft/escalation_filter/retrieve_style behind an
internal API. backend/ (Python) is now labeled a verified prototype
for the Go rewrite to match, not the final service.
2026-07-30 01:21:35 +00:00
Claude a1777516cf
Switch client stack from Android/Kotlin to Flutter/Dart
Native wasn't actually required for the v2 OS-layer notification
listener -- Flutter reaches it via platform channels like any other
native Android API, same pattern many production apps already use.
Flutter's faster iteration on the chat UI (already validated in the
click prototype) matters more for v1 than starting native. Updates
tech-design.md §8, roadmap.md's checklist, and AGENTS.md accordingly.
2026-07-30 01:12:51 +00:00
Claude 9a5358d0b1
Start Phase 1 backend skeleton (item 2 of the build order)
FastAPI app with invite-code signup, message send/relay over
WebSocket, and the DB schema from roadmap.md Phase 1 §2.1 (users,
contacts, conversations, messages, twin_settings, whitelist_rules,
escalation_logs). Defaults to SQLite for local dev, PostgreSQL in
prod per tech-design.md §8.

Verified end-to-end with TestClient: signup, duplicate-invite-code
rejection (409), message persistence, 404 on an unknown conversation,
and WebSocket broadcast delivery all behave as expected.

Push notifications and the AI pipeline integration (item 3) are not
in this commit -- see backend/README.md and roadmap.md's checklist.
2026-07-30 00:57:57 +00:00
Claude 94479a51d6
Decide Phase 1 tech stack and turn the plan into a working checklist
tech-design.md §8 settles the stack (Android/Kotlin, Python/FastAPI,
PostgreSQL, WebSocket relay, Room+SQLCipher) so it stops blocking
item 1 of the build order. roadmap.md's Phase 1 breakdown is now
checkboxes instead of prose, and AGENTS.md adds the rule to check/
update that checklist before and after any Phase 1 app-build task,
rather than tracking progress ad hoc.
2026-07-30 00:54:52 +00:00
Claude 3b595587cc
Break Phase 1 (actual app build) into a concrete workstream plan
PoC execution is on hold for now, so this splits Phase 1 into work
that's independent of PoC results (backend infra, client shell, AI
pipeline productionization) vs. values that genuinely need PoC data
(autonomy defaults, whitelist topics, trust UX copy) -- so
infrastructure work isn't blocked while PoC recruiting catches up.
2026-07-30 00:48:19 +00:00
Cursor Agent 2714fbef43
Sync planning docs with tentative Q1-Q7 decisions
Update PLANNING.md §2 from empty checkboxes to the working answers in
decision-log, fix the reverse OS/self-app wording, and clarify roadmap
Phase 3 so OS-layer growth does not rewrite the start order.

Co-authored-by: okuma <o0kuma@users.noreply.github.com>
2026-07-29 07:14:23 +00:00
Claude 97d70028e3
Flesh out full planning doc set: vision, PRD, tech design, risks, roadmap
Resolves the open Q1-Q7 questions as tentative decisions (self-app beta
first, target consumers, MVP scenario = read-receipt relief + group-chat
catch-up, autonomy capped at L0-L2) and builds the standard deliverable
set on top of them, ready for review at the next meeting.
2026-07-29 07:01:38 +00:00