From f9407d8c379f7d52162cea2a1f6b46b1ac79d4a9 Mon Sep 17 00:00:00 2001 From: Nikolai Nobadi Date: Mon, 22 Dec 2025 18:39:57 -0800 Subject: [PATCH 1/3] minor reformatting --- .../ViewModifiers/PreviewModifiersViewModifier.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/DBMultiverse/Sources/SwiftData/ViewModifiers/PreviewModifiersViewModifier.swift b/DBMultiverse/Sources/SwiftData/ViewModifiers/PreviewModifiersViewModifier.swift index e1aa4a1..cb28b83 100644 --- a/DBMultiverse/Sources/SwiftData/ViewModifiers/PreviewModifiersViewModifier.swift +++ b/DBMultiverse/Sources/SwiftData/ViewModifiers/PreviewModifiersViewModifier.swift @@ -11,12 +11,10 @@ import NnSwiftUIKit struct PreviewModifiersViewModifier: ViewModifier { func body(content: Content) -> some View { - MainActor.assumeIsolated { - content - .withNnErrorHandling() - .environment(\.isPreview, true) - .modelContainer(PreviewSampleData.container) - } + content + .withNnErrorHandling() + .environment(\.isPreview, true) + .modelContainer(PreviewSampleData.container) } } From 1f96378a9b6b1a237eee7e81691e3ef51eab8688 Mon Sep 17 00:00:00 2001 From: Nikolai Nobadi Date: Mon, 22 Dec 2025 18:42:55 -0800 Subject: [PATCH 2/3] update claude.md and gitignore --- .gitignore | 5 ++++- CLAUDE.md | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5258389..c28ffa5 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ CIPipeKit/TestResults # Directories potentially created on remote AFP share node_modules/ serviceKey/ -otherFiles/ \ No newline at end of file +otherFiles/ + +# Claude guidelines +.guidelines/ \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index a8297ec..6f7fd3d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -85,4 +85,19 @@ When creating new Swift files, use "Nikolai Nobadi" as the creator name in file - Automatic cache management for optimal performance ### Language Support -Multiple languages supported via `ComicLanguage` enum with URL generation for different language versions of the comic. \ No newline at end of file +Multiple languages supported via `ComicLanguage` enum with URL generation for different language versions of the comic. + +## Project Guidelines +Project-specific guidelines are located in `.guidelines/claude/` + +## iOS Architecture +- SwiftUI-based views +- No business logic inside SwiftUI views +- Modular feature-based architecture + +## iOS Testing +- Prefer behavior-driven unit tests (Swift Testing, `@Test("…")`) +- Use `makeSUT` + `trackForMemoryLeaks` in tests +- No inline comments in test files; use `// MARK:` only for sectioning +- Default to type-safe assertions (`#expect`, `#require`) +- Use `waitUntil` for `@Published`/reactive assertions instead of sleeps \ No newline at end of file From a0ecb24643da9cc9691f6b3ab3e18af57eb75db7 Mon Sep 17 00:00:00 2001 From: Nikolai Nobadi Date: Mon, 22 Dec 2025 18:45:57 -0800 Subject: [PATCH 3/3] add agents.md --- AGENTS.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..9118284 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,44 @@ +# Repository Guidelines + +## Project Structure & Module Organization +- `DBMultiverse/` hosts the main SwiftUI app (app/startup flows, features, SwiftData storage, shared utilities) plus platform-specific views. Keep feature code modular by folder (Features, SwiftData, Networking, Resources). +- `DBMultiverseComicKit/` (Swift package) owns reusable comic UI, caching, and page view models; `DBMultiverseParseKit/` (Swift package) parses chapter metadata; `DBMultiverseWidgets/` contains the WidgetKit extension. +- `DBMultiverseUnitTests/` holds XCTest cases and `TestPlan/UnitTestPlan.xctestplan`. `docs/` stores architecture and module notes; `media/` holds marketing screenshots. + +## Build, Test, and Development Commands +- Open in Xcode via `DBMultiverse.xcodeproj`, select the `DBMultiverse` scheme, and target an iOS 17+ simulator or device for local runs. +- CLI build: `xcodebuild -scheme DBMultiverse -destination 'platform=iOS Simulator,name=iPhone 15' build` (adjust device as needed). +- Tests: `xcodebuild test -scheme DBMultiverse -destination 'platform=iOS Simulator,name=iPhone 15' -testPlan UnitTestPlan`. For package-only checks, run `swift test` inside `DBMultiverseComicKit` or `DBMultiverseParseKit`. + +## Coding Style & Naming Conventions +- Swift 6, SwiftUI-first. Prefer `struct` views and immutable models; keep adapters/protocols for side effects (file I/O, networking). +- Indent with 4 spaces; place parameters on a single line when practical. Keep types/file scopes private unless shared. +- File headers should credit `Nikolai Nobadi`; keep module imports minimal. +- Naming: `FeatureNameView`, `FeatureNameViewModel`, `...Manager/Adapter` for side-effectful coordinators, and `...Protocol` for abstractions. Extensions live in the feature’s `Utilities` or `Shared` folders. + +## Testing Guidelines +- Framework: XCTest with async tests where appropriate. Name files `Tests.swift`; prefer GIVEN/WHEN/THEN comments in complex cases. +- Use the `UnitTestPlan.xctestplan` for repeatable runs. Mock adapters (file system, network, cache) to avoid hitting the network; keep tests deterministic and simulator-friendly. + +## Commit & Pull Request Guidelines +- Commit style mirrors the history: present-tense, concise, optional scopes (e.g., `refactor(cache): tighten cache eviction`). Favor small, single-purpose commits. +- Pull requests should summarize intent, list touched modules/targets, and note user-facing changes. Add screenshots or screen recordings for UI updates and mention test coverage or plans. + +## Security & Configuration Notes +- Do not commit secrets or API tokens; configuration lives in code defaults or secure local files. Use `URLFactory` for constructing endpoints instead of hardcoding strings. +- Respect cache and file-system boundaries: keep file operations behind adapters and avoid writing outside app sandbox paths. + +## Project Guidelines +Project-specific guidelines are located in `.guidelines/codex/` + +## iOS Architecture +- SwiftUI-based views +- No business logic inside SwiftUI views +- Modular feature-based architecture + +## iOS Testing +- Prefer behavior-driven unit tests (Swift Testing, `@Test("…")`) +- Use `makeSUT` + `trackForMemoryLeaks` in tests +- No inline comments in test files; use `// MARK:` only for sectioning +- Default to type-safe assertions (`#expect`, `#require`) +- Use `waitUntil` for `@Published`/reactive assertions instead of sleeps