@martinffx/atelier 2.0.0 → 3.0.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 (81) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +94 -253
  3. package/package.json +1 -1
  4. package/skills/{spec-orchestrator → atelier-orchestrator}/SKILL.md +3 -3
  5. package/skills/atelier-setup/SKILL.md +80 -0
  6. package/skills/code-review/references/reviewers.md +3 -3
  7. package/skills/code-review/references/rq.md +6 -6
  8. package/skills/spec-brainstorm/SKILL.md +5 -5
  9. package/skills/spec-implement/SKILL.md +2 -3
  10. package/skills/spec-plan/SKILL.md +21 -29
  11. package/skills/spec-plan/references/plan_template.md +77 -0
  12. package/skills/python-architecture/SKILL.md +0 -148
  13. package/skills/python-architecture/references/data-modeling.md +0 -558
  14. package/skills/python-architecture/references/ddd.md +0 -569
  15. package/skills/python-architecture/references/functional-core.md +0 -337
  16. package/skills/python-build-tools/SKILL.md +0 -153
  17. package/skills/python-build-tools/references/basedpyright.md +0 -321
  18. package/skills/python-build-tools/references/ruff.md +0 -225
  19. package/skills/python-build-tools/references/uv.md +0 -257
  20. package/skills/python-fastapi/SKILL.md +0 -184
  21. package/skills/python-fastapi/references/api-design.md +0 -563
  22. package/skills/python-fastapi/references/dependencies.md +0 -479
  23. package/skills/python-fastapi/references/middleware.md +0 -475
  24. package/skills/python-fastapi/references/validation.md +0 -497
  25. package/skills/python-modern-python/SKILL.md +0 -201
  26. package/skills/python-modern-python/references/async.md +0 -76
  27. package/skills/python-modern-python/references/pattern-matching.md +0 -89
  28. package/skills/python-modern-python/references/typing.md +0 -96
  29. package/skills/python-monorepo/SKILL.md +0 -146
  30. package/skills/python-monorepo/references/docker.md +0 -515
  31. package/skills/python-monorepo/references/namespace-packages.md +0 -426
  32. package/skills/python-monorepo/references/workspace-config.md +0 -341
  33. package/skills/python-sqlalchemy/SKILL.md +0 -119
  34. package/skills/python-sqlalchemy/references/async.md +0 -51
  35. package/skills/python-sqlalchemy/references/models.md +0 -67
  36. package/skills/python-sqlalchemy/references/queries.md +0 -57
  37. package/skills/python-temporal/SKILL.md +0 -128
  38. package/skills/python-temporal/references/patterns.md +0 -87
  39. package/skills/python-temporal/references/testing.md +0 -54
  40. package/skills/python-testing/SKILL.md +0 -161
  41. package/skills/python-testing/references/boundaries.md +0 -449
  42. package/skills/python-testing/references/mocking.md +0 -449
  43. package/skills/python-testing/references/pytest.md +0 -524
  44. package/skills/typescript-api-design/SKILL.md +0 -396
  45. package/skills/typescript-api-design/references/error-responses.md +0 -469
  46. package/skills/typescript-build-tools/SKILL.md +0 -447
  47. package/skills/typescript-build-tools/references/biome.md +0 -436
  48. package/skills/typescript-build-tools/references/bun.md +0 -432
  49. package/skills/typescript-build-tools/references/turborepo.md +0 -426
  50. package/skills/typescript-build-tools/references/vitest.md +0 -518
  51. package/skills/typescript-drizzle-orm/SKILL.md +0 -398
  52. package/skills/typescript-drizzle-orm/references/cloudflare.md +0 -392
  53. package/skills/typescript-drizzle-orm/references/entity-pattern.md +0 -412
  54. package/skills/typescript-drizzle-orm/references/postgresql.md +0 -191
  55. package/skills/typescript-drizzle-orm/references/repository-pattern.md +0 -479
  56. package/skills/typescript-drizzle-orm/references/sqlite.md +0 -291
  57. package/skills/typescript-dynamodb-toolbox/SKILL.md +0 -370
  58. package/skills/typescript-dynamodb-toolbox/references/entity-layer.md +0 -574
  59. package/skills/typescript-dynamodb-toolbox/references/error-handling.md +0 -495
  60. package/skills/typescript-dynamodb-toolbox/references/modeling.md +0 -332
  61. package/skills/typescript-dynamodb-toolbox/references/repository-layer.md +0 -631
  62. package/skills/typescript-dynamodb-toolbox/references/testing.md +0 -718
  63. package/skills/typescript-dynamodb-toolbox/references/transactions.md +0 -423
  64. package/skills/typescript-effect-ts/SKILL.md +0 -341
  65. package/skills/typescript-effect-ts/references/core.md +0 -412
  66. package/skills/typescript-effect-ts/references/error-handling.md +0 -468
  67. package/skills/typescript-effect-ts/references/resources.md +0 -476
  68. package/skills/typescript-effect-ts/references/schema.md +0 -536
  69. package/skills/typescript-effect-ts/references/services.md +0 -461
  70. package/skills/typescript-fastify/SKILL.md +0 -405
  71. package/skills/typescript-fastify/references/plugins.md +0 -329
  72. package/skills/typescript-fastify/references/typeid.md +0 -315
  73. package/skills/typescript-functional-patterns/SKILL.md +0 -402
  74. package/skills/typescript-functional-patterns/references/adts.md +0 -497
  75. package/skills/typescript-functional-patterns/references/branded-types.md +0 -542
  76. package/skills/typescript-functional-patterns/references/migration-guide.md +0 -695
  77. package/skills/typescript-functional-patterns/references/option-result.md +0 -585
  78. package/skills/typescript-testing/SKILL.md +0 -353
  79. package/skills/typescript-testing/references/mocking.md +0 -675
  80. package/skills/typescript-testing/references/msw.md +0 -852
  81. package/skills/typescript-testing/references/snapshot-testing.md +0 -774
@@ -1,257 +0,0 @@
1
- # uv - Fast Python Package Manager
2
-
3
- Rust-based Python package manager that replaces pip, pip-tools, and virtualenv. 10-100x faster than pip with full pip and setuptools compatibility.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- curl -LsSf https://astral.sh/uv/install.sh | sh
9
- ```
10
-
11
- ## Project Setup
12
-
13
- ```bash
14
- # Create new project with uv template
15
- uv init my-project
16
- cd my-project
17
-
18
- # Initialize uv in existing project
19
- uv init
20
-
21
- # Install Python version
22
- uv python install 3.12
23
-
24
- # Install dependencies
25
- uv sync
26
-
27
- # Add dependencies
28
- uv add fastapi pydantic
29
-
30
- # Add dev dependencies
31
- uv add --dev pytest ruff basedpyright
32
-
33
- # Remove dependency
34
- uv remove fastapi
35
- ```
36
-
37
- ## Running Commands
38
-
39
- ```bash
40
- # Run Python script
41
- uv run python script.py
42
-
43
- # Run module
44
- uv run python -m my_module
45
-
46
- # Run installed tool (no venv activation needed)
47
- uv run pytest
48
- uv run ruff check .
49
- uv run basedpyright
50
-
51
- # Run with specific Python version
52
- uv run --python 3.12 python script.py
53
-
54
- # Run script in context with venv
55
- uv run python -c "import fastapi; print(fastapi.__version__)"
56
- ```
57
-
58
- ## Dependency Management
59
-
60
- ```bash
61
- # Update all dependencies
62
- uv lock --upgrade
63
-
64
- # Update specific package
65
- uv lock --upgrade-package fastapi
66
-
67
- # Show dependency tree
68
- uv tree
69
-
70
- # Export requirements.txt
71
- uv pip compile pyproject.toml -o requirements.txt
72
-
73
- # Sync after manual pyproject.toml edits
74
- uv sync
75
-
76
- # Sync and skip lock file update
77
- uv sync --frozen
78
-
79
- # Reinstall all
80
- uv sync --reinstall
81
- ```
82
-
83
- ## Workspace Configuration
84
-
85
- For monorepos with multiple packages:
86
-
87
- ```toml
88
- [workspace]
89
- members = ["packages/core", "packages/api", "packages/cli"]
90
-
91
- [project]
92
- name = "monorepo"
93
- version = "0.1.0"
94
-
95
- [tool.uv.workspace]
96
- exclude = ["docs"]
97
- ```
98
-
99
- Then within each member:
100
-
101
- ```toml
102
- [project]
103
- name = "core"
104
- version = "0.1.0"
105
- dependencies = []
106
-
107
- [project.optional-dependencies]
108
- dev = ["pytest>=8.0.0"]
109
- ```
110
-
111
- ## Scripts in pyproject.toml
112
-
113
- ```toml
114
- [tool.uv.scripts]
115
- dev = "uvicorn my_app.main:app --reload"
116
- migrate = "alembic upgrade head"
117
- test = "pytest tests/"
118
- lint = "ruff check ."
119
- format = "ruff format ."
120
- typecheck = "basedpyright"
121
- check = { chain = ["lint", "format", "typecheck", "test"] }
122
- ```
123
-
124
- Run scripts:
125
-
126
- ```bash
127
- uv run dev
128
- uv run migrate
129
- uv run test
130
- uv run check # Runs all checks in sequence
131
- ```
132
-
133
- ## Version Pinning
134
-
135
- Specify exact versions in pyproject.toml:
136
-
137
- ```toml
138
- dependencies = [
139
- "fastapi>=0.100.0,<1.0.0",
140
- "pydantic==2.0.0",
141
- "sqlalchemy>=2.0.0",
142
- ]
143
-
144
- [project.optional-dependencies]
145
- dev = [
146
- "pytest>=8.0.0",
147
- "pytest-cov>=5.0.0",
148
- "ruff>=0.8.0",
149
- "basedpyright>=1.0.0",
150
- ]
151
- ```
152
-
153
- The lock file (`uv.lock`) records exact versions used.
154
-
155
- ## Environment Variables
156
-
157
- Create `.env` file in project root:
158
-
159
- ```bash
160
- DATABASE_URL="postgresql://user:pass@localhost/mydb"
161
- PYTHONPATH="src"
162
- LOG_LEVEL="INFO"
163
- ```
164
-
165
- Load in Python:
166
-
167
- ```python
168
- import os
169
- from dotenv import load_dotenv
170
-
171
- load_dotenv()
172
- db_url = os.getenv("DATABASE_URL")
173
- ```
174
-
175
- Or use `python-dotenv`:
176
-
177
- ```bash
178
- uv add python-dotenv
179
- ```
180
-
181
- ## Advanced Options
182
-
183
- ### Custom Index
184
-
185
- ```toml
186
- [tool.uv]
187
- index-url = "https://pypi.org/simple"
188
- extra-index-urls = ["https://test.pypi.org/simple"]
189
- ```
190
-
191
- ### Dev Dependencies Separation
192
-
193
- ```toml
194
- [project]
195
- dependencies = ["fastapi>=0.100.0"]
196
-
197
- [project.optional-dependencies]
198
- dev = ["pytest>=8.0.0", "ruff>=0.8.0"]
199
- test = ["pytest>=8.0.0"]
200
- docs = ["sphinx>=6.0.0"]
201
-
202
- [tool.uv]
203
- dev-dependencies = [
204
- "pytest>=8.0.0",
205
- "ruff>=0.8.0",
206
- "basedpyright>=1.0.0",
207
- ]
208
- ```
209
-
210
- ### Constraints File
211
-
212
- Use constraints.txt to pin versions without changing dependencies:
213
-
214
- ```bash
215
- # constraints.txt
216
- sqlalchemy==2.0.0
217
- pydantic==2.5.0
218
- ```
219
-
220
- Apply constraints:
221
-
222
- ```bash
223
- uv pip compile pyproject.toml --constraint constraints.txt -o requirements.txt
224
- ```
225
-
226
- ## Performance
227
-
228
- uv is 10-100x faster because it:
229
- - Written in Rust (native performance)
230
- - Parallel dependency resolution
231
- - Intelligent caching
232
- - Compiled wheels by default
233
- - Local disk cache
234
-
235
- Typical project:
236
- - pip: 30-60 seconds
237
- - uv: 1-5 seconds
238
-
239
- ## Troubleshooting
240
-
241
- ```bash
242
- # Clear cache
243
- uv cache clean
244
-
245
- # Verbose output
246
- uv sync -v
247
-
248
- # Check Python installation
249
- uv python list
250
-
251
- # Update uv itself
252
- uv self update
253
-
254
- # Check project structure
255
- uv tree
256
- uv tree --depth 2
257
- ```
@@ -1,184 +0,0 @@
1
- ---
2
- name: python-fastapi
3
- description: Building REST APIs with FastAPI, Pydantic validation, and OpenAPI. Use when creating routes, handling requests, designing endpoints, implementing validation, error responses, pagination, or generating API documentation.
4
- user-invocable: false
5
- ---
6
-
7
- # FastAPI - Modern Python Web APIs
8
-
9
- FastAPI is a modern, fast web framework for building APIs with Python, using standard Python type hints. FastAPI automatically validates requests, generates OpenAPI documentation, and provides excellent developer experience.
10
-
11
- ## Quick Start
12
-
13
- ### Basic Application
14
-
15
- ```python
16
- from fastapi import FastAPI
17
- from pydantic import BaseModel
18
-
19
- app = FastAPI(
20
- title="My API",
21
- description="API for my application",
22
- version="1.0.0",
23
- )
24
-
25
- class Item(BaseModel):
26
- name: str
27
- price: float
28
-
29
- @app.get("/")
30
- def read_root():
31
- return {"message": "Hello World"}
32
-
33
- @app.post("/items", response_model=Item)
34
- def create_item(item: Item):
35
- return item
36
- ```
37
-
38
- **Run with:**
39
- ```bash
40
- uvicorn main:app --reload
41
- ```
42
-
43
- ## Core Concepts
44
-
45
- ### Request & Response Models
46
-
47
- Use Pydantic models for automatic validation and serialization:
48
-
49
- ```python
50
- from pydantic import BaseModel, EmailStr, Field
51
-
52
- class CreateUserRequest(BaseModel):
53
- email: EmailStr
54
- name: str = Field(min_length=1, max_length=100)
55
- age: int = Field(ge=18, le=120)
56
-
57
- class UserResponse(BaseModel):
58
- id: int
59
- email: str
60
- name: str
61
- model_config = {"from_attributes": True} # Enable ORM mode
62
-
63
- @app.post("/users", response_model=UserResponse)
64
- def create_user(user: CreateUserRequest):
65
- """Request validated, response serialized automatically"""
66
- return user
67
- ```
68
-
69
- See `references/validation.md` for detailed validation patterns including custom validators and field constraints.
70
-
71
- ### Routers for Organization
72
-
73
- Split routes across routers for clean organization:
74
-
75
- ```python
76
- # routers/users.py
77
- from fastapi import APIRouter
78
-
79
- router = APIRouter(prefix="/users", tags=["users"])
80
-
81
- @router.get("/")
82
- def list_users():
83
- ...
84
-
85
- @router.post("/")
86
- def create_user(user: CreateUserRequest):
87
- ...
88
-
89
- # main.py
90
- app.include_router(users.router)
91
- ```
92
-
93
- ### Dependency Injection
94
-
95
- FastAPI's core feature for managing dependencies like database sessions and authentication:
96
-
97
- ```python
98
- from fastapi import Depends
99
- from sqlalchemy.orm import Session
100
-
101
- def get_db() -> Session:
102
- """Database session dependency"""
103
- db = SessionLocal()
104
- try:
105
- yield db
106
- finally:
107
- db.close()
108
-
109
- @app.get("/users")
110
- def list_users(db: Session = Depends(get_db)):
111
- """db automatically injected"""
112
- return db.query(User).all()
113
- ```
114
-
115
- See `references/dependencies.md` for advanced patterns including auth services, scoped dependencies, and dependency classes.
116
-
117
- ## Error Handling
118
-
119
- ### HTTP Exceptions
120
-
121
- ```python
122
- from fastapi import HTTPException
123
-
124
- @app.get("/users/{user_id}")
125
- def get_user(user_id: int):
126
- user = db.get(user_id)
127
- if not user:
128
- raise HTTPException(status_code=404, detail="User not found")
129
- return user
130
- ```
131
-
132
- ### Custom Exception Handlers
133
-
134
- ```python
135
- from fastapi import Request
136
- from fastapi.responses import JSONResponse
137
-
138
- class BusinessError(Exception):
139
- def __init__(self, message: str):
140
- self.message = message
141
-
142
- @app.exception_handler(BusinessError)
143
- async def business_error_handler(request: Request, exc: BusinessError):
144
- return JSONResponse(
145
- status_code=400,
146
- content={"error": exc.message},
147
- )
148
- ```
149
-
150
- ## Project Structure
151
-
152
- ```
153
- my-api/
154
- ├── main.py # FastAPI app
155
- ├── routers/ # Route handlers
156
- │ ├── users.py
157
- │ └── products.py
158
- ├── schemas/ # Pydantic models
159
- │ ├── users.py
160
- │ └── products.py
161
- ├── services/ # Business logic
162
- │ └── users.py
163
- ├── repositories/ # Data access
164
- │ └── users.py
165
- └── dependencies.py # Dependency injection
166
- ```
167
-
168
- ## Reference Materials
169
-
170
- Detailed patterns for common scenarios:
171
-
172
- - **Validation**: `references/validation.md` - Field constraints, custom validators, model validation
173
- - **Dependencies**: `references/dependencies.md` - Auth services, scoped dependencies, advanced injection patterns
174
- - **Middleware**: `references/middleware.md` - CORS, custom middleware, request/response processing
175
- - **API Design**: `references/api-design.md` - REST naming, pagination, OpenAPI customization, status codes
176
-
177
- ## Best Practices
178
-
179
- 1. **Use response_model** - Always define explicit response schemas
180
- 2. **Validate inputs** - Use Pydantic models with constraints
181
- 3. **Dependency injection** - Manage sessions, auth, and cross-cutting concerns
182
- 4. **Router organization** - Split routes by resource/domain
183
- 5. **Error handling** - Use HTTP exceptions and custom handlers appropriately
184
- 6. **Type hints** - FastAPI uses them for both validation and documentation