claude-code-session-manager 0.135.0 → 0.136.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/assets/{AgentLibrary-DRlcF1YD.js → AgentLibrary-BFztz90B.js} +1 -1
  3. package/dist/assets/{AppSettings-CBhYHKGI.js → AppSettings-6_dqi9Ti.js} +1 -1
  4. package/dist/assets/{Button-DtBUGvGI.js → Button-5wbUTtD5.js} +1 -1
  5. package/dist/assets/{DocumentEditorPane-C82c7Qtl.js → DocumentEditorPane-CRgJFjka.js} +1 -1
  6. package/dist/assets/{Extensions-Kn-oUD2_.js → Extensions-ZXSJbnK7.js} +2 -2
  7. package/dist/assets/{History-B4c3Uz9u.js → History-CmSTZeiu.js} +1 -1
  8. package/dist/assets/{Library-1RpLT-aH.js → Library-DcTnW9kq.js} +1 -1
  9. package/dist/assets/{ListDetail-xr0oxNkv.js → ListDetail-BGsdNFiK.js} +1 -1
  10. package/dist/assets/{Panel-O8XPrpJu.js → Panel-BR2PeMf6.js} +1 -1
  11. package/dist/assets/{ProjectClaudeConfig-DBGhhzg2.js → ProjectClaudeConfig-DJYcUU1G.js} +1 -1
  12. package/dist/assets/{ProvenanceBadge-DSaizfZL.js → ProvenanceBadge-B_TDAI3k.js} +1 -1
  13. package/dist/assets/{Scheduler-D2_5NyiR.js → Scheduler-DqocyumD.js} +1 -1
  14. package/dist/assets/{Settings-Clgqb3Lq.js → Settings-BzPe2TH6.js} +1 -1
  15. package/dist/assets/{SkillReferenceGraph-D80RA7kR.js → SkillReferenceGraph-DfdO0Q_N.js} +1 -1
  16. package/dist/assets/{Skills-DNG7tHSf.js → Skills-CGPJxKhR.js} +1 -1
  17. package/dist/assets/{SourceChip-D-Imzszd.js → SourceChip-CI8xpHRi.js} +1 -1
  18. package/dist/assets/{SystemPrompt-CGlOpUQA.js → SystemPrompt-BbzGIHoz.js} +1 -1
  19. package/dist/assets/{TiptapBody-CJFGfBdz.js → TiptapBody-CTmjUhAI.js} +1 -1
  20. package/dist/assets/{Toggle-0Ff0bPa_.js → Toggle-CWx9Rq6E.js} +1 -1
  21. package/dist/assets/{ViewTabs-BCMYQwo_.js → ViewTabs-BnjD0Crp.js} +1 -1
  22. package/dist/assets/{VoiceButton-JzyC6DAB.js → VoiceButton-C-iQGCL1.js} +1 -1
  23. package/dist/assets/{historyTotals-B01WPBwh.js → historyTotals-BaxAMu7r.js} +1 -1
  24. package/dist/assets/{index-CjQ_p5y7.css → index-62tyjEQB.css} +1 -1
  25. package/dist/assets/index-Cob2iZhR.js +3116 -0
  26. package/dist/index.html +2 -2
  27. package/dist-web/app.css +1 -1
  28. package/dist-web/app.js +412 -412
  29. package/package.json +1 -1
  30. package/plugins/CLAUDE.md +9 -8
  31. package/plugins/packs/apple-design/.claude-plugin/plugin.json +6 -0
  32. package/plugins/packs/apple-design/laws.md +14 -0
  33. package/plugins/packs/apple-design/skills/hig-layout-and-accessibility/SKILL.md +152 -0
  34. package/plugins/packs/apple-design/skills/liquid-glass-adoption/SKILL.md +132 -0
  35. package/plugins/packs/apple-design/sm-pack.json +5 -0
  36. package/plugins/packs/apple-swift-core/.claude-plugin/plugin.json +12 -0
  37. package/plugins/packs/apple-swift-core/laws.md +13 -0
  38. package/plugins/packs/apple-swift-core/skills/swift-concurrency/SKILL.md +160 -0
  39. package/plugins/packs/apple-swift-core/skills/swiftui-state-and-navigation/SKILL.md +165 -0
  40. package/plugins/packs/apple-swift-core/sm-pack.json +5 -0
  41. package/plugins/session-manager-dev/.claude-plugin/plugin.json +1 -1
  42. package/plugins/session-manager-dev/skills/builder/SKILL.md +136 -91
  43. package/plugins/session-manager-dev/skills/builder/manual.md +80 -0
  44. package/plugins/session-manager-dev/skills/develop/SKILL.md +29 -56
  45. package/plugins/session-manager-dev/skills/develop/standards.md +11 -19
  46. package/plugins/session-manager-dev/skills/maintaining-md-network/SKILL.md +9 -0
  47. package/plugins/session-manager-dev/skills/maintaining-md-network/drift-check.md +5 -2
  48. package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/drift-check.cjs +100 -5
  49. package/plugins/session-manager-dev/skills/send-feedback/SKILL.md +65 -21
  50. package/scripts/scheduler-mcp-server.cjs +65 -5
  51. package/src/main/build-info.json +4 -4
  52. package/src/main/chatRunner.cjs +26 -2
  53. package/src/main/index.cjs +4 -0
  54. package/src/main/ipcSchemas.cjs +13 -0
  55. package/src/main/lib/CLAUDE.md +2 -0
  56. package/src/main/lib/claude/agentModelResolve.cjs +23 -0
  57. package/src/main/lib/epic/epicMint.cjs +12 -6
  58. package/src/main/lib/epic/epicTranscriptPath.cjs +5 -4
  59. package/src/main/lib/epic/promptSessionsCreateEpic.cjs +8 -4
  60. package/src/main/lib/epic/restorableSessions.cjs +16 -8
  61. package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +201 -8
  62. package/src/main/lib/feedback-remote/crossProjectReply.cjs +375 -0
  63. package/src/main/lib/feedback-remote/remoteIpcDispatch.cjs +2 -0
  64. package/src/main/lib/mcpToolCatalog.cjs +38 -4
  65. package/src/main/lib/mdNetworkScan.cjs +61 -11
  66. package/src/main/lib/mdReviewRecord.cjs +287 -0
  67. package/src/main/lib/packs/packCatalog.cjs +120 -0
  68. package/src/main/lib/packs/packSpawnArgs.cjs +59 -0
  69. package/src/main/lib/packs/packsIpc.cjs +76 -0
  70. package/src/main/lib/persona-macro/builtinMacros.cjs +3 -2
  71. package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +34 -0
  72. package/src/main/lib/prd/prdCreate.cjs +2 -2
  73. package/src/main/lib/promptSessionSchema.cjs +8 -0
  74. package/src/main/projectPages.cjs +19 -0
  75. package/src/main/promptSessionEvents.cjs +8 -1
  76. package/src/main/scheduler.cjs +23 -2
  77. package/src/preload/api.d.ts +71 -0
  78. package/src/preload/apiSurface.json +21 -0
  79. package/src/preload/index.cjs +7 -0
  80. package/src/seed/agents/demo-video-builder.md +28 -33
  81. package/src/seed/agents/dev-lead.md +3 -3
  82. package/dist/assets/index-rt7pTODX.js +0 -3116
  83. package/plugins/session-manager-dev/skills/builder/0-diff/SKILL.md +0 -44
  84. package/plugins/session-manager-dev/skills/builder/1-classify-and-bump/SKILL.md +0 -37
  85. package/plugins/session-manager-dev/skills/builder/2-gate/SKILL.md +0 -37
  86. package/plugins/session-manager-dev/skills/builder/3-publish/SKILL.md +0 -137
  87. package/plugins/session-manager-dev/skills/builder/4-manual/SKILL.md +0 -124
  88. package/plugins/session-manager-dev/skills/builder/5-report/SKILL.md +0 -35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-session-manager",
3
- "version": "0.135.0",
3
+ "version": "0.136.0",
4
4
  "description": "Local cockpit for the Claude Code CLI — multi-tab terminal, full config surface, scheduler, voice dictation, and live observability.",
5
5
  "type": "module",
6
6
  "main": "src/main/index.cjs",
package/plugins/CLAUDE.md CHANGED
@@ -9,6 +9,8 @@ Part of the **AGENT LAYER** partition — see
9
9
  plugins/session-manager-dev/skills` 2026-11-06; keep in sync with `project-partition.md` and
10
10
  `seedDevPlugin.cjs`'s header count.
11
11
 
12
+ `packs/<id>/` — context packs (plugin + `sm-pack.json` + optional `laws.md`), loaded per session by `--plugin-dir`, not the marketplace; read by `src/main/lib/packs/packCatalog.cjs`.
13
+
12
14
  Two manifests: root [`.claude-plugin/marketplace.json`](../.claude-plugin/marketplace.json)
13
15
  declares the one plugin (`source: "./plugins/session-manager-dev"`); the plugin's own
14
16
  [`session-manager-dev/.claude-plugin/plugin.json`](session-manager-dev/.claude-plugin/plugin.json)
@@ -26,8 +28,8 @@ breaks them all, undetectably from here.
26
28
  **Path literals inside shipped skills.** A skill runs in OTHER repos, so a
27
29
  session-manager-internal path (`src/main/...`, `src/renderer/...`, bare `scripts/...`) inside one
28
30
  is a portability defect unless `$SM_ROOT`-qualified (e.g. `node "$SM_ROOT/scripts/<x>.cjs"`, with `$SM_ROOT` resolved
29
- to the installed package root) or removed. Current offenders, not precedent: `builder/SKILL.md` +
30
- `builder/0-diff/SKILL.md`, `develop/standards.md`.
31
+ to the installed package root) or removed. `builder/manual.md` is session-manager-specific on
32
+ purpose and runs only when `session-manager-operations/manual/manual.json` exists.
31
33
 
32
34
  ## Who consumes this
33
35
 
@@ -46,12 +48,11 @@ for live sibling consumers.
46
48
  - Do not confuse this with `.claude/` at the repo root — this repo's own unshipped local dev
47
49
  config. `.claude/agents/*.md` are per-project OVERLAYS that win over
48
50
  `~/.claude/agents/*.md` (Claude Code's own precedence, per `src/main/agentLibrary.cjs`);
49
- `src/seed/agents/` is the shipped source for the four personas
50
- `src/main/seedAgentPersonas.cjs` copies into `~/.claude/agents/` on first boot (see its
51
- `PERSONAS` list); `builder` has no seed source
52
- and exists only as this repo's overlay. Tracked on purpose: `.claude/settings.json` (guard
53
- hooks) plus the `builder.md`/`project-home-builder.md` overlays (auditable edits) —
54
- nothing else under `.claude/` is.
51
+ `src/seed/agents/` is the shipped source for the personas
52
+ `src/main/seedAgentPersonas.cjs` copies into `~/.claude/agents/` (its `PERSONAS` list);
53
+ `builder` has no seed source — the generic `~/.claude/agents/builder.md` is machine-local
54
+ and this repo's `.claude/agents/builder.md` overlays it. Tracked under `.claude/`:
55
+ `settings.json` (guard hooks), `agents/builder.md`, and the `agents/page-*.md` stewards.
55
56
  - The scheduler MCP server (`session-manager-scheduler`) is registered at USER scope in
56
57
  `~/.claude.json`, not in this repo.
57
58
  - A skill may run headless via a scheduled PRD in another project — don't rely on
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "sm-pack-apple-design",
3
+ "version": "0.1.0",
4
+ "description": "Session Manager context pack: always-on Apple Human Interface Guidelines and Liquid Glass rules, plus on-demand skills for adopting Liquid Glass and for HIG layout and accessibility when designing iOS app UI in SwiftUI.",
5
+ "keywords": ["ios", "swiftui", "hig", "liquid-glass", "design", "accessibility", "session-manager-pack"]
6
+ }
@@ -0,0 +1,14 @@
1
+ Use system fonts through text styles (.body, .headline, .title) so every label scales with Dynamic Type; never hard-code point sizes.
2
+ Test layouts at the largest accessibility text sizes; let text wrap and stacks reflow instead of truncating.
3
+ Use SF Symbols before custom icons; match symbol weight and scale to adjacent text.
4
+ Use semantic system colors (Color.primary, .secondary, Color(.systemBackground), .tint) so the UI works in light and dark mode; never hard-code black or white.
5
+ Keep text and icon contrast at or above 4.5:1 in both appearances, and never convey state by color alone.
6
+ Give every tappable element a hit target of at least 44x44 pt, even when the visible glyph is smaller.
7
+ Keep content and controls inside the safe areas; only backgrounds may extend edge to edge.
8
+ Use standard controls (NavigationStack, TabView, List, Toggle, Button, Menu, sheets) before building custom ones.
9
+ Apply Liquid Glass only to the navigation and control layer that floats above content: bars, tab bars, toolbars, floating buttons.
10
+ Never put Liquid Glass on content such as list rows, cards, or media, and never stack glass on glass.
11
+ Tint glass sparingly, only for the one primary action on screen; leave other glass controls untinted.
12
+ Make corner radii concentric with the container: inner radius equals outer radius minus the padding between them.
13
+ Honor Reduce Transparency by replacing glass and blur with opaque fills, and honor Reduce Motion by replacing movement with fades.
14
+ Give every icon-only control an accessibility label, and keep VoiceOver order matching visual order.
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: hig-layout-and-accessibility
3
+ description: Use when laying out or reviewing SwiftUI iOS screens against the Human Interface Guidelines — typography and Dynamic Type, SF Symbols, semantic colors and dark mode, hit targets, safe areas, standard controls, VoiceOver labels, and Reduce Motion or Reduce Transparency support. Not for non-Swift code.
4
+ paths: ['**/*.swift']
5
+ ---
6
+
7
+ # HIG layout and accessibility
8
+
9
+ A screen that follows the system conventions gets Dynamic Type, dark mode,
10
+ VoiceOver and right-to-left support mostly for free. Each rule below is about
11
+ not breaking that.
12
+
13
+ ## Typography and Dynamic Type
14
+
15
+ Use text styles, never fixed sizes. For custom fonts, scale them relative to a
16
+ text style.
17
+
18
+ ```swift
19
+ // Do
20
+ Text(title).font(.headline)
21
+ Text(body).font(.body)
22
+ Text(price).font(.custom("Brand", size: 17, relativeTo: .body))
23
+
24
+ // Don't — ignores the user's text size
25
+ Text(title).font(.system(size: 17, weight: .semibold))
26
+ ```
27
+
28
+ Let layouts reflow at accessibility sizes instead of truncating:
29
+
30
+ ```swift
31
+ @Environment(\.dynamicTypeSize) private var typeSize
32
+
33
+ let layout = typeSize.isAccessibilitySize
34
+ ? AnyLayout(VStackLayout(alignment: .leading))
35
+ : AnyLayout(HStackLayout())
36
+ layout { Label("Due", systemImage: "calendar"); Text(date) }
37
+ ```
38
+
39
+ Scale fixed spacing and image sizes with `@ScaledMetric`.
40
+
41
+ ## Icons: SF Symbols first
42
+
43
+ ```swift
44
+ // Do — scales with text, adapts weight, supports variants
45
+ Label("Favorites", systemImage: "heart.fill")
46
+ Image(systemName: "bell.badge").symbolRenderingMode(.hierarchical)
47
+
48
+ // Don't — a fixed-size bitmap that ignores Dynamic Type
49
+ Image("heart_icon_24").resizable().frame(width: 24, height: 24)
50
+ ```
51
+
52
+ Draw a custom icon only when no symbol fits, and export it as a custom symbol.
53
+
54
+ ## Color and dark mode
55
+
56
+ ```swift
57
+ // Do
58
+ .foregroundStyle(.primary)
59
+ .foregroundStyle(.secondary)
60
+ .background(Color(.systemGroupedBackground))
61
+ .tint(.accentColor)
62
+
63
+ // Don't — invisible or harsh in one of the two appearances
64
+ .foregroundColor(.black)
65
+ .background(Color(red: 1, green: 1, blue: 1))
66
+ ```
67
+
68
+ Brand colors go in the asset catalog with light, dark and high-contrast
69
+ variants. Never show state with color alone — pair it with a symbol or text.
70
+
71
+ ## Hit targets
72
+
73
+ Every tappable element needs at least 44x44 pt, even if the glyph is smaller.
74
+
75
+ ```swift
76
+ // Do
77
+ Button { close() } label: {
78
+ Image(systemName: "xmark")
79
+ .frame(minWidth: 44, minHeight: 44)
80
+ .contentShape(Rectangle())
81
+ }
82
+ .accessibilityLabel("Close")
83
+
84
+ // Don't — a 16 pt target that is hard to hit
85
+ Image(systemName: "xmark").onTapGesture { close() }
86
+ ```
87
+
88
+ Prefer `Button` over `onTapGesture`: it brings the button trait, focus,
89
+ keyboard and pointer support.
90
+
91
+ ## Safe areas and layout
92
+
93
+ Content and controls stay inside the safe area; only backgrounds bleed.
94
+
95
+ ```swift
96
+ // Do
97
+ VStack { Header(); Content() }
98
+ .background(Color(.systemBackground).ignoresSafeArea())
99
+
100
+ // Don't — buttons slide under the Dynamic Island and home indicator
101
+ VStack { Header(); Content() }.ignoresSafeArea()
102
+ ```
103
+
104
+ Use `safeAreaInset(edge:)` for bars you add yourself, and system margins
105
+ (`.padding()`, `.scenePadding()`, `.contentMargins`) instead of magic numbers.
106
+ Use leading/trailing, never left/right, so right-to-left languages flip.
107
+
108
+ ## Standard controls first
109
+
110
+ `NavigationStack`, `TabView`, `List`, `Form`, `Toggle`, `Picker`, `Menu`,
111
+ `.sheet`, `.confirmationDialog`, `.searchable` — each already handles
112
+ accessibility, keyboard, dark mode and the current design. Build a custom
113
+ control only when no standard one expresses the interaction, and then give it
114
+ the matching accessibility traits.
115
+
116
+ ```swift
117
+ // Do
118
+ Toggle("Notifications", isOn: $notify)
119
+
120
+ // Don't — a hand-rolled switch VoiceOver cannot operate
121
+ HStack { Text("Notifications"); Capsule().fill(notify ? .green : .gray) }
122
+ .onTapGesture { notify.toggle() }
123
+ ```
124
+
125
+ ## VoiceOver
126
+
127
+ - Give every icon-only control an `.accessibilityLabel`.
128
+ - Group a composite row with `.accessibilityElement(children: .combine)`.
129
+ - Hide pure decoration with `.accessibilityHidden(true)`.
130
+ - Keep the reading order equal to the visual order.
131
+
132
+ ## Reduce Motion and Reduce Transparency
133
+
134
+ ```swift
135
+ @Environment(\.accessibilityReduceMotion) private var reduceMotion
136
+ @Environment(\.accessibilityReduceTransparency) private var reduceTransparency
137
+
138
+ .transition(reduceMotion ? .opacity : .move(edge: .bottom))
139
+ .background(reduceTransparency ? AnyShapeStyle(Color(.systemBackground))
140
+ : AnyShapeStyle(.regularMaterial))
141
+ ```
142
+
143
+ ## Review checklist
144
+
145
+ - [ ] No fixed font sizes; layout checked at the largest accessibility size.
146
+ - [ ] SF Symbols used wherever one fits.
147
+ - [ ] Only semantic or asset-catalog colors; checked in light and dark.
148
+ - [ ] Every tap target at least 44x44 pt.
149
+ - [ ] Controls inside the safe area.
150
+ - [ ] Standard controls unless none fits.
151
+ - [ ] Icon-only controls labeled; VoiceOver order matches the screen.
152
+ - [ ] Reduce Motion and Reduce Transparency honored.
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: liquid-glass-adoption
3
+ description: Use when adding, reviewing or fixing Liquid Glass in a SwiftUI iOS app — glassEffect, GlassEffectContainer, glass button styles, tinted glass, toolbars and tab bars that float over content, or migrating custom blur/material chrome to the iOS 26 design. Not for non-Swift code.
4
+ paths: ['**/*.swift']
5
+ ---
6
+
7
+ # Liquid Glass adoption
8
+
9
+ Liquid Glass is a material for the **control layer**: the navigation and
10
+ controls that float above the content. Content stays opaque and readable
11
+ underneath; glass lets it show through the chrome.
12
+
13
+ ## 1. Let the system do it first
14
+
15
+ Standard containers adopt glass on their own when built with the current SDK:
16
+ `NavigationStack` bars, `TabView` tab bars, `.toolbar` items, sheets, menus,
17
+ and `Button` styles. Before writing any `glassEffect`, remove custom
18
+ backgrounds you added to those containers — they hide the system glass.
19
+
20
+ ```swift
21
+ // Don't — paints over the system bar material
22
+ .toolbarBackground(Color.white, for: .navigationBar)
23
+ .background(.ultraThinMaterial)
24
+
25
+ // Do — keep standard chrome, let the system render glass
26
+ NavigationStack {
27
+ List(items) { ItemRow(item: $0) }
28
+ .navigationTitle("Library")
29
+ .toolbar { ToolbarItem { Button("Add", systemImage: "plus") { add() } } }
30
+ }
31
+ ```
32
+
33
+ ## 2. Custom floating controls
34
+
35
+ Use `glassEffect` only for a control that floats over content and has no
36
+ standard equivalent.
37
+
38
+ ```swift
39
+ // Do — one floating control, glass in a capsule
40
+ Button { record() } label: { Label("Record", systemImage: "mic.fill") }
41
+ .padding()
42
+ .glassEffect(.regular.interactive(), in: .capsule)
43
+
44
+ // Don't — glass on content
45
+ ForEach(photos) { photo in
46
+ PhotoCard(photo: photo)
47
+ .glassEffect() // cards are content, keep them opaque
48
+ }
49
+ ```
50
+
51
+ ## 3. Never glass on glass
52
+
53
+ Glass cannot sample other glass. When several glass controls sit together,
54
+ wrap them in one `GlassEffectContainer` so they render as one surface and can
55
+ merge and morph.
56
+
57
+ ```swift
58
+ // Do
59
+ GlassEffectContainer(spacing: 12) {
60
+ HStack(spacing: 12) {
61
+ Button("Undo", systemImage: "arrow.uturn.backward") { undo() }
62
+ .glassEffect()
63
+ Button("Redo", systemImage: "arrow.uturn.forward") { redo() }
64
+ .glassEffect()
65
+ }
66
+ }
67
+
68
+ // Don't — a glass button inside a glass panel
69
+ VStack { Button("Done") { } .glassEffect() }
70
+ .padding()
71
+ .glassEffect(in: .rect(cornerRadius: 24))
72
+ ```
73
+
74
+ To animate controls appearing or merging, give each one a
75
+ `glassEffectID(_:in:)` with a shared `@Namespace` inside the container.
76
+
77
+ ## 4. Tint for the primary action only
78
+
79
+ Tint means "this is the main thing to do here". One tinted control per screen
80
+ is the norm; tinting everything removes the signal.
81
+
82
+ ```swift
83
+ // Do
84
+ Button("Checkout") { checkout() }
85
+ .buttonStyle(.glassProminent)
86
+ .tint(.accentColor)
87
+ Button("Save for later") { save() }
88
+ .buttonStyle(.glass)
89
+
90
+ // Don't — every control shouts
91
+ Button("Share") { }.glassEffect(.regular.tint(.blue))
92
+ Button("Edit") { }.glassEffect(.regular.tint(.orange))
93
+ ```
94
+
95
+ ## 5. Shapes and spacing
96
+
97
+ - Prefer `.capsule` and `.circle` for small controls.
98
+ - For rectangles, make the radius concentric with what contains it: inner
99
+ radius = outer radius − padding. `ConcentricRectangle` or
100
+ `.rect(cornerRadius:)` computed from the container both work.
101
+ - Keep glass controls clear of content they would obscure; use
102
+ `safeAreaInset(edge:)` so scroll content can scroll under them but still
103
+ reach the end.
104
+
105
+ ```swift
106
+ // Do — content scrolls under the floating bar and stays reachable
107
+ ScrollView { Feed() }
108
+ .safeAreaInset(edge: .bottom) { ComposerBar().glassEffect(in: .capsule) }
109
+ ```
110
+
111
+ ## 6. Accessibility
112
+
113
+ Glass already adapts to Reduce Transparency and Increase Contrast when you use
114
+ system APIs. For custom fills you draw yourself, check the environment:
115
+
116
+ ```swift
117
+ @Environment(\.accessibilityReduceTransparency) private var reduceTransparency
118
+
119
+ .background(reduceTransparency ? Color(.secondarySystemBackground) : .clear)
120
+ ```
121
+
122
+ Under Reduce Motion, skip morph animations and use a plain fade:
123
+ `withAnimation(reduceMotion ? .easeInOut : .bouncy) { … }`.
124
+
125
+ ## Review checklist
126
+
127
+ - [ ] No glass on rows, cards, images or text blocks.
128
+ - [ ] No glass nested inside glass; grouped glass lives in one container.
129
+ - [ ] At most one tinted / prominent glass control per screen.
130
+ - [ ] Custom bar backgrounds removed from standard containers.
131
+ - [ ] Corner radii concentric with the container.
132
+ - [ ] Checked with Reduce Transparency, Increase Contrast and Reduce Motion on.
@@ -0,0 +1,5 @@
1
+ {
2
+ "id": "apple-design",
3
+ "label": "Apple · Design",
4
+ "description": "Human Interface Guidelines and Liquid Glass rules for iOS app UI: system type, SF Symbols, semantic colors, hit targets, safe areas, standard controls, glass on the control layer only, and accessibility settings. Adds skills for Liquid Glass adoption and HIG layout."
5
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "sm-pack-apple-swift-core",
3
+ "version": "0.1.0",
4
+ "description": "Session Manager context pack: always-on Swift 6 and SwiftUI rules plus on-demand skills for SwiftUI state, navigation and Swift concurrency when building iOS apps.",
5
+ "author": {
6
+ "name": "Bilko Bibitkov",
7
+ "email": "BilkoBibitkov2000@gmail.com",
8
+ "url": "https://bilko.run"
9
+ },
10
+ "homepage": "https://github.com/StanislavBG/claude-code-session-manager",
11
+ "keywords": ["swift", "swiftui", "ios", "concurrency", "context-pack", "session-manager"]
12
+ }
@@ -0,0 +1,13 @@
1
+ - Target Swift 6 with strict concurrency checking on; fix every data-race warning, never silence it with @unchecked Sendable or nonisolated(unsafe) without a written reason.
2
+ - Make types that cross actor or task boundaries Sendable; prefer immutable structs and enums for model values.
3
+ - Mark UI state, view models and anything touching UIKit/SwiftUI with @MainActor.
4
+ - Use the @Observable macro for shared state; never write new ObservableObject, @Published or @StateObject code.
5
+ - Build UI in SwiftUI first; drop to UIKit only through UIViewRepresentable when SwiftUI has no equivalent.
6
+ - Use NavigationStack (or NavigationSplitView) with value-based navigationDestination; never use NavigationView.
7
+ - Use async/await and structured concurrency (async let, TaskGroup, .task); never add new completion-handler or DispatchQueue code.
8
+ - Persist app data with SwiftData; use @AppStorage only for small user preferences.
9
+ - Never force unwrap (!) or force try (try!); use if let, guard let, ?? or throw a typed error.
10
+ - Give every SwiftUI view a #Preview that renders it with realistic sample data.
11
+ - Give every custom control an accessibilityLabel (plus accessibilityHint or value where it helps) and support Dynamic Type.
12
+ - Put every user-facing string in a String Catalog (Localizable.xcstrings); never hard-code display text outside it.
13
+ - Keep views small: extract a subview once a body grows past one screen.
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: swift-concurrency
3
+ description: >-
4
+ Use when writing or fixing asynchronous Swift code in an iOS app — async/await,
5
+ Task and TaskGroup, actors, @MainActor isolation, Sendable conformance, or
6
+ Swift 6 strict-concurrency compiler errors such as data-race and
7
+ non-Sendable warnings. Not for non-Swift code.
8
+ paths: ['**/*.swift']
9
+ ---
10
+
11
+ # Swift concurrency (Swift 6)
12
+
13
+ Make isolation explicit, keep work structured, and let the compiler prove there
14
+ are no data races.
15
+
16
+ ## Isolation basics
17
+
18
+ - UI state and view models are `@MainActor`.
19
+ - Shared mutable state that is not UI lives in an `actor`.
20
+ - Values passed between isolation domains are `Sendable` (structs/enums of Sendable fields are automatic).
21
+ - `nonisolated` marks members that touch no isolated state.
22
+
23
+ ### Do
24
+
25
+ ```swift
26
+ struct Article: Sendable, Identifiable, Decodable {
27
+ let id: Int
28
+ let title: String
29
+ }
30
+
31
+ actor ArticleCache {
32
+ private var byID: [Int: Article] = [:]
33
+ func store(_ items: [Article]) { for a in items { byID[a.id] = a } }
34
+ func article(_ id: Int) -> Article? { byID[id] }
35
+ }
36
+
37
+ @Observable @MainActor
38
+ final class FeedModel {
39
+ private(set) var articles: [Article] = []
40
+ private(set) var error: String?
41
+ private let client: APIClient
42
+
43
+ init(client: APIClient) { self.client = client }
44
+
45
+ func load() async {
46
+ do {
47
+ articles = try await client.articles()
48
+ } catch {
49
+ self.error = error.localizedDescription
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Don't
56
+
57
+ ```swift
58
+ final class FeedModel {
59
+ var articles: [Article] = [] // mutated from any thread
60
+ func load() {
61
+ DispatchQueue.global().async {
62
+ let data = try! Data(contentsOf: url) // blocking + force try
63
+ self.articles = decode(data) // data race, off main thread
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ ## Starting work from SwiftUI
70
+
71
+ Prefer the `.task` modifier: it runs on appear and is cancelled on disappear.
72
+
73
+ ```swift
74
+ struct FeedView: View {
75
+ @State private var model: FeedModel
76
+ var body: some View {
77
+ List(model.articles) { Text($0.title) }
78
+ .task { await model.load() }
79
+ .refreshable { await model.load() }
80
+ }
81
+ }
82
+ ```
83
+
84
+ Use `.task(id:)` to restart work when an input changes (for example a search
85
+ query). Avoid a bare `Task { }` in `onAppear` — nothing cancels it.
86
+
87
+ ## Structured concurrency
88
+
89
+ Run independent work in parallel with `async let` or a task group; children are
90
+ cancelled automatically when the parent ends or throws.
91
+
92
+ ### Do
93
+
94
+ ```swift
95
+ func dashboard() async throws -> Dashboard {
96
+ async let profile = client.profile()
97
+ async let stats = client.stats()
98
+ return try await Dashboard(profile: profile, stats: stats)
99
+ }
100
+
101
+ func thumbnails(for ids: [Int]) async throws -> [Int: Image] {
102
+ try await withThrowingTaskGroup(of: (Int, Image).self) { group in
103
+ for id in ids { group.addTask { (id, try await client.thumbnail(id)) } }
104
+ var result: [Int: Image] = [:]
105
+ for try await (id, image) in group { result[id] = image }
106
+ return result
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### Don't
112
+
113
+ ```swift
114
+ for id in ids {
115
+ Task { images[id] = try? await client.thumbnail(id) } // unstructured, racy, errors dropped
116
+ }
117
+ ```
118
+
119
+ ## Wrapping callback APIs
120
+
121
+ Bridge a completion-handler API once, with a checked continuation, and resume
122
+ it exactly once on every path.
123
+
124
+ ```swift
125
+ func currentLocation() async throws -> CLLocation {
126
+ try await withCheckedThrowingContinuation { continuation in
127
+ locator.requestOnce { result in
128
+ continuation.resume(with: result)
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ For streams of values, wrap the delegate or callback in an `AsyncStream` and
135
+ consume it with `for await`.
136
+
137
+ ## Cancellation
138
+
139
+ - Check `try Task.checkCancellation()` or `Task.isCancelled` inside long loops.
140
+ - Don't swallow `CancellationError` as a user-visible failure.
141
+ - Keep a `Task` handle only when you must cancel it manually; store it and call `cancel()` in teardown.
142
+
143
+ ## Fixing strict-concurrency errors
144
+
145
+ | Compiler says | Usual fix |
146
+ | --- | --- |
147
+ | "Main actor-isolated property … from a nonisolated context" | Mark the caller `@MainActor`, or `await` the access. |
148
+ | "Type … does not conform to Sendable" | Make it a value type with Sendable fields, an `actor`, or `@MainActor`-isolate the class. |
149
+ | "Capture of non-Sendable … in a @Sendable closure" | Copy the needed values into `let`s first, or keep the work on one actor. |
150
+ | "Sending … risks causing data races" | Don't use the value after handing it to another task; pass a copy. |
151
+
152
+ Reach for `@unchecked Sendable` or `nonisolated(unsafe)` only when the type is
153
+ truly protected by a lock you own, and leave a comment saying which lock.
154
+
155
+ ## Checklist before you finish
156
+
157
+ - No new `DispatchQueue`, completion handlers, or `try!`.
158
+ - Every UI-facing type is `@MainActor`; cross-boundary types are `Sendable`.
159
+ - Async work from views uses `.task`; parallel work uses `async let` or a task group.
160
+ - The project builds with no concurrency warnings in Swift 6 mode.