agent-notes 2.0.4__py3-none-any.whl

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 (162) hide show
  1. agent_notes/VERSION +1 -0
  2. agent_notes/__init__.py +1 -0
  3. agent_notes/__main__.py +4 -0
  4. agent_notes/cli.py +348 -0
  5. agent_notes/commands/__init__.py +27 -0
  6. agent_notes/commands/_install_helpers.py +262 -0
  7. agent_notes/commands/build.py +170 -0
  8. agent_notes/commands/doctor.py +112 -0
  9. agent_notes/commands/info.py +95 -0
  10. agent_notes/commands/install.py +99 -0
  11. agent_notes/commands/list.py +169 -0
  12. agent_notes/commands/memory.py +430 -0
  13. agent_notes/commands/regenerate.py +152 -0
  14. agent_notes/commands/set_role.py +143 -0
  15. agent_notes/commands/uninstall.py +26 -0
  16. agent_notes/commands/update.py +169 -0
  17. agent_notes/commands/validate.py +199 -0
  18. agent_notes/commands/wizard.py +720 -0
  19. agent_notes/config.py +154 -0
  20. agent_notes/data/agents/agents.yaml +352 -0
  21. agent_notes/data/agents/analyst.md +45 -0
  22. agent_notes/data/agents/api-reviewer.md +47 -0
  23. agent_notes/data/agents/architect.md +46 -0
  24. agent_notes/data/agents/coder.md +28 -0
  25. agent_notes/data/agents/database-specialist.md +45 -0
  26. agent_notes/data/agents/debugger.md +47 -0
  27. agent_notes/data/agents/devil.md +47 -0
  28. agent_notes/data/agents/devops.md +38 -0
  29. agent_notes/data/agents/explorer.md +23 -0
  30. agent_notes/data/agents/integrations.md +44 -0
  31. agent_notes/data/agents/lead.md +216 -0
  32. agent_notes/data/agents/performance-profiler.md +44 -0
  33. agent_notes/data/agents/refactorer.md +48 -0
  34. agent_notes/data/agents/reviewer.md +44 -0
  35. agent_notes/data/agents/security-auditor.md +44 -0
  36. agent_notes/data/agents/system-auditor.md +38 -0
  37. agent_notes/data/agents/tech-writer.md +32 -0
  38. agent_notes/data/agents/test-runner.md +36 -0
  39. agent_notes/data/agents/test-writer.md +39 -0
  40. agent_notes/data/cli/claude.yaml +25 -0
  41. agent_notes/data/cli/copilot.yaml +18 -0
  42. agent_notes/data/cli/opencode.yaml +22 -0
  43. agent_notes/data/commands/brainstorm.md +8 -0
  44. agent_notes/data/commands/debug.md +9 -0
  45. agent_notes/data/commands/review.md +10 -0
  46. agent_notes/data/global-claude.md +290 -0
  47. agent_notes/data/global-copilot.md +27 -0
  48. agent_notes/data/global-opencode.md +40 -0
  49. agent_notes/data/hooks/session-context.md.tpl +19 -0
  50. agent_notes/data/models/claude-haiku-4-5.yaml +15 -0
  51. agent_notes/data/models/claude-opus-4-1.yaml +16 -0
  52. agent_notes/data/models/claude-opus-4-5.yaml +16 -0
  53. agent_notes/data/models/claude-opus-4-6.yaml +16 -0
  54. agent_notes/data/models/claude-opus-4-7.yaml +15 -0
  55. agent_notes/data/models/claude-sonnet-4-5.yaml +16 -0
  56. agent_notes/data/models/claude-sonnet-4-6.yaml +15 -0
  57. agent_notes/data/models/claude-sonnet-4.yaml +16 -0
  58. agent_notes/data/pricing.yaml +33 -0
  59. agent_notes/data/roles/orchestrator.yaml +5 -0
  60. agent_notes/data/roles/reasoner.yaml +5 -0
  61. agent_notes/data/roles/scout.yaml +5 -0
  62. agent_notes/data/roles/worker.yaml +5 -0
  63. agent_notes/data/rules/code-quality.md +9 -0
  64. agent_notes/data/rules/safety.md +10 -0
  65. agent_notes/data/scripts/cost-report +211 -0
  66. agent_notes/data/skills/brainstorming/SKILL.md +57 -0
  67. agent_notes/data/skills/code-review/SKILL.md +64 -0
  68. agent_notes/data/skills/debugging-protocol/SKILL.md +51 -0
  69. agent_notes/data/skills/docker-compose/SKILL.md +318 -0
  70. agent_notes/data/skills/docker-compose-advanced/SKILL.md +575 -0
  71. agent_notes/data/skills/docker-dockerfile/SKILL.md +385 -0
  72. agent_notes/data/skills/docker-dockerfile-languages/SKILL.md +293 -0
  73. agent_notes/data/skills/git/SKILL.md +87 -0
  74. agent_notes/data/skills/rails-active-storage/SKILL.md +321 -0
  75. agent_notes/data/skills/rails-broadcasting/SKILL.md +374 -0
  76. agent_notes/data/skills/rails-concerns/SKILL.md +806 -0
  77. agent_notes/data/skills/rails-controllers/SKILL.md +510 -0
  78. agent_notes/data/skills/rails-controllers-advanced/SKILL.md +441 -0
  79. agent_notes/data/skills/rails-helpers/SKILL.md +677 -0
  80. agent_notes/data/skills/rails-initializers/SKILL.md +79 -0
  81. agent_notes/data/skills/rails-javascript/SKILL.md +567 -0
  82. agent_notes/data/skills/rails-jobs/SKILL.md +700 -0
  83. agent_notes/data/skills/rails-kamal/SKILL.md +483 -0
  84. agent_notes/data/skills/rails-lib/SKILL.md +101 -0
  85. agent_notes/data/skills/rails-mailers/SKILL.md +321 -0
  86. agent_notes/data/skills/rails-migrations/SKILL.md +268 -0
  87. agent_notes/data/skills/rails-models/SKILL.md +459 -0
  88. agent_notes/data/skills/rails-models-advanced/SKILL.md +398 -0
  89. agent_notes/data/skills/rails-routes/SKILL.md +804 -0
  90. agent_notes/data/skills/rails-style/SKILL.md +538 -0
  91. agent_notes/data/skills/rails-testing-controllers/SKILL.md +343 -0
  92. agent_notes/data/skills/rails-testing-models/SKILL.md +296 -0
  93. agent_notes/data/skills/rails-testing-system/SKILL.md +375 -0
  94. agent_notes/data/skills/rails-validations/SKILL.md +108 -0
  95. agent_notes/data/skills/rails-view-components/SKILL.md +511 -0
  96. agent_notes/data/skills/rails-view-components-advanced/SKILL.md +376 -0
  97. agent_notes/data/skills/rails-views/SKILL.md +413 -0
  98. agent_notes/data/skills/rails-views-advanced/SKILL.md +450 -0
  99. agent_notes/data/skills/refactoring-protocol/SKILL.md +64 -0
  100. agent_notes/data/skills/tdd/SKILL.md +57 -0
  101. agent_notes/data/templates/__init__.py +1 -0
  102. agent_notes/data/templates/__pycache__/__init__.cpython-314.pyc +0 -0
  103. agent_notes/data/templates/frontmatter/__init__.py +1 -0
  104. agent_notes/data/templates/frontmatter/__pycache__/__init__.cpython-314.pyc +0 -0
  105. agent_notes/data/templates/frontmatter/__pycache__/claude.cpython-314.pyc +0 -0
  106. agent_notes/data/templates/frontmatter/__pycache__/cursor.cpython-314.pyc +0 -0
  107. agent_notes/data/templates/frontmatter/__pycache__/opencode.cpython-314.pyc +0 -0
  108. agent_notes/data/templates/frontmatter/claude.py +44 -0
  109. agent_notes/data/templates/frontmatter/opencode.py +104 -0
  110. agent_notes/doctor_checks.py +189 -0
  111. agent_notes/domain/__init__.py +17 -0
  112. agent_notes/domain/agent.py +34 -0
  113. agent_notes/domain/cli_backend.py +40 -0
  114. agent_notes/domain/diagnostics.py +29 -0
  115. agent_notes/domain/diff.py +44 -0
  116. agent_notes/domain/model.py +27 -0
  117. agent_notes/domain/role.py +13 -0
  118. agent_notes/domain/rule.py +13 -0
  119. agent_notes/domain/skill.py +15 -0
  120. agent_notes/domain/state.py +46 -0
  121. agent_notes/install_state.py +11 -0
  122. agent_notes/registries/__init__.py +16 -0
  123. agent_notes/registries/_base.py +46 -0
  124. agent_notes/registries/agent_registry.py +107 -0
  125. agent_notes/registries/cli_registry.py +89 -0
  126. agent_notes/registries/model_registry.py +85 -0
  127. agent_notes/registries/role_registry.py +64 -0
  128. agent_notes/registries/rule_registry.py +80 -0
  129. agent_notes/registries/skill_registry.py +141 -0
  130. agent_notes/services/__init__.py +8 -0
  131. agent_notes/services/diagnostics/__init__.py +47 -0
  132. agent_notes/services/diagnostics/_checks.py +272 -0
  133. agent_notes/services/diagnostics/_display.py +346 -0
  134. agent_notes/services/diagnostics/_fix.py +169 -0
  135. agent_notes/services/diff.py +349 -0
  136. agent_notes/services/fs.py +195 -0
  137. agent_notes/services/install_state_builder.py +210 -0
  138. agent_notes/services/installer.py +293 -0
  139. agent_notes/services/memory_backend.py +155 -0
  140. agent_notes/services/rendering.py +329 -0
  141. agent_notes/services/session_context.py +23 -0
  142. agent_notes/services/settings_writer.py +79 -0
  143. agent_notes/services/state_store.py +249 -0
  144. agent_notes/services/ui.py +419 -0
  145. agent_notes/services/user_config.py +62 -0
  146. agent_notes/services/validation.py +67 -0
  147. agent_notes/state.py +21 -0
  148. agent_notes-2.0.4.dist-info/METADATA +14 -0
  149. agent_notes-2.0.4.dist-info/RECORD +162 -0
  150. agent_notes-2.0.4.dist-info/WHEEL +5 -0
  151. agent_notes-2.0.4.dist-info/entry_points.txt +2 -0
  152. agent_notes-2.0.4.dist-info/licenses/LICENSE +21 -0
  153. agent_notes-2.0.4.dist-info/top_level.txt +2 -0
  154. tests/conftest.py +20 -0
  155. tests/functional/__init__.py +0 -0
  156. tests/functional/test_build_commands.py +88 -0
  157. tests/functional/test_registries.py +128 -0
  158. tests/integration/__init__.py +0 -0
  159. tests/integration/test_build_output.py +129 -0
  160. tests/plugins/__init__.py +0 -0
  161. tests/plugins/test_agents.py +93 -0
  162. tests/plugins/test_skills.py +77 -0
@@ -0,0 +1,318 @@
1
+ ---
2
+ name: docker-compose
3
+ description: "Docker Compose: file structure, health checks, depends_on, and common service patterns"
4
+ group: docker
5
+ ---
6
+
7
+ # Docker Compose Patterns
8
+
9
+ Production-ready Docker Compose configurations for multi-container applications based on official Docker Compose Specification and current best practices.
10
+
11
+ > **Sources**: This guide is based on [Docker Compose Specification](https://docs.docker.com/reference/compose-file/), [Docker Compose Services Reference](https://docs.docker.com/reference/compose-file/services/), and Docker Compose v2 (2022+) best practices.
12
+
13
+ ---
14
+
15
+ ## Important: Version Field is Obsolete
16
+
17
+ **The `version:` field is obsolete** as of Docker Compose v2 (2022). Docker Compose now ignores this field entirely. Modern compose files should **NOT include** a `version:` field.
18
+
19
+ **Why**: Docker Compose v1.27.0+ (2020) introduced the Compose Specification, making the version field optional. The Compose Specification is now the recommended version.
20
+
21
+ **Source**: [Docker Compose Specification](https://docs.docker.com/reference/compose-file/)
22
+
23
+ ---
24
+
25
+ ## Compose File Structure Template
26
+
27
+ ```yaml
28
+ services:
29
+ # Application service
30
+ app:
31
+ build:
32
+ context: .
33
+ dockerfile: Dockerfile
34
+ target: production
35
+ args:
36
+ NODE_ENV: production
37
+ image: myapp:latest
38
+ container_name: myapp
39
+ restart: unless-stopped
40
+ ports:
41
+ - "3000:3000"
42
+ environment:
43
+ - NODE_ENV=production
44
+ - DATABASE_URL=postgresql://postgres:password@db:5432/myapp
45
+ - REDIS_URL=redis://redis:6379
46
+ env_file:
47
+ - .env
48
+ depends_on:
49
+ db:
50
+ condition: service_healthy
51
+ redis:
52
+ condition: service_healthy
53
+ volumes:
54
+ - ./uploads:/app/uploads
55
+ - app_logs:/app/logs
56
+ networks:
57
+ - app_network
58
+ healthcheck:
59
+ test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
60
+ interval: 30s
61
+ timeout: 10s
62
+ retries: 3
63
+ start_period: 40s
64
+
65
+ # Database service
66
+ db:
67
+ image: postgres:16-alpine
68
+ container_name: myapp_db
69
+ restart: unless-stopped
70
+ environment:
71
+ - POSTGRES_USER=postgres
72
+ - POSTGRES_PASSWORD=password
73
+ - POSTGRES_DB=myapp
74
+ volumes:
75
+ - postgres_data:/var/lib/postgresql/data
76
+ - ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
77
+ networks:
78
+ - app_network
79
+ healthcheck:
80
+ test: ["CMD-SHELL", "pg_isready -U postgres"]
81
+ interval: 10s
82
+ timeout: 5s
83
+ retries: 5
84
+
85
+ # Redis service
86
+ redis:
87
+ image: redis:7-alpine
88
+ container_name: myapp_redis
89
+ restart: unless-stopped
90
+ command: redis-server --appendonly yes
91
+ volumes:
92
+ - redis_data:/data
93
+ networks:
94
+ - app_network
95
+ healthcheck:
96
+ test: ["CMD", "redis-cli", "ping"]
97
+ interval: 10s
98
+ timeout: 5s
99
+ retries: 5
100
+
101
+ volumes:
102
+ postgres_data:
103
+ driver: local
104
+ redis_data:
105
+ driver: local
106
+ app_logs:
107
+ driver: local
108
+
109
+ networks:
110
+ app_network:
111
+ driver: bridge
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Health Checks in Compose
117
+
118
+ Health checks work the same way as Dockerfile HEALTHCHECK and use the same default values. Your Compose file can override values set in the Dockerfile.
119
+
120
+ ```yaml
121
+ services:
122
+ web:
123
+ image: myapp:latest
124
+ healthcheck:
125
+ test: ["CMD", "curl", "-f", "http://localhost/health"]
126
+ interval: 30s
127
+ timeout: 10s
128
+ retries: 3
129
+ start_period: 40s
130
+ ```
131
+
132
+ **Health check attributes**:
133
+ - `test`: Command to run (can be string or array)
134
+ - `interval`: Time between checks (default: 30s)
135
+ - `timeout`: Maximum time for check to complete (default: 30s)
136
+ - `retries`: Consecutive failures before marking unhealthy (default: 3)
137
+ - `start_period`: Grace period for container initialization (default: 0s)
138
+
139
+ **Source**: [Docker Compose Health Checks](https://docs.docker.com/reference/compose-file/services/#healthcheck)
140
+
141
+ ---
142
+
143
+ ## Depends_on with Conditions
144
+
145
+ Use `condition` to wait for services to be healthy before starting dependent services.
146
+
147
+ ```yaml
148
+ services:
149
+ app:
150
+ depends_on:
151
+ db:
152
+ condition: service_healthy # Wait for health check to pass
153
+ redis:
154
+ condition: service_started # Just wait for container to start
155
+ ```
156
+
157
+ **Available conditions**:
158
+ - `service_started`: Default, just waits for container to start
159
+ - `service_healthy`: Waits for health check to pass
160
+ - `service_completed_successfully`: Waits for one-time task to complete
161
+
162
+ **Source**: [Docker Compose depends_on](https://docs.docker.com/reference/compose-file/services/#depends_on)
163
+
164
+ ---
165
+
166
+ ## Common Service Patterns
167
+
168
+ ### Node.js Application
169
+
170
+ ```yaml
171
+ services:
172
+ app:
173
+ build:
174
+ context: .
175
+ dockerfile: Dockerfile
176
+ target: ${BUILD_TARGET:-production}
177
+ image: ${APP_NAME}:${VERSION:-latest}
178
+ restart: unless-stopped
179
+ ports:
180
+ - "${APP_PORT:-3000}:3000"
181
+ environment:
182
+ NODE_ENV: ${NODE_ENV:-production}
183
+ DATABASE_URL: ${DATABASE_URL}
184
+ REDIS_URL: redis://redis:6379
185
+ env_file:
186
+ - .env
187
+ depends_on:
188
+ db:
189
+ condition: service_healthy
190
+ volumes:
191
+ # Development: mount source code
192
+ - ./src:/app/src:ro
193
+ # Production: named volumes for data
194
+ - uploads:/app/uploads
195
+ - logs:/app/logs
196
+ networks:
197
+ - app_network
198
+ healthcheck:
199
+ test: ["CMD", "node", "healthcheck.js"]
200
+ interval: 30s
201
+ timeout: 10s
202
+ retries: 3
203
+ deploy:
204
+ resources:
205
+ limits:
206
+ cpus: '1'
207
+ memory: 1G
208
+ reservations:
209
+ cpus: '0.5'
210
+ memory: 512M
211
+ ```
212
+
213
+ ### Rails with Background Workers
214
+
215
+ ```yaml
216
+ services:
217
+ web:
218
+ build:
219
+ context: .
220
+ dockerfile: Dockerfile
221
+ command: bundle exec rails server -b 0.0.0.0
222
+ restart: unless-stopped
223
+ ports:
224
+ - "3000:3000"
225
+ environment:
226
+ RAILS_ENV: ${RAILS_ENV:-production}
227
+ DATABASE_URL: postgresql://postgres:password@db:5432/myapp
228
+ REDIS_URL: redis://redis:6379/0
229
+ SECRET_KEY_BASE: ${SECRET_KEY_BASE}
230
+ depends_on:
231
+ db:
232
+ condition: service_healthy
233
+ redis:
234
+ condition: service_started
235
+ volumes:
236
+ - ./storage:/app/storage
237
+ - ./log:/app/log
238
+ networks:
239
+ - app_network
240
+
241
+ sidekiq:
242
+ build:
243
+ context: .
244
+ dockerfile: Dockerfile
245
+ command: bundle exec sidekiq
246
+ restart: unless-stopped
247
+ environment:
248
+ RAILS_ENV: ${RAILS_ENV:-production}
249
+ DATABASE_URL: postgresql://postgres:password@db:5432/myapp
250
+ REDIS_URL: redis://redis:6379/0
251
+ depends_on:
252
+ - db
253
+ - redis
254
+ volumes:
255
+ - ./storage:/app/storage
256
+ - ./log:/app/log
257
+ networks:
258
+ - app_network
259
+ ```
260
+
261
+ ### Python/Django with Celery
262
+
263
+ ```yaml
264
+ services:
265
+ web:
266
+ build:
267
+ context: .
268
+ dockerfile: Dockerfile
269
+ command: gunicorn myapp.wsgi:application --bind 0.0.0.0:8000 --workers 4
270
+ restart: unless-stopped
271
+ ports:
272
+ - "8000:8000"
273
+ environment:
274
+ DJANGO_SETTINGS_MODULE: myapp.settings.production
275
+ DATABASE_URL: postgresql://postgres:password@db:5432/myapp
276
+ REDIS_URL: redis://redis:6379/0
277
+ SECRET_KEY: ${SECRET_KEY}
278
+ depends_on:
279
+ db:
280
+ condition: service_healthy
281
+ volumes:
282
+ - ./media:/app/media
283
+ - ./static:/app/static
284
+ networks:
285
+ - app_network
286
+
287
+ celery_worker:
288
+ build:
289
+ context: .
290
+ dockerfile: Dockerfile
291
+ command: celery -A myapp worker -l info
292
+ restart: unless-stopped
293
+ environment:
294
+ DJANGO_SETTINGS_MODULE: myapp.settings.production
295
+ DATABASE_URL: postgresql://postgres:password@db:5432/myapp
296
+ REDIS_URL: redis://redis:6379/0
297
+ depends_on:
298
+ - db
299
+ - redis
300
+ networks:
301
+ - app_network
302
+
303
+ celery_beat:
304
+ build:
305
+ context: .
306
+ dockerfile: Dockerfile
307
+ command: celery -A myapp beat -l info
308
+ restart: unless-stopped
309
+ environment:
310
+ DJANGO_SETTINGS_MODULE: myapp.settings.production
311
+ REDIS_URL: redis://redis:6379/0
312
+ depends_on:
313
+ - redis
314
+ networks:
315
+ - app_network
316
+ ```
317
+
318
+ ---