@martinffx/atelier 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.
Files changed (130) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/LICENSE +21 -0
  3. package/README.md +285 -0
  4. package/agents/architect.md +38 -0
  5. package/agents/oracle.md +40 -0
  6. package/agents/recon.md +39 -0
  7. package/dist/atelier.js +33082 -0
  8. package/package.json +44 -0
  9. package/skills/code-conventional-commit/SKILL.md +134 -0
  10. package/skills/code-conventional-commit/evals/evals.json +23 -0
  11. package/skills/code-conventional-commit/workspace/iteration-1/eval-0/with_skill/outputs/commit-message.txt +4 -0
  12. package/skills/code-conventional-commit/workspace/iteration-1/eval-0/with_skill/outputs/eval_metadata.json +6 -0
  13. package/skills/code-conventional-commit/workspace/iteration-1/eval-1/with_skill/outputs/eval_metadata.json +6 -0
  14. package/skills/code-conventional-commit/workspace/iteration-1/eval-1/with_skill/outputs/validation-result.txt +16 -0
  15. package/skills/code-conventional-commit/workspace/iteration-1/eval-2/with_skill/outputs/commit-message.txt +8 -0
  16. package/skills/code-conventional-commit/workspace/iteration-1/eval-2/with_skill/outputs/eval_metadata.json +6 -0
  17. package/skills/code-conventional-commit/workspace/iteration-1/report.html +1325 -0
  18. package/skills/code-debug/SKILL.md +271 -0
  19. package/skills/code-debug/references/language-tools.md +139 -0
  20. package/skills/code-debug/references/techniques.md +117 -0
  21. package/skills/code-docs/SKILL.md +171 -0
  22. package/skills/code-docs/references/api-docs.md +116 -0
  23. package/skills/code-docs/references/changelog.md +64 -0
  24. package/skills/code-docs/references/readme-structure.md +94 -0
  25. package/skills/code-git-worktrees/SKILL.md +218 -0
  26. package/skills/code-perf/SKILL.md +163 -0
  27. package/skills/code-perf/references/common-bottlenecks.md +124 -0
  28. package/skills/code-perf/references/optimization-patterns.md +167 -0
  29. package/skills/code-perf/references/profiling-tools.md +126 -0
  30. package/skills/code-review/SKILL.md +78 -0
  31. package/skills/code-review/references/output.md +200 -0
  32. package/skills/code-review/references/reviewers.md +719 -0
  33. package/skills/code-review/references/rq.md +357 -0
  34. package/skills/code-review/references/rs.md +30 -0
  35. package/skills/code-security/SKILL.md +183 -0
  36. package/skills/code-security/references/owasp-top-10.md +129 -0
  37. package/skills/code-security/references/security-tools.md +102 -0
  38. package/skills/code-security/references/vulnerability-patterns.md +129 -0
  39. package/skills/code-stacked-commit/SKILL.md +155 -0
  40. package/skills/code-subagents/SKILL.md +184 -0
  41. package/skills/code-subagents/references/code-quality-reviewer-prompt.md +48 -0
  42. package/skills/code-subagents/references/implementor-prompt.md +79 -0
  43. package/skills/code-subagents/references/spec-reviewer-prompt.md +62 -0
  44. package/skills/oracle-architect/SKILL.md +246 -0
  45. package/skills/oracle-architect/references/api-design.md +345 -0
  46. package/skills/oracle-architect/references/data-modeling.md +318 -0
  47. package/skills/oracle-architect/references/ddd-patterns.md +247 -0
  48. package/skills/oracle-challenge/SKILL.md +126 -0
  49. package/skills/oracle-testing/SKILL.md +237 -0
  50. package/skills/oracle-testing/references/anti-patterns.md +618 -0
  51. package/skills/oracle-testing/references/boundaries.md +579 -0
  52. package/skills/oracle-testing/references/core-testing.md +691 -0
  53. package/skills/oracle-testing/references/edge-testing.md +794 -0
  54. package/skills/oracle-testing/references/stub-driven-tdd.md +322 -0
  55. package/skills/oracle-thinkdeep/SKILL.md +164 -0
  56. package/skills/python-architecture/SKILL.md +148 -0
  57. package/skills/python-architecture/references/data-modeling.md +558 -0
  58. package/skills/python-architecture/references/ddd.md +569 -0
  59. package/skills/python-architecture/references/functional-core.md +337 -0
  60. package/skills/python-build-tools/SKILL.md +153 -0
  61. package/skills/python-build-tools/references/basedpyright.md +321 -0
  62. package/skills/python-build-tools/references/ruff.md +225 -0
  63. package/skills/python-build-tools/references/uv.md +257 -0
  64. package/skills/python-fastapi/SKILL.md +184 -0
  65. package/skills/python-fastapi/references/api-design.md +563 -0
  66. package/skills/python-fastapi/references/dependencies.md +479 -0
  67. package/skills/python-fastapi/references/middleware.md +475 -0
  68. package/skills/python-fastapi/references/validation.md +497 -0
  69. package/skills/python-modern-python/SKILL.md +201 -0
  70. package/skills/python-modern-python/references/async.md +76 -0
  71. package/skills/python-modern-python/references/pattern-matching.md +89 -0
  72. package/skills/python-modern-python/references/typing.md +96 -0
  73. package/skills/python-monorepo/SKILL.md +146 -0
  74. package/skills/python-monorepo/references/docker.md +515 -0
  75. package/skills/python-monorepo/references/namespace-packages.md +426 -0
  76. package/skills/python-monorepo/references/workspace-config.md +341 -0
  77. package/skills/python-sqlalchemy/SKILL.md +119 -0
  78. package/skills/python-sqlalchemy/references/async.md +51 -0
  79. package/skills/python-sqlalchemy/references/models.md +67 -0
  80. package/skills/python-sqlalchemy/references/queries.md +57 -0
  81. package/skills/python-temporal/SKILL.md +128 -0
  82. package/skills/python-temporal/references/patterns.md +87 -0
  83. package/skills/python-temporal/references/testing.md +54 -0
  84. package/skills/python-testing/SKILL.md +161 -0
  85. package/skills/python-testing/references/boundaries.md +449 -0
  86. package/skills/python-testing/references/mocking.md +449 -0
  87. package/skills/python-testing/references/pytest.md +524 -0
  88. package/skills/spec-brainstorm/SKILL.md +325 -0
  89. package/skills/spec-finish/SKILL.md +159 -0
  90. package/skills/spec-implement/SKILL.md +296 -0
  91. package/skills/spec-orchestrator/SKILL.md +156 -0
  92. package/skills/spec-plan/SKILL.md +248 -0
  93. package/skills/typescript-api-design/SKILL.md +396 -0
  94. package/skills/typescript-api-design/references/error-responses.md +469 -0
  95. package/skills/typescript-build-tools/SKILL.md +447 -0
  96. package/skills/typescript-build-tools/references/biome.md +436 -0
  97. package/skills/typescript-build-tools/references/bun.md +432 -0
  98. package/skills/typescript-build-tools/references/turborepo.md +426 -0
  99. package/skills/typescript-build-tools/references/vitest.md +518 -0
  100. package/skills/typescript-drizzle-orm/SKILL.md +398 -0
  101. package/skills/typescript-drizzle-orm/references/cloudflare.md +392 -0
  102. package/skills/typescript-drizzle-orm/references/entity-pattern.md +412 -0
  103. package/skills/typescript-drizzle-orm/references/postgresql.md +191 -0
  104. package/skills/typescript-drizzle-orm/references/repository-pattern.md +479 -0
  105. package/skills/typescript-drizzle-orm/references/sqlite.md +291 -0
  106. package/skills/typescript-dynamodb-toolbox/SKILL.md +370 -0
  107. package/skills/typescript-dynamodb-toolbox/references/entity-layer.md +574 -0
  108. package/skills/typescript-dynamodb-toolbox/references/error-handling.md +495 -0
  109. package/skills/typescript-dynamodb-toolbox/references/modeling.md +332 -0
  110. package/skills/typescript-dynamodb-toolbox/references/repository-layer.md +631 -0
  111. package/skills/typescript-dynamodb-toolbox/references/testing.md +718 -0
  112. package/skills/typescript-dynamodb-toolbox/references/transactions.md +423 -0
  113. package/skills/typescript-effect-ts/SKILL.md +341 -0
  114. package/skills/typescript-effect-ts/references/core.md +412 -0
  115. package/skills/typescript-effect-ts/references/error-handling.md +468 -0
  116. package/skills/typescript-effect-ts/references/resources.md +476 -0
  117. package/skills/typescript-effect-ts/references/schema.md +536 -0
  118. package/skills/typescript-effect-ts/references/services.md +461 -0
  119. package/skills/typescript-fastify/SKILL.md +405 -0
  120. package/skills/typescript-fastify/references/plugins.md +329 -0
  121. package/skills/typescript-fastify/references/typeid.md +315 -0
  122. package/skills/typescript-functional-patterns/SKILL.md +402 -0
  123. package/skills/typescript-functional-patterns/references/adts.md +497 -0
  124. package/skills/typescript-functional-patterns/references/branded-types.md +542 -0
  125. package/skills/typescript-functional-patterns/references/migration-guide.md +695 -0
  126. package/skills/typescript-functional-patterns/references/option-result.md +585 -0
  127. package/skills/typescript-testing/SKILL.md +353 -0
  128. package/skills/typescript-testing/references/mocking.md +675 -0
  129. package/skills/typescript-testing/references/msw.md +852 -0
  130. package/skills/typescript-testing/references/snapshot-testing.md +774 -0
@@ -0,0 +1,426 @@
1
+ # Turborepo Monorepo Orchestration
2
+
3
+ Patterns for configuring Turborepo to orchestrate TypeScript monorepo builds, tests, and development.
4
+
5
+ ## Basic Setup
6
+
7
+ ### Root package.json
8
+
9
+ ```json
10
+ {
11
+ "name": "my-monorepo",
12
+ "private": true,
13
+ "workspaces": ["apps/*", "packages/*"],
14
+ "scripts": {
15
+ "dev": "turbo dev",
16
+ "build": "turbo build",
17
+ "typecheck": "turbo typecheck",
18
+ "test": "turbo test",
19
+ "lint": "turbo lint",
20
+ "check": "turbo typecheck lint test"
21
+ },
22
+ "devDependencies": {
23
+ "turbo": "^2.0.0"
24
+ }
25
+ }
26
+ ```
27
+
28
+ ### turbo.json
29
+
30
+ ```json
31
+ {
32
+ "$schema": "https://turbo.build/schema.json",
33
+ "tasks": {
34
+ "build": {
35
+ "dependsOn": ["^build"],
36
+ "outputs": ["dist/**"]
37
+ },
38
+ "typecheck": {
39
+ "dependsOn": ["^typecheck"]
40
+ },
41
+ "lint": {},
42
+ "test": {
43
+ "dependsOn": ["^build"]
44
+ },
45
+ "dev": {
46
+ "cache": false,
47
+ "persistent": true
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ## Task Configuration
54
+
55
+ ### dependsOn
56
+
57
+ ```json
58
+ {
59
+ "tasks": {
60
+ "build": {
61
+ "dependsOn": ["^build"] // Run build in dependencies first
62
+ },
63
+ "test": {
64
+ "dependsOn": ["build"] // Run build in same package first
65
+ },
66
+ "deploy": {
67
+ "dependsOn": ["build", "test", "lint"] // Run all in same package
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ - `^task` - Run task in dependencies (topological order)
74
+ - `task` - Run task in same package before this task
75
+
76
+ ### outputs
77
+
78
+ ```json
79
+ {
80
+ "tasks": {
81
+ "build": {
82
+ "outputs": ["dist/**", ".next/**", "!.next/cache/**"]
83
+ },
84
+ "typecheck": {
85
+ "outputs": [] // No outputs to cache
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ ### inputs
92
+
93
+ ```json
94
+ {
95
+ "tasks": {
96
+ "test": {
97
+ "inputs": ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts"]
98
+ }
99
+ }
100
+ }
101
+ ```
102
+
103
+ ### Environment Variables
104
+
105
+ ```json
106
+ {
107
+ "tasks": {
108
+ "build": {
109
+ "env": ["NODE_ENV", "API_URL"],
110
+ "passThroughEnv": ["CI", "VERCEL"]
111
+ },
112
+ "test": {
113
+ "env": ["DATABASE_URL", "TEST_DATABASE_URL"]
114
+ }
115
+ }
116
+ }
117
+ ```
118
+
119
+ ## Workspace Structure
120
+
121
+ ```
122
+ my-monorepo/
123
+ ├── package.json
124
+ ├── turbo.json
125
+ ├── biome.json
126
+ ├── apps/
127
+ │ ├── api/
128
+ │ │ ├── package.json
129
+ │ │ ├── tsconfig.json
130
+ │ │ ├── vitest.config.ts
131
+ │ │ └── src/
132
+ │ └── web/
133
+ │ ├── package.json
134
+ │ ├── tsconfig.json
135
+ │ ├── vitest.config.ts
136
+ │ └── src/
137
+ └── packages/
138
+ ├── config-biome/
139
+ │ ├── package.json
140
+ │ └── biome.json
141
+ ├── config-typescript/
142
+ │ ├── package.json
143
+ │ └── tsconfig.base.json
144
+ └── shared/
145
+ ├── package.json
146
+ ├── tsconfig.json
147
+ └── src/
148
+ ```
149
+
150
+ ### Package Dependencies
151
+
152
+ ```json
153
+ // apps/api/package.json
154
+ {
155
+ "name": "@myorg/api",
156
+ "dependencies": {
157
+ "@myorg/shared": "workspace:*"
158
+ },
159
+ "devDependencies": {
160
+ "@myorg/config-biome": "workspace:*",
161
+ "@myorg/config-typescript": "workspace:*"
162
+ }
163
+ }
164
+ ```
165
+
166
+ ## Package Scripts
167
+
168
+ ### apps/api/package.json
169
+
170
+ ```json
171
+ {
172
+ "name": "@myorg/api",
173
+ "scripts": {
174
+ "dev": "bun run --watch src/index.ts",
175
+ "build": "bun build ./src/index.ts --outdir ./dist --target bun",
176
+ "typecheck": "tsgo --noEmit",
177
+ "lint": "biome check .",
178
+ "test": "vitest run"
179
+ }
180
+ }
181
+ ```
182
+
183
+ ### packages/shared/package.json
184
+
185
+ ```json
186
+ {
187
+ "name": "@myorg/shared",
188
+ "main": "./src/index.ts",
189
+ "types": "./src/index.ts",
190
+ "scripts": {
191
+ "typecheck": "tsgo --noEmit",
192
+ "lint": "biome check .",
193
+ "test": "vitest run"
194
+ }
195
+ }
196
+ ```
197
+
198
+ ## Remote Caching
199
+
200
+ ### Vercel Remote Cache
201
+
202
+ ```bash
203
+ # Login to Vercel
204
+ npx turbo login
205
+
206
+ # Link to Vercel project
207
+ npx turbo link
208
+ ```
209
+
210
+ ### GitHub Actions with Remote Cache
211
+
212
+ ```yaml
213
+ name: CI
214
+
215
+ on:
216
+ push:
217
+ branches: [main]
218
+ pull_request:
219
+
220
+ env:
221
+ TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
222
+ TURBO_TEAM: ${{ vars.TURBO_TEAM }}
223
+
224
+ jobs:
225
+ check:
226
+ runs-on: ubuntu-latest
227
+ steps:
228
+ - uses: actions/checkout@v4
229
+
230
+ - uses: oven-sh/setup-bun@v2
231
+
232
+ - run: bun install --frozen-lockfile
233
+
234
+ - run: bun run check
235
+ ```
236
+
237
+ ### Self-Hosted Remote Cache
238
+
239
+ ```bash
240
+ # Use turbo with custom remote cache endpoint
241
+ turbo build --api="https://cache.example.com" --token="xxx"
242
+ ```
243
+
244
+ Add to `turbo.json`:
245
+
246
+ ```json
247
+ {
248
+ "$schema": "https://turbo.build/schema.json",
249
+ "remoteCache": {
250
+ "signature": true
251
+ }
252
+ }
253
+ ```
254
+
255
+ ## Filtering
256
+
257
+ ### Run in Specific Package
258
+
259
+ ```bash
260
+ # Run build only in api
261
+ turbo build --filter=@myorg/api
262
+
263
+ # Run build in api and its dependencies
264
+ turbo build --filter=@myorg/api...
265
+
266
+ # Run build in api and packages that depend on it
267
+ turbo build --filter=...@myorg/api
268
+ ```
269
+
270
+ ### Run Based on Changes
271
+
272
+ ```bash
273
+ # Run test only in packages changed since main
274
+ turbo test --filter=[main]
275
+
276
+ # Run test in changed packages and their dependents
277
+ turbo test --filter=...[main]
278
+
279
+ # Run test in changed packages and their dependencies
280
+ turbo test --filter=...[main]...
281
+ ```
282
+
283
+ ### Run by Directory
284
+
285
+ ```bash
286
+ # Run all tasks in apps/
287
+ turbo build --filter=./apps/*
288
+
289
+ # Run all tasks in packages/
290
+ turbo typecheck --filter=./packages/*
291
+ ```
292
+
293
+ ## Development Mode
294
+
295
+ ### turbo.json
296
+
297
+ ```json
298
+ {
299
+ "tasks": {
300
+ "dev": {
301
+ "cache": false,
302
+ "persistent": true,
303
+ "dependsOn": ["^build"]
304
+ }
305
+ }
306
+ }
307
+ ```
308
+
309
+ ### Running Dev
310
+
311
+ ```bash
312
+ # Run dev in all packages that have it
313
+ turbo dev
314
+
315
+ # Run dev in specific packages
316
+ turbo dev --filter=@myorg/api --filter=@myorg/web
317
+
318
+ # Run dev with specific concurrency
319
+ turbo dev --concurrency=2
320
+ ```
321
+
322
+ ## Package-Specific Configuration
323
+
324
+ ### Per-Package Task Config
325
+
326
+ ```json
327
+ // turbo.json
328
+ {
329
+ "tasks": {
330
+ "test": {
331
+ "dependsOn": ["^build"]
332
+ },
333
+ "@myorg/api#test": {
334
+ "dependsOn": ["^build"],
335
+ "env": ["DATABASE_URL"]
336
+ }
337
+ }
338
+ }
339
+ ```
340
+
341
+ ## CI Optimization
342
+
343
+ ### Parallel Execution
344
+
345
+ ```yaml
346
+ jobs:
347
+ check:
348
+ runs-on: ubuntu-latest
349
+ steps:
350
+ - uses: actions/checkout@v4
351
+ - uses: oven-sh/setup-bun@v2
352
+ - run: bun install --frozen-lockfile
353
+
354
+ # Run typecheck and lint in parallel (no dependencies)
355
+ - run: turbo typecheck lint
356
+
357
+ # Then run tests (may depend on build)
358
+ - run: turbo test
359
+ ```
360
+
361
+ ### Cache Artifacts
362
+
363
+ ```yaml
364
+ jobs:
365
+ build:
366
+ runs-on: ubuntu-latest
367
+ steps:
368
+ - uses: actions/checkout@v4
369
+
370
+ - uses: actions/cache@v4
371
+ with:
372
+ path: .turbo
373
+ key: turbo-${{ github.sha }}
374
+ restore-keys: turbo-
375
+
376
+ - uses: oven-sh/setup-bun@v2
377
+ - run: bun install --frozen-lockfile
378
+ - run: turbo build
379
+ ```
380
+
381
+ ## Troubleshooting
382
+
383
+ ### See Task Graph
384
+
385
+ ```bash
386
+ # Print task graph
387
+ turbo build --dry-run
388
+
389
+ # Print as JSON
390
+ turbo build --dry-run=json
391
+ ```
392
+
393
+ ### Debug Cache
394
+
395
+ ```bash
396
+ # See why cache was missed
397
+ turbo build --verbosity=2
398
+
399
+ # Force cache miss
400
+ turbo build --force
401
+ ```
402
+
403
+ ### Clean Cache
404
+
405
+ ```bash
406
+ # Clean local cache
407
+ rm -rf .turbo
408
+
409
+ # Clean all caches
410
+ turbo prune
411
+ ```
412
+
413
+ ## Best Practices
414
+
415
+ 1. **Use `^` prefix** for tasks that depend on dependencies being built first
416
+ 2. **Specify outputs** for cacheable tasks (build, generate)
417
+ 3. **Don't cache dev** - set `cache: false` for development tasks
418
+ 4. **Use remote caching** in CI - speeds up PR checks significantly
419
+ 5. **Filter by changes** - `--filter=[main]` to only run affected packages
420
+ 6. **Set env vars** explicitly - list all env vars that affect task output
421
+ 7. **Use workspace:\*** for internal dependencies
422
+ 8. **Keep shared packages small** - reduces rebuild scope
423
+ 9. **Run typecheck and lint in parallel** - no dependencies between them
424
+ 10. **Use persistent mode** for dev servers that should keep running
425
+ 11. **Cache artifacts in CI** - store `.turbo` directory for faster builds
426
+ 12. **Use Turbo token** for remote caching - significantly faster PR checks