@smartsoft001/pro-claude-plugins 0.2.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 (198) hide show
  1. package/.claude-plugin/marketplace.json +26 -0
  2. package/README.md +56 -0
  3. package/package.json +14 -0
  4. package/plugins/flow/.claude-plugin/README.md +91 -0
  5. package/plugins/flow/.claude-plugin/merge-permissions.js +115 -0
  6. package/plugins/flow/.claude-plugin/plugin.json +5 -0
  7. package/plugins/flow/.claude-plugin/settings.template.json +86 -0
  8. package/plugins/flow/agents/angular-component-scaffolder.md +176 -0
  9. package/plugins/flow/agents/angular-directive-builder.md +154 -0
  10. package/plugins/flow/agents/angular-guard-builder.md +244 -0
  11. package/plugins/flow/agents/angular-jest-test-writer.md +475 -0
  12. package/plugins/flow/agents/angular-pipe-builder.md +170 -0
  13. package/plugins/flow/agents/angular-resolver-builder.md +287 -0
  14. package/plugins/flow/agents/angular-service-builder.md +162 -0
  15. package/plugins/flow/agents/angular-signal-state-builder.md +340 -0
  16. package/plugins/flow/agents/angular-test-diagnostician.md +279 -0
  17. package/plugins/flow/agents/angular-testbed-configurator.md +315 -0
  18. package/plugins/flow/agents/arch-scaffolder.md +278 -0
  19. package/plugins/flow/agents/e2e-data-testid-injector.md +195 -0
  20. package/plugins/flow/agents/e2e-project-scaffolder.md +194 -0
  21. package/plugins/flow/agents/e2e-test-writer.md +357 -0
  22. package/plugins/flow/agents/shared-agent-evolver.md +294 -0
  23. package/plugins/flow/agents/shared-build-verifier.md +160 -0
  24. package/plugins/flow/agents/shared-config-updater.md +310 -0
  25. package/plugins/flow/agents/shared-coverage-enforcer.md +184 -0
  26. package/plugins/flow/agents/shared-error-handler.md +217 -0
  27. package/plugins/flow/agents/shared-file-creator.md +344 -0
  28. package/plugins/flow/agents/shared-impl-orchestrator.md +312 -0
  29. package/plugins/flow/agents/shared-impl-reporter.md +368 -0
  30. package/plugins/flow/agents/shared-impl-teammate.md +201 -0
  31. package/plugins/flow/agents/shared-linear-subtask-iterator.md +337 -0
  32. package/plugins/flow/agents/shared-logic-implementer.md +244 -0
  33. package/plugins/flow/agents/shared-maia-api.md +26 -0
  34. package/plugins/flow/agents/shared-parallelization-analyzer.md +343 -0
  35. package/plugins/flow/agents/shared-performance-validator.md +168 -0
  36. package/plugins/flow/agents/shared-plan-perspective.md +271 -0
  37. package/plugins/flow/agents/shared-project-standardizer.md +205 -0
  38. package/plugins/flow/agents/shared-report-synthesizer.md +188 -0
  39. package/plugins/flow/agents/shared-review-teammate.md +189 -0
  40. package/plugins/flow/agents/shared-security-scanner.md +186 -0
  41. package/plugins/flow/agents/shared-style-enforcer.md +230 -0
  42. package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +189 -0
  43. package/plugins/flow/agents/shared-tdd-developer.md +350 -0
  44. package/plugins/flow/agents/shared-team-coordinator.md +192 -0
  45. package/plugins/flow/agents/shared-test-fixer.md +186 -0
  46. package/plugins/flow/agents/shared-test-runner.md +191 -0
  47. package/plugins/flow/agents/shared-ui-classifier.md +263 -0
  48. package/plugins/flow/agents/shared-verification-orchestrator.md +194 -0
  49. package/plugins/flow/agents/shared-verification-runner.md +140 -0
  50. package/plugins/flow/agents/ui-a11y-validator.md +305 -0
  51. package/plugins/flow/agents/ui-screenshot-reporter.md +329 -0
  52. package/plugins/flow/agents/ui-web-designer.md +214 -0
  53. package/plugins/flow/scripts/compute-session-tokens.sh +39 -0
  54. package/plugins/flow/skills/a11y-audit/SKILL.md +214 -0
  55. package/plugins/flow/skills/angular-patterns/SKILL.md +191 -0
  56. package/plugins/flow/skills/browser-capture/SKILL.md +238 -0
  57. package/plugins/flow/skills/commit/SKILL.md +259 -0
  58. package/plugins/flow/skills/debug-helper/SKILL.md +375 -0
  59. package/plugins/flow/skills/impl/SKILL.md +992 -0
  60. package/plugins/flow/skills/karpathy-guidelines/SKILL.md +72 -0
  61. package/plugins/flow/skills/linear-suggestion/SKILL.md +132 -0
  62. package/plugins/flow/skills/maia-files-delete/SKILL.md +59 -0
  63. package/plugins/flow/skills/maia-files-upload/SKILL.md +57 -0
  64. package/plugins/flow/skills/nx-conventions/SKILL.md +326 -0
  65. package/plugins/flow/skills/plan/SKILL.md +1033 -0
  66. package/plugins/flow/skills/push/SKILL.md +759 -0
  67. package/plugins/flow/skills/review/SKILL.md +443 -0
  68. package/plugins/flow/skills/test-e2e/SKILL.md +164 -0
  69. package/plugins/flow/skills/test-unit/SKILL.md +456 -0
  70. package/plugins/flow-external/.claude-plugin/README.md +146 -0
  71. package/plugins/flow-external/.claude-plugin/merge-permissions.js +94 -0
  72. package/plugins/flow-external/.claude-plugin/plugin.json +5 -0
  73. package/plugins/flow-external/.claude-plugin/settings.template.json +78 -0
  74. package/plugins/flow-external/agents/angular-component-scaffolder.md +271 -0
  75. package/plugins/flow-external/agents/angular-directive-builder.md +134 -0
  76. package/plugins/flow-external/agents/angular-guard-builder.md +73 -0
  77. package/plugins/flow-external/agents/angular-pipe-builder.md +90 -0
  78. package/plugins/flow-external/agents/angular-resolver-builder.md +79 -0
  79. package/plugins/flow-external/agents/angular-service-builder.md +168 -0
  80. package/plugins/flow-external/agents/angular-state-builder.md +263 -0
  81. package/plugins/flow-external/agents/shared-build-verifier.md +67 -0
  82. package/plugins/flow-external/agents/shared-impl-orchestrator.md +90 -0
  83. package/plugins/flow-external/agents/shared-impl-reporter.md +135 -0
  84. package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +70 -0
  85. package/plugins/flow-external/agents/shared-ui-classifier.md +38 -0
  86. package/plugins/flow-external/agents/ui-web-designer.md +203 -0
  87. package/plugins/flow-external/scripts/compute-session-tokens.sh +39 -0
  88. package/plugins/flow-external/skills/a11y-audit/SKILL.md +97 -0
  89. package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +268 -0
  90. package/plugins/flow-external/skills/angular-patterns/SKILL.md +182 -0
  91. package/plugins/flow-external/skills/browser-capture/SKILL.md +74 -0
  92. package/plugins/flow-external/skills/commit/SKILL.md +114 -0
  93. package/plugins/flow-external/skills/debug-helper/SKILL.md +135 -0
  94. package/plugins/flow-external/skills/impl/SKILL.md +218 -0
  95. package/plugins/flow-external/skills/karpathy-guidelines/SKILL.md +72 -0
  96. package/plugins/flow-external/skills/linear-suggestion/SKILL.md +62 -0
  97. package/plugins/flow-external/skills/maia-files-delete/SKILL.md +34 -0
  98. package/plugins/flow-external/skills/maia-files-upload/SKILL.md +41 -0
  99. package/plugins/flow-external/skills/plan/SKILL.md +334 -0
  100. package/plugins/flow-external/skills/push/SKILL.md +232 -0
  101. package/plugins/flow-legacy/.claude-plugin/README.md +143 -0
  102. package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +94 -0
  103. package/plugins/flow-legacy/.claude-plugin/plugin.json +5 -0
  104. package/plugins/flow-legacy/.claude-plugin/settings.template.json +79 -0
  105. package/plugins/flow-legacy/agents/angular-component-scaffolder.md +327 -0
  106. package/plugins/flow-legacy/agents/angular-directive-builder.md +253 -0
  107. package/plugins/flow-legacy/agents/angular-guard-builder.md +326 -0
  108. package/plugins/flow-legacy/agents/angular-pipe-builder.md +238 -0
  109. package/plugins/flow-legacy/agents/angular-resolver-builder.md +339 -0
  110. package/plugins/flow-legacy/agents/angular-service-builder.md +271 -0
  111. package/plugins/flow-legacy/agents/angular-state-builder.md +480 -0
  112. package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +174 -0
  113. package/plugins/flow-legacy/agents/shared-impl-reporter.md +232 -0
  114. package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +198 -0
  115. package/plugins/flow-legacy/agents/shared-tdd-developer.md +307 -0
  116. package/plugins/flow-legacy/agents/shared-test-runner.md +133 -0
  117. package/plugins/flow-legacy/agents/shared-ui-classifier.md +145 -0
  118. package/plugins/flow-legacy/scripts/compute-session-tokens.sh +39 -0
  119. package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +214 -0
  120. package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +346 -0
  121. package/plugins/flow-legacy/skills/browser-capture/SKILL.md +238 -0
  122. package/plugins/flow-legacy/skills/commit/SKILL.md +215 -0
  123. package/plugins/flow-legacy/skills/debug-helper/SKILL.md +395 -0
  124. package/plugins/flow-legacy/skills/impl/SKILL.md +710 -0
  125. package/plugins/flow-legacy/skills/karpathy-guidelines/SKILL.md +72 -0
  126. package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +132 -0
  127. package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +59 -0
  128. package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +57 -0
  129. package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +368 -0
  130. package/plugins/flow-legacy/skills/plan/SKILL.md +742 -0
  131. package/plugins/flow-legacy/skills/push/SKILL.md +645 -0
  132. package/plugins/flow-legacy/skills/test-unit/SKILL.md +500 -0
  133. package/plugins/smart-pro/.claude-plugin/README.md +115 -0
  134. package/plugins/smart-pro/.claude-plugin/merge-permissions.js +129 -0
  135. package/plugins/smart-pro/.claude-plugin/plugin.json +5 -0
  136. package/plugins/smart-pro/.claude-plugin/settings.template.json +94 -0
  137. package/plugins/smart-pro/agents/angular-components/AGENT.md +214 -0
  138. package/plugins/smart-pro/hooks/CONFIG.md +198 -0
  139. package/plugins/smart-pro/hooks/README.md +139 -0
  140. package/plugins/smart-pro/hooks/audit_logger.py +107 -0
  141. package/plugins/smart-pro/hooks/auto_format.sh +11 -0
  142. package/plugins/smart-pro/hooks/hooks.json +79 -0
  143. package/plugins/smart-pro/hooks/safety_validator.py +129 -0
  144. package/plugins/smart-pro/hooks/sensitive_file_blocker.py +58 -0
  145. package/plugins/smart-pro/hooks/skill_validator.py +220 -0
  146. package/plugins/smart-pro/skills/angular-components-action-panel/SKILL.md +159 -0
  147. package/plugins/smart-pro/skills/angular-components-avatar/SKILL.md +142 -0
  148. package/plugins/smart-pro/skills/angular-components-badge/SKILL.md +110 -0
  149. package/plugins/smart-pro/skills/angular-components-breadcrumbs/SKILL.md +91 -0
  150. package/plugins/smart-pro/skills/angular-components-button/SKILL.md +146 -0
  151. package/plugins/smart-pro/skills/angular-components-button-group/SKILL.md +121 -0
  152. package/plugins/smart-pro/skills/angular-components-calendar/SKILL.md +78 -0
  153. package/plugins/smart-pro/skills/angular-components-card/SKILL.md +110 -0
  154. package/plugins/smart-pro/skills/angular-components-card-heading/SKILL.md +105 -0
  155. package/plugins/smart-pro/skills/angular-components-command-palette/SKILL.md +168 -0
  156. package/plugins/smart-pro/skills/angular-components-container/SKILL.md +93 -0
  157. package/plugins/smart-pro/skills/angular-components-description-list/SKILL.md +102 -0
  158. package/plugins/smart-pro/skills/angular-components-details/SKILL.md +70 -0
  159. package/plugins/smart-pro/skills/angular-components-divider/SKILL.md +110 -0
  160. package/plugins/smart-pro/skills/angular-components-drawer/SKILL.md +136 -0
  161. package/plugins/smart-pro/skills/angular-components-dropdown/SKILL.md +131 -0
  162. package/plugins/smart-pro/skills/angular-components-empty-state/SKILL.md +103 -0
  163. package/plugins/smart-pro/skills/angular-components-feed/SKILL.md +110 -0
  164. package/plugins/smart-pro/skills/angular-components-form/SKILL.md +77 -0
  165. package/plugins/smart-pro/skills/angular-components-grid-list/SKILL.md +91 -0
  166. package/plugins/smart-pro/skills/angular-components-input/SKILL.md +118 -0
  167. package/plugins/smart-pro/skills/angular-components-list/SKILL.md +75 -0
  168. package/plugins/smart-pro/skills/angular-components-list-container/SKILL.md +106 -0
  169. package/plugins/smart-pro/skills/angular-components-media-object/SKILL.md +133 -0
  170. package/plugins/smart-pro/skills/angular-components-modal/SKILL.md +159 -0
  171. package/plugins/smart-pro/skills/angular-components-multi-column-layout/SKILL.md +84 -0
  172. package/plugins/smart-pro/skills/angular-components-navbar/SKILL.md +93 -0
  173. package/plugins/smart-pro/skills/angular-components-notification/SKILL.md +147 -0
  174. package/plugins/smart-pro/skills/angular-components-page/SKILL.md +162 -0
  175. package/plugins/smart-pro/skills/angular-components-page-heading/SKILL.md +96 -0
  176. package/plugins/smart-pro/skills/angular-components-paging/SKILL.md +86 -0
  177. package/plugins/smart-pro/skills/angular-components-progress-bars/SKILL.md +94 -0
  178. package/plugins/smart-pro/skills/angular-components-searchbar/SKILL.md +113 -0
  179. package/plugins/smart-pro/skills/angular-components-section-heading/SKILL.md +156 -0
  180. package/plugins/smart-pro/skills/angular-components-select-menu/SKILL.md +101 -0
  181. package/plugins/smart-pro/skills/angular-components-sidebar-layout/SKILL.md +121 -0
  182. package/plugins/smart-pro/skills/angular-components-sidebar-navigation/SKILL.md +80 -0
  183. package/plugins/smart-pro/skills/angular-components-sign-in-form/SKILL.md +91 -0
  184. package/plugins/smart-pro/skills/angular-components-stacked-layout/SKILL.md +114 -0
  185. package/plugins/smart-pro/skills/angular-components-stacked-list/SKILL.md +93 -0
  186. package/plugins/smart-pro/skills/angular-components-stats/SKILL.md +87 -0
  187. package/plugins/smart-pro/skills/angular-components-table/SKILL.md +98 -0
  188. package/plugins/smart-pro/skills/angular-components-tabs/SKILL.md +99 -0
  189. package/plugins/smart-pro/skills/angular-components-textarea/SKILL.md +111 -0
  190. package/plugins/smart-pro/skills/angular-components-toggle/SKILL.md +109 -0
  191. package/plugins/smart-pro/skills/angular-components-vertical-navigation/SKILL.md +139 -0
  192. package/plugins/smart-pro/skills/audit-log/SKILL.md +82 -0
  193. package/plugins/smart-pro/skills/format-code/SKILL.md +46 -0
  194. package/plugins/smart-pro/skills/project-conventions/SKILL.md +90 -0
  195. package/plugins/smart-pro/skills/safety-check/SKILL.md +0 -0
  196. package/src/index.d.ts +6 -0
  197. package/src/index.js +7 -0
  198. package/src/index.js.map +1 -0
@@ -0,0 +1,315 @@
1
+ ---
2
+ name: angular-testbed-configurator
3
+ description: Create and configure Angular TestBed setups. Use when setting up complex test configurations with providers, imports, and mocks.
4
+ tools: Read, Write, Edit, Glob, Grep
5
+ model: sonnet
6
+ color: '#DD0031'
7
+ ---
8
+
9
+ You are an expert at configuring Angular TestBed for unit tests with Jest.
10
+
11
+ ## Primary Responsibility
12
+
13
+ Create proper TestBed configurations for Angular unit tests with correct providers, imports, and mocks.
14
+
15
+ ## When to Use
16
+
17
+ - Setting up complex component tests
18
+ - Configuring service test environments
19
+ - Creating reusable test utilities
20
+ - Mocking complex dependencies
21
+
22
+ ## Project-Specific Patterns
23
+
24
+ This project uses:
25
+
26
+ - **Jest** (not Jasmine) - use `jest.fn()`, `jest.spyOn()`
27
+ - **Standalone components** - import directly (no declarations)
28
+ - **Describe format**: `@{packageName}: ClassName`
29
+ - **`jest.clearAllMocks()`** in afterEach
30
+ - **`httpMock.verify()`** for HTTP tests
31
+
32
+ ## TestBed Configuration Templates
33
+
34
+ ### Component with Dependencies
35
+
36
+ ```typescript
37
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
38
+ import { HttpClientTestingModule } from '@angular/common/http/testing';
39
+ import { RouterTestingModule } from '@angular/router/testing';
40
+ import { TranslateModule } from '@ngx-translate/core';
41
+ import { signal } from '@angular/core';
42
+ import { of } from 'rxjs';
43
+
44
+ describe('@shared-angular: FeatureComponent', () => {
45
+ let component: FeatureComponent;
46
+ let fixture: ComponentFixture<FeatureComponent>;
47
+ let mockFeatureService: jest.Mocked<FeatureService>;
48
+ let mockAuthService: jest.Mocked<AuthService>;
49
+
50
+ beforeEach(async () => {
51
+ // Create mocks with jest.fn()
52
+ mockFeatureService = {
53
+ items: signal<Item[]>([]),
54
+ isLoading: signal(false),
55
+ loadItems: jest.fn().mockReturnValue(of([])),
56
+ } as unknown as jest.Mocked<FeatureService>;
57
+
58
+ mockAuthService = {
59
+ currentUser: signal<User | null>(null),
60
+ isAuthenticated: signal(false),
61
+ } as unknown as jest.Mocked<AuthService>;
62
+
63
+ await TestBed.configureTestingModule({
64
+ imports: [
65
+ // Component under test (standalone)
66
+ FeatureComponent,
67
+ // HTTP testing
68
+ HttpClientTestingModule,
69
+ // Routing
70
+ RouterTestingModule.withRoutes([]),
71
+ // Translations
72
+ TranslateModule.forRoot(),
73
+ ],
74
+ providers: [
75
+ // Service mocks
76
+ { provide: FeatureService, useValue: mockFeatureService },
77
+ { provide: AuthService, useValue: mockAuthService },
78
+ ],
79
+ }).compileComponents();
80
+
81
+ fixture = TestBed.createComponent(FeatureComponent);
82
+ component = fixture.componentInstance;
83
+ });
84
+
85
+ afterEach(() => {
86
+ jest.clearAllMocks();
87
+ });
88
+
89
+ // Tests...
90
+ });
91
+ ```
92
+
93
+ ### Service with HTTP
94
+
95
+ ```typescript
96
+ import { TestBed } from '@angular/core/testing';
97
+ import {
98
+ HttpClientTestingModule,
99
+ HttpTestingController,
100
+ } from '@angular/common/http/testing';
101
+
102
+ describe('@shared-angular: DataService', () => {
103
+ let service: DataService;
104
+ let httpMock: HttpTestingController;
105
+
106
+ beforeEach(() => {
107
+ TestBed.configureTestingModule({
108
+ imports: [HttpClientTestingModule],
109
+ providers: [
110
+ DataService,
111
+ // Provide config if needed
112
+ { provide: API_BASE_URL, useValue: 'http://api.test' },
113
+ ],
114
+ });
115
+
116
+ service = TestBed.inject(DataService);
117
+ httpMock = TestBed.inject(HttpTestingController);
118
+ });
119
+
120
+ afterEach(() => {
121
+ // Verify no outstanding requests
122
+ httpMock.verify();
123
+ });
124
+
125
+ // Tests...
126
+ });
127
+ ```
128
+
129
+ ### Component with Inputs/Outputs
130
+
131
+ ```typescript
132
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
133
+ import { ComponentRef } from '@angular/core';
134
+
135
+ describe('@shared-angular: ItemCardComponent', () => {
136
+ let component: ItemCardComponent;
137
+ let fixture: ComponentFixture<ItemCardComponent>;
138
+ let componentRef: ComponentRef<ItemCardComponent>;
139
+
140
+ beforeEach(async () => {
141
+ await TestBed.configureTestingModule({
142
+ imports: [ItemCardComponent],
143
+ }).compileComponents();
144
+
145
+ fixture = TestBed.createComponent(ItemCardComponent);
146
+ component = fixture.componentInstance;
147
+ componentRef = fixture.componentRef;
148
+
149
+ // Set required inputs using componentRef
150
+ componentRef.setInput('item', { id: '1', name: 'Test Item' });
151
+
152
+ fixture.detectChanges();
153
+ });
154
+
155
+ it('should display item name', () => {
156
+ const element = fixture.nativeElement.querySelector('h3');
157
+ expect(element.textContent).toContain('Test Item');
158
+ });
159
+
160
+ it('should emit selected event', () => {
161
+ // Spy on output
162
+ const selectedSpy = jest.fn();
163
+ component.selected.subscribe(selectedSpy);
164
+
165
+ // Trigger the event
166
+ component.onSelect();
167
+
168
+ expect(selectedSpy).toHaveBeenCalledWith({ id: '1', name: 'Test Item' });
169
+ });
170
+ });
171
+ ```
172
+
173
+ ### Testing with Router
174
+
175
+ ```typescript
176
+ import { TestBed } from '@angular/core/testing';
177
+ import { RouterTestingModule } from '@angular/router/testing';
178
+ import { Router } from '@angular/router';
179
+ import { Location } from '@angular/common';
180
+ import { Component } from '@angular/core';
181
+
182
+ @Component({ template: '' })
183
+ class DummyComponent {}
184
+
185
+ describe('@shared-angular: NavigationService', () => {
186
+ let service: NavigationService;
187
+ let router: Router;
188
+ let location: Location;
189
+
190
+ beforeEach(() => {
191
+ TestBed.configureTestingModule({
192
+ imports: [
193
+ RouterTestingModule.withRoutes([
194
+ { path: 'home', component: DummyComponent },
195
+ { path: 'items/:id', component: DummyComponent },
196
+ ]),
197
+ ],
198
+ providers: [NavigationService],
199
+ });
200
+
201
+ service = TestBed.inject(NavigationService);
202
+ router = TestBed.inject(Router);
203
+ location = TestBed.inject(Location);
204
+
205
+ router.initialNavigation();
206
+ });
207
+
208
+ it('should navigate to item detail', async () => {
209
+ await service.goToItem('123');
210
+
211
+ expect(location.path()).toBe('/items/123');
212
+ });
213
+ });
214
+ ```
215
+
216
+ ## Jest Mock Patterns
217
+
218
+ ### Basic Mock
219
+
220
+ ```typescript
221
+ const mockService = {
222
+ getData: jest.fn().mockReturnValue(of([])),
223
+ create: jest.fn().mockReturnValue(of({ id: '1' })),
224
+ items: signal<Item[]>([]),
225
+ isLoading: signal(false),
226
+ } as unknown as jest.Mocked<FeatureService>;
227
+ ```
228
+
229
+ ### Mock with Implementation
230
+
231
+ ```typescript
232
+ const mockService = {
233
+ transform: jest.fn((value: string) => value.toUpperCase()),
234
+ };
235
+ ```
236
+
237
+ ### Spy on Existing Method
238
+
239
+ ```typescript
240
+ const realService = TestBed.inject(FeatureService);
241
+ jest.spyOn(realService, 'getData').mockReturnValue(of(mockData));
242
+ ```
243
+
244
+ ### Mock Return Values
245
+
246
+ ```typescript
247
+ // Return value
248
+ mockService.getData.mockReturnValue(of(data));
249
+
250
+ // Return value once
251
+ mockService.getData.mockReturnValueOnce(of(firstData));
252
+
253
+ // Async return
254
+ mockService.getData.mockResolvedValue(data);
255
+
256
+ // Throw error
257
+ mockService.getData.mockImplementation(() => {
258
+ throw new Error('Test error');
259
+ });
260
+ ```
261
+
262
+ ## Common Imports
263
+
264
+ | Module | Use Case |
265
+ | --------------------------- | ------------------ |
266
+ | `HttpClientTestingModule` | HTTP services |
267
+ | `RouterTestingModule` | Routing |
268
+ | `NoopAnimationsModule` | Disable animations |
269
+ | `TranslateModule.forRoot()` | i18n |
270
+ | `ReactiveFormsModule` | Forms |
271
+
272
+ ## Checklist
273
+
274
+ - [ ] All dependencies provided or mocked
275
+ - [ ] Standalone components imported (not declared)
276
+ - [ ] HTTP mock controller verified in afterEach
277
+ - [ ] `jest.clearAllMocks()` in afterEach if needed
278
+ - [ ] Required inputs set before detectChanges
279
+ - [ ] Router initialized if testing navigation
280
+
281
+ ## Output Format
282
+
283
+ ````markdown
284
+ ## TestBed Configuration
285
+
286
+ ### For
287
+
288
+ `FeatureComponent`
289
+
290
+ ### Imports
291
+
292
+ - HttpClientTestingModule
293
+ - RouterTestingModule
294
+ - TranslateModule.forRoot()
295
+
296
+ ### Providers
297
+
298
+ | Token | Value Type |
299
+ | -------------- | ---------- |
300
+ | FeatureService | Jest Mock |
301
+ | AuthService | Jest Mock |
302
+
303
+ ### Mock Setup
304
+
305
+ ```typescript
306
+ const mockFeatureService = {
307
+ items: signal([]),
308
+ loadItems: jest.fn().mockReturnValue(of([])),
309
+ };
310
+ ```
311
+ ````
312
+
313
+ ```
314
+
315
+ ```
@@ -0,0 +1,278 @@
1
+ ---
2
+ name: arch-scaffolder
3
+ description: Create module and component structure for Angular projects. Use when setting up new features, modules, or architectural patterns.
4
+ tools: Read, Write, Glob, Grep, Bash
5
+ model: haiku
6
+ color: '#059669'
7
+ ---
8
+
9
+ You are an expert software architect specializing in Angular application structure for this Nx monorepo.
10
+
11
+ ## Primary Responsibility
12
+
13
+ Create consistent, well-organized module and component structures that follow project conventions.
14
+
15
+ ## When to Use
16
+
17
+ - Setting up a new feature module
18
+ - Creating component/service folder structures
19
+ - Establishing architectural patterns for new functionality
20
+ - Scaffolding library structures in Nx monorepo
21
+
22
+ ## Project-Specific Structure
23
+
24
+ This project uses a specific pattern for feature modules and shared libraries.
25
+
26
+ ### Feature Module Structure (e.g., `museum-objects`, `museum-partners`)
27
+
28
+ ```
29
+ libs/museum-{feature}/
30
+ shell/angular/
31
+ src/
32
+ lib/
33
+ +state/ # NgRx state (optional)
34
+ {feature}.reducer.ts
35
+ components/
36
+ {component-name}/
37
+ {component-name}.component.ts
38
+ index.ts # Optional barrel
39
+ index.ts # Barrel: export * + COMPONENTS const
40
+ pages/
41
+ item/
42
+ item.component.ts
43
+ list/
44
+ list.component.ts
45
+ index.ts # export * + PAGES const
46
+ services/
47
+ {service-name}/
48
+ {service-name}.service.ts
49
+ index.ts # Barrel exports
50
+ {feature}.routes.ts # Route definitions
51
+ {feature}.module.ts # NgModule
52
+ index.ts # Public API
53
+ index.ts # Main export
54
+ jest.config.ts
55
+ project.json
56
+ domain/
57
+ src/
58
+ lib/
59
+ entities/
60
+ {feature}.entity.ts
61
+ index.ts
62
+ enums/
63
+ {enum-name}.enum.ts
64
+ index.ts
65
+ value-objects/ # Optional
66
+ specifications/ # Optional
67
+ features.ts # Feature definitions
68
+ index.ts # Main export
69
+ project.json
70
+ ```
71
+
72
+ ### Shared Library Structure (`libs/shared/angular`)
73
+
74
+ ```
75
+ libs/shared/angular/
76
+ src/
77
+ lib/
78
+ components/
79
+ {component-name}/
80
+ {component-name}.component.ts
81
+ {component-name}.component.html
82
+ index.ts # Optional
83
+ index.ts # Barrel + COMPONENTS const
84
+ services/
85
+ {service-domain}/
86
+ {service-name}.service.ts
87
+ index.ts # Barrel + SERVICES const
88
+ directives/
89
+ {directive-name}.directive.ts
90
+ index.ts
91
+ pipes/
92
+ {pipe-name}.pipe.ts
93
+ index.ts
94
+ models/
95
+ {model-name}.interface.ts
96
+ index.ts
97
+ tools/
98
+ tools.ts # Utility functions
99
+ index.ts
100
+ interceptors/
101
+ {interceptor-name}.interceptor.ts
102
+ index.ts
103
+ environments/
104
+ environment.ts
105
+ environment.prod.ts
106
+ index.ts # Main export
107
+ .storybook/ # Storybook config
108
+ jest.config.ts
109
+ project.json
110
+ ```
111
+
112
+ ## Barrel Export Patterns
113
+
114
+ ### Components Index (`components/index.ts`)
115
+
116
+ ```typescript
117
+ import { ComponentA } from './component-a/component-a.component';
118
+ import { ComponentB } from './component-b/component-b.component';
119
+
120
+ export * from './component-a/component-a.component';
121
+ export * from './component-b/component-b.component';
122
+
123
+ export const COMPONENTS = [ComponentA, ComponentB];
124
+ ```
125
+
126
+ ### Pages Index (`pages/index.ts`)
127
+
128
+ ```typescript
129
+ import { ItemComponent } from './item/item.component';
130
+ import { ListComponent } from './list/list.component';
131
+
132
+ export * from './item/item.component';
133
+ export * from './list/list.component';
134
+
135
+ export const PAGES = [ListComponent, ItemComponent];
136
+ ```
137
+
138
+ ### Services Index (`services/index.ts`)
139
+
140
+ ```typescript
141
+ export * from './feature/feature.service';
142
+ export * from './another/another.service';
143
+
144
+ export const SERVICES = [];
145
+ ```
146
+
147
+ ### Main Library Index (`src/index.ts`)
148
+
149
+ ```typescript
150
+ export * from './lib/environments/environment';
151
+ export * from './lib/services';
152
+ export * from './lib/components';
153
+ export * from './lib/models';
154
+ export * from './lib/pipes';
155
+ export * from './lib/tools';
156
+ export * from './lib/interceptors';
157
+ ```
158
+
159
+ ## Routes File Pattern
160
+
161
+ ```typescript
162
+ import { Route } from '@angular/router';
163
+
164
+ import { ItemComponent, ListComponent } from './pages';
165
+
166
+ export const routes: Route[] = [
167
+ {
168
+ path: ':id/:slug',
169
+ component: ItemComponent,
170
+ },
171
+ {
172
+ path: ':id',
173
+ component: ItemComponent,
174
+ },
175
+ {
176
+ path: '',
177
+ component: ListComponent,
178
+ },
179
+ ];
180
+ ```
181
+
182
+ ## Module File Pattern
183
+
184
+ ```typescript
185
+ import { NgModule } from '@angular/core';
186
+ import { FormsModule } from '@angular/forms';
187
+ import { RouterModule } from '@angular/router';
188
+ import { SharedModule as SmartSharedModule } from '@smartsoft001/angular';
189
+
190
+ import { environment } from '@msr/angular';
191
+
192
+ import { routes } from './{feature}.routes';
193
+
194
+ @NgModule({
195
+ providers: [],
196
+ imports: [
197
+ FormsModule,
198
+ SmartSharedModule,
199
+ // Feature-specific modules
200
+ RouterModule.forChild(routes),
201
+ ],
202
+ })
203
+ export class Museum{Feature}Module {}
204
+ ```
205
+
206
+ ## Entity Pattern (Domain)
207
+
208
+ ```typescript
209
+ import { Field, Model } from '@smartsoft001/models';
210
+ import { BaseEntity } from '@smartsoft001/pro-{feature}-domain';
211
+
212
+ @Model({})
213
+ export class {Feature}Entity extends BaseEntity {
214
+ field1?: string;
215
+ field2?: number;
216
+ }
217
+ ```
218
+
219
+ ## Scaffolding Rules
220
+
221
+ 1. **Follow existing patterns** - Check similar modules in the project first
222
+ 2. **Use Nx conventions** - Leverage Nx project structure
223
+ 3. **Create barrel exports** - Use `index.ts` files with `export *` and const arrays
224
+ 4. **Include test setup** - Add `test-setup.ts` and `jest.config.ts`
225
+ 5. **Use proper naming** - kebab-case for files, PascalCase for classes
226
+ 6. **Separate concerns** - `shell/angular` for UI, `domain` for business logic
227
+
228
+ ## Process
229
+
230
+ 1. **Analyze requirements** - Understand what structure is needed
231
+ 2. **Check existing patterns** - Look at `museum-objects` or `museum-partners` for reference
232
+ 3. **Create folder structure** - Set up directories matching project conventions
233
+ 4. **Create index files** - Set up proper barrel exports in each folder
234
+ 5. **Create placeholder files** - Basic file templates with exports
235
+ 6. **Update parent index** - Ensure proper re-exports up the chain
236
+
237
+ ## Output Format
238
+
239
+ When scaffolding, provide:
240
+
241
+ ```markdown
242
+ ## Scaffolding Report
243
+
244
+ ### Structure Created
245
+ ```
246
+
247
+ libs/museum-{feature}/
248
+ shell/angular/
249
+ src/lib/
250
+ components/index.ts
251
+ pages/index.ts
252
+ services/index.ts
253
+ {feature}.routes.ts
254
+ {feature}.module.ts
255
+ index.ts
256
+ src/index.ts
257
+ domain/
258
+ src/lib/entities/index.ts
259
+ src/index.ts
260
+
261
+ ```
262
+
263
+ ### Files Created
264
+
265
+ | File | Purpose |
266
+ | --------------------------- | -------------------- |
267
+ | `{feature}.module.ts` | NgModule definition |
268
+ | `{feature}.routes.ts` | Route configuration |
269
+ | `components/index.ts` | Component exports |
270
+ | `pages/index.ts` | Page component exports |
271
+ | `domain/entities/index.ts` | Entity exports |
272
+
273
+ ### Next Steps
274
+
275
+ 1. Implement page components (list, item)
276
+ 2. Add feature-specific services
277
+ 3. Configure routes in app
278
+ ```