You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
next_question: <single question that unblocks next step>
41
+
```
42
+
43
+
Do not emit final configuration output after this fallback.
44
+
29
45
## Language Policy
30
46
31
47
1. If user language is explicit, answer in that language.
@@ -42,6 +58,12 @@ Always enforce these validations before returning configuration output:
42
58
2.**Load profile is required**
43
59
- Every generated environment config must include explicit `vus` and `duration`.
44
60
- If missing, derive defaults per environment and state derivation logic.
61
+
3.**Parameter coherence is required**
62
+
- If arrival-rate style parameters are included, enforce `preAllocatedVUs <= maxVUs`.
63
+
- If `stages` are used, ensure stage durations are explicit and non-empty.
64
+
4.**Secrets and runnable safety are required**
65
+
- Never hard-code credentials or tokens in runnable examples.
66
+
- Require environment-variable placeholders (`__ENV` or `.env.example`) for secrets.
45
67
46
68
## Configuration Patterns
47
69
@@ -73,6 +95,25 @@ Generate separate configs for dev/staging/prod with environment-specific:
73
95
-`k6-config` applies environment-level policy (dev/staging/prod) and operational defaults.
74
96
- If both are used, `k6-config` must preserve executor recommendation intent while enforcing environment safety defaults.
75
97
98
+
Dashboard precedence order shared with `k6-executor`:
99
+
100
+
1. CI/non-interactive contexts default to `K6_WEB_DASHBOARD=false` unless user explicitly opts in.
101
+
2. Local interactive browser troubleshooting defaults to `K6_WEB_DASHBOARD=true`.
102
+
3. Local non-browser runs default to `K6_WEB_DASHBOARD=false` unless user explicitly opts in.
103
+
4. All other contexts default to `K6_WEB_DASHBOARD=false`.
104
+
105
+
## Output Contract
106
+
107
+
Every response must include these sections in order:
108
+
109
+
1. Environment Matrix
110
+
2. Configuration Snippets (by environment)
111
+
3. Thresholds (provided or derived)
112
+
4. Load Profile (explicit `vus`/`duration` or staged equivalent)
113
+
5. Guardrail Validation
114
+
6. Web Dashboard Policy
115
+
7. Assumptions and Next Step
116
+
76
117
## Progressive Disclosure
77
118
78
119
Keep this file focused on execution workflow. Place deep guidance in:
@@ -85,6 +126,7 @@ Keep this file focused on execution workflow. Place deep guidance in:
85
126
2. Run Tool Discovery Protocol if critical input is missing.
86
127
3. Validate or derive thresholds for each environment.
87
128
4. Validate or derive `vus` and `duration` for each environment.
88
-
5. Determine per-environment dashboard policy (`enable` only when explicitly requested for local analysis, or when the scenario requires browser UX troubleshooting differential analysis), aligned with `k6-executor` gate semantics.
129
+
5. Determine per-environment dashboard policy using shared precedence with `k6-executor` (CI/headless first, local-browser second, default false otherwise).
89
130
6. Generate deterministic config output and `.env.example` guidance, explicitly warning that real env files and generated reports must remain uncommitted.
90
-
7. Include a short summary of derived assumptions.
131
+
7. Validate guardrails and return output using the Output Contract section order.
132
+
8. Include a short summary of derived assumptions.
Copy file name to clipboardExpand all lines: skills/k6-config/references/sla-defaults.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,9 @@ Output:
84
84
}
85
85
```
86
86
87
-
> **Note on p99 inference:**`p99 = p95 * 1.8` is an empirical heuristic, not an official k6 rule. Use measured p99 values from representative environments whenever possible.
87
+
> **IMPORTANT: Note on p99 Inference:** The `p99 = p95 * 1.8` formula is an empirical heuristic based on common latency distributions. This is not an official k6 standard and must not be treated as universally valid.
88
+
>
89
+
> Use this approximation only as an initial baseline when real p99 measurements are unavailable. Replace it with measured p99 values from representative environments (staging or production-like) before final SLA sign-off.
Copy file name to clipboardExpand all lines: skills/k6-validate/references/severity-and-antipatterns.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@
24
24
| Scenario | Rule | Severity | Fix |
25
25
|----------|------|----------|-----|
26
26
| No thresholds defined | ERROR | MUST have at least one threshold | Add threshold (e.g., `p95<500`) |
27
-
| Only success checks, no metrics | WARNING |Thresholds define success criteria (MOS - Measure of Success), not just checks | Add latency/availability thresholds |
27
+
| Only checks pass-rate threshold, no latency/error metrics | WARNING |Checks alone are insufficient for SLA validation | Add latency and error-rate thresholds |
28
28
| Inconsistent across environments | WARNING | Same test, different thresholds per env | Document environment-specific SLAs |
29
29
| p95 > p99 | ERROR | Invalid percentile relationship (p95 must be ≤ p99) | Swap values or fix percentile order |
30
30
| Error threshold > 5% | WARNING | Too lenient for most SLAs | Tighten error rate threshold |
@@ -49,6 +49,10 @@
49
49
| Batch size > 10 | WARNING | Batch requests might mask individual failures | Reduce batch size or use separate calls |
50
50
| No timeout defined | WARNING | No per-request timeout is defined; behavior falls back to k6 defaults that may not match SLA expectations | Set `timeout: '30s'` or similar |
51
51
52
+
Timeout coherence note:
53
+
54
+
- When a script follows approved plan/config guidance and already defines explicit timeouts, timeout warnings must not be emitted.
0 commit comments