<!-- task=m-client-integration-standardization/04+03_clone_handoff_docs plan=1 tag=REVIEW_CIS-DOC -->

# Code Review Reference - REVIEW_CIS-DOC

> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.**
> The task is NOT complete until every implementation-owned section below is filled in.
> Complete the `구현 체크리스트`; the final checklist item is mandatory before saving.
> Fill implementation-owned sections, then stop with active files in place and report ready for review.
> Finalization (`코드리뷰 결과`, log rename, `complete.log`, archive moves, `코드리뷰 전용 체크리스트`) is review-agent-only, even after compaction/resume.
> Follow the ownership table at the bottom of this file for which sections you own.

## 개요

date=2026-05-25
task=m-client-integration-standardization/04+03_clone_handoff_docs, plan=1, tag=REVIEW_CIS-DOC

## 이 파일을 읽는 리뷰 에이전트에게

> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다.

각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요.
리뷰 완료는 아래 순서까지 끝난 상태를 의미합니다.

1. 판정을 append한다.
2. `CODE_REVIEW-local-G04.md` -> `code_review_local_G04_N.log`, `PLAN-local-G04.md` -> `plan_local_G04_M.log`로 아카이브한다.
3. PASS이면 `complete.log` 작성 후 active task 디렉터리를 `agent-task/archive/YYYY/MM/m-client-integration-standardization/04+03_clone_handoff_docs/`로 이동한다. WARN/FAIL이면 다음 active plan/review 파일을 즉시 작성한다.
4. PASS이고 task group이 `m-<milestone-slug>`이면 완료 이벤트 메타데이터를 보고한다. roadmap 상태 체크와 `update-roadmap` 직접 호출은 런타임 책임이다.
5. 적용 가능한 `코드리뷰 전용 체크리스트` 항목을 최종 `.log` 위치에서 체크한 뒤 보고한다.

---

## 구현 항목별 완료 여부

| 항목 | 완료 여부 |
|------|---------|
| [REVIEW_CIS-DOC-1] Mattermost boundary 문서 보정 | [x] |
| [REVIEW_CIS-DOC-2] clone dependency path 보정 | [x] |
| [REVIEW_CIS-DOC-3] README stale handoff 문장 보정 | [x] |
| [REVIEW_CIS-DOC-4] 검증 출력 재기록 | [x] |

## 구현 체크리스트

- [x] [REVIEW_CIS-DOC-1] `apps/client/push-notification-todo.md`의 Mattermost handoff를 `MattermostPushClient`/adapter boundary 기준으로 수정한다.
- [x] [REVIEW_CIS-DOC-2] clone dependency path 예시를 현재 sibling workspace 구조와 `apps/client/pubspec.yaml` 기준에 맞게 수정한다.
- [x] [REVIEW_CIS-DOC-3] `apps/client/README.md`의 stale future handoff 문장을 현재 handoff 문서 위치 설명으로 바꾼다.
- [x] [REVIEW_CIS-DOC-4] 문서 수정 후 지정 검증 명령을 재실행하고 실제 stdout/stderr를 새 review 파일에 기록한다.
- [x] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.

## 코드리뷰 전용 체크리스트

> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.

- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
- [x] active `CODE_REVIEW-*-G??.md`를 `code_review_local_G04_N.log`로 아카이브한다.
- [x] active `PLAN-*-G??.md`를 `plan_local_G04_M.log`로 아카이브한다.
- [x] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
- [x] PASS이면 active task 디렉터리 `agent-task/m-client-integration-standardization/04+03_clone_handoff_docs/`를 `agent-task/archive/YYYY/MM/m-client-integration-standardization/04+03_clone_handoff_docs/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
- [x] PASS이고 task group이 `m-<milestone-slug>`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
- [x] PASS split 작업이면 이동 후 빈 active parent `agent-task/m-client-integration-standardization/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다.
- [ ] WARN/FAIL이면 다음 active `PLAN-local-G04.md`와 `CODE_REVIEW-local-G04.md`를 작성하고 `complete.log`를 작성하지 않는다.

## 계획 대비 변경 사항

계획에 따라 `code_review_local_G04_0.log`에 명시된 4가지 `Required` 피드백을 한 치의 오차도 없이 충실히 보정하였습니다. 계획 대비 변경 사항은 없습니다.

## 주요 설계 결정

1. **인터페이스 지향 Boundary 설명 정립**:
   - `apps/client/push-notification-todo.md`에서 `MattermostPushPlugin.instance` 직접 참조 가이드를 제거했습니다. 대신 `MattermostPushClient` 추상 클래스를 지향하고 `setAuthToken`, `setSigningKey` 및 네비게이션 콜백 바인딩을 통해 통합을 통제하게 함으로써 코드 상의 OOP 추상 계층을 명확하게 반영했습니다.
2. **실제 Monorepo 종속성 동기화**:
   - Sibling repo(`../iop`, `../alt`)를 위해 복제 시 참조할 `pubspec.yaml` path dependency의 기본 예시를 실제 레포 구조인 `../../../mattermost-push-plugin` 및 `../../../proto-socket/dart`로 교정하여 실질적인 이식성을 극대화했습니다.
3. **사용자 경험(README) stale 문구 해소**:
   - 이미 작성된 핸드오프 문서를 예정된(scheduled) 작업으로 지칭하던 README의 stale 문장을 지우고, 바로 찾아갈 수 있는 markdown link (`[push-notification-todo.md](push-notification-todo.md)`)로 교체하여 정합성을 일치시켰습니다.

## 리뷰어를 위한 체크포인트

- Handoff notes describe host code using `MattermostPushClient`/`MattermostPushHostIntegration`; direct `MattermostPushPlugin.instance` access remains isolated to adapter responsibility.
- Clone path examples match the current sibling workspace dependency shape used by `apps/client/pubspec.yaml`.
- README no longer describes the handoff docs as a future scheduled task.
- Verification output in this file is actual stdout/stderr from the current workspace after fixes.

## 검증 결과

### REVIEW_CIS-DOC-1 중간 검증
```bash
$ rg --sort path -n "MattermostPushClient|MattermostPushHostIntegration|MattermostPushPluginClient|MattermostPushPlugin.instance" apps/client/push-notification-todo.md apps/client/README.md packages/contracts/notes/flutter-core-api-candidates.md apps/client/lib/src/integrations/mattermost
apps/client/push-notification-todo.md
21:     - Host standardizes all credential synchronization through the `MattermostPushClient` interface rather than accessing the native plugin directly:
26:     - Wire navigation delegates on the `MattermostPushClient` interface:
30:     - Listen to token registration callbacks via the `onDeviceTokenReady` callback on `MattermostPushClient` interface, and forward the target device token back to the Mattermost backend server.
31:     - *Note*: Production calls to `MattermostPushPlugin.instance` are strictly isolated and encapsulated within the `MattermostPushPluginClient` adapter implementation, maintaining a generic, testable host bootstrap.
63:- **Dart Level Integration**: Sibling systems can target iOS using identical calls (`MattermostPushClient` methods).
apps/client/README.md
33:- **iOS (Future Expansion)**: iOS is treated as a first-class citizen using the same Dart APIs and integration facade boundaries (`MattermostPushClient`, `ProtoSocketLifecycle`). Native iOS APNS and notification delegate handlers can be wired later into the same Dart interfaces without modifying the core bootstrap logic.
41:- `integrations/mattermost/` — `MattermostPushClient` interface, `MattermostPushPluginClient` adapter (the only production reference to `MattermostPushPlugin.instance`), `MattermostPushHostIntegration` (initialize + auth handoff + navigation callbacks), and `MattermostAuthService`.
58:- **Mattermost Authentication**: Handles login and session lifecycles, and passes the user authentication token and server signing key through the `MattermostPushClient` boundary. The production `MattermostPushPluginClient` adapter owns the plugin singleton calls.
76:- **`../alt`**: Retain ALT-specific Riverpod-based dependency graph and `go_router` for app routing. However, extract external adapters into `lib/src/integrations/` matching the common Dart facade interfaces (`MattermostPushClient`, `ProtoSocketLifecycle`) to align the bootstrap pipeline.
packages/contracts/notes/flutter-core-api-candidates.md
218:- **설명**: Mattermost push 통합에서 `apps/client` host가 plugin adapter에게 위임/공급해야 하는 데이터와 콜백. plugin adapter는 platform 측 plugin singleton에 격리되어 있고, 그 외 코드는 모두 `MattermostPushClient` 인터페이스에만 의존한다.
apps/client/lib/src/integrations/mattermost/mattermost_auth_service.dart
10:  final MattermostPushClient _pushService;
apps/client/lib/src/integrations/mattermost/mattermost_push_client.dart
6:abstract interface class MattermostPushClient {
apps/client/lib/src/integrations/mattermost/mattermost_push_host_integration.dart
14:class MattermostPushHostIntegration {
15:  final MattermostPushClient pushClient;
16:  final MattermostAuthService Function(MattermostPushClient client)
21:  MattermostPushHostIntegration({
23:    MattermostAuthService Function(MattermostPushClient client)?
27:           ((MattermostPushClient client) => MattermostAuthService(client));
apps/client/lib/src/integrations/mattermost/mattermost_push_plugin_client.dart
8:/// `MattermostPushPlugin.instance`. Everything else depends on
9:/// [MattermostPushClient].
10:class MattermostPushPluginClient implements MattermostPushClient {
13:  MattermostPushPluginClient({MattermostPushPlugin? plugin})
14:    : _plugin = plugin ?? MattermostPushPlugin.instance;
```

### REVIEW_CIS-DOC-2 중간 검증
```bash
$ rg --sort path -n "mattermost_push_plugin:|proto_socket:|../../../mattermost-push-plugin|../../../proto-socket/dart|../iop|../alt" apps/client/push-notification-todo.md apps/client/pubspec.yaml
apps/client/push-notification-todo.md
70:When replicating this integration boundary in sibling repositories (`../iop` and `../alt`):
76:   mattermost_push_plugin:
77:     path: ../../../mattermost-push-plugin
78:   proto_socket:
79:     path: ../../../proto-socket/dart
apps/client/pubspec.yaml
43:  mattermost_push_plugin:
44:    path: ../../../mattermost-push-plugin
47:  proto_socket:
48:    path: ../../../proto-socket/dart
```

### REVIEW_CIS-DOC-3 중간 검증
```bash
$ rg --sort path -n "Cloning & Handoff Checklist|Client Integration Handoff" apps/client/README.md apps/client/push-notification-todo.md
apps/client/README.md
70:## Cloning & Handoff Checklist
apps/client/push-notification-todo.md
1:# Client Integration Handoff & Migration Notes

$ rg --sort path -n "Detailed handoff docs are scheduled" apps/client/README.md
(No output)
Exit Status: 1
```

### REVIEW_CIS-DOC-4 중간 검증
```bash
$ git diff --check
(No output - clean)
```

### 최종 검증
```bash
$ rg --sort path -n "MattermostPushClient|MattermostPushHostIntegration|MattermostPushPluginClient|MattermostPushPlugin.instance" apps/client/push-notification-todo.md apps/client/README.md packages/contracts/notes/flutter-core-api-candidates.md apps/client/lib/src/integrations/mattermost
apps/client/push-notification-todo.md
21:     - Host standardizes all credential synchronization through the `MattermostPushClient` interface rather than accessing the native plugin directly:
26:     - Wire navigation delegates on the `MattermostPushClient` interface:
30:     - Listen to token registration callbacks via the `onDeviceTokenReady` callback on `MattermostPushClient` interface, and forward the target device token back to the Mattermost backend server.
31:     - *Note*: Production calls to `MattermostPushPlugin.instance` are strictly isolated and encapsulated within the `MattermostPushPluginClient` adapter implementation, maintaining a generic, testable host bootstrap.
63:- **Dart Level Integration**: Sibling systems can target iOS using identical calls (`MattermostPushClient` methods).
apps/client/README.md
33:- **iOS (Future Expansion)**: iOS is treated as a first-class citizen using the same Dart APIs and integration facade boundaries (`MattermostPushClient`, `ProtoSocketLifecycle`). Native iOS APNS and notification delegate handlers can be wired later into the same Dart interfaces without modifying the core bootstrap logic.
41:- `integrations/mattermost/` — `MattermostPushClient` interface, `MattermostPushPluginClient` adapter (the only production reference to `MattermostPushPlugin.instance`), `MattermostPushHostIntegration` (initialize + auth handoff + navigation callbacks), and `MattermostAuthService`.
58:- **Mattermost Authentication**: Handles login and session lifecycles, and passes the user authentication token and server signing key through the `MattermostPushClient` boundary. The production `MattermostPushPluginClient` adapter owns the plugin singleton calls.
76:- **`../alt`**: Retain ALT-specific Riverpod-based dependency graph and `go_router` for app routing. However, extract external adapters into `lib/src/integrations/` matching the common Dart facade interfaces (`MattermostPushClient`, `ProtoSocketLifecycle`) to align the bootstrap pipeline.
packages/contracts/notes/flutter-core-api-candidates.md
218:- **설명**: Mattermost push 통합에서 `apps/client` host가 plugin adapter에게 위임/공급해야 하는 데이터와 콜백. plugin adapter는 platform 측 plugin singleton에 격리되어 있고, 그 외 코드는 모두 `MattermostPushClient` 인터페이스에만 의존한다.
apps/client/lib/src/integrations/mattermost/mattermost_auth_service.dart
10:  final MattermostPushClient _pushService;
apps/client/lib/src/integrations/mattermost/mattermost_push_client.dart
6:abstract interface class MattermostPushClient {
apps/client/lib/src/integrations/mattermost/mattermost_push_host_integration.dart
14:class MattermostPushHostIntegration {
15:  final MattermostPushClient pushClient;
16:  final MattermostAuthService Function(MattermostPushClient client)
21:  MattermostPushHostIntegration({
23:    MattermostAuthService Function(MattermostPushClient client)?
27:           ((MattermostPushClient client) => MattermostAuthService(client));
apps/client/lib/src/integrations/mattermost/mattermost_push_plugin_client.dart
8:/// `MattermostPushPlugin.instance`. Everything else depends on
9:/// [MattermostPushClient].
10:class MattermostPushPluginClient implements MattermostPushClient {
13:  MattermostPushPluginClient({MattermostPushPlugin? plugin})
14:    : _plugin = plugin ?? MattermostPushPlugin.instance;

$ rg --sort path -n "mattermost_push_plugin:|proto_socket:|../../../mattermost-push-plugin|../../../proto-socket/dart|../iop|../alt" apps/client/push-notification-todo.md apps/client/pubspec.yaml
apps/client/push-notification-todo.md
70:When replicating this integration boundary in sibling repositories (`../iop` and `../alt`):
76:   mattermost_push_plugin:
77:     path: ../../../mattermost-push-plugin
78:   proto_socket:
79:     path: ../../../proto-socket/dart
apps/client/pubspec.yaml
43:  mattermost_push_plugin:
44:    path: ../../../mattermost-push-plugin
47:  proto_socket:
48:    path: ../../../proto-socket/dart

$ rg --sort path -n "Cloning & Handoff Checklist|Client Integration Handoff" apps/client/README.md apps/client/push-notification-todo.md
apps/client/README.md
70:## Cloning & Handoff Checklist
apps/client/push-notification-todo.md
1:# Client Integration Handoff & Migration Notes

$ rg --sort path -n "Detailed handoff docs are scheduled" apps/client/README.md
(No output)
Exit Status: 1

$ git diff --check
(No output - clean)

$ cd apps/client && flutter test
00:00 +0: loading /config/workspace/nomadcode/apps/client/test/widget_test.dart
00:01 +0: loading /config/workspace/nomadcode/apps/client/test/widget_test.dart
00:01 +0: ... App renders console dashboard title
00:01 +1: ... App renders console dashboard title
00:01 +2: ... App renders console dashboard title
00:01 +3: ... App renders console dashboard title
00:01 +4: ... App renders console dashboard title
00:01 +5: ... App renders console dashboard title
00:02 +5: ... App renders console dashboard title
00:02 +6: ... App renders console dashboard title
00:02 +6: /config/workspace/nomadcode/apps/client/test/integrations/mattermost_push_host_integration_test.dart: auto-login failure does not block initialize
[MattermostHost] Mattermost auto-login failed: Bad state: credentials missing
00:02 +7: ... App renders console dashboard title
00:02 +8: ... App renders console dashboard title
00:02 +9: ... App renders console dashboard title
00:02 +10: ... App renders console dashboard title
00:02 +10: ... WorkspaceHomePage triggers launcher callback on button tap
00:02 +11: ... WorkspaceHomePage triggers launcher callback on button tap
00:02 +12: ... WorkspaceHomePage triggers launcher callback on button tap
00:02 +13: ... WorkspaceHomePage triggers launcher callback on button tap
00:02 +14: ... WorkspaceHomePage triggers launcher callback on button tap
00:02 +15: ... WorkspaceHomePage triggers launcher callback on button tap
00:02 +15: All tests passed!
```

---

> **[IMPLEMENTING AGENT — BEFORE SAVING] Have you filled in every implementation-owned section: completion table, implementation checklist, changes from plan, design decisions, and verification output?**
> If anything is blank, go back and fill it in before saving this file.
> Leave review-agent-only sections unchanged.

## 코드리뷰 결과

- 종합 판정: PASS
- 차원별 평가:
  - correctness: Pass
  - completeness: Pass
  - test coverage: Pass
  - API contract: Pass
  - code quality: Pass
  - plan deviation: Pass
  - verification trust: Pass
- 발견된 문제: 없음
- 다음 단계:
  - PASS: `complete.log` 작성 후 active task 디렉터리를 archive로 이동한다.
