@we-scrum/cli 6.11.5 → 6.11.20
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/README.md +58 -0
- package/dist/cli.js +287 -80
- package/package.json +5 -4
- package/src/cli.ts +4 -0
- package/src/commands/analysis.ts +53 -0
- package/src/commands/index.ts +2 -0
- package/src/commands/policy.ts +40 -2
- package/src/commands/story.ts +0 -10
- package/src/commands/task-type.ts +24 -0
- package/src/hbs.d.ts +5 -0
- package/src/helpers/change-hint.helper.ts +59 -0
- package/src/helpers/index.ts +1 -0
- package/src/helpers/project-helper.ts +7 -5
- package/src/helpers/template.helper.ts +6 -2
- package/src/helpers/we-scrum.helper.ts +206 -10
- package/src/utils/index.ts +1 -0
- package/src/utils/read-content.ts +11 -0
- package/templates/analyse-story-skill.hbs +197 -0
- package/templates/analysis-dsl.md +218 -0
- package/templates/analysis-review-criteria.hbs +22 -0
- package/templates/get-next-task.hbs +1 -1
- package/templates/review-analysis-skill.hbs +4 -25
- package/templates/analysis-dsl-legend.hbs +0 -10
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyse-story
|
|
3
|
+
description: >
|
|
4
|
+
Write or revise the analysis of a we-scrum user story. Use this skill whenever the user
|
|
5
|
+
says "analyse story XXXXX", "/analyse-story XXXXX", or asks to analyse a specific story
|
|
6
|
+
number, or to apply the comments left on its analysis. The skill reads the story, the
|
|
7
|
+
existing analysis, the change threads and the project guidelines, then builds the
|
|
8
|
+
analysis change by change with the we-scrum CLI.
|
|
9
|
+
compatibility: "Requires: we-scrum CLI (we-scrum)"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Analyse Story Skill
|
|
13
|
+
|
|
14
|
+
Builds the analysis of a we-scrum user story, change by change, so the developer can follow its progress in we-scrum. When an analysis already exists, it is revised instead of started over.
|
|
15
|
+
|
|
16
|
+
Read `analysis-dsl.md`, next to this file, before writing anything: it is the reference of the analysis syntax and of the commands writing it.
|
|
17
|
+
|
|
18
|
+
Do not ask for confirmation along the way: the analysis change log lets the developer review and undo what was done. The only exceptions are the very destructive actions:
|
|
19
|
+
|
|
20
|
+
- changing an analysis which already has tasks in progress or done (see Step 2)
|
|
21
|
+
- deleting many changes (see Step 10)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 1 — Resolve the story identification number
|
|
26
|
+
|
|
27
|
+
If the user provided a story identification number (e.g. `/analyse-story 00240`), use it.
|
|
28
|
+
Otherwise, ask: _"Which story would you like to analyse? Please provide the identification number."_
|
|
29
|
+
Do not proceed until a number is provided.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Step 2 — Retrieve the story
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
we-scrum get-story-description --identificationNumber <identificationNumber>
|
|
37
|
+
we-scrum get-story-analysis --identificationNumber <identificationNumber>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For every change annotated with a _"Threads: …"_ line, read all its threads:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
we-scrum get-change-threads --changeId <changeId>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
When the analysis already has changes, check whether its development has started:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
we-scrum get-next-task --identificationNumber <identificationNumber>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This command only reads: do **not** follow the development instructions it returns. The development has started when all the tasks are complete, when the returned task is not the first change of the analysis, or when its next steps do not ask to run `start-task`. In that case, and when the output does not allow to tell (e.g. an automation breakpoint), explain what you intend to change and ask for confirmation before writing anything.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Step 3 — Retrieve the analysis guidelines
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
we-scrum synchronize-guidelines
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Read `analysis/global.md` in the guidelines folder (when present): it applies to the whole analysis. Then list the analysis guidelines of the project:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
we-scrum get-analysis-guidelines
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Step 4 — Retrieve the task types
|
|
71
|
+
|
|
72
|
+
Before writing any `OpenTask`:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
we-scrum get-task-types
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Choose the fitting type and use its exact name. For each task type used which has a template, read it once, and write the descriptions following it:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
we-scrum get-task-type-template --name "<name>"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Step 5 — Explore the codebase
|
|
87
|
+
|
|
88
|
+
Find what already exists, to decide between `Create` and `Update` and to name things consistently with the code.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Step 6 — Prepare each change
|
|
93
|
+
|
|
94
|
+
Before writing a change, whether it is requested by a thread (Step 7) or new (Step 8):
|
|
95
|
+
|
|
96
|
+
1. Decide its type and name.
|
|
97
|
+
2. Find its analysis guideline: `we-scrum get-analysis-guidelines --changeType <type>` with the matching criteria options (`--taskType`, `--objectName`, `--routeMethod`, `--relationObjects`).
|
|
98
|
+
3. When one matches, read it and write the change accordingly.
|
|
99
|
+
|
|
100
|
+
The development and unit tests guidelines shown on the existing changes are only read when needed, for example for naming.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Step 7 — Handle the open threads
|
|
105
|
+
|
|
106
|
+
Threads are the two-way channel between the developer and Claude Code. Every comment shows its author (`Claude Code` for the ones written by this skill): read each thread in full and identify who spoke last.
|
|
107
|
+
|
|
108
|
+
| Open thread | What to do |
|
|
109
|
+
|---|---|
|
|
110
|
+
| Last comment from the user (an adjustment request or an answer) | Apply it to the change, reply explaining precisely what was done, then set the thread to `Resolved` |
|
|
111
|
+
| Last comment from Claude Code (a question waiting for an answer) | Leave it open, do not repeat the question, report it as pending in the summary |
|
|
112
|
+
| Request which cannot be applied (it contradicts a guideline or the story description, or it is ambiguous) | Reply with the reason or a follow-up question and leave it open |
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
we-scrum add-comment-to-change-thread --changeThreadId <changeThreadId> --comment "<markdown>"
|
|
116
|
+
we-scrum update-change-thread-status --changeThreadId <changeThreadId> --status Resolved
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- A thread is only resolved when its concern is actually addressed.
|
|
120
|
+
- `Resolved` and `Archived` threads are history: read them to avoid raising the same concern again, never reopen them.
|
|
121
|
+
- Always reply on an existing thread of the change instead of opening a duplicate.
|
|
122
|
+
- Comments are Markdown. Open one thread per concern, grouped by change.
|
|
123
|
+
|
|
124
|
+
A request to remove a change is applied by deleting it (`we-scrum delete-change --changeId <changeId>`). The threads of a deleted change disappear with it: reply and resolve first.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Step 8 — Write the remaining changes
|
|
129
|
+
|
|
130
|
+
Send the changes one by one, in vertical slice order (enumerations, objects, routes, handlers, then the other tasks), so that each change only references what already exists:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
we-scrum update-story-analysis --identificationNumber <identificationNumber> <<'EOF'
|
|
134
|
+
# <Section>
|
|
135
|
+
## <Change header>
|
|
136
|
+
...
|
|
137
|
+
EOF
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Keep the existing changes which are still right. To modify one, run `get-story-analysis` again right before, and send the whole change with its `> id:`, without the read-only hint lines.
|
|
141
|
+
|
|
142
|
+
When a command fails, read the error, fix the change and send it again.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Step 9 — Ask for the missing information
|
|
147
|
+
|
|
148
|
+
When a guideline requires information that the story description does not give, do not invent it: write the change with what is known, then open a question thread on it listing the missing information.
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
we-scrum create-change-thread --changeId <changeId> --comment "<markdown question>"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Step 10 — Remove the obsolete changes and reorganize
|
|
157
|
+
|
|
158
|
+
Run `get-story-analysis` again, then delete the obsolete changes one by one, in the order given by the reference:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
we-scrum delete-change --changeId <obsoleteChangeId>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
When many changes are to be deleted, list them and ask for confirmation first.
|
|
165
|
+
|
|
166
|
+
Then sort the sections and changes in a logical order, listing every remaining change:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
we-scrum reorganize-story-analysis --identificationNumber <identificationNumber> <<'EOF'
|
|
170
|
+
# <Section>
|
|
171
|
+
> id: <changeId>
|
|
172
|
+
EOF
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Step 11 — Self-review
|
|
178
|
+
|
|
179
|
+
Run `get-story-analysis` again and review the analysis. Check for:
|
|
180
|
+
|
|
181
|
+
{{> analysis-review-criteria}}
|
|
182
|
+
|
|
183
|
+
Fix what does not pass.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Step 12 — Guidelines feedback
|
|
188
|
+
|
|
189
|
+
Before concluding, ask for each change written: was the matching analysis guideline missing, ambiguous or insufficient for what had to be decided?
|
|
190
|
+
|
|
191
|
+
If yes, check the existing threads of the change first: reply to its guidelines thread when there is one, otherwise open one with a concrete suggested addition or correction. At most one guidelines feedback thread per change, never mixed with a question thread. Post nothing when the guideline was accurate and sufficient.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Step 13 — Summarize
|
|
196
|
+
|
|
197
|
+
Summarize what was created, updated and removed, then list the threads still waiting for the user.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Analysis DSL reference
|
|
2
|
+
|
|
3
|
+
The analysis of a story is made of **sections**, each holding **changes** of five types: `Object`, `Route`, `Enumeration`, `Handler` and `OpenTask`.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
# Section name a section starts with a single "#"
|
|
9
|
+
## Create Object Foo a change starts with "##"
|
|
10
|
+
> id: <changeId> identifier of an existing change
|
|
11
|
+
// A comment
|
|
12
|
+
add property name: String one line per element
|
|
13
|
+
:::
|
|
14
|
+
Description of the change, in Markdown.
|
|
15
|
+
:::
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Every line starts at the beginning of the line: no indentation.
|
|
19
|
+
- `> key: value` lines carry the metadata of the change.
|
|
20
|
+
- `> id: <changeId>` identifies an existing change. Leave it out to create a change.
|
|
21
|
+
- A description is fenced by two lines made of `:::` only. It accepts any Markdown, except a line made of `:::` only.
|
|
22
|
+
- `// ` lines are comments. They are accepted but **not saved**: write in the description what must be kept.
|
|
23
|
+
|
|
24
|
+
## Change headers
|
|
25
|
+
|
|
26
|
+
| Type | Header | Rename (`Update` only) |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| Object | `## Create Object Foo` | `## Update Object "OldName" renamed to "NewName"` |
|
|
29
|
+
| Enumeration | `## Update Enumeration Bar` | `## Update Enumeration "OldName" renamed to "NewName"` |
|
|
30
|
+
| Route | `## Delete Route` (nothing after `Route`) | through the metadata lines |
|
|
31
|
+
| Handler | `## Handler HandlerName` (no operation) | change the name of a change identified by its id |
|
|
32
|
+
| OpenTask | `## OpenTask Task type name` (no operation) | |
|
|
33
|
+
|
|
34
|
+
The change operations are `Create`, `Update` and `Delete`.
|
|
35
|
+
|
|
36
|
+
## Element lines
|
|
37
|
+
|
|
38
|
+
The element operations are `add`, `update` and `remove`, followed by the element kind of the change type.
|
|
39
|
+
|
|
40
|
+
| Type | Line | Allowed operations |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Object | `add property path: Type` | `add`, `remove` |
|
|
43
|
+
| Route | `add queryParam name: Type` | `add`, `remove` |
|
|
44
|
+
| Enumeration | `add member Name = value` | `add`, `remove` |
|
|
45
|
+
| Handler | `add relation ObjectA >> ObjectB` | `add`, `update`, `remove` |
|
|
46
|
+
| OpenTask | no element line | |
|
|
47
|
+
|
|
48
|
+
To modify a property, a query parameter or a member, `remove` it then `add` it again.
|
|
49
|
+
|
|
50
|
+
### Object properties
|
|
51
|
+
|
|
52
|
+
- Types: `String`, `Number`, `Boolean`, `Date`, `Object`, `Any`, or the name of an enumeration of the project.
|
|
53
|
+
- Append `[]` to the type for an array: `add property tags: String[]`.
|
|
54
|
+
- A nested property is a path, `[]` marking the array segments: `items: Object[]`, then `items[].name: String`. Declare the parent first.
|
|
55
|
+
- The type is required on a `remove` line too.
|
|
56
|
+
- Object names are PascalCase.
|
|
57
|
+
|
|
58
|
+
### Route metadata and query parameters
|
|
59
|
+
|
|
60
|
+
| Line | Value |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `> method:` | `GET` or `POST` (required) |
|
|
63
|
+
| `> path:` | lowercase segments and `:param` route parameters (required) |
|
|
64
|
+
| `> body:` | name of an object of the project (required, `Delete` included) |
|
|
65
|
+
| `> permission:` | a permission, or `unrestricted` |
|
|
66
|
+
|
|
67
|
+
In an `Update` change, a modified value is written with its former and new values:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
> method: ~ GET changed for POST
|
|
71
|
+
> path: ~ "orders" moved to "customer-orders"
|
|
72
|
+
> body: ~ "OrderQuery" now uses "CustomerOrderQuery"
|
|
73
|
+
> permission: ~ unrestricted now requires "order.read"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The permission also accepts `~ "a" now requires "b"` and `~ "a" now unrestricted`.
|
|
77
|
+
|
|
78
|
+
Query parameter names are camelCase, of type `String`, `Number`, `Boolean`, `Date` or `Enumeration`.
|
|
79
|
+
|
|
80
|
+
### Enumeration members
|
|
81
|
+
|
|
82
|
+
Names are PascalCase or uppercase, without space or underscore. `= value` can be left out when the value equals the name.
|
|
83
|
+
|
|
84
|
+
### Handler metadata and relations
|
|
85
|
+
|
|
86
|
+
- `> boundedContext:` is required, `> subscriptionName:` is optional.
|
|
87
|
+
- A relation connects two or three objects of the project with `>>`. A `Command >> Aggregate` relation must name the resulting event: `Command >> Aggregate >> Event`.
|
|
88
|
+
- A Handler change needs at least one relation.
|
|
89
|
+
|
|
90
|
+
## Examples
|
|
91
|
+
|
|
92
|
+
### Object
|
|
93
|
+
|
|
94
|
+
```wsad
|
|
95
|
+
# Order cancellation
|
|
96
|
+
## Update Object Order
|
|
97
|
+
add property cancellationReason: OrderCancellationReason
|
|
98
|
+
add property history: Object[]
|
|
99
|
+
add property history[].date: Date
|
|
100
|
+
:::
|
|
101
|
+
`cancellationReason` is only set on cancelled orders.
|
|
102
|
+
:::
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Route
|
|
106
|
+
|
|
107
|
+
```wsad
|
|
108
|
+
# Order cancellation
|
|
109
|
+
## Create Route
|
|
110
|
+
> method: GET
|
|
111
|
+
> path: order-management/orders/:orderId/cancellations
|
|
112
|
+
> body: OrderCancellationQuery
|
|
113
|
+
> permission: order.read
|
|
114
|
+
add queryParam pageSize: Number
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Enumeration
|
|
118
|
+
|
|
119
|
+
```wsad
|
|
120
|
+
# Order cancellation
|
|
121
|
+
## Create Enumeration OrderCancellationReason
|
|
122
|
+
add member OutOfStock = out-of-stock
|
|
123
|
+
add member CustomerRequest = customer-request
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Handler
|
|
127
|
+
|
|
128
|
+
```wsad
|
|
129
|
+
# Order cancellation
|
|
130
|
+
## Handler CancelOrderHandler
|
|
131
|
+
> boundedContext: order-management
|
|
132
|
+
add relation CancelOrderCommand >> OrderAggregate >> OrderCancelledEvent
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### OpenTask
|
|
136
|
+
|
|
137
|
+
```wsad
|
|
138
|
+
# Order cancellation
|
|
139
|
+
## OpenTask Front
|
|
140
|
+
:::
|
|
141
|
+
Add a "Cancel" action on the order page.
|
|
142
|
+
:::
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Writing changes
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
we-scrum update-story-analysis --identificationNumber <id> <<'EOF'
|
|
149
|
+
# Order cancellation
|
|
150
|
+
## Create Enumeration OrderCancellationReason
|
|
151
|
+
add member OutOfStock = out-of-stock
|
|
152
|
+
EOF
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
- **One section and one change per call.** The section is created when it does not exist yet. The command prints the id of the change.
|
|
156
|
+
- Without `> id:`, a new change is created.
|
|
157
|
+
- With `> id:`, the change is **replaced** by the content sent: repeat every metadata line, element line and the description to keep. A line left out is reverted, a description left out is erased. Another section name moves the change.
|
|
158
|
+
- The operation of an existing change cannot be modified: delete the change and create another one.
|
|
159
|
+
- What a change references must already exist in the project or in the analysis: send enumerations first, then objects, then routes and handlers.
|
|
160
|
+
- To rename an object, first create an `## Update Object CurrentName` change, then send it again with its id and the rename header.
|
|
161
|
+
|
|
162
|
+
## Rules
|
|
163
|
+
|
|
164
|
+
### Task types
|
|
165
|
+
|
|
166
|
+
The type name of an `OpenTask` header must exactly match a name returned by `we-scrum get-task-types`. When the type has a template (`we-scrum get-task-type-template --name "<name>"`), the description follows it.
|
|
167
|
+
|
|
168
|
+
### Analysis guidelines
|
|
169
|
+
|
|
170
|
+
Before writing a change, find the guideline matching its type and name with `we-scrum get-analysis-guidelines`, read it and follow it:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
we-scrum get-analysis-guidelines --changeType Object --objectName Order
|
|
174
|
+
we-scrum get-analysis-guidelines --changeType Route --routeMethod GET
|
|
175
|
+
we-scrum get-analysis-guidelines --changeType OpenTask --taskType "Front"
|
|
176
|
+
we-scrum get-analysis-guidelines --changeType Handler --relationObjects CancelOrderCommand,OrderAggregate,OrderCancelledEvent
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
When it requires information that is not available, do not guess it: write the change with what is known and ask for the rest in a thread on the change (`we-scrum create-change-thread --changeId <changeId> --comment "<question>"`).
|
|
180
|
+
|
|
181
|
+
### Hint lines
|
|
182
|
+
|
|
183
|
+
`we-scrum get-story-analysis` appends read-only annotations to the descriptions. They are never part of a description:
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
Threads: 1 Open — run `we-scrum get-change-threads --changeId "<changeId>"` to view them.
|
|
187
|
+
Analysis guidelines: `<path>`
|
|
188
|
+
Development guidelines: `<path>`
|
|
189
|
+
Unit tests guidelines: `<path>`
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
It also replaces the links to attachments by the paths of local copies. Never send such a path back: when a description to rewrite contains one, ask the user.
|
|
193
|
+
|
|
194
|
+
## Reorganization
|
|
195
|
+
|
|
196
|
+
`we-scrum reorganize-story-analysis --identificationNumber <id>` sorts the sections and changes:
|
|
197
|
+
|
|
198
|
+
```reorganization
|
|
199
|
+
# Data model
|
|
200
|
+
> id: 1f0c2a4e
|
|
201
|
+
> id: 9b7d5e13
|
|
202
|
+
# API
|
|
203
|
+
> id: 4a8e6c20
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
- The sections and their changes are ordered as listed. A section not listed is removed, a new name creates a section.
|
|
207
|
+
- **Every change of the story must be placed in a section.**
|
|
208
|
+
|
|
209
|
+
## Deletion
|
|
210
|
+
|
|
211
|
+
`we-scrum delete-change --changeId <changeId>` deletes one change, along with its threads. A change can only be deleted once what depends on it is gone, so delete several changes in this order:
|
|
212
|
+
|
|
213
|
+
1. `OpenTask` changes
|
|
214
|
+
2. `Delete` changes: enumerations, objects, routes, then handlers
|
|
215
|
+
3. `Update` changes, in the same order
|
|
216
|
+
4. `Create` changes: handlers, routes, objects, then enumerations
|
|
217
|
+
|
|
218
|
+
A `Handler` change counts as `Create` when it adds a relation, and as `Delete` when it only removes relations.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
**Completeness & correctness**
|
|
2
|
+
- Consistency between the story description and the analysis changes, with nothing unrelated
|
|
3
|
+
- Missing or incomplete changes relative to the described requirements
|
|
4
|
+
- Incorrect operations (create/update/delete used inappropriately)
|
|
5
|
+
- Unclear or ambiguous task descriptions
|
|
6
|
+
|
|
7
|
+
**Naming clarity**
|
|
8
|
+
- Object names and property names must be clear, precise, and self-explanatory: a name which is vague, abbreviated, or could be misread needs a better one
|
|
9
|
+
- Names should reflect the domain concept they represent, not the implementation detail
|
|
10
|
+
|
|
11
|
+
**Naming continuity**
|
|
12
|
+
- A name introduced in the analysis (object, property, route, enumeration) must flow consistently through the entire vertical slice: command → aggregate → event → denormalizer → model → DTO → API response
|
|
13
|
+
- Watch for any analysis change where the proposed name would likely create a discontinuity or force a translation at any layer
|
|
14
|
+
- Renames or aliases between layers are a sign of a poorly chosen name — the right name should need no translation
|
|
15
|
+
|
|
16
|
+
**Guidelines**
|
|
17
|
+
- Read `analysis/global.md` in the guidelines folder (when present) and apply it to the whole analysis
|
|
18
|
+
- For every change annotated "Analysis guidelines: `<path>`", read that file and check the change against it
|
|
19
|
+
|
|
20
|
+
**Migrations**
|
|
21
|
+
- Any change that adds, removes, or renames a field on an Aggregate or a Model must be accompanied by a migration script task in the analysis
|
|
22
|
+
- A structural change without its migration task is a blocking issue — shipping without a migration will corrupt existing data or break reads
|
|
@@ -64,34 +64,13 @@ For each **open** thread returned:
|
|
|
64
64
|
|
|
65
65
|
## Step 3 — Review the analysis
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Read `.claude/skills/analyse-story/analysis-dsl.md`, the reference of the analysis syntax.
|
|
68
68
|
|
|
69
69
|
Review the story description and analysis DSL together. Check for:
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- Incorrect operations (create/update/delete used inappropriately)
|
|
75
|
-
- Unclear or ambiguous task descriptions
|
|
76
|
-
|
|
77
|
-
**Naming clarity**
|
|
78
|
-
- Object names and property names must be clear, precise, and self-explanatory
|
|
79
|
-
- Challenge any name that is vague, abbreviated, or could be misread — propose a better alternative
|
|
80
|
-
- Names should reflect the domain concept they represent, not the implementation detail
|
|
81
|
-
|
|
82
|
-
**Naming continuity**
|
|
83
|
-
- A name introduced in the analysis (object, property, route, enumeration) must flow consistently through the entire vertical slice: command → aggregate → event → denormalizer → model → DTO → API response
|
|
84
|
-
- Flag any analysis change where the proposed name would likely create a discontinuity or force a translation at any layer
|
|
85
|
-
- Renames or aliases between layers are a sign of a poorly chosen name — the right name should need no translation
|
|
86
|
-
|
|
87
|
-
**Guidelines**
|
|
88
|
-
- Read `analysis/global.md` in the guidelines folder (when present) and apply it to the whole analysis
|
|
89
|
-
- For every change annotated "Analysis guidelines: `<path>`", read that file and check the change against it
|
|
90
|
-
- When a finding comes from a guideline, quote the guideline in the comment so the author can see its source
|
|
91
|
-
|
|
92
|
-
**Migrations**
|
|
93
|
-
- Any change that adds, removes, or renames a field on an Aggregate or a Model must be accompanied by a migration script task in the analysis
|
|
94
|
-
- If such a structural change is present but no corresponding migration task exists, raise it as a blocking issue — shipping without a migration will corrupt existing data or break reads
|
|
71
|
+
{{> analysis-review-criteria}}
|
|
72
|
+
|
|
73
|
+
In your findings, challenge every name which does not meet these criteria by proposing a better alternative, and when a finding comes from a guideline, quote the guideline so the author can see its source.
|
|
95
74
|
|
|
96
75
|
---
|
|
97
76
|
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
**Analysis DSL** — change headers use `Create` · `Update` · `Delete`, lines under a change use `add` · `update` · `remove` followed by the element kind.
|
|
2
|
-
Header: `## Create Object Foo` · `## Update Enumeration Bar` · `## Delete Route`. `Handler` and `OpenTask` headers have no operation.
|
|
3
|
-
Rename (`Update` only): `## Update Object "OldName" renamed to "NewName"` · `## Update Enumeration "OldName" renamed to "NewName"`.
|
|
4
|
-
Lines (the element kind depends on the change type):
|
|
5
|
-
- Object: `add property name: String` · `remove property email: String`
|
|
6
|
-
- Route: `add queryParam page: Number` · `remove queryParam sortBy: String`
|
|
7
|
-
- Enumeration: `add member ACTIVE = active` · `remove member LEGACY`
|
|
8
|
-
- Handler: `add relation ObjectA >> ObjectB >> ObjectC` · `update relation ObjectA >> ObjectB` · `remove relation ObjectA >> ObjectB`
|
|
9
|
-
|
|
10
|
-
`update` is only supported on relations; to change a property, query param or member, `remove` it then `add` it again.
|