swe-workflow-skills 0.1.0 → 0.3.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.
Files changed (74) hide show
  1. package/README.md +58 -17
  2. package/VERSION +1 -1
  3. package/catalog.json +113 -8
  4. package/commands/role.md +14 -2
  5. package/install.mjs +23 -3
  6. package/package.json +2 -2
  7. package/roles.json +72 -7
  8. package/scripts/resolve.mjs +8 -3
  9. package/skills/ai-evaluation/SKILL.md +112 -0
  10. package/skills/ai-evaluation/evals/evals.json +40 -0
  11. package/skills/ai-evaluation/references/eval-tooling.md +63 -0
  12. package/skills/architecture-design/SKILL.md +3 -1
  13. package/skills/brainstorming/SKILL.md +92 -0
  14. package/skills/brainstorming/evals/evals.json +40 -0
  15. package/skills/browser-verification/SKILL.md +95 -0
  16. package/skills/browser-verification/evals/evals.json +40 -0
  17. package/skills/build-vs-buy/SKILL.md +109 -0
  18. package/skills/build-vs-buy/evals/evals.json +40 -0
  19. package/skills/cicd-pipeline/SKILL.md +1 -0
  20. package/skills/code-archaeology/SKILL.md +103 -0
  21. package/skills/code-archaeology/evals/evals.json +41 -0
  22. package/skills/code-reviewing/SKILL.md +13 -3
  23. package/skills/compliance-privacy/SKILL.md +113 -0
  24. package/skills/compliance-privacy/evals/evals.json +41 -0
  25. package/skills/compliance-privacy/references/obligations-map.md +69 -0
  26. package/skills/data-pipeline-design/SKILL.md +116 -0
  27. package/skills/data-pipeline-design/evals/evals.json +41 -0
  28. package/skills/data-pipeline-design/references/orchestration.md +64 -0
  29. package/skills/data-quality/SKILL.md +107 -0
  30. package/skills/data-quality/evals/evals.json +39 -0
  31. package/skills/data-quality/references/tooling.md +45 -0
  32. package/skills/deployment-checklist/SKILL.md +2 -1
  33. package/skills/dx-audit/SKILL.md +97 -0
  34. package/skills/dx-audit/evals/evals.json +40 -0
  35. package/skills/effort-estimation/SKILL.md +24 -67
  36. package/skills/exploratory-data-analysis/SKILL.md +110 -0
  37. package/skills/exploratory-data-analysis/evals/evals.json +43 -0
  38. package/skills/feature-planning/SKILL.md +5 -1
  39. package/skills/finops-cost-optimization/SKILL.md +109 -0
  40. package/skills/finops-cost-optimization/evals/evals.json +40 -0
  41. package/skills/git-workflow/SKILL.md +31 -14
  42. package/skills/llm-app-engineering/SKILL.md +102 -0
  43. package/skills/llm-app-engineering/evals/evals.json +40 -0
  44. package/skills/llm-app-engineering/references/patterns.md +70 -0
  45. package/skills/ml-experiment-tracking/SKILL.md +1 -1
  46. package/skills/ml-pipeline-design/SKILL.md +8 -2
  47. package/skills/ml-pipeline-design/evals/evals.json +10 -0
  48. package/skills/mobile-architecture/SKILL.md +106 -0
  49. package/skills/mobile-architecture/evals/evals.json +40 -0
  50. package/skills/mobile-release/SKILL.md +109 -0
  51. package/skills/mobile-release/evals/evals.json +41 -0
  52. package/skills/notebook-to-production/SKILL.md +89 -0
  53. package/skills/notebook-to-production/evals/evals.json +42 -0
  54. package/skills/plan-execution/SKILL.md +115 -0
  55. package/skills/plan-execution/evals/evals.json +55 -0
  56. package/skills/project-documentation/SKILL.md +8 -1
  57. package/skills/project-review/SKILL.md +13 -3
  58. package/skills/release-management/SKILL.md +97 -0
  59. package/skills/release-management/evals/evals.json +56 -0
  60. package/skills/release-management/references/release-tooling.md +106 -0
  61. package/skills/resilience-engineering/SKILL.md +121 -0
  62. package/skills/resilience-engineering/evals/evals.json +40 -0
  63. package/skills/security-audit/SKILL.md +14 -3
  64. package/skills/skill-router/SKILL.md +57 -4
  65. package/skills/statistical-analysis/SKILL.md +93 -0
  66. package/skills/statistical-analysis/evals/evals.json +43 -0
  67. package/skills/strategic-review/SKILL.md +16 -2
  68. package/skills/subagent-orchestration/SKILL.md +100 -0
  69. package/skills/subagent-orchestration/evals/evals.json +40 -0
  70. package/skills/technical-debt-review/SKILL.md +12 -2
  71. package/skills/threat-modeling/SKILL.md +101 -0
  72. package/skills/threat-modeling/evals/evals.json +40 -0
  73. package/skills/threat-modeling/references/stride-mitigations.md +90 -0
  74. package/skills/writing-skills/SKILL.md +48 -16
package/roles.json CHANGED
@@ -14,11 +14,13 @@
14
14
  "core": {
15
15
  "universal": [
16
16
  "skill-router",
17
+ "brainstorming",
17
18
  "feature-planning"
18
19
  ],
19
20
  "technical": [
20
21
  "skill-router",
21
22
  "feature-planning",
23
+ "plan-execution",
22
24
  "git-workflow",
23
25
  "code-reviewing",
24
26
  "verification-before-completion",
@@ -28,7 +30,8 @@
28
30
  },
29
31
 
30
32
  "meta_only": [
31
- "writing-skills"
33
+ "writing-skills",
34
+ "subagent-orchestration"
32
35
  ],
33
36
 
34
37
  "roles": {
@@ -62,6 +65,7 @@
62
65
  "api-design",
63
66
  "tdd-workflow",
64
67
  "test-suite-design",
68
+ "browser-verification",
65
69
  "performance-optimization",
66
70
  "refactoring"
67
71
  ]
@@ -73,6 +77,7 @@
73
77
  "skills": [
74
78
  "containerization",
75
79
  "cicd-pipeline",
80
+ "release-management",
76
81
  "infrastructure-as-code",
77
82
  "deployment-repo",
78
83
  "gitops-delivery",
@@ -80,29 +85,70 @@
80
85
  "rollback-strategy",
81
86
  "incident-response",
82
87
  "observability-design",
83
- "configuration-strategy",
84
- "dependency-impact-analysis"
88
+ "resilience-engineering",
89
+ "configuration-strategy"
85
90
  ]
86
91
  },
87
92
  "ml": {
88
93
  "label": "ML Engineer / MLOps",
89
- "description": "Skills for ML pipelines, experiment tracking, model deployment, and the data/observability around them.",
94
+ "description": "Skills for ML pipelines, experiment tracking, evaluation, model deployment, and the data/observability around them.",
90
95
  "core": "technical",
91
96
  "skills": [
92
97
  "ml-pipeline-design",
93
98
  "ml-experiment-tracking",
94
99
  "ml-model-deployment",
100
+ "ai-evaluation",
101
+ "data-modeling",
102
+ "test-data-strategy",
103
+ "observability-design"
104
+ ]
105
+ },
106
+ "ai": {
107
+ "label": "AI Engineer",
108
+ "description": "Skills for LLM-powered applications: prompt/RAG/agent design, evaluation, experiment tracking, model deployment, and the API around them.",
109
+ "core": "technical",
110
+ "skills": [
111
+ "llm-app-engineering",
112
+ "ai-evaluation",
113
+ "ml-experiment-tracking",
114
+ "ml-model-deployment",
115
+ "api-design"
116
+ ]
117
+ },
118
+ "data": {
119
+ "label": "Data Engineer",
120
+ "description": "Skills for data pipelines, analytics engineering, data quality/contracts, schema design, test data, and pipeline observability.",
121
+ "core": "technical",
122
+ "skills": [
123
+ "data-pipeline-design",
124
+ "data-quality",
95
125
  "data-modeling",
96
126
  "test-data-strategy",
97
127
  "observability-design"
98
128
  ]
99
129
  },
130
+ "data-scientist": {
131
+ "label": "Data Scientist",
132
+ "description": "Skills for exploratory data analysis, statistical rigor, notebook productionization, and the experiment-tracking/data-quality/modeling work around them.",
133
+ "core": "technical",
134
+ "skills": [
135
+ "exploratory-data-analysis",
136
+ "statistical-analysis",
137
+ "notebook-to-production",
138
+ "ml-experiment-tracking",
139
+ "data-quality",
140
+ "data-modeling",
141
+ "ai-evaluation"
142
+ ]
143
+ },
100
144
  "security": {
101
145
  "label": "Security Engineer",
102
- "description": "Skills for security audits, dependency/CVE management, blast-radius analysis, and incident handling.",
146
+ "description": "Skills for design-time threat modeling, security audits, dependency/CVE management, blast-radius analysis, and incident handling.",
103
147
  "core": "technical",
104
148
  "skills": [
105
149
  "security-audit",
150
+ "threat-modeling",
151
+ "compliance-privacy",
106
152
  "dependency-management",
107
153
  "dependency-impact-analysis",
108
154
  "incident-response",
@@ -119,6 +165,7 @@
119
165
  "architecture-documentation",
120
166
  "api-design",
121
167
  "data-modeling",
168
+ "code-archaeology",
122
169
  "dependency-impact-analysis",
123
170
  "technical-debt-review",
124
171
  "project-review",
@@ -140,7 +187,9 @@
140
187
  "project-review",
141
188
  "strategic-review",
142
189
  "code-reviewing",
143
- "incident-response"
190
+ "incident-response",
191
+ "release-management",
192
+ "dx-audit"
144
193
  ]
145
194
  },
146
195
  "pm": {
@@ -158,12 +207,14 @@
158
207
  },
159
208
  "strategy": {
160
209
  "label": "Strategy / Founder Review",
161
- "description": "Skills for pre-public and strategic reviews: vision and positioning, market analysis, execution-vs-roadmap, and go/no-go synthesis.",
210
+ "description": "Skills for pre-public and strategic reviews: vision and positioning, market analysis, build-vs-buy decisions, execution-vs-roadmap, and go/no-go synthesis.",
162
211
  "core": "universal",
163
212
  "skills": [
164
213
  "strategic-review",
165
214
  "project-review",
166
215
  "project-proposal",
216
+ "build-vs-buy",
217
+ "finops-cost-optimization",
167
218
  "metrics-and-okrs"
168
219
  ]
169
220
  },
@@ -175,10 +226,24 @@
175
226
  "tdd-workflow",
176
227
  "test-suite-design",
177
228
  "test-data-strategy",
229
+ "browser-verification",
178
230
  "code-reviewing",
179
231
  "bug-investigating"
180
232
  ]
181
233
  },
234
+ "mobile": {
235
+ "label": "Mobile Engineer",
236
+ "description": "Skills for native and cross-platform mobile apps: architecture, offline/sync, UI/UX, accessibility, performance, API contracts, and app-store releases.",
237
+ "core": "technical",
238
+ "skills": [
239
+ "mobile-architecture",
240
+ "mobile-release",
241
+ "ui-ux-design",
242
+ "accessibility-design",
243
+ "performance-optimization",
244
+ "api-design"
245
+ ]
246
+ },
182
247
  "designer": {
183
248
  "label": "Designer / UX",
184
249
  "description": "Skills for user flows, accessibility, product requirements, and the frontend architecture that realizes them.",
@@ -104,10 +104,15 @@ function sortKeysDeep(value) {
104
104
 
105
105
  export function loadSettings(settingsPath) {
106
106
  if (existsSync(settingsPath) && statSync(settingsPath).isFile()) {
107
+ const text = readFileSync(settingsPath, "utf-8");
107
108
  try {
108
- return JSON.parse(readFileSync(settingsPath, "utf-8")) || {};
109
- } catch {
110
- return {};
109
+ return JSON.parse(text) || {};
110
+ } catch (e) {
111
+ // A corrupt (e.g. hand-edited) file must NOT read as empty: downstream
112
+ // writers would rebuild it from {} and silently destroy the user's
113
+ // settings. Throw so callers skip the write (the SessionStart hook
114
+ // catches this and leaves the file alone; the CLI surfaces it).
115
+ throw new Error(`unparseable JSON in ${settingsPath} — fix or remove it (${e.message})`);
111
116
  }
112
117
  }
113
118
  return {};
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: ai-evaluation
3
+ description: "Define how to evaluate ML models and GenAI/LLM apps — golden datasets, offline metrics, RAG evaluation (faithfulness, relevance, context precision/recall) with ragas/deepeval/promptfoo, LLM-as-judge design and calibration, eval regression gates in CI, online A/B and human feedback. Logging/comparing runs → ml-experiment-tracking; building the app → llm-app-engineering; general experiment statistics → statistical-analysis."
4
+ when_to_use: "Triggers: evaluate the model, eval my chatbot, RAG evals, ragas, LLM as judge, golden dataset, eval suite, is the new prompt better, hallucination rate, benchmark our AI app."
5
+ model: sonnet
6
+ allowed-tools: Read, Grep, Glob, Write, Edit, Bash
7
+ ---
8
+
9
+ # AI Evaluation
10
+
11
+ Define **what to measure and how** for ML models and GenAI apps. Without an
12
+ evaluation harness, every prompt tweak, retrieval change, or model swap ships on
13
+ vibes — and quality silently regresses. The boundary with its neighbors:
14
+ `ml-experiment-tracking` *records and compares* runs; this skill *defines the
15
+ metrics, datasets, and judges* those runs report. `llm-app-engineering` designs
16
+ the app; this skill proves whether a change to it helped.
17
+
18
+ ## Workflow
19
+
20
+ ### Step 1: Pin Down What "Good" Means
21
+
22
+ Before choosing tools, write down 3–5 quality criteria in the product's terms
23
+ (answers grounded in our docs, no fabricated order numbers, resolves the ticket).
24
+ Vague goals ("high quality answers") make every later step unmeasurable. Decide
25
+ the primary metric — the one that decides ship/no-ship — before seeing results,
26
+ to avoid cherry-picking.
27
+
28
+ ### Step 2: Build a Golden Dataset
29
+
30
+ Evaluate against a fixed, versioned dataset — not ad-hoc spot checks:
31
+
32
+ - **Source**: real user questions (logs, support tickets) first; synthesize from
33
+ the corpus only to fill gaps, and have a human review synthetic cases.
34
+ - **Size**: 30–50 cases is enough to start; grow with every production failure
35
+ (each becomes a regression case — same principle as a bug's regression test).
36
+ - **Coverage**: include the unhappy paths — questions the corpus can't answer
37
+ (the correct behavior is refusal), ambiguous phrasing, adversarial inputs.
38
+ - **Version it** alongside the code; a metric is only comparable across runs on
39
+ the same dataset version.
40
+
41
+ With zero labeled data, this is still not optional — bootstrap: label a few dozen
42
+ cases by hand (an afternoon), use reference-free metrics (groundedness against
43
+ the source, rubric-based judging) while the labeled set grows.
44
+
45
+ ### Step 3: Choose Metrics by System Type
46
+
47
+ - **Classical ML models**: standard offline metrics vs held-out data (accuracy,
48
+ F1, RMSE, AUC), sliced by segment — aggregate numbers hide subgroup failures.
49
+ - **RAG systems** — score the stages separately, or you can't tell whether a bad
50
+ answer is a retrieval or a generation failure:
51
+ - *Retrieval*: context precision / context recall (did the right chunks come back?)
52
+ - *Generation*: faithfulness/groundedness (is every claim supported by the
53
+ retrieved context?) and answer relevance (does it address the question?)
54
+ - **Agents**: end-to-end task success rate plus trajectory checks (right tool,
55
+ no loops, steps within budget).
56
+ - **Reference-free** (no ground truth): groundedness against the source,
57
+ rubric-based judge scores, and pairwise A-vs-B comparison between variants.
58
+
59
+ Pick **one** eval tool and wire it in — ragas (RAG metrics), deepeval
60
+ (pytest-style, broad metric set), or promptfoo (config-driven prompt/model
61
+ comparison). Selection detail: [references/eval-tooling.md](references/eval-tooling.md).
62
+
63
+ ### Step 4: Design the Judge Deliberately
64
+
65
+ LLM-as-judge is the workhorse for GenAI evals, and an uncalibrated judge is a
66
+ random-number generator with authority. Treat the judge as a component you
67
+ design and validate:
68
+
69
+ - **Rubric, not vibes**: decompose "good" into the Step-1 criteria, each scored
70
+ separately with a binary or 3-point scale — never a bare 1–10 overall score.
71
+ - **Known biases, known counters**: position bias (swap A/B order and re-judge),
72
+ self-preference (judge with a different model family than the one being
73
+ judged), verbosity bias (instruct the judge to ignore length; cap output length).
74
+ - **Reduce noise**: majority-of-k voting for important comparisons.
75
+ - **Calibrate**: score 20–30 cases with both the judge and a human; if agreement
76
+ is poor, fix the rubric before trusting any judge-derived number.
77
+
78
+ ### Step 5: Gate Changes in CI
79
+
80
+ An eval suite that runs once before launch rots immediately. Run it on every
81
+ change to prompts, retrieval, or model version — like a test suite:
82
+
83
+ - Gate on **regression vs the last accepted baseline** (metric dropped), not an
84
+ absolute threshold — absolute judge scores drift; movement is the signal.
85
+ - Keep the CI subset small and fast (the golden set, k=1); run the full suite
86
+ nightly or pre-release with voting.
87
+ - Log eval runs in the experiment tracker (`ml-experiment-tracking`) so results
88
+ are comparable over time.
89
+
90
+ ### Step 6: Close the Loop Online
91
+
92
+ Offline evals predict; production confirms. Once users exist: lightweight
93
+ feedback (thumbs up/down + optional reason), A/B test significant changes on the
94
+ primary metric, and mine failures — every confirmed production failure becomes a
95
+ new golden-set case (Step 2).
96
+
97
+ ## Principles Applied
98
+
99
+ - **YAGNI**: 30 golden cases + one tool + one judge rubric beats a
100
+ six-metric dashboard nobody trusts. Add metrics when a decision needs them.
101
+ - **KISS**: prefer binary per-criterion judgments over fine-grained scales —
102
+ humans and judges both agree more on yes/no.
103
+ - **Measure movement, not absolutes**: judge scores are comparable only within
104
+ the same dataset + rubric + judge version; gate on deltas.
105
+
106
+ ## Cross-Skill References
107
+
108
+ - `llm-app-engineering` — designing the system this skill measures
109
+ - `ml-experiment-tracking` — recording and comparing the eval runs over time
110
+ - `ml-model-deployment` — online monitoring and drift detection in production
111
+ - `cicd-pipeline` — wiring the eval gate into CI
112
+ - `metrics-and-okrs` — tying eval metrics to product-level success metrics
@@ -0,0 +1,40 @@
1
+ {
2
+ "skill_name": "ai-evaluation",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "We've built a RAG chatbot over our internal docs and we're planning to launch in two weeks. How should we evaluate it before launch? Someone on the team mentioned ragas.",
7
+ "expected_output": "Designs an evaluation plan: a golden dataset grounded in real user questions, the RAG triad (faithfulness, answer relevance, context precision/recall) separating retrieval from generation metrics, a concrete tool choice (ragas/deepeval/promptfoo) with rationale, LLM-as-judge reliability measures, and the eval suite wired in as a regression gate rather than a one-off check",
8
+ "assertions": [
9
+ "Proposes building a golden/evaluation dataset grounded in real user questions or the docs, rather than evaluating ad hoc",
10
+ "Covers the RAG triad or equivalent — faithfulness/groundedness, answer relevance, and retrieval/context quality — and distinguishes retrieval metrics from generation metrics",
11
+ "Recommends a concrete evaluation tool (ragas, deepeval, or promptfoo) and explains its role",
12
+ "Addresses LLM-as-judge reliability with at least one concrete measure: rubric design, position/self-preference bias, majority voting, or calibrating the judge against human spot-checks",
13
+ "Proposes running the evals as a repeatable regression gate (in CI or before each prompt/pipeline change), not only as a one-off pre-launch check"
14
+ ]
15
+ },
16
+ {
17
+ "id": 2,
18
+ "prompt": "Our LLM feature summarizes long sales calls. We have no ground-truth summaries and no users yet. How do we evaluate quality with zero labeled data?",
19
+ "expected_output": "Does not treat missing labels as a blocker: proposes reference-free evaluation (rubric-based LLM-as-judge, groundedness against the source call, pairwise comparison between variants), bootstraps a small human-labeled golden set, calibrates the judge against human spot-checks, and plans online signals (feedback, A/B) once users exist",
20
+ "assertions": [
21
+ "Does not claim evaluation is impossible without labels — proposes reference-free approaches such as rubric-based LLM-as-judge, groundedness against the source transcript, or pairwise comparison between variants",
22
+ "Recommends bootstrapping a small human-labeled golden set (even tens of examples) and explains what it buys",
23
+ "Designs the judge with an explicit rubric or criteria decomposition rather than a bare overall score",
24
+ "Mentions checking the judge against human spot-checks (calibration/agreement) or using voting to reduce judge noise",
25
+ "Plans for online signals after launch (user feedback, A/B testing) as a complement to offline evals"
26
+ ]
27
+ },
28
+ {
29
+ "id": 3,
30
+ "prompt": "Set up MLflow for our fine-tuning experiments so we can log runs and compare hyperparameters across the team.",
31
+ "expected_output": "Recognizes this as experiment-tracking infrastructure, not evaluation design — hands off to ml-experiment-tracking for the MLflow setup and run comparison, noting the boundary: tracking records and compares runs, while ai-evaluation defines what and how to measure",
32
+ "assertions": [
33
+ "Recognizes the request is about experiment-tracking/run-comparison infrastructure, not about defining evaluation metrics or datasets",
34
+ "Refers to the ml-experiment-tracking skill for the MLflow setup and run comparison",
35
+ "Does not produce an evaluation-design workflow (golden datasets, judges, RAG metrics) as the answer to a tracking-infrastructure request",
36
+ "States the boundary: tracking records and compares runs, while evaluation design defines what and how to measure"
37
+ ]
38
+ }
39
+ ]
40
+ }
@@ -0,0 +1,63 @@
1
+ # Evaluation Tooling — Selection and Judge-Design Detail
2
+
3
+ Tool landscapes move fast; verify against each project's current docs before
4
+ committing. What follows is the decision logic, which is stable.
5
+
6
+ ## Choosing the eval tool
7
+
8
+ Pick **one** primary tool. They overlap heavily; running two means maintaining
9
+ two golden-set formats and two CI integrations for no added signal.
10
+
11
+ | Tool | Shape | Choose when |
12
+ |---|---|---|
13
+ | **ragas** | Python library of RAG-specific metrics (faithfulness, answer relevancy, context precision/recall, noise sensitivity) | The system is RAG and you want the standard names for the RAG triad with minimal ceremony. Integrates with LangChain/LlamaIndex datasets. |
14
+ | **deepeval** | pytest-style framework — metrics as assertions, `assert_test(test_case, [metric])` | The team already lives in pytest and wants evals in the same runner and CI report as unit tests. Broad metric set (RAG triad, hallucination, bias, custom G-Eval rubrics). |
15
+ | **promptfoo** | Config-driven (YAML) prompt/model comparison matrix + web viewer, CLI-first | The main activity is comparing prompt variants or models side-by-side; also does red-teaming. Good for non-Python stacks (Node CLI). |
16
+ | **Roll your own** | A loop + a judge prompt + a JSON of cases | The metrics are product-specific rubrics anyway and a framework would only wrap your judge calls. Fine — the golden set and calibration discipline matter more than the harness. |
17
+
18
+ Platform suites (LangSmith, Langfuse, Braintrust, W&B Weave) bundle eval +
19
+ tracing + datasets; prefer them when the team already uses that platform for
20
+ observability — the dataset/annotation UI is the real value.
21
+
22
+ ## RAG metric cheat sheet
23
+
24
+ | Failure you saw | Stage | Metric to add |
25
+ |---|---|---|
26
+ | Answer cites facts not in the docs | Generation | Faithfulness / groundedness |
27
+ | Answer is on-topic-ish but doesn't answer | Generation | Answer relevance |
28
+ | Right doc exists but wasn't retrieved | Retrieval | Context recall |
29
+ | Retrieved chunks are mostly padding | Retrieval | Context precision |
30
+ | Correct refusal expected, model answered anyway | Both | Unanswerable-set accuracy |
31
+
32
+ Debug order: retrieval metrics first. Generation metrics computed over bad
33
+ context are noise — fix recall before tuning prompts.
34
+
35
+ ## LLM-as-judge bias catalog
36
+
37
+ | Bias | Symptom | Counter |
38
+ |---|---|---|
39
+ | Position | Prefers whichever answer is shown first | Randomize/swap order, judge twice, keep only consistent verdicts |
40
+ | Self-preference | Rates its own model family's style higher | Judge with a different model family than the generator |
41
+ | Verbosity | Longer answer wins regardless of substance | Instruct explicitly; normalize or cap lengths; per-criterion rubric |
42
+ | Sycophancy toward the prompt | Scores what the question implies is right | Hide metadata (which variant is "new"); blind the judge |
43
+ | Scale drift | 7/10 today ≠ 7/10 next month | Binary/3-point criteria; compare deltas on the same rubric version |
44
+
45
+ ## Judge calibration procedure
46
+
47
+ 1. Sample 20–30 golden cases; have a human score them with the same rubric.
48
+ 2. Run the judge on the same cases (k=3 voting).
49
+ 3. Compute simple agreement (percent match per criterion). Below ~80%: the
50
+ rubric is ambiguous — tighten criteria wording, add anchored examples
51
+ (a passing and a failing answer per criterion), re-run.
52
+ 4. Re-calibrate whenever the rubric, judge model, or task distribution changes.
53
+
54
+ ## Online evaluation notes
55
+
56
+ - **A/B tests**: randomize per user (not per request) for conversational
57
+ products; pick the primary metric before launch; expect judge-metric ↔
58
+ user-metric divergence and investigate it — it usually means the rubric is
59
+ measuring the wrong thing.
60
+ - **Human feedback**: thumbs up/down rates are biased (angry users click more);
61
+ use as a trend signal and a failure-mining source, not an absolute score.
62
+ - **Failure mining**: a weekly pass over flagged conversations feeding the
63
+ golden set is the highest-ROI eval activity that exists.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: architecture-design
3
- description: "Guide architectural and structural decisions using Architecture Decision Records (ADRs) — new services, pattern choices, database selection, component boundaries, state management, costly-to-reverse decisions. Triggers: how should I architect, which pattern, design decision, should I use X or Y, system design, ADR, component design, architectural trade-off."
3
+ description: "Guide architectural and structural decisions using Architecture Decision Records (ADRs) — new services, pattern choices, database selection, component boundaries, state management, costly-to-reverse decisions. Triggers: how should I architect, which pattern, design decision, should I use X or Y, system design, ADR, component design, architectural trade-off. Owns internal-structure decisions — build vs buy/adopt a vendor or OSS capability → build-vs-buy."
4
4
  model: opus
5
5
  allowed-tools: Read, Grep, Glob, Write, Edit
6
6
  ---
@@ -78,6 +78,8 @@ ADRs are immutable records. If a decision is superseded, create a new ADR that r
78
78
 
79
79
  For visual architecture documentation (system diagrams, runtime flows, infrastructure topology), see the `architecture-documentation` skill.
80
80
 
81
+ When the decision is whether a capability should be built at all versus bought or adopted (vendor/SaaS/OSS, TCO, lock-in, exit costs), use `build-vs-buy` — it produces the same ADR-style record, but for sourcing rather than structure.
82
+
81
83
  ## When to Split Decisions
82
84
 
83
85
  If the analysis reveals multiple independent decisions bundled together, split them into separate ADRs. For example, "How should we handle caching?" might split into:
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "Facilitate divergent ideation before committing to a spec — Socratic questioning, widening the option space, challenging assumptions and inherited constraints, then converging on candidates. Triggers: brainstorm, let's explore ideas, what are our options, help me think through, generate ideas, what could we build, not sure what I want, explore approaches, ideate. Once ideas converge, hand off to prd-writing (WHAT/WHY) or feature-planning (breakdown) — this skill opens options; those close them."
4
+ model: sonnet
5
+ allowed-tools: Read, Grep, Glob, Write, Edit
6
+ ---
7
+
8
+ # Brainstorming
9
+
10
+ Divergent exploration *before* convergent specification. The most expensive
11
+ failure in product work is efficiently building the wrong thing — this skill
12
+ exists to widen the option space and test the framing before anything gets
13
+ specced. It sits upstream of `prd-writing` and `feature-planning`: they converge
14
+ on one answer; this skill makes sure the right answers were on the table first.
15
+
16
+ The mode is **Socratic**: the user's tacit knowledge of their domain beats any
17
+ generated list. Ask questions that surface it; generate to provoke, not to
18
+ replace their thinking.
19
+
20
+ ## Workflow
21
+
22
+ ### Step 1: Frame the Real Problem
23
+
24
+ Before generating anything, ask: what problem, for whom, why now, and what would
25
+ "solved" look like? Then challenge the framing — the stated problem is often a
26
+ solution in disguise ("we need a dashboard" usually means "someone can't answer
27
+ a question"). Ask "what does that get you?" until you hit the underlying need.
28
+ If the user arrives with a solution already chosen, brainstorm the *problem
29
+ behind it* before brainstorming within it.
30
+
31
+ ### Step 2: Separate Real Constraints from Inherited Ones
32
+
33
+ List the constraints, then interrogate each: is it physics/budget/law (real), or
34
+ habit/assumption/"we've always done it this way" (inherited)? Explicitly mark
35
+ which are negotiable. Most breakthrough options live behind a constraint that
36
+ turned out to be assumed.
37
+
38
+ ### Step 3: Diverge — Quantity First, Judgment Deferred
39
+
40
+ Generate broadly, and do not evaluate mid-generation — criticism during
41
+ divergence kills the unusual options that make the exercise worthwhile. Mix
42
+ techniques rather than exhausting one:
43
+
44
+ - **Vary the axes**: who else could this serve, what adjacent problem does it
45
+ solve, how else could it be delivered, when/where else does it apply?
46
+ - **Invert**: how would we guarantee this fails? Each failure mode implies an option.
47
+ - **Analogize**: how do other domains solve the structural equivalent?
48
+ - **Recombine**: force-pair two existing ideas or systems.
49
+
50
+ Alternate generating with asking — offer a batch, then ask a question that
51
+ mines the user's context for the next batch.
52
+
53
+ ### Step 4: Widen Once More (the Wildcards)
54
+
55
+ Before converging, deliberately add the options nobody proposes on their own:
56
+ the **do-nothing / process-change** option (no build at all), the **1/10-scope**
57
+ version (what's the smallest thing that dents the problem?), the **10x**
58
+ version (what if this were the company's main bet?), and the
59
+ **buy-instead-of-build** option (delegate that comparison to `build-vs-buy` if
60
+ it becomes a contender).
61
+
62
+ ### Step 5: Converge with Explicit Criteria
63
+
64
+ Cluster related ideas, then name the selection criteria *before* scoring
65
+ (typical set: impact, effort, reversibility, confidence) — criteria chosen after
66
+ seeing favorites just rationalize them. Score roughly, pick 1–3 candidates, and
67
+ keep the rest in a **parking lot** with a one-line reason each — parked, not
68
+ deleted; today's reject is next quarter's answer.
69
+
70
+ ### Step 6: Hand Off
71
+
72
+ Write a one-paragraph brief per surviving candidate (problem, idea, why it won,
73
+ open questions) and route it onward: `prd-writing` for requirements,
74
+ `feature-planning` for task breakdown, `project-proposal` for a business case,
75
+ `architecture-design` if the open questions are structural.
76
+
77
+ ## Principles Applied
78
+
79
+ - **Defer judgment during divergence; be ruthless during convergence** — mixing
80
+ the modes does both badly.
81
+ - **Ask > tell**: a question that unlocks the user's knowledge outperforms ten
82
+ generated ideas.
83
+ - **YAGNI applies at convergence, not divergence** — generating a wild option
84
+ costs a line; building it is what needs justification.
85
+
86
+ ## Cross-Skill References
87
+
88
+ - `prd-writing` — turn the winning idea into WHAT/WHY requirements
89
+ - `feature-planning` — break the chosen idea into scoped tasks
90
+ - `project-proposal` — wrap a candidate in a business case for a go/no-go
91
+ - `build-vs-buy` — when a candidate could be bought or adopted instead of built
92
+ - `architecture-design` — when the surviving questions are structural
@@ -0,0 +1,40 @@
1
+ {
2
+ "skill_name": "brainstorming",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "We want to improve developer onboarding at our company — new hires take about two months to ship their first meaningful change. I'm not sure where to start. Can we brainstorm?",
7
+ "expected_output": "Runs a Socratic divergent session: probes the problem first (where the two months actually go, for whom, what 'onboarded' means), separates real from inherited constraints, generates a broad and varied option set without evaluating mid-stream, deliberately includes wildcards (do-nothing/process-change, tiny-scope, buy-instead-of-build), then converges with named criteria and hands the 1–3 survivors to prd-writing or feature-planning with a parking lot for the rest",
8
+ "assertions": [
9
+ "Asks clarifying/Socratic questions about the underlying problem (where the time goes, for whom, what success looks like) before or while generating ideas, rather than immediately listing solutions",
10
+ "Generates a genuinely diverse option set spanning different kinds of interventions (e.g. docs, tooling, process, people/mentoring), not variations of a single idea",
11
+ "Does not evaluate, score, or eliminate ideas during the divergent generation phase",
12
+ "Includes at least one wildcard option such as a no-build/process change, a radically smaller-scope version, or buying/adopting instead of building",
13
+ "Converges using explicitly named selection criteria (e.g. impact, effort, reversibility) and identifies 1–3 candidates plus a parking lot, with a handoff toward prd-writing, feature-planning, or project-proposal"
14
+ ]
15
+ },
16
+ {
17
+ "id": 2,
18
+ "prompt": "I've decided we need to build a custom internal chat app for our 40-person company. Let's brainstorm features for it.",
19
+ "expected_output": "Widens before narrowing: probes the problem behind the already-chosen solution (what's failing with current communication, why existing tools don't fit), surfaces that 'build a custom chat app' is a solution not a problem, raises alternatives including buying/adopting existing tools (routing a serious buy-vs-build comparison to build-vs-buy), distinguishes real from assumed constraints — and still delivers the requested feature ideation rather than refusing or lecturing",
20
+ "assertions": [
21
+ "Probes the problem behind the chosen solution (what communication need is unmet, why existing tools fall short) instead of only listing features",
22
+ "Surfaces at least one alternative to building a custom chat app, such as adopting or configuring an existing tool, and mentions build-vs-buy for that comparison",
23
+ "Questions or tests the constraints/assumptions behind the decision (e.g. why custom, why now) and distinguishes real constraints from inherited ones",
24
+ "Still provides the requested divergent feature ideation for the chat app rather than refusing to engage with the user's framing",
25
+ "Does not converge on a final feature list without naming selection criteria first"
26
+ ]
27
+ },
28
+ {
29
+ "id": 3,
30
+ "prompt": "We've settled on building a CLI tool that syncs our design tokens to code. Break it into tasks with acceptance criteria and dependencies so the team can start next sprint.",
31
+ "expected_output": "Recognizes that ideation is complete and the user is asking for convergent task breakdown — refers to feature-planning for the scoped tasks, acceptance criteria, and dependency mapping rather than reopening divergent exploration",
32
+ "assertions": [
33
+ "Recognizes the request as convergent planning of an already-chosen idea, not ideation",
34
+ "Refers to the feature-planning skill for the task breakdown, acceptance criteria, and dependencies",
35
+ "Does not restart divergent idea generation or question the settled decision as the main response",
36
+ "States or implies the boundary: brainstorming opens the option space before a decision; feature-planning structures the work after it"
37
+ ]
38
+ }
39
+ ]
40
+ }
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: browser-verification
3
+ description: "Verify a web app change by driving the real UI in a browser — reproduce the user flow end to end, watch console errors and network failures, exercise loading/error/empty states, capture screenshots as evidence. Use before claiming a UI change works. Triggers: check it in the browser, verify the UI, click through the flow, console errors, test it like a user, smoke test the frontend. Designing persistent test suites → test-suite-design; the generic done-gate → verification-before-completion (this is its browser-specific practice)."
4
+ model: sonnet
5
+ allowed-tools: Read, Grep, Glob, Write, Edit, Bash
6
+ ---
7
+
8
+ # Browser Verification
9
+
10
+ Prove a web change works by *being the user*, not by reading the diff. Passing
11
+ unit tests and a clean build say the code is consistent with itself — they say
12
+ nothing about the page actually rendering, the handler actually firing, or the
13
+ API call actually succeeding with real wiring. This skill is the
14
+ browser-specific practice of `verification-before-completion`: the claim "the
15
+ UI works" requires having driven the UI, in this session, with the evidence
16
+ captured. Boundary: `test-suite-design` builds *persistent* automated suites;
17
+ this skill is the verification pass you run on the change in front of you
18
+ (what it finds often becomes a suite case afterward).
19
+
20
+ ## Workflow
21
+
22
+ ### Step 1: Define the Flow That Proves the Change
23
+
24
+ Name the user-visible behavior the change promises ("submitting the form shows
25
+ the success toast and the new record appears in the list") and the shortest
26
+ real path to it. That flow — not "the page loads" — is what verification means.
27
+ Include what should *stop* happening for bug fixes (the old broken behavior,
28
+ reproduced first if possible).
29
+
30
+ ### Step 2: Run the Real App in a Realistic State
31
+
32
+ Launch the actual stack the change ships in (dev server + backend + seeded
33
+ data), not a mental model of it. State matters: an empty database hides list
34
+ rendering bugs; a logged-out session hides authz redirects. Seed what the flow
35
+ needs — including a user in the right role.
36
+
37
+ ### Step 3: Drive the Flow Like a User
38
+
39
+ Automate the drive with a browser tool (Playwright or the environment's
40
+ browser automation) or click it manually — but *interact*: navigate, type into
41
+ the fields, submit, wait for the response, observe the outcome. Prefer
42
+ selectors a user would recognize (roles, labels, text) over brittle internals.
43
+ Loading a URL and seeing HTTP 200 is not driving the flow — most UI bugs live
44
+ after first paint.
45
+
46
+ ### Step 4: Watch All Three Evidence Channels
47
+
48
+ The page can *look* right while failing. During the drive, check:
49
+
50
+ - **Console** — errors and warnings that fired during the flow (a caught-and-
51
+ swallowed error today is the un-reproducible bug report next week).
52
+ - **Network** — the requests the flow triggered: right endpoints, right
53
+ payloads, right status codes; no 4xx/5xx, no CORS failures, no retry loops.
54
+ - **UI state** — the visible outcome: content correct, no layout collapse, no
55
+ infinite spinner masquerading as "loading".
56
+
57
+ ### Step 5: Exercise Beyond the Happy Path
58
+
59
+ The states users hit that developers don't: **error** (kill the backend or
60
+ force a 500 — does the UI degrade or white-screen?), **empty** (zero items),
61
+ **loading** (throttle and look — flicker? layout shift?), **repeat actions**
62
+ (double-submit, back button, refresh mid-flow), and at least one non-desktop
63
+ viewport if the change touches layout. Scope to what the change plausibly
64
+ affects — a copy tweak doesn't need the full matrix; a checkout-flow change
65
+ does. (`ui-ux-design` owns designing these states; this skill verifies them.)
66
+
67
+ ### Step 6: Capture Evidence and Report Precisely
68
+
69
+ Screenshot the key outcomes (success state, plus anything broken), keep the
70
+ console/network findings, and report in evidence terms: "drove signup →
71
+ dashboard with a fresh user; form validates, POST /users returns 201, toast
72
+ renders, zero console errors — screenshot attached" beats "the UI works".
73
+ Anything found but not fixed is reported, not silently absorbed. If the flow
74
+ proved valuable to verify, feed it to `test-suite-design` as a candidate e2e
75
+ case so next time it verifies itself.
76
+
77
+ ## Principles Applied
78
+
79
+ - **The rendered page is the truth**: code review and unit tests approximate
80
+ it; only the browser confirms it.
81
+ - **Interaction over inspection**: most UI bugs are reachable only by doing
82
+ what a user does, in order.
83
+ - **Evidence, not impressions**: a screenshot with zero console errors is a
84
+ verification; "looked fine" is a mood.
85
+
86
+ ## Cross-Skill References
87
+
88
+ - `verification-before-completion` — the generic evidence gate this skill
89
+ instantiates for web UIs
90
+ - `test-suite-design` — turning one-off verification flows into persistent e2e coverage
91
+ - `ui-ux-design` — designing the loading/error/empty states verified here
92
+ - `accessibility-design` — the deeper a11y pass when the change touches
93
+ interaction patterns
94
+ - `bug-investigating` — when verification finds something broken and the cause
95
+ isn't obvious