@dzhechkov/keysarium 1.0.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/README.md +289 -0
- package/bin/cli.js +5 -0
- package/package.json +43 -0
- package/src/cli.js +157 -0
- package/src/commands/doctor.js +469 -0
- package/src/commands/init.js +171 -0
- package/src/commands/list.js +147 -0
- package/src/commands/remove.js +197 -0
- package/src/commands/update.js +191 -0
- package/src/utils.js +274 -0
- package/templates/.claude/agents/cjm-variant-worker.md +60 -0
- package/templates/.claude/agents/discovery-worker.md +45 -0
- package/templates/.claude/agents/parallel-research-orchestrator.md +70 -0
- package/templates/.claude/agents/presentation-worker.md +55 -0
- package/templates/.claude/agents/research-worker.md +43 -0
- package/templates/.claude/commands/architecture-phase.md +37 -0
- package/templates/.claude/commands/casarium.md +163 -0
- package/templates/.claude/commands/cjm-prototype.md +42 -0
- package/templates/.claude/commands/discovery.md +34 -0
- package/templates/.claude/commands/explore-case.md +22 -0
- package/templates/.claude/commands/harvest.md +67 -0
- package/templates/.claude/commands/new-research.md +69 -0
- package/templates/.claude/commands/parallel-research.md +45 -0
- package/templates/.claude/commands/presentation.md +49 -0
- package/templates/.claude/commands/research.md +32 -0
- package/templates/.claude/commands/solve.md +36 -0
- package/templates/.claude/rules/agent-swarm.md +31 -0
- package/templates/.claude/rules/anti-patterns.md +19 -0
- package/templates/.claude/rules/checkpoint-protocol.md +23 -0
- package/templates/.claude/rules/domain-specific.md +32 -0
- package/templates/.claude/rules/file-conventions.md +38 -0
- package/templates/.claude/rules/modular-reuse.md +35 -0
- package/templates/.claude/rules/research-quality.md +20 -0
- package/templates/.claude/settings.json +37 -0
- package/templates/.claude/skills/explore/SKILL.md +215 -0
- package/templates/.claude/skills/explore/references/questioning-techniques.md +151 -0
- package/templates/.claude/skills/explore/references/task-brief-templates.md +355 -0
- package/templates/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/templates/.claude/skills/frontend-design/SKILL.md +42 -0
- package/templates/.claude/skills/goap-research-ed25519/SKILL.md +415 -0
- package/templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md +658 -0
- package/templates/.claude/skills/goap-research-ed25519/references/research-actions.md +544 -0
- package/templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md +560 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +662 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +720 -0
- package/templates/.claude/skills/presentation-storyteller/SKILL.md +371 -0
- package/templates/.claude/skills/presentation-storyteller/references/example-presentation.md +273 -0
- package/templates/.claude/skills/presentation-storyteller/references/slide-types.md +426 -0
- package/templates/.claude/skills/presentation-storyteller/references/sources-index-template.md +213 -0
- package/templates/.claude/skills/presentation-storyteller/references/speaker-script-patterns.md +324 -0
- package/templates/.claude/skills/presentation-storyteller/references/storytelling-frameworks.md +270 -0
- package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +562 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/SKILL.md +194 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-cjm-example.md +100 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-module1-example.md +88 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/01-intelligence.md +328 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/02-product-customers.md +221 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/025-cjm-prototype.md +206 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/03-market-competition.md +402 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/04-business-finance.md +287 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/05-growth-engine.md +290 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/06-playbook-synthesis.md +286 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/blue-ocean-canvas.md +39 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/industry-benchmarks.md +67 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/jtbd-canvas.md +48 -0
- package/templates/CLAUDE.md +185 -0
- package/templates/TOOLKIT_HARVEST.md +29 -0
- package/templates/docs/keysarium/01-deployment-guide.md +768 -0
- package/templates/docs/keysarium/02-admin-guide.md +1170 -0
- package/templates/docs/keysarium/03-user-guide.md +884 -0
- package/templates/docs/keysarium/04-infrastructure-requirements.md +967 -0
- package/templates/docs/keysarium/05-architecture.md +706 -0
- package/templates/docs/keysarium/06-user-flows.md +925 -0
- package/templates/docs/skills-bto/01-deployment-guide.md +828 -0
- package/templates/docs/skills-bto/02-admin-guide.md +1052 -0
- package/templates/docs/skills-bto/03-user-guide.md +960 -0
- package/templates/docs/skills-bto/04-infrastructure-requirements.md +610 -0
- package/templates/docs/skills-bto/05-architecture.md +1112 -0
- package/templates/docs/skills-bto/06-user-flows.md +977 -0
- package/templates/lib/agent-patterns.md +115 -0
- package/templates/lib/domain-templates.md +172 -0
- package/templates/lib/phase-utils.md +107 -0
- package/templates/lib/skill-loader.md +78 -0
- package/templates/researches/.gitkeep +0 -0
|
@@ -0,0 +1,960 @@
|
|
|
1
|
+
# BTO User Guide — @dzhechko/skills-bto
|
|
2
|
+
|
|
3
|
+
This guide covers everything you need to use the BTO (Build-Test-Optimize) skill pack for Claude Code. It is intended for developers and prompt engineers who want to create, evaluate, and iteratively improve Claude Code artifacts — skills, commands, rules, and agent templates.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
1. [Quick Start (5 minutes)](#1-quick-start-5-minutes)
|
|
10
|
+
2. [Building Artifacts with /bto-build](#2-building-artifacts-with-bto-build)
|
|
11
|
+
3. [Testing Artifacts with /bto-test](#3-testing-artifacts-with-bto-test)
|
|
12
|
+
4. [Optimizing Artifacts with /bto-optimize](#4-optimizing-artifacts-with-bto-optimize)
|
|
13
|
+
5. [Full BTO Pipeline with /bto](#5-full-bto-pipeline-with-bto)
|
|
14
|
+
6. [Working with Judge Panels](#6-working-with-judge-panels)
|
|
15
|
+
7. [Common Scenarios](#7-common-scenarios)
|
|
16
|
+
8. [Tips and Best Practices](#8-tips-and-best-practices)
|
|
17
|
+
9. [FAQ and Troubleshooting](#9-faq-and-troubleshooting)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. Quick Start (5 minutes)
|
|
22
|
+
|
|
23
|
+
BTO gives you four commands. Each can be used independently or together as a pipeline.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
/bto-build [description] — Generate a new skill, command, rule, or agent template
|
|
27
|
+
/bto-test [path] — Evaluate an existing artifact through layered quality gates
|
|
28
|
+
/bto-optimize [path] — Improve an artifact through evolutionary optimization
|
|
29
|
+
/bto [path or description] — Full pipeline: BUILD → TEST → OPTIMIZE
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Your first BTO run
|
|
33
|
+
|
|
34
|
+
The fastest way to see BTO in action is to test an artifact you already have:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
/bto-test .claude/skills/my-skill/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
You will see a three-stage report appear in your terminal:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
LAYER 0 PRE-FLIGHT CHECK
|
|
45
|
+
Artifact: my-skill (skill)
|
|
46
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
47
|
+
Universal checks: 11 / 12
|
|
48
|
+
Type-specific checks: 15 / 16
|
|
49
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
50
|
+
TOTAL: 26 / 28
|
|
51
|
+
Pass rate: 93%
|
|
52
|
+
Status: PASS
|
|
53
|
+
|
|
54
|
+
Failed checks:
|
|
55
|
+
- [SK-10] Empty examples directory *
|
|
56
|
+
|
|
57
|
+
Verdict: PROCEED TO LAYER 1
|
|
58
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Layer 1 (haiku) runs next — a quick semantic check — followed by the full judge panel in Layer 2.
|
|
62
|
+
|
|
63
|
+
### What BTO evaluates
|
|
64
|
+
|
|
65
|
+
BTO works on any of these artifact types:
|
|
66
|
+
|
|
67
|
+
| Type | Path Pattern | Example |
|
|
68
|
+
|------|-------------|---------|
|
|
69
|
+
| Skill | `.claude/skills/<name>/` | `.claude/skills/my-researcher/` |
|
|
70
|
+
| Command | `.claude/commands/<name>.md` | `.claude/commands/summarize.md` |
|
|
71
|
+
| Rule | `.claude/rules/<name>.md` | `.claude/rules/no-vague-claims.md` |
|
|
72
|
+
| Agent template | `.claude/agents/<name>.md` | `.claude/agents/domain-expert.md` |
|
|
73
|
+
| Research artifact | `researches/**/*.md` | `researches/bank_case/02_research_findings.md` |
|
|
74
|
+
|
|
75
|
+
BTO auto-detects the type from the path. You do not need to specify it.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 2. Building Artifacts with /bto-build
|
|
80
|
+
|
|
81
|
+
The BUILD module generates production-quality Claude Code artifacts from natural language descriptions. It handles all the structural conventions, template selection, and self-review so you do not have to.
|
|
82
|
+
|
|
83
|
+
### Basic usage
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
/bto-build [description]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Examples:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
/bto-build a skill that summarizes long research documents into executive briefings
|
|
93
|
+
|
|
94
|
+
/bto-build slash command /weekly-report that generates a markdown status report from git log
|
|
95
|
+
|
|
96
|
+
/bto-build rule file for detecting and fixing vague metric claims (no baselines or targets)
|
|
97
|
+
|
|
98
|
+
/bto-build agent template for a domain expert judge evaluating healthcare AI proposals
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Build modes: QUICK vs DEEP
|
|
102
|
+
|
|
103
|
+
BTO BUILD operates in one of two modes depending on how well-specified your description is.
|
|
104
|
+
|
|
105
|
+
**QUICK mode** — used when the description is clear and self-contained. The agent parses it directly and proceeds to generation. Typical time: 2 minutes.
|
|
106
|
+
|
|
107
|
+
**DEEP mode** — used when requirements are ambiguous or the artifact is complex. The agent loads the `explore` skill and asks you a structured set of clarifying questions before generating. Typical time: 5 minutes.
|
|
108
|
+
|
|
109
|
+
DEEP mode is triggered automatically when the description is short (fewer than 15 words), contains conflicting signals, or involves multiple unfamiliar domain constraints. You can also force it:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
/bto-build --mode deep a skill for compliance checking
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
In DEEP mode you will be asked questions such as:
|
|
116
|
+
|
|
117
|
+
- What artifact type should this be? (skill / command / rule / agent)
|
|
118
|
+
- What domain does this operate in? (banking, retail, healthcare, general)
|
|
119
|
+
- What are the inputs and expected outputs?
|
|
120
|
+
- What quality criteria matter most?
|
|
121
|
+
- Are there any existing artifacts to use as reference?
|
|
122
|
+
|
|
123
|
+
Answer these conversationally. Once the requirements are clear, BUILD proceeds to generation without further prompts.
|
|
124
|
+
|
|
125
|
+
### Step-by-step: building a skill
|
|
126
|
+
|
|
127
|
+
Here is a complete walkthrough of building a new skill from scratch.
|
|
128
|
+
|
|
129
|
+
**Step 1: Invoke the command**
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
/bto-build a skill that reviews pull request diffs and writes structured code review comments
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Step 2: Watch type detection**
|
|
136
|
+
|
|
137
|
+
BUILD detects: artifact type = **skill**, from the keywords "skill" and structured protocol.
|
|
138
|
+
|
|
139
|
+
**Step 3: Requirements extraction (QUICK mode)**
|
|
140
|
+
|
|
141
|
+
BUILD extracts:
|
|
142
|
+
- Name: `pr-reviewer`
|
|
143
|
+
- Capability: analyze git diffs, produce structured code review
|
|
144
|
+
- Domain: software development / git workflows
|
|
145
|
+
- Output: structured comments with severity levels
|
|
146
|
+
|
|
147
|
+
**Step 4: Generation**
|
|
148
|
+
|
|
149
|
+
BUILD creates the following file tree:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
.claude/skills/pr-reviewer/
|
|
153
|
+
├── SKILL.md
|
|
154
|
+
├── modules/
|
|
155
|
+
│ ├── diff-analysis.md
|
|
156
|
+
│ └── comment-formatter.md
|
|
157
|
+
├── references/
|
|
158
|
+
│ └── review-heuristics.md
|
|
159
|
+
└── examples/
|
|
160
|
+
└── sample-review.md
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
`SKILL.md` receives all mandatory sections: `# Title`, `## Overview`, `## Quick Start`, `## Protocol`, `## Output Format`, `## Anti-Patterns`, `## Dependencies`.
|
|
164
|
+
|
|
165
|
+
**Step 5: Self-review**
|
|
166
|
+
|
|
167
|
+
Before writing the files, BUILD runs its own Layer 0 equivalent check:
|
|
168
|
+
- All required sections present
|
|
169
|
+
- No `[TODO]` or `[TBD]` placeholders
|
|
170
|
+
- Cross-references resolve
|
|
171
|
+
- File sizes within bounds
|
|
172
|
+
|
|
173
|
+
If any check fails, BUILD fixes it before output. You see only the final, clean artifact.
|
|
174
|
+
|
|
175
|
+
**Step 6: Output summary**
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
BUILD Complete
|
|
179
|
+
Artifact: .claude/skills/pr-reviewer/
|
|
180
|
+
Files created:
|
|
181
|
+
- SKILL.md (8.2 KB)
|
|
182
|
+
- modules/diff-analysis.md (4.1 KB)
|
|
183
|
+
- modules/comment-formatter.md (3.7 KB)
|
|
184
|
+
- references/review-heuristics.md (2.9 KB)
|
|
185
|
+
- examples/sample-review.md (1.8 KB)
|
|
186
|
+
|
|
187
|
+
Next: Run /bto-test .claude/skills/pr-reviewer/ to evaluate
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Building commands
|
|
191
|
+
|
|
192
|
+
Commands are single `.md` files. BUILD follows the command template automatically:
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
/bto-build slash command /analyze-deps that reads package.json and reports outdated dependencies
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The generated command will include:
|
|
199
|
+
- Usage line with `$ARGUMENTS`
|
|
200
|
+
- Skill loading instruction (reads relevant SKILL.md files)
|
|
201
|
+
- Numbered protocol steps
|
|
202
|
+
- Checkpoint banner
|
|
203
|
+
- Error handling for missing arguments
|
|
204
|
+
|
|
205
|
+
### Building rules
|
|
206
|
+
|
|
207
|
+
Rules define patterns with detection signals and fixes. BUILD generates a structured table:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
/bto-build rule for catching over-engineered architecture proposals (more than 10 components in an MVP)
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Output is a rule file with columns: Pattern, Detection Signal, Required Fix, Severity (BLOCK / WARN / FLAG).
|
|
214
|
+
|
|
215
|
+
### Building agent templates
|
|
216
|
+
|
|
217
|
+
Agent templates define reusable agent configurations for parallel workloads:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
/bto-build agent template for a completeness auditor that checks research artifacts for missing citations
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
BUILD ensures the template specifies model selection (haiku/sonnet/opus), isolation scope, output format, timeout bounds, and failure protocol — all required by the quality checklist.
|
|
224
|
+
|
|
225
|
+
### Anti-patterns to avoid when writing descriptions
|
|
226
|
+
|
|
227
|
+
| Anti-Pattern | Example | Better |
|
|
228
|
+
|-------------|---------|--------|
|
|
229
|
+
| Vague type | "make something for research" | "make a skill that..." |
|
|
230
|
+
| No domain | "a skill for reviewing content" | "a skill for reviewing banking compliance documents" |
|
|
231
|
+
| Too broad | "a skill that does everything" | "a skill that does one thing well" |
|
|
232
|
+
| Too short | "research skill" | Describe what it inputs, what it outputs, what domain |
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 3. Testing Artifacts with /bto-test
|
|
237
|
+
|
|
238
|
+
The TEST module runs your artifact through three evaluation layers, stopping at the first failure. Each layer is more expensive and thorough than the previous one.
|
|
239
|
+
|
|
240
|
+
### Layer overview
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
Layer 0 → Layer 1 → Layer 2 → Meta-Judge (only on disagreement)
|
|
244
|
+
free haiku sonnet ×3 opus
|
|
245
|
+
instant ~10 sec ~30 sec ~15 sec
|
|
246
|
+
structural semantic full panel disagreement resolution
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Running a test
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
/bto-test .claude/skills/pr-reviewer/
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Or test a specific layer only:
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
/bto-test .claude/skills/pr-reviewer/ --level layer0
|
|
259
|
+
/bto-test .claude/skills/pr-reviewer/ --level layer1
|
|
260
|
+
/bto-test .claude/skills/pr-reviewer/ --level layer2
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Default (`--level full`) runs all layers sequentially, stopping if any layer fails.
|
|
264
|
+
|
|
265
|
+
### Layer 0: Structural pre-checks
|
|
266
|
+
|
|
267
|
+
Layer 0 is deterministic — no LLM is involved. It runs 12 universal checks plus type-specific checks against a predefined quality checklist.
|
|
268
|
+
|
|
269
|
+
**Universal checks (12 total):**
|
|
270
|
+
|
|
271
|
+
| ID | What is checked |
|
|
272
|
+
|----|----------------|
|
|
273
|
+
| U-01 | File exists and is non-empty |
|
|
274
|
+
| U-02 | Valid UTF-8 encoding |
|
|
275
|
+
| U-03 | Starts with level-1 heading |
|
|
276
|
+
| U-04 | No placeholder text (TODO, FIXME, INSERT, TBD) |
|
|
277
|
+
| U-05 | No empty sections |
|
|
278
|
+
| U-06 | Consistent heading hierarchy |
|
|
279
|
+
| U-07 | No broken internal cross-references |
|
|
280
|
+
| U-08 | File size within bounds (200 bytes to 100 KB) |
|
|
281
|
+
| U-09 | No trailing whitespace |
|
|
282
|
+
| U-10 | No raw HTML tags |
|
|
283
|
+
| U-11 | All code blocks properly closed |
|
|
284
|
+
| U-12 | No duplicate top-level section names |
|
|
285
|
+
|
|
286
|
+
**Skill-specific checks (16 additional):** confirms SKILL.md exists, Overview and Anti-Patterns sections present, all module and reference files resolve, size bounds (2 KB to 50 KB for SKILL.md, under 200 KB total), examples directory populated, dependencies documented.
|
|
287
|
+
|
|
288
|
+
**Gate:** Pass rate must reach 80% to proceed. Below 80%, the report lists every failing check with IDs and Layer 1 evaluation is skipped.
|
|
289
|
+
|
|
290
|
+
Items marked `*` in the report are auto-fixable — BUILD can correct them programmatically. Items without `*` require human or LLM-assisted review.
|
|
291
|
+
|
|
292
|
+
**Reading a Layer 0 failure report:**
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
296
|
+
LAYER 0 PRE-FLIGHT CHECK
|
|
297
|
+
Artifact: my-command (command)
|
|
298
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
299
|
+
Universal checks: 10 / 12
|
|
300
|
+
Type-specific checks: 7 / 11
|
|
301
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
302
|
+
TOTAL: 17 / 23
|
|
303
|
+
Pass rate: 74%
|
|
304
|
+
Status: CONDITIONAL
|
|
305
|
+
|
|
306
|
+
Failed checks:
|
|
307
|
+
- [U-04] Placeholder text found: "[INSERT SKILL NAME]" at line 12
|
|
308
|
+
- [CM-02] No $ARGUMENTS reference found
|
|
309
|
+
- [CM-03] No checkpoint protocol reference
|
|
310
|
+
- [U-09] Trailing whitespace on 3 lines *
|
|
311
|
+
|
|
312
|
+
Verdict: FIX AND RE-CHECK
|
|
313
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
The auto-fixable item (`*`) is trailing whitespace — Layer 0 can correct that. The other three require you or BUILD to address them before re-running.
|
|
317
|
+
|
|
318
|
+
### Layer 1: Quick semantic evaluation
|
|
319
|
+
|
|
320
|
+
Layer 1 uses a single haiku call to provide a fast quality signal. It evaluates five dimensions on a 1-10 scale.
|
|
321
|
+
|
|
322
|
+
**Five dimensions:**
|
|
323
|
+
|
|
324
|
+
| Dimension | What is measured |
|
|
325
|
+
|-----------|----------------|
|
|
326
|
+
| CLARITY | Are instructions unambiguous? Can an LLM follow them precisely? |
|
|
327
|
+
| COMPLETENESS | Are all necessary sections present? No missing pieces? |
|
|
328
|
+
| ACTIONABILITY | Can Claude produce concrete output from these instructions? |
|
|
329
|
+
| QUALITY | Well-structured, professional, good formatting? |
|
|
330
|
+
| ANTI-PATTERNS | Avoids known pitfalls? Has failure mode coverage? |
|
|
331
|
+
|
|
332
|
+
**Sample Layer 1 output:**
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
LAYER 1: Quick Evaluation (haiku)
|
|
336
|
+
Artifact: pr-reviewer (skill)
|
|
337
|
+
|
|
338
|
+
SCORES:
|
|
339
|
+
- CLARITY: 8/10 — Instructions are specific; agent step boundaries are clear
|
|
340
|
+
- COMPLETENESS: 7/10 — All sections present; examples could be more varied
|
|
341
|
+
- ACTIONABILITY: 8/10 — Protocol produces deterministic output
|
|
342
|
+
- QUALITY: 8/10 — Well-formatted, good use of tables and code blocks
|
|
343
|
+
- ANTI-PATTERNS: 6/10 — Anti-patterns section present but thin (only 3 entries)
|
|
344
|
+
|
|
345
|
+
AVERAGE: 7.4/10
|
|
346
|
+
|
|
347
|
+
TOP 3 IMPROVEMENTS:
|
|
348
|
+
1. Expand anti-patterns with at least 5 more entries covering edge cases
|
|
349
|
+
2. Add a second example demonstrating a failing review scenario
|
|
350
|
+
3. Clarify Step 3 output format — currently underspecified
|
|
351
|
+
|
|
352
|
+
VERDICT: PASS (≥7.0)
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
**Gate thresholds:**
|
|
356
|
+
- Average >= 7.0: PASS — proceed to Layer 2
|
|
357
|
+
- Average 5.0 to 6.9: NEEDS WORK — Layer 2 can provide detailed feedback
|
|
358
|
+
- Average < 5.0: FAIL — fix before proceeding
|
|
359
|
+
|
|
360
|
+
### Layer 2: Full judge panel
|
|
361
|
+
|
|
362
|
+
Layer 2 is the most thorough evaluation. Three sonnet agents run in parallel, each with a distinct perspective. They evaluate the same artifact independently — no judge sees another's scores before submitting.
|
|
363
|
+
|
|
364
|
+
**The three judges:**
|
|
365
|
+
|
|
366
|
+
| Judge | Role | Scoring calibration | Weight |
|
|
367
|
+
|-------|------|--------------------:|-------|
|
|
368
|
+
| Domain Expert | Accuracy, depth, methodology, domain fit | Generous (7-9 avg) | 0.40 |
|
|
369
|
+
| Critic | Gaps, weaknesses, anti-patterns, edge cases | Strict (5-6 avg) | 0.30 |
|
|
370
|
+
| Completeness Auditor | Structure, coverage, cross-references | Moderate (6-8 avg) | 0.30 |
|
|
371
|
+
|
|
372
|
+
Each judge scores five dimensions (1-10): METHODOLOGY, DEPTH, CORRECTNESS, USABILITY, ROBUSTNESS.
|
|
373
|
+
|
|
374
|
+
**Aggregation formula:**
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
dimension_score = expert[dim] * 0.4 + critic[dim] * 0.3 + auditor[dim] * 0.3
|
|
378
|
+
overall = mean(all five dimension_scores)
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**Sample Layer 2 report:**
|
|
382
|
+
|
|
383
|
+
```
|
|
384
|
+
═══════════════════════════════════════════════════════
|
|
385
|
+
BTO EVALUATION REPORT
|
|
386
|
+
Artifact: .claude/skills/pr-reviewer/
|
|
387
|
+
Type: skill
|
|
388
|
+
Level: Layer 0 + Layer 1 + Layer 2
|
|
389
|
+
|
|
390
|
+
OVERALL SCORE: 7.6 / 10 [PASS]
|
|
391
|
+
|
|
392
|
+
Per-Dimension:
|
|
393
|
+
METHODOLOGY: 8.1 ████████░░░░
|
|
394
|
+
DEPTH: 7.3 ███████░░░░░
|
|
395
|
+
CORRECTNESS: 8.0 ████████░░░░
|
|
396
|
+
USABILITY: 7.8 ███████░░░░░
|
|
397
|
+
ROBUSTNESS: 6.8 ██████░░░░░░
|
|
398
|
+
|
|
399
|
+
Flagged dimensions (disagreement >3): ROBUSTNESS
|
|
400
|
+
Expert: 8, Critic: 4, Auditor: 7 — escalating to meta-judge
|
|
401
|
+
|
|
402
|
+
Top Improvements:
|
|
403
|
+
1. [Critic] Step 2 does not handle binary file diffs — add explicit skip logic
|
|
404
|
+
2. [Auditor] references/review-heuristics.md is not cited in SKILL.md body
|
|
405
|
+
3. [Expert] Examples should include a false-positive case to calibrate the agent
|
|
406
|
+
═══════════════════════════════════════════════════════
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Understanding the per-dimension scores
|
|
410
|
+
|
|
411
|
+
Each dimension has a defined rubric. Here is what the score ranges mean for skills:
|
|
412
|
+
|
|
413
|
+
**METHODOLOGY**
|
|
414
|
+
- 9-10: Multi-step protocol, explicit decision points, modular design
|
|
415
|
+
- 7-8: Good protocol, some modularity
|
|
416
|
+
- 4-6: Basic steps listed, no decision flow
|
|
417
|
+
- 1-3: No protocol — only describes what the skill does
|
|
418
|
+
|
|
419
|
+
**DEPTH**
|
|
420
|
+
- 9-10: Rich references, multiple examples, detailed modules, anti-patterns
|
|
421
|
+
- 7-8: Good detail in SKILL.md, references and examples present
|
|
422
|
+
- 4-6: Minimal references, basic overview
|
|
423
|
+
- 1-3: Stub-level content
|
|
424
|
+
|
|
425
|
+
**CORRECTNESS**
|
|
426
|
+
- 9-10: All instructions produce expected output, cross-references valid
|
|
427
|
+
- 7-8: Instructions work, minor reference issues
|
|
428
|
+
- 4-6: Some ambiguous instructions, broken references
|
|
429
|
+
- 1-3: Instructions would produce wrong output
|
|
430
|
+
|
|
431
|
+
**USABILITY**
|
|
432
|
+
- 9-10: Quick Start section, clear navigation, progressive disclosure of detail
|
|
433
|
+
- 7-8: Well-organized, information is findable
|
|
434
|
+
- 4-6: Readable but poorly organized
|
|
435
|
+
- 1-3: Wall of text, no navigable structure
|
|
436
|
+
|
|
437
|
+
**ROBUSTNESS**
|
|
438
|
+
- 9-10: Anti-patterns documented, failure modes handled, abort conditions defined
|
|
439
|
+
- 7-8: Anti-patterns section present, some edge cases covered
|
|
440
|
+
- 4-6: Mentions some risks
|
|
441
|
+
- 1-3: No failure mode coverage
|
|
442
|
+
|
|
443
|
+
### Meta-judge: disagreement resolution
|
|
444
|
+
|
|
445
|
+
When any dimension shows a spread of more than 3 points between the highest and lowest judge score, BTO escalates that dimension to the meta-judge — a single opus call that reviews all three evaluations and produces a reconciled score.
|
|
446
|
+
|
|
447
|
+
```
|
|
448
|
+
Meta-Judge Input:
|
|
449
|
+
ROBUSTNESS disagreement:
|
|
450
|
+
Expert (8): "Protocol handles most diff types; edge cases documented"
|
|
451
|
+
Critic (4): "Binary diffs, symlinks, and renamed files are unhandled"
|
|
452
|
+
Auditor (7): "Anti-patterns section mentions some edge cases"
|
|
453
|
+
|
|
454
|
+
Meta-Judge Output:
|
|
455
|
+
Reconciled score: 6
|
|
456
|
+
Reasoning: Critic identified specific, concrete gaps (binary diffs, renames)
|
|
457
|
+
that the Expert and Auditor did not weight as heavily. The gaps are real.
|
|
458
|
+
Recommended: Address Critic's list before claiming robustness.
|
|
459
|
+
Human review needed: NO
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
If the meta-judge flags human review as YES, BTO displays a warning and waits for your confirmation before continuing.
|
|
463
|
+
|
|
464
|
+
### Re-running after fixes
|
|
465
|
+
|
|
466
|
+
After addressing the improvement suggestions, re-run the test:
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
/bto-test .claude/skills/pr-reviewer/
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Layer 0 is always re-run from scratch. If the artifact previously passed Layer 0, BTO skips to Layer 1 by default. Override with `--level full` to force all layers.
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## 4. Optimizing Artifacts with /bto-optimize
|
|
477
|
+
|
|
478
|
+
The OPTIMIZE module improves artifacts through a 3-round evolutionary loop: generate variants by mutation, evaluate, select the best, cross-breed, repeat.
|
|
479
|
+
|
|
480
|
+
### When to use it
|
|
481
|
+
|
|
482
|
+
Optimization makes sense when:
|
|
483
|
+
- Baseline Layer 2 score is between 5.0 and 7.9
|
|
484
|
+
- You know the score is low but the structural issues are already fixed
|
|
485
|
+
- You want to push a good artifact from 7-something to 8+
|
|
486
|
+
|
|
487
|
+
Do not use it when:
|
|
488
|
+
- Layer 0 fails — fix structural issues first
|
|
489
|
+
- Baseline score is already >= 8.0 — the artifact is good; minor manual tweaks are more efficient
|
|
490
|
+
- The artifact's intent or scope is wrong — optimization cannot fix a fundamentally misdirected artifact
|
|
491
|
+
|
|
492
|
+
### Basic usage
|
|
493
|
+
|
|
494
|
+
```
|
|
495
|
+
/bto-optimize .claude/skills/pr-reviewer/
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
With optional parameters:
|
|
499
|
+
|
|
500
|
+
```
|
|
501
|
+
/bto-optimize .claude/skills/pr-reviewer/ --rounds 3 --focus ROBUSTNESS
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
`--rounds` defaults to 3 (maximum 5). `--focus` tells the optimizer which dimension to prioritize. Without `--focus`, BTO targets all dimensions that score below 7.0.
|
|
505
|
+
|
|
506
|
+
### The 3-round loop
|
|
507
|
+
|
|
508
|
+
**Round 1: Mutation + fast evaluation**
|
|
509
|
+
|
|
510
|
+
BTO generates five variants of your artifact. Each applies one mutation strategy:
|
|
511
|
+
|
|
512
|
+
| Variant | Strategy | When effective |
|
|
513
|
+
|---------|----------|---------------|
|
|
514
|
+
| V1 | Rephrase | CLARITY or USABILITY is low |
|
|
515
|
+
| V2 | Restructure | METHODOLOGY or USABILITY is low |
|
|
516
|
+
| V3 | Add Constraints | ROBUSTNESS or CORRECTNESS is low |
|
|
517
|
+
| V4 | Simplify | Artifact is verbose or over-engineered |
|
|
518
|
+
| V5 | Specialize | DEPTH is low; needs domain-specific context |
|
|
519
|
+
|
|
520
|
+
If you specified `--focus ROBUSTNESS`, variants V3 and V5 (which target robustness-related weaknesses) are given extra weight: three variants use robustness strategies, two use others.
|
|
521
|
+
|
|
522
|
+
Each variant is evaluated with Layer 1 (haiku) in parallel — five simultaneous agent calls. Scores are recorded. Time: approximately 30-45 seconds.
|
|
523
|
+
|
|
524
|
+
**Round 2: Crossover + fast evaluation**
|
|
525
|
+
|
|
526
|
+
The top two variants from Round 1 are combined. BTO takes sections where Variant A scored higher from A, and sections where Variant B scored higher from B, producing three new crossover variants. These are again evaluated with Layer 1 in parallel. Time: approximately 20-30 seconds.
|
|
527
|
+
|
|
528
|
+
**Round 3: Final selection with full panel**
|
|
529
|
+
|
|
530
|
+
The top two crossover variants from Round 2 are evaluated with Layer 2 (full judge panel, sonnet × 3). The single best-scoring variant is selected as the output. Time: approximately 60-90 seconds for all evaluations in parallel.
|
|
531
|
+
|
|
532
|
+
### Convergence detection
|
|
533
|
+
|
|
534
|
+
BTO tracks the improvement delta between rounds. If the delta (new score minus previous best) falls below 0.5 for two consecutive rounds, the optimizer declares convergence and stops early — even before Round 3 completes. This prevents running expensive evaluations when the artifact has plateaued.
|
|
535
|
+
|
|
536
|
+
If a round's top score is more than 1.0 lower than the previous best, BTO rolls back to the previous best and logs a regression warning.
|
|
537
|
+
|
|
538
|
+
### Reading the optimization report
|
|
539
|
+
|
|
540
|
+
```
|
|
541
|
+
═══════════════════════════════════════════════════════
|
|
542
|
+
BTO OPTIMIZATION REPORT
|
|
543
|
+
Artifact: .claude/skills/pr-reviewer/
|
|
544
|
+
Rounds: 3
|
|
545
|
+
Total evaluations: 15
|
|
546
|
+
|
|
547
|
+
BEFORE → AFTER:
|
|
548
|
+
METHODOLOGY: 7.2 → 8.4 (+1.2)
|
|
549
|
+
DEPTH: 6.5 → 7.8 (+1.3)
|
|
550
|
+
CORRECTNESS: 8.0 → 8.2 (+0.2)
|
|
551
|
+
USABILITY: 7.8 → 8.1 (+0.3)
|
|
552
|
+
ROBUSTNESS: 6.2 → 7.9 (+1.7)
|
|
553
|
+
|
|
554
|
+
OVERALL: 7.1 → 8.1 (+1.0)
|
|
555
|
+
|
|
556
|
+
Winning Strategy: Restructure + Add Constraints (crossover R1V2 × R1V3)
|
|
557
|
+
|
|
558
|
+
CHANGELOG:
|
|
559
|
+
- Restructured Step 2 to separate binary diff detection from text diff analysis
|
|
560
|
+
- Added explicit skip conditions for non-text file types
|
|
561
|
+
- Expanded anti-patterns with 4 new entries from Critic feedback
|
|
562
|
+
- Added fail-safe: if diff parser returns empty, output explains why
|
|
563
|
+
- Examples now include a renamed-file scenario
|
|
564
|
+
═══════════════════════════════════════════════════════
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
**What the recommendation means:**
|
|
568
|
+
- Overall improvement > 1.0: "Apply changes" — the optimized version is meaningfully better
|
|
569
|
+
- Improvement 0.5 to 1.0: "Review changes, consider applying" — gains are real but modest
|
|
570
|
+
- Improvement < 0.5: "Minimal improvement — original may be preferred" — not worth the cost
|
|
571
|
+
|
|
572
|
+
### Applying the result
|
|
573
|
+
|
|
574
|
+
BTO does not automatically overwrite your artifact. It presents the optimized version and waits for your confirmation. If you approve, BTO writes the file. If you decline, the original is preserved and BTO offers to show a diff so you can cherry-pick improvements manually.
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
## 5. Full BTO Pipeline with /bto
|
|
579
|
+
|
|
580
|
+
The `/bto` command runs BUILD, TEST, and OPTIMIZE in sequence for a complete quality lifecycle. Use it when starting a new artifact from scratch and wanting production-quality output with minimal manual intervention.
|
|
581
|
+
|
|
582
|
+
### Usage
|
|
583
|
+
|
|
584
|
+
```
|
|
585
|
+
/bto [description or path]
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
If given a description, BTO runs BUILD first. If given an existing path, it skips BUILD and starts with TEST.
|
|
589
|
+
|
|
590
|
+
```
|
|
591
|
+
/bto a skill for generating weekly status reports from git history
|
|
592
|
+
|
|
593
|
+
/bto .claude/skills/existing-skill/
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### End-to-end walkthrough
|
|
597
|
+
|
|
598
|
+
Here is a complete run of `/bto a skill for generating weekly status reports`.
|
|
599
|
+
|
|
600
|
+
**Stage 1: BUILD**
|
|
601
|
+
|
|
602
|
+
BTO invokes the BUILD module in QUICK mode. Within two minutes, the artifact is created at `.claude/skills/weekly-reporter/`.
|
|
603
|
+
|
|
604
|
+
```
|
|
605
|
+
BUILD Complete
|
|
606
|
+
Artifact: .claude/skills/weekly-reporter/
|
|
607
|
+
Files created: SKILL.md (7.1 KB), modules/git-reader.md, modules/report-formatter.md,
|
|
608
|
+
references/report-templates.md, examples/sample-report.md
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
**Stage 2: TEST**
|
|
612
|
+
|
|
613
|
+
BTO immediately tests the freshly built artifact.
|
|
614
|
+
|
|
615
|
+
```
|
|
616
|
+
Layer 0: 26/28 (93%) — PASS
|
|
617
|
+
Layer 1: 7.2/10 — PASS
|
|
618
|
+
Layer 2: 7.4/10 — PASS
|
|
619
|
+
Flagged: ROBUSTNESS (disagreement 4 points — Expert 8, Critic 4)
|
|
620
|
+
Meta-judge reconciled to 6.2
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
The overall score of 7.4 is below 8.0, so BTO proceeds to optimization.
|
|
624
|
+
|
|
625
|
+
**Stage 3: OPTIMIZE**
|
|
626
|
+
|
|
627
|
+
BTO runs 3 rounds of optimization targeting ROBUSTNESS (lowest score) and DEPTH (second lowest).
|
|
628
|
+
|
|
629
|
+
```
|
|
630
|
+
Round 1: 5 variants × Layer 1 — best: 7.8 (V3: Add Constraints)
|
|
631
|
+
Round 2: crossover × Layer 1 — best: 8.0 (V3×V5 crossover)
|
|
632
|
+
Round 3: final × Layer 2 — final: 8.3
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
**Checkpoint**
|
|
636
|
+
|
|
637
|
+
Before writing the optimized version, BTO displays a checkpoint and waits for your confirmation:
|
|
638
|
+
|
|
639
|
+
```
|
|
640
|
+
═══════════════════════════════════════════════════════
|
|
641
|
+
CHECKPOINT: BTO Pipeline Complete
|
|
642
|
+
Artifact: .claude/skills/weekly-reporter/
|
|
643
|
+
BUILD: Complete (5 files)
|
|
644
|
+
TEST: 7.4/10 (Layer 0 PASS, Layer 1 PASS, Layer 2 PASS)
|
|
645
|
+
OPT: 8.3/10 (+0.9 improvement)
|
|
646
|
+
|
|
647
|
+
Key improvements in optimized version:
|
|
648
|
+
- Added error handling for repositories with no git history
|
|
649
|
+
- Expanded anti-patterns to cover merge commit noise
|
|
650
|
+
- Added examples for monorepo setups
|
|
651
|
+
|
|
652
|
+
Type "apply" to write the optimized version.
|
|
653
|
+
Type "diff" to see a full before/after comparison.
|
|
654
|
+
Type "skip" to keep the original BUILD output.
|
|
655
|
+
═══════════════════════════════════════════════════════
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
Respond with `apply`, `diff`, or `skip`.
|
|
659
|
+
|
|
660
|
+
### Pipeline behavior with existing artifacts
|
|
661
|
+
|
|
662
|
+
When `/bto` is given a path to an existing artifact, it skips BUILD. If the artifact scores >= 8.0 on Layer 2, it skips OPTIMIZE too, and simply presents the evaluation report. The pipeline adapts to what is actually needed.
|
|
663
|
+
|
|
664
|
+
```
|
|
665
|
+
/bto .claude/skills/high-quality-skill/
|
|
666
|
+
→ TEST runs: Layer 2 score = 8.6
|
|
667
|
+
→ OPTIMIZE skipped: artifact already high quality
|
|
668
|
+
→ Report presented
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
---
|
|
672
|
+
|
|
673
|
+
## 6. Working with Judge Panels
|
|
674
|
+
|
|
675
|
+
Understanding how the judge panel works helps you interpret results accurately and avoid acting on misleading scores.
|
|
676
|
+
|
|
677
|
+
### Why three judges with different roles
|
|
678
|
+
|
|
679
|
+
A single judge cannot reliably evaluate both "is this technically correct" and "what is missing" at the same time. Role differentiation forces each agent into a specific evaluative stance:
|
|
680
|
+
|
|
681
|
+
- The **Domain Expert** reads with optimism, looking for what works well and whether the approach is sound.
|
|
682
|
+
- The **Critic** reads adversarially, looking specifically for what could fail, mislead, or be missing.
|
|
683
|
+
- The **Completeness Auditor** reads mechanically, checking every structural requirement against the checklist.
|
|
684
|
+
|
|
685
|
+
The Critic is explicitly calibrated to score lower than the Expert (average 5-6 vs 7-9). This is intentional and does not mean the artifact is bad — it means the Critic found the gaps that genuinely need attention.
|
|
686
|
+
|
|
687
|
+
### Judge isolation
|
|
688
|
+
|
|
689
|
+
Judges do not see each other's scores before submitting. This is not an implementation detail — it is a deliberate quality gate. If judges could see each other's scores, they would converge toward the first-submitted score, which is a well-documented bias in multi-evaluator systems. BTO uses parallel agent execution to enforce isolation.
|
|
690
|
+
|
|
691
|
+
### Score aggregation
|
|
692
|
+
|
|
693
|
+
The weighted average formula gives Domain Expert the highest weight (0.40) because domain correctness is the most consequential failure mode. An artifact that passes structural and completeness checks but gives wrong instructions is actively harmful.
|
|
694
|
+
|
|
695
|
+
```
|
|
696
|
+
final_score = expert * 0.40 + critic * 0.30 + auditor * 0.30
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
To compute manually from a report: take each judge's overall score, multiply by the weights above, sum the results.
|
|
700
|
+
|
|
701
|
+
### Reading disagreements
|
|
702
|
+
|
|
703
|
+
High disagreement between judges is information, not noise. When the spread exceeds 3 points on a dimension, it reveals genuine ambiguity in the artifact's quality on that dimension.
|
|
704
|
+
|
|
705
|
+
Common patterns:
|
|
706
|
+
|
|
707
|
+
| Disagreement pattern | Likely cause | What to do |
|
|
708
|
+
|---------------------|-------------|-----------|
|
|
709
|
+
| Expert high, Critic low | Technically correct but fragile | Address Critic's specific failure scenarios |
|
|
710
|
+
| Expert low, Auditor high | Complete structure but wrong approach | Rethink the methodology, not the formatting |
|
|
711
|
+
| Critic low, others normal | Critic found genuine edge case gaps | Read Critic's specific failure scenarios carefully |
|
|
712
|
+
| All three low | Artifact has fundamental problems | Consider rebuilding rather than optimizing |
|
|
713
|
+
|
|
714
|
+
### What to do with the top improvements list
|
|
715
|
+
|
|
716
|
+
The top improvements list at the end of the evaluation report combines insights from all three judges, prioritized by impact. The convention is:
|
|
717
|
+
|
|
718
|
+
1. First item: the most critical gap (often from Critic)
|
|
719
|
+
2. Second item: a structural or cross-reference issue (often from Auditor)
|
|
720
|
+
3. Third item: a depth or context improvement (often from Expert)
|
|
721
|
+
|
|
722
|
+
Apply them in order. Each improvement typically moves the score by 0.3 to 0.7 points on the affected dimension.
|
|
723
|
+
|
|
724
|
+
### When to use /bto-test directly vs as part of /bto
|
|
725
|
+
|
|
726
|
+
Use `/bto-test` directly when:
|
|
727
|
+
- You want to evaluate an artifact you wrote manually (not built by BTO)
|
|
728
|
+
- You want a quick Layer 1 check without running the full panel: `/bto-test path --level layer1`
|
|
729
|
+
- You want to re-evaluate after manual edits to confirm improvement
|
|
730
|
+
- You are running batch evaluation of multiple artifacts
|
|
731
|
+
|
|
732
|
+
Use `/bto` (which includes TEST) when:
|
|
733
|
+
- You are starting a new artifact from scratch
|
|
734
|
+
- You want the full lifecycle managed for you
|
|
735
|
+
|
|
736
|
+
---
|
|
737
|
+
|
|
738
|
+
## 7. Common Scenarios
|
|
739
|
+
|
|
740
|
+
### Scenario A: Creating a new skill from scratch
|
|
741
|
+
|
|
742
|
+
You need a skill that does not yet exist in your `.claude/skills/` directory.
|
|
743
|
+
|
|
744
|
+
```
|
|
745
|
+
/bto a skill for detecting and flagging AI-washing language in pitch decks
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
BTO builds the skill, tests it, and optimizes it in one command. Total time: 10-15 minutes. Result: a production-quality skill at `.claude/skills/ai-washing-detector/` with a Layer 2 score of 8.0+.
|
|
749
|
+
|
|
750
|
+
### Scenario B: Auditing an existing skill
|
|
751
|
+
|
|
752
|
+
You inherited a skill that was written manually and want to know its current quality level.
|
|
753
|
+
|
|
754
|
+
```
|
|
755
|
+
/bto-test .claude/skills/legacy-researcher/
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
Run the full evaluation. Read the Layer 2 report. If the score is below 7.0, run:
|
|
759
|
+
|
|
760
|
+
```
|
|
761
|
+
/bto-optimize .claude/skills/legacy-researcher/
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
If the score is 7.0 to 7.9, read the improvement suggestions and edit the skill manually, then re-run the test to confirm the gains.
|
|
765
|
+
|
|
766
|
+
### Scenario C: Targeted prompt tuning
|
|
767
|
+
|
|
768
|
+
You have a skill that works well overall (Layer 2 score 7.5) but the Critic consistently scores ROBUSTNESS below 5.0. You want to fix just that dimension.
|
|
769
|
+
|
|
770
|
+
```
|
|
771
|
+
/bto-optimize .claude/skills/my-skill/ --focus ROBUSTNESS
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
This directs the mutation strategy toward robustness: three of the five Round 1 variants will use "Add Constraints" and "Specialize" strategies, which are the primary and secondary strategies for ROBUSTNESS improvement.
|
|
775
|
+
|
|
776
|
+
### Scenario D: A/B evaluation of two versions
|
|
777
|
+
|
|
778
|
+
You have two versions of a command and want an objective comparison.
|
|
779
|
+
|
|
780
|
+
```
|
|
781
|
+
/bto-test .claude/commands/summarize-v1.md --level layer2
|
|
782
|
+
/bto-test .claude/commands/summarize-v2.md --level layer2
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
Compare the per-dimension scores. The version with a higher weighted average is objectively better according to the judge panel. Pay attention to which dimensions differ most — that reveals what architectural choice is driving the quality gap.
|
|
786
|
+
|
|
787
|
+
### Scenario E: Evaluating a research artifact
|
|
788
|
+
|
|
789
|
+
BTO can evaluate Keysarium research artifacts too, not just code-level skills and commands.
|
|
790
|
+
|
|
791
|
+
```
|
|
792
|
+
/bto-test researches/bank_kc_automation/02_research_findings.md
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
For research artifacts, Layer 0 runs research-specific checks: sourced claims, no `[UNVERIFIED]` tags, real competitor names, quantified KPIs. Layer 2 uses the Research Artifact rubric, which scores CORRECTNESS heavily on citation quality and ROBUSTNESS on whether limitations and confidence levels are noted.
|
|
796
|
+
|
|
797
|
+
### Scenario F: Batch evaluation before a release
|
|
798
|
+
|
|
799
|
+
Before releasing a set of skills as a package, evaluate all of them.
|
|
800
|
+
|
|
801
|
+
```
|
|
802
|
+
/bto-test .claude/skills/skill-one/
|
|
803
|
+
/bto-test .claude/skills/skill-two/
|
|
804
|
+
/bto-test .claude/skills/skill-three/
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
Or in a single session, run tests in sequence and review the consolidated reports. Any skill scoring below 7.0 should be optimized before release. Any skill failing Layer 0 should be fixed immediately.
|
|
808
|
+
|
|
809
|
+
### Scenario G: Maintaining skills over time
|
|
810
|
+
|
|
811
|
+
Skills degrade in quality relative to new conventions as your codebase evolves. Run quarterly audits:
|
|
812
|
+
|
|
813
|
+
```
|
|
814
|
+
/bto-test .claude/skills/explore/
|
|
815
|
+
/bto-test .claude/skills/goap-research-ed25519/
|
|
816
|
+
/bto-test .claude/skills/problem-solver-enhanced/
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
If a skill scores below its previous benchmark, use `/bto-optimize` to bring it back up.
|
|
820
|
+
|
|
821
|
+
---
|
|
822
|
+
|
|
823
|
+
## 8. Tips and Best Practices
|
|
824
|
+
|
|
825
|
+
### Writing better descriptions for /bto-build
|
|
826
|
+
|
|
827
|
+
The more specific your description, the better the output. Include:
|
|
828
|
+
|
|
829
|
+
- Artifact type (skill, command, rule, agent)
|
|
830
|
+
- Domain context (banking, healthcare, software development, general)
|
|
831
|
+
- Input format and output format
|
|
832
|
+
- One concrete use case example
|
|
833
|
+
- Any constraints (on-premise, latency budget, compliance requirements)
|
|
834
|
+
|
|
835
|
+
Example of a thin description vs a good description:
|
|
836
|
+
|
|
837
|
+
```
|
|
838
|
+
# Thin (triggers DEEP mode, requires follow-up questions)
|
|
839
|
+
/bto-build a research skill
|
|
840
|
+
|
|
841
|
+
# Good (goes directly to QUICK mode generation)
|
|
842
|
+
/bto-build a skill that searches for and synthesizes competitive intelligence
|
|
843
|
+
on software companies, producing structured markdown reports with sourced
|
|
844
|
+
claims, quantified market shares, and a SWOT table. Domain: B2B SaaS.
|
|
845
|
+
Output format: 02_research_findings.md compatible.
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
### Use Layer 1 for fast iteration
|
|
849
|
+
|
|
850
|
+
During active development of an artifact, use `--level layer1` to get feedback in 10 seconds rather than 40. Switch to `--level full` only when you are satisfied with the Layer 1 score and want the comprehensive panel report.
|
|
851
|
+
|
|
852
|
+
```
|
|
853
|
+
# Rapid iteration loop
|
|
854
|
+
/bto-test .claude/skills/my-skill/ --level layer1
|
|
855
|
+
# ... edit the skill based on feedback ...
|
|
856
|
+
/bto-test .claude/skills/my-skill/ --level layer1
|
|
857
|
+
# ... repeat until score >= 7.5 ...
|
|
858
|
+
/bto-test .claude/skills/my-skill/
|
|
859
|
+
# Full evaluation
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
### Do not optimize artifacts that are already good
|
|
863
|
+
|
|
864
|
+
If a skill scores 8.0+ on Layer 2, the optimizer has little room to improve it and the cost (approximately 131K tokens for a full 3-round run) is unlikely to be justified. Reserve optimization for artifacts in the 5.5-7.9 range.
|
|
865
|
+
|
|
866
|
+
### Pay more attention to Critic feedback than Expert feedback
|
|
867
|
+
|
|
868
|
+
The Expert tends to reward good structure and sound methodology, which BUILD provides automatically. The Critic finds the gaps that actually matter in practice. When the Expert scores 8 and the Critic scores 5, the real quality is closer to the Critic's assessment — there are specific failure modes that need to be addressed.
|
|
869
|
+
|
|
870
|
+
### Read the CHANGELOG after optimization
|
|
871
|
+
|
|
872
|
+
The CHANGELOG in the optimization report lists every specific change made. Reading it teaches you the patterns that improve quality — over time you will internalize them and start producing higher-quality first drafts from BUILD.
|
|
873
|
+
|
|
874
|
+
### Keep artifact scope tight
|
|
875
|
+
|
|
876
|
+
The biggest source of low scores is over-scoped artifacts. An artifact that tries to do too much ends up doing none of it well. METHODOLOGY and USABILITY suffer most. If SKILL.md is approaching 30 KB, split it into modules and let the main file orchestrate them.
|
|
877
|
+
|
|
878
|
+
### Version control your artifacts
|
|
879
|
+
|
|
880
|
+
Before running `/bto-optimize`, commit the current artifact to git. If you decline the optimized version or want to compare manually, you have a clean baseline to diff against.
|
|
881
|
+
|
|
882
|
+
```bash
|
|
883
|
+
git add .claude/skills/my-skill/
|
|
884
|
+
git commit -m "baseline before bto optimization"
|
|
885
|
+
/bto-optimize .claude/skills/my-skill/
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
---
|
|
889
|
+
|
|
890
|
+
## 9. FAQ and Troubleshooting
|
|
891
|
+
|
|
892
|
+
### Q: Why is Layer 0 failing on an artifact I wrote manually?
|
|
893
|
+
|
|
894
|
+
The most common causes:
|
|
895
|
+
|
|
896
|
+
1. **Placeholder text** — the checks look for `TODO`, `FIXME`, `[INSERT`, `<YOUR_`, `TBD`. Search your file for these strings.
|
|
897
|
+
2. **Empty sections** — a heading immediately followed by another heading with no content between them fails check U-05.
|
|
898
|
+
3. **Missing Anti-Patterns section** — this is required for skills (check SK-03). Add it even if brief.
|
|
899
|
+
4. **Broken cross-references** — if SKILL.md mentions `modules/analysis.md` but the file does not exist, check U-07 and SK-06 will fail.
|
|
900
|
+
|
|
901
|
+
Run `--level layer0` first to get the complete list of failures before attempting fixes.
|
|
902
|
+
|
|
903
|
+
### Q: The Critic gives very low scores even for good artifacts. Is this a calibration problem?
|
|
904
|
+
|
|
905
|
+
No. The Critic is intentionally calibrated to score strict — average 5 to 6. Its job is to find problems, not to validate quality. A Critic score of 5 on an otherwise good artifact means it found specific gaps. Read the justification for each low score; they are actionable.
|
|
906
|
+
|
|
907
|
+
If all three judges score above 8.5 on a first evaluation, that is the anti-pattern called "score inflation." It means the evaluation criteria are not being applied strictly enough. This is flagged automatically.
|
|
908
|
+
|
|
909
|
+
### Q: /bto-optimize is not improving my score. What is happening?
|
|
910
|
+
|
|
911
|
+
Several possibilities:
|
|
912
|
+
|
|
913
|
+
1. **Baseline already near ceiling** — if you are at 7.8+, gains become marginal. The delta gate (0.5 minimum improvement per round) will trigger convergence.
|
|
914
|
+
2. **Wrong focus dimension** — if METHODOLOGY is low but you are trying to improve ROBUSTNESS, the mutations will not help the right dimension. Run without `--focus` first to let BTO target the weakest dimensions automatically.
|
|
915
|
+
3. **Structural problems** — optimization cannot fix Layer 0 failures. Ensure Layer 0 passes first.
|
|
916
|
+
4. **Artifact is over-scoped** — if SKILL.md is a monolith, no amount of rephrasing will fix the METHODOLOGY score. Split it.
|
|
917
|
+
|
|
918
|
+
### Q: Can I test non-skill files, like my Keysarium research artifacts?
|
|
919
|
+
|
|
920
|
+
Yes. Point BTO at any markdown file in `researches/`:
|
|
921
|
+
|
|
922
|
+
```
|
|
923
|
+
/bto-test researches/bank_kc_automation/03_solution_strategy.md
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
BTO auto-detects the research artifact type and applies the research-specific Layer 0 checks (citations, KPI specificity, no unverified claims) plus the research artifact rubric in Layer 2.
|
|
927
|
+
|
|
928
|
+
### Q: How do I know which judge's feedback to prioritize?
|
|
929
|
+
|
|
930
|
+
Use this heuristic:
|
|
931
|
+
|
|
932
|
+
- If the Critic identifies a **specific failure scenario** (e.g., "this will fail when the input is empty"), prioritize that — it is a real bug.
|
|
933
|
+
- If the Expert identifies a **methodological weakness** (e.g., "the decision flow at Step 3 is unclear"), prioritize that — it affects every use of the artifact.
|
|
934
|
+
- If the Auditor identifies **missing cross-references or sections**, these are quick to fix and should be addressed first to stop them from dragging down future evaluations.
|
|
935
|
+
|
|
936
|
+
### Q: The meta-judge says "human review needed: YES." What do I do?
|
|
937
|
+
|
|
938
|
+
Read the meta-judge's reasoning carefully. "Human review needed" means the three judges had fundamentally different interpretations of the artifact's quality — not just score variance, but genuine disagreement about what the artifact is trying to do. This usually means the artifact's scope or intent needs clarification.
|
|
939
|
+
|
|
940
|
+
Rewrite the Overview section to make the purpose unambiguous, then re-run the full evaluation.
|
|
941
|
+
|
|
942
|
+
### Q: Can I add custom dimensions to the evaluation?
|
|
943
|
+
|
|
944
|
+
Not through `/bto-test` directly, which uses the fixed five-dimension rubric. For custom evaluation criteria, use the judge rubrics reference (`references/judge-rubrics.md`) as a template and create a custom evaluation command that loads it with domain-specific additions.
|
|
945
|
+
|
|
946
|
+
### Q: /bto-build created files I do not want. How do I clean up?
|
|
947
|
+
|
|
948
|
+
BUILD always outputs to `.claude/skills/<name>/` or `.claude/commands/<name>.md` depending on type. Remove the generated directory or file manually:
|
|
949
|
+
|
|
950
|
+
```bash
|
|
951
|
+
rm -rf .claude/skills/unwanted-skill/
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
BTO does not delete files automatically.
|
|
955
|
+
|
|
956
|
+
### Q: What is the difference between /bto and /bto-build + /bto-test + /bto-optimize run separately?
|
|
957
|
+
|
|
958
|
+
Functionally, the full pipeline produces the same result either way. The difference is that `/bto` handles the transitions automatically: it decides whether to run OPTIMIZE based on the TEST score, and it presents a single consolidated checkpoint at the end. Running the three commands separately gives you a checkpoint after each stage and more granular control.
|
|
959
|
+
|
|
960
|
+
Use `/bto` for new artifacts. Use the individual commands for auditing or maintaining existing artifacts.
|