@defai.digital/automatosx 5.6.35 → 5.7.2

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 (106) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/README.md +44 -2
  3. package/dist/index.js +1129 -345
  4. package/examples/agents/.automatosx/abilities/accessibility.md +115 -0
  5. package/examples/agents/.automatosx/abilities/api-design.md +159 -0
  6. package/examples/agents/.automatosx/abilities/best-practices.md +102 -0
  7. package/examples/agents/.automatosx/abilities/caching-strategy.md +165 -0
  8. package/examples/agents/.automatosx/abilities/ci-cd.md +61 -0
  9. package/examples/agents/.automatosx/abilities/clean-code.md +398 -0
  10. package/examples/agents/.automatosx/abilities/code-generation.md +95 -0
  11. package/examples/agents/.automatosx/abilities/code-review.md +42 -0
  12. package/examples/agents/.automatosx/abilities/component-architecture.md +112 -0
  13. package/examples/agents/.automatosx/abilities/content-creation.md +97 -0
  14. package/examples/agents/.automatosx/abilities/data-modeling.md +171 -0
  15. package/examples/agents/.automatosx/abilities/data-validation.md +50 -0
  16. package/examples/agents/.automatosx/abilities/db-modeling.md +158 -0
  17. package/examples/agents/.automatosx/abilities/debugging.md +43 -0
  18. package/examples/agents/.automatosx/abilities/dependency-audit.md +60 -0
  19. package/examples/agents/.automatosx/abilities/design-patterns.md +437 -0
  20. package/examples/agents/.automatosx/abilities/design-system-implementation.md +126 -0
  21. package/examples/agents/.automatosx/abilities/documentation.md +54 -0
  22. package/examples/agents/.automatosx/abilities/error-analysis.md +107 -0
  23. package/examples/agents/.automatosx/abilities/etl-pipelines.md +44 -0
  24. package/examples/agents/.automatosx/abilities/feasibility-study.md +20 -0
  25. package/examples/agents/.automatosx/abilities/general-assistance.md +26 -0
  26. package/examples/agents/.automatosx/abilities/idea-evaluation.md +21 -0
  27. package/examples/agents/.automatosx/abilities/infra-as-code.md +57 -0
  28. package/examples/agents/.automatosx/abilities/job-orchestration.md +44 -0
  29. package/examples/agents/.automatosx/abilities/literature-review.md +19 -0
  30. package/examples/agents/.automatosx/abilities/logical-analysis.md +21 -0
  31. package/examples/agents/.automatosx/abilities/longform-report.md +25 -0
  32. package/examples/agents/.automatosx/abilities/mathematical-reasoning.md +170 -0
  33. package/examples/agents/.automatosx/abilities/mission-analysis.md +49 -0
  34. package/examples/agents/.automatosx/abilities/observability.md +61 -0
  35. package/examples/agents/.automatosx/abilities/orbital-mechanics.md +50 -0
  36. package/examples/agents/.automatosx/abilities/our-architecture-decisions.md +180 -0
  37. package/examples/agents/.automatosx/abilities/our-code-review-checklist.md +149 -0
  38. package/examples/agents/.automatosx/abilities/our-coding-standards.md +270 -0
  39. package/examples/agents/.automatosx/abilities/our-project-structure.md +183 -0
  40. package/examples/agents/.automatosx/abilities/performance-analysis.md +56 -0
  41. package/examples/agents/.automatosx/abilities/performance.md +80 -0
  42. package/examples/agents/.automatosx/abilities/problem-solving.md +50 -0
  43. package/examples/agents/.automatosx/abilities/propulsion-systems.md +50 -0
  44. package/examples/agents/.automatosx/abilities/quantum-algorithm-design.md +54 -0
  45. package/examples/agents/.automatosx/abilities/quantum-error-correction.md +56 -0
  46. package/examples/agents/.automatosx/abilities/quantum-frameworks-transpilation.md +53 -0
  47. package/examples/agents/.automatosx/abilities/quantum-noise-modeling.md +58 -0
  48. package/examples/agents/.automatosx/abilities/refactoring.md +223 -0
  49. package/examples/agents/.automatosx/abilities/release-strategy.md +58 -0
  50. package/examples/agents/.automatosx/abilities/risk-assessment.md +19 -0
  51. package/examples/agents/.automatosx/abilities/secrets-policy.md +61 -0
  52. package/examples/agents/.automatosx/abilities/secure-coding-review.md +51 -0
  53. package/examples/agents/.automatosx/abilities/security-audit.md +65 -0
  54. package/examples/agents/.automatosx/abilities/software-architecture.md +394 -0
  55. package/examples/agents/.automatosx/abilities/solid-principles.md +341 -0
  56. package/examples/agents/.automatosx/abilities/sql-optimization.md +84 -0
  57. package/examples/agents/.automatosx/abilities/state-management.md +96 -0
  58. package/examples/agents/.automatosx/abilities/task-planning.md +65 -0
  59. package/examples/agents/.automatosx/abilities/technical-writing.md +77 -0
  60. package/examples/agents/.automatosx/abilities/telemetry-diagnostics.md +51 -0
  61. package/examples/agents/.automatosx/abilities/testing.md +47 -0
  62. package/examples/agents/.automatosx/abilities/threat-modeling.md +49 -0
  63. package/examples/agents/.automatosx/abilities/troubleshooting.md +80 -0
  64. package/examples/agents/.automatosx/agents/aerospace-scientist.yaml +75 -0
  65. package/examples/agents/.automatosx/agents/backend.yaml +152 -0
  66. package/examples/agents/.automatosx/agents/ceo.yaml +63 -0
  67. package/examples/agents/.automatosx/agents/creative-marketer.yaml +121 -0
  68. package/examples/agents/.automatosx/agents/cto.yaml +72 -0
  69. package/examples/agents/.automatosx/agents/data-scientist.yaml +124 -0
  70. package/examples/agents/.automatosx/agents/data.yaml +77 -0
  71. package/examples/agents/.automatosx/agents/design.yaml +74 -0
  72. package/examples/agents/.automatosx/agents/devops.yaml +89 -0
  73. package/examples/agents/.automatosx/agents/frontend.yaml +139 -0
  74. package/examples/agents/.automatosx/agents/fullstack.yaml +151 -0
  75. package/examples/agents/.automatosx/agents/mobile.yaml +161 -0
  76. package/examples/agents/.automatosx/agents/product.yaml +72 -0
  77. package/examples/agents/.automatosx/agents/quality.yaml +79 -0
  78. package/examples/agents/.automatosx/agents/quantum-engineer.yaml +75 -0
  79. package/examples/agents/.automatosx/agents/researcher.yaml +71 -0
  80. package/examples/agents/.automatosx/agents/security.yaml +86 -0
  81. package/examples/agents/.automatosx/agents/stan.yaml +189 -0
  82. package/examples/agents/.automatosx/agents/writer.yaml +78 -0
  83. package/examples/agents/.automatosx/teams/business.yaml +56 -0
  84. package/examples/agents/.automatosx/teams/core.yaml +60 -0
  85. package/examples/agents/.automatosx/teams/design.yaml +58 -0
  86. package/examples/agents/.automatosx/teams/engineering.yaml +69 -0
  87. package/examples/agents/.automatosx/teams/research.yaml +56 -0
  88. package/examples/agents/.automatosx/templates/analyst.yaml +60 -0
  89. package/examples/agents/.automatosx/templates/assistant.yaml +48 -0
  90. package/examples/agents/.automatosx/templates/basic-agent.yaml +28 -0
  91. package/examples/agents/.automatosx/templates/code-reviewer.yaml +52 -0
  92. package/examples/agents/.automatosx/templates/debugger.yaml +63 -0
  93. package/examples/agents/.automatosx/templates/designer.yaml +69 -0
  94. package/examples/agents/.automatosx/templates/developer.yaml +60 -0
  95. package/examples/agents/.automatosx/templates/fullstack-developer.yaml +395 -0
  96. package/examples/agents/.automatosx/templates/qa-specialist.yaml +71 -0
  97. package/examples/agents/.claude/commands/ax-agent.md +37 -0
  98. package/examples/agents/.claude/commands/ax-clear.md +22 -0
  99. package/examples/agents/.claude/commands/ax-init.md +25 -0
  100. package/examples/agents/.claude/commands/ax-list.md +19 -0
  101. package/examples/agents/.claude/commands/ax-memory.md +25 -0
  102. package/examples/agents/.claude/commands/ax-status.md +24 -0
  103. package/examples/agents/.claude/commands/ax-update.md +28 -0
  104. package/examples/agents/.claude/mcp/automatosx.json +244 -0
  105. package/examples/agents/CLAUDE.md +262 -0
  106. package/package.json +1 -1
@@ -0,0 +1,394 @@
1
+ # Software Architecture Ability
2
+
3
+ Expert knowledge of software architecture patterns, principles, and system design for building scalable, maintainable applications.
4
+
5
+ ## Overview
6
+
7
+ Software architecture is the fundamental organization of a system, embodied in its components, their relationships, and the principles governing its design and evolution.
8
+
9
+ ## Architectural Principles
10
+
11
+ ### 1. Separation of Concerns
12
+
13
+ Divide application into distinct sections, each addressing a separate concern.
14
+
15
+ **Benefits**:
16
+ - Easier to understand and maintain
17
+ - Enables parallel development
18
+ - Facilitates testing and reuse
19
+
20
+ **Examples**:
21
+ - Presentation vs. Business Logic vs. Data Access
22
+ - Read models vs. Write models (CQRS)
23
+ - Frontend vs. Backend
24
+
25
+ ### 2. Modularity and Encapsulation
26
+
27
+ Break system into independent, interchangeable modules with well-defined interfaces.
28
+
29
+ **Principles**:
30
+ - High cohesion: Related functionality together
31
+ - Low coupling: Minimal dependencies between modules
32
+ - Information hiding: Internal implementation details hidden
33
+
34
+ ### 3. Abstraction
35
+
36
+ Hide complexity behind simpler interfaces.
37
+
38
+ **Levels**:
39
+ - Hardware → Operating System
40
+ - Operating System → Runtime
41
+ - Runtime → Framework
42
+ - Framework → Application
43
+
44
+ ### 4. Layering
45
+
46
+ Organize system into horizontal layers with clear responsibilities.
47
+
48
+ **Rules**:
49
+ - Each layer depends only on layers below
50
+ - Higher layers use services of lower layers
51
+ - No circular dependencies
52
+
53
+ ### 5. Don't Repeat Yourself (DRY)
54
+
55
+ Every piece of knowledge should have a single authoritative representation.
56
+
57
+ ### 6. YAGNI (You Aren't Gonna Need It)
58
+
59
+ Don't add functionality until it's necessary.
60
+
61
+ ## Common Architectural Patterns
62
+
63
+ ### Layered Architecture
64
+
65
+ **Structure**: Organized into horizontal layers
66
+ **Layers** (typical):
67
+ 1. Presentation Layer (UI)
68
+ 2. Application Layer (Use Cases)
69
+ 3. Domain Layer (Business Logic)
70
+ 4. Infrastructure Layer (Data Access, External Services)
71
+
72
+ **When to use**:
73
+ - Traditional monolithic applications
74
+ - Clear separation of concerns needed
75
+ - Team organized by technical layers
76
+
77
+ **Pros**:
78
+ - Simple and well-understood
79
+ - Clear separation of concerns
80
+ - Easy to test layers independently
81
+
82
+ **Cons**:
83
+ - Can become tightly coupled
84
+ - Changes may ripple through layers
85
+ - Scalability limitations
86
+
87
+ ```
88
+ ┌─────────────────────────────┐
89
+ │ Presentation Layer │
90
+ ├─────────────────────────────┤
91
+ │ Application Layer │
92
+ ├─────────────────────────────┤
93
+ │ Domain Layer │
94
+ ├─────────────────────────────┤
95
+ │ Infrastructure Layer │
96
+ └─────────────────────────────┘
97
+ ```
98
+
99
+ ### Hexagonal Architecture (Ports and Adapters)
100
+
101
+ **Structure**: Core business logic surrounded by adapters for external systems
102
+
103
+ **Components**:
104
+ - **Core**: Domain logic (pure, no dependencies)
105
+ - **Ports**: Interfaces defining how core interacts with outside
106
+ - **Adapters**: Implementations of ports (DB, HTTP, etc.)
107
+
108
+ **When to use**:
109
+ - Domain-driven design
110
+ - Need to swap implementations easily
111
+ - Comprehensive test coverage desired
112
+
113
+ **Pros**:
114
+ - Core is independent of frameworks
115
+ - Easy to test (mock adapters)
116
+ - Flexibility in implementation choices
117
+
118
+ **Cons**:
119
+ - More complex than layered
120
+ - Requires discipline to maintain boundaries
121
+ - More abstractions and interfaces
122
+
123
+ ```
124
+ ┌────────────────────┐
125
+ │ Adapters (DB, │
126
+ │ HTTP, etc.) │
127
+ └────────┬───────────┘
128
+
129
+ ┌────────▼───────────┐
130
+ │ Ports │
131
+ │ (Interfaces) │
132
+ └────────┬───────────┘
133
+
134
+ ┌────────▼───────────┐
135
+ │ Domain │
136
+ │ (Business Logic) │
137
+ └────────────────────┘
138
+ ```
139
+
140
+ ### Microservices Architecture
141
+
142
+ **Structure**: Application as collection of small, independent services
143
+
144
+ **Characteristics**:
145
+ - Each service is independently deployable
146
+ - Services communicate via APIs (HTTP, messaging)
147
+ - Each service has its own database
148
+ - Organized around business capabilities
149
+
150
+ **When to use**:
151
+ - Large, complex applications
152
+ - Need for independent scaling
153
+ - Multiple teams working independently
154
+ - Polyglot persistence needs
155
+
156
+ **Pros**:
157
+ - Independent deployment and scaling
158
+ - Technology diversity
159
+ - Fault isolation
160
+ - Team autonomy
161
+
162
+ **Cons**:
163
+ - Distributed system complexity
164
+ - Network latency
165
+ - Data consistency challenges
166
+ - Operational overhead
167
+
168
+ ### Event-Driven Architecture
169
+
170
+ **Structure**: Components communicate through events
171
+
172
+ **Components**:
173
+ - **Event Producers**: Generate events
174
+ - **Event Channels**: Transport events
175
+ - **Event Consumers**: React to events
176
+
177
+ **Patterns**:
178
+ - Event Notification
179
+ - Event-Carried State Transfer
180
+ - Event Sourcing
181
+
182
+ **When to use**:
183
+ - Asynchronous processing needed
184
+ - Loose coupling desired
185
+ - Real-time updates required
186
+ - Complex workflows
187
+
188
+ **Pros**:
189
+ - Loose coupling
190
+ - Scalability
191
+ - Flexibility
192
+ - Asynchronous processing
193
+
194
+ **Cons**:
195
+ - Complexity in debugging
196
+ - Eventual consistency
197
+ - Event versioning challenges
198
+
199
+ ### CQRS (Command Query Responsibility Segregation)
200
+
201
+ **Structure**: Separate models for reading and writing data
202
+
203
+ **Components**:
204
+ - **Command Model**: Handles writes (create, update, delete)
205
+ - **Query Model**: Handles reads (optimized for specific views)
206
+
207
+ **When to use**:
208
+ - Read and write patterns differ significantly
209
+ - Need to scale reads and writes independently
210
+ - Complex domain logic
211
+ - Event sourcing
212
+
213
+ **Pros**:
214
+ - Optimized for different access patterns
215
+ - Independent scaling
216
+ - Clear command/query separation
217
+
218
+ **Cons**:
219
+ - Increased complexity
220
+ - Eventual consistency
221
+ - Synchronization overhead
222
+
223
+ ## Architectural Decision Making
224
+
225
+ ### Architecture Trade-offs
226
+
227
+ **Performance vs. Maintainability**:
228
+ - Optimize critical paths
229
+ - Keep non-critical code clean and simple
230
+
231
+ **Flexibility vs. Simplicity**:
232
+ - Don't over-engineer for future needs
233
+ - Refactor when patterns emerge
234
+
235
+ **Consistency vs. Availability (CAP Theorem)**:
236
+ - Can't have all three: Consistency, Availability, Partition Tolerance
237
+ - Choose based on business requirements
238
+
239
+ ### Evaluating Architectures
240
+
241
+ **Quality Attributes**:
242
+ - **Performance**: Response time, throughput
243
+ - **Scalability**: Handle increasing load
244
+ - **Availability**: Uptime, fault tolerance
245
+ - **Security**: Authentication, authorization, data protection
246
+ - **Maintainability**: Easy to modify and extend
247
+ - **Testability**: Easy to verify correctness
248
+ - **Deployability**: Easy to deploy and operate
249
+
250
+ **Architecture Review Checklist**:
251
+ - [ ] Clear separation of concerns
252
+ - [ ] Appropriate abstraction levels
253
+ - [ ] Well-defined component boundaries
254
+ - [ ] Explicit dependencies
255
+ - [ ] Scalability considerations
256
+ - [ ] Security considerations
257
+ - [ ] Testability built in
258
+ - [ ] Operational concerns addressed
259
+
260
+ ## System Design Patterns
261
+
262
+ ### Database Patterns
263
+
264
+ **Repository Pattern**:
265
+ - Abstract data access logic
266
+ - Decouple domain from persistence
267
+
268
+ **Unit of Work**:
269
+ - Maintain list of objects affected by transaction
270
+ - Coordinate writing changes
271
+
272
+ **Database per Service** (Microservices):
273
+ - Each service owns its database
274
+ - No shared databases
275
+
276
+ ### Communication Patterns
277
+
278
+ **API Gateway**:
279
+ - Single entry point for clients
280
+ - Request routing and composition
281
+ - Cross-cutting concerns (auth, logging)
282
+
283
+ **Service Mesh**:
284
+ - Infrastructure layer for service-to-service communication
285
+ - Handles retries, timeouts, circuit breaking
286
+
287
+ **Message Queue**:
288
+ - Asynchronous communication
289
+ - Decoupling producers and consumers
290
+ - Load leveling
291
+
292
+ ### Resilience Patterns
293
+
294
+ **Circuit Breaker**:
295
+ - Prevent cascading failures
296
+ - Fail fast when service unavailable
297
+ - Automatic recovery attempts
298
+
299
+ **Retry with Backoff**:
300
+ - Retry failed operations
301
+ - Exponential backoff to avoid overwhelming
302
+ - Maximum retry limit
303
+
304
+ **Bulkhead**:
305
+ - Isolate resources to prevent total failure
306
+ - Similar to ship compartments
307
+ - Limit impact of failures
308
+
309
+ **Timeout**:
310
+ - Set maximum wait time
311
+ - Prevent hanging operations
312
+ - Graceful degradation
313
+
314
+ ## Architecture Documentation
315
+
316
+ ### C4 Model
317
+
318
+ **Context Diagram**: System and its users
319
+ **Container Diagram**: High-level components
320
+ **Component Diagram**: Internal structure
321
+ **Code Diagram**: Class-level details (optional)
322
+
323
+ ### Architecture Decision Records (ADR)
324
+
325
+ **Template**:
326
+ ```
327
+ # ADR-001: Use PostgreSQL for Primary Database
328
+
329
+ ## Status
330
+ Accepted
331
+
332
+ ## Context
333
+ We need a database that supports complex queries, transactions, and scales to millions of records.
334
+
335
+ ## Decision
336
+ We will use PostgreSQL as our primary relational database.
337
+
338
+ ## Consequences
339
+ **Positive**:
340
+ - ACID compliance
341
+ - Rich query capabilities
342
+ - Proven scalability
343
+ - Strong ecosystem
344
+
345
+ **Negative**:
346
+ - Requires specialized knowledge
347
+ - Vertical scaling limitations
348
+ - Operational overhead
349
+
350
+ ## Alternatives Considered
351
+ - MySQL: Less feature-rich
352
+ - MongoDB: Consistency concerns
353
+ - DynamoDB: Vendor lock-in
354
+ ```
355
+
356
+ ## Anti-patterns to Avoid
357
+
358
+ ### Big Ball of Mud
359
+ - No clear architecture
360
+ - Everything depends on everything
361
+ - **Solution**: Gradual refactoring, introduce boundaries
362
+
363
+ ### Monolithic Database
364
+ - All services share one database
365
+ - Tight coupling
366
+ - **Solution**: Database per service, API composition
367
+
368
+ ### Distributed Monolith
369
+ - Microservices that must be deployed together
370
+ - Worst of both worlds
371
+ - **Solution**: True service independence or consolidate
372
+
373
+ ### God Object
374
+ - Single class/service knows/does everything
375
+ - **Solution**: Single Responsibility Principle
376
+
377
+ ## Best Practices
378
+
379
+ 1. **Start Simple**: Don't over-engineer early
380
+ 2. **Evolve Architecture**: Refactor as you learn
381
+ 3. **Document Decisions**: Use ADRs
382
+ 4. **Define Boundaries**: Clear contracts between components
383
+ 5. **Test Architecture**: Fitness functions, architecture tests
384
+ 6. **Monitor**: Metrics, logging, tracing
385
+ 7. **Security by Design**: Not bolted on later
386
+ 8. **Operational Concerns**: Deployment, monitoring, debugging
387
+
388
+ ## Further Reading
389
+
390
+ - "Software Architecture: The Hard Parts" by Neal Ford et al.
391
+ - "Building Microservices" by Sam Newman
392
+ - "Domain-Driven Design" by Eric Evans
393
+ - "Clean Architecture" by Robert C. Martin
394
+ - "Fundamentals of Software Architecture" by Mark Richards and Neal Ford