opencodekit 0.16.15 → 0.16.18

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 (85) hide show
  1. package/README.md +77 -242
  2. package/dist/index.js +19 -6
  3. package/dist/template/.opencode/AGENTS.md +72 -236
  4. package/dist/template/.opencode/README.md +49 -482
  5. package/dist/template/.opencode/agent/build.md +71 -345
  6. package/dist/template/.opencode/agent/explore.md +47 -139
  7. package/dist/template/.opencode/agent/general.md +61 -172
  8. package/dist/template/.opencode/agent/looker.md +65 -161
  9. package/dist/template/.opencode/agent/painter.md +46 -200
  10. package/dist/template/.opencode/agent/plan.md +37 -220
  11. package/dist/template/.opencode/agent/review.md +72 -153
  12. package/dist/template/.opencode/agent/scout.md +44 -486
  13. package/dist/template/.opencode/agent/vision.md +63 -178
  14. package/dist/template/.opencode/command/create.md +75 -307
  15. package/dist/template/.opencode/command/design.md +53 -589
  16. package/dist/template/.opencode/command/handoff.md +76 -180
  17. package/dist/template/.opencode/command/init.md +45 -211
  18. package/dist/template/.opencode/command/plan.md +62 -514
  19. package/dist/template/.opencode/command/pr.md +56 -226
  20. package/dist/template/.opencode/command/research.md +55 -266
  21. package/dist/template/.opencode/command/resume.md +33 -138
  22. package/dist/template/.opencode/command/review-codebase.md +54 -202
  23. package/dist/template/.opencode/command/ship.md +78 -127
  24. package/dist/template/.opencode/command/start.md +47 -577
  25. package/dist/template/.opencode/command/status.md +60 -353
  26. package/dist/template/.opencode/command/ui-review.md +52 -298
  27. package/dist/template/.opencode/command/verify.md +36 -250
  28. package/dist/template/.opencode/memory.db-shm +0 -0
  29. package/dist/template/.opencode/memory.db-wal +0 -0
  30. package/dist/template/.opencode/opencode.json +133 -35
  31. package/dist/template/.opencode/plugin/README.md +40 -166
  32. package/dist/template/.opencode/plugin/compaction.ts +162 -131
  33. package/dist/template/.opencode/plugin/lib/memory-db.ts +112 -0
  34. package/dist/template/.opencode/plugin/swarm-enforcer.ts +182 -27
  35. package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +112 -0
  36. package/dist/template/.opencode/skill/augment-context-engine/mcp.json +6 -0
  37. package/dist/template/.opencode/skill/core-data-expert/SKILL.md +82 -0
  38. package/dist/template/.opencode/skill/core-data-expert/references/batch-operations.md +543 -0
  39. package/dist/template/.opencode/skill/core-data-expert/references/cloudkit-integration.md +259 -0
  40. package/dist/template/.opencode/skill/core-data-expert/references/concurrency.md +522 -0
  41. package/dist/template/.opencode/skill/core-data-expert/references/fetch-requests.md +643 -0
  42. package/dist/template/.opencode/skill/core-data-expert/references/glossary.md +233 -0
  43. package/dist/template/.opencode/skill/core-data-expert/references/migration.md +393 -0
  44. package/dist/template/.opencode/skill/core-data-expert/references/model-configuration.md +597 -0
  45. package/dist/template/.opencode/skill/core-data-expert/references/performance.md +300 -0
  46. package/dist/template/.opencode/skill/core-data-expert/references/persistent-history.md +553 -0
  47. package/dist/template/.opencode/skill/core-data-expert/references/project-audit.md +60 -0
  48. package/dist/template/.opencode/skill/core-data-expert/references/saving.md +574 -0
  49. package/dist/template/.opencode/skill/core-data-expert/references/stack-setup.md +625 -0
  50. package/dist/template/.opencode/skill/core-data-expert/references/testing.md +300 -0
  51. package/dist/template/.opencode/skill/core-data-expert/references/threading.md +589 -0
  52. package/dist/template/.opencode/skill/swift-concurrency/SKILL.md +246 -0
  53. package/dist/template/.opencode/skill/swift-concurrency/references/actors.md +640 -0
  54. package/dist/template/.opencode/skill/swift-concurrency/references/async-algorithms.md +822 -0
  55. package/dist/template/.opencode/skill/swift-concurrency/references/async-await-basics.md +249 -0
  56. package/dist/template/.opencode/skill/swift-concurrency/references/async-sequences.md +670 -0
  57. package/dist/template/.opencode/skill/swift-concurrency/references/core-data.md +533 -0
  58. package/dist/template/.opencode/skill/swift-concurrency/references/glossary.md +128 -0
  59. package/dist/template/.opencode/skill/swift-concurrency/references/linting.md +142 -0
  60. package/dist/template/.opencode/skill/swift-concurrency/references/memory-management.md +542 -0
  61. package/dist/template/.opencode/skill/swift-concurrency/references/migration.md +1076 -0
  62. package/dist/template/.opencode/skill/swift-concurrency/references/performance.md +574 -0
  63. package/dist/template/.opencode/skill/swift-concurrency/references/sendable.md +578 -0
  64. package/dist/template/.opencode/skill/swift-concurrency/references/tasks.md +604 -0
  65. package/dist/template/.opencode/skill/swift-concurrency/references/testing.md +565 -0
  66. package/dist/template/.opencode/skill/swift-concurrency/references/threading.md +452 -0
  67. package/dist/template/.opencode/skill/swiftui-expert-skill/SKILL.md +290 -0
  68. package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-advanced.md +351 -0
  69. package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-basics.md +284 -0
  70. package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-transitions.md +326 -0
  71. package/dist/template/.opencode/skill/swiftui-expert-skill/references/image-optimization.md +286 -0
  72. package/dist/template/.opencode/skill/swiftui-expert-skill/references/layout-best-practices.md +312 -0
  73. package/dist/template/.opencode/skill/swiftui-expert-skill/references/liquid-glass.md +377 -0
  74. package/dist/template/.opencode/skill/swiftui-expert-skill/references/list-patterns.md +153 -0
  75. package/dist/template/.opencode/skill/swiftui-expert-skill/references/modern-apis.md +400 -0
  76. package/dist/template/.opencode/skill/swiftui-expert-skill/references/performance-patterns.md +377 -0
  77. package/dist/template/.opencode/skill/swiftui-expert-skill/references/scroll-patterns.md +305 -0
  78. package/dist/template/.opencode/skill/swiftui-expert-skill/references/sheet-navigation-patterns.md +292 -0
  79. package/dist/template/.opencode/skill/swiftui-expert-skill/references/state-management.md +447 -0
  80. package/dist/template/.opencode/skill/swiftui-expert-skill/references/text-formatting.md +285 -0
  81. package/dist/template/.opencode/skill/swiftui-expert-skill/references/view-structure.md +276 -0
  82. package/dist/template/.opencode/tool/action-queue.ts +308 -0
  83. package/dist/template/.opencode/tool/swarm.ts +65 -40
  84. package/package.json +16 -3
  85. package/dist/template/.opencode/.agents/skills/context7/SKILL.md +0 -88
@@ -0,0 +1,292 @@
1
+ # SwiftUI Sheet and Navigation Patterns Reference
2
+
3
+ ## Sheet Patterns
4
+
5
+ ### Item-Driven Sheets (Preferred)
6
+
7
+ **Use `.sheet(item:)` instead of `.sheet(isPresented:)` when presenting model-based content.**
8
+
9
+ ```swift
10
+ // Good - item-driven
11
+ @State private var selectedItem: Item?
12
+
13
+ var body: some View {
14
+ List(items) { item in
15
+ Button(item.name) {
16
+ selectedItem = item
17
+ }
18
+ }
19
+ .sheet(item: $selectedItem) { item in
20
+ ItemDetailSheet(item: item)
21
+ }
22
+ }
23
+
24
+ // Avoid - boolean flag requires separate state
25
+ @State private var showSheet = false
26
+ @State private var selectedItem: Item?
27
+
28
+ var body: some View {
29
+ List(items) { item in
30
+ Button(item.name) {
31
+ selectedItem = item
32
+ showSheet = true
33
+ }
34
+ }
35
+ .sheet(isPresented: $showSheet) {
36
+ if let selectedItem {
37
+ ItemDetailSheet(item: selectedItem)
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ **Why**: `.sheet(item:)` automatically handles presentation state and avoids optional unwrapping in the sheet body.
44
+
45
+ ### Sheets Own Their Actions
46
+
47
+ **Sheets should handle their own dismiss and actions internally.**
48
+
49
+ ```swift
50
+ // Good - sheet owns its actions
51
+ struct EditItemSheet: View {
52
+ @Environment(\.dismiss) private var dismiss
53
+ @Environment(DataStore.self) private var store
54
+
55
+ let item: Item
56
+ @State private var name: String
57
+ @State private var isSaving = false
58
+
59
+ init(item: Item) {
60
+ self.item = item
61
+ _name = State(initialValue: item.name)
62
+ }
63
+
64
+ var body: some View {
65
+ NavigationStack {
66
+ Form {
67
+ TextField("Name", text: $name)
68
+ }
69
+ .navigationTitle("Edit Item")
70
+ .toolbar {
71
+ ToolbarItem(placement: .cancellationAction) {
72
+ Button("Cancel") {
73
+ dismiss()
74
+ }
75
+ }
76
+ ToolbarItem(placement: .confirmationAction) {
77
+ Button(isSaving ? "Saving..." : "Save") {
78
+ Task { await save() }
79
+ }
80
+ .disabled(isSaving || name.isEmpty)
81
+ }
82
+ }
83
+ }
84
+ }
85
+
86
+ private func save() async {
87
+ isSaving = true
88
+ await store.updateItem(item, name: name)
89
+ dismiss()
90
+ }
91
+ }
92
+
93
+ // Avoid - parent manages sheet actions via closures
94
+ struct ParentView: View {
95
+ @State private var selectedItem: Item?
96
+
97
+ var body: some View {
98
+ List(items) { item in
99
+ Button(item.name) {
100
+ selectedItem = item
101
+ }
102
+ }
103
+ .sheet(item: $selectedItem) { item in
104
+ EditItemSheet(
105
+ item: item,
106
+ onSave: { newName in
107
+ // Parent handles save
108
+ },
109
+ onCancel: {
110
+ selectedItem = nil
111
+ }
112
+ )
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ **Why**: Sheets that own their actions are more reusable and don't require callback prop-drilling.
119
+
120
+ ## Navigation Patterns
121
+
122
+ ### Type-Safe Navigation with NavigationStack
123
+
124
+ ```swift
125
+ struct ContentView: View {
126
+ var body: some View {
127
+ NavigationStack {
128
+ List {
129
+ NavigationLink("Profile", value: Route.profile)
130
+ NavigationLink("Settings", value: Route.settings)
131
+ }
132
+ .navigationDestination(for: Route.self) { route in
133
+ switch route {
134
+ case .profile:
135
+ ProfileView()
136
+ case .settings:
137
+ SettingsView()
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+
144
+ enum Route: Hashable {
145
+ case profile
146
+ case settings
147
+ }
148
+ ```
149
+
150
+ ### Programmatic Navigation
151
+
152
+ ```swift
153
+ struct ContentView: View {
154
+ @State private var navigationPath = NavigationPath()
155
+
156
+ var body: some View {
157
+ NavigationStack(path: $navigationPath) {
158
+ List {
159
+ Button("Go to Detail") {
160
+ navigationPath.append(DetailRoute.item(id: 1))
161
+ }
162
+ }
163
+ .navigationDestination(for: DetailRoute.self) { route in
164
+ switch route {
165
+ case .item(let id):
166
+ ItemDetailView(id: id)
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
172
+
173
+ enum DetailRoute: Hashable {
174
+ case item(id: Int)
175
+ }
176
+ ```
177
+
178
+ ### Navigation with State Restoration
179
+
180
+ ```swift
181
+ struct ContentView: View {
182
+ @State private var navigationPath = NavigationPath()
183
+
184
+ var body: some View {
185
+ NavigationStack(path: $navigationPath) {
186
+ RootView()
187
+ .navigationDestination(for: Route.self) { route in
188
+ destinationView(for: route)
189
+ }
190
+ }
191
+ }
192
+
193
+ @ViewBuilder
194
+ private func destinationView(for route: Route) -> some View {
195
+ switch route {
196
+ case .profile:
197
+ ProfileView()
198
+ case .settings:
199
+ SettingsView()
200
+ }
201
+ }
202
+ }
203
+ ```
204
+
205
+ ## Presentation Modifiers
206
+
207
+ ### Full Screen Cover
208
+
209
+ ```swift
210
+ struct ContentView: View {
211
+ @State private var showFullScreen = false
212
+
213
+ var body: some View {
214
+ Button("Show Full Screen") {
215
+ showFullScreen = true
216
+ }
217
+ .fullScreenCover(isPresented: $showFullScreen) {
218
+ FullScreenView()
219
+ }
220
+ }
221
+ }
222
+ ```
223
+
224
+ ### Popover
225
+
226
+ ```swift
227
+ struct ContentView: View {
228
+ @State private var showPopover = false
229
+
230
+ var body: some View {
231
+ Button("Show Popover") {
232
+ showPopover = true
233
+ }
234
+ .popover(isPresented: $showPopover) {
235
+ PopoverContentView()
236
+ .presentationCompactAdaptation(.popover) // Don't adapt to sheet on iPhone
237
+ }
238
+ }
239
+ }
240
+ ```
241
+
242
+ ### Alert with Actions
243
+
244
+ ```swift
245
+ struct ContentView: View {
246
+ @State private var showAlert = false
247
+
248
+ var body: some View {
249
+ Button("Show Alert") {
250
+ showAlert = true
251
+ }
252
+ .alert("Delete Item?", isPresented: $showAlert) {
253
+ Button("Delete", role: .destructive) {
254
+ deleteItem()
255
+ }
256
+ Button("Cancel", role: .cancel) { }
257
+ } message: {
258
+ Text("This action cannot be undone.")
259
+ }
260
+ }
261
+ }
262
+ ```
263
+
264
+ ### Confirmation Dialog
265
+
266
+ ```swift
267
+ struct ContentView: View {
268
+ @State private var showDialog = false
269
+
270
+ var body: some View {
271
+ Button("Show Options") {
272
+ showDialog = true
273
+ }
274
+ .confirmationDialog("Choose an option", isPresented: $showDialog) {
275
+ Button("Option 1") { handleOption1() }
276
+ Button("Option 2") { handleOption2() }
277
+ Button("Cancel", role: .cancel) { }
278
+ }
279
+ }
280
+ }
281
+ ```
282
+
283
+ ## Summary Checklist
284
+
285
+ - [ ] Use `.sheet(item:)` for model-based sheets
286
+ - [ ] Sheets own their actions and dismiss internally
287
+ - [ ] Use `NavigationStack` with `navigationDestination(for:)` for type-safe navigation
288
+ - [ ] Use `NavigationPath` for programmatic navigation
289
+ - [ ] Use appropriate presentation modifiers (sheet, fullScreenCover, popover)
290
+ - [ ] Alerts and confirmation dialogs use modern API with actions
291
+ - [ ] Avoid passing dismiss/save callbacks to sheets
292
+ - [ ] Navigation state can be saved/restored when needed