@haus-tech/haus-workflow 5.6.1 → 5.8.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.
- package/CHANGELOG.md +18 -0
- package/dist/cli.js +1972 -1443
- package/library/global/agents/request-assessor.md +52 -51
- package/library/global/agents/request-scorer.md +52 -52
- package/library/global/agents/request-specifier-eskalerad.md +46 -44
- package/library/global/agents/request-specifier.md +43 -40
- package/library/global/skills/request/SKILL.md +1416 -1360
- package/library/global/skills/request/scripts/archive.mjs +4 -3
- package/library/global/skills/request/scripts/contract-check.mjs +17 -1
- package/library/global/skills/request/scripts/kontroll.mjs +7 -5
- package/library/global/skills/request/scripts/korning.mjs +18 -5
- package/library/global/skills/request/scripts/lib.mjs +289 -17
- package/library/global/skills/request/scripts/precheck.mjs +105 -40
- package/library/global/skills/request/scripts/svep.mjs +1 -1
- package/library/global/skills/request-assess-impact/SKILL.md +144 -140
- package/library/global/skills/request-score/SKILL.md +290 -266
- package/library/global/skills/request-sync/SKILL.md +246 -245
- package/library/global/skills/request-write-spec/SKILL.md +63 -61
- package/library/global/skills/request-write-spec/references/specformat.md +64 -60
- package/package.json +1 -1
|
@@ -1,198 +1,202 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: request-assess-impact
|
|
3
|
-
description:
|
|
3
|
+
description: Write an impact analysis for an approved spec, covering what the change touches in the system and what follows from it. Always use when a spec has passed review and is to be scored, when the user says "kör påverkansanalys", "vad rör det här", "kolla vad som påverkas", or when `request-score` needs source material and none exists. Reads the codebase, settles technical decisions itself and reports them; never asks questions back. Output is a document, never a score and never a price.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# request-assess-impact
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
You investigate what an approved spec actually touches in the system, and write it down. Someone else, the scorer, assigns the points. You do not know what the points scale looks like, you do not mention it, and you never write anything that resembles an assessment of scope.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
That is not politeness; it is the whole point. If you write the analysis with the points in mind, you phrase the fields so that the answers come out easy, and then you are assigning the points in secret while the scorer merely copies. Your task is to document the system.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
You never ask questions back. If the source material is not enough, you decide and report it, or write verbatim that you have not been able to verify.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The analysis is written for `request-score`, which points out evidence in it as a source and a unique substring (a script fetches the block verbatim for it), and for the reviewer who wants to check those blocks when the scorer's result looks odd. It is not written for the customer and does not end up in the ticket's description.
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Input
|
|
17
17
|
|
|
18
|
-
**
|
|
18
|
+
**Approved spec** in Haus spec format. A raw request will not do: then you are analysing your own interpretation. If the spec is missing: abort and say so, do not write it yourself (`request-write-spec` does that).
|
|
19
19
|
|
|
20
|
-
**
|
|
20
|
+
**The codebase.** Without a repo you cannot answer most of what follows. Say so before you start; do not write an analysis of guesses.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## The format
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Fixed headings, prose under each. No yes/no fields, no checkboxes, no table that looks like a form: an analysis that looks like an answer form is read as an answer form, and then it is you who assigned the points.
|
|
25
25
|
|
|
26
|
-
**
|
|
27
|
-
|
|
26
|
+
**Affected repos and files**
|
|
27
|
+
Concrete, with paths. If anything lies in shared code or in the runtime environment (infrastructure, CI/CD, Dockerfiles, environment variables, hosting configuration), write it out and write who else uses it.
|
|
28
28
|
|
|
29
|
-
**
|
|
30
|
-
|
|
29
|
+
**Data storage**
|
|
30
|
+
What is stored where. Distinguish clearly between server-stored structure (table, column, entity, relation, constraint) and client storage (localStorage, sessionStorage, memory). Write which one it is, even when it seems obvious. If server structure changes: write what it brings with it (migration, deployment order, backup, data purging) and whether the plan handles it.
|
|
31
31
|
|
|
32
|
-
**
|
|
33
|
-
|
|
32
|
+
**Integration points**
|
|
33
|
+
Connections to systems outside the application's own codebase. Which ones, and whether they are new or existing.
|
|
34
34
|
|
|
35
|
-
**
|
|
36
|
-
|
|
35
|
+
**Flows**
|
|
36
|
+
Sequences the user passes through in order, and how many steps change. If something changes that is reached from several places in the interface: write out that it is several entry points to the same action, so it cannot be misread as a sequence.
|
|
37
37
|
|
|
38
|
-
**
|
|
39
|
-
|
|
38
|
+
**Interfaces**
|
|
39
|
+
An existing pattern that is reused, or something that does not exist today. Name the pattern and where it is in the code.
|
|
40
40
|
|
|
41
|
-
**
|
|
42
|
-
|
|
41
|
+
**Verification**
|
|
42
|
+
What can be proven automatically, and what requires a human to run through it: in how many scenarios, on how many devices, in how many environments. The build only. The customer's acceptance test does not belong here; do not even write it as a note.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Also write out **whether the affected surface has automated tests today**, and exactly which part lacks them. That decides whether the item gets its own test item, built before the change. Do not mix it up with what requires a human by its nature (checking against an external service's test mode, visual review, several devices or environments): that remains regardless of the test suite.
|
|
45
45
|
|
|
46
|
-
**
|
|
47
|
-
|
|
46
|
+
**Splittability**
|
|
47
|
+
Does the work fall into parts that can each be assessed on their own? A short answer is normally enough: yes with the parts listed in one sentence, or no with the reason. If the scorer asks for a split, the parts are written out in full, see below.
|
|
48
48
|
|
|
49
|
-
**
|
|
50
|
-
|
|
49
|
+
**Consequence of failure**
|
|
50
|
+
What happens in the worst case if the item goes wrong. Concrete, not categorical: "a notification is shown in the wrong order" and "a user sees another customer's order" are different things. If existing security or authorization mechanics are reused according to an established pattern, write that, and write that it is established.
|
|
51
51
|
|
|
52
|
-
**
|
|
53
|
-
|
|
52
|
+
**Decisions taken**
|
|
53
|
+
See below.
|
|
54
54
|
|
|
55
|
-
**
|
|
56
|
-
|
|
55
|
+
**Assumptions**
|
|
56
|
+
See below.
|
|
57
57
|
|
|
58
|
-
**
|
|
59
|
-
|
|
58
|
+
**Dependencies**
|
|
59
|
+
What must be done first: other items, frameworks, third parties.
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Every claim must be grounded in the code or the spec. If you cannot ground something: write verbatim that you have not been able to verify it, and why. That is a better outcome than a line that looks certain: the scorer reads the uncertainty and escalates, and that is right.
|
|
62
62
|
|
|
63
|
-
##
|
|
63
|
+
## When the scorer asks for a split
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
If the item comes back with the outcome `DELA_UPP`, it could not be bracketed against the scale as a whole. Your task is then to point out the parts. The scorer may neither read the repo nor write source material, so it cannot do this itself.
|
|
66
66
|
|
|
67
|
-
**
|
|
67
|
+
**Write out each part with three things:** what it covers, expressed as which part of the spec it covers; whether it can be deployed and left in production on its own; and what it shares with the others in terms of manual walkthrough.
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
The last point decides whether the split is worth anything. If all parts require the same manual walkthrough of the same flows in the same environments, the heaviest work is multiplied by the split instead of divided. In that case, write that out.
|
|
70
70
|
|
|
71
|
-
**
|
|
71
|
+
**Two kinds of parts, and they end up in different places:**
|
|
72
72
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
73
|
+
- If the part can be delivered on its own, it becomes a **separate request**, with its own spec and its own delivery. Write that, but do not write the spec: `request-write-spec` does that.
|
|
74
|
+
- If it cannot be delivered on its own, it becomes a **part of the same item**, delivered together with the rest.
|
|
75
75
|
|
|
76
|
-
**
|
|
76
|
+
**The parts inherit the item's spec and this analysis.** Write no separate spec and no separate analysis per part. Each part gets a scope line that says which part of the spec it covers, and is scored against the shared source material. The customer ordered one thing; the split is internal structure.
|
|
77
77
|
|
|
78
|
-
**
|
|
78
|
+
**Split one step.** If a part comes back and cannot be bracketed either, it must be quoted as an offer, not split further. If you split until every piece fits under the scale's ceiling, the sum becomes too high for reasons that have nothing to do with the work.
|
|
79
79
|
|
|
80
|
-
**
|
|
80
|
+
**At least two parts.** If there is only one, the item has not been split, and then the answer is that it is not splittable.
|
|
81
81
|
|
|
82
|
-
##
|
|
82
|
+
## Decisions taken
|
|
83
83
|
|
|
84
|
-
**
|
|
84
|
+
**You decide, you do not ask.** A decision point is a fork where both paths work. You choose and report the choice: that is why the step manages without a human, and it is also what the customer pays us for.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
The test question: **would the user notice a difference between the alternatives?**
|
|
87
87
|
|
|
88
|
-
**
|
|
88
|
+
**No**: shared component or special solution, which pattern is reused, where the code ends up, how something is stored when the behaviour stays the same. This is your decision. Choose what is best for the system in the long run and report why.
|
|
89
89
|
|
|
90
|
-
**
|
|
90
|
+
**Yes**: the feature behaves differently, something is included or not, the user sees or gets different things. Then it is not your choice. It is a question the spec should have answered, and it must go back there. Write out the choice in the reviewer block under _Unanswered outcome choices_ with the alternatives. The label on _Deviation from the spec_ becomes `refinement` as long as at least one listed alternative delivers the spec's Problem; `contradiction` only when none does.
|
|
91
91
|
|
|
92
|
-
Design,
|
|
92
|
+
Design, appearance, flow and UX always belong to the second category.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
A decision that has been taken and reported is not an open decision. Write "we put this in the shared component because Z", not "this can be solved as a shared component or as a special case".
|
|
95
95
|
|
|
96
|
-
**
|
|
96
|
+
**The decision is a receipt.** If we choose silently, we also carry the responsibility for the choice. The report is therefore the receipt: write what was chosen, what the alternative was, and why. It is the only time anyone can review the judgment afterwards; the scorer's result and the price will look reasonable whichever alternative was taken.
|
|
97
97
|
|
|
98
|
-
##
|
|
98
|
+
## Assumptions
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Something you believe about the system but have not verified. Not a choice.
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
For each one, write: what you assume, and **whether it can be verified and if so how**. That information decides what happens next: if it can be investigated, it becomes a `DIAGNOS`; if it cannot, it becomes a condition in the customer's proposal. Without it the scorer cannot tell them apart, and a managed risk wrongly becomes an investigation.
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
If the assumption already holds in the system today and is known: write it, and write where to look if it turns out to be false. Then it is inherited, managed risk.
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
If you have the repo, the list must be short. Most things can be verified, and every verified assumption is one condition fewer later.
|
|
107
107
|
|
|
108
108
|
## Output
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
The analysis as one document, one page. Then a short block for the reviewer:
|
|
111
111
|
|
|
112
112
|
```
|
|
113
113
|
---
|
|
114
|
-
##
|
|
114
|
+
## For the reviewer
|
|
115
115
|
|
|
116
|
-
**
|
|
117
|
-
**
|
|
118
|
-
**
|
|
116
|
+
**Not verified:** [what you have not been able to ground in the code, and why]
|
|
117
|
+
**Deviation from the spec:** <none | refinement | contradiction>. [free text: what the code says and what the spec assumes]
|
|
118
|
+
**Unanswered outcome choices:** [none, or one list item per choice ("- "), see below]
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
###
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- `
|
|
129
|
-
- `
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
121
|
+
### Deviation from the spec
|
|
122
|
+
|
|
123
|
+
The line ALWAYS starts with one of three labels, as the first word after the colon.
|
|
124
|
+
The form check reads the label, and the scorer acts on it. A line with only
|
|
125
|
+
free text ("should go back to the spec") is invisible to both: that is how two
|
|
126
|
+
contradictions in the same case were priced instead of stopped.
|
|
127
|
+
|
|
128
|
+
- `none`: the code matches what the spec assumes.
|
|
129
|
+
- `refinement`: the spec leaves something open that the code fills in without
|
|
130
|
+
the spec becoming wrong, for example exactly where a field goes in an
|
|
131
|
+
existing view. Write what you refined; it becomes a precondition in the
|
|
132
|
+
proposal, never a stop.
|
|
133
|
+
- `contradiction`: the spec assumes something that does not hold in the
|
|
134
|
+
system, or a point cannot be delivered as it stands. The item goes back to
|
|
135
|
+
the spec before it is scored. Write what does not hold and where in the code it
|
|
136
|
+
shows. The label may only be set when _Unanswered outcome choices_ is `none` or
|
|
137
|
+
when every listed alternative is struck (see below). If you list an
|
|
138
|
+
alternative that solves the problem, the label is `refinement`, and the
|
|
139
|
+
scorer's four-step rule decides. The form check rejects `contradiction` with
|
|
140
|
+
unstruck alternatives.
|
|
141
|
+
|
|
142
|
+
After the label comes the free text as before. Several deviations: the label is
|
|
143
|
+
the most serious of them (contradiction outweighs refinement), and each
|
|
144
|
+
deviation gets its own sentence.
|
|
145
|
+
|
|
146
|
+
### The customer's language
|
|
147
|
+
|
|
148
|
+
The prompt carries `SPRÅK: svenska | engelska`, the customer's language. The
|
|
149
|
+
analysis is internal to Haus and always written in English, but parts of it
|
|
150
|
+
go on to the customer through the scorer: what is refined on the deviation
|
|
151
|
+
line becomes a precondition in the proposal, and the alternatives under
|
|
152
|
+
_Unanswered outcome choices_ become the customer's alternatives. Name them in
|
|
153
|
+
the customer's language from the prompt's `SPRÅK:` line; in a standalone run
|
|
154
|
+
without the line, it is the spec's language.
|
|
155
|
+
|
|
156
|
+
### Dependencies in the working copy
|
|
157
|
+
|
|
158
|
+
The prompt carries `DEPS: installerade | saknas`. With `saknas` there are no
|
|
159
|
+
installed packages in the working copy: never verify by installing anything,
|
|
160
|
+
and report what you have not been able to ground in the packages (exports,
|
|
161
|
+
versions, API surfaces) under _Not verified_ with the reason "dependencies not
|
|
162
|
+
installed".
|
|
163
|
+
|
|
164
|
+
### Unanswered outcome choices
|
|
165
|
+
|
|
166
|
+
An outcome choice the spec has left open is written out with three things, and all three are needed:
|
|
167
|
+
|
|
168
|
+
1. **What the alternatives are.** Name them, and where in the code each one is if they
|
|
169
|
+
build on something existing.
|
|
170
|
+
2. **Whether the alternatives differ in what must be built.** Write it straight out: "both patterns
|
|
171
|
+
already exist, the same work either way" or "one of them requires X to change as well". It is
|
|
172
|
+
an observation about the code, not an assessment of scope: you never write that
|
|
173
|
+
something is large, small, simple or expensive.
|
|
174
|
+
3. **Which alternative the analysis is written from.** You must start from something to
|
|
175
|
+
be able to describe the system. Write "described from X", never "we choose X": the choice
|
|
176
|
+
is not yours.
|
|
177
|
+
|
|
178
|
+
Each choice is a top-level list item of its own that starts with "- ", and the three
|
|
179
|
+
parts above (the alternatives, whether they differ in what must be built, which
|
|
180
|
+
alternative the analysis is written from) are written on indented sub-lines
|
|
181
|
+
under that item, not as list items of their own. The form check counts only
|
|
182
|
+
list items at column 0; a sub-line does not count as an alternative of its own.
|
|
183
|
+
Alternatives in running text ("(a) text in the image, (b) a separate component") do not count
|
|
184
|
+
at all: the form check rejects `contradiction` with such prose in the section as
|
|
185
|
+
a defect and warns on `refinement`, so write the list or write `none`, never
|
|
186
|
+
an enumeration in one sentence.
|
|
187
|
+
|
|
188
|
+
**Struck alternative.** An alternative that does not solve the spec's _Problem_ is not deleted,
|
|
189
|
+
it is struck: the top-level list item (the same level as the alternative's "- ") starts with
|
|
190
|
+
`struck:` (Swedish: `struket:`) followed by the reason; the prefix is never moved down to a
|
|
191
|
+
sub-line. That way it shows that the alternative has been tried.
|
|
192
|
+
|
|
193
|
+
The reason for point 2: the scorer does not have the repo and cannot see whether
|
|
194
|
+
the alternatives cost differently. Without your line it must assume the worst and stop the item,
|
|
195
|
+
even when both paths are the same work. That is the most common reason an item
|
|
196
|
+
bounces back to the spec unnecessarily.
|
|
197
|
+
|
|
198
|
+
The deviation line is the most important one. If the spec assumes something that does not hold in the system, it is an error that must go back to the spec, not something to be scored, and the label `contradiction` is what makes that actually happen.
|
|
199
|
+
|
|
200
|
+
## What you never do
|
|
201
|
+
|
|
202
|
+
Mention scores, price levels, hours or size words. Judge whether the item should be built. Propose solutions beyond what the spec already describes. Write "this is simple" or "this is extensive": that is the scorer's job, and such a sentence colours it.
|