@enki-dev-expert/global-engineering-standards 0.0.0-stage → 0.1.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/AGENTS.md +303 -0
- package/CHANGELOG.md +23 -0
- package/CITATION.cff +21 -0
- package/CODE_OF_CONDUCT.md +13 -0
- package/CONTRIBUTING.md +27 -0
- package/LICENSE +21 -0
- package/README.md +159 -2
- package/SECURITY.md +25 -0
- package/dist/cli.js +40 -0
- package/dist/content.js +71 -0
- package/dist/filesystem.js +83 -0
- package/dist/installer.js +243 -0
- package/dist/layout.js +42 -0
- package/dist/transaction.js +143 -0
- package/docs/ai-and-llm.md +1312 -0
- package/docs/architecture.md +1007 -0
- package/docs/cost-engineering.md +1322 -0
- package/docs/data.md +993 -0
- package/docs/governance.md +1744 -0
- package/docs/mobile-and-web.md +1362 -0
- package/docs/observability.md +1345 -0
- package/docs/platforms-and-applications.md +1581 -0
- package/docs/privacy.md +566 -0
- package/docs/quality-and-testing.md +1278 -0
- package/docs/scalability.md +1012 -0
- package/docs/security.md +373 -0
- package/handbook/claude-plugin.md +31 -0
- package/handbook/compatibility.md +27 -0
- package/handbook/recovery.md +29 -0
- package/handbook/releasing.md +50 -0
- package/handbook/security-review.md +41 -0
- package/handbook/signing.md +18 -0
- package/handbook/validation.md +50 -0
- package/package.json +65 -4
- package/scripts/content-baseline.json +25 -0
- package/skills/engineering-architecture-review/SKILL.md +1531 -0
- package/skills/engineering-cost-estimate/SKILL.md +1599 -0
- package/skills/engineering-database-review/SKILL.md +1364 -0
- package/skills/engineering-privacy-check/SKILL.md +1295 -0
- package/skills/engineering-safe-implementation/SKILL.md +1502 -0
- package/skills/engineering-security-standards-check/SKILL.md +1112 -0
- package/src/cli.ts +45 -0
- package/src/content.ts +82 -0
- package/src/filesystem.ts +94 -0
- package/src/installer.ts +280 -0
- package/src/layout.ts +70 -0
- package/src/transaction.ts +167 -0
- package/templates/ADR.md +1302 -0
- package/templates/AUDIT_REPORT.md +1693 -0
- package/templates/EXCEPTIONS.md +647 -0
- package/templates/PROJECT_AGENTS.md +868 -0
|
@@ -0,0 +1,1531 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: engineering-architecture-review
|
|
3
|
+
description: Design, assess, document and improve software architecture using the Global Engineering Standards. Use for architecture reviews, technology selection, modular systems, monoliths, microservices, cloud architecture, AWS, Azure, GCP, serverless, Kubernetes, distributed systems, API design, scalability, security, reliability, portability, architecture decisions and autonomous application development.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Engineering Architecture Review
|
|
7
|
+
|
|
8
|
+
## 1. Purpose
|
|
9
|
+
|
|
10
|
+
Provide a systematic and evidence-based workflow for software architecture design, assessment and improvement.
|
|
11
|
+
|
|
12
|
+
This skill supports:
|
|
13
|
+
|
|
14
|
+
- New application architecture.
|
|
15
|
+
- Existing application architecture audits.
|
|
16
|
+
- Technology stack selection.
|
|
17
|
+
- Modular monolithic applications.
|
|
18
|
+
- Microservices and distributed systems.
|
|
19
|
+
- Event-driven architecture.
|
|
20
|
+
- Serverless architecture.
|
|
21
|
+
- Cloud infrastructure.
|
|
22
|
+
- Containerization.
|
|
23
|
+
- Kubernetes.
|
|
24
|
+
- Web applications.
|
|
25
|
+
- Mobile applications.
|
|
26
|
+
- Desktop and native software.
|
|
27
|
+
- Game architecture.
|
|
28
|
+
- AI and agentic systems.
|
|
29
|
+
- Database integration.
|
|
30
|
+
- Scalability planning.
|
|
31
|
+
- Reliability engineering.
|
|
32
|
+
- Security and privacy architecture.
|
|
33
|
+
- Architecture Decision Records.
|
|
34
|
+
- Architecture modernization.
|
|
35
|
+
- Cost-efficient technical evolution.
|
|
36
|
+
|
|
37
|
+
The objective is to create maintainable, secure, reliable and scalable systems without introducing unnecessary complexity.
|
|
38
|
+
|
|
39
|
+
Architecture must serve verified requirements rather than technological trends.
|
|
40
|
+
|
|
41
|
+
## 2. Global Engineering Standards
|
|
42
|
+
|
|
43
|
+
The Global Engineering Standards repository is located at:
|
|
44
|
+
|
|
45
|
+
~/engineering-standards/
|
|
46
|
+
|
|
47
|
+
Primary reference:
|
|
48
|
+
|
|
49
|
+
~/engineering-standards/docs/architecture.md
|
|
50
|
+
|
|
51
|
+
Additional references when relevant:
|
|
52
|
+
|
|
53
|
+
- docs/governance.md
|
|
54
|
+
- docs/security.md
|
|
55
|
+
- docs/privacy.md
|
|
56
|
+
- docs/data.md
|
|
57
|
+
- docs/scalability.md
|
|
58
|
+
- docs/cost-engineering.md
|
|
59
|
+
- docs/ai-and-llm.md
|
|
60
|
+
- docs/quality-and-testing.md
|
|
61
|
+
- docs/observability.md
|
|
62
|
+
- docs/mobile-and-web.md
|
|
63
|
+
- docs/platforms-and-applications.md
|
|
64
|
+
|
|
65
|
+
Resolve relative references against the engineering-standards repository.
|
|
66
|
+
|
|
67
|
+
Apply relevant standards according to project context.
|
|
68
|
+
|
|
69
|
+
Avoid loading every document unnecessarily.
|
|
70
|
+
|
|
71
|
+
## 3. When to Use This Skill
|
|
72
|
+
|
|
73
|
+
Use when:
|
|
74
|
+
|
|
75
|
+
- Starting a new software project.
|
|
76
|
+
- Designing a complete application.
|
|
77
|
+
- Selecting a technology stack.
|
|
78
|
+
- Reviewing existing architecture.
|
|
79
|
+
- Planning significant new features.
|
|
80
|
+
- Evaluating scaling strategies.
|
|
81
|
+
- Comparing infrastructure providers.
|
|
82
|
+
- Considering microservices.
|
|
83
|
+
- Evaluating Kubernetes.
|
|
84
|
+
- Designing system integrations.
|
|
85
|
+
- Modernizing legacy applications.
|
|
86
|
+
- Designing complex AI systems.
|
|
87
|
+
- Evaluating architectural technical debt.
|
|
88
|
+
- Planning migrations.
|
|
89
|
+
- Preparing for significant growth.
|
|
90
|
+
|
|
91
|
+
Use during Autonomous Build Mode when major architectural decisions are required.
|
|
92
|
+
|
|
93
|
+
Do not require a formal architecture review for trivial changes.
|
|
94
|
+
|
|
95
|
+
## 4. Operating Modes
|
|
96
|
+
|
|
97
|
+
Support:
|
|
98
|
+
|
|
99
|
+
- Supervised Mode.
|
|
100
|
+
- Autonomous Build Mode.
|
|
101
|
+
|
|
102
|
+
Supervised Mode is the default.
|
|
103
|
+
|
|
104
|
+
Autonomous Build Mode requires explicit authorization.
|
|
105
|
+
|
|
106
|
+
Both modes must apply the same engineering quality requirements.
|
|
107
|
+
|
|
108
|
+
Consult docs/governance.md.
|
|
109
|
+
|
|
110
|
+
Autonomy changes the approval workflow, not security, privacy, scalability or reliability expectations.
|
|
111
|
+
|
|
112
|
+
## 5. Supervised Mode
|
|
113
|
+
|
|
114
|
+
For significant architecture work:
|
|
115
|
+
|
|
116
|
+
1. Identify the authorized scope.
|
|
117
|
+
2. Inspect the existing system.
|
|
118
|
+
3. Identify business requirements.
|
|
119
|
+
4. Evaluate technical constraints.
|
|
120
|
+
5. Analyze the existing architecture.
|
|
121
|
+
6. Identify confirmed weaknesses.
|
|
122
|
+
7. Compare reasonable alternatives.
|
|
123
|
+
8. Assess risks and costs.
|
|
124
|
+
9. Recommend a justified decision.
|
|
125
|
+
10. Obtain approval before significant changes.
|
|
126
|
+
11. Implement only within authorized scope.
|
|
127
|
+
12. Verify results.
|
|
128
|
+
|
|
129
|
+
Existing production architecture reviews begin read-only.
|
|
130
|
+
|
|
131
|
+
Do not rewrite working applications without authorization.
|
|
132
|
+
|
|
133
|
+
## 6. Autonomous Build Mode
|
|
134
|
+
|
|
135
|
+
When explicitly authorized to build a complete application:
|
|
136
|
+
|
|
137
|
+
1. Understand the product requirements.
|
|
138
|
+
2. Establish architectural priorities.
|
|
139
|
+
3. Identify relevant global standards.
|
|
140
|
+
4. Select an appropriate technology stack.
|
|
141
|
+
5. Define component boundaries.
|
|
142
|
+
6. Define data architecture.
|
|
143
|
+
7. Plan security and privacy.
|
|
144
|
+
8. Design integration boundaries.
|
|
145
|
+
9. Establish scalability strategy.
|
|
146
|
+
10. Evaluate operational costs.
|
|
147
|
+
11. Implement the authorized architecture.
|
|
148
|
+
12. Add appropriate tests.
|
|
149
|
+
13. Validate architectural assumptions.
|
|
150
|
+
14. Correct identified problems.
|
|
151
|
+
15. Document important decisions.
|
|
152
|
+
16. Continue independent implementation.
|
|
153
|
+
17. Report remaining human actions.
|
|
154
|
+
|
|
155
|
+
Do not stop after each ordinary architecture milestone.
|
|
156
|
+
|
|
157
|
+
Do not request repeated approval for decisions already covered by the authorized development scope.
|
|
158
|
+
|
|
159
|
+
Protected operations require separate authorization.
|
|
160
|
+
|
|
161
|
+
## 7. Architecture Assessment Scope
|
|
162
|
+
|
|
163
|
+
Identify:
|
|
164
|
+
|
|
165
|
+
- Application purpose.
|
|
166
|
+
- Business model.
|
|
167
|
+
- Primary users.
|
|
168
|
+
- Functional requirements.
|
|
169
|
+
- Non-functional requirements.
|
|
170
|
+
- Existing technologies.
|
|
171
|
+
- Deployment environment.
|
|
172
|
+
- Data requirements.
|
|
173
|
+
- Integration requirements.
|
|
174
|
+
- Security constraints.
|
|
175
|
+
- Expected growth.
|
|
176
|
+
- Budget constraints.
|
|
177
|
+
- Team capabilities.
|
|
178
|
+
- Operational limitations.
|
|
179
|
+
|
|
180
|
+
Do not invent critical business requirements.
|
|
181
|
+
|
|
182
|
+
Document uncertainty.
|
|
183
|
+
|
|
184
|
+
## 8. Evidence-Based Architecture
|
|
185
|
+
|
|
186
|
+
Use evidence when available:
|
|
187
|
+
|
|
188
|
+
- Existing source code.
|
|
189
|
+
- Architecture diagrams.
|
|
190
|
+
- Database schemas.
|
|
191
|
+
- Performance measurements.
|
|
192
|
+
- Dependency manifests.
|
|
193
|
+
- Deployment configuration.
|
|
194
|
+
- Operational metrics.
|
|
195
|
+
- Test results.
|
|
196
|
+
- Verified provider capabilities.
|
|
197
|
+
- Verified pricing.
|
|
198
|
+
|
|
199
|
+
Distinguish:
|
|
200
|
+
|
|
201
|
+
- Confirmed facts.
|
|
202
|
+
- Reasonable estimates.
|
|
203
|
+
- Assumptions.
|
|
204
|
+
- Hypotheses.
|
|
205
|
+
- Unverified limitations.
|
|
206
|
+
|
|
207
|
+
Do not claim an architecture solves a measured problem without appropriate validation.
|
|
208
|
+
|
|
209
|
+
## 9. Architecture Principles
|
|
210
|
+
|
|
211
|
+
Apply:
|
|
212
|
+
|
|
213
|
+
- Clear responsibilities.
|
|
214
|
+
- Separation of concerns.
|
|
215
|
+
- High cohesion.
|
|
216
|
+
- Appropriate coupling.
|
|
217
|
+
- Secure boundaries.
|
|
218
|
+
- Explicit interfaces.
|
|
219
|
+
- Data integrity.
|
|
220
|
+
- Testability.
|
|
221
|
+
- Operational simplicity.
|
|
222
|
+
- Maintainability.
|
|
223
|
+
- Scalability when required.
|
|
224
|
+
- Cost efficiency.
|
|
225
|
+
- Evolutionary design.
|
|
226
|
+
|
|
227
|
+
Prefer the simplest architecture capable of satisfying actual requirements.
|
|
228
|
+
|
|
229
|
+
Avoid abstractions without demonstrable value.
|
|
230
|
+
|
|
231
|
+
## 10. Technology Selection
|
|
232
|
+
|
|
233
|
+
Evaluate candidate technologies according to:
|
|
234
|
+
|
|
235
|
+
- Required functionality.
|
|
236
|
+
- Security.
|
|
237
|
+
- Performance.
|
|
238
|
+
- Ecosystem maturity.
|
|
239
|
+
- Maintainability.
|
|
240
|
+
- Developer expertise.
|
|
241
|
+
- Platform compatibility.
|
|
242
|
+
- Operational support.
|
|
243
|
+
- Hosting options.
|
|
244
|
+
- Cost.
|
|
245
|
+
- Vendor dependency.
|
|
246
|
+
- Long-term viability.
|
|
247
|
+
|
|
248
|
+
Do not select frameworks solely because they are currently popular.
|
|
249
|
+
|
|
250
|
+
Preserve suitable existing technologies.
|
|
251
|
+
|
|
252
|
+
## 11. New Application Architecture
|
|
253
|
+
|
|
254
|
+
For a new project:
|
|
255
|
+
|
|
256
|
+
1. Define application responsibilities.
|
|
257
|
+
2. Identify primary business workflows.
|
|
258
|
+
3. Define trust boundaries.
|
|
259
|
+
4. Select suitable technologies.
|
|
260
|
+
5. Design modular components.
|
|
261
|
+
6. Define data ownership.
|
|
262
|
+
7. Identify external integrations.
|
|
263
|
+
8. Establish test strategy.
|
|
264
|
+
9. Establish development environments.
|
|
265
|
+
10. Plan deployment and operational evolution.
|
|
266
|
+
|
|
267
|
+
Do not overengineer an early-stage application.
|
|
268
|
+
|
|
269
|
+
Design appropriate extension points without implementing unnecessary infrastructure.
|
|
270
|
+
|
|
271
|
+
## 12. Existing Application Architecture
|
|
272
|
+
|
|
273
|
+
For an existing application:
|
|
274
|
+
|
|
275
|
+
- Inspect the current architecture.
|
|
276
|
+
- Identify established conventions.
|
|
277
|
+
- Preserve useful components.
|
|
278
|
+
- Review dependencies.
|
|
279
|
+
- Identify actual limitations.
|
|
280
|
+
- Assess business impact.
|
|
281
|
+
- Evaluate compatibility.
|
|
282
|
+
- Consider incremental improvements.
|
|
283
|
+
|
|
284
|
+
Do not replace working architecture merely to conform to personal preferences.
|
|
285
|
+
|
|
286
|
+
A mature monolith is not automatically inferior to microservices.
|
|
287
|
+
|
|
288
|
+
## 13. Modular Monolithic Architecture
|
|
289
|
+
|
|
290
|
+
Consider a modular monolith when:
|
|
291
|
+
|
|
292
|
+
- The application has a cohesive domain.
|
|
293
|
+
- Operational simplicity matters.
|
|
294
|
+
- Teams are small or moderately sized.
|
|
295
|
+
- Distributed deployment is unnecessary.
|
|
296
|
+
- Strong transactional consistency is useful.
|
|
297
|
+
- Infrastructure costs must remain controlled.
|
|
298
|
+
|
|
299
|
+
Define explicit module boundaries.
|
|
300
|
+
|
|
301
|
+
Avoid hidden dependencies between modules.
|
|
302
|
+
|
|
303
|
+
A modular monolith can support significant growth when appropriately designed and operated.
|
|
304
|
+
|
|
305
|
+
## 14. Microservices
|
|
306
|
+
|
|
307
|
+
Consider microservices when justified by:
|
|
308
|
+
|
|
309
|
+
- Independent deployment needs.
|
|
310
|
+
- Clear domain ownership.
|
|
311
|
+
- Distinct scaling requirements.
|
|
312
|
+
- Organizational structure.
|
|
313
|
+
- Fault isolation.
|
|
314
|
+
- Operational maturity.
|
|
315
|
+
|
|
316
|
+
Evaluate:
|
|
317
|
+
|
|
318
|
+
- Network complexity.
|
|
319
|
+
- Distributed transactions.
|
|
320
|
+
- Service discovery.
|
|
321
|
+
- Observability.
|
|
322
|
+
- Deployment complexity.
|
|
323
|
+
- Security boundaries.
|
|
324
|
+
- Testing effort.
|
|
325
|
+
- Infrastructure cost.
|
|
326
|
+
|
|
327
|
+
Do not recommend microservices solely because an application targets millions of users.
|
|
328
|
+
|
|
329
|
+
## 15. Serverless Architecture
|
|
330
|
+
|
|
331
|
+
Evaluate serverless when appropriate.
|
|
332
|
+
|
|
333
|
+
Consider:
|
|
334
|
+
|
|
335
|
+
- Request patterns.
|
|
336
|
+
- Execution duration.
|
|
337
|
+
- Concurrency.
|
|
338
|
+
- Cold starts.
|
|
339
|
+
- State management.
|
|
340
|
+
- Database connections.
|
|
341
|
+
- Provider quotas.
|
|
342
|
+
- Operational costs.
|
|
343
|
+
- Deployment portability.
|
|
344
|
+
|
|
345
|
+
Serverless may reduce operational burden.
|
|
346
|
+
|
|
347
|
+
Do not assume it is universally cheaper or more scalable.
|
|
348
|
+
|
|
349
|
+
## 16. Event-Driven Architecture
|
|
350
|
+
|
|
351
|
+
Consider event-driven patterns for:
|
|
352
|
+
|
|
353
|
+
- Asynchronous processing.
|
|
354
|
+
- Background workflows.
|
|
355
|
+
- Integration events.
|
|
356
|
+
- Notifications.
|
|
357
|
+
- Audit processing.
|
|
358
|
+
- Workload decoupling.
|
|
359
|
+
|
|
360
|
+
Review:
|
|
361
|
+
|
|
362
|
+
- Delivery guarantees.
|
|
363
|
+
- Duplicate events.
|
|
364
|
+
- Idempotency.
|
|
365
|
+
- Ordering.
|
|
366
|
+
- Retry policies.
|
|
367
|
+
- Dead-letter handling.
|
|
368
|
+
- Observability.
|
|
369
|
+
- Event schema evolution.
|
|
370
|
+
|
|
371
|
+
Do not use events for workflows that require simple synchronous behavior without justification.
|
|
372
|
+
|
|
373
|
+
## 17. Distributed Systems
|
|
374
|
+
|
|
375
|
+
When distributed architecture is required, evaluate:
|
|
376
|
+
|
|
377
|
+
- Network failures.
|
|
378
|
+
- Timeouts.
|
|
379
|
+
- Retries.
|
|
380
|
+
- Partial failures.
|
|
381
|
+
- Consistency.
|
|
382
|
+
- Idempotency.
|
|
383
|
+
- Message duplication.
|
|
384
|
+
- Ordering.
|
|
385
|
+
- Clock assumptions.
|
|
386
|
+
- Coordination.
|
|
387
|
+
- Recovery.
|
|
388
|
+
|
|
389
|
+
Do not assume distributed components behave like local function calls.
|
|
390
|
+
|
|
391
|
+
Apply complexity only where it creates measurable value.
|
|
392
|
+
|
|
393
|
+
## 18. Domain Boundaries
|
|
394
|
+
|
|
395
|
+
Identify meaningful business domains.
|
|
396
|
+
|
|
397
|
+
Define:
|
|
398
|
+
|
|
399
|
+
- Domain responsibilities.
|
|
400
|
+
- Entity ownership.
|
|
401
|
+
- Business invariants.
|
|
402
|
+
- API boundaries.
|
|
403
|
+
- Shared contracts.
|
|
404
|
+
- Dependency direction.
|
|
405
|
+
- Data access rules.
|
|
406
|
+
|
|
407
|
+
Avoid central modules that accumulate unrelated responsibilities.
|
|
408
|
+
|
|
409
|
+
Do not create artificial services for every business entity.
|
|
410
|
+
|
|
411
|
+
## 19. Layered Architecture
|
|
412
|
+
|
|
413
|
+
Use clear separation when appropriate:
|
|
414
|
+
|
|
415
|
+
- Presentation.
|
|
416
|
+
- Application orchestration.
|
|
417
|
+
- Domain logic.
|
|
418
|
+
- Data access.
|
|
419
|
+
- Infrastructure integration.
|
|
420
|
+
|
|
421
|
+
Avoid allowing UI components to enforce security-sensitive business decisions alone.
|
|
422
|
+
|
|
423
|
+
Keep domain rules testable.
|
|
424
|
+
|
|
425
|
+
## 20. Hexagonal and Clean Architecture
|
|
426
|
+
|
|
427
|
+
Consider ports-and-adapters or similar patterns when they improve:
|
|
428
|
+
|
|
429
|
+
- Testability.
|
|
430
|
+
- Dependency isolation.
|
|
431
|
+
- External service replacement.
|
|
432
|
+
- Domain clarity.
|
|
433
|
+
- Long-term maintenance.
|
|
434
|
+
|
|
435
|
+
Avoid excessive interfaces and wrappers without practical benefit.
|
|
436
|
+
|
|
437
|
+
Use the degree of abstraction justified by expected change.
|
|
438
|
+
|
|
439
|
+
## 21. API Architecture
|
|
440
|
+
|
|
441
|
+
Evaluate:
|
|
442
|
+
|
|
443
|
+
- Resource modeling.
|
|
444
|
+
- Endpoint consistency.
|
|
445
|
+
- Authentication.
|
|
446
|
+
- Authorization.
|
|
447
|
+
- Input validation.
|
|
448
|
+
- Pagination.
|
|
449
|
+
- Error handling.
|
|
450
|
+
- Versioning.
|
|
451
|
+
- Rate limiting.
|
|
452
|
+
- Idempotency.
|
|
453
|
+
- Observability.
|
|
454
|
+
|
|
455
|
+
Use appropriate API styles.
|
|
456
|
+
|
|
457
|
+
Do not impose REST, GraphQL, gRPC or another protocol universally.
|
|
458
|
+
|
|
459
|
+
## 22. API Contract Evolution
|
|
460
|
+
|
|
461
|
+
For established APIs:
|
|
462
|
+
|
|
463
|
+
- Evaluate backward compatibility.
|
|
464
|
+
- Identify affected consumers.
|
|
465
|
+
- Define deprecation procedures.
|
|
466
|
+
- Preserve stable contracts where practical.
|
|
467
|
+
- Document breaking changes.
|
|
468
|
+
- Test relevant integrations.
|
|
469
|
+
|
|
470
|
+
Do not make breaking production API changes without suitable authorization.
|
|
471
|
+
|
|
472
|
+
## 23. Integration Architecture
|
|
473
|
+
|
|
474
|
+
For external integrations:
|
|
475
|
+
|
|
476
|
+
- Define adapter boundaries.
|
|
477
|
+
- Validate data contracts.
|
|
478
|
+
- Handle timeouts.
|
|
479
|
+
- Use bounded retries.
|
|
480
|
+
- Verify authentication.
|
|
481
|
+
- Protect credentials.
|
|
482
|
+
- Consider rate limits.
|
|
483
|
+
- Handle partial failures.
|
|
484
|
+
- Track integration costs.
|
|
485
|
+
|
|
486
|
+
Do not assume external services are always available.
|
|
487
|
+
|
|
488
|
+
## 24. Data Architecture
|
|
489
|
+
|
|
490
|
+
Evaluate:
|
|
491
|
+
|
|
492
|
+
- Data model.
|
|
493
|
+
- Transaction boundaries.
|
|
494
|
+
- Ownership.
|
|
495
|
+
- Consistency.
|
|
496
|
+
- Query patterns.
|
|
497
|
+
- Access control.
|
|
498
|
+
- Tenant isolation.
|
|
499
|
+
- Migration requirements.
|
|
500
|
+
- Backup.
|
|
501
|
+
- Recovery.
|
|
502
|
+
- Retention.
|
|
503
|
+
|
|
504
|
+
Choose database technologies according to actual data requirements.
|
|
505
|
+
|
|
506
|
+
Consult docs/data.md.
|
|
507
|
+
|
|
508
|
+
## 25. Data Ownership
|
|
509
|
+
|
|
510
|
+
Define which components may create, update, retrieve and delete important records.
|
|
511
|
+
|
|
512
|
+
Avoid uncontrolled shared database access across unrelated modules or services.
|
|
513
|
+
|
|
514
|
+
Protect business invariants.
|
|
515
|
+
|
|
516
|
+
Do not rely on frontend validation as the only integrity control.
|
|
517
|
+
|
|
518
|
+
## 26. Multi-Tenant Architecture
|
|
519
|
+
|
|
520
|
+
For multi-tenant systems, evaluate:
|
|
521
|
+
|
|
522
|
+
- Tenant identity.
|
|
523
|
+
- Tenant-aware authorization.
|
|
524
|
+
- Data isolation.
|
|
525
|
+
- Storage boundaries.
|
|
526
|
+
- Caching.
|
|
527
|
+
- Search.
|
|
528
|
+
- Background processing.
|
|
529
|
+
- Resource quotas.
|
|
530
|
+
- Observability.
|
|
531
|
+
- Cost attribution.
|
|
532
|
+
|
|
533
|
+
Use isolation proportional to the business and security requirements.
|
|
534
|
+
|
|
535
|
+
Validate access boundaries.
|
|
536
|
+
|
|
537
|
+
## 27. Authentication Architecture
|
|
538
|
+
|
|
539
|
+
Evaluate:
|
|
540
|
+
|
|
541
|
+
- Identity provider selection.
|
|
542
|
+
- Session handling.
|
|
543
|
+
- Token validation.
|
|
544
|
+
- Account recovery.
|
|
545
|
+
- Multi-factor authentication where appropriate.
|
|
546
|
+
- Service identities.
|
|
547
|
+
- Administrative access.
|
|
548
|
+
- User lifecycle.
|
|
549
|
+
|
|
550
|
+
Do not expose privileged authentication credentials to untrusted clients.
|
|
551
|
+
|
|
552
|
+
Consult docs/security.md.
|
|
553
|
+
|
|
554
|
+
## 28. Authorization Architecture
|
|
555
|
+
|
|
556
|
+
Define:
|
|
557
|
+
|
|
558
|
+
- User roles.
|
|
559
|
+
- Resource ownership.
|
|
560
|
+
- Tenant boundaries.
|
|
561
|
+
- Privileged operations.
|
|
562
|
+
- Policy enforcement points.
|
|
563
|
+
- Service-to-service permissions.
|
|
564
|
+
- Administrative exceptions.
|
|
565
|
+
|
|
566
|
+
Enforce authorization at trusted boundaries.
|
|
567
|
+
|
|
568
|
+
Authentication does not replace authorization.
|
|
569
|
+
|
|
570
|
+
## 29. Security Architecture
|
|
571
|
+
|
|
572
|
+
Apply security by design.
|
|
573
|
+
|
|
574
|
+
Evaluate:
|
|
575
|
+
|
|
576
|
+
- Trust boundaries.
|
|
577
|
+
- Least privilege.
|
|
578
|
+
- Secure defaults.
|
|
579
|
+
- Attack surfaces.
|
|
580
|
+
- Secrets.
|
|
581
|
+
- Dependency security.
|
|
582
|
+
- Network exposure.
|
|
583
|
+
- Data isolation.
|
|
584
|
+
- Encryption.
|
|
585
|
+
- Auditability.
|
|
586
|
+
- Supply chain protections.
|
|
587
|
+
|
|
588
|
+
Do not weaken security merely to simplify architecture.
|
|
589
|
+
|
|
590
|
+
Consult docs/security.md.
|
|
591
|
+
|
|
592
|
+
## 30. Privacy Architecture
|
|
593
|
+
|
|
594
|
+
Apply privacy by design.
|
|
595
|
+
|
|
596
|
+
Evaluate:
|
|
597
|
+
|
|
598
|
+
- Personal data flows.
|
|
599
|
+
- Data minimization.
|
|
600
|
+
- Processing purposes.
|
|
601
|
+
- Retention.
|
|
602
|
+
- Deletion.
|
|
603
|
+
- Third-party processors.
|
|
604
|
+
- International transfers.
|
|
605
|
+
- User rights.
|
|
606
|
+
- Sensitive information handling.
|
|
607
|
+
|
|
608
|
+
Do not assume provider-level compliance claims establish application compliance.
|
|
609
|
+
|
|
610
|
+
Consult docs/privacy.md.
|
|
611
|
+
|
|
612
|
+
## 31. Reliability Architecture
|
|
613
|
+
|
|
614
|
+
Evaluate:
|
|
615
|
+
|
|
616
|
+
- Failure modes.
|
|
617
|
+
- Redundancy.
|
|
618
|
+
- Graceful degradation.
|
|
619
|
+
- Retries.
|
|
620
|
+
- Timeouts.
|
|
621
|
+
- Idempotency.
|
|
622
|
+
- Health checks.
|
|
623
|
+
- Recovery procedures.
|
|
624
|
+
- Dependency failures.
|
|
625
|
+
|
|
626
|
+
Design resilience according to business requirements.
|
|
627
|
+
|
|
628
|
+
Avoid introducing unnecessary distributed failure points.
|
|
629
|
+
|
|
630
|
+
## 32. Availability and Recovery
|
|
631
|
+
|
|
632
|
+
Identify suitable:
|
|
633
|
+
|
|
634
|
+
- Availability targets.
|
|
635
|
+
- Recovery time objectives.
|
|
636
|
+
- Recovery point objectives.
|
|
637
|
+
- Backup approaches.
|
|
638
|
+
- Restoration tests.
|
|
639
|
+
- Failover options.
|
|
640
|
+
- Regional considerations.
|
|
641
|
+
|
|
642
|
+
Do not assume replication replaces backups.
|
|
643
|
+
|
|
644
|
+
Do not claim recovery readiness without evidence.
|
|
645
|
+
|
|
646
|
+
## 33. Scalability Architecture
|
|
647
|
+
|
|
648
|
+
Evaluate:
|
|
649
|
+
|
|
650
|
+
- Current workload.
|
|
651
|
+
- Expected growth.
|
|
652
|
+
- Peak concurrency.
|
|
653
|
+
- Database capacity.
|
|
654
|
+
- CPU and memory requirements.
|
|
655
|
+
- Horizontal scaling.
|
|
656
|
+
- Vertical scaling.
|
|
657
|
+
- Caching.
|
|
658
|
+
- Queues.
|
|
659
|
+
- Storage growth.
|
|
660
|
+
- Network limits.
|
|
661
|
+
|
|
662
|
+
Design credible evolutionary scaling paths.
|
|
663
|
+
|
|
664
|
+
Do not confuse registered users with simultaneous active users.
|
|
665
|
+
|
|
666
|
+
Consult docs/scalability.md.
|
|
667
|
+
|
|
668
|
+
## 34. Scaling Toward Millions of Users
|
|
669
|
+
|
|
670
|
+
For large-scale ambitions:
|
|
671
|
+
|
|
672
|
+
1. Define realistic usage scenarios.
|
|
673
|
+
2. Identify key throughput drivers.
|
|
674
|
+
3. Estimate expected concurrency.
|
|
675
|
+
4. Identify likely bottlenecks.
|
|
676
|
+
5. Choose scalable component boundaries.
|
|
677
|
+
6. Plan data growth.
|
|
678
|
+
7. Evaluate capacity constraints.
|
|
679
|
+
8. Define monitoring.
|
|
680
|
+
9. Identify future scaling triggers.
|
|
681
|
+
10. Estimate financial implications.
|
|
682
|
+
|
|
683
|
+
Do not provision large clusters solely because future growth is possible.
|
|
684
|
+
|
|
685
|
+
Do not claim verified capacity without relevant testing.
|
|
686
|
+
|
|
687
|
+
## 35. Performance Architecture
|
|
688
|
+
|
|
689
|
+
Review:
|
|
690
|
+
|
|
691
|
+
- Request latency.
|
|
692
|
+
- Network overhead.
|
|
693
|
+
- Query performance.
|
|
694
|
+
- Caching.
|
|
695
|
+
- Background workloads.
|
|
696
|
+
- Frontend rendering.
|
|
697
|
+
- Memory allocation.
|
|
698
|
+
- CPU usage.
|
|
699
|
+
- Serialization.
|
|
700
|
+
- Large payloads.
|
|
701
|
+
|
|
702
|
+
Prefer performance improvements supported by real evidence.
|
|
703
|
+
|
|
704
|
+
Do not sacrifice correctness for small unverified gains.
|
|
705
|
+
|
|
706
|
+
## 36. Caching Architecture
|
|
707
|
+
|
|
708
|
+
When justified, evaluate:
|
|
709
|
+
|
|
710
|
+
- Cache placement.
|
|
711
|
+
- Cache keys.
|
|
712
|
+
- Tenant isolation.
|
|
713
|
+
- Expiration.
|
|
714
|
+
- Invalidation.
|
|
715
|
+
- Consistency.
|
|
716
|
+
- Storage cost.
|
|
717
|
+
- Stampede prevention.
|
|
718
|
+
|
|
719
|
+
Do not introduce caching without defining correctness and invalidation behavior.
|
|
720
|
+
|
|
721
|
+
## 37. Background Job Architecture
|
|
722
|
+
|
|
723
|
+
For asynchronous jobs:
|
|
724
|
+
|
|
725
|
+
- Define ownership.
|
|
726
|
+
- Define retry behavior.
|
|
727
|
+
- Apply timeouts.
|
|
728
|
+
- Use idempotency.
|
|
729
|
+
- Restrict execution scope.
|
|
730
|
+
- Support observability.
|
|
731
|
+
- Handle poison messages.
|
|
732
|
+
- Bound concurrency.
|
|
733
|
+
- Control cost.
|
|
734
|
+
|
|
735
|
+
Do not allow uncontrolled background processing.
|
|
736
|
+
|
|
737
|
+
## 38. Cloud Architecture
|
|
738
|
+
|
|
739
|
+
Evaluate appropriate options across:
|
|
740
|
+
|
|
741
|
+
- AWS.
|
|
742
|
+
- Microsoft Azure.
|
|
743
|
+
- Google Cloud.
|
|
744
|
+
- Other public providers.
|
|
745
|
+
- Managed application platforms.
|
|
746
|
+
- Hybrid infrastructure.
|
|
747
|
+
- On-premises systems.
|
|
748
|
+
|
|
749
|
+
Consider:
|
|
750
|
+
|
|
751
|
+
- Requirements.
|
|
752
|
+
- Security.
|
|
753
|
+
- Data residency.
|
|
754
|
+
- Reliability.
|
|
755
|
+
- Operational maturity.
|
|
756
|
+
- Scalability.
|
|
757
|
+
- Provider quotas.
|
|
758
|
+
- Pricing.
|
|
759
|
+
- Portability.
|
|
760
|
+
|
|
761
|
+
Do not declare one provider universally superior.
|
|
762
|
+
|
|
763
|
+
## 39. Cloud Service Selection
|
|
764
|
+
|
|
765
|
+
Compare services based on equivalent workloads.
|
|
766
|
+
|
|
767
|
+
Review:
|
|
768
|
+
|
|
769
|
+
- Compute.
|
|
770
|
+
- Databases.
|
|
771
|
+
- Storage.
|
|
772
|
+
- Networking.
|
|
773
|
+
- Authentication.
|
|
774
|
+
- Messaging.
|
|
775
|
+
- Monitoring.
|
|
776
|
+
- Backup.
|
|
777
|
+
- Deployment.
|
|
778
|
+
- Cost.
|
|
779
|
+
|
|
780
|
+
Use current provider documentation when verification matters.
|
|
781
|
+
|
|
782
|
+
Avoid introducing services without a clear technical purpose.
|
|
783
|
+
|
|
784
|
+
## 40. Infrastructure Portability
|
|
785
|
+
|
|
786
|
+
Evaluate portability according to actual needs.
|
|
787
|
+
|
|
788
|
+
Consider:
|
|
789
|
+
|
|
790
|
+
- Open standards.
|
|
791
|
+
- Portable data formats.
|
|
792
|
+
- Infrastructure-as-Code.
|
|
793
|
+
- Deployment automation.
|
|
794
|
+
- Adapter boundaries.
|
|
795
|
+
- Managed-service dependencies.
|
|
796
|
+
- Data export.
|
|
797
|
+
- Migration complexity.
|
|
798
|
+
|
|
799
|
+
Do not build excessive abstraction merely to avoid every provider-specific feature.
|
|
800
|
+
|
|
801
|
+
## 41. Containers
|
|
802
|
+
|
|
803
|
+
Use containers when they provide practical benefits.
|
|
804
|
+
|
|
805
|
+
Evaluate:
|
|
806
|
+
|
|
807
|
+
- Reproducible builds.
|
|
808
|
+
- Runtime dependencies.
|
|
809
|
+
- Deployment consistency.
|
|
810
|
+
- Security.
|
|
811
|
+
- Resource limits.
|
|
812
|
+
- Image size.
|
|
813
|
+
- Supply chain integrity.
|
|
814
|
+
- Operational tooling.
|
|
815
|
+
|
|
816
|
+
Do not require containers for every simple application.
|
|
817
|
+
|
|
818
|
+
## 42. Kubernetes Adoption
|
|
819
|
+
|
|
820
|
+
Adopt Kubernetes only when justified.
|
|
821
|
+
|
|
822
|
+
Possible reasons include:
|
|
823
|
+
|
|
824
|
+
- Multiple independently managed workloads.
|
|
825
|
+
- Complex deployment orchestration.
|
|
826
|
+
- Advanced scheduling.
|
|
827
|
+
- Established platform operations.
|
|
828
|
+
- Specific portability needs.
|
|
829
|
+
- Meaningful scaling and automation requirements.
|
|
830
|
+
|
|
831
|
+
Evaluate:
|
|
832
|
+
|
|
833
|
+
- Security.
|
|
834
|
+
- Cluster management.
|
|
835
|
+
- Networking.
|
|
836
|
+
- Observability.
|
|
837
|
+
- Storage.
|
|
838
|
+
- Upgrades.
|
|
839
|
+
- Reliability.
|
|
840
|
+
- Costs.
|
|
841
|
+
- Team expertise.
|
|
842
|
+
|
|
843
|
+
Do not select Kubernetes solely because the application targets millions of users.
|
|
844
|
+
|
|
845
|
+
## 43. Kubernetes Architecture
|
|
846
|
+
|
|
847
|
+
For existing or justified Kubernetes systems, assess:
|
|
848
|
+
|
|
849
|
+
- Cluster topology.
|
|
850
|
+
- Namespaces.
|
|
851
|
+
- RBAC.
|
|
852
|
+
- Workload identities.
|
|
853
|
+
- Network policies.
|
|
854
|
+
- Ingress.
|
|
855
|
+
- Service discovery.
|
|
856
|
+
- Resource requests and limits.
|
|
857
|
+
- Horizontal autoscaling.
|
|
858
|
+
- Node autoscaling.
|
|
859
|
+
- Storage.
|
|
860
|
+
- Secrets.
|
|
861
|
+
- Monitoring.
|
|
862
|
+
|
|
863
|
+
Never modify production clusters without appropriate authorization.
|
|
864
|
+
|
|
865
|
+
## 44. Managed Kubernetes
|
|
866
|
+
|
|
867
|
+
When relevant, evaluate:
|
|
868
|
+
|
|
869
|
+
- Amazon EKS.
|
|
870
|
+
- Azure AKS.
|
|
871
|
+
- Google Kubernetes Engine.
|
|
872
|
+
- Other managed Kubernetes services.
|
|
873
|
+
|
|
874
|
+
Compare:
|
|
875
|
+
|
|
876
|
+
- Cluster management costs.
|
|
877
|
+
- Compute.
|
|
878
|
+
- Network charges.
|
|
879
|
+
- Availability.
|
|
880
|
+
- Security capabilities.
|
|
881
|
+
- Operational effort.
|
|
882
|
+
- Compatibility.
|
|
883
|
+
- Provider integration.
|
|
884
|
+
|
|
885
|
+
Use current verified pricing when estimating costs.
|
|
886
|
+
|
|
887
|
+
## 45. Infrastructure-as-Code
|
|
888
|
+
|
|
889
|
+
Use infrastructure-as-code when appropriate.
|
|
890
|
+
|
|
891
|
+
Consider:
|
|
892
|
+
|
|
893
|
+
- Terraform.
|
|
894
|
+
- OpenTofu.
|
|
895
|
+
- Cloud-native templates.
|
|
896
|
+
- Pulumi.
|
|
897
|
+
- Other suitable tools.
|
|
898
|
+
|
|
899
|
+
Evaluate:
|
|
900
|
+
|
|
901
|
+
- Reproducibility.
|
|
902
|
+
- Reviewability.
|
|
903
|
+
- Secrets management.
|
|
904
|
+
- State protection.
|
|
905
|
+
- Policy enforcement.
|
|
906
|
+
- Rollback.
|
|
907
|
+
- Environment separation.
|
|
908
|
+
|
|
909
|
+
Do not apply live infrastructure changes without required approval.
|
|
910
|
+
|
|
911
|
+
## 46. Development Environments
|
|
912
|
+
|
|
913
|
+
Define suitable separation between:
|
|
914
|
+
|
|
915
|
+
- Local development.
|
|
916
|
+
- Automated testing.
|
|
917
|
+
- Preview environments.
|
|
918
|
+
- Staging.
|
|
919
|
+
- Production.
|
|
920
|
+
|
|
921
|
+
Protect production credentials.
|
|
922
|
+
|
|
923
|
+
Do not reuse live databases for routine testing.
|
|
924
|
+
|
|
925
|
+
Avoid unnecessary costs from excessive environments.
|
|
926
|
+
|
|
927
|
+
## 47. Deployment Architecture
|
|
928
|
+
|
|
929
|
+
Evaluate:
|
|
930
|
+
|
|
931
|
+
- Deployment method.
|
|
932
|
+
- Release automation.
|
|
933
|
+
- Environment configuration.
|
|
934
|
+
- Secret injection.
|
|
935
|
+
- Database migrations.
|
|
936
|
+
- Rollback.
|
|
937
|
+
- Health checks.
|
|
938
|
+
- Monitoring.
|
|
939
|
+
- Approval gates.
|
|
940
|
+
|
|
941
|
+
Do not infer deployment authorization from an instruction to build the application.
|
|
942
|
+
|
|
943
|
+
## 48. CI/CD Architecture
|
|
944
|
+
|
|
945
|
+
Review:
|
|
946
|
+
|
|
947
|
+
- Automated builds.
|
|
948
|
+
- Unit testing.
|
|
949
|
+
- Integration testing.
|
|
950
|
+
- Security scanning.
|
|
951
|
+
- Dependency validation.
|
|
952
|
+
- Artifact provenance.
|
|
953
|
+
- Protected branches.
|
|
954
|
+
- Environment permissions.
|
|
955
|
+
- Production approval.
|
|
956
|
+
|
|
957
|
+
Do not disable established quality gates to accelerate delivery.
|
|
958
|
+
|
|
959
|
+
## 49. Observability Architecture
|
|
960
|
+
|
|
961
|
+
Design appropriate:
|
|
962
|
+
|
|
963
|
+
- Structured logging.
|
|
964
|
+
- Metrics.
|
|
965
|
+
- Distributed tracing.
|
|
966
|
+
- Error reporting.
|
|
967
|
+
- Service health checks.
|
|
968
|
+
- Alerting.
|
|
969
|
+
- Incident workflows.
|
|
970
|
+
- Retention.
|
|
971
|
+
|
|
972
|
+
Avoid excessive telemetry costs and sensitive data exposure.
|
|
973
|
+
|
|
974
|
+
Consult docs/observability.md.
|
|
975
|
+
|
|
976
|
+
## 50. Cost-Aware Architecture
|
|
977
|
+
|
|
978
|
+
Evaluate total ownership cost.
|
|
979
|
+
|
|
980
|
+
Consider:
|
|
981
|
+
|
|
982
|
+
- Development complexity.
|
|
983
|
+
- Compute.
|
|
984
|
+
- Database.
|
|
985
|
+
- Storage.
|
|
986
|
+
- Networking.
|
|
987
|
+
- Monitoring.
|
|
988
|
+
- AI inference.
|
|
989
|
+
- Operations.
|
|
990
|
+
- Maintenance.
|
|
991
|
+
- Vendor dependency.
|
|
992
|
+
|
|
993
|
+
Prefer economical architectures that meet actual requirements.
|
|
994
|
+
|
|
995
|
+
Do not minimize spending by compromising essential security or reliability.
|
|
996
|
+
|
|
997
|
+
Consult docs/cost-engineering.md.
|
|
998
|
+
|
|
999
|
+
## 51. Financial Authorization
|
|
1000
|
+
|
|
1001
|
+
Architecture recommendations do not authorize spending.
|
|
1002
|
+
|
|
1003
|
+
Require appropriate authorization before:
|
|
1004
|
+
|
|
1005
|
+
- Provisioning paid infrastructure.
|
|
1006
|
+
- Purchasing subscriptions.
|
|
1007
|
+
- Upgrading service plans.
|
|
1008
|
+
- Increasing billable resource quotas.
|
|
1009
|
+
- Starting managed production clusters.
|
|
1010
|
+
- Creating recurring paid dependencies.
|
|
1011
|
+
|
|
1012
|
+
Do not assume account access implies financial permission.
|
|
1013
|
+
|
|
1014
|
+
## 52. AI Application Architecture
|
|
1015
|
+
|
|
1016
|
+
When AI features are required, evaluate:
|
|
1017
|
+
|
|
1018
|
+
- Model providers.
|
|
1019
|
+
- Inference boundaries.
|
|
1020
|
+
- Prompt handling.
|
|
1021
|
+
- Retrieval.
|
|
1022
|
+
- Evaluation.
|
|
1023
|
+
- Security.
|
|
1024
|
+
- Privacy.
|
|
1025
|
+
- Model costs.
|
|
1026
|
+
- Human oversight.
|
|
1027
|
+
- Failure handling.
|
|
1028
|
+
|
|
1029
|
+
Do not introduce generative AI where deterministic software is more suitable.
|
|
1030
|
+
|
|
1031
|
+
Consult docs/ai-and-llm.md.
|
|
1032
|
+
|
|
1033
|
+
## 53. RAG Architecture
|
|
1034
|
+
|
|
1035
|
+
For Retrieval-Augmented Generation, assess:
|
|
1036
|
+
|
|
1037
|
+
- Document ingestion.
|
|
1038
|
+
- Parsing.
|
|
1039
|
+
- Chunking.
|
|
1040
|
+
- Embeddings.
|
|
1041
|
+
- Vector storage.
|
|
1042
|
+
- Authorization-aware retrieval.
|
|
1043
|
+
- Reranking.
|
|
1044
|
+
- Context construction.
|
|
1045
|
+
- Model inference.
|
|
1046
|
+
- Evaluation.
|
|
1047
|
+
- Retention and deletion.
|
|
1048
|
+
|
|
1049
|
+
A semantic search result does not establish access permission.
|
|
1050
|
+
|
|
1051
|
+
Design retrieval boundaries to prevent cross-tenant data leakage.
|
|
1052
|
+
|
|
1053
|
+
## 54. Agentic Architecture
|
|
1054
|
+
|
|
1055
|
+
For agentic applications, define:
|
|
1056
|
+
|
|
1057
|
+
- Agent responsibilities.
|
|
1058
|
+
- Tool permissions.
|
|
1059
|
+
- Execution limits.
|
|
1060
|
+
- Resource budgets.
|
|
1061
|
+
- Human approval boundaries.
|
|
1062
|
+
- Data access restrictions.
|
|
1063
|
+
- Auditability.
|
|
1064
|
+
- Error recovery.
|
|
1065
|
+
- Evaluation requirements.
|
|
1066
|
+
|
|
1067
|
+
Do not allow autonomous application agents to perform protected operations without authorization.
|
|
1068
|
+
|
|
1069
|
+
## 55. Web Application Architecture
|
|
1070
|
+
|
|
1071
|
+
For web systems, evaluate:
|
|
1072
|
+
|
|
1073
|
+
- Frontend and backend boundaries.
|
|
1074
|
+
- Server-side authorization.
|
|
1075
|
+
- API contracts.
|
|
1076
|
+
- Authentication.
|
|
1077
|
+
- Browser security.
|
|
1078
|
+
- Rendering strategy.
|
|
1079
|
+
- Accessibility.
|
|
1080
|
+
- Performance.
|
|
1081
|
+
- Caching.
|
|
1082
|
+
- Deployment.
|
|
1083
|
+
|
|
1084
|
+
Choose appropriate frameworks based on actual requirements.
|
|
1085
|
+
|
|
1086
|
+
Consult docs/mobile-and-web.md.
|
|
1087
|
+
|
|
1088
|
+
## 56. Mobile Architecture
|
|
1089
|
+
|
|
1090
|
+
For iOS and Android, evaluate:
|
|
1091
|
+
|
|
1092
|
+
- Native versus cross-platform approaches.
|
|
1093
|
+
- State management.
|
|
1094
|
+
- Navigation.
|
|
1095
|
+
- Offline storage.
|
|
1096
|
+
- Synchronization.
|
|
1097
|
+
- Device permissions.
|
|
1098
|
+
- Authentication.
|
|
1099
|
+
- Background execution.
|
|
1100
|
+
- Push notifications.
|
|
1101
|
+
- App lifecycle.
|
|
1102
|
+
- Release processes.
|
|
1103
|
+
|
|
1104
|
+
Do not assume one mobile framework is universally superior.
|
|
1105
|
+
|
|
1106
|
+
Consult docs/mobile-and-web.md.
|
|
1107
|
+
|
|
1108
|
+
## 57. Desktop and Native Architecture
|
|
1109
|
+
|
|
1110
|
+
For macOS, Windows, Linux and native applications, evaluate:
|
|
1111
|
+
|
|
1112
|
+
- Platform APIs.
|
|
1113
|
+
- Local storage.
|
|
1114
|
+
- Filesystem permissions.
|
|
1115
|
+
- Background processing.
|
|
1116
|
+
- Code signing.
|
|
1117
|
+
- Distribution.
|
|
1118
|
+
- Update systems.
|
|
1119
|
+
- Resource management.
|
|
1120
|
+
- Cross-platform compatibility.
|
|
1121
|
+
|
|
1122
|
+
Consult docs/platforms-and-applications.md.
|
|
1123
|
+
|
|
1124
|
+
## 58. Game Architecture
|
|
1125
|
+
|
|
1126
|
+
For games, evaluate:
|
|
1127
|
+
|
|
1128
|
+
- Engine selection.
|
|
1129
|
+
- Gameplay systems.
|
|
1130
|
+
- Entity management.
|
|
1131
|
+
- Rendering.
|
|
1132
|
+
- Physics.
|
|
1133
|
+
- Save data.
|
|
1134
|
+
- Multiplayer networking.
|
|
1135
|
+
- Server authority.
|
|
1136
|
+
- Asset pipelines.
|
|
1137
|
+
- Platform compatibility.
|
|
1138
|
+
- Performance.
|
|
1139
|
+
- Monetization implications.
|
|
1140
|
+
|
|
1141
|
+
Do not introduce complex multiplayer infrastructure for offline games.
|
|
1142
|
+
|
|
1143
|
+
Consult docs/platforms-and-applications.md.
|
|
1144
|
+
|
|
1145
|
+
## 59. Architecture for Java Systems
|
|
1146
|
+
|
|
1147
|
+
For Java applications, evaluate:
|
|
1148
|
+
|
|
1149
|
+
- Runtime requirements.
|
|
1150
|
+
- Framework selection.
|
|
1151
|
+
- Dependency injection.
|
|
1152
|
+
- Transaction boundaries.
|
|
1153
|
+
- Modular structure.
|
|
1154
|
+
- Threading and concurrency.
|
|
1155
|
+
- JVM performance.
|
|
1156
|
+
- Database integration.
|
|
1157
|
+
- Security.
|
|
1158
|
+
- Build tooling.
|
|
1159
|
+
- Deployment.
|
|
1160
|
+
|
|
1161
|
+
Preserve established project conventions.
|
|
1162
|
+
|
|
1163
|
+
Do not introduce unnecessary frameworks.
|
|
1164
|
+
|
|
1165
|
+
## 60. Architecture for Other Languages
|
|
1166
|
+
|
|
1167
|
+
Apply relevant engineering patterns to:
|
|
1168
|
+
|
|
1169
|
+
- Python.
|
|
1170
|
+
- JavaScript.
|
|
1171
|
+
- TypeScript.
|
|
1172
|
+
- Kotlin.
|
|
1173
|
+
- Swift.
|
|
1174
|
+
- C#.
|
|
1175
|
+
- C++.
|
|
1176
|
+
- Rust.
|
|
1177
|
+
- Go.
|
|
1178
|
+
- Other supported languages.
|
|
1179
|
+
|
|
1180
|
+
Choose architecture according to language capabilities and project requirements.
|
|
1181
|
+
|
|
1182
|
+
Do not force patterns from one ecosystem into unrelated technologies.
|
|
1183
|
+
|
|
1184
|
+
## 61. Architecture Documentation
|
|
1185
|
+
|
|
1186
|
+
For significant architecture work, document:
|
|
1187
|
+
|
|
1188
|
+
- System context.
|
|
1189
|
+
- Main components.
|
|
1190
|
+
- Responsibilities.
|
|
1191
|
+
- Interfaces.
|
|
1192
|
+
- Data flows.
|
|
1193
|
+
- Trust boundaries.
|
|
1194
|
+
- Dependencies.
|
|
1195
|
+
- Deployment topology.
|
|
1196
|
+
- Key assumptions.
|
|
1197
|
+
- Important risks.
|
|
1198
|
+
|
|
1199
|
+
Use diagrams when useful.
|
|
1200
|
+
|
|
1201
|
+
Keep documentation aligned with implemented behavior.
|
|
1202
|
+
|
|
1203
|
+
## 62. Architecture Decision Records
|
|
1204
|
+
|
|
1205
|
+
Use the template:
|
|
1206
|
+
|
|
1207
|
+
~/engineering-standards/templates/ADR.md
|
|
1208
|
+
|
|
1209
|
+
Document material decisions involving:
|
|
1210
|
+
|
|
1211
|
+
- Technology selection.
|
|
1212
|
+
- Database architecture.
|
|
1213
|
+
- Infrastructure architecture.
|
|
1214
|
+
- Significant integration patterns.
|
|
1215
|
+
- Security boundaries.
|
|
1216
|
+
- Major scalability strategies.
|
|
1217
|
+
- Material platform migrations.
|
|
1218
|
+
|
|
1219
|
+
Record alternatives and trade-offs.
|
|
1220
|
+
|
|
1221
|
+
An ADR does not authorize protected operations.
|
|
1222
|
+
|
|
1223
|
+
## 63. Architectural Trade-Offs
|
|
1224
|
+
|
|
1225
|
+
Evaluate trade-offs explicitly.
|
|
1226
|
+
|
|
1227
|
+
Examples:
|
|
1228
|
+
|
|
1229
|
+
- Simplicity versus extensibility.
|
|
1230
|
+
- Consistency versus availability.
|
|
1231
|
+
- Performance versus cost.
|
|
1232
|
+
- Portability versus managed convenience.
|
|
1233
|
+
- Isolation versus operational overhead.
|
|
1234
|
+
- Development speed versus maintainability.
|
|
1235
|
+
|
|
1236
|
+
Avoid claiming that an architecture provides every advantage without meaningful costs or limitations.
|
|
1237
|
+
|
|
1238
|
+
## 64. Architecture Risk Assessment
|
|
1239
|
+
|
|
1240
|
+
Identify relevant:
|
|
1241
|
+
|
|
1242
|
+
- Security risks.
|
|
1243
|
+
- Privacy risks.
|
|
1244
|
+
- Data integrity risks.
|
|
1245
|
+
- Reliability risks.
|
|
1246
|
+
- Performance limitations.
|
|
1247
|
+
- Scaling bottlenecks.
|
|
1248
|
+
- Vendor dependencies.
|
|
1249
|
+
- Financial exposure.
|
|
1250
|
+
- Operational complexity.
|
|
1251
|
+
- Migration risks.
|
|
1252
|
+
|
|
1253
|
+
Classify risk according to evidence and impact.
|
|
1254
|
+
|
|
1255
|
+
Distinguish confirmed issues from hypotheses.
|
|
1256
|
+
|
|
1257
|
+
## 65. Architecture Review Findings
|
|
1258
|
+
|
|
1259
|
+
For material findings, record:
|
|
1260
|
+
|
|
1261
|
+
- Finding ID.
|
|
1262
|
+
- Affected component.
|
|
1263
|
+
- Description.
|
|
1264
|
+
- Evidence.
|
|
1265
|
+
- Severity.
|
|
1266
|
+
- Confidence.
|
|
1267
|
+
- Current impact.
|
|
1268
|
+
- Expected future impact.
|
|
1269
|
+
- Recommended correction.
|
|
1270
|
+
- Implementation complexity.
|
|
1271
|
+
- Compatibility risks.
|
|
1272
|
+
- Financial consequences.
|
|
1273
|
+
- Required approval.
|
|
1274
|
+
|
|
1275
|
+
Do not invent architecture defects.
|
|
1276
|
+
|
|
1277
|
+
## 66. Architecture Review Reporting
|
|
1278
|
+
|
|
1279
|
+
For significant reviews, use:
|
|
1280
|
+
|
|
1281
|
+
~/engineering-standards/templates/AUDIT_REPORT.md
|
|
1282
|
+
|
|
1283
|
+
Include:
|
|
1284
|
+
|
|
1285
|
+
- Current architecture.
|
|
1286
|
+
- Verified strengths.
|
|
1287
|
+
- Confirmed limitations.
|
|
1288
|
+
- Unverified concerns.
|
|
1289
|
+
- Alternatives.
|
|
1290
|
+
- Risks.
|
|
1291
|
+
- Recommended improvements.
|
|
1292
|
+
- Cost considerations.
|
|
1293
|
+
- Migration implications.
|
|
1294
|
+
- Human decisions.
|
|
1295
|
+
|
|
1296
|
+
Avoid presenting architectural preferences as confirmed vulnerabilities.
|
|
1297
|
+
|
|
1298
|
+
## 67. Architecture Modernization
|
|
1299
|
+
|
|
1300
|
+
For existing systems:
|
|
1301
|
+
|
|
1302
|
+
1. Inspect current implementation.
|
|
1303
|
+
2. Identify verified limitations.
|
|
1304
|
+
3. Assess business impact.
|
|
1305
|
+
4. Evaluate incremental changes.
|
|
1306
|
+
5. Protect existing data.
|
|
1307
|
+
6. Preserve compatibility.
|
|
1308
|
+
7. Define migration stages.
|
|
1309
|
+
8. Assess rollback.
|
|
1310
|
+
9. Obtain required approval.
|
|
1311
|
+
10. Verify improvements.
|
|
1312
|
+
|
|
1313
|
+
Prefer incremental modernization over broad rewrites when possible.
|
|
1314
|
+
|
|
1315
|
+
## 68. Migration and Compatibility
|
|
1316
|
+
|
|
1317
|
+
For material architecture changes, assess:
|
|
1318
|
+
|
|
1319
|
+
- Existing consumers.
|
|
1320
|
+
- API compatibility.
|
|
1321
|
+
- Database schema changes.
|
|
1322
|
+
- Deployment impact.
|
|
1323
|
+
- Data migration.
|
|
1324
|
+
- Operational dependencies.
|
|
1325
|
+
- Rollback feasibility.
|
|
1326
|
+
- Testing requirements.
|
|
1327
|
+
|
|
1328
|
+
Do not assume every migration is reversible.
|
|
1329
|
+
|
|
1330
|
+
Do not execute destructive production migrations without explicit authorization.
|
|
1331
|
+
|
|
1332
|
+
## 69. Architecture Testing
|
|
1333
|
+
|
|
1334
|
+
Select relevant tests:
|
|
1335
|
+
|
|
1336
|
+
- Module boundary tests.
|
|
1337
|
+
- Integration tests.
|
|
1338
|
+
- Contract tests.
|
|
1339
|
+
- Authorization tests.
|
|
1340
|
+
- Database integrity tests.
|
|
1341
|
+
- Load tests.
|
|
1342
|
+
- Resilience tests.
|
|
1343
|
+
- Deployment configuration checks.
|
|
1344
|
+
- Architecture fitness functions.
|
|
1345
|
+
|
|
1346
|
+
Do not perform intrusive production testing without authorization.
|
|
1347
|
+
|
|
1348
|
+
Report actual results.
|
|
1349
|
+
|
|
1350
|
+
## 70. Architecture Validation
|
|
1351
|
+
|
|
1352
|
+
After authorized implementation:
|
|
1353
|
+
|
|
1354
|
+
1. Inspect modified components.
|
|
1355
|
+
2. Confirm architectural boundaries.
|
|
1356
|
+
3. Run relevant tests.
|
|
1357
|
+
4. Check security implications.
|
|
1358
|
+
5. Review data integrity.
|
|
1359
|
+
6. Evaluate compatibility.
|
|
1360
|
+
7. Assess operational risks.
|
|
1361
|
+
8. Record unresolved issues.
|
|
1362
|
+
9. Update architecture documentation.
|
|
1363
|
+
|
|
1364
|
+
Do not claim verified scalability without appropriate evidence.
|
|
1365
|
+
|
|
1366
|
+
## 71. Autonomous Architecture Decisions
|
|
1367
|
+
|
|
1368
|
+
In Autonomous Build Mode, the agent may make ordinary architecture decisions within the user's approved scope.
|
|
1369
|
+
|
|
1370
|
+
Examples:
|
|
1371
|
+
|
|
1372
|
+
- Selecting a suitable framework for a new project.
|
|
1373
|
+
- Defining module boundaries.
|
|
1374
|
+
- Choosing internal API conventions.
|
|
1375
|
+
- Organizing application layers.
|
|
1376
|
+
- Selecting local development tools.
|
|
1377
|
+
- Designing test architecture.
|
|
1378
|
+
- Preparing deployment configuration.
|
|
1379
|
+
- Documenting future scaling paths.
|
|
1380
|
+
|
|
1381
|
+
The agent should record material decisions without interrupting for routine approvals.
|
|
1382
|
+
|
|
1383
|
+
High-risk and protected operations remain subject to human authorization.
|
|
1384
|
+
|
|
1385
|
+
## 72. Autonomous Engineering Standards
|
|
1386
|
+
|
|
1387
|
+
Autonomous Build Mode changes the approval workflow, not architecture quality.
|
|
1388
|
+
|
|
1389
|
+
Apply all relevant Global Engineering Standards.
|
|
1390
|
+
|
|
1391
|
+
The agent must:
|
|
1392
|
+
|
|
1393
|
+
- Use secure defaults.
|
|
1394
|
+
- Protect personal data.
|
|
1395
|
+
- Preserve data integrity.
|
|
1396
|
+
- Design maintainable components.
|
|
1397
|
+
- Support credible future scalability.
|
|
1398
|
+
- Avoid unnecessary infrastructure costs.
|
|
1399
|
+
- Define testing and validation.
|
|
1400
|
+
- Implement appropriate observability.
|
|
1401
|
+
- Respect platform requirements.
|
|
1402
|
+
- Document significant decisions.
|
|
1403
|
+
- Report limitations honestly.
|
|
1404
|
+
|
|
1405
|
+
Do not reduce engineering quality to finish faster.
|
|
1406
|
+
|
|
1407
|
+
## 73. Protected Architecture Operations
|
|
1408
|
+
|
|
1409
|
+
Require specific authorization before:
|
|
1410
|
+
|
|
1411
|
+
- Production architecture migrations.
|
|
1412
|
+
- Destructive database changes.
|
|
1413
|
+
- Changing privileged security policies.
|
|
1414
|
+
- Modifying live cloud infrastructure.
|
|
1415
|
+
- Introducing significant paid commitments.
|
|
1416
|
+
- Disruptive production deployment.
|
|
1417
|
+
- Broad changes outside approved scope.
|
|
1418
|
+
- Publishing applications or services.
|
|
1419
|
+
- Moving sensitive production data between providers.
|
|
1420
|
+
|
|
1421
|
+
A general autonomous development request does not grant blanket permission for these operations.
|
|
1422
|
+
|
|
1423
|
+
Consult docs/governance.md.
|
|
1424
|
+
|
|
1425
|
+
## 74. Architecture Exceptions
|
|
1426
|
+
|
|
1427
|
+
When a standard cannot reasonably be satisfied:
|
|
1428
|
+
|
|
1429
|
+
1. Identify the conflicting requirement.
|
|
1430
|
+
2. Explain the limitation.
|
|
1431
|
+
3. Evaluate alternatives.
|
|
1432
|
+
4. Assess risks.
|
|
1433
|
+
5. Identify compensating controls.
|
|
1434
|
+
6. Prepare an exception request.
|
|
1435
|
+
7. Obtain required approval.
|
|
1436
|
+
8. Define review conditions.
|
|
1437
|
+
|
|
1438
|
+
Use:
|
|
1439
|
+
|
|
1440
|
+
~/engineering-standards/templates/EXCEPTIONS.md
|
|
1441
|
+
|
|
1442
|
+
An AI coding agent cannot approve its own standards exception.
|
|
1443
|
+
|
|
1444
|
+
## 75. Architecture Cost Optimization
|
|
1445
|
+
|
|
1446
|
+
Before adding infrastructure complexity, assess:
|
|
1447
|
+
|
|
1448
|
+
- Real resource demand.
|
|
1449
|
+
- Existing capacity.
|
|
1450
|
+
- Managed alternatives.
|
|
1451
|
+
- Operational overhead.
|
|
1452
|
+
- Security requirements.
|
|
1453
|
+
- Reliability requirements.
|
|
1454
|
+
- Recurring expenses.
|
|
1455
|
+
- Scaling thresholds.
|
|
1456
|
+
|
|
1457
|
+
Prefer low-complexity solutions when requirements are satisfied.
|
|
1458
|
+
|
|
1459
|
+
Do not compromise essential safeguards for lower cost.
|
|
1460
|
+
|
|
1461
|
+
## 76. Architecture Definition of Done
|
|
1462
|
+
|
|
1463
|
+
For significant architecture work:
|
|
1464
|
+
|
|
1465
|
+
- Requirements identified.
|
|
1466
|
+
- Technical context verified.
|
|
1467
|
+
- Alternatives evaluated.
|
|
1468
|
+
- Security considered.
|
|
1469
|
+
- Privacy considered.
|
|
1470
|
+
- Data integrity protected.
|
|
1471
|
+
- Scalability approach justified.
|
|
1472
|
+
- Reliability addressed.
|
|
1473
|
+
- Costs evaluated.
|
|
1474
|
+
- Maintainability considered.
|
|
1475
|
+
- Relevant tests executed where feasible.
|
|
1476
|
+
- Compatibility reviewed.
|
|
1477
|
+
- Important decisions documented.
|
|
1478
|
+
- Protected operations authorized.
|
|
1479
|
+
- Limitations reported.
|
|
1480
|
+
- Human actions identified.
|
|
1481
|
+
|
|
1482
|
+
Do not describe an architecture as production-ready without relevant verification.
|
|
1483
|
+
|
|
1484
|
+
## 77. Final Architecture Reporting
|
|
1485
|
+
|
|
1486
|
+
Report:
|
|
1487
|
+
|
|
1488
|
+
1. Project context.
|
|
1489
|
+
2. Existing or selected architecture.
|
|
1490
|
+
3. Main components.
|
|
1491
|
+
4. Significant technical decisions.
|
|
1492
|
+
5. Alternatives evaluated.
|
|
1493
|
+
6. Security and privacy considerations.
|
|
1494
|
+
7. Data architecture.
|
|
1495
|
+
8. Scalability strategy.
|
|
1496
|
+
9. Reliability and recovery.
|
|
1497
|
+
10. Infrastructure and deployment.
|
|
1498
|
+
11. Cost implications.
|
|
1499
|
+
12. Validation performed.
|
|
1500
|
+
13. Unverified assumptions.
|
|
1501
|
+
14. Important risks.
|
|
1502
|
+
15. Required human actions.
|
|
1503
|
+
|
|
1504
|
+
Clearly distinguish design recommendations from implemented architecture.
|
|
1505
|
+
|
|
1506
|
+
## 78. Final Architecture Principles
|
|
1507
|
+
|
|
1508
|
+
Base architecture on real requirements.
|
|
1509
|
+
Prefer clear component responsibilities.
|
|
1510
|
+
Preserve separation of concerns.
|
|
1511
|
+
Protect security boundaries.
|
|
1512
|
+
Apply privacy by design.
|
|
1513
|
+
Preserve data integrity.
|
|
1514
|
+
Use explicit and testable interfaces.
|
|
1515
|
+
Avoid unnecessary coupling.
|
|
1516
|
+
Prefer maintainable modular systems.
|
|
1517
|
+
Do not introduce microservices without justification.
|
|
1518
|
+
Do not introduce Kubernetes without justification.
|
|
1519
|
+
Design credible growth paths.
|
|
1520
|
+
Use evidence for performance decisions.
|
|
1521
|
+
Consider reliability and recovery.
|
|
1522
|
+
Evaluate financial implications.
|
|
1523
|
+
Preserve existing production systems.
|
|
1524
|
+
Prefer incremental modernization.
|
|
1525
|
+
Keep important architectural decisions documented.
|
|
1526
|
+
Respect actual platform constraints.
|
|
1527
|
+
Support authorized autonomous development.
|
|
1528
|
+
Maintain engineering quality in all operating modes.
|
|
1529
|
+
Require authorization for protected operations.
|
|
1530
|
+
Never fabricate architecture validation.
|
|
1531
|
+
Report limitations honestly.
|