@juancr11/sibu 0.9.4 → 0.9.6
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/package.json +1 -1
- package/templates/AGENTS.md +1 -1
- package/templates/manifest.json +9 -11
- package/templates/skills/ai-implementation-plan-executor/SKILL.md +24 -24
- package/templates/skills/ai-implementation-planner/SKILL.md +11 -10
- package/templates/skills/architecture/ddd-hexagonal/SKILL.md +73 -2
package/package.json
CHANGED
package/templates/AGENTS.md
CHANGED
|
@@ -45,7 +45,7 @@ For planned product/feature work, use this pipeline: product vision -> deep modu
|
|
|
45
45
|
- For requests to create, revise, or clarify a technical design, implementation-oriented design doc, architecture approach, technical tradeoffs, technical risks, or implementation plan for an approved feature, use `technical-design-writer`.
|
|
46
46
|
- For requests to create Epics, User Stories, Scrum planning artifacts, backlog slices, or delivery plans from an approved feature brief and technical design, use `scrum-master-planner`.
|
|
47
47
|
- For requests to turn a specific User Story into an implementation checklist, coding plan, step-by-step execution plan, or baby-step plan, use `ai-implementation-planner`.
|
|
48
|
-
- For requests to implement, execute, continue, or work through a specific User Story under `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.md` or an existing story implementation plan under `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/`, use `ai-implementation-plan-executor`; the
|
|
48
|
+
- For requests to implement, execute, continue, or work through a specific User Story under `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.md` or an existing story implementation plan under `docs/features/<feature-slug>/epics/<epic-slug>/stories/<order>-<story-slug>.impl_plan/`, use `ai-implementation-plan-executor`; when the story plan is missing, the executor should create it with `ai-implementation-planner` and immediately continue into implementation without a separate plan approval gate.
|
|
49
49
|
{{OPTIONAL_SKILL_ROUTING}}
|
|
50
50
|
|
|
51
51
|
## Sibu maintenance
|
package/templates/manifest.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"templateVersion": "
|
|
2
|
+
"templateVersion": "84",
|
|
3
3
|
"templates": {
|
|
4
4
|
"AGENTS.md": {
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "26",
|
|
6
6
|
"description": "Project-level agent instructions and Sibu maintenance guidance.",
|
|
7
7
|
"changes": [
|
|
8
|
-
"
|
|
8
|
+
"Updates implementation routing so missing story plans are generated and executed immediately without a separate plan approval gate."
|
|
9
9
|
]
|
|
10
10
|
},
|
|
11
11
|
".codex/config.toml": {
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
103
|
"skills/architecture/ddd-hexagonal/SKILL.md": {
|
|
104
|
-
"version": "
|
|
104
|
+
"version": "7",
|
|
105
105
|
"description": "Selectable back-end architecture skill for DDD and Hexagonal Architecture.",
|
|
106
106
|
"changes": [
|
|
107
|
-
"
|
|
107
|
+
"Adds anti-corruption adapter guidance for translating external models at infrastructure boundaries."
|
|
108
108
|
]
|
|
109
109
|
},
|
|
110
110
|
"skills/architecture/command-pattern/SKILL.md": {
|
|
@@ -136,19 +136,17 @@
|
|
|
136
136
|
]
|
|
137
137
|
},
|
|
138
138
|
"skills/ai-implementation-planner/SKILL.md": {
|
|
139
|
-
"version": "
|
|
139
|
+
"version": "13",
|
|
140
140
|
"description": "Mandatory AI implementation planner skill for turning one approved User Story into small, story-local implementation step files.",
|
|
141
141
|
"changes": [
|
|
142
|
-
"
|
|
143
|
-
"Clarifies that next-story planning handoffs from the executor must stop after planning and wait for approval."
|
|
142
|
+
"Clarifies that executor handoffs can come from the next story or next Epic and still continue without plan approval."
|
|
144
143
|
]
|
|
145
144
|
},
|
|
146
145
|
"skills/ai-implementation-plan-executor/SKILL.md": {
|
|
147
|
-
"version": "
|
|
146
|
+
"version": "20",
|
|
148
147
|
"description": "Mandatory AI implementation plan executor skill for implementing full story plans before story-level review and commit.",
|
|
149
148
|
"changes": [
|
|
150
|
-
"
|
|
151
|
-
"Clarifies that ignored approval marker changes remain local and commits include only eligible non-ignored story changes."
|
|
149
|
+
"Changes next-Epic continuation to choose the next logical Epic based on dependencies, readiness, risk, and value instead of filename order."
|
|
152
150
|
]
|
|
153
151
|
},
|
|
154
152
|
"skills/ai-prompt-engineer-master/SKILL.md": {
|
|
@@ -24,17 +24,16 @@ Execute one existing story implementation plan completely, one ordered step file
|
|
|
24
24
|
- Code, docs, tests, or other repo changes required by all unapproved implementation steps in the story plan.
|
|
25
25
|
- Step approval metadata in every completed step file only after explicit story-level user approval.
|
|
26
26
|
- One focused commit for the approved story implementation, excluding any paths ignored by Git.
|
|
27
|
-
- When
|
|
27
|
+
- When starting or continuing a story that has no plan, story-local implementation step files created by applying `ai-implementation-planner`, followed immediately by implementation.
|
|
28
|
+
- When an Epic is complete, the next Epic in the same feature is selected by inspecting the feature's `epics/` folder, then the first story in that Epic is planned and implemented immediately.
|
|
28
29
|
|
|
29
30
|
### When this skill stops
|
|
30
31
|
|
|
31
32
|
- The user does not provide or clearly identify exactly one User Story file or `.impl_plan/` folder.
|
|
32
|
-
- The starting implementation plan is missing, empty, invalid, or has no ordered step files; direct the user to `ai-implementation-planner`.
|
|
33
33
|
- Any required source artifact is missing, incomplete, or invalid in a way its owning stage should repair.
|
|
34
34
|
- The story, any step, or feature has UI impact and `ux.md` is missing; direct the user to `ux-expert`.
|
|
35
35
|
- Validation fails and the fix is ambiguous, risky, or would exceed the approved plan.
|
|
36
36
|
- A step conflicts with the story, Epic, feature brief, technical design, UX spec, or approved Deep Module boundaries.
|
|
37
|
-
- A newly planned next story is ready for plan review and approval before execution.
|
|
38
37
|
|
|
39
38
|
### What this skill must not do
|
|
40
39
|
|
|
@@ -43,7 +42,6 @@ Execute one existing story implementation plan completely, one ordered step file
|
|
|
43
42
|
- Do not reread `docs/deep-module-map.md` by default; trust `technical_design.md` for Deep Module implementation boundaries.
|
|
44
43
|
- Do not mark any step approved before explicit story-level user approval.
|
|
45
44
|
- Do not commit story implementation changes before explicit story-level user approval.
|
|
46
|
-
- Do not continue past a newly created implementation plan for the next story until the user approves that plan.
|
|
47
45
|
|
|
48
46
|
## Required source context
|
|
49
47
|
|
|
@@ -104,10 +102,10 @@ Reread broad source context only when scope changes, validation fails in a way t
|
|
|
104
102
|
|
|
105
103
|
If the initial User Story has no matching `.impl_plan/`, or the initial `.impl_plan/` folder is missing, empty, or has no ordered `.md` step files:
|
|
106
104
|
|
|
107
|
-
1.
|
|
108
|
-
2.
|
|
109
|
-
3.
|
|
110
|
-
4. Do not
|
|
105
|
+
1. Apply `ai-implementation-planner` to create or repair the story-local implementation plan.
|
|
106
|
+
2. Quality-check that the generated plan has ordered step files for exactly that story.
|
|
107
|
+
3. Immediately begin executing the generated plan with this executor.
|
|
108
|
+
4. Do not ask the user to approve the plan before implementation; the only required approval is the story-level review after implementation finishes.
|
|
111
109
|
|
|
112
110
|
If required source context is missing:
|
|
113
111
|
|
|
@@ -120,7 +118,7 @@ If required source context is missing:
|
|
|
120
118
|
|
|
121
119
|
Work through the full story plan in filename order, one step at a time, without asking for review or approval between steps.
|
|
122
120
|
|
|
123
|
-
When a valid implementation plan exists, begin implementing the first unapproved step immediately. Do not ask for pre-implementation confirmation before changing code. This is an explicit exception to repository-level instructions that normally require confirmation before code changes: selecting this executor skill
|
|
121
|
+
When a valid implementation plan exists, begin implementing the first unapproved step immediately. If a plan was just generated by `ai-implementation-planner`, begin implementing it immediately. Do not ask for pre-implementation confirmation or plan approval before changing code. This is an explicit exception to repository-level instructions that normally require confirmation before code changes: selecting this executor skill, asking to implement or continue a story/Epic, or providing a valid plan is the user's confirmation to implement the full story plan.
|
|
124
122
|
|
|
125
123
|
A step file is considered approved only when it contains this section:
|
|
126
124
|
|
|
@@ -140,7 +138,7 @@ When starting or resuming a plan:
|
|
|
140
138
|
6. Stop only for ambiguity, missing required files, conflicting scope, failed validation that cannot be safely fixed within the plan, or material risk.
|
|
141
139
|
7. After the final unapproved step is implemented, report what changed, validation results, and any risks, then wait for explicit story-level approval.
|
|
142
140
|
|
|
143
|
-
Do not mark steps approved, commit changes, or move to the next
|
|
141
|
+
Do not mark steps approved, commit changes, move to the next story, or move to the next Epic until the user explicitly approves the completed story implementation.
|
|
144
142
|
|
|
145
143
|
## Story review gate
|
|
146
144
|
|
|
@@ -164,17 +162,19 @@ After writing approval markers, commit only the non-ignored changes produced by
|
|
|
164
162
|
|
|
165
163
|
Use a Conventional Commits 1.0.0 message that describes the completed story. If the commit fails, stop and report the failure instead of continuing.
|
|
166
164
|
|
|
167
|
-
##
|
|
165
|
+
## Feature continuation check
|
|
168
166
|
|
|
169
|
-
After the approved story implementation is committed
|
|
167
|
+
After the approved story implementation is committed, continue through the current feature unless there is no next story or Epic to implement.
|
|
170
168
|
|
|
171
169
|
1. Inspect the current Epic's `stories/` folder in filename order.
|
|
172
170
|
2. Identify whether there is a next User Story after the completed story.
|
|
173
|
-
3. If
|
|
174
|
-
4. If a next User Story exists
|
|
175
|
-
5. If
|
|
171
|
+
3. If a next User Story exists and its `.impl_plan/` folder exists with ordered step files, immediately begin implementing that next story plan using this same story execution model.
|
|
172
|
+
4. If a next User Story exists but its `.impl_plan/` folder is missing or empty, immediately create the implementation plan for that story by applying `ai-implementation-planner`, then immediately begin implementing the generated plan.
|
|
173
|
+
5. If there is no next User Story in the current Epic, inspect the current feature's `epics/` folder and choose the next logical Epic to implement. Do not choose by filename alone. Base the choice on dependencies, prerequisite capabilities, technical sequencing, risk reduction, feature value, story readiness, and whether the Epic can be implemented without violating the feature brief or technical design. Briefly report the selected Epic and why it is the logical next step.
|
|
174
|
+
6. If a next logical Epic exists, inspect its `stories/` folder, select the first logical unapproved User Story to implement, create its implementation plan if needed with `ai-implementation-planner`, and immediately begin implementing it. Prefer story order when it reflects dependencies; otherwise choose based on prerequisites, risk, and value sequence.
|
|
175
|
+
7. If no logical next Epic exists or every Epic in the feature has all stories approved, tell the user the feature appears ready and stop.
|
|
176
176
|
|
|
177
|
-
This continuation behavior is an explicit exception to the normal hard-start rule only after a story has been approved and committed. It lets the executor keep
|
|
177
|
+
This continuation behavior is an explicit exception to the normal hard-start rule only after a story has been approved and committed. It lets the executor keep a feature moving across stories and Epics while preserving only the story-level review gate after each story implementation.
|
|
178
178
|
|
|
179
179
|
## Implementation rules
|
|
180
180
|
|
|
@@ -193,15 +193,14 @@ Do:
|
|
|
193
193
|
|
|
194
194
|
Do not:
|
|
195
195
|
|
|
196
|
-
-
|
|
196
|
+
- invent a missing plan manually instead of applying `ai-implementation-planner`
|
|
197
197
|
- mark any step approved before the user explicitly approves the completed story
|
|
198
198
|
- commit story implementation changes before story approval
|
|
199
199
|
- add product scope absent from the story, Epic, feature brief, technical design, or step files
|
|
200
200
|
- silently move work into unrelated or unapproved Deep Modules
|
|
201
201
|
- continue past a failed validation without reporting it and asking how to proceed
|
|
202
|
-
- leave committable approved story changes uncommitted before moving to the next story
|
|
202
|
+
- leave committable approved story changes uncommitted before moving to the next story or Epic
|
|
203
203
|
- attempt to stage or commit story files, approval markers, or other paths that are ignored by Git
|
|
204
|
-
- execute a newly created next-story plan before the user approves that plan
|
|
205
204
|
|
|
206
205
|
## Final response behavior
|
|
207
206
|
|
|
@@ -212,11 +211,12 @@ After implementing all unapproved steps in one story, briefly report:
|
|
|
212
211
|
- the steps completed
|
|
213
212
|
- validations run and their results
|
|
214
213
|
- notable risks or follow-up questions, if any
|
|
215
|
-
- that you are waiting for story approval before marking all completed steps approved, committing eligible non-ignored changes, and continuing the
|
|
214
|
+
- that you are waiting for story approval before marking all completed steps approved, committing eligible non-ignored changes, and continuing the feature
|
|
216
215
|
|
|
217
|
-
After approving and committing a story implementation, briefly report the commit and the
|
|
216
|
+
After approving and committing a story implementation, briefly report the commit and the feature continuation result:
|
|
218
217
|
|
|
219
218
|
- commit hash when a commit was created, or a note that only ignored changes existed and no commit was created
|
|
220
|
-
- next story is being implemented immediately because it already has a plan
|
|
221
|
-
- next story
|
|
222
|
-
-
|
|
219
|
+
- next story in the current Epic is being implemented immediately because it already has a plan
|
|
220
|
+
- next story in the current Epic was planned and implementation started immediately
|
|
221
|
+
- next Epic selected and its first unapproved story is being planned/implemented immediately
|
|
222
|
+
- or the feature appears ready
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ai-implementation-planner
|
|
3
|
-
description: Turn one approved User Story Markdown file into LLM-sized implementation step files, then
|
|
3
|
+
description: Turn one approved User Story Markdown file into LLM-sized implementation step files, then continue directly into execution when implementation is requested. Use when asked to create an implementation plan, coding checklist, step-by-step execution plan, or baby-step plan for completing a specific User Story from docs/features/<feature-slug>/epics/<epic-slug>/stories/.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# AI Implementation Planner
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
Turn one approved User Story into concrete Markdown step files an AI coding agent can execute safely and completely. This skill owns implementation planning for one story at a time, not product scope, technical design decisions, Scrum planning, or code implementation. After writing the plan, it
|
|
10
|
+
Turn one approved User Story into concrete Markdown step files an AI coding agent can execute safely and completely. This skill owns implementation planning for one story at a time, not product scope, technical design decisions, Scrum planning, or code implementation. After writing the plan, it does not require a separate plan approval gate; implementation may continue immediately through `ai-implementation-plan-executor` when the user requested execution or Epic continuation.
|
|
11
11
|
|
|
12
12
|
## Pipeline Contract
|
|
13
13
|
|
|
@@ -30,7 +30,6 @@ Turn one approved User Story into concrete Markdown step files an AI coding agen
|
|
|
30
30
|
- Any required source artifact is missing, incomplete, or invalid in a way its owning stage should repair.
|
|
31
31
|
- The story or feature has UI impact and `ux.md` is missing; direct the user to `ux-expert`.
|
|
32
32
|
- The request is to write production code, execute an implementation plan, create stories, or perform another pipeline stage.
|
|
33
|
-
- A newly created implementation plan is ready for user review and approval before execution.
|
|
34
33
|
|
|
35
34
|
### What this skill must not do
|
|
36
35
|
|
|
@@ -38,7 +37,7 @@ Turn one approved User Story into concrete Markdown step files an AI coding agen
|
|
|
38
37
|
- Do not modify prior-stage artifacts.
|
|
39
38
|
- Do not reread `docs/deep-module-map.md` by default; trust `technical_design.md` for Deep Module implementation boundaries.
|
|
40
39
|
- Do not infer implementation scope from an Epic brief, feature brief, or technical design without exactly one User Story.
|
|
41
|
-
- Do not
|
|
40
|
+
- Do not write production code directly from this planner; hand off to `ai-implementation-plan-executor` for implementation.
|
|
42
41
|
|
|
43
42
|
## Required input
|
|
44
43
|
|
|
@@ -241,18 +240,20 @@ Before finishing, verify:
|
|
|
241
240
|
- the step files preserve approved Deep Module boundaries and stop before unrelated module movement
|
|
242
241
|
- architecture and code-quality steps align with the relevant skills
|
|
243
242
|
|
|
244
|
-
### 6.
|
|
243
|
+
### 6. Continue or report
|
|
245
244
|
|
|
246
|
-
After writing and quality-checking the implementation step files,
|
|
245
|
+
After writing and quality-checking the implementation step files, do not ask for plan approval before execution. If the user asked to implement, execute, continue, or work through the story or Epic, immediately hand off to `ai-implementation-plan-executor` for the newly created plan in the same turn. The user's execution request plus a valid generated plan is enough pre-implementation confirmation; the only required user approval is the story-level review after execution finishes.
|
|
247
246
|
|
|
248
|
-
|
|
247
|
+
If the user asked only to create a plan and did not ask for implementation, stop after creating the plan and report where it was written. Make clear that no plan approval is required before a later executor run.
|
|
249
248
|
|
|
250
|
-
|
|
249
|
+
When this skill is invoked as the next-story or next-Epic planning handoff from `ai-implementation-plan-executor`, create the plan and immediately return control to the executor so it can implement that story without a plan-review gate.
|
|
250
|
+
|
|
251
|
+
The final planning-only response must briefly include:
|
|
251
252
|
|
|
252
253
|
- the source User Story path
|
|
253
254
|
- the implementation plan folder path
|
|
254
255
|
- the ordered step files created
|
|
255
|
-
- any assumptions, risks, or validation commands worth
|
|
256
|
-
- that
|
|
256
|
+
- any assumptions, risks, or validation commands worth noting
|
|
257
|
+
- that no separate plan approval is required before execution
|
|
257
258
|
|
|
258
259
|
Do not paste step-file bodies, excerpts, outlines, task text, done conditions, or section summaries. Only include generated step files when the user explicitly asks for inline review in the current request.
|
|
@@ -138,6 +138,17 @@ Use this default mapping when the project does not already have a clearer conven
|
|
|
138
138
|
/src/modules/<module-slug>/infra/** # Technical implementations and external integrations
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
+
Structure each application use case with files, not nested subfolders:
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
/src/modules/<module-slug>/application/<usecase-slug>/input.* # Input DTO/schema/command shape
|
|
145
|
+
/src/modules/<module-slug>/application/<usecase-slug>/output.* # Output DTO/result shape
|
|
146
|
+
/src/modules/<module-slug>/application/<usecase-slug>/usecase.* # Use case orchestration
|
|
147
|
+
/src/modules/<module-slug>/application/<usecase-slug>/ports.* # Ports required by this use case
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Use the project language's normal extension, such as `.ts`, `.go`, or `.py`. Keep ports local to the use case by default. Extract shared application ports only when multiple use cases truly need the same abstraction. Do not create `input/`, `output/`, `usecase/`, or `ports/` folders unless an existing project convention already requires it.
|
|
151
|
+
|
|
141
152
|
Entrypoints such as routes, jobs, or handlers should remain thin driving adapters that call application behavior inside the selected Deep Module.
|
|
142
153
|
|
|
143
154
|
## Ports and adapters
|
|
@@ -166,9 +177,40 @@ Typical driven adapters:
|
|
|
166
177
|
|
|
167
178
|
Adapters should hide technical details rather than leak them inward.
|
|
168
179
|
|
|
169
|
-
|
|
180
|
+
### Anti-corruption adapters
|
|
181
|
+
|
|
182
|
+
When integrating with an external API, SDK, database shape, file format, or third-party model, treat the infrastructure adapter as the anti-corruption layer. Translate external language and data shapes into application/domain concepts at the boundary.
|
|
183
|
+
|
|
184
|
+
Place anti-corruption translation in infrastructure adapter files by default:
|
|
185
|
+
|
|
186
|
+
```text
|
|
187
|
+
/src/modules/<module-slug>/infra/<adapter-slug>.* # Adapter and translation logic
|
|
188
|
+
/src/modules/<module-slug>/infra/<adapter-slug>.types.* # External DTOs/types when useful
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Do not create a separate `acl/` folder by default. Split translation into extra infrastructure-local files only when the adapter becomes too large.
|
|
192
|
+
|
|
193
|
+
External DTOs, SDK response types, database rows, and third-party vocabulary must not leak into `domain/**` or use case `input.*` / `output.*` unless the product language truly matches the external language. If changing an external API response would force changes in domain entities, value objects, or use case boundaries, the anti-corruption boundary is leaking.
|
|
194
|
+
|
|
195
|
+
## Use cases, application services, and domain services
|
|
196
|
+
|
|
197
|
+
### Use case
|
|
198
|
+
|
|
199
|
+
A use case represents one externally meaningful backend capability triggered by a route, CLI command, job, handler, or other driving adapter.
|
|
200
|
+
|
|
201
|
+
Place each use case at:
|
|
202
|
+
|
|
203
|
+
```text
|
|
204
|
+
/src/modules/<module-slug>/application/<usecase-slug>/usecase.*
|
|
205
|
+
```
|
|
170
206
|
|
|
171
|
-
|
|
207
|
+
Its sibling files should define its boundary:
|
|
208
|
+
|
|
209
|
+
```text
|
|
210
|
+
/src/modules/<module-slug>/application/<usecase-slug>/input.*
|
|
211
|
+
/src/modules/<module-slug>/application/<usecase-slug>/output.*
|
|
212
|
+
/src/modules/<module-slug>/application/<usecase-slug>/ports.*
|
|
213
|
+
```
|
|
172
214
|
|
|
173
215
|
A use case should:
|
|
174
216
|
- orchestrate domain logic and required ports explicitly
|
|
@@ -180,6 +222,35 @@ A use case should not:
|
|
|
180
222
|
- hide infrastructure details inline
|
|
181
223
|
- absorb framework behavior that belongs in adapters
|
|
182
224
|
|
|
225
|
+
### Application service
|
|
226
|
+
|
|
227
|
+
An application service is reusable application-layer orchestration shared by multiple use cases. Use it only when multiple use cases truly need the same orchestration, transaction coordination, or port coordination. Do not create application services just to shorten one use case; prefer private helpers first.
|
|
228
|
+
|
|
229
|
+
Place application services under:
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
/src/modules/<module-slug>/application/services/<service-slug>.*
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Application services may depend on domain concepts and application ports, but must not depend on infrastructure implementations, SDK clients, database clients, or framework request/response objects.
|
|
236
|
+
|
|
237
|
+
### Domain service
|
|
238
|
+
|
|
239
|
+
A domain service contains pure business behavior that does not naturally belong on one entity or value object. Use it when the rule is domain language, needs multiple domain concepts, and has no dependency on ports, databases, SDKs, frameworks, or technical time/randomness unless those are passed in as values.
|
|
240
|
+
|
|
241
|
+
Place domain services under:
|
|
242
|
+
|
|
243
|
+
```text
|
|
244
|
+
/src/modules/<module-slug>/domain/services/<service-slug>.*
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Domain services must stay pure and should not orchestrate use cases or external capabilities.
|
|
248
|
+
|
|
249
|
+
Rule of thumb:
|
|
250
|
+
- Use case: “Do this application action.”
|
|
251
|
+
- Application service: “Reuse this application orchestration.”
|
|
252
|
+
- Domain service: “Evaluate or perform this pure domain rule.”
|
|
253
|
+
|
|
183
254
|
## Simplicity rule
|
|
184
255
|
|
|
185
256
|
- Use the fewest layers that preserve clear boundaries.
|