Skip to content

Commit 8300e46

Browse files
committed
chore: Widget 중심 위젯 브리지 소유권 지침 정리
1 parent 7a5ab05 commit 8300e46

4 files changed

Lines changed: 32 additions & 9 deletions

File tree

.hermes/skills/devlog-architecture-harness/SKILL.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ Ask the user before editing when:
7575
- A shared type is being moved only because multiple modules need access.
7676
- Firebase/Auth/Firestore/Functions/Messaging-specific logic would leave Infra.
7777
- WidgetCore would depend on Domain, Data, Infra, Persistence, Presentation, or App.
78+
- DevLogWidget would depend on Domain, Infra, Persistence, Presentation, or App.
79+
- DevLogWidget would use WidgetKit for anything beyond the app-side widget reload bridge.
80+
- Widget sync ownership would move away from the preferred split: Data contracts and snapshot repositories, DevLogWidget app-side bridge/snapshot update orchestration, WidgetCore snapshot models/factories/store contracts, and WidgetExtension rendering.
81+
- Persistence would gain widget snapshot generation, WidgetCore, WidgetKit reload, or DevLogWidget bridge ownership.
7882
- Presentation would depend on Data, Infra, Persistence, or App.
7983
- Data would gain concrete SDK or storage implementation details.
8084
- Data or Presentation would expand platform SDK usage beyond the existing narrow cancellation-classification or notification-badge patterns.
@@ -122,6 +126,8 @@ After completion, report only:
122126
- Do not infer project-specific architecture policy from generic Clean Architecture rules when DevLog already has a concrete pattern.
123127
- Do not move domain entities to Core just because multiple modules need them.
124128
- Do not inject same-layer dependencies except from SwiftUI `View` files in `Application/DevLogPresentation` into same-layer presentation objects for UI composition.
129+
- Do not collapse the current DevLogWidget bridge back into Data, Persistence, App, or WidgetCore without explicit boundary approval.
130+
- Route app-side widget bridge and snapshot update orchestration through DevLogWidget.
125131
- Do not hide architecture decisions inside build-fix wording.
126132
- Do not broaden a modularization task into unrelated Firestore, Messaging, or UI safety edits.
127133
- Do not mark work complete if the diff contains unrelated project-file or lockfile churn.

.hermes/skills/devlog-architecture-harness/references/devlog-architecture-flow.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ flowchart TD
177177
NewDependency{"New module dependency?"}
178178
SameLayerDI{"Same-layer dependency injection?"}
179179
ExternalSDK{"External SDK crosses layer?"}
180-
WidgetBoundary{"WidgetCore sees app/domain/data?"}
180+
WidgetBoundary{"Widget sync ownership or WidgetCore boundary changes?"}
181181
BuildShortcut{"Build fix relaxes boundary?"}
182182
ScopeDrift{"Outside current task scope?"}
183183
Ask["Ask user before editing"]
@@ -272,16 +272,24 @@ flowchart TD
272272

273273
```mermaid
274274
flowchart LR
275-
App["App runtime\nDomain/Data/Infra/Persistence"]
276-
Snapshot["Snapshot generation\nPersistence + WidgetCore"]
275+
App["App runtime\nsession and mutation events"]
276+
WidgetBridge["DevLogWidget\nsync bus implementation\nsync/session handlers"]
277+
DataContracts["DevLogData\nwidget repository/updater contracts"]
278+
SnapshotInputs["DevLogData\nsnapshot input repository"]
279+
Snapshot["DevLogWidget\nsnapshot generation/persistence\nWidgetKit reload bridge"]
280+
WidgetModels["DevLogWidgetCore\nsnapshot models/factories/store contracts"]
277281
AppGroup["App Group storage\nShared defaults"]
278-
WidgetCore["WidgetCore\nSnapshot models\nFactories"]
279282
WidgetExtension["Widget extension\nWidgetKit UI"]
280283
281-
App --> Snapshot
282-
Snapshot --> AppGroup
283-
AppGroup --> WidgetCore
284-
WidgetCore --> WidgetExtension
284+
App --> WidgetBridge
285+
WidgetBridge --> DataContracts
286+
DataContracts --> SnapshotInputs
287+
DataContracts --> Snapshot
288+
SnapshotInputs --> WidgetBridge
289+
Snapshot --> WidgetModels
290+
WidgetModels --> AppGroup
291+
AppGroup --> WidgetModels
292+
WidgetModels --> WidgetExtension
285293
```
286294

287295
Widget UI should consume snapshot data. It should not fetch app services or domain repositories directly.

.hermes/skills/devlog-architecture-harness/references/devlog-workflow-rules.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ This reference holds DevLog-specific working rules that should live with the pro
8888

8989
- Widget UI should consume snapshot data, not app/domain services.
9090
- `DevLogWidgetCore` should stay free of Domain, Data, Infra, Persistence, Presentation, and App dependencies unless the user explicitly approves a boundary change.
91-
- Prefer an app-driven snapshot flow: app/runtime data fetch, snapshot generation, App Group storage, WidgetCore model/factory, WidgetExtension rendering.
91+
- `DevLogWidget` owns the app-side widget bridge: sync event bus implementation, sync event handlers, session sync handler, auth-session sync provider, snapshot generation/persistence orchestration, WidgetKit reload bridge, and `WidgetAssembler`.
92+
- `DevLogData` owns widget-related contracts and repository implementations, including `WidgetSyncEventBus`, `WidgetSnapshotUpdater`, and `WidgetTodoSnapshotRepository`. Data should not own concrete widget handlers, WidgetCore snapshot model/factory usage, or WidgetKit reload behavior.
93+
- `DevLogPersistence` owns local persistence, user defaults, image store, and non-widget app persistence.
94+
- Prefer an app-driven snapshot flow: app/runtime event, DevLogWidget sync handler, Data snapshot input fetch, DevLogWidget snapshot update, App Group storage through WidgetCore contracts, WidgetExtension rendering.
9295
- `WidgetTodoSnapshot` is a lightweight snapshot value, not a full domain `Todo`.
9396
- Do not make `Todo.number` or `WidgetTodoSnapshot.number` non-optional without a separate saved-vs-draft model decision.
9497
- If a widget sync flow needs one timestamp for multiple snapshots, capture `Date()` once and pass it through to avoid midnight or quarter-boundary drift.

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ Ask the user before editing when any of these are true:
7979
- Firebase, GoogleSignIn, AuthenticationServices, UserNotifications, LinkPresentation, Network, WidgetKit, or storage implementation details would move to another layer.
8080
- A repository protocol, service protocol, assembler, or DI ownership boundary would change.
8181
- WidgetCore would start depending on app/domain/data implementation concepts.
82+
- DevLogWidget would start depending on Domain, Infra, Persistence, Presentation, or App.
83+
- DevLogWidget would use WidgetKit for anything beyond the app-side widget reload bridge.
84+
- Widget sync ownership would move away from the preferred split: Data contracts and snapshot repositories, DevLogWidget app-side bridge/snapshot update orchestration, WidgetCore snapshot models/factories/store contracts, and WidgetExtension rendering.
85+
- Persistence would gain widget snapshot generation, WidgetCore, WidgetKit reload, or DevLogWidget bridge ownership.
86+
- Data or Presentation would expand platform SDK usage beyond the existing narrow cancellation-classification or notification-badge patterns.
87+
- Infra would add any Domain dependency, source import, or SDK service contract coupling.
8288
- A same-layer dependency would be injected outside a SwiftUI `View` file in `Application/DevLogPresentation`.
8389
- The requested change suggests cleanup outside the current issue or PR scope.
8490

0 commit comments

Comments
 (0)