@martinffx/atelier 2.0.0 → 3.0.1
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.
- package/CHANGELOG.md +21 -0
- package/README.md +94 -253
- package/package.json +1 -1
- package/skills/{spec-orchestrator → atelier-orchestrator}/SKILL.md +3 -3
- package/skills/atelier-setup/SKILL.md +80 -0
- package/skills/code-review/references/reviewers.md +3 -3
- package/skills/code-review/references/rq.md +6 -6
- package/skills/spec-brainstorm/SKILL.md +5 -5
- package/skills/spec-implement/SKILL.md +2 -3
- package/skills/spec-plan/SKILL.md +21 -29
- package/skills/spec-plan/references/plan_template.md +77 -0
- package/skills/python-architecture/SKILL.md +0 -148
- package/skills/python-architecture/references/data-modeling.md +0 -558
- package/skills/python-architecture/references/ddd.md +0 -569
- package/skills/python-architecture/references/functional-core.md +0 -337
- package/skills/python-build-tools/SKILL.md +0 -153
- package/skills/python-build-tools/references/basedpyright.md +0 -321
- package/skills/python-build-tools/references/ruff.md +0 -225
- package/skills/python-build-tools/references/uv.md +0 -257
- package/skills/python-fastapi/SKILL.md +0 -184
- package/skills/python-fastapi/references/api-design.md +0 -563
- package/skills/python-fastapi/references/dependencies.md +0 -479
- package/skills/python-fastapi/references/middleware.md +0 -475
- package/skills/python-fastapi/references/validation.md +0 -497
- package/skills/python-modern-python/SKILL.md +0 -201
- package/skills/python-modern-python/references/async.md +0 -76
- package/skills/python-modern-python/references/pattern-matching.md +0 -89
- package/skills/python-modern-python/references/typing.md +0 -96
- package/skills/python-monorepo/SKILL.md +0 -146
- package/skills/python-monorepo/references/docker.md +0 -515
- package/skills/python-monorepo/references/namespace-packages.md +0 -426
- package/skills/python-monorepo/references/workspace-config.md +0 -341
- package/skills/python-sqlalchemy/SKILL.md +0 -119
- package/skills/python-sqlalchemy/references/async.md +0 -51
- package/skills/python-sqlalchemy/references/models.md +0 -67
- package/skills/python-sqlalchemy/references/queries.md +0 -57
- package/skills/python-temporal/SKILL.md +0 -128
- package/skills/python-temporal/references/patterns.md +0 -87
- package/skills/python-temporal/references/testing.md +0 -54
- package/skills/python-testing/SKILL.md +0 -161
- package/skills/python-testing/references/boundaries.md +0 -449
- package/skills/python-testing/references/mocking.md +0 -449
- package/skills/python-testing/references/pytest.md +0 -524
- package/skills/typescript-api-design/SKILL.md +0 -396
- package/skills/typescript-api-design/references/error-responses.md +0 -469
- package/skills/typescript-build-tools/SKILL.md +0 -447
- package/skills/typescript-build-tools/references/biome.md +0 -436
- package/skills/typescript-build-tools/references/bun.md +0 -432
- package/skills/typescript-build-tools/references/turborepo.md +0 -426
- package/skills/typescript-build-tools/references/vitest.md +0 -518
- package/skills/typescript-drizzle-orm/SKILL.md +0 -398
- package/skills/typescript-drizzle-orm/references/cloudflare.md +0 -392
- package/skills/typescript-drizzle-orm/references/entity-pattern.md +0 -412
- package/skills/typescript-drizzle-orm/references/postgresql.md +0 -191
- package/skills/typescript-drizzle-orm/references/repository-pattern.md +0 -479
- package/skills/typescript-drizzle-orm/references/sqlite.md +0 -291
- package/skills/typescript-dynamodb-toolbox/SKILL.md +0 -370
- package/skills/typescript-dynamodb-toolbox/references/entity-layer.md +0 -574
- package/skills/typescript-dynamodb-toolbox/references/error-handling.md +0 -495
- package/skills/typescript-dynamodb-toolbox/references/modeling.md +0 -332
- package/skills/typescript-dynamodb-toolbox/references/repository-layer.md +0 -631
- package/skills/typescript-dynamodb-toolbox/references/testing.md +0 -718
- package/skills/typescript-dynamodb-toolbox/references/transactions.md +0 -423
- package/skills/typescript-effect-ts/SKILL.md +0 -341
- package/skills/typescript-effect-ts/references/core.md +0 -412
- package/skills/typescript-effect-ts/references/error-handling.md +0 -468
- package/skills/typescript-effect-ts/references/resources.md +0 -476
- package/skills/typescript-effect-ts/references/schema.md +0 -536
- package/skills/typescript-effect-ts/references/services.md +0 -461
- package/skills/typescript-fastify/SKILL.md +0 -405
- package/skills/typescript-fastify/references/plugins.md +0 -329
- package/skills/typescript-fastify/references/typeid.md +0 -315
- package/skills/typescript-functional-patterns/SKILL.md +0 -402
- package/skills/typescript-functional-patterns/references/adts.md +0 -497
- package/skills/typescript-functional-patterns/references/branded-types.md +0 -542
- package/skills/typescript-functional-patterns/references/migration-guide.md +0 -695
- package/skills/typescript-functional-patterns/references/option-result.md +0 -585
- package/skills/typescript-testing/SKILL.md +0 -353
- package/skills/typescript-testing/references/mocking.md +0 -675
- package/skills/typescript-testing/references/msw.md +0 -852
- package/skills/typescript-testing/references/snapshot-testing.md +0 -774
|
@@ -3,7 +3,7 @@ name: spec-plan
|
|
|
3
3
|
description: >
|
|
4
4
|
Write approved implementation plans in one of two modes. Explicit Inline mode creates a
|
|
5
5
|
conversational plan for bounded work. Spec-backed Plan converts an approved design.md into
|
|
6
|
-
plan.json and optional tracked tasks. Trigger after
|
|
6
|
+
plan.json and optional tracked tasks. Trigger after atelier-orchestrator selects a mode, when
|
|
7
7
|
the user asks to plan work, or after spec-brainstorm completes. Direct invocation without a
|
|
8
8
|
selected mode uses Spec-backed Plan. Do NOT use for research or execution.
|
|
9
9
|
user-invocable: true
|
|
@@ -15,7 +15,7 @@ Write a proportional plan so clear that any engineer can follow it. The selected
|
|
|
15
15
|
mode determines whether the plan stays in the conversation or becomes a persisted structured
|
|
16
16
|
artifact. This skill does not write code.
|
|
17
17
|
|
|
18
|
-
`
|
|
18
|
+
`atelier-orchestrator` owns automatic classification and the human may override it. When this
|
|
19
19
|
skill is directly invoked without a selected mode, use Spec-backed Plan. If Inline planning
|
|
20
20
|
reveals substantial design or coordination needs, ask the human whether to switch to a
|
|
21
21
|
Spec-backed Plan before presenting the plan.
|
|
@@ -24,30 +24,16 @@ Spec-backed Plan before presenting the plan.
|
|
|
24
24
|
|
|
25
25
|
### Inline Plan (when explicitly selected)
|
|
26
26
|
|
|
27
|
-
No repository artifact and no task tracker entry.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## context
|
|
31
|
-
|
|
32
|
-
## scope
|
|
33
|
-
|
|
34
|
-
## changes
|
|
35
|
-
|
|
36
|
-
## files
|
|
37
|
-
|
|
38
|
-
## validation
|
|
39
|
-
```
|
|
27
|
+
No repository artifact and no task tracker entry. Read
|
|
28
|
+
`references/plan_template.md` and present the plan in conversation using its
|
|
29
|
+
structure. Omit optional subsections rather than rendering empty headings.
|
|
40
30
|
|
|
41
31
|
## Inline Plan Workflow
|
|
42
32
|
|
|
43
33
|
Read enough of the codebase to identify the current behavior, boundaries, affected files,
|
|
44
|
-
and concrete validation. Keep the plan proportional.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- `scope`: Explicit in-scope and out-of-scope boundaries
|
|
48
|
-
- `changes`: Ordered implementation changes at useful engineering granularity
|
|
49
|
-
- `files`: Exact files expected to be created, modified, or deleted
|
|
50
|
-
- `validation`: Concrete tests, checks, or manual verification
|
|
34
|
+
and concrete validation. Keep the plan proportional to implementation risk. Fill the
|
|
35
|
+
template with confirmed, file-and-symbol-level details, including cross-file wiring or
|
|
36
|
+
ordering constraints where they matter.
|
|
51
37
|
|
|
52
38
|
Do not manufacture phases, task IDs, dependency graphs, acceptance matrices, `design.md`,
|
|
53
39
|
`plan.json`, Beads issues, or harness todos. The conversation is the plan artifact.
|
|
@@ -56,12 +42,18 @@ Do not manufacture phases, task IDs, dependency graphs, acceptance matrices, `de
|
|
|
56
42
|
|
|
57
43
|
**STOP. Wait for human review.**
|
|
58
44
|
|
|
59
|
-
If the human requests
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
If the human requests any adjustment, apply it to the working plan and re-present the
|
|
46
|
+
entire updated plan using `references/plan_template.md`. Include unchanged sections so
|
|
47
|
+
the human reviews one coherent plan. Never respond with only the changed text, an
|
|
48
|
+
affected section, a summary, or an acknowledgement. A one-word correction is still a
|
|
49
|
+
plan revision: incorporate it and present the complete plan again.
|
|
50
|
+
|
|
51
|
+
Every revision invalidates prior approval. End each revised plan with "Inline Plan ready
|
|
52
|
+
for review." and stop until the human explicitly approves that complete version. Do not
|
|
53
|
+
implement until the current plan is approved.
|
|
62
54
|
|
|
63
55
|
Approval authorizes implementation. Implement the approved conversational plan directly using
|
|
64
|
-
the Inline execution safeguards in `
|
|
56
|
+
the Inline execution safeguards in `atelier-orchestrator`. Do not invoke `spec-implement`,
|
|
65
57
|
`spec-finish`, `code-subagents`, or task tracking.
|
|
66
58
|
|
|
67
59
|
Do not create planning artifacts or tracker entries during this handoff.
|
|
@@ -286,7 +278,7 @@ Tell the human:
|
|
|
286
278
|
Do not start implementing. That's spec-implement's job.
|
|
287
279
|
|
|
288
280
|
If implementation reveals missing tasks, update plan.json. If design is wrong,
|
|
289
|
-
loop back to research. See **
|
|
281
|
+
loop back to research. See **atelier-orchestrator** for iteration patterns.
|
|
290
282
|
|
|
291
283
|
---
|
|
292
284
|
|
|
@@ -294,8 +286,8 @@ loop back to research. See **spec-orchestrator** for iteration patterns.
|
|
|
294
286
|
|
|
295
287
|
| Selected mode / human says | You do |
|
|
296
288
|
|----------------------------|--------|
|
|
297
|
-
| Inline / "write a plan" | Present the
|
|
298
|
-
| Inline / "I added notes" |
|
|
289
|
+
| Inline / "write a plan" | Present the complete Inline Plan from the template, stop |
|
|
290
|
+
| Inline / "I added notes" | Apply the changes, re-present the entire updated Inline Plan, and stop for renewed approval |
|
|
299
291
|
| Inline / "approved" | Implement the approved conversational plan directly; create no artifacts |
|
|
300
292
|
| Spec-backed / "write a plan" | Write the plan draft from design.md, stop |
|
|
301
293
|
| Spec-backed / "I added notes" | Re-read, address all notes, do NOT implement |
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
## Context
|
|
2
|
+
|
|
3
|
+
Describe why the change is needed and summarize the relevant current behavior.
|
|
4
|
+
Include repository facts, constraints, dependencies, and prior work that the
|
|
5
|
+
implementation must preserve. Contrast the current and desired states when useful.
|
|
6
|
+
|
|
7
|
+
Write enough for an engineer unfamiliar with the immediate problem to understand
|
|
8
|
+
the plan. Do not repeat implementation steps that belong under Changes.
|
|
9
|
+
|
|
10
|
+
### Decisions
|
|
11
|
+
|
|
12
|
+
Include this subsection when the plan depends on meaningful implementation choices.
|
|
13
|
+
|
|
14
|
+
Record the chosen architecture, interfaces, ownership boundaries, data flow,
|
|
15
|
+
execution order, or technology choices. Explain why the selected approach fits
|
|
16
|
+
the existing codebase. Mention rejected alternatives only when doing so prevents
|
|
17
|
+
the implementer from revisiting a settled choice.
|
|
18
|
+
|
|
19
|
+
Omit this subsection when the implementation is mechanical or the repository
|
|
20
|
+
already dictates the approach.
|
|
21
|
+
|
|
22
|
+
### Scope
|
|
23
|
+
|
|
24
|
+
Include this subsection when the boundaries of the work are not obvious or when
|
|
25
|
+
closely related work must be explicitly excluded.
|
|
26
|
+
|
|
27
|
+
State what is in scope and out of scope. Identify behavior that must remain
|
|
28
|
+
unchanged and any adjacent systems, cleanup, or follow-up work that this plan
|
|
29
|
+
does not address.
|
|
30
|
+
|
|
31
|
+
Omit this subsection when the Context and Changes already make the boundaries
|
|
32
|
+
unambiguous.
|
|
33
|
+
|
|
34
|
+
## Changes
|
|
35
|
+
|
|
36
|
+
Describe the implementation in dependency order. Use a numbered list when there
|
|
37
|
+
is more than one change.
|
|
38
|
+
|
|
39
|
+
For each change:
|
|
40
|
+
|
|
41
|
+
- Start with the exact file path and a concise description.
|
|
42
|
+
- Name the affected functions, types, routes, configuration keys, or other symbols.
|
|
43
|
+
- Explain the current behavior when it matters to the change.
|
|
44
|
+
- Describe the required behavior and important implementation constraints.
|
|
45
|
+
- Explain cross-file wiring, data flow, error handling, and execution order where relevant.
|
|
46
|
+
- Identify files to create, modify, rename, or delete.
|
|
47
|
+
- Mention corresponding test changes alongside the behavior they verify.
|
|
48
|
+
- Use a short signature or pseudocode only when it removes material ambiguity.
|
|
49
|
+
|
|
50
|
+
The plan should provide enough detail for another engineer to implement without
|
|
51
|
+
rediscovering the approach, while avoiding line-by-line coding instructions.
|
|
52
|
+
|
|
53
|
+
## Known Limitations
|
|
54
|
+
|
|
55
|
+
Include this section only when the planned implementation intentionally leaves
|
|
56
|
+
limitations, risks, unsupported cases, deferred cleanup, or follow-up work.
|
|
57
|
+
|
|
58
|
+
Explain the practical impact of each limitation. Do not use this section for
|
|
59
|
+
unresolved decisions that must be settled before implementation.
|
|
60
|
+
|
|
61
|
+
Omit the entire section when there are no known limitations.
|
|
62
|
+
|
|
63
|
+
## Verification
|
|
64
|
+
|
|
65
|
+
List the concrete checks required after implementation.
|
|
66
|
+
|
|
67
|
+
For each check:
|
|
68
|
+
|
|
69
|
+
- Provide the exact command or manual action when known.
|
|
70
|
+
- State the expected outcome or invariant being verified.
|
|
71
|
+
- Include focused tests for changed behavior.
|
|
72
|
+
- Include broader build, test, lint, or type-check commands appropriate to the repository.
|
|
73
|
+
- Include repository searches or state checks when confirming removals, migrations,
|
|
74
|
+
conflict resolution, generated files, or absence of stale references.
|
|
75
|
+
- Note any verification that cannot be performed locally and why.
|
|
76
|
+
|
|
77
|
+
Prefer the smallest focused check first, followed by broader regression checks.
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: python-architecture
|
|
3
|
-
description: Python application architecture with functional core, effectful shell, DDD, and data modeling. Use when designing application layers, separating pure business logic from IO, defining domain models, implementing validation, or structuring bounded contexts.
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Python Application Architecture
|
|
8
|
-
|
|
9
|
-
Modern Python application architecture following functional core / imperative shell pattern, Domain-Driven Design, and type-safe data modeling.
|
|
10
|
-
|
|
11
|
-
## Core Principle: Functional Core / Imperative Shell
|
|
12
|
-
|
|
13
|
-
Separate pure business logic from side effects:
|
|
14
|
-
|
|
15
|
-
- **Functional Core**: Pure functions, business logic, no IO
|
|
16
|
-
- **Imperative Shell**: Coordinates external dependencies, handles side effects
|
|
17
|
-
|
|
18
|
-
See [references/functional-core.md](references/functional-core.md) for detailed patterns and examples.
|
|
19
|
-
|
|
20
|
-
## Layered Architecture
|
|
21
|
-
|
|
22
|
-
Follow bottom-up dependency flow:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
Router/Handler → Service → Repository → Entity → Database
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Each layer depends only on layers below.
|
|
29
|
-
|
|
30
|
-
**Responsibilities:**
|
|
31
|
-
- **Entity**: Domain models, validation, business rules, data transformations (fromRequest, toRecord, toResponse)
|
|
32
|
-
- **Repository**: Abstract storage interface, returns domain entities
|
|
33
|
-
- **Service**: Business workflows, orchestrates entities and repositories
|
|
34
|
-
- **Router/Handler**: HTTP handling, delegates to services
|
|
35
|
-
|
|
36
|
-
## Domain Models
|
|
37
|
-
|
|
38
|
-
### Entity Example
|
|
39
|
-
|
|
40
|
-
```python
|
|
41
|
-
from dataclasses import dataclass
|
|
42
|
-
from uuid import UUID
|
|
43
|
-
from decimal import Decimal
|
|
44
|
-
|
|
45
|
-
@dataclass
|
|
46
|
-
class Order:
|
|
47
|
-
"""Entity - has identity and encapsulated behavior"""
|
|
48
|
-
id: UUID
|
|
49
|
-
customer_id: UUID
|
|
50
|
-
total: Decimal
|
|
51
|
-
status: str
|
|
52
|
-
|
|
53
|
-
def apply_discount(self, rate: Decimal) -> None:
|
|
54
|
-
"""Business rule - encapsulated in entity"""
|
|
55
|
-
if self.status == "pending":
|
|
56
|
-
self.total = self.total * (1 - rate)
|
|
57
|
-
|
|
58
|
-
@classmethod
|
|
59
|
-
def from_request(cls, req, customer_id: UUID) -> "Order":
|
|
60
|
-
"""Transform API request → entity"""
|
|
61
|
-
return cls(id=uuid4(), customer_id=customer_id, total=Decimal("0"), status="pending")
|
|
62
|
-
|
|
63
|
-
def to_response(self):
|
|
64
|
-
"""Transform entity → API response"""
|
|
65
|
-
return {"id": self.id, "total": self.total, "status": self.status}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Value Object Example
|
|
69
|
-
|
|
70
|
-
```python
|
|
71
|
-
from dataclasses import dataclass
|
|
72
|
-
|
|
73
|
-
@dataclass(frozen=True)
|
|
74
|
-
class Money:
|
|
75
|
-
"""Value object - immutable, no identity"""
|
|
76
|
-
amount: Decimal
|
|
77
|
-
currency: str
|
|
78
|
-
|
|
79
|
-
def add(self, other: "Money") -> "Money":
|
|
80
|
-
if self.currency != other.currency:
|
|
81
|
-
raise ValueError("Cannot add different currencies")
|
|
82
|
-
return Money(self.amount + other.amount, self.currency)
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
See [references/ddd.md](references/ddd.md) for aggregates, bounded contexts, and domain services.
|
|
86
|
-
|
|
87
|
-
## Repository Pattern
|
|
88
|
-
|
|
89
|
-
Abstract storage behind interface:
|
|
90
|
-
|
|
91
|
-
```python
|
|
92
|
-
from abc import ABC, abstractmethod
|
|
93
|
-
from typing import Optional
|
|
94
|
-
|
|
95
|
-
class OrderRepository(ABC):
|
|
96
|
-
"""Abstract repository - interface only"""
|
|
97
|
-
|
|
98
|
-
@abstractmethod
|
|
99
|
-
def get(self, order_id: UUID) -> Optional[Order]:
|
|
100
|
-
pass
|
|
101
|
-
|
|
102
|
-
@abstractmethod
|
|
103
|
-
def save(self, order: Order) -> None:
|
|
104
|
-
pass
|
|
105
|
-
|
|
106
|
-
class PostgresOrderRepository(OrderRepository):
|
|
107
|
-
"""Concrete implementation"""
|
|
108
|
-
|
|
109
|
-
def get(self, order_id: UUID) -> Optional[Order]:
|
|
110
|
-
record = self.session.get(OrderRecord, order_id)
|
|
111
|
-
return Order.from_record(record) if record else None
|
|
112
|
-
|
|
113
|
-
def save(self, order: Order) -> None:
|
|
114
|
-
record = order.to_record()
|
|
115
|
-
self.session.merge(record)
|
|
116
|
-
self.session.commit()
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Data Modeling
|
|
120
|
-
|
|
121
|
-
- **dataclasses**: Domain models and internal logic (lightweight, standard library)
|
|
122
|
-
- **Pydantic**: API boundaries (validation, JSON schema, OpenAPI)
|
|
123
|
-
- **Entity transformations**: `from_request()`, `to_response()`, `from_record()`, `to_record()`
|
|
124
|
-
|
|
125
|
-
See [references/data-modeling.md](references/data-modeling.md) for validation patterns, Pydantic features, and transformation examples.
|
|
126
|
-
|
|
127
|
-
## Best Practices
|
|
128
|
-
|
|
129
|
-
1. **Pure functions first** - Write business logic without IO dependencies
|
|
130
|
-
2. **Entity encapsulation** - Keep business rules inside entities
|
|
131
|
-
3. **Repository abstraction** - Hide storage details, work with domain entities
|
|
132
|
-
4. **Validate at boundaries** - Use Pydantic at API edges, simple validation in entities
|
|
133
|
-
5. **Immutable value objects** - Always use `frozen=True`
|
|
134
|
-
6. **Single Responsibility** - Each layer has one reason to change
|
|
135
|
-
7. **Dependency direction** - Always depend on abstractions, not implementations
|
|
136
|
-
|
|
137
|
-
## Anti-Patterns
|
|
138
|
-
|
|
139
|
-
❌ **Anemic Domain Model** - Entities with only getters/setters, all logic in services
|
|
140
|
-
❌ **Transaction Script** - All logic in service layer, entities just data
|
|
141
|
-
❌ **Leaky Abstraction** - Repository exposing database details
|
|
142
|
-
❌ **God Object** - Entity with too many responsibilities
|
|
143
|
-
❌ **Mixed Concerns** - Business logic calling IO directly
|
|
144
|
-
|
|
145
|
-
For detailed examples, patterns, and decision trees, see the reference materials:
|
|
146
|
-
- [references/functional-core.md](references/functional-core.md) - Core vs shell separation
|
|
147
|
-
- [references/ddd.md](references/ddd.md) - DDD patterns, aggregates, bounded contexts
|
|
148
|
-
- [references/data-modeling.md](references/data-modeling.md) - dataclasses, Pydantic, transformations
|