@rune-kit/rune 2.3.0 → 2.3.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/README.md +395 -389
- package/compiler/__tests__/tier-override.test.js +158 -0
- package/compiler/adapters/antigravity.js +3 -8
- package/compiler/adapters/codex.js +3 -8
- package/compiler/adapters/cursor.js +3 -8
- package/compiler/adapters/generic.js +3 -8
- package/compiler/adapters/openclaw.js +4 -9
- package/compiler/adapters/opencode.js +3 -8
- package/compiler/adapters/windsurf.js +3 -8
- package/compiler/bin/rune.js +34 -1
- package/compiler/emitter.js +94 -5
- package/compiler/transforms/branding.js +10 -3
- package/docs/ARCHITECTURE.md +3 -3
- package/docs/VISION.md +3 -3
- package/docs/guides/index.html +14 -14
- package/docs/index.html +7 -7
- package/docs/skills/index.html +832 -832
- package/extensions/ai-ml/PACK.md +7 -0
- package/extensions/content/PACK.md +7 -0
- package/extensions/mobile/PACK.md +9 -9
- package/extensions/zalo/PACK.md +9 -0
- package/package.json +2 -2
- package/skills/audit/SKILL.md +526 -529
- package/skills/ba/SKILL.md +349 -351
- package/skills/completion-gate/SKILL.md +260 -263
- package/skills/context-engine/SKILL.md +0 -6
- package/skills/cook/SKILL.md +2 -11
- package/skills/debug/SKILL.md +392 -394
- package/skills/deploy/references/post-deploy-integration.md +192 -0
- package/skills/fix/SKILL.md +281 -282
- package/skills/onboard/SKILL.md +0 -4
- package/skills/plan/references/completeness-scoring.md +0 -1
- package/skills/plan/references/outcome-block.md +0 -1
- package/skills/plan/references/workflow-registry.md +0 -1
- package/skills/preflight/SKILL.md +360 -365
- package/skills/rescue/SKILL.md +1 -0
- package/skills/research/SKILL.md +149 -150
- package/skills/review/SKILL.md +489 -495
- package/skills/sentinel/SKILL.md +0 -11
- package/skills/sentinel/references/destructive-commands.md +0 -1
- package/skills/sentinel/references/skill-content-guard.md +0 -1
- package/skills/session-bridge/SKILL.md +0 -4
- package/skills/skill-router/{SKILL.md → skill.md} +446 -397
- package/skills/team/SKILL.md +1 -2
- package/skills/test/SKILL.md +585 -593
- package/skills/watchdog/references/webhook-health-checks.md +243 -0
package/skills/ba/SKILL.md
CHANGED
|
@@ -1,351 +1,349 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ba
|
|
3
|
-
description: Business Analyst agent. Deeply understands user requirements before any planning or coding begins. Asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document that plan and cook consume.
|
|
4
|
-
metadata:
|
|
5
|
-
author: runedev
|
|
6
|
-
version: "0.4.0"
|
|
7
|
-
layer: L2
|
|
8
|
-
model: opus
|
|
9
|
-
group: creation
|
|
10
|
-
tools: "Read, Glob, Grep"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# ba
|
|
14
|
-
|
|
15
|
-
## Purpose
|
|
16
|
-
|
|
17
|
-
Business Analyst agent — the ROOT FIX for "Claude works a lot but produces nothing." BA forces deep understanding of WHAT to build before any code is written. It asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document.
|
|
18
|
-
|
|
19
|
-
<HARD-GATE>
|
|
20
|
-
BA produces WHAT, not HOW. Never write code. Never plan implementation.
|
|
21
|
-
Output is a Requirements Document → hand off to rune:plan for implementation planning.
|
|
22
|
-
</HARD-GATE>
|
|
23
|
-
|
|
24
|
-
## Triggers
|
|
25
|
-
|
|
26
|
-
- Called by `cook` Phase 1 when task is product-oriented (not a simple bug fix)
|
|
27
|
-
- Called by `scaffold` Phase 1 before any project generation
|
|
28
|
-
- `/rune ba <requirement>` — manual invocation
|
|
29
|
-
- Auto-trigger: when user description is > 50 words OR contains business terms (users, revenue, workflow, integration)
|
|
30
|
-
|
|
31
|
-
## Calls (outbound)
|
|
32
|
-
|
|
33
|
-
- `scout` (L2): scan existing codebase for context
|
|
34
|
-
- `research` (L3): look up similar products, APIs, integrations
|
|
35
|
-
- `plan` (L2): hand off Requirements Document for implementation planning
|
|
36
|
-
- `brainstorm` (L2): when multiple approaches exist for a requirement
|
|
37
|
-
|
|
38
|
-
## Called By (inbound)
|
|
39
|
-
|
|
40
|
-
- `cook` (L1): before Phase 2 PLAN, when task is non-trivial
|
|
41
|
-
- `scaffold` (L1): Phase 1, before any project generation
|
|
42
|
-
- `plan` (L2): when plan receives vague requirements
|
|
43
|
-
- User: `/rune ba` direct invocation
|
|
44
|
-
|
|
45
|
-
## Cross-Hub Connections
|
|
46
|
-
|
|
47
|
-
- `ba` → `plan` — ba produces requirements, plan produces implementation steps
|
|
48
|
-
- `ba` → `brainstorm` — ba calls brainstorm when multiple requirement approaches exist
|
|
49
|
-
- `ba` ↔ `cook` — cook calls ba for non-trivial tasks, ba feeds requirements into cook's pipeline
|
|
50
|
-
- `ba` → `scaffold` — scaffold requires ba output before project generation
|
|
51
|
-
|
|
52
|
-
## Executable Steps
|
|
53
|
-
|
|
54
|
-
### Step 1 — Intake & Classify
|
|
55
|
-
|
|
56
|
-
Read the user's request. Classify the requirement type:
|
|
57
|
-
|
|
58
|
-
| Type | Signal | Depth |
|
|
59
|
-
|------|--------|-------|
|
|
60
|
-
| Feature Request | "add X", "build Y", "I want Z" | Full BA cycle (Steps 1-7) |
|
|
61
|
-
| Bug Fix | "broken", "error", "doesn't work" | Skip BA → direct to debug |
|
|
62
|
-
| Refactor | "clean up", "refactor", "restructure" | Light BA (Step 1 + Step 4 only) |
|
|
63
|
-
| Integration | "connect X to Y", "integrate with Z" | Full BA + API research |
|
|
64
|
-
| Greenfield | "new project", "build from scratch" | Full BA + market context |
|
|
65
|
-
|
|
66
|
-
If Bug Fix → skip BA, route to cook/debug directly.
|
|
67
|
-
If Refactor → light version (Step 1 + Step 4 only).
|
|
68
|
-
|
|
69
|
-
If existing codebase → invoke `rune:scout` for context before proceeding.
|
|
70
|
-
|
|
71
|
-
### Step 2 — Requirement Elicitation (the "5 Questions")
|
|
72
|
-
|
|
73
|
-
Ask exactly 5 probing questions, ONE AT A TIME (not all at once):
|
|
74
|
-
|
|
75
|
-
1. **WHO** — "Who is the end user? What's their technical level? What are they doing right before and after using this feature?"
|
|
76
|
-
2. **WHAT** — "What specific outcome do they need? What does 'done' look like from the user's perspective?"
|
|
77
|
-
3. **WHY** — "Why do they need this? What problem does this solve? What happens if we don't build it?"
|
|
78
|
-
4. **BOUNDARIES** — "What should this NOT do? What's explicitly out of scope?"
|
|
79
|
-
5. **CONSTRAINTS** — "Any technical constraints? (existing APIs, performance requirements, security needs, deadlines)"
|
|
80
|
-
|
|
81
|
-
<HARD-GATE>
|
|
82
|
-
Do NOT skip questions. Do NOT answer your own questions.
|
|
83
|
-
If user says "just build it" → respond with: "I'll build it better with 2 minutes of context. Question 1: [WHO]"
|
|
84
|
-
Each question must be asked separately, wait for answer before next.
|
|
85
|
-
Exception: if user provides a detailed spec/PRD → extract answers from it, confirm with user.
|
|
86
|
-
</HARD-GATE>
|
|
87
|
-
|
|
88
|
-
#### Structured Elicitation Frameworks
|
|
89
|
-
|
|
90
|
-
Choose the framework that fits the requirement type. Use it to STRUCTURE the 5 Questions above, not replace them.
|
|
91
|
-
|
|
92
|
-
| Framework | When to Use | Structure |
|
|
93
|
-
|-----------|------------|-----------|
|
|
94
|
-
| **PICO** | Clinical, research, data-driven, or A/B testing features | **P**opulation (who), **I**ntervention (what change), **C**omparison (vs what), **O**utcome (measurable result) |
|
|
95
|
-
| **INVEST** | User stories for sprint-sized features | **I**ndependent, **N**egotiable, **V**aluable, **E**stimable, **S**mall, **T**estable |
|
|
96
|
-
| **Jobs-to-be-Done** | Product features, user workflows | "When [situation], I want to [motivation] so I can [expected outcome]" |
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- What
|
|
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
|
-
AC-1.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
|
200
|
-
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
###
|
|
229
|
-
[from Step 4]
|
|
230
|
-
###
|
|
231
|
-
[from Step 4]
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
- [
|
|
272
|
-
###
|
|
273
|
-
- [
|
|
274
|
-
|
|
275
|
-
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
|
291
|
-
|
|
292
|
-
| **
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
|
317
|
-
|
|
318
|
-
|
|
|
319
|
-
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
|
328
|
-
|
|
329
|
-
|
|
|
330
|
-
|
|
|
331
|
-
|
|
|
332
|
-
|
|
|
333
|
-
|
|
|
334
|
-
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
-
|
|
345
|
-
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
~3000-6000 tokens input, ~1500-3000 tokens output. Opus for deep requirement analysis — understanding WHAT to build is the most expensive mistake to get wrong.
|
|
1
|
+
---
|
|
2
|
+
name: ba
|
|
3
|
+
description: Business Analyst agent. Deeply understands user requirements before any planning or coding begins. Asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document that plan and cook consume.
|
|
4
|
+
metadata:
|
|
5
|
+
author: runedev
|
|
6
|
+
version: "0.4.0"
|
|
7
|
+
layer: L2
|
|
8
|
+
model: opus
|
|
9
|
+
group: creation
|
|
10
|
+
tools: "Read, Glob, Grep"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ba
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Business Analyst agent — the ROOT FIX for "Claude works a lot but produces nothing." BA forces deep understanding of WHAT to build before any code is written. It asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document.
|
|
18
|
+
|
|
19
|
+
<HARD-GATE>
|
|
20
|
+
BA produces WHAT, not HOW. Never write code. Never plan implementation.
|
|
21
|
+
Output is a Requirements Document → hand off to rune:plan for implementation planning.
|
|
22
|
+
</HARD-GATE>
|
|
23
|
+
|
|
24
|
+
## Triggers
|
|
25
|
+
|
|
26
|
+
- Called by `cook` Phase 1 when task is product-oriented (not a simple bug fix)
|
|
27
|
+
- Called by `scaffold` Phase 1 before any project generation
|
|
28
|
+
- `/rune ba <requirement>` — manual invocation
|
|
29
|
+
- Auto-trigger: when user description is > 50 words OR contains business terms (users, revenue, workflow, integration)
|
|
30
|
+
|
|
31
|
+
## Calls (outbound)
|
|
32
|
+
|
|
33
|
+
- `scout` (L2): scan existing codebase for context
|
|
34
|
+
- `research` (L3): look up similar products, APIs, integrations
|
|
35
|
+
- `plan` (L2): hand off Requirements Document for implementation planning
|
|
36
|
+
- `brainstorm` (L2): when multiple approaches exist for a requirement
|
|
37
|
+
|
|
38
|
+
## Called By (inbound)
|
|
39
|
+
|
|
40
|
+
- `cook` (L1): before Phase 2 PLAN, when task is non-trivial
|
|
41
|
+
- `scaffold` (L1): Phase 1, before any project generation
|
|
42
|
+
- `plan` (L2): when plan receives vague requirements
|
|
43
|
+
- User: `/rune ba` direct invocation
|
|
44
|
+
|
|
45
|
+
## Cross-Hub Connections
|
|
46
|
+
|
|
47
|
+
- `ba` → `plan` — ba produces requirements, plan produces implementation steps
|
|
48
|
+
- `ba` → `brainstorm` — ba calls brainstorm when multiple requirement approaches exist
|
|
49
|
+
- `ba` ↔ `cook` — cook calls ba for non-trivial tasks, ba feeds requirements into cook's pipeline
|
|
50
|
+
- `ba` → `scaffold` — scaffold requires ba output before project generation
|
|
51
|
+
|
|
52
|
+
## Executable Steps
|
|
53
|
+
|
|
54
|
+
### Step 1 — Intake & Classify
|
|
55
|
+
|
|
56
|
+
Read the user's request. Classify the requirement type:
|
|
57
|
+
|
|
58
|
+
| Type | Signal | Depth |
|
|
59
|
+
|------|--------|-------|
|
|
60
|
+
| Feature Request | "add X", "build Y", "I want Z" | Full BA cycle (Steps 1-7) |
|
|
61
|
+
| Bug Fix | "broken", "error", "doesn't work" | Skip BA → direct to debug |
|
|
62
|
+
| Refactor | "clean up", "refactor", "restructure" | Light BA (Step 1 + Step 4 only) |
|
|
63
|
+
| Integration | "connect X to Y", "integrate with Z" | Full BA + API research |
|
|
64
|
+
| Greenfield | "new project", "build from scratch" | Full BA + market context |
|
|
65
|
+
|
|
66
|
+
If Bug Fix → skip BA, route to cook/debug directly.
|
|
67
|
+
If Refactor → light version (Step 1 + Step 4 only).
|
|
68
|
+
|
|
69
|
+
If existing codebase → invoke `rune:scout` for context before proceeding.
|
|
70
|
+
|
|
71
|
+
### Step 2 — Requirement Elicitation (the "5 Questions")
|
|
72
|
+
|
|
73
|
+
Ask exactly 5 probing questions, ONE AT A TIME (not all at once):
|
|
74
|
+
|
|
75
|
+
1. **WHO** — "Who is the end user? What's their technical level? What are they doing right before and after using this feature?"
|
|
76
|
+
2. **WHAT** — "What specific outcome do they need? What does 'done' look like from the user's perspective?"
|
|
77
|
+
3. **WHY** — "Why do they need this? What problem does this solve? What happens if we don't build it?"
|
|
78
|
+
4. **BOUNDARIES** — "What should this NOT do? What's explicitly out of scope?"
|
|
79
|
+
5. **CONSTRAINTS** — "Any technical constraints? (existing APIs, performance requirements, security needs, deadlines)"
|
|
80
|
+
|
|
81
|
+
<HARD-GATE>
|
|
82
|
+
Do NOT skip questions. Do NOT answer your own questions.
|
|
83
|
+
If user says "just build it" → respond with: "I'll build it better with 2 minutes of context. Question 1: [WHO]"
|
|
84
|
+
Each question must be asked separately, wait for answer before next.
|
|
85
|
+
Exception: if user provides a detailed spec/PRD → extract answers from it, confirm with user.
|
|
86
|
+
</HARD-GATE>
|
|
87
|
+
|
|
88
|
+
#### Structured Elicitation Frameworks
|
|
89
|
+
|
|
90
|
+
Choose the framework that fits the requirement type. Use it to STRUCTURE the 5 Questions above, not replace them.
|
|
91
|
+
|
|
92
|
+
| Framework | When to Use | Structure |
|
|
93
|
+
|-----------|------------|-----------|
|
|
94
|
+
| **PICO** | Clinical, research, data-driven, or A/B testing features | **P**opulation (who), **I**ntervention (what change), **C**omparison (vs what), **O**utcome (measurable result) |
|
|
95
|
+
| **INVEST** | User stories for sprint-sized features | **I**ndependent, **N**egotiable, **V**aluable, **E**stimable, **S**mall, **T**estable |
|
|
96
|
+
| **Jobs-to-be-Done** | Product features, user workflows | "When [situation], I want to [motivation] so I can [expected outcome]" |
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
**PICO Example (data feature):**
|
|
100
|
+
```
|
|
101
|
+
P: Dashboard users monitoring real-time metrics
|
|
102
|
+
I: Add anomaly detection alerts
|
|
103
|
+
C: vs. current manual threshold setting
|
|
104
|
+
O: 30% faster incident detection (measurable KPI)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**When to apply which:**
|
|
108
|
+
- Feature Request → INVEST (ensures stories are sprint-ready)
|
|
109
|
+
- Data/Analytics/Research feature → PICO (forces measurable outcome definition)
|
|
110
|
+
- Product/UX feature → Jobs-to-be-Done (keeps focus on user motivation)
|
|
111
|
+
- Integration → 5 Questions only (frameworks add noise for plumbing tasks)
|
|
112
|
+
|
|
113
|
+
### Step 3 — Hidden Requirement Discovery
|
|
114
|
+
|
|
115
|
+
After the 5 questions, analyze for requirements the user DIDN'T mention:
|
|
116
|
+
|
|
117
|
+
**Technical hidden requirements:**
|
|
118
|
+
- Authentication/authorization needed?
|
|
119
|
+
- Rate limiting needed?
|
|
120
|
+
- Data persistence needed? (what DB, what schema)
|
|
121
|
+
- Error handling strategy?
|
|
122
|
+
- Offline/fallback behavior?
|
|
123
|
+
- Mobile responsiveness?
|
|
124
|
+
- Accessibility requirements?
|
|
125
|
+
- Internationalization?
|
|
126
|
+
|
|
127
|
+
**Business hidden requirements:**
|
|
128
|
+
- What happens on failure? (graceful degradation)
|
|
129
|
+
- What data needs to be tracked? (analytics events)
|
|
130
|
+
- Who else is affected? (other teams, other systems)
|
|
131
|
+
- What are the edge cases? (empty state, max limits, concurrent access)
|
|
132
|
+
- Regulatory/compliance needs? (GDPR, PCI, HIPAA)
|
|
133
|
+
|
|
134
|
+
Present discovered hidden requirements to user: "I found N additional requirements you may not have considered: [list]. Which are relevant?"
|
|
135
|
+
|
|
136
|
+
### Step 3.5 — Completeness Scoring (Options & Alternatives)
|
|
137
|
+
|
|
138
|
+
When presenting options, alternatives, or scope decisions to the user, rate each with a **Completeness score (X/10)**:
|
|
139
|
+
|
|
140
|
+
| Score | Meaning | Guidance |
|
|
141
|
+
|-------|---------|----------|
|
|
142
|
+
| 9-10 | Complete — all edge cases, full coverage, production-ready | Always recommend |
|
|
143
|
+
| 7-8 | Covers happy path, skips some edges | Acceptable for MVP |
|
|
144
|
+
| 4-6 | Shortcut — defers significant work to later | Flag trade-off explicitly |
|
|
145
|
+
| 1-3 | Minimal viable, technical debt guaranteed | Only for time-critical emergencies |
|
|
146
|
+
|
|
147
|
+
**Always recommend the higher-completeness option** unless the delta is truly expensive. With AI-assisted coding, the marginal cost of completeness is near-zero:
|
|
148
|
+
|
|
149
|
+
| Task Type | Human Team | AI-Assisted | Compression |
|
|
150
|
+
|-----------|-----------|-------------|-------------|
|
|
151
|
+
| Boilerplate / scaffolding | 2 days | 15 min | ~100x |
|
|
152
|
+
| Test writing | 1 day | 15 min | ~50x |
|
|
153
|
+
| Feature implementation | 1 week | 30 min | ~30x |
|
|
154
|
+
| Bug fix + regression test | 4 hours | 15 min | ~20x |
|
|
155
|
+
|
|
156
|
+
**When showing effort estimates**, always show both scales: `(human: ~X / AI: ~Y)`. The compression ratio reframes "too expensive" into "15 minutes more."
|
|
157
|
+
|
|
158
|
+
**Anti-pattern**: "Choose B — it covers 90% of the value with less code." → If A is only 70 lines more, choose A. The last 10% is where production bugs hide.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### Step 4 — Scope Definition
|
|
162
|
+
|
|
163
|
+
Based on all gathered information, produce:
|
|
164
|
+
|
|
165
|
+
**In-Scope** (explicitly included):
|
|
166
|
+
- [list of features/behaviors that WILL be built]
|
|
167
|
+
|
|
168
|
+
**Out-of-Scope** (explicitly excluded):
|
|
169
|
+
- [list of things we WON'T build — prevents scope creep]
|
|
170
|
+
|
|
171
|
+
**Assumptions** (things we're assuming without proof):
|
|
172
|
+
- [each assumption is a risk if wrong]
|
|
173
|
+
|
|
174
|
+
**Dependencies** (things that must exist before we can build):
|
|
175
|
+
- [APIs, services, libraries, access, existing code]
|
|
176
|
+
|
|
177
|
+
### Step 5 — User Stories & Acceptance Criteria
|
|
178
|
+
|
|
179
|
+
For each in-scope feature, generate:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
US-1: As a [persona], I want to [action] so that [benefit]
|
|
183
|
+
AC-1.1: GIVEN [context] WHEN [action] THEN [result]
|
|
184
|
+
AC-1.2: GIVEN [error case] WHEN [action] THEN [error handling]
|
|
185
|
+
AC-1.3: GIVEN [edge case] WHEN [action] THEN [graceful behavior]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Rules:
|
|
189
|
+
- Primary user story first, then edge cases
|
|
190
|
+
- Every user story has at least 2 acceptance criteria (happy path + error)
|
|
191
|
+
- Acceptance criteria are TESTABLE — they become test cases in Phase 3
|
|
192
|
+
|
|
193
|
+
### Step 6 — Non-Functional Requirements (NFRs)
|
|
194
|
+
|
|
195
|
+
Assess and document ONLY relevant NFRs:
|
|
196
|
+
|
|
197
|
+
| NFR | Requirement | Measurement |
|
|
198
|
+
|-----|-------------|-------------|
|
|
199
|
+
| Performance | Page load < Xs, API response < Yms | Lighthouse, k6 |
|
|
200
|
+
| Security | Auth required, input validation, OWASP top 10 | sentinel scan |
|
|
201
|
+
| Scalability | Expected users, data volume | Load test target |
|
|
202
|
+
| Reliability | Uptime target, error budget | Monitoring threshold |
|
|
203
|
+
| Accessibility | WCAG 2.2 AA | Axe audit |
|
|
204
|
+
|
|
205
|
+
Only include NFRs relevant to this specific task. Don't generate a generic checklist.
|
|
206
|
+
|
|
207
|
+
### Step 7 — Requirements Document
|
|
208
|
+
|
|
209
|
+
Produce structured output and hand off to `plan`:
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
# Requirements Document: [Feature Name]
|
|
213
|
+
Created: [date] | BA Session: [summary]
|
|
214
|
+
|
|
215
|
+
## Context
|
|
216
|
+
[Problem statement — 2-3 sentences]
|
|
217
|
+
|
|
218
|
+
## Stakeholders
|
|
219
|
+
- Primary user: [who]
|
|
220
|
+
- Affected systems: [what]
|
|
221
|
+
|
|
222
|
+
## User Stories
|
|
223
|
+
[from Step 5]
|
|
224
|
+
|
|
225
|
+
## Scope
|
|
226
|
+
### In Scope
|
|
227
|
+
[from Step 4]
|
|
228
|
+
### Out of Scope
|
|
229
|
+
[from Step 4]
|
|
230
|
+
### Assumptions
|
|
231
|
+
[from Step 4]
|
|
232
|
+
|
|
233
|
+
## Non-Functional Requirements
|
|
234
|
+
[from Step 6]
|
|
235
|
+
|
|
236
|
+
## Dependencies
|
|
237
|
+
[from Step 4]
|
|
238
|
+
|
|
239
|
+
## Risks
|
|
240
|
+
- [risk]: [mitigation]
|
|
241
|
+
|
|
242
|
+
## Next Step
|
|
243
|
+
→ Hand off to rune:plan for implementation planning
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Save to `.rune/features/<feature-name>/requirements.md`
|
|
247
|
+
|
|
248
|
+
## Output Format
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
# Requirements Document: [Feature Name]
|
|
252
|
+
Created: [date] | BA Session: [summary]
|
|
253
|
+
|
|
254
|
+
## Context
|
|
255
|
+
[Problem statement — 2-3 sentences]
|
|
256
|
+
|
|
257
|
+
## Stakeholders
|
|
258
|
+
- Primary user: [who, technical level, workflow context]
|
|
259
|
+
- Affected systems: [existing services, databases, APIs]
|
|
260
|
+
|
|
261
|
+
## User Stories
|
|
262
|
+
US-1: As a [persona], I want to [action] so that [benefit]
|
|
263
|
+
AC-1.1: GIVEN [context] WHEN [action] THEN [result]
|
|
264
|
+
AC-1.2: GIVEN [error case] WHEN [action] THEN [error handling]
|
|
265
|
+
|
|
266
|
+
## Scope
|
|
267
|
+
### In Scope
|
|
268
|
+
- [feature/behavior 1]
|
|
269
|
+
- [feature/behavior 2]
|
|
270
|
+
### Out of Scope
|
|
271
|
+
- [explicitly excluded 1]
|
|
272
|
+
### Assumptions
|
|
273
|
+
- [assumption — risk if wrong]
|
|
274
|
+
|
|
275
|
+
## Non-Functional Requirements
|
|
276
|
+
| NFR | Requirement | Measurement |
|
|
277
|
+
|-----|-------------|-------------|
|
|
278
|
+
| [Performance/Security/etc.] | [specific target] | [how to verify] |
|
|
279
|
+
|
|
280
|
+
## Dependencies
|
|
281
|
+
- [API/service/library]: [status — available/needs setup]
|
|
282
|
+
|
|
283
|
+
## Risks
|
|
284
|
+
- [risk]: [mitigation strategy]
|
|
285
|
+
|
|
286
|
+
## Decision Classification
|
|
287
|
+
|
|
288
|
+
| Category | Meaning | Example |
|
|
289
|
+
|----------|---------|---------|
|
|
290
|
+
| **Decisions** (locked) | User confirmed — agent MUST follow | "Use PostgreSQL, not MongoDB" |
|
|
291
|
+
| **Discretion** (agent decides) | User trusts agent judgment | "Pick the best validation library" |
|
|
292
|
+
| **Deferred** (out of scope) | Explicitly NOT this task | "Mobile app — future phase" |
|
|
293
|
+
|
|
294
|
+
Plan gates on Decision compliance — Discretion items don't need approval.
|
|
295
|
+
|
|
296
|
+
## Next Step
|
|
297
|
+
→ Hand off to rune:plan for implementation planning
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Saved to `.rune/features/<feature-name>/requirements.md`
|
|
301
|
+
|
|
302
|
+
## Constraints
|
|
303
|
+
|
|
304
|
+
1. MUST ask 5 probing questions before producing requirements — no assumptions
|
|
305
|
+
2. MUST identify hidden requirements — the obvious ones are never the full picture
|
|
306
|
+
3. MUST define out-of-scope explicitly — prevents scope creep
|
|
307
|
+
4. MUST produce testable acceptance criteria — they become test cases
|
|
308
|
+
5. MUST NOT write code or plan implementation — BA produces WHAT, plan produces HOW
|
|
309
|
+
6. MUST ask ONE question at a time — don't overwhelm user with 5 questions at once
|
|
310
|
+
7. MUST NOT skip BA for non-trivial tasks — "just build it" gets redirected to Question 1
|
|
311
|
+
|
|
312
|
+
## Returns
|
|
313
|
+
|
|
314
|
+
| Artifact | Format | Location |
|
|
315
|
+
|----------|--------|----------|
|
|
316
|
+
| Requirements document | Markdown | `.rune/features/<feature-name>/requirements.md` |
|
|
317
|
+
| User stories with acceptance criteria | Markdown (GIVEN/WHEN/THEN) | inline + requirements.md |
|
|
318
|
+
| Scope definition (in/out/assumptions) | Markdown sections | requirements.md |
|
|
319
|
+
| Non-functional requirements table | Markdown table | requirements.md |
|
|
320
|
+
|
|
321
|
+
## Sharp Edges
|
|
322
|
+
|
|
323
|
+
Known failure modes for this skill. Check these before declaring done.
|
|
324
|
+
|
|
325
|
+
| Failure Mode | Severity | Mitigation |
|
|
326
|
+
|---|---|---|
|
|
327
|
+
| Skipping questions because "requirements are obvious" | CRITICAL | HARD-GATE: 5 questions mandatory, even for "simple" tasks |
|
|
328
|
+
| Answering own questions instead of asking user | HIGH | Questions require USER input — BA doesn't guess |
|
|
329
|
+
| Producing implementation details (HOW) instead of requirements (WHAT) | HIGH | BA outputs requirements doc → plan outputs implementation |
|
|
330
|
+
| All-at-once question dump (asking 5 questions in one message) | MEDIUM | One question at a time, wait for answer before next |
|
|
331
|
+
| Missing hidden requirements (auth, error handling, edge cases) | HIGH | Step 3 checklist is mandatory scan |
|
|
332
|
+
| Requirements doc too verbose (>500 lines) | MEDIUM | Max 200 lines — concise, actionable, testable |
|
|
333
|
+
| Skipping BA for "simple" features that turn out complex | HIGH | Let cook's complexity detection trigger BA, not user judgment |
|
|
334
|
+
| Recommending shortcuts without Completeness Score | MEDIUM | Step 3.5: every option needs X/10 score + dual effort estimate (human vs AI). "90% coverage" is a red flag when 100% costs 15 min more |
|
|
335
|
+
|
|
336
|
+
## Done When
|
|
337
|
+
|
|
338
|
+
- Requirement type classified (feature/refactor/integration/greenfield)
|
|
339
|
+
- 5 probing questions asked and answered (or extracted from spec/PRD)
|
|
340
|
+
- Hidden requirements discovered and confirmed with user
|
|
341
|
+
- Scope defined (in/out/assumptions/dependencies)
|
|
342
|
+
- User stories with testable acceptance criteria produced
|
|
343
|
+
- Non-functional requirements assessed (relevant ones only)
|
|
344
|
+
- Requirements Document saved to `.rune/features/<name>/requirements.md`
|
|
345
|
+
- Handed off to `plan` for implementation planning
|
|
346
|
+
|
|
347
|
+
## Cost Profile
|
|
348
|
+
|
|
349
|
+
~3000-6000 tokens input, ~1500-3000 tokens output. Opus for deep requirement analysis — understanding WHAT to build is the most expensive mistake to get wrong.
|