oh-my-customcode 0.12.0 → 0.12.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 (131) hide show
  1. package/README.md +4 -8
  2. package/dist/cli/index.js +382 -308
  3. package/dist/index.js +99 -260
  4. package/package.json +2 -4
  5. package/templates/.codex/agents/arch-documenter.md +0 -33
  6. package/templates/.codex/agents/arch-speckit-agent.md +0 -47
  7. package/templates/.codex/agents/be-express-expert.md +0 -30
  8. package/templates/.codex/agents/be-fastapi-expert.md +0 -43
  9. package/templates/.codex/agents/be-go-backend-expert.md +0 -43
  10. package/templates/.codex/agents/be-nestjs-expert.md +0 -28
  11. package/templates/.codex/agents/be-springboot-expert.md +0 -40
  12. package/templates/.codex/agents/db-postgres-expert.md +0 -36
  13. package/templates/.codex/agents/db-redis-expert.md +0 -36
  14. package/templates/.codex/agents/db-supabase-expert.md +0 -35
  15. package/templates/.codex/agents/de-airflow-expert.md +0 -34
  16. package/templates/.codex/agents/de-dbt-expert.md +0 -34
  17. package/templates/.codex/agents/de-kafka-expert.md +0 -81
  18. package/templates/.codex/agents/de-pipeline-expert.md +0 -32
  19. package/templates/.codex/agents/de-snowflake-expert.md +0 -36
  20. package/templates/.codex/agents/de-spark-expert.md +0 -36
  21. package/templates/.codex/agents/fe-svelte-agent.md +0 -29
  22. package/templates/.codex/agents/fe-vercel-agent.md +0 -37
  23. package/templates/.codex/agents/fe-vuejs-agent.md +0 -30
  24. package/templates/.codex/agents/infra-aws-expert.md +0 -47
  25. package/templates/.codex/agents/infra-docker-expert.md +0 -47
  26. package/templates/.codex/agents/lang-golang-expert.md +0 -43
  27. package/templates/.codex/agents/lang-java21-expert.md +0 -39
  28. package/templates/.codex/agents/lang-kotlin-expert.md +0 -43
  29. package/templates/.codex/agents/lang-python-expert.md +0 -43
  30. package/templates/.codex/agents/lang-rust-expert.md +0 -43
  31. package/templates/.codex/agents/lang-typescript-expert.md +0 -43
  32. package/templates/.codex/agents/mgr-claude-code-bible.md +0 -61
  33. package/templates/.codex/agents/mgr-creator.md +0 -39
  34. package/templates/.codex/agents/mgr-gitnerd.md +0 -45
  35. package/templates/.codex/agents/mgr-sauron.md +0 -161
  36. package/templates/.codex/agents/mgr-supplier.md +0 -35
  37. package/templates/.codex/agents/mgr-sync-checker.md +0 -38
  38. package/templates/.codex/agents/mgr-updater.md +0 -33
  39. package/templates/.codex/agents/qa-engineer.md +0 -32
  40. package/templates/.codex/agents/qa-planner.md +0 -73
  41. package/templates/.codex/agents/qa-writer.md +0 -27
  42. package/templates/.codex/agents/sys-memory-keeper.md +0 -43
  43. package/templates/.codex/agents/sys-naggy.md +0 -37
  44. package/templates/.codex/agents/tool-bun-expert.md +0 -26
  45. package/templates/.codex/agents/tool-npm-expert.md +0 -30
  46. package/templates/.codex/agents/tool-optimizer.md +0 -34
  47. package/templates/.codex/codex-native-hash.txt +0 -1
  48. package/templates/.codex/contexts/dev.md +0 -20
  49. package/templates/.codex/contexts/ecomode.md +0 -63
  50. package/templates/.codex/contexts/index.yaml +0 -41
  51. package/templates/.codex/contexts/research.md +0 -28
  52. package/templates/.codex/contexts/review.md +0 -23
  53. package/templates/.codex/hooks/hooks.json +0 -151
  54. package/templates/.codex/install-hooks.sh +0 -100
  55. package/templates/.codex/rules/MAY-optimization.md +0 -29
  56. package/templates/.codex/rules/MUST-agent-design.md +0 -57
  57. package/templates/.codex/rules/MUST-agent-identification.md +0 -29
  58. package/templates/.codex/rules/MUST-continuous-improvement.md +0 -25
  59. package/templates/.codex/rules/MUST-intent-transparency.md +0 -42
  60. package/templates/.codex/rules/MUST-language-policy.md +0 -27
  61. package/templates/.codex/rules/MUST-orchestrator-coordination.md +0 -128
  62. package/templates/.codex/rules/MUST-parallel-execution.md +0 -97
  63. package/templates/.codex/rules/MUST-permissions.md +0 -30
  64. package/templates/.codex/rules/MUST-safety.md +0 -23
  65. package/templates/.codex/rules/MUST-sync-verification.md +0 -125
  66. package/templates/.codex/rules/MUST-tool-identification.md +0 -82
  67. package/templates/.codex/rules/SHOULD-agent-teams.md +0 -39
  68. package/templates/.codex/rules/SHOULD-ecomode.md +0 -37
  69. package/templates/.codex/rules/SHOULD-error-handling.md +0 -33
  70. package/templates/.codex/rules/SHOULD-hud-statusline.md +0 -32
  71. package/templates/.codex/rules/SHOULD-interaction.md +0 -34
  72. package/templates/.codex/rules/SHOULD-memory-integration.md +0 -39
  73. package/templates/.codex/rules/index.yaml +0 -141
  74. package/templates/.codex/skills/airflow-best-practices/SKILL.md +0 -56
  75. package/templates/.codex/skills/audit-agents/SKILL.md +0 -116
  76. package/templates/.codex/skills/aws-best-practices/SKILL.md +0 -280
  77. package/templates/.codex/skills/claude-code-bible/SKILL.md +0 -180
  78. package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +0 -244
  79. package/templates/.codex/skills/create-agent/SKILL.md +0 -91
  80. package/templates/.codex/skills/dbt-best-practices/SKILL.md +0 -54
  81. package/templates/.codex/skills/de-lead-routing/SKILL.md +0 -243
  82. package/templates/.codex/skills/dev-lead-routing/SKILL.md +0 -94
  83. package/templates/.codex/skills/dev-refactor/SKILL.md +0 -123
  84. package/templates/.codex/skills/dev-review/SKILL.md +0 -81
  85. package/templates/.codex/skills/docker-best-practices/SKILL.md +0 -275
  86. package/templates/.codex/skills/fastapi-best-practices/SKILL.md +0 -270
  87. package/templates/.codex/skills/fix-refs/SKILL.md +0 -107
  88. package/templates/.codex/skills/go-backend-best-practices/SKILL.md +0 -338
  89. package/templates/.codex/skills/go-best-practices/CLAUDE.md +0 -9
  90. package/templates/.codex/skills/go-best-practices/SKILL.md +0 -203
  91. package/templates/.codex/skills/help/SKILL.md +0 -125
  92. package/templates/.codex/skills/intent-detection/SKILL.md +0 -215
  93. package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +0 -349
  94. package/templates/.codex/skills/kafka-best-practices/SKILL.md +0 -52
  95. package/templates/.codex/skills/kotlin-best-practices/SKILL.md +0 -256
  96. package/templates/.codex/skills/lists/SKILL.md +0 -78
  97. package/templates/.codex/skills/memory-management/SKILL.md +0 -195
  98. package/templates/.codex/skills/memory-recall/SKILL.md +0 -152
  99. package/templates/.codex/skills/memory-save/SKILL.md +0 -126
  100. package/templates/.codex/skills/monitoring-setup/SKILL.md +0 -115
  101. package/templates/.codex/skills/npm-audit/SKILL.md +0 -72
  102. package/templates/.codex/skills/npm-publish/SKILL.md +0 -63
  103. package/templates/.codex/skills/npm-version/SKILL.md +0 -75
  104. package/templates/.codex/skills/optimize-analyze/SKILL.md +0 -55
  105. package/templates/.codex/skills/optimize-bundle/SKILL.md +0 -67
  106. package/templates/.codex/skills/optimize-report/SKILL.md +0 -74
  107. package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +0 -83
  108. package/templates/.codex/skills/postgres-best-practices/SKILL.md +0 -66
  109. package/templates/.codex/skills/python-best-practices/SKILL.md +0 -222
  110. package/templates/.codex/skills/qa-lead-routing/SKILL.md +0 -290
  111. package/templates/.codex/skills/react-best-practices/SKILL.md +0 -101
  112. package/templates/.codex/skills/redis-best-practices/SKILL.md +0 -83
  113. package/templates/.codex/skills/result-aggregation/SKILL.md +0 -164
  114. package/templates/.codex/skills/rust-best-practices/SKILL.md +0 -267
  115. package/templates/.codex/skills/sauron-watch/SKILL.md +0 -144
  116. package/templates/.codex/skills/secretary-routing/SKILL.md +0 -203
  117. package/templates/.codex/skills/snowflake-best-practices/SKILL.md +0 -65
  118. package/templates/.codex/skills/spark-best-practices/SKILL.md +0 -52
  119. package/templates/.codex/skills/springboot-best-practices/SKILL.md +0 -218
  120. package/templates/.codex/skills/status/SKILL.md +0 -153
  121. package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +0 -99
  122. package/templates/.codex/skills/typescript-best-practices/SKILL.md +0 -321
  123. package/templates/.codex/skills/update-docs/SKILL.md +0 -140
  124. package/templates/.codex/skills/update-external/SKILL.md +0 -149
  125. package/templates/.codex/skills/vercel-deploy/SKILL.md +0 -73
  126. package/templates/.codex/skills/web-design-guidelines/SKILL.md +0 -118
  127. package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +0 -64
  128. package/templates/.codex/uninstall-hooks.sh +0 -52
  129. package/templates/AGENTS.md.en +0 -39
  130. package/templates/AGENTS.md.ko +0 -39
  131. package/templates/manifest.codex.json +0 -43
@@ -1,141 +0,0 @@
1
- # Global Rules
2
- # Priority: MUST > SHOULD > MAY
3
-
4
- rules:
5
- # MUST - Never violate
6
- - id: R000
7
- name: language-policy
8
- title: Language & Delegation Policy
9
- path: ./MUST-language-policy.md
10
- priority: MUST
11
- scope: all
12
-
13
- - id: R001
14
- name: safety
15
- title: Safety Rules
16
- path: ./MUST-safety.md
17
- priority: MUST
18
- scope: all
19
-
20
- - id: R002
21
- name: permissions
22
- title: Permission Rules
23
- path: ./MUST-permissions.md
24
- priority: MUST
25
- scope: all
26
-
27
- - id: R007
28
- name: agent-identification
29
- title: Agent Identification Rules
30
- path: ./MUST-agent-identification.md
31
- priority: MUST
32
- scope: all
33
-
34
- - id: R008
35
- name: tool-identification
36
- title: Tool Usage Identification Rules
37
- path: ./MUST-tool-identification.md
38
- priority: MUST
39
- scope: all
40
-
41
- - id: R009
42
- name: parallel-execution
43
- title: Parallel Execution Rules
44
- path: ./MUST-parallel-execution.md
45
- priority: MUST
46
- scope: all
47
-
48
- # Agent Design - MUST
49
- - id: R006
50
- name: agent-design
51
- title: Agent Design Rules
52
- path: ./MUST-agent-design.md
53
- priority: MUST
54
- scope: agents
55
-
56
- # Orchestrator Coordination - MUST
57
- - id: R010
58
- name: orchestrator-coordination
59
- title: Orchestrator Coordination Rules
60
- path: ./MUST-orchestrator-coordination.md
61
- priority: MUST
62
- scope: agents
63
-
64
- # Intent Transparency - MUST
65
- - id: R014
66
- name: intent-transparency
67
- title: Intent Transparency Rules
68
- path: ./MUST-intent-transparency.md
69
- priority: MUST
70
- scope: orchestrator
71
-
72
- # Continuous Improvement - MUST
73
- - id: R015
74
- name: continuous-improvement
75
- title: Continuous Improvement Rules
76
- path: ./MUST-continuous-improvement.md
77
- priority: MUST
78
- scope: all
79
-
80
- # Sync Verification - MUST
81
- - id: R016
82
- name: sync-verification
83
- title: Sync Verification Rules
84
- path: ./MUST-sync-verification.md
85
- priority: MUST
86
- scope: all
87
-
88
- # SHOULD - Strongly recommended
89
- - id: R003
90
- name: interaction
91
- title: Interaction Rules
92
- path: ./SHOULD-interaction.md
93
- priority: SHOULD
94
- scope: all
95
-
96
- - id: R004
97
- name: error-handling
98
- title: Error Handling Rules
99
- path: ./SHOULD-error-handling.md
100
- priority: SHOULD
101
- scope: all
102
-
103
- # Memory Integration - SHOULD
104
- - id: R011
105
- name: memory-integration
106
- title: Memory Integration Rules
107
- path: ./SHOULD-memory-integration.md
108
- priority: SHOULD
109
- scope: all
110
-
111
- # HUD Statusline - SHOULD
112
- - id: R012
113
- name: hud-statusline
114
- title: HUD Statusline Rules
115
- path: ./SHOULD-hud-statusline.md
116
- priority: SHOULD
117
- scope: all
118
-
119
- # Ecomode - SHOULD
120
- - id: R013
121
- name: ecomode
122
- title: Ecomode Rules
123
- path: ./SHOULD-ecomode.md
124
- priority: SHOULD
125
- scope: all
126
-
127
- # Agent Teams - SHOULD
128
- - id: R017
129
- name: agent-teams
130
- title: Agent Teams Rules
131
- path: ./SHOULD-agent-teams.md
132
- priority: SHOULD
133
- scope: orchestrator
134
-
135
- # MAY - Optional
136
- - id: R005
137
- name: optimization
138
- title: Optimization Guide
139
- path: ./MAY-optimization.md
140
- priority: MAY
141
- scope: all
@@ -1,56 +0,0 @@
1
- ---
2
- name: airflow-best-practices
3
- description: Apache Airflow best practices for DAG authoring, testing, and production deployment
4
- user-invocable: false
5
- ---
6
-
7
- # Apache Airflow Best Practices
8
-
9
- ## DAG Authoring
10
-
11
- ### Top-Level Code (CRITICAL)
12
- - Avoid heavy computation at module level (executed on every DAG parse)
13
- - Minimize imports at module level
14
- - Use `@task` decorator (TaskFlow API) for Python tasks
15
- - Keep DAG file under 1000 lines
16
-
17
- ### Scheduling
18
- - Use cron expressions or timetables
19
- - Set `catchup=False` for most cases
20
- - Use data-aware scheduling (datasets) for dependencies
21
- - Configure SLA monitoring
22
-
23
- ### Task Dependencies
24
- - Use `>>` / `<<` for clarity
25
- - Group related tasks with TaskGroup
26
- - Avoid deep nesting (max 3 levels)
27
-
28
- ## Testing
29
-
30
- ### Unit Tests
31
- - Test DAG import without errors
32
- - Detect cycles in dependencies
33
- - Mock external connections
34
- - Test task logic independently
35
-
36
- ### Integration Tests
37
- - Use Airflow test mode
38
- - Validate end-to-end workflows
39
- - Test with sample data
40
-
41
- ## Production Deployment
42
-
43
- ### Performance
44
- - Lazy-load heavy libraries inside tasks
45
- - Use connection pooling
46
- - Minimize DAG parse time
47
- - Enable parallelism
48
-
49
- ### Reliability
50
- - Set appropriate retries and retry_delay
51
- - Use SLA callbacks for monitoring
52
- - Implement proper error handling
53
- - Log important events
54
-
55
- ## References
56
- - [Airflow Best Practices](https://airflow.apache.org/docs/apache-airflow/stable/best-practices.html)
@@ -1,116 +0,0 @@
1
- ---
2
- name: audit-agents
3
- description: Audit agent dependencies and references
4
- argument-hint: "[agent-name] [--all] [--fix]"
5
- ---
6
-
7
- # Audit Agents Skill
8
-
9
- Audit agent dependencies to ensure all skill and guide references are valid and symlinks are working.
10
-
11
- ## Options
12
-
13
- ```
14
- --all, -a Audit all agents
15
- --verbose, -v Show detailed results
16
- --fix Auto-fix issues (delegates to /fix-refs)
17
- ```
18
-
19
- ## Workflow
20
-
21
- ```
22
- 1. Load agent configuration
23
- └── Read agent .md file
24
-
25
- 2. Check skills
26
- ├── Skill exists in .codex/skills/
27
- └── Skill path is valid
28
-
29
- 3. Check guides
30
- ├── Guide exists in guides/
31
- └── Guide path is valid
32
-
33
- 4. Report results
34
- ```
35
-
36
- ## Output Format
37
-
38
- ### Single Agent
39
- ```
40
- [mgr-supplier:audit lang-golang-expert]
41
-
42
- Auditing: lang-golang-expert
43
-
44
- Skills:
45
- ✓ go-best-practices
46
- Path: .codex/skills/go-best-practices/
47
- Status: Valid
48
-
49
- Guides:
50
- ✓ golang
51
- Path: guides/golang/
52
- Status: Valid
53
-
54
- Summary:
55
- Skills: 1/1 valid
56
- Guides: 1/1 valid
57
- Status: HEALTHY
58
- ```
59
-
60
- ### All Agents
61
- ```
62
- [mgr-supplier:audit --all]
63
-
64
- Auditing all agents...
65
-
66
- sw-engineer:
67
- ✓ lang-golang-expert (2/2 deps valid)
68
- ✓ lang-python-expert (2/2 deps valid)
69
- ✓ lang-rust-expert (2/2 deps valid)
70
- ✗ lang-kotlin-expert (1/2 deps valid)
71
- └─ Missing: kotlin guide symlink
72
-
73
- sw-engineer/backend:
74
- ✓ be-fastapi-expert (2/2 deps valid)
75
- ✓ be-springboot-expert (2/2 deps valid)
76
- ✓ be-go-backend-expert (2/2 deps valid)
77
-
78
- infra-engineer:
79
- ✓ infra-docker-expert (2/2 deps valid)
80
- ✓ infra-aws-expert (2/2 deps valid)
81
-
82
- Summary:
83
- Total agents: 15
84
- Healthy: 14
85
- Issues: 1
86
-
87
- Run "mgr-supplier:fix lang-kotlin-expert" to fix issues.
88
- ```
89
-
90
- ### Verbose Output
91
- ```
92
- [mgr-supplier:audit lang-golang-expert --verbose]
93
-
94
- Auditing: lang-golang-expert
95
-
96
- Configuration:
97
- Path: .codex/agents/lang-golang-expert.md
98
- Type: sw-engineer
99
- Source: internal
100
-
101
- Declared Skills:
102
- [1] go-best-practices
103
- Path: .codex/skills/go-best-practices/
104
- Exists: ✓
105
-
106
- Declared Guides:
107
- [1] golang
108
- Path: guides/golang/
109
- Exists: ✓
110
-
111
- Cross-references:
112
- ✓ go-best-practices.used_by includes lang-golang-expert
113
- ✓ golang.used_by includes lang-golang-expert
114
-
115
- Status: HEALTHY (all checks passed)
116
- ```
@@ -1,280 +0,0 @@
1
- ---
2
- name: aws-best-practices
3
- description: AWS patterns from Well-Architected Framework
4
- user-invocable: false
5
- ---
6
-
7
- ## Purpose
8
-
9
- Apply AWS patterns for building scalable, secure, and cost-effective cloud infrastructure.
10
-
11
- ## Well-Architected Framework Pillars
12
-
13
- ### 1. Operational Excellence
14
-
15
- ```yaml
16
- principles:
17
- - Perform operations as code
18
- - Make frequent, small, reversible changes
19
- - Refine operations procedures frequently
20
- - Anticipate failure
21
- - Learn from all operational failures
22
-
23
- practices:
24
- - Use CloudFormation/CDK for IaC
25
- - Implement CI/CD pipelines
26
- - Use CloudWatch for monitoring
27
- - Set up alarms and dashboards
28
- - Document runbooks
29
- ```
30
-
31
- ### 2. Security
32
-
33
- ```yaml
34
- principles:
35
- - Implement strong identity foundation
36
- - Enable traceability
37
- - Apply security at all layers
38
- - Automate security best practices
39
- - Protect data in transit and at rest
40
- - Keep people away from data
41
- - Prepare for security events
42
-
43
- iam:
44
- - Use least privilege principle
45
- - Never use root account for daily tasks
46
- - Enable MFA for all users
47
- - Use IAM roles for services
48
- - Rotate credentials regularly
49
-
50
- patterns: |
51
- # IAM Policy - Least Privilege
52
- {
53
- "Version": "2012-10-17",
54
- "Statement": [{
55
- "Effect": "Allow",
56
- "Action": [
57
- "s3:GetObject",
58
- "s3:PutObject"
59
- ],
60
- "Resource": "arn:aws:s3:::my-bucket/*",
61
- "Condition": {
62
- "IpAddress": {
63
- "aws:SourceIp": "10.0.0.0/8"
64
- }
65
- }
66
- }]
67
- }
68
- ```
69
-
70
- ### 3. Reliability
71
-
72
- ```yaml
73
- principles:
74
- - Automatically recover from failure
75
- - Test recovery procedures
76
- - Scale horizontally
77
- - Stop guessing capacity
78
- - Manage change through automation
79
-
80
- practices:
81
- - Multi-AZ deployments
82
- - Auto Scaling groups
83
- - Health checks and self-healing
84
- - Backup and disaster recovery
85
- - Loose coupling with queues
86
-
87
- patterns:
88
- high_availability: |
89
- # Multi-AZ RDS
90
- - Primary in us-east-1a
91
- - Standby in us-east-1b
92
- - Read replicas in us-east-1c
93
-
94
- auto_scaling: |
95
- # Target tracking scaling
96
- - Metric: CPUUtilization
97
- - Target: 70%
98
- - Min: 2, Max: 10
99
- ```
100
-
101
- ### 4. Performance Efficiency
102
-
103
- ```yaml
104
- principles:
105
- - Democratize advanced technologies
106
- - Go global in minutes
107
- - Use serverless architectures
108
- - Experiment more often
109
- - Consider mechanical sympathy
110
-
111
- compute:
112
- - Right-size instances
113
- - Use Spot for fault-tolerant workloads
114
- - Consider Graviton (ARM) processors
115
- - Containerize with ECS/EKS
116
-
117
- storage:
118
- - Use appropriate storage class
119
- - S3 Intelligent-Tiering for variable access
120
- - EBS volume types based on IOPS needs
121
-
122
- database:
123
- - Aurora for MySQL/PostgreSQL
124
- - DynamoDB for key-value/document
125
- - ElastiCache for caching
126
- ```
127
-
128
- ### 5. Cost Optimization
129
-
130
- ```yaml
131
- principles:
132
- - Implement cloud financial management
133
- - Adopt consumption model
134
- - Measure overall efficiency
135
- - Stop spending on undifferentiated heavy lifting
136
- - Analyze and attribute expenditure
137
-
138
- practices:
139
- - Use Reserved Instances/Savings Plans
140
- - Right-size resources
141
- - Delete unused resources
142
- - Use Spot Instances
143
- - Implement auto scaling
144
-
145
- tools:
146
- - AWS Cost Explorer
147
- - AWS Budgets
148
- - AWS Trusted Advisor
149
- - Cost Allocation Tags
150
- ```
151
-
152
- ### 6. Sustainability
153
-
154
- ```yaml
155
- principles:
156
- - Understand your impact
157
- - Establish sustainability goals
158
- - Maximize utilization
159
- - Anticipate and adopt more efficient offerings
160
- - Use managed services
161
- - Reduce downstream impact
162
-
163
- practices:
164
- - Use efficient instance types (Graviton)
165
- - Optimize storage lifecycle
166
- - Use serverless where possible
167
- - Select regions with lower carbon intensity
168
- ```
169
-
170
- ## Common Patterns
171
-
172
- ### VPC Design
173
-
174
- ```yaml
175
- pattern: |
176
- VPC (10.0.0.0/16)
177
- ├── Public Subnets
178
- │ ├── us-east-1a: 10.0.1.0/24
179
- │ ├── us-east-1b: 10.0.2.0/24
180
- │ └── us-east-1c: 10.0.3.0/24
181
- ├── Private Subnets (App)
182
- │ ├── us-east-1a: 10.0.11.0/24
183
- │ ├── us-east-1b: 10.0.12.0/24
184
- │ └── us-east-1c: 10.0.13.0/24
185
- └── Private Subnets (Data)
186
- ├── us-east-1a: 10.0.21.0/24
187
- ├── us-east-1b: 10.0.22.0/24
188
- └── us-east-1c: 10.0.23.0/24
189
-
190
- components:
191
- - Internet Gateway (public access)
192
- - NAT Gateway (private outbound)
193
- - VPC Endpoints (AWS services)
194
- - Network ACLs (subnet level)
195
- - Security Groups (instance level)
196
- ```
197
-
198
- ### Three-Tier Architecture
199
-
200
- ```yaml
201
- pattern: |
202
- [Internet]
203
-
204
- [CloudFront]
205
-
206
- [ALB] ← Public Subnet
207
-
208
- [ECS/EC2] ← Private Subnet (App)
209
-
210
- [RDS Multi-AZ] ← Private Subnet (Data)
211
-
212
- components:
213
- web_tier:
214
- - CloudFront for CDN
215
- - WAF for protection
216
- - ALB for load balancing
217
-
218
- app_tier:
219
- - ECS Fargate or EC2
220
- - Auto Scaling
221
- - ElastiCache
222
-
223
- data_tier:
224
- - RDS Multi-AZ
225
- - Read Replicas
226
- - Automated backups
227
- ```
228
-
229
- ### Serverless Pattern
230
-
231
- ```yaml
232
- pattern: |
233
- [API Gateway]
234
-
235
- [Lambda] → [DynamoDB]
236
-
237
- [SQS] → [Lambda] → [S3]
238
-
239
- components:
240
- - API Gateway for REST/HTTP APIs
241
- - Lambda for compute
242
- - DynamoDB for NoSQL
243
- - SQS for decoupling
244
- - S3 for storage
245
- - Step Functions for orchestration
246
- ```
247
-
248
- ### CI/CD Pipeline
249
-
250
- ```yaml
251
- pattern: |
252
- [CodeCommit/GitHub]
253
-
254
- [CodePipeline]
255
-
256
- ├── [CodeBuild] - Build & Test
257
-
258
- ├── [ECR] - Container Registry
259
-
260
- └── [CodeDeploy/ECS] - Deploy
261
-
262
- practices:
263
- - Blue/Green deployments
264
- - Canary releases
265
- - Automated rollback
266
- - Infrastructure as Code
267
- ```
268
-
269
- ## Application
270
-
271
- When designing AWS architecture:
272
-
273
- 1. **Always** follow least privilege for IAM
274
- 2. **Always** use Multi-AZ for production
275
- 3. **Always** encrypt data at rest and in transit
276
- 4. **Prefer** managed services over self-managed
277
- 5. **Implement** monitoring and alerting
278
- 6. **Use** IaC for all infrastructure
279
- 7. **Design** for failure
280
- 8. **Optimize** costs continuously