@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.
Files changed (84) hide show
  1. package/README.md +289 -0
  2. package/bin/cli.js +5 -0
  3. package/package.json +43 -0
  4. package/src/cli.js +157 -0
  5. package/src/commands/doctor.js +469 -0
  6. package/src/commands/init.js +171 -0
  7. package/src/commands/list.js +147 -0
  8. package/src/commands/remove.js +197 -0
  9. package/src/commands/update.js +191 -0
  10. package/src/utils.js +274 -0
  11. package/templates/.claude/agents/cjm-variant-worker.md +60 -0
  12. package/templates/.claude/agents/discovery-worker.md +45 -0
  13. package/templates/.claude/agents/parallel-research-orchestrator.md +70 -0
  14. package/templates/.claude/agents/presentation-worker.md +55 -0
  15. package/templates/.claude/agents/research-worker.md +43 -0
  16. package/templates/.claude/commands/architecture-phase.md +37 -0
  17. package/templates/.claude/commands/casarium.md +163 -0
  18. package/templates/.claude/commands/cjm-prototype.md +42 -0
  19. package/templates/.claude/commands/discovery.md +34 -0
  20. package/templates/.claude/commands/explore-case.md +22 -0
  21. package/templates/.claude/commands/harvest.md +67 -0
  22. package/templates/.claude/commands/new-research.md +69 -0
  23. package/templates/.claude/commands/parallel-research.md +45 -0
  24. package/templates/.claude/commands/presentation.md +49 -0
  25. package/templates/.claude/commands/research.md +32 -0
  26. package/templates/.claude/commands/solve.md +36 -0
  27. package/templates/.claude/rules/agent-swarm.md +31 -0
  28. package/templates/.claude/rules/anti-patterns.md +19 -0
  29. package/templates/.claude/rules/checkpoint-protocol.md +23 -0
  30. package/templates/.claude/rules/domain-specific.md +32 -0
  31. package/templates/.claude/rules/file-conventions.md +38 -0
  32. package/templates/.claude/rules/modular-reuse.md +35 -0
  33. package/templates/.claude/rules/research-quality.md +20 -0
  34. package/templates/.claude/settings.json +37 -0
  35. package/templates/.claude/skills/explore/SKILL.md +215 -0
  36. package/templates/.claude/skills/explore/references/questioning-techniques.md +151 -0
  37. package/templates/.claude/skills/explore/references/task-brief-templates.md +355 -0
  38. package/templates/.claude/skills/frontend-design/LICENSE.txt +177 -0
  39. package/templates/.claude/skills/frontend-design/SKILL.md +42 -0
  40. package/templates/.claude/skills/goap-research-ed25519/SKILL.md +415 -0
  41. package/templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md +658 -0
  42. package/templates/.claude/skills/goap-research-ed25519/references/research-actions.md +544 -0
  43. package/templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md +560 -0
  44. package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +662 -0
  45. package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +720 -0
  46. package/templates/.claude/skills/presentation-storyteller/SKILL.md +371 -0
  47. package/templates/.claude/skills/presentation-storyteller/references/example-presentation.md +273 -0
  48. package/templates/.claude/skills/presentation-storyteller/references/slide-types.md +426 -0
  49. package/templates/.claude/skills/presentation-storyteller/references/sources-index-template.md +213 -0
  50. package/templates/.claude/skills/presentation-storyteller/references/speaker-script-patterns.md +324 -0
  51. package/templates/.claude/skills/presentation-storyteller/references/storytelling-frameworks.md +270 -0
  52. package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +562 -0
  53. package/templates/.claude/skills/reverse-engineering-unicorn/SKILL.md +194 -0
  54. package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-cjm-example.md +100 -0
  55. package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-module1-example.md +88 -0
  56. package/templates/.claude/skills/reverse-engineering-unicorn/modules/01-intelligence.md +328 -0
  57. package/templates/.claude/skills/reverse-engineering-unicorn/modules/02-product-customers.md +221 -0
  58. package/templates/.claude/skills/reverse-engineering-unicorn/modules/025-cjm-prototype.md +206 -0
  59. package/templates/.claude/skills/reverse-engineering-unicorn/modules/03-market-competition.md +402 -0
  60. package/templates/.claude/skills/reverse-engineering-unicorn/modules/04-business-finance.md +287 -0
  61. package/templates/.claude/skills/reverse-engineering-unicorn/modules/05-growth-engine.md +290 -0
  62. package/templates/.claude/skills/reverse-engineering-unicorn/modules/06-playbook-synthesis.md +286 -0
  63. package/templates/.claude/skills/reverse-engineering-unicorn/references/blue-ocean-canvas.md +39 -0
  64. package/templates/.claude/skills/reverse-engineering-unicorn/references/industry-benchmarks.md +67 -0
  65. package/templates/.claude/skills/reverse-engineering-unicorn/references/jtbd-canvas.md +48 -0
  66. package/templates/CLAUDE.md +185 -0
  67. package/templates/TOOLKIT_HARVEST.md +29 -0
  68. package/templates/docs/keysarium/01-deployment-guide.md +768 -0
  69. package/templates/docs/keysarium/02-admin-guide.md +1170 -0
  70. package/templates/docs/keysarium/03-user-guide.md +884 -0
  71. package/templates/docs/keysarium/04-infrastructure-requirements.md +967 -0
  72. package/templates/docs/keysarium/05-architecture.md +706 -0
  73. package/templates/docs/keysarium/06-user-flows.md +925 -0
  74. package/templates/docs/skills-bto/01-deployment-guide.md +828 -0
  75. package/templates/docs/skills-bto/02-admin-guide.md +1052 -0
  76. package/templates/docs/skills-bto/03-user-guide.md +960 -0
  77. package/templates/docs/skills-bto/04-infrastructure-requirements.md +610 -0
  78. package/templates/docs/skills-bto/05-architecture.md +1112 -0
  79. package/templates/docs/skills-bto/06-user-flows.md +977 -0
  80. package/templates/lib/agent-patterns.md +115 -0
  81. package/templates/lib/domain-templates.md +172 -0
  82. package/templates/lib/phase-utils.md +107 -0
  83. package/templates/lib/skill-loader.md +78 -0
  84. package/templates/researches/.gitkeep +0 -0
@@ -0,0 +1,610 @@
1
+ # Infrastructure Requirements — @dzhechko/skills-bto
2
+
3
+ ## Contents
4
+
5
+ 1. [Overview](#1-overview)
6
+ 2. [Hardware Requirements](#2-hardware-requirements)
7
+ 3. [Software Dependencies](#3-software-dependencies)
8
+ 4. [API Token Consumption](#4-api-token-consumption)
9
+ 5. [Model Cost Breakdown](#5-model-cost-breakdown)
10
+ 6. [Network Requirements](#6-network-requirements)
11
+ 7. [Storage Requirements](#7-storage-requirements)
12
+ 8. [Scaling Considerations](#8-scaling-considerations)
13
+ 9. [Cost Optimization Strategies](#9-cost-optimization-strategies)
14
+ 10. [Readiness Checklist](#10-readiness-checklist)
15
+
16
+ ---
17
+
18
+ ## 1. Overview
19
+
20
+ @dzhechko/skills-bto is a lightweight Claude Code skill pack. It has no server component, no database, no persistent process, and no binary dependencies beyond Node.js and the Claude Code CLI. All computation is delegated to the Anthropic API via HTTPS.
21
+
22
+ ### Architecture
23
+
24
+ ```
25
+ ┌──────────────────────────────────────────────────┐
26
+ │ Developer Machine │
27
+ │ │
28
+ │ ┌──────────────────────────────────────────┐ │
29
+ │ │ Claude Code CLI │ │
30
+ │ │ ├── .claude/skills/bto/ │ │
31
+ │ │ │ ├── SKILL.md │ │
32
+ │ │ │ ├── modules/ │ │
33
+ │ │ │ └── references/ │ │
34
+ │ │ └── .claude/commands/ │ │
35
+ │ │ ├── bto.md │ │
36
+ │ │ ├── bto-build.md │ │
37
+ │ │ ├── bto-test.md │ │
38
+ │ │ └── bto-optimize.md │ │
39
+ │ └─────────────────┬────────────────────────┘ │
40
+ │ │ HTTPS (port 443) │
41
+ └────────────────────┼─────────────────────────────┘
42
+ │
43
+ ┌───────▼────────┐
44
+ │ Anthropic API │
45
+ │ claude-haiku │
46
+ │ claude-sonnet │
47
+ │ claude-opus │
48
+ └────────────────┘
49
+ ```
50
+
51
+ There are no additional services to operate. No Redis, no queues, no vector databases. The only external dependency is the Anthropic API.
52
+
53
+ ---
54
+
55
+ ## 2. Hardware Requirements
56
+
57
+ BTO is a CLI-driven tool. It does not perform local computation beyond running Node.js and reading/writing markdown files. Hardware requirements are minimal.
58
+
59
+ ### 2.1. Minimum requirements
60
+
61
+ | Component | Minimum | Recommended | Notes |
62
+ |-----------|---------|-------------|-------|
63
+ | CPU | 1 core | 2+ cores | BTO itself is not CPU-intensive; multi-core helps when running Claude Code alongside a browser and IDE |
64
+ | RAM | 2 GB | 4+ GB | Node.js + Claude Code process; parallel agent runs do not consume additional local RAM |
65
+ | Disk | 50 MB free | SSD, 200+ MB free | BTO skill files are tiny; evaluation reports are markdown |
66
+ | Terminal | 80 × 24 | 120+ columns | Wider terminals display evaluation tables without wrapping |
67
+
68
+ ### 2.2. Why hardware barely matters
69
+
70
+ BTO's workload profile is:
71
+ - Read a handful of markdown files (< 200 KB total)
72
+ - Send HTTPS requests to the Anthropic API
73
+ - Write markdown evaluation reports (< 50 KB each)
74
+
75
+ The compute-intensive work — language model inference — runs entirely on Anthropic's infrastructure. Your machine is an orchestrator. A five-year-old laptop with 4 GB of RAM and a stable internet connection is sufficient for any BTO operation.
76
+
77
+ ### 2.3. Local parallelism
78
+
79
+ When BTO runs the Layer 2 judge panel, it spawns three parallel agent calls using Claude Code's Agent tool. These three calls run concurrently as API requests — not as local processes. Your machine is waiting for three HTTP responses at the same time. The relevant resource is network bandwidth, not CPU or RAM.
80
+
81
+ The same applies to the five parallel mutation agents in OPTIMIZE Round 1. Five API calls in flight simultaneously. Local resource impact is negligible.
82
+
83
+ ---
84
+
85
+ ## 3. Software Dependencies
86
+
87
+ ### 3.1. Required software
88
+
89
+ | Component | Version | Check | Purpose |
90
+ |-----------|---------|-------|---------|
91
+ | Node.js | 18+ (20+ recommended) | `node --version` | Claude Code runtime |
92
+ | npm | 9+ | `npm --version` | Package manager |
93
+ | Claude Code CLI | Latest | `claude --version` | Core execution environment |
94
+ | git | 2.20+ | `git --version` | Version control for artifacts |
95
+
96
+ ### 3.2. Installing Node.js
97
+
98
+ ```bash
99
+ # Via nvm (recommended — allows version switching)
100
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
101
+ source ~/.bashrc
102
+ nvm install 20
103
+ nvm use 20
104
+ node --version # should print v20.x.x
105
+ ```
106
+
107
+ ```bash
108
+ # macOS via Homebrew
109
+ brew install node@20
110
+
111
+ # Ubuntu / Debian
112
+ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
113
+ sudo apt-get install -y nodejs
114
+ ```
115
+
116
+ ### 3.3. Installing Claude Code CLI
117
+
118
+ ```bash
119
+ npm install -g @anthropic-ai/claude-code
120
+ claude --version
121
+ ```
122
+
123
+ ### 3.4. Installing @dzhechko/skills-bto
124
+
125
+ ```bash
126
+ # In your project directory
127
+ npx dz-skills-bto init
128
+
129
+ # Verify installation
130
+ npx dz-skills-bto doctor
131
+ ```
132
+
133
+ The `init` command installs the skill files into `.claude/skills/bto/` and the four command files into `.claude/commands/`. No global installation is required.
134
+
135
+ `doctor` runs a self-check that verifies:
136
+ - All skill files present and non-empty
137
+ - All command files present and reference correct skill paths
138
+ - Node.js and Claude Code versions are compatible
139
+ - Anthropic API key is configured (environment variable present — it does not test the key itself)
140
+
141
+ ### 3.5. API key configuration
142
+
143
+ BTO does not manage API keys. Claude Code uses the key configured in the environment or Claude Code's credential store.
144
+
145
+ ```bash
146
+ # Option 1: Environment variable (recommended for CI)
147
+ export ANTHROPIC_API_KEY=sk-ant-...
148
+
149
+ # Option 2: Claude Code credential store (recommended for interactive use)
150
+ claude auth login
151
+ ```
152
+
153
+ ### 3.6. No optional dependencies
154
+
155
+ BTO has no optional dependencies. There is no database integration, no telemetry, no webhook configuration. All state is in markdown files on disk.
156
+
157
+ ---
158
+
159
+ ## 4. API Token Consumption
160
+
161
+ This section provides token estimates for each BTO operation. Estimates assume a medium-complexity Claude Code artifact (skill, approximately 8 KB of content). Actual consumption scales with artifact size and content length.
162
+
163
+ ### 4.1. /bto-test estimates
164
+
165
+ #### Layer 0 only
166
+
167
+ Layer 0 makes no API calls. Token cost: zero.
168
+
169
+ #### Layer 1 (haiku, 1 call)
170
+
171
+ | Component | Tokens (approx.) |
172
+ |-----------|-----------------|
173
+ | System prompt + rubric | 1,200 |
174
+ | Artifact content | 2,000 |
175
+ | Output (scores + improvements) | 600 |
176
+ | **Total per Layer 1 run** | **~3,800** |
177
+
178
+ #### Layer 2 (sonnet, 3 parallel calls)
179
+
180
+ | Component | Per judge | × 3 judges |
181
+ |-----------|----------:|----------:|
182
+ | System prompt (judge-specific) | 1,500 | 4,500 |
183
+ | Artifact content | 2,000 | 6,000 |
184
+ | Output (scores + justifications) | 1,500 | 4,500 |
185
+ | **Total Layer 2** | **5,000** | **~15,000** |
186
+
187
+ #### Meta-judge (opus, 1 call — triggered only on disagreement)
188
+
189
+ | Component | Tokens (approx.) |
190
+ |-----------|-----------------|
191
+ | Three judge evaluations (input) | 4,500 |
192
+ | System prompt | 800 |
193
+ | Reconciliation output | 600 |
194
+ | **Total meta-judge call** | **~5,900** |
195
+
196
+ #### /bto-test full run summary
197
+
198
+ | Level | API calls | Model(s) | Est. tokens | Triggered |
199
+ |-------|----------:|---------|------------:|---------|
200
+ | Layer 0 | 0 | — | 0 | Always |
201
+ | Layer 1 | 1 | haiku | ~3,800 | If L0 passes |
202
+ | Layer 2 | 3 | sonnet | ~15,000 | If L1 passes |
203
+ | Meta-judge | 0–1 | opus | ~5,900 | If disagreement >3 |
204
+ | **Full /bto-test** | **4–5** | mixed | **~18,800–24,700** | |
205
+
206
+ ### 4.2. /bto-build estimates
207
+
208
+ #### QUICK mode
209
+
210
+ | Component | Model | Tokens (approx.) |
211
+ |-----------|-------|-----------------|
212
+ | Type detection + requirements parsing | default | 1,500 |
213
+ | Artifact generation (SKILL.md) | default | 8,000 |
214
+ | Module generation (per module) | default | 4,000 |
215
+ | Reference generation (per reference) | default | 2,500 |
216
+ | Example generation (per example) | default | 2,000 |
217
+ | Self-review (Layer 0 equivalent) | — | 0 |
218
+ | **Typical QUICK run (1 skill, 2 modules, 1 ref, 1 example)** | | **~22,000** |
219
+
220
+ #### DEEP mode (adds explore skill)
221
+
222
+ DEEP mode adds approximately 8,000 to 12,000 tokens for the requirements clarification dialogue before generation begins. Add this to the QUICK mode estimate.
223
+
224
+ | Component | Additional tokens |
225
+ |-----------|-----------------|
226
+ | Explore skill system prompt | 2,000 |
227
+ | Clarification dialogue (3-5 exchanges) | 6,000–10,000 |
228
+ | **Additional cost for DEEP mode** | **~8,000–12,000** |
229
+
230
+ ### 4.3. /bto-optimize estimates
231
+
232
+ This is the most token-intensive operation in BTO.
233
+
234
+ #### Full 3-round optimization
235
+
236
+ | Operation | Count | Model | Tokens each | Total |
237
+ |-----------|------:|-------|------------:|------:|
238
+ | Baseline evaluation (Layer 2) | 1 | sonnet ×3 | 15,000 | 15,000 |
239
+ | Round 1 variant generation | 5 | opus | 5,000 | 25,000 |
240
+ | Round 1 evaluation (Layer 1) | 5 | haiku | 3,800 | 19,000 |
241
+ | Crossover generation (R1→R2) | 3 | opus | 5,000 | 15,000 |
242
+ | Round 2 evaluation (Layer 1) | 3 | haiku | 3,800 | 11,400 |
243
+ | Crossover generation (R2→R3) | 3 | opus | 5,000 | 15,000 |
244
+ | Round 3 evaluation (Layer 2) | 3 | sonnet ×3 | 15,000 | 45,000 |
245
+ | **Total (3 rounds, 15 evaluations)** | | | | **~131,000** |
246
+
247
+ Note: if convergence is detected after Round 2, Round 3 evaluation is skipped. The minimum cost scenario (convergence after Round 1) uses approximately 74,000 tokens.
248
+
249
+ ### 4.4. /bto full pipeline estimates
250
+
251
+ | Stage | Est. tokens |
252
+ |-------|------------:|
253
+ | BUILD (QUICK mode, typical skill) | ~22,000 |
254
+ | TEST (full, no meta-judge) | ~18,800 |
255
+ | OPTIMIZE (3 rounds) | ~131,000 |
256
+ | **Full /bto pipeline** | **~172,000** |
257
+
258
+ For a description-triggered build where DEEP mode is invoked: add approximately 10,000 tokens to the BUILD phase.
259
+
260
+ ---
261
+
262
+ ## 5. Model Cost Breakdown
263
+
264
+ BTO uses three models with deliberate cost tiering. The model selection is not a preference — it is a quality gate architecture.
265
+
266
+ ### 5.1. Model selection rationale
267
+
268
+ | Layer / Task | Model | Why this model |
269
+ |-------------|-------|---------------|
270
+ | Layer 0 | None | Deterministic checks need no LLM |
271
+ | Layer 1 evaluation | haiku | Fast coherence scan; no deep reasoning needed |
272
+ | Layer 2 Judge 1 (Expert) | sonnet | Domain knowledge + nuanced scoring |
273
+ | Layer 2 Judge 2 (Critic) | sonnet | Adversarial analysis requires reasoning |
274
+ | Layer 2 Judge 3 (Auditor) | sonnet | Structured coverage check |
275
+ | Meta-judge | opus | Disagreement resolution requires synthesis across three evaluations |
276
+ | Variant generation | opus | Creative mutation requires understanding quality dimensions |
277
+ | Crossover generation | opus | Novel synthesis of best candidates |
278
+ | Fast-eval in optimization | haiku | Volume scoring before full panel |
279
+
280
+ The key constraint: **the generator and the judges must use different models.** BTO enforces this as a hard rule. If the same model generates and evaluates the artifact, the evaluation becomes circular — the model knows its own output patterns and cannot assess them objectively.
281
+
282
+ ### 5.2. Approximate cost per operation (March 2026 pricing)
283
+
284
+ Prices are estimates. Check Anthropic's pricing page for current rates. Token counts are based on medium-complexity artifacts (~8 KB skill).
285
+
286
+ | Operation | Primary model | Est. tokens | Approx. cost |
287
+ |-----------|-------------|------------:|-------------:|
288
+ | /bto-test Layer 1 only | haiku | ~3,800 | < $0.01 |
289
+ | /bto-test full (no meta-judge) | sonnet + haiku | ~18,800 | ~$0.05 |
290
+ | /bto-test full (with meta-judge) | sonnet + haiku + opus | ~24,700 | ~$0.10 |
291
+ | /bto-build QUICK | opus | ~22,000 | ~$0.25 |
292
+ | /bto-build DEEP | opus | ~32,000 | ~$0.35 |
293
+ | /bto-optimize (3 rounds) | opus + sonnet + haiku | ~131,000 | ~$1.50 |
294
+ | /bto full pipeline | opus + sonnet + haiku | ~172,000 | ~$2.00 |
295
+
296
+ These are estimates for a single medium-complexity artifact. A simple command (under 3 KB) will cost significantly less. A large multi-module skill (over 20 KB) will cost more.
297
+
298
+ ### 5.3. Layer 0 as a cost gate
299
+
300
+ Layer 0 is the most important cost optimization built into BTO. By running deterministic checks before any LLM call, BTO filters out structurally broken artifacts before spending API budget on them.
301
+
302
+ In practice, Layer 0 catches approximately 60% of quality issues without any token spend. Only artifacts that pass Layer 0 proceed to Layer 1, and only those that pass Layer 1 proceed to the full Layer 2 panel.
303
+
304
+ The total cost of running Layer 0 on any artifact, any number of times: zero.
305
+
306
+ ---
307
+
308
+ ## 6. Network Requirements
309
+
310
+ BTO communicates only with the Anthropic API. All communication is HTTPS over port 443.
311
+
312
+ ### 6.1. Bandwidth
313
+
314
+ BTO payloads are small. Requests contain the system prompt, artifact content, and evaluation instructions. Responses contain scores and text. Total payload per API call is typically 10 KB to 50 KB.
315
+
316
+ | Operation type | Approx. payload per call | Calls | Total transfer |
317
+ |---------------|------------------------:|------:|---------------:|
318
+ | Layer 1 evaluation | ~20 KB | 1 | ~20 KB |
319
+ | Layer 2 judge | ~30 KB | 3 | ~90 KB |
320
+ | Variant generation | ~40 KB | 5 | ~200 KB |
321
+ | Full /bto pipeline | — | ~20 | ~500 KB |
322
+
323
+ A full BTO pipeline transfers under 1 MB. Bandwidth is not a limiting factor on any connection above 1 Mbps.
324
+
325
+ ### 6.2. Latency sensitivity
326
+
327
+ BTO is not real-time or interactive during agent execution. Each API call may take 5 to 30 seconds depending on model, payload size, and Anthropic API load. The operations that benefit most from low latency are:
328
+
329
+ - Layer 2 judge panel: 3 parallel calls, each ~10-20 seconds → wall time ~20 seconds on low latency, ~45 seconds on high latency
330
+ - Optimization Round 1: 5 parallel calls, each ~10 seconds → wall time ~15-25 seconds
331
+
332
+ A stable broadband connection (20 Mbps+, < 100ms RTT to api.anthropic.com) is sufficient. Wi-Fi is fine. Mobile hotspot is usable but may introduce variability in parallel call timings.
333
+
334
+ ### 6.3. Offline capability
335
+
336
+ BTO cannot operate offline. Every Layer 1, Layer 2, BUILD, and OPTIMIZE operation requires API access. Layer 0 runs entirely locally and works offline.
337
+
338
+ If you anticipate working without internet access, run Layer 0 on all artifacts before going offline to identify structural issues you can fix locally.
339
+
340
+ ### 6.4. Proxy and firewall requirements
341
+
342
+ If your network routes traffic through a proxy or firewall, ensure outbound HTTPS connections to `api.anthropic.com` (port 443) are permitted. No other domain or port is required.
343
+
344
+ ```
345
+ Required: api.anthropic.com:443 (HTTPS/TLS)
346
+ Optional: none
347
+ ```
348
+
349
+ ---
350
+
351
+ ## 7. Storage Requirements
352
+
353
+ BTO artifacts are markdown files. Storage requirements are minimal.
354
+
355
+ ### 7.1. BTO skill files
356
+
357
+ The installed BTO skill occupies:
358
+
359
+ | Directory | Size (approx.) |
360
+ |-----------|---------------:|
361
+ | `.claude/skills/bto/SKILL.md` | ~8 KB |
362
+ | `.claude/skills/bto/modules/` (3 files) | ~25 KB |
363
+ | `.claude/skills/bto/references/` (4 files) | ~30 KB |
364
+ | `.claude/skills/bto/examples/` (1 file) | ~5 KB |
365
+ | `.claude/commands/bto*.md` (4 files) | ~15 KB |
366
+ | **Total installation footprint** | **~83 KB** |
367
+
368
+ ### 7.2. Evaluation reports
369
+
370
+ Each BTO test run generates an evaluation report. Reports are written as markdown files in the same directory as the evaluated artifact.
371
+
372
+ | Report type | Typical size |
373
+ |-------------|-------------:|
374
+ | Layer 0 report | ~1 KB |
375
+ | Layer 1 report | ~2 KB |
376
+ | Layer 2 report (3 judges) | ~8 KB |
377
+ | Meta-judge addendum | ~2 KB |
378
+ | Optimization report | ~5 KB |
379
+ | **Full /bto run report** | **~18 KB** |
380
+
381
+ ### 7.3. Storage for optimization variants
382
+
383
+ During optimization, BTO generates intermediate variant files. These are written to a temporary directory and deleted after the optimization completes (or you decline to apply the result).
384
+
385
+ Temporary storage during a 3-round optimization:
386
+ - 5 Round 1 variants × artifact size
387
+ - 3 Round 2 variants × artifact size
388
+ - 3 Round 3 variants × artifact size
389
+ - Total: ~11 × artifact size
390
+
391
+ For a typical 8 KB skill: approximately 88 KB of temporary storage. For a 30 KB skill: approximately 330 KB. These files are removed after the checkpoint confirmation.
392
+
393
+ ### 7.4. Long-term storage growth
394
+
395
+ If you evaluate artifacts regularly, the evaluation reports accumulate over time. A team running daily evaluations over a year generates roughly:
396
+
397
+ ```
398
+ 20 evaluations/week × 18 KB/evaluation × 52 weeks = ~19 MB/year
399
+ ```
400
+
401
+ This is not a meaningful storage concern. Reports can be committed to git alongside the artifacts they evaluate, providing a historical quality audit trail.
402
+
403
+ ### 7.5. Recommendation for report storage
404
+
405
+ Commit evaluation reports to git alongside your artifacts. The naming convention is:
406
+
407
+ ```
408
+ <artifact-name>.eval-layer0.md
409
+ <artifact-name>.eval-layer1.md
410
+ <artifact-name>.eval-layer2.md
411
+ <artifact-name>.opt-report.md
412
+ ```
413
+
414
+ Reports should live in the same directory as the artifact they describe.
415
+
416
+ ---
417
+
418
+ ## 8. Scaling Considerations
419
+
420
+ BTO is designed for individual or small-team use. It can be adapted for larger-scale batch evaluation with some considerations.
421
+
422
+ ### 8.1. Single-user usage
423
+
424
+ One developer running BTO interactively. No special configuration needed. API rate limits for Anthropic's standard tier are sufficient for all BTO operations without throttling.
425
+
426
+ Typical daily usage: 2 to 5 full BTO pipeline runs = approximately 500K to 1M tokens.
427
+
428
+ ### 8.2. Team usage (2-10 developers)
429
+
430
+ Multiple developers on the same Anthropic account or workspace. No conflicts with BTO itself — each run is independent. The only consideration is shared API rate limits.
431
+
432
+ If your team is hitting rate limits:
433
+ 1. Stagger optimization runs (they consume the most tokens)
434
+ 2. Use `--level layer1` for rapid iteration; run full evaluations less frequently
435
+ 3. Consider separate API keys per developer for rate limit isolation
436
+
437
+ ### 8.3. Batch evaluation
438
+
439
+ You may want to run BTO evaluation across all skills in a project as part of a quality gate. There is no native batch mode, but you can script sequential runs:
440
+
441
+ ```bash
442
+ for skill_dir in .claude/skills/*/; do
443
+ claude /bto-test "$skill_dir" --level layer2
444
+ done
445
+ ```
446
+
447
+ For parallel batch runs, be aware that running 5+ Layer 2 evaluations simultaneously means 15+ concurrent sonnet calls. Check your account's concurrent request limits.
448
+
449
+ Recommended batch approach:
450
+ 1. Run Layer 0 on all artifacts simultaneously (no API calls)
451
+ 2. Run Layer 1 on all passing artifacts sequentially (cheap, fast)
452
+ 3. Run Layer 2 only on artifacts that score below 7.5 on Layer 1 (cost control)
453
+
454
+ ### 8.4. CI/CD integration
455
+
456
+ BTO can be integrated into CI/CD pipelines to enforce quality gates on skill and command changes. The practical integration point is Layer 0, which runs for free and catches the most common issues.
457
+
458
+ Example GitHub Actions step:
459
+
460
+ ```yaml
461
+ - name: BTO Layer 0 quality check
462
+ run: |
463
+ npx dz-skills-bto doctor
464
+ claude /bto-test .claude/skills/ --level layer0
465
+ env:
466
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
467
+ ```
468
+
469
+ Layer 1 in CI is viable (cheap, fast) but adds API dependency. Layer 2 in CI is expensive and should be reserved for pre-release gates, not every commit.
470
+
471
+ Recommended CI quality gate strategy:
472
+
473
+ | Gate | Layer | Trigger | Cost |
474
+ |------|-------|---------|------|
475
+ | Pre-commit | Layer 0 | Every commit | Free |
476
+ | Pull request | Layer 1 | Every PR | ~$0.01 per artifact |
477
+ | Pre-release | Layer 2 | Release branch merge | ~$0.05 per artifact |
478
+
479
+ ### 8.5. Anthropic API rate limits
480
+
481
+ At time of writing (March 2026), Anthropic's standard API tier provides:
482
+
483
+ - Input tokens per minute: varies by tier and model
484
+ - Concurrent requests: varies by tier
485
+
486
+ BTO's parallel operations (3 judges in Layer 2, 5 mutation agents in Round 1) may approach or exceed rate limits on entry-level API tiers when run repeatedly in quick succession. If you see rate limit errors:
487
+
488
+ 1. The failing command will surface the HTTP 429 error
489
+ 2. Wait 60 seconds and retry
490
+ 3. For sustained high volume, contact Anthropic about increased rate limits or an enterprise tier
491
+
492
+ ---
493
+
494
+ ## 9. Cost Optimization Strategies
495
+
496
+ ### 9.1. Use the right layer for the task
497
+
498
+ The biggest cost optimization is choosing the evaluation depth that matches your need.
499
+
500
+ | Scenario | Recommended level | Why |
501
+ |----------|------------------|-----|
502
+ | Checking if a just-written artifact compiles structurally | Layer 0 | Free |
503
+ | Rapid iteration during active development | Layer 1 | $0.01; results in 10 seconds |
504
+ | Final quality check before committing | Layer 2 | $0.05; comprehensive |
505
+ | Before releasing a skill publicly | Full pipeline | Worth the cost |
506
+ | CI check on every commit | Layer 0 only | Free; catches regressions |
507
+
508
+ ### 9.2. Do not optimize artifacts that do not need it
509
+
510
+ The threshold is clear: if Layer 2 score >= 8.0, skip optimization. The BUILD module produces artifacts that typically score 7.0 to 7.5 on first evaluation. Optimization is designed to close the gap from 7.x to 8+. Running optimization on an 8.5-scoring artifact wastes approximately 131K tokens for negligible gain.
511
+
512
+ ### 9.3. Use convergence as a budget signal
513
+
514
+ If the optimizer converges after Round 1 (delta < 0.5), Round 2 and Round 3 are skipped automatically. This can reduce the full optimization cost from ~131K tokens to ~74K tokens. It also signals that the artifact is already near its improvement ceiling given the current mutation strategies.
515
+
516
+ ### 9.4. Batch Layer 1 before Layer 2
517
+
518
+ When evaluating multiple artifacts, run all of them through Layer 1 first. Only promote the ones scoring below 7.5 to Layer 2. This is the hierarchical evaluation pattern built into BTO's architecture.
519
+
520
+ Example for a project with 10 skills to evaluate:
521
+ - Layer 1 on all 10: 10 haiku calls = ~38,000 tokens ≈ $0.10
522
+ - Suppose 4 score below 7.5 → Layer 2 on 4: 12 sonnet calls = ~60,000 tokens ≈ $0.30
523
+ - Total: ~$0.40 instead of $0.50 for all-Layer-2
524
+
525
+ The savings are modest at small scale but matter when evaluating 50+ artifacts.
526
+
527
+ ### 9.5. Scope optimization correctly
528
+
529
+ The optimization token cost scales with artifact size because each variant generation and evaluation includes the full artifact content. Keep artifacts within their intended size bounds:
530
+
531
+ | Artifact type | Target size | Cost impact of 2× oversize |
532
+ |--------------|-------------|---------------------------|
533
+ | SKILL.md | 5–15 KB | ~$1 additional per full optimize |
534
+ | Command | 2–8 KB | ~$0.30 additional |
535
+ | Rule | 1–5 KB | ~$0.10 additional |
536
+
537
+ If SKILL.md is approaching 30 KB, split it into modules before running optimization. The individual modules will optimize faster and cheaper than the monolith.
538
+
539
+ ### 9.6. Layer 0 is always free — use it liberally
540
+
541
+ Run Layer 0 checks as often as you want. After any edit to an artifact, before committing, after a rename, after reorganizing directories — Layer 0 costs nothing and catches structural regressions immediately. There is no reason to ever skip Layer 0.
542
+
543
+ ### 9.7. Monitor costs with git commit boundaries
544
+
545
+ Commit your artifacts to git before running optimization. The git diff gives you a free before/after comparison, and if the optimization result is disappointing, you can restore with `git checkout`. This avoids re-running BUILD (another ~22K tokens) if you need to revert.
546
+
547
+ ---
548
+
549
+ ## 10. Readiness Checklist
550
+
551
+ Use this checklist before your first BTO run to confirm the environment is properly configured.
552
+
553
+ ### Software
554
+
555
+ - [ ] Node.js 18+ installed (`node --version` returns v18.x.x or higher)
556
+ - [ ] npm 9+ installed (`npm --version` returns 9.x.x or higher)
557
+ - [ ] Claude Code CLI installed (`claude --version` succeeds)
558
+ - [ ] git installed (`git --version` succeeds)
559
+ - [ ] @dzhechko/skills-bto initialized (`npx dz-skills-bto init` completed)
560
+
561
+ ### Files
562
+
563
+ - [ ] `.claude/skills/bto/SKILL.md` exists and is non-empty
564
+ - [ ] `.claude/skills/bto/modules/` contains build.md, test.md, optimize.md
565
+ - [ ] `.claude/skills/bto/references/` contains the four reference files
566
+ - [ ] `.claude/commands/bto.md` exists
567
+ - [ ] `.claude/commands/bto-build.md` exists
568
+ - [ ] `.claude/commands/bto-test.md` exists
569
+ - [ ] `.claude/commands/bto-optimize.md` exists
570
+
571
+ ### API access
572
+
573
+ - [ ] `ANTHROPIC_API_KEY` environment variable set, or `claude auth login` completed
574
+ - [ ] Outbound HTTPS to `api.anthropic.com:443` is permitted by firewall/proxy
575
+ - [ ] API key has access to claude-haiku, claude-sonnet, and claude-opus
576
+
577
+ ### Verification
578
+
579
+ Run the doctor command to confirm everything:
580
+
581
+ ```bash
582
+ npx dz-skills-bto doctor
583
+ ```
584
+
585
+ Expected output when everything is in order:
586
+
587
+ ```
588
+ BTO Doctor — Health Check
589
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
590
+ Node.js: v20.11.0 OK
591
+ npm: 10.2.4 OK
592
+ Claude Code: 1.x.x OK
593
+ SKILL.md: 8.2 KB OK
594
+ modules/: 3 files OK
595
+ references/: 4 files OK
596
+ commands/: 4 files OK
597
+ API key: present OK (not validated)
598
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
599
+ Status: READY
600
+ Run /bto-test .claude/skills/bto/ to verify end-to-end.
601
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
602
+ ```
603
+
604
+ To do a live end-to-end verification (makes real API calls):
605
+
606
+ ```
607
+ /bto-test .claude/skills/bto/
608
+ ```
609
+
610
+ This runs the BTO evaluation system on itself — using BTO to evaluate the BTO skill. If the evaluation completes with a Layer 2 score >= 7.0, your installation is working correctly.