agentic-team-templates 0.3.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.
- package/README.md +280 -0
- package/bin/cli.js +5 -0
- package/package.json +47 -0
- package/src/index.js +521 -0
- package/templates/_shared/code-quality.md +162 -0
- package/templates/_shared/communication.md +114 -0
- package/templates/_shared/core-principles.md +62 -0
- package/templates/_shared/git-workflow.md +165 -0
- package/templates/_shared/security-fundamentals.md +173 -0
- package/templates/blockchain/.cursorrules/defi-patterns.md +520 -0
- package/templates/blockchain/.cursorrules/gas-optimization.md +339 -0
- package/templates/blockchain/.cursorrules/overview.md +130 -0
- package/templates/blockchain/.cursorrules/security.md +318 -0
- package/templates/blockchain/.cursorrules/smart-contracts.md +364 -0
- package/templates/blockchain/.cursorrules/testing.md +415 -0
- package/templates/blockchain/.cursorrules/web3-integration.md +538 -0
- package/templates/blockchain/CLAUDE.md +389 -0
- package/templates/cli-tools/.cursorrules/architecture.md +412 -0
- package/templates/cli-tools/.cursorrules/arguments.md +406 -0
- package/templates/cli-tools/.cursorrules/distribution.md +546 -0
- package/templates/cli-tools/.cursorrules/error-handling.md +455 -0
- package/templates/cli-tools/.cursorrules/overview.md +136 -0
- package/templates/cli-tools/.cursorrules/testing.md +537 -0
- package/templates/cli-tools/.cursorrules/user-experience.md +545 -0
- package/templates/cli-tools/CLAUDE.md +356 -0
- package/templates/data-engineering/.cursorrules/data-modeling.md +367 -0
- package/templates/data-engineering/.cursorrules/data-quality.md +455 -0
- package/templates/data-engineering/.cursorrules/overview.md +85 -0
- package/templates/data-engineering/.cursorrules/performance.md +339 -0
- package/templates/data-engineering/.cursorrules/pipeline-design.md +280 -0
- package/templates/data-engineering/.cursorrules/security.md +460 -0
- package/templates/data-engineering/.cursorrules/testing.md +452 -0
- package/templates/data-engineering/CLAUDE.md +974 -0
- package/templates/devops-sre/.cursorrules/capacity-planning.md +653 -0
- package/templates/devops-sre/.cursorrules/change-management.md +584 -0
- package/templates/devops-sre/.cursorrules/chaos-engineering.md +651 -0
- package/templates/devops-sre/.cursorrules/disaster-recovery.md +641 -0
- package/templates/devops-sre/.cursorrules/incident-management.md +565 -0
- package/templates/devops-sre/.cursorrules/observability.md +714 -0
- package/templates/devops-sre/.cursorrules/overview.md +230 -0
- package/templates/devops-sre/.cursorrules/postmortems.md +588 -0
- package/templates/devops-sre/.cursorrules/runbooks.md +760 -0
- package/templates/devops-sre/.cursorrules/slo-sli.md +617 -0
- package/templates/devops-sre/.cursorrules/toil-reduction.md +567 -0
- package/templates/devops-sre/CLAUDE.md +1007 -0
- package/templates/documentation/.cursorrules/adr.md +277 -0
- package/templates/documentation/.cursorrules/api-documentation.md +411 -0
- package/templates/documentation/.cursorrules/code-comments.md +253 -0
- package/templates/documentation/.cursorrules/maintenance.md +260 -0
- package/templates/documentation/.cursorrules/overview.md +82 -0
- package/templates/documentation/.cursorrules/readme-standards.md +306 -0
- package/templates/documentation/CLAUDE.md +120 -0
- package/templates/fullstack/.cursorrules/api-contracts.md +331 -0
- package/templates/fullstack/.cursorrules/architecture.md +298 -0
- package/templates/fullstack/.cursorrules/overview.md +109 -0
- package/templates/fullstack/.cursorrules/shared-types.md +348 -0
- package/templates/fullstack/.cursorrules/testing.md +386 -0
- package/templates/fullstack/CLAUDE.md +349 -0
- package/templates/ml-ai/.cursorrules/data-engineering.md +483 -0
- package/templates/ml-ai/.cursorrules/deployment.md +601 -0
- package/templates/ml-ai/.cursorrules/model-development.md +538 -0
- package/templates/ml-ai/.cursorrules/monitoring.md +658 -0
- package/templates/ml-ai/.cursorrules/overview.md +131 -0
- package/templates/ml-ai/.cursorrules/security.md +637 -0
- package/templates/ml-ai/.cursorrules/testing.md +678 -0
- package/templates/ml-ai/CLAUDE.md +1136 -0
- package/templates/mobile/.cursorrules/navigation.md +246 -0
- package/templates/mobile/.cursorrules/offline-first.md +302 -0
- package/templates/mobile/.cursorrules/overview.md +71 -0
- package/templates/mobile/.cursorrules/performance.md +345 -0
- package/templates/mobile/.cursorrules/testing.md +339 -0
- package/templates/mobile/CLAUDE.md +233 -0
- package/templates/platform-engineering/.cursorrules/ci-cd.md +778 -0
- package/templates/platform-engineering/.cursorrules/developer-experience.md +632 -0
- package/templates/platform-engineering/.cursorrules/infrastructure-as-code.md +600 -0
- package/templates/platform-engineering/.cursorrules/kubernetes.md +710 -0
- package/templates/platform-engineering/.cursorrules/observability.md +747 -0
- package/templates/platform-engineering/.cursorrules/overview.md +215 -0
- package/templates/platform-engineering/.cursorrules/security.md +855 -0
- package/templates/platform-engineering/.cursorrules/testing.md +878 -0
- package/templates/platform-engineering/CLAUDE.md +850 -0
- package/templates/utility-agent/.cursorrules/action-control.md +284 -0
- package/templates/utility-agent/.cursorrules/context-management.md +186 -0
- package/templates/utility-agent/.cursorrules/hallucination-prevention.md +253 -0
- package/templates/utility-agent/.cursorrules/overview.md +78 -0
- package/templates/utility-agent/.cursorrules/token-optimization.md +369 -0
- package/templates/utility-agent/CLAUDE.md +513 -0
- package/templates/web-backend/.cursorrules/api-design.md +255 -0
- package/templates/web-backend/.cursorrules/authentication.md +309 -0
- package/templates/web-backend/.cursorrules/database-patterns.md +298 -0
- package/templates/web-backend/.cursorrules/error-handling.md +366 -0
- package/templates/web-backend/.cursorrules/overview.md +69 -0
- package/templates/web-backend/.cursorrules/security.md +358 -0
- package/templates/web-backend/.cursorrules/testing.md +395 -0
- package/templates/web-backend/CLAUDE.md +366 -0
- package/templates/web-frontend/.cursorrules/accessibility.md +296 -0
- package/templates/web-frontend/.cursorrules/component-patterns.md +204 -0
- package/templates/web-frontend/.cursorrules/overview.md +72 -0
- package/templates/web-frontend/.cursorrules/performance.md +325 -0
- package/templates/web-frontend/.cursorrules/state-management.md +227 -0
- package/templates/web-frontend/.cursorrules/styling.md +271 -0
- package/templates/web-frontend/.cursorrules/testing.md +311 -0
- package/templates/web-frontend/CLAUDE.md +399 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Mobile Development Guide
|
|
2
|
+
|
|
3
|
+
Comprehensive guidelines for building mobile applications.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This guide applies to:
|
|
10
|
+
- React Native applications
|
|
11
|
+
- Flutter applications
|
|
12
|
+
- Native iOS/Android development
|
|
13
|
+
- Cross-platform frameworks
|
|
14
|
+
|
|
15
|
+
### Key Principles
|
|
16
|
+
|
|
17
|
+
1. **Mobile-First UX** - Design for touch and small screens
|
|
18
|
+
2. **Performance** - 60fps animations, fast startup
|
|
19
|
+
3. **Offline-First** - Work without network
|
|
20
|
+
4. **Platform Conventions** - Respect platform guidelines
|
|
21
|
+
|
|
22
|
+
### Project Structure
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
src/
|
|
26
|
+
├── components/ # Reusable UI components
|
|
27
|
+
├── screens/ # Screen components
|
|
28
|
+
├── navigation/ # Navigation configuration
|
|
29
|
+
├── hooks/ # Custom hooks
|
|
30
|
+
├── services/ # API and native services
|
|
31
|
+
├── store/ # State management
|
|
32
|
+
├── utils/ # Utilities
|
|
33
|
+
└── types/ # TypeScript definitions
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Navigation
|
|
39
|
+
|
|
40
|
+
### Stack Navigation
|
|
41
|
+
```tsx
|
|
42
|
+
<Stack.Navigator>
|
|
43
|
+
<Stack.Screen name="Home" component={HomeScreen} />
|
|
44
|
+
<Stack.Screen name="Details" component={DetailsScreen} />
|
|
45
|
+
</Stack.Navigator>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Tab Navigation
|
|
49
|
+
```tsx
|
|
50
|
+
<Tab.Navigator>
|
|
51
|
+
<Tab.Screen name="Home" component={HomeStack} />
|
|
52
|
+
<Tab.Screen name="Profile" component={ProfileStack} />
|
|
53
|
+
</Tab.Navigator>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Type-Safe Navigation
|
|
57
|
+
```tsx
|
|
58
|
+
type RootStackParamList = {
|
|
59
|
+
Home: undefined;
|
|
60
|
+
Details: { id: string };
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
navigation.navigate('Details', { id: '123' });
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Deep Linking
|
|
67
|
+
```tsx
|
|
68
|
+
const linking = {
|
|
69
|
+
prefixes: ['myapp://'],
|
|
70
|
+
config: { screens: { Details: 'details/:id' } },
|
|
71
|
+
};
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Offline-First
|
|
77
|
+
|
|
78
|
+
### Local Storage
|
|
79
|
+
- AsyncStorage for simple key-value
|
|
80
|
+
- SQLite/Realm for structured data
|
|
81
|
+
- Cache API responses
|
|
82
|
+
|
|
83
|
+
### Sync Strategy
|
|
84
|
+
```ts
|
|
85
|
+
async function sync() {
|
|
86
|
+
const pending = await db.getPendingChanges();
|
|
87
|
+
for (const change of pending) {
|
|
88
|
+
await api.sync(change);
|
|
89
|
+
await db.markSynced(change.id);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Optimistic Updates
|
|
95
|
+
```tsx
|
|
96
|
+
const updateTask = useMutation({
|
|
97
|
+
mutationFn: api.updateTask,
|
|
98
|
+
onMutate: async (newTask) => {
|
|
99
|
+
queryClient.setQueryData(['tasks'], (old) =>
|
|
100
|
+
old.map((t) => (t.id === newTask.id ? newTask : t))
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
onError: (err, newTask, context) => {
|
|
104
|
+
queryClient.setQueryData(['tasks'], context.previousTasks);
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Network Status
|
|
110
|
+
```tsx
|
|
111
|
+
const { isOnline } = useNetworkStatus();
|
|
112
|
+
if (!isOnline) return <OfflineBanner />;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Performance
|
|
118
|
+
|
|
119
|
+
### List Optimization
|
|
120
|
+
```tsx
|
|
121
|
+
<FlatList
|
|
122
|
+
data={items}
|
|
123
|
+
renderItem={renderItem}
|
|
124
|
+
keyExtractor={keyExtractor}
|
|
125
|
+
removeClippedSubviews={true}
|
|
126
|
+
maxToRenderPerBatch={10}
|
|
127
|
+
windowSize={5}
|
|
128
|
+
getItemLayout={(_, index) => ({
|
|
129
|
+
length: ITEM_HEIGHT,
|
|
130
|
+
offset: ITEM_HEIGHT * index,
|
|
131
|
+
index,
|
|
132
|
+
})}
|
|
133
|
+
/>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Memoization
|
|
137
|
+
```tsx
|
|
138
|
+
const MemoizedItem = memo(({ item }) => <ItemView item={item} />);
|
|
139
|
+
const sortedData = useMemo(() => data.sort(...), [data]);
|
|
140
|
+
const handlePress = useCallback(() => onPress(id), [id]);
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Animations
|
|
144
|
+
```tsx
|
|
145
|
+
Animated.timing(value, {
|
|
146
|
+
toValue: 1,
|
|
147
|
+
duration: 300,
|
|
148
|
+
useNativeDriver: true, // Key for performance
|
|
149
|
+
}).start();
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Startup
|
|
153
|
+
```tsx
|
|
154
|
+
InteractionManager.runAfterInteractions(() => {
|
|
155
|
+
// Defer non-critical initialization
|
|
156
|
+
initializeAnalytics();
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Testing
|
|
163
|
+
|
|
164
|
+
### Unit Tests
|
|
165
|
+
```ts
|
|
166
|
+
describe('formatCurrency', () => {
|
|
167
|
+
it('formats correctly', () => {
|
|
168
|
+
expect(formatCurrency(1234.56, 'USD')).toBe('$1,234.56');
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Component Tests
|
|
174
|
+
```tsx
|
|
175
|
+
it('calls onPress when pressed', () => {
|
|
176
|
+
const onPress = jest.fn();
|
|
177
|
+
const { getByText } = render(<Button label="Submit" onPress={onPress} />);
|
|
178
|
+
fireEvent.press(getByText('Submit'));
|
|
179
|
+
expect(onPress).toHaveBeenCalled();
|
|
180
|
+
});
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### E2E Tests (Detox)
|
|
184
|
+
```ts
|
|
185
|
+
it('should login successfully', async () => {
|
|
186
|
+
await element(by.id('email-input')).typeText('test@example.com');
|
|
187
|
+
await element(by.id('password-input')).typeText('password123');
|
|
188
|
+
await element(by.id('login-button')).tap();
|
|
189
|
+
await expect(element(by.id('home-screen'))).toBeVisible();
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Native Features
|
|
196
|
+
|
|
197
|
+
### Permissions
|
|
198
|
+
```tsx
|
|
199
|
+
const status = await requestCameraPermission();
|
|
200
|
+
if (status !== 'granted') {
|
|
201
|
+
showPermissionDeniedMessage();
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Platform-Specific Code
|
|
207
|
+
```tsx
|
|
208
|
+
import { Platform } from 'react-native';
|
|
209
|
+
|
|
210
|
+
const styles = StyleSheet.create({
|
|
211
|
+
container: {
|
|
212
|
+
paddingTop: Platform.OS === 'ios' ? 44 : 0,
|
|
213
|
+
},
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Or use Platform.select
|
|
217
|
+
const padding = Platform.select({ ios: 44, android: 0 });
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Definition of Done
|
|
223
|
+
|
|
224
|
+
A mobile feature is complete when:
|
|
225
|
+
|
|
226
|
+
- [ ] Works on both platforms (if cross-platform)
|
|
227
|
+
- [ ] Handles offline gracefully
|
|
228
|
+
- [ ] Animations run at 60fps
|
|
229
|
+
- [ ] Accessible (screen readers, dynamic type)
|
|
230
|
+
- [ ] Tests pass on device/simulator
|
|
231
|
+
- [ ] No memory leaks
|
|
232
|
+
- [ ] Handles permissions correctly
|
|
233
|
+
- [ ] Code reviewed and approved
|