@bonesofspring/ai-rules 0.2.1 → 0.2.3

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 (205) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +17 -5
  3. package/bin/cli.js +4 -4
  4. package/package.json +3 -11
  5. package/presets/claude/ios-swift/CLAUDE.md +35 -0
  6. package/presets/claude/ios-swift/README.md +30 -0
  7. package/presets/claude/ios-swift/agents/README.md +55 -0
  8. package/presets/claude/ios-swift/agents/accessibility-reviewer.md +67 -0
  9. package/presets/claude/ios-swift/agents/api-contract-reviewer.md +72 -0
  10. package/presets/claude/ios-swift/agents/build-verifier.md +64 -0
  11. package/presets/claude/ios-swift/agents/ci-investigator.md +73 -0
  12. package/presets/claude/ios-swift/agents/code-reviewer.md +75 -0
  13. package/presets/claude/ios-swift/agents/debugger.md +72 -0
  14. package/presets/claude/ios-swift/agents/feature-developer.md +35 -0
  15. package/presets/claude/ios-swift/agents/migration-specialist.md +73 -0
  16. package/presets/claude/ios-swift/agents/performance-auditor.md +72 -0
  17. package/presets/claude/ios-swift/agents/qa-tester.md +65 -0
  18. package/presets/claude/ios-swift/agents/security-reviewer.md +69 -0
  19. package/presets/claude/ios-swift/agents/solution-architect.md +17 -0
  20. package/presets/claude/ios-swift/agents/task-analyst.md +25 -0
  21. package/presets/claude/ios-swift/agents/task-router.md +62 -0
  22. package/presets/claude/ios-swift/agents/tech-writer.md +63 -0
  23. package/presets/claude/ios-swift/agents/unit-test-generator.md +54 -0
  24. package/presets/claude/ios-swift/agents/unit-test-healer.md +53 -0
  25. package/presets/claude/ios-swift/agents/unit-test-planner.md +64 -0
  26. package/presets/claude/ios-swift/agents/xcuitest-test-generator.md +47 -0
  27. package/presets/claude/ios-swift/agents/xcuitest-test-healer.md +47 -0
  28. package/presets/claude/ios-swift/agents/xcuitest-test-planner.md +67 -0
  29. package/presets/claude/ios-swift/commands/README.md +13 -0
  30. package/presets/claude/ios-swift/commands/feature-continue.md +51 -0
  31. package/presets/claude/ios-swift/commands/feature-start.md +30 -0
  32. package/presets/claude/ios-swift/commands/task-continue.md +49 -0
  33. package/presets/claude/ios-swift/commands/task.md +50 -0
  34. package/presets/claude/ios-swift/commands/technical-retro.md +58 -0
  35. package/presets/claude/ios-swift/hooks/README.md +10 -0
  36. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +382 -0
  37. package/presets/claude/ios-swift/hooks/guard-shell-command.sh +79 -0
  38. package/presets/claude/ios-swift/rules/README.md +55 -0
  39. package/presets/claude/ios-swift/rules/api-and-data/README.md +10 -0
  40. package/presets/claude/ios-swift/rules/api-and-data/networking.md +49 -0
  41. package/presets/claude/ios-swift/rules/api-and-data/persistence.md +30 -0
  42. package/presets/claude/ios-swift/rules/architecture/README.md +12 -0
  43. package/presets/claude/ios-swift/rules/architecture/boundaries.md +33 -0
  44. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +68 -0
  45. package/presets/claude/ios-swift/rules/architecture/module-public-api.md +25 -0
  46. package/presets/claude/ios-swift/rules/architecture/reference-features.md +50 -0
  47. package/presets/claude/ios-swift/rules/stack/README.md +10 -0
  48. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +43 -0
  49. package/presets/claude/ios-swift/rules/stack/swift-conventions.md +51 -0
  50. package/presets/claude/ios-swift/rules/testing/README.md +10 -0
  51. package/presets/claude/ios-swift/rules/testing/ui.md +43 -0
  52. package/presets/claude/ios-swift/rules/testing/unit.md +41 -0
  53. package/presets/claude/ios-swift/rules/tooling-and-review/README.md +16 -0
  54. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +18 -0
  55. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +47 -0
  56. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +38 -0
  57. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +46 -0
  58. package/presets/claude/ios-swift/rules/tooling-and-review/post-change-build.md +36 -0
  59. package/presets/claude/ios-swift/rules/tooling-and-review/security-ios.md +36 -0
  60. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +14 -0
  61. package/presets/claude/ios-swift/rules/tooling-and-review/xcode-tooling.md +24 -0
  62. package/presets/claude/ios-swift/rules/ui-and-accessibility/README.md +11 -0
  63. package/presets/claude/ios-swift/rules/ui-and-accessibility/navigation.md +28 -0
  64. package/presets/claude/ios-swift/rules/ui-and-accessibility/swiftui.md +61 -0
  65. package/presets/claude/ios-swift/rules/ui-and-accessibility/viewmodels.md +43 -0
  66. package/presets/claude/ios-swift/skills/README.md +13 -0
  67. package/presets/claude/ios-swift/skills/ci-investigation/SKILL.md +39 -0
  68. package/presets/claude/ios-swift/skills/code-review/SKILL.md +27 -0
  69. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +30 -0
  70. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +27 -0
  71. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +10 -0
  72. package/presets/claude/ios-swift/skills/unit-testing/SKILL.md +32 -0
  73. package/presets/claude/ios-swift/skills/xcuitest-e2e/SKILL.md +33 -0
  74. package/presets/claude/ios-swift/team/README.md +27 -0
  75. package/presets/claude/ios-swift/team/fixtures/bugfix-standard.json +33 -0
  76. package/presets/claude/ios-swift/team/fixtures/feature-full.json +48 -0
  77. package/presets/claude/ios-swift/team/fixtures/feature-light.json +36 -0
  78. package/presets/claude/next/CLAUDE.md +4 -8
  79. package/presets/claude/next/agents/README.md +62 -34
  80. package/presets/claude/next/agents/code-reviewer.md +6 -5
  81. package/presets/claude/next/agents/playwright-test-generator.md +65 -16
  82. package/presets/claude/next/agents/playwright-test-healer.md +51 -16
  83. package/presets/claude/next/agents/playwright-test-planner.md +55 -15
  84. package/presets/claude/next/agents/task-analyst.md +3 -1
  85. package/presets/claude/next/agents/task-router.md +4 -4
  86. package/presets/claude/next/agents/tech-writer.md +1 -0
  87. package/presets/claude/next/hooks/chain-team-phases.sh +73 -35
  88. package/presets/claude/next/rules/README.md +16 -3
  89. package/presets/claude/next/rules/architecture/README.md +2 -1
  90. package/presets/claude/next/rules/stack/README.md +1 -1
  91. package/presets/claude/next/rules/stack/navigation-router.md +2 -0
  92. package/presets/claude/next/rules/stack/next-app-core.md +1 -1
  93. package/presets/claude/next/rules/tooling-and-review/README.md +12 -14
  94. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -0
  95. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +3 -3
  96. package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +11 -0
  97. package/presets/claude/next/rules/ui-and-accessibility/README.md +6 -3
  98. package/presets/claude/next/skills/feature-delivery/SKILL.md +1 -1
  99. package/presets/claude/next/team/README.md +65 -7
  100. package/presets/cursor/ios-swift/AGENTS.md +47 -0
  101. package/presets/cursor/ios-swift/BUGBOT.md +15 -0
  102. package/presets/cursor/ios-swift/README.md +36 -0
  103. package/presets/cursor/ios-swift/agents/README.md +55 -0
  104. package/presets/cursor/ios-swift/agents/accessibility-reviewer.md +67 -0
  105. package/presets/cursor/ios-swift/agents/api-contract-reviewer.md +72 -0
  106. package/presets/cursor/ios-swift/agents/build-verifier.md +64 -0
  107. package/presets/cursor/ios-swift/agents/ci-investigator.md +73 -0
  108. package/presets/cursor/ios-swift/agents/code-reviewer.md +75 -0
  109. package/presets/cursor/ios-swift/agents/debugger.md +72 -0
  110. package/presets/cursor/ios-swift/agents/feature-developer.md +35 -0
  111. package/presets/cursor/ios-swift/agents/migration-specialist.md +73 -0
  112. package/presets/cursor/ios-swift/agents/performance-auditor.md +72 -0
  113. package/presets/cursor/ios-swift/agents/qa-tester.md +65 -0
  114. package/presets/cursor/ios-swift/agents/security-reviewer.md +69 -0
  115. package/presets/cursor/ios-swift/agents/solution-architect.md +17 -0
  116. package/presets/cursor/ios-swift/agents/task-analyst.md +25 -0
  117. package/presets/cursor/ios-swift/agents/task-router.md +62 -0
  118. package/presets/cursor/ios-swift/agents/tech-writer.md +63 -0
  119. package/presets/cursor/ios-swift/agents/unit-test-generator.md +54 -0
  120. package/presets/cursor/ios-swift/agents/unit-test-healer.md +53 -0
  121. package/presets/cursor/ios-swift/agents/unit-test-planner.md +64 -0
  122. package/presets/cursor/ios-swift/agents/xcuitest-test-generator.md +47 -0
  123. package/presets/cursor/ios-swift/agents/xcuitest-test-healer.md +47 -0
  124. package/presets/cursor/ios-swift/agents/xcuitest-test-planner.md +67 -0
  125. package/presets/cursor/ios-swift/commands/README.md +51 -0
  126. package/presets/cursor/ios-swift/commands/feature-continue.md +19 -0
  127. package/presets/cursor/ios-swift/commands/feature-start.md +33 -0
  128. package/presets/cursor/ios-swift/commands/task-continue.md +49 -0
  129. package/presets/cursor/ios-swift/commands/task.md +50 -0
  130. package/presets/cursor/ios-swift/commands/technical-retro.md +81 -0
  131. package/presets/cursor/ios-swift/hooks/README.md +8 -0
  132. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +382 -0
  133. package/presets/cursor/ios-swift/hooks/guard-shell-command.sh +79 -0
  134. package/presets/{claude/next → cursor/ios-swift}/hooks.json +2 -2
  135. package/presets/cursor/ios-swift/rules/README.md +65 -0
  136. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +16 -0
  137. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +80 -0
  138. package/presets/cursor/ios-swift/rules/architecture-boundaries.mdc +34 -0
  139. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +39 -0
  140. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +43 -0
  141. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +61 -0
  142. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +44 -0
  143. package/presets/cursor/ios-swift/rules/module-public-api.mdc +26 -0
  144. package/presets/cursor/ios-swift/rules/navigation-coordinators.mdc +29 -0
  145. package/presets/cursor/ios-swift/rules/networking-services.mdc +49 -0
  146. package/presets/cursor/ios-swift/rules/persistence-data.mdc +31 -0
  147. package/presets/cursor/ios-swift/rules/post-change-build.mdc +32 -0
  148. package/presets/cursor/ios-swift/rules/reference-features.mdc +53 -0
  149. package/presets/cursor/ios-swift/rules/security-ios.mdc +35 -0
  150. package/presets/cursor/ios-swift/rules/state-and-viewmodels.mdc +43 -0
  151. package/presets/cursor/ios-swift/rules/swift-conventions.mdc +51 -0
  152. package/presets/cursor/ios-swift/rules/swiftui-ui.mdc +61 -0
  153. package/presets/cursor/ios-swift/rules/technical-retro.mdc +12 -0
  154. package/presets/cursor/ios-swift/rules/tests-ui.mdc +42 -0
  155. package/presets/cursor/ios-swift/rules/tests-unit.mdc +41 -0
  156. package/presets/cursor/ios-swift/rules/xcode-tooling.mdc +20 -0
  157. package/presets/cursor/ios-swift/skills/README.md +13 -0
  158. package/presets/cursor/ios-swift/skills/ci-investigation/SKILL.md +39 -0
  159. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +27 -0
  160. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +30 -0
  161. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +27 -0
  162. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +10 -0
  163. package/presets/cursor/ios-swift/skills/unit-testing/SKILL.md +32 -0
  164. package/presets/cursor/ios-swift/skills/xcuitest-e2e/SKILL.md +33 -0
  165. package/presets/cursor/ios-swift/team/README.md +27 -0
  166. package/presets/cursor/ios-swift/team/fixtures/bugfix-standard.json +33 -0
  167. package/presets/cursor/ios-swift/team/fixtures/feature-full.json +48 -0
  168. package/presets/cursor/ios-swift/team/fixtures/feature-light.json +36 -0
  169. package/presets/cursor/next/AGENTS.md +1 -1
  170. package/presets/cursor/next/BUGBOT.md +0 -2
  171. package/presets/cursor/next/agents/README.md +6 -0
  172. package/presets/cursor/next/agents/accessibility-reviewer.md +1 -1
  173. package/presets/cursor/next/agents/api-contract-reviewer.md +1 -1
  174. package/presets/cursor/next/agents/build-verifier.md +2 -2
  175. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  176. package/presets/cursor/next/agents/feature-developer.md +1 -0
  177. package/presets/cursor/next/agents/migration-specialist.md +2 -2
  178. package/presets/cursor/next/agents/performance-auditor.md +1 -1
  179. package/presets/cursor/next/agents/playwright-test-generator.md +1 -0
  180. package/presets/cursor/next/agents/playwright-test-healer.md +1 -0
  181. package/presets/cursor/next/agents/qa-tester.md +1 -0
  182. package/presets/cursor/next/agents/security-reviewer.md +1 -1
  183. package/presets/cursor/next/agents/solution-architect.md +1 -1
  184. package/presets/cursor/next/agents/task-analyst.md +1 -1
  185. package/presets/cursor/next/agents/task-router.md +2 -2
  186. package/presets/cursor/next/agents/tech-writer.md +1 -1
  187. package/presets/cursor/next/agents/unit-test-planner.md +2 -2
  188. package/presets/cursor/next/rules/README.md +6 -6
  189. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +25 -23
  190. package/presets/cursor/next/rules/next-app-core.mdc +1 -1
  191. package/presets/cursor/next/rules/post-change-lint.mdc +4 -2
  192. package/presets/cursor/next/skills/feature-delivery/SKILL.md +1 -1
  193. package/CONTRIBUTING.md +0 -102
  194. package/fragments/BUGBOT.md +0 -23
  195. package/presets/claude/next/BUGBOT.md +0 -16
  196. package/presets/claude/next/rules/architecture/api-public-imports.md +0 -8
  197. package/presets/claude/next/rules/architecture/types-public-imports.md +0 -8
  198. package/presets/cursor/next/rules/api-public-imports.mdc +0 -8
  199. package/presets/cursor/next/rules/no-cross-component-styles-import.mdc +0 -8
  200. package/presets/cursor/next/rules/types-public-imports.mdc +0 -8
  201. package/scripts/README.md +0 -84
  202. package/scripts/golden-prompts.json +0 -276
  203. package/scripts/preset-manifest.json +0 -72
  204. package/scripts/regression-results/.gitkeep +0 -0
  205. package/scripts/validate-preset.sh +0 -484
@@ -0,0 +1,11 @@
1
+ # UI and accessibility
2
+
3
+ SwiftUI Views, Design System, ViewModels, navigation. Index only — тела в topic `.md`.
4
+
5
+ | File | Cursor SoT |
6
+ |------|------------|
7
+ | [`swiftui.md`](./swiftui.md) | `swiftui-ui.mdc` |
8
+ | [`viewmodels.md`](./viewmodels.md) | `state-and-viewmodels.mdc` |
9
+ | [`navigation.md`](./navigation.md) | `navigation-coordinators.mdc` |
10
+
11
+ Sync: change Cursor → update Claude twin same PR. Full map: [`../README.md`](../README.md).
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: NavigationStack, координаторы, deep links — границы Presentation
3
+ paths:
4
+ - "**/Presentation/**/*Navigator*.swift"
5
+ - "**/Presentation/**/*Coordinator*.swift"
6
+ - "**/Presentation/**/*Router*.swift"
7
+ - "**/App/**/*App*.swift"
8
+ - "**/*Navigation*.swift"
9
+ ---
10
+
11
+ # Навигация (iOS)
12
+
13
+ ## Рамка
14
+
15
+ - **SwiftUI-first:** `NavigationStack` / `navigationDestination` / sheet / fullScreenCover — как в репо.
16
+ - UIKit / coordinator — только если уже принят в модуле; не смешивать два стиля в одном Feature без причины.
17
+ - Маршруты и deep links — **Presentation** (или App shell); Domain не знает о `NavigationPath`.
18
+
19
+ ## Правила
20
+
21
+ - Один Feature — один явный «вход» навигации (root view / coordinator), не размазывать `NavigationLink` по Data.
22
+ - Параметры экрана — typed (enum route / struct), не «магические» строки без реестра.
23
+ - Deep link → route mapping централизован (App или Navigation hub); ViewModel не парсит URL напрямую.
24
+ - Модалки: владелец presentation state — родительский VM/coordinator, не глобальный singleton без нужды.
25
+
26
+ ## Требование к агенту
27
+
28
+ Копировать паттерн ближайшего Feature из `reference-features`. Не тащить networking в навигационный слой.
@@ -0,0 +1,61 @@
1
+ ---
2
+ description: Паттерны SwiftUI, View и Design System (preset)
3
+ paths:
4
+ - "**/{Presentation,DesignSystem}/**/*.swift"
5
+ ---
6
+
7
+ # Общие правила View
8
+
9
+ - **SwiftUI** — приоритет; UIKit — только по конвенции репо (wrapper, legacy).
10
+ - View должна быть **тонкой**:
11
+ - отображает state из ViewModel;
12
+ - делегирует действия через методы/closures ViewModel;
13
+ - не содержит бизнес-логики, маппинга DTO, сетевых вызовов.
14
+ - Перед новым кастомным контролом — искать компонент в `DesignSystem/` или существующих фичах.
15
+ - Повторяемую UI-логику выносить в `ViewModifier`, `@ViewBuilder` helpers или subviews.
16
+
17
+ # ViewModel и binding
18
+
19
+ - ViewModel — `@MainActor`, `@Observable` (iOS 17+) или `ObservableObject` — как принято в проекте.
20
+ - View читает state и вызывает **явные методы** ViewModel (`submit()`, `load()`), а не мутирует внутреннее состояние напрямую.
21
+ - Для навигации — coordinator/router или enum route в ViewModel, не размазанные `NavigationLink` с бизнес-условиями в View.
22
+
23
+ # Структура файлов
24
+
25
+ Для экрана фичи:
26
+ - `FeatureView.swift` — композиция subviews.
27
+ - `FeatureViewModel.swift` — state + intents.
28
+ - `FeatureView+Subviews.swift` — при большом дереве (опционально).
29
+ - `FeatureRoute.swift` — навигация (если используется).
30
+
31
+ Для компонента Design System:
32
+ - Папка `ComponentName/`:
33
+ - `ComponentName.swift`
34
+ - `ComponentName+Preview.swift` (опционально)
35
+ - `ComponentNameStyle.swift` — стили/варианты (опционально)
36
+
37
+ # Стили и Design System
38
+
39
+ - Цвета, шрифты, отступы — из **токенов/Theme** проекта (`DesignSystem`, `Assets`, generated tokens).
40
+ - Избегать:
41
+ - «магических» литералов (`.padding(17)`, `Color(red: 0.2, ...)`), если есть токены;
42
+ - дублирования стилей, уже закрытых примитивами.
43
+ - `Preview` — для компонентов и экранов с mock ViewModel.
44
+
45
+ # Accessibility
46
+
47
+ - Интерактивные элементы: осмысленные `accessibilityLabel`, `accessibilityHint` где нужно.
48
+ - Для UI-тестов — стабильные `accessibilityIdentifier` на ключевых элементах (согласовать с `testing/ui.md`).
49
+ - Поддерживать Dynamic Type и контраст, не ломать layout при крупном шрифте.
50
+
51
+ # Previews и локализация
52
+
53
+ - Строки UI — через `String(localized:)` / `LocalizedStringKey`, не hardcoded в production без причины.
54
+ - `#Preview` с реалистичными mock-данными; для ViewModel — stub use cases.
55
+
56
+ # Требование к агенту
57
+
58
+ При создании/изменении UI:
59
+ - Следовать существующим экранам и компонентам как эталону.
60
+ - Не импортировать Data-слой во View/ViewModel.
61
+ - Subview выделять, когда body превышает ~40–60 строк или повторяется.
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: ViewModels, состояние экрана и domain flow
3
+ paths:
4
+ - "**/{Presentation,Domain}/**/*ViewModel*.swift"
5
+ ---
6
+
7
+ # Общие принципы
8
+
9
+ - ViewModel — **единственная точка** orchestration для экрана: load, submit, validation, navigation intents.
10
+ - Хранить и отдавать во View **domain models** и UI-specific state (loading, error message, selected tab).
11
+ - `@MainActor` на ViewModel; тяжёлую работу — в use case / repository (`async`), не блокировать main thread.
12
+ - Unidirectional flow: View → intent → ViewModel → use case → state update → View.
13
+
14
+ # State
15
+
16
+ - Явный enum или struct для UI state где уместно:
17
+ - `idle`, `loading`, `loaded(Data)`, `failed(Error)` — или аналог из репо.
18
+ - Избегать множества несинхронизированных `@Published` флагов, если один enum покрывает сценарий.
19
+ - `@Observable` / `ObservableObject` — как в проекте; не смешивать стили в одной фиче без причины.
20
+
21
+ # Use cases и repositories
22
+
23
+ - ViewModel зависит от **протоколов** (`LoadOrdersUseCase`, `OrderRepository`), не от `*RepositoryImpl`.
24
+ - Один use case — одна бизнес-операция; не раздувать ViewModel сотнями строк — выносить use cases в Domain.
25
+ - Кэширование и offline — в repository/Data, не во ViewModel.
26
+
27
+ # Side effects
28
+
29
+ - Analytics, haptics, deep links — через injected services или middleware-паттерн, не hardcode синглтонов.
30
+ - `Task` в ViewModel: отмена при `deinit` / `onDisappear` где нужно (`task(id:)`, хранение `Task?` с cancel).
31
+
32
+ # Тестируемость
33
+
34
+ - Инициализатор ViewModel принимает протоколы (DI); без скрытых singleton для сети/БД.
35
+ - Бизнес-ветки покрывать unit-тестами с mock use cases.
36
+
37
+ # Требование к агенту
38
+
39
+ При создании ViewModel:
40
+ - Не вызывать `URLSession` / API client напрямую.
41
+ - Не парсить JSON и не объявлять DTO во ViewModel.
42
+ - Именование: `FeatureViewModel`, методы — глаголы (`loadOrders()`, `submitOrder()`).
43
+ - Следовать стилю существующих ViewModels в той же фиче.
@@ -0,0 +1,13 @@
1
+ # `.claude/skills` (preset ios-swift)
2
+
3
+ | Skill | Назначение |
4
+ |-------|------------|
5
+ | `feature-delivery` | Domain → Data → VM → View → tests → post-change-build |
6
+ | `code-review` | iOS MR checklist |
7
+ | `unit-testing` | XCTest / Swift Testing |
8
+ | `xcuitest-e2e` | XCUITest plan/generate/heal (← next `playwright-e2e`) |
9
+ | `debug-investigation` | Runtime evidence before fix |
10
+ | `ci-investigation` | iOS CI red |
11
+ | `technical-retro` | Retro facilitation |
12
+
13
+ Копируется в `.claude/skills/` при init.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: ci-investigation
3
+ description: Investigates failing CI checks on PRs and branches — xcodebuild, SwiftLint, unit, XCUITest — with local reproduction and minimal fixes. Use when CI is red or for ci-fix pipeline tasks.
4
+ ---
5
+
6
+ # CI Investigation (iOS)
7
+
8
+ ## Workflow
9
+
10
+ 1. Identify the **first failing check** (compile, lint, unit, XCUITest, signing, SPM).
11
+ 2. Capture error output — ignore cascading failures until root cause is found.
12
+ 3. Reproduce locally with the same scheme/destination CI uses (`tooling-and-review/xcode-tooling.md`):
13
+ - `xcodebuild build` / `xcodebuild test`
14
+ - SwiftLint / SwiftFormat scripts as in repo CI
15
+ - affected XCUITest if UI job failed
16
+ 4. Inspect git diff for changed files related to the failure.
17
+ 5. Apply **minimal fix** — no unrelated refactors.
18
+
19
+ ## Artifact
20
+
21
+ Write `ci-report.md` under the task slug folder (`.claude/team/tasks/<slug>/`):
22
+
23
+ - Failed check name and log excerpt
24
+ - Root cause classification
25
+ - Fix applied (or handoff to feature-developer)
26
+ - `resolved: true|false`
27
+ - Validation commands and results
28
+
29
+ ## Handoff Rules
30
+
31
+ - Config-only or one-line fixes → fix in place, re-run check.
32
+ - Missing tests or architecture work → document and route to `feature-developer` or `qa-tester`.
33
+ - Flaky XCUITest → prefer `xcuitest-test-healer` after ci-investigator identifies the case.
34
+
35
+ ## Validation
36
+
37
+ Always re-run the failing command locally before marking complete. If environment blocks execution (no simulator), state the exact command and blocker.
38
+
39
+ Never run yarn/`lint:js`/Playwright — wrong stack.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: code-review
3
+ description: Reviews pull requests, merge requests, git diffs, and branch changes using iOS architecture, SwiftUI, networking, and testing standards. Use when the user asks for review or when code-reviewer runs in an agent pipeline.
4
+ ---
5
+
6
+ # Code Review (iOS)
7
+
8
+ ## Inputs
9
+
10
+ Use the local repository as the source of truth: `git status`, `git diff`, task artifacts under `.claude/team/tasks/<slug>/` when present, and opened files. Do not invent hosting metadata such as labels, CI status, or reviewers.
11
+
12
+ ## Review Order
13
+
14
+ 1. Understand the intent and affected Feature layers (Presentation / Domain / Data).
15
+ 2. Check correctness and regressions first.
16
+ 3. Verify architecture boundaries (`architecture/boundaries.md`): View ≠ API/DTO; ViewModel ≠ Data impl; Domain ≠ SwiftUI; Data ≠ Presentation.
17
+ 4. Check DI composition in `App/`, SPM public API (`architecture/module-public-api.md`), and no deep-imports across Features.
18
+ 5. Review Swift concurrency and conventions (`stack/swift-conventions.md`): `@MainActor`, typed errors, force unwrap.
19
+ 6. Review SwiftUI thinness, Design System usage, accessibility identifiers (`ui-and-accessibility/swiftui.md`).
20
+ 7. Check tests: unit for mapper/domain/VM (`testing/unit.md`); XCUITest for user flows (`testing/ui.md`).
21
+ 8. Report validation gaps: `xcodebuild`, SwiftLint, or relevant tests not run (`tooling-and-review/xcode-tooling.md`, `tooling-and-review/post-change-build.md`).
22
+
23
+ ## Output
24
+
25
+ Lead with findings ordered by severity. Each finding should include the file, the problem, impact, and a concrete fix direction. If there are no findings, say so and call out remaining test or validation risk.
26
+
27
+ For agent team tasks, write `.claude/team/tasks/<slug>/review.md` and set `status.json` to `completed` or `changes_requested`.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: debug-investigation
3
+ description: Investigates bugs, failing tests, crashes, and incorrect behavior with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, regressions, and flaky test diagnosis.
4
+ ---
5
+
6
+ # Debug Investigation (iOS)
7
+
8
+ ## Process
9
+
10
+ 1. Reproduce the issue or collect the closest available evidence: Xcode console, lldb backtrace, crash log, failing XCTest/XCUITest output, Instruments note, or user steps.
11
+ 2. Define expected vs actual behavior in one sentence.
12
+ 3. Trace the failing path through the smallest relevant Feature slice (Presentation → Domain → Data).
13
+ 4. Identify the root cause before editing. Avoid broad refactors during bugfixes.
14
+ 5. Apply the smallest fix that preserves existing architecture and public contracts.
15
+ 6. Add or update a regression XCTest when the behavior is domain/VM logic or likely to recur.
16
+ 7. Run the narrow failing check first (`xcodebuild test` for the affected target), then broader build validation if needed (`tooling-and-review/xcode-tooling.md`).
17
+
18
+ ## Artifacts
19
+
20
+ For agent team tasks, write `.claude/team/tasks/<slug>/debug-report.md` with:
21
+
22
+ - Reproduction steps or evidence source.
23
+ - Root cause.
24
+ - Fix scope (`fixApplied`).
25
+ - Regression coverage.
26
+ - Remaining risk.
27
+
28
+ Update `status.json` when complete.
29
+
30
+ Do not use browser/Playwright tooling — this is an Xcode stack.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: feature-delivery
3
+ description: Delivers iOS Swift/SwiftUI features end-to-end across Domain, Data, ViewModels, Views, tests, and post-change-build validation. Use when implementing or extending a feature, especially through /task or feature-developer.
4
+ ---
5
+
6
+ # Feature Delivery (iOS)
7
+
8
+ 1. Read task brief, acceptance criteria, and decomposition if present.
9
+ 2. Read `architecture/feature-delivery.md` and `architecture/reference-features.md` — Domain → Data → ViewModel → View → tests; mirror the closest Feature.
10
+ 3. Wire DI in `App/` composition root; keep Views thin; keep DTOs out of ViewModels.
11
+ 4. Add or update focused XCTest for mappers / use cases / ViewModels (`testing/unit.md`).
12
+ 5. After Swift edits: **invoke** `tooling-and-review/post-change-build.md` (+ `tooling-and-review/xcode-tooling.md`). Pipeline: scoped build OK if next step is `build-verifier`.
13
+
14
+ ## Do / Don't
15
+
16
+ - **Do** follow existing Feature folder layout and public module APIs.
17
+ - **Do** add `accessibilityIdentifier`s for new interactive UI when UI tests are in scope.
18
+ - **Don't** introduce TCA/SwiftData/etc. unless the repo already uses them.
19
+ - **Don't** use yarn, Playwright, or `app/src` paths — wrong stack.
20
+
21
+ ## Preset packaging note
22
+
23
+ When editing **ai-rules ios-swift preset** sources (agents, hooks, rules) rather than an app Feature: keep Cursor and Claude trees in sync where applicable, and **fork / verify hook handoffs** (`hooks/chain-team-phases.sh`, guard scripts, team path conventions) so Cursor (`.cursor/team`) and Claude (`.claude/team`) do not regress against each other or against the next preset templates.
24
+
25
+ ## Handoff
26
+
27
+ Summarize by layer, validation results, and known gaps. Agent team: update `.claude/team/tasks/<slug>/status.json`.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: technical-retro
3
+ description: Facilitates technical retrospectives for tasks, sprints, incidents, releases, and agent-team pipelines. Use when the user asks for retro, postmortem, process review, or action items after delivery.
4
+ ---
5
+
6
+ # Technical Retro
7
+
8
+ Same structure as next technical-retro skill. For `/task` pipelines include router, analyst, developer, **build-verifier** (xcodebuild), reviewer, QA/XCUITest, hooks, rules.
9
+
10
+ Preset feedback: propose updates to `.claude/rules|agents|skills` — do not apply without approval.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: unit-testing
3
+ description: Plans, generates, and heals XCTest / Swift Testing for mappers, use cases, and ViewModels using *Tests targets and tests-unit rules. Use for unit test planning, generation, or fixing failing unit tests.
4
+ ---
5
+
6
+ # Unit Testing (iOS)
7
+
8
+ ## Project Layout
9
+
10
+ - Unit targets: `*Tests/` colocated or parallel to Feature — **as in the Xcode project**.
11
+ - Framework: XCTest or Swift Testing per project convention.
12
+ - Do **not** create Jest/Vitest `*.spec.ts` files.
13
+
14
+ Follow `testing/unit.md` (Cursor `.mdc` / Claude `testing/unit.md` depending on preset).
15
+
16
+ ## Planner
17
+
18
+ Write or update `.claude/team/tasks/<slug>/unit-test-plan.md`.
19
+
20
+ Each scenario needs a Russian `test` / `@Test` title (capital letter after each sentence). Cover mappers, use cases, ViewModel state branches, and mocked client/repository behavior per AC.
21
+
22
+ ## Generator
23
+
24
+ Implement tests from `unit-test-plan.md` into the correct `*Tests` target. Reuse TestSupport / protocol mocks. Do not change production code.
25
+
26
+ ## Healer
27
+
28
+ Fix mocks, async/MainActor timing, and fixtures — preserve business assertions. Use `unit-test-plan.md` and `brief.md` as the behavior contract.
29
+
30
+ ## Validation
31
+
32
+ Run affected unit tests via `xcodebuild test` (`tooling-and-review/xcode-tooling.md`) when feasible. Report command, pass/fail, and remaining gaps vs plan.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: xcuitest-e2e
3
+ description: Plans, generates, and heals XCUITest UI tests using *UITests targets, accessibility identifiers, and screen objects. Use for UI test planning, generation, or fixing flaky XCUITest.
4
+ ---
5
+
6
+ # XCUITest E2E
7
+
8
+ ## Project Layout
9
+
10
+ - UI Test target: `*UITests/` (as in the Xcode project).
11
+ - Optional plans: `*.cases.md` if the repo uses them.
12
+ - Screen/Page objects keyed by `accessibilityIdentifier` (`{screen}__{element}`).
13
+ - Shared helpers: `UITestSupport/` or equivalent — follow existing patterns.
14
+
15
+ Follow `testing/ui.md`. Agents: `xcuitest-test-{planner,generator,healer}`.
16
+
17
+ **Never Playwright** and never `app/__tests__/e2e`.
18
+
19
+ ## Planner
20
+
21
+ Create or update the relevant plan (`*.cases.md` or team notes). Each scenario should include title, preconditions, steps, and expected result. Cover happy path, important edge cases, validation, and error states. Russian titles with entity prefix when that is repo convention.
22
+
23
+ ## Generator
24
+
25
+ Generate XCUITest from plans into the UITests target. Reuse screen objects. Keep test names aligned with scenario names. Prefer identifiers over coordinates.
26
+
27
+ ## Healer
28
+
29
+ Fix waits, launch arguments, identifiers, or screen-object details without weakening business assertions. Use the matching plan / AC as the behavior contract.
30
+
31
+ ## Validation
32
+
33
+ Run affected UI tests via `xcodebuild test` (`tooling-and-review/xcode-tooling.md`) when a simulator is available. If blocked, report the exact command and blocker.
@@ -0,0 +1,27 @@
1
+ # Agent team artifacts (ios-swift)
2
+
3
+ Каталог артефактов пайплайна «команда агентов» для iOS.
4
+
5
+ ## Layout
6
+
7
+ ```
8
+ .claude/team/ # Claude: .claude/team/
9
+ active-task.json
10
+ fixtures/
11
+ tasks/<slug>/
12
+ pipeline.json
13
+ status.json
14
+ brief.md
15
+ decomposition.md
16
+
17
+ ```
18
+
19
+ ## Fixtures
20
+
21
+ | Fixture | Notes |
22
+ |---------|-------|
23
+ | `feature-full.json` | Full profile; QA scope `e2e-only` = **XCUITest**; Playwright stems in `skipped` |
24
+ | `feature-light.json` | developer → build-verifier |
25
+ | `bugfix-standard.json` | debugger → developer (skipIf) → verifier → reviewer |
26
+
27
+ **Never** schedule Playwright-only steps without skip rationale. Use `xcuitest-test-*` for UI-test-only intents.
@@ -0,0 +1,33 @@
1
+ {
2
+ "slug": "example-bugfix-standard",
3
+ "intent": "bugfix",
4
+ "profile": "standard",
5
+ "summary": "Regression fix with review",
6
+ "steps": [
7
+ {
8
+ "agent": "debugger",
9
+ "label": "Root cause"
10
+ },
11
+ {
12
+ "agent": "feature-developer",
13
+ "label": "Fix if needed",
14
+ "skipIf": "debugger.fixed"
15
+ },
16
+ {
17
+ "agent": "build-verifier",
18
+ "label": "Validation gate"
19
+ },
20
+ {
21
+ "agent": "code-reviewer",
22
+ "label": "Code review"
23
+ }
24
+ ],
25
+ "humanGates": [],
26
+ "autoChain": true,
27
+ "skipped": [
28
+ {
29
+ "agent": "playwright-test-planner",
30
+ "reason": "iOS uses XCUITest — not in this bugfix path"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "slug": "example-feature-full",
3
+ "intent": "feature",
4
+ "profile": "full",
5
+ "summary": "Multi-layer Feature with XCUITest coverage",
6
+ "steps": [
7
+ {
8
+ "agent": "task-analyst",
9
+ "label": "Clarify and decompose"
10
+ },
11
+ {
12
+ "agent": "feature-developer",
13
+ "label": "Implement + unit tests",
14
+ "scope": "unit-in-dev"
15
+ },
16
+ {
17
+ "agent": "build-verifier",
18
+ "label": "xcodebuild + lint + unit smoke"
19
+ },
20
+ {
21
+ "agent": "code-reviewer",
22
+ "label": "Code review"
23
+ },
24
+ {
25
+ "agent": "qa-tester",
26
+ "label": "XCUITest",
27
+ "scope": "e2e-only"
28
+ }
29
+ ],
30
+ "humanGates": [
31
+ "after:task-analyst"
32
+ ],
33
+ "autoChain": true,
34
+ "skipped": [
35
+ {
36
+ "agent": "playwright-test-planner",
37
+ "reason": "iOS uses XCUITest — see xcuitest-test-* agents"
38
+ },
39
+ {
40
+ "agent": "playwright-test-generator",
41
+ "reason": "iOS uses XCUITest"
42
+ },
43
+ {
44
+ "agent": "playwright-test-healer",
45
+ "reason": "iOS uses XCUITest"
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "slug": "example-feature-light",
3
+ "intent": "feature",
4
+ "profile": "light",
5
+ "summary": "Trivial single-file Swift change with explicit AC",
6
+ "steps": [
7
+ {
8
+ "agent": "feature-developer",
9
+ "label": "Implement"
10
+ },
11
+ {
12
+ "agent": "build-verifier",
13
+ "label": "Validation gate"
14
+ }
15
+ ],
16
+ "humanGates": [],
17
+ "autoChain": true,
18
+ "skipped": [
19
+ {
20
+ "agent": "task-analyst",
21
+ "reason": "Explicit AC and single-file scope"
22
+ },
23
+ {
24
+ "agent": "code-reviewer",
25
+ "reason": "Light profile"
26
+ },
27
+ {
28
+ "agent": "qa-tester",
29
+ "reason": "No XCUITest AC"
30
+ },
31
+ {
32
+ "agent": "playwright-test-planner",
33
+ "reason": "iOS uses XCUITest; not needed for light"
34
+ }
35
+ ]
36
+ }
@@ -7,8 +7,8 @@ See @rules/README.md for the full catalog and loading strategy.
7
7
  ## Conventions
8
8
 
9
9
  - **Одна тема на файл**; для больших областей — подпапки в `rules/<topic>/`.
10
- - **Session-start rules** — только базовые инварианты (`next-app-core`, lint, package manager, code-quality).
11
- - **Domain-specific rules** — YAML frontmatter `paths:` (подгружаются при работе с matching-файлами).
10
+ - **Session-start rules** (без `paths:`) ровно **три**: `next-app-core`, `package-manager`, `code-quality`.
11
+ - **Domain-specific rules** — YAML frontmatter `paths:` (подгружаются при работе с matching-файлами); `post-change-lint` — requestable (**обязателен после code edits**); orchestrator и code-review — on-demand.
12
12
  - Slash-команды — в `commands/`; сценарии — в `skills/`; subagents — в `agents/`.
13
13
 
14
14
  ## Quick start
@@ -21,7 +21,7 @@ See @rules/README.md for the full catalog and loading strategy.
21
21
  | Стек и слои | `rules/stack/next-app-core.md` |
22
22
  | App Router | `rules/stack/next-app-router.md` |
23
23
  | A11y при кодинге UI | `rules/ui-and-accessibility/react-a11y-coding.md` |
24
- | После правок кода | `rules/tooling-and-review/post-change-lint.md` |
24
+ | После правок кода | `rules/tooling-and-review/post-change-lint.md` (**requestable**, обязателен после edits) |
25
25
  | Валидация перед review | agent `build-verifier` |
26
26
  | Code review MR | skill `code-review` + `rules/tooling-and-review/code-review-mr.md` |
27
27
  | Техническое ретро | `commands/technical-retro.md` + skill `technical-retro` |
@@ -32,8 +32,4 @@ See @rules/README.md for the full catalog and loading strategy.
32
32
  npx @bonesofspring/ai-rules init claude --preset next
33
33
  ```
34
34
 
35
- Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `hooks/**`, `team/**`, `hooks.json`, `BUGBOT.md` и др. в `.claude/` целевого репозитория.
36
-
37
- ## Pipeline routing
38
-
39
- Intent detection, profiles (`full` / `standard` / `light`), and default steps — **only** in `agents/task-router.md`. Schema and examples — `agents/README.md`.
35
+ Копирует `CLAUDE.md`, `rules/**`, `commands/**`, `agents/**`, `hooks/**`, `team/**` и др. в `.claude/` целевого репозитория.