@dzhechkov/keysarium 1.5.31 → 1.5.33

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 (57) hide show
  1. package/.dz-manifest.json +945 -0
  2. package/README.md +11 -10
  3. package/README.ru.md +8 -5
  4. package/package.json +5 -3
  5. package/sbom.json +2353 -0
  6. package/src/commands/doctor.js +71 -111
  7. package/src/commands/init.js +1 -1
  8. package/src/commands/list.js +1 -1
  9. package/src/commands/remove.js +1 -1
  10. package/src/commands/update.js +1 -1
  11. package/src/utils.js +99 -11
  12. package/templates/.claude/rules/agent-swarm.md +2 -4
  13. package/templates/.claude/rules/background-workers.md +1 -1
  14. package/templates/.claude/rules/dream-cycles.md +1 -0
  15. package/templates/.claude/rules/feature-adr-conventions.md +1 -1
  16. package/templates/.claude/rules/modular-reuse.md +5 -1
  17. package/templates/.claude/rules/reward-learning.md +3 -0
  18. package/templates/.claude/rules/trust-tiers.md +11 -7
  19. package/templates/.claude/skills/edu-site-generator/SKILL.md +1 -1
  20. package/templates/.claude/skills/explore/SKILL.md +1 -1
  21. package/templates/.claude/skills/feature-adr/SKILL.md +1 -1
  22. package/templates/.claude/skills/frontend-design/SKILL.md +1 -1
  23. package/templates/.claude/skills/goap-research-ed25519/SKILL.md +1 -1
  24. package/templates/.claude/skills/knowledge-extractor/SKILL.md +2 -2
  25. package/templates/.claude/skills/knowledge-extractor/modules/04-integrate.md +1 -1
  26. package/templates/.claude/skills/knowledge-extractor/references/maturity-model.md +3 -3
  27. package/templates/.claude/skills/presentation-storyteller/SKILL.md +1 -1
  28. package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +1 -1
  29. package/templates/.claude/skills/reverse-engineering-unicorn/SKILL.md +1 -1
  30. package/templates/CLAUDE.md +20 -40
  31. package/templates/docs/continuous-learning-guide.md +10 -4
  32. package/templates/docs/feature-adr/01-architecture.md +1 -1
  33. package/templates/docs/feature-adr/03-deployment-guide.md +2 -2
  34. package/templates/docs/feature-adr/05-user-guide.md +6 -0
  35. package/templates/docs/improvement-directions.md +7 -1
  36. package/templates/docs/keysarium/01-deployment-guide.md +22 -16
  37. package/templates/docs/keysarium/02-admin-guide.md +7 -1
  38. package/templates/docs/keysarium/03-user-guide.md +6 -0
  39. package/templates/docs/keysarium/04-infrastructure-requirements.md +6 -6
  40. package/templates/docs/keysarium/05-architecture.md +6 -0
  41. package/templates/docs/keysarium/06-user-flows.md +6 -0
  42. package/templates/docs/keysarium-core/02-functionality.md +6 -0
  43. package/templates/docs/keysarium-core/03-deployment-guide.md +11 -5
  44. package/templates/docs/keysarium-core/04-admin-guide.md +12 -6
  45. package/templates/docs/skills-bto/01-deployment-guide.md +6 -0
  46. package/templates/docs/skills-bto/02-admin-guide.md +6 -0
  47. package/templates/docs/skills-bto/03-user-guide.md +6 -0
  48. package/templates/docs/skills-bto/04-infrastructure-requirements.md +6 -0
  49. package/templates/docs/skills-bto/05-architecture.md +6 -0
  50. package/templates/docs/skills-bto/06-user-flows.md +6 -0
  51. package/templates/docs/transcript-site-generator/01-deployment-guide.md +6 -0
  52. package/templates/lib/background-workers.md +1 -1
  53. package/templates/lib/judge-attestation.md +1 -1
  54. package/templates/lib/platform-adapters.md +0 -1
  55. package/templates/lib/platform-templates/opencode.md +1 -2
  56. package/templates/lib/worker-templates/brain-export.md +1 -1
  57. package/templates/lib/worker-templates/health-check.md +2 -2
@@ -5,7 +5,7 @@ const path = require('path');
5
5
  const {
6
6
  green, red, yellow, cyan, bold, dim,
7
7
  info, success, warn, error: logError,
8
- fileExists, readJSON, readManifest,
8
+ fileExists, readJSON, readManifest, getTemplateFileNames,
9
9
  MANIFEST_FILE,
10
10
  } = require('../utils');
11
11
 
@@ -60,7 +60,7 @@ function checkFilesExist(manifest, targetDir) {
60
60
  return {
61
61
  passed: false,
62
62
  detail: `${missing.length} file(s) missing: ${missing.slice(0, 5).join(', ')}${missing.length > 5 ? '...' : ''}`,
63
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore missing files.`,
63
+ fix: `Run ${cyan('npx @dzhechkov/keysarium update')} to restore missing files.`,
64
64
  };
65
65
  });
66
66
  }
@@ -76,7 +76,7 @@ function checkClaudeMd(targetDir) {
76
76
  return {
77
77
  passed: false,
78
78
  detail: 'CLAUDE.md not found',
79
- fix: `Run ${cyan('@dzhechkov/keysarium update')} or ${cyan('@dzhechkov/keysarium init --force')} to restore.`,
79
+ fix: `Run ${cyan('npx @dzhechkov/keysarium update')} or ${cyan('npx @dzhechkov/keysarium init --force')} to restore.`,
80
80
  };
81
81
  }
82
82
 
@@ -117,7 +117,7 @@ function checkSkillsComplete(targetDir) {
117
117
  return {
118
118
  passed: false,
119
119
  detail: '.claude/skills/ directory not found',
120
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore skills.`,
120
+ fix: `Run ${cyan('npx @dzhechkov/keysarium update')} to restore skills.`,
121
121
  };
122
122
  }
123
123
 
@@ -165,141 +165,100 @@ function checkSkillsComplete(targetDir) {
165
165
  }
166
166
 
167
167
  /**
168
- * Check 4: All 11 command .md files are present.
168
+ * Shared body for the "every shipped <thing>.md is installed" checks.
169
+ *
170
+ * The expected list is DERIVED from the package's own templates/ tree, never hardcoded —
171
+ * a command or rule added to templates/ is named-checked on the next run with no edit here.
172
+ * (Regression this guards: the lists used to be frozen at a legacy 11-command / 7-rule
173
+ * subset, so `doctor` reported "All 11 command files present" on a 19-command install and
174
+ * newer files like feature-adr.md / dream.md / reward-learning.md were never named.)
169
175
  */
170
- function checkCommandsPresent(targetDir) {
171
- return check('Commands present', () => {
172
- const commandsDir = path.join(targetDir, '.claude', 'commands');
173
- const expectedCommands = [
174
- 'casarium.md',
175
- 'new-research.md',
176
- 'parallel-research.md',
177
- 'discovery.md',
178
- 'explore-case.md',
179
- 'research.md',
180
- 'cjm-prototype.md',
181
- 'solve.md',
182
- 'architecture-phase.md',
183
- 'presentation.md',
184
- 'harvest.md',
185
- ];
186
-
187
- if (!fileExists(commandsDir)) {
188
- return {
189
- passed: false,
190
- detail: '.claude/commands/ directory not found',
191
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore commands.`,
192
- };
193
- }
176
+ function checkComponentFilesPresent(targetDir, opts) {
177
+ const { checkName, componentKey, dirParts, noun } = opts;
194
178
 
195
- const missing = [];
196
- for (const cmd of expectedCommands) {
197
- if (!fileExists(path.join(commandsDir, cmd))) {
198
- missing.push(cmd);
199
- }
200
- }
179
+ return check(checkName, () => {
180
+ const dir = path.join(targetDir, ...dirParts);
181
+ const relDir = dirParts.join('/') + '/';
182
+ const expected = getTemplateFileNames(componentKey);
201
183
 
202
- if (missing.length === 0) {
184
+ if (expected.length === 0) {
203
185
  return {
204
- passed: true,
205
- detail: `All ${expectedCommands.length} command files present`,
186
+ passed: false,
187
+ detail: `Cannot read the shipped ${noun} list from the package templates/ tree`,
188
+ fix: 'Reinstall the package: the templates/ directory is missing or unreadable.',
206
189
  };
207
190
  }
208
191
 
209
- return {
210
- passed: false,
211
- detail: `Missing ${missing.length} command(s): ${missing.join(', ')}`,
212
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore missing commands.`,
213
- };
214
- });
215
- }
216
-
217
- /**
218
- * Check 5: All 7 rule .md files are present.
219
- */
220
- function checkRulesPresent(targetDir) {
221
- return check('Rules present', () => {
222
- const rulesDir = path.join(targetDir, '.claude', 'rules');
223
- const expectedRules = [
224
- 'agent-swarm.md',
225
- 'anti-patterns.md',
226
- 'checkpoint-protocol.md',
227
- 'domain-specific.md',
228
- 'file-conventions.md',
229
- 'modular-reuse.md',
230
- 'research-quality.md',
231
- ];
232
-
233
- if (!fileExists(rulesDir)) {
192
+ if (!fileExists(dir)) {
234
193
  return {
235
194
  passed: false,
236
- detail: '.claude/rules/ directory not found',
237
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore rules.`,
195
+ detail: `${relDir} directory not found`,
196
+ fix: `Run ${cyan('npx @dzhechkov/keysarium update')} to restore ${noun}s.`,
238
197
  };
239
198
  }
240
199
 
241
- const missing = [];
242
- for (const rule of expectedRules) {
243
- if (!fileExists(path.join(rulesDir, rule))) {
244
- missing.push(rule);
245
- }
246
- }
200
+ const missing = expected.filter((name) => !fileExists(path.join(dir, name)));
247
201
 
248
202
  if (missing.length === 0) {
249
203
  return {
250
204
  passed: true,
251
- detail: `All ${expectedRules.length} rule files present`,
205
+ detail: `All ${expected.length} ${noun} files present`,
252
206
  };
253
207
  }
254
208
 
255
209
  return {
256
210
  passed: false,
257
- detail: `Missing ${missing.length} rule(s): ${missing.join(', ')}`,
258
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore missing rules.`,
211
+ detail: `Missing ${missing.length}/${expected.length} ${noun}(s): ${missing.slice(0, 5).join(', ')}${missing.length > 5 ? '...' : ''}`,
212
+ fix: `Run ${cyan('npx @dzhechkov/keysarium update')} to restore missing ${noun}s.`,
259
213
  };
260
214
  });
261
215
  }
262
216
 
263
217
  /**
264
- * Check 6: All 5 agent .md files are present.
218
+ * Check 4: every shipped command .md file is present.
265
219
  */
266
- function checkAgentsPresent(targetDir) {
267
- return check('Agents present', () => {
268
- const agentsDir = path.join(targetDir, '.claude', 'agents');
269
-
270
- if (!fileExists(agentsDir)) {
271
- return {
272
- passed: false,
273
- detail: '.claude/agents/ directory not found',
274
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore agents.`,
275
- };
276
- }
277
-
278
- let entries;
279
- try {
280
- entries = fs.readdirSync(agentsDir);
281
- } catch {
282
- return {
283
- passed: false,
284
- detail: 'Cannot read .claude/agents/ directory',
285
- fix: 'Check directory permissions.',
286
- };
287
- }
220
+ function checkCommandsPresent(targetDir) {
221
+ return checkComponentFilesPresent(targetDir, {
222
+ checkName: 'Commands present',
223
+ componentKey: 'commands',
224
+ dirParts: ['.claude', 'commands'],
225
+ noun: 'command',
226
+ });
227
+ }
288
228
 
289
- const mdFiles = entries.filter((e) => e.endsWith('.md'));
229
+ /**
230
+ * Check 5: every shipped rule .md file is present.
231
+ */
232
+ function checkRulesPresent(targetDir) {
233
+ return checkComponentFilesPresent(targetDir, {
234
+ checkName: 'Rules present',
235
+ componentKey: 'rules',
236
+ dirParts: ['.claude', 'rules'],
237
+ noun: 'rule',
238
+ });
239
+ }
290
240
 
291
- if (mdFiles.length >= 5) {
292
- return {
293
- passed: true,
294
- detail: `${mdFiles.length} agent file(s) present`,
295
- };
296
- }
241
+ /**
242
+ * Check 5b: every shipped governance shard is present.
243
+ */
244
+ function checkShardsPresent(targetDir) {
245
+ return checkComponentFilesPresent(targetDir, {
246
+ checkName: 'Shards present',
247
+ componentKey: 'shards',
248
+ dirParts: ['.claude', 'shards'],
249
+ noun: 'shard',
250
+ });
251
+ }
297
252
 
298
- return {
299
- passed: false,
300
- detail: `Only ${mdFiles.length}/5 agent files found`,
301
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore missing agent templates.`,
302
- };
253
+ /**
254
+ * Check 6: every shipped agent template .md file is present.
255
+ */
256
+ function checkAgentsPresent(targetDir) {
257
+ return checkComponentFilesPresent(targetDir, {
258
+ checkName: 'Agents present',
259
+ componentKey: 'agents',
260
+ dirParts: ['.claude', 'agents'],
261
+ noun: 'agent',
303
262
  });
304
263
  }
305
264
 
@@ -314,7 +273,7 @@ function checkSettingsValid(targetDir) {
314
273
  return {
315
274
  passed: false,
316
275
  detail: '.claude/settings.json not found',
317
- fix: `Run ${cyan('@dzhechkov/keysarium update')} to restore settings.`,
276
+ fix: `Run ${cyan('npx @dzhechkov/keysarium update')} to restore settings.`,
318
277
  };
319
278
  }
320
279
 
@@ -390,7 +349,7 @@ async function run(options) {
390
349
  // ── a) Check manifest exists ───────────────────────────────────────────
391
350
  if (!fileExists(manifestPath)) {
392
351
  logError('Keysarium is not installed in this directory.');
393
- info(`Run ${cyan('@dzhechkov/keysarium init')} to install.`);
352
+ info(`Run ${cyan('npx @dzhechkov/keysarium init')} to install.`);
394
353
  process.exit(1);
395
354
  }
396
355
 
@@ -411,6 +370,7 @@ async function run(options) {
411
370
  checkSkillsComplete(targetDir),
412
371
  checkCommandsPresent(targetDir),
413
372
  checkRulesPresent(targetDir),
373
+ checkShardsPresent(targetDir),
414
374
  checkAgentsPresent(targetDir),
415
375
  checkSettingsValid(targetDir),
416
376
  checkResearchDir(targetDir),
@@ -90,7 +90,7 @@ async function run(options) {
90
90
  if (fileExists(manifestPath)) {
91
91
  if (!force) {
92
92
  warn('Keysarium is already installed in this directory.');
93
- info(`Run ${cyan('@dzhechkov/keysarium update')} to update, or use ${yellow('--force')} to overwrite.`);
93
+ info(`Run ${cyan('npx @dzhechkov/keysarium update')} to update, or use ${yellow('--force')} to overwrite.`);
94
94
  process.exit(1);
95
95
  }
96
96
  warn('Existing installation found — overwriting (--force).');
@@ -65,7 +65,7 @@ async function run(options) {
65
65
  // ── a) Read manifest ───────────────────────────────────────────────────
66
66
  if (!fileExists(manifestPath)) {
67
67
  warn('Keysarium is not installed in this directory.');
68
- info(`Run ${cyan('@dzhechkov/keysarium init')} to install.`);
68
+ info(`Run ${cyan('npx @dzhechkov/keysarium init')} to install.`);
69
69
  process.exit(1);
70
70
  }
71
71
 
@@ -187,7 +187,7 @@ async function run(options) {
187
187
  console.log(` ${dim('-')} ${skippedCount} file(s) already missing (skipped)`);
188
188
  }
189
189
  console.log('');
190
- info(`To reinstall, run: ${cyan('@dzhechkov/keysarium init')}`);
190
+ info(`To reinstall, run: ${cyan('npx @dzhechkov/keysarium init')}`);
191
191
  console.log('');
192
192
 
193
193
  process.exit(0);
@@ -30,7 +30,7 @@ async function run(options) {
30
30
  // ── a) Read existing manifest ───────────────────────────────────────────
31
31
  if (!fileExists(manifestPath)) {
32
32
  logError('Keysarium is not installed in this directory.');
33
- info(`Run ${cyan('@dzhechkov/keysarium init')} to install.`);
33
+ info(`Run ${cyan('npx @dzhechkov/keysarium init')} to install.`);
34
34
  process.exit(1);
35
35
  }
36
36
 
package/src/utils.js CHANGED
@@ -250,19 +250,105 @@ function getTemplatesDir() {
250
250
  // Component definitions
251
251
  // ===========================================================================
252
252
 
253
- const COMPONENTS = {
254
- skills: { src: '.claude/skills', label: 'Skills (8 skill packs)', group: 'core' },
255
- commands: { src: '.claude/commands', label: 'Commands (13 slash commands)', group: 'core' },
256
- rules: { src: '.claude/rules', label: 'Rules (10 auto-loaded rules)', group: 'core' },
257
- shards: { src: '.claude/shards', label: 'Shards (7 context shards)', group: 'core' },
258
- agents: { src: '.claude/agents', label: 'Agent templates (5 swarm configs)', group: 'core' },
259
- hooks: { src: '.claude/settings.json', label: 'Hooks configuration', group: 'core', isFile: true },
260
- lib: { src: 'lib', label: 'Library modules (4 modules)', group: 'extended' },
261
- docs: { src: 'docs', label: 'Documentation (12 guides)', group: 'docs' },
262
- claude_md: { src: 'CLAUDE.md', label: 'Master instructions', group: 'core', isFile: true },
263
- harvest: { src: 'TOOLKIT_HARVEST.md', label: 'Knowledge harvest tracker', group: 'core', isFile: true },
253
+ /**
254
+ * Count the units a component contributes, by inspecting the real templates/ tree.
255
+ *
256
+ * `countMode` decides what a "unit" is:
257
+ * 'dirs' — immediate subdirectories (one skill pack = one directory)
258
+ * 'files' — every file, recursively (lib/, docs/ ship nested files)
259
+ * 'md' — immediate *.md files (one command / rule / shard / agent = one file)
260
+ *
261
+ * Returns null when the count cannot be determined (missing dir, unreadable),
262
+ * so callers can degrade to a bare label instead of printing a wrong number.
263
+ */
264
+ function countTemplateUnits(comp) {
265
+ if (comp.isFile) return null;
266
+
267
+ const srcPath = path.join(getTemplatesDir(), comp.src);
268
+
269
+ try {
270
+ if (!fs.statSync(srcPath).isDirectory()) return null;
271
+ } catch {
272
+ return null;
273
+ }
274
+
275
+ try {
276
+ if (comp.countMode === 'files') {
277
+ return getRelativePaths(srcPath).length;
278
+ }
279
+
280
+ const entries = fs.readdirSync(srcPath, { withFileTypes: true });
281
+
282
+ if (comp.countMode === 'dirs') {
283
+ return entries.filter((e) => e.isDirectory()).length;
284
+ }
285
+
286
+ // default: 'md'
287
+ return entries.filter((e) => e.isFile() && e.name.endsWith('.md')).length;
288
+ } catch {
289
+ return null;
290
+ }
291
+ }
292
+
293
+ /**
294
+ * Component definitions.
295
+ *
296
+ * IMPORTANT: `label` is a COMPUTED getter — the parenthetical count is read from the
297
+ * shipped templates/ tree at access time, never hardcoded. Adding a command / rule /
298
+ * skill to templates/ changes what `init`, `init --dry-run` and `list` print, with no
299
+ * source edit. (Regression this guards: the labels used to be frozen strings reading
300
+ * "8 skill packs / 13 slash commands / 10 rules / 7 shards / 4 modules" long after the
301
+ * tree had grown past all five numbers.)
302
+ */
303
+ const COMPONENT_SPECS = {
304
+ skills: { src: '.claude/skills', name: 'Skills', unit: 'skill packs', countMode: 'dirs', group: 'core' },
305
+ commands: { src: '.claude/commands', name: 'Commands', unit: 'slash commands', countMode: 'md', group: 'core' },
306
+ rules: { src: '.claude/rules', name: 'Rules', unit: 'auto-loaded rules', countMode: 'md', group: 'core' },
307
+ shards: { src: '.claude/shards', name: 'Shards', unit: 'context shards', countMode: 'md', group: 'core' },
308
+ agents: { src: '.claude/agents', name: 'Agent templates', unit: 'swarm configs', countMode: 'md', group: 'core' },
309
+ hooks: { src: '.claude/settings.json', name: 'Hooks configuration', group: 'core', isFile: true },
310
+ lib: { src: 'lib', name: 'Library modules', unit: 'modules', countMode: 'files', group: 'extended' },
311
+ docs: { src: 'docs', name: 'Documentation', unit: 'guides', countMode: 'files', group: 'docs' },
312
+ claude_md: { src: 'CLAUDE.md', name: 'Master instructions', group: 'core', isFile: true },
313
+ harvest: { src: 'TOOLKIT_HARVEST.md', name: 'Knowledge harvest tracker', group: 'core', isFile: true },
264
314
  };
265
315
 
316
+ /**
317
+ * The shipped `*.md` filenames for a directory component, read from templates/.
318
+ *
319
+ * This is the single source of truth for "what SHOULD be installed" — `doctor` derives its
320
+ * named checks from it, so a new command/rule/shard is named-checked the moment it lands in
321
+ * templates/, with no second list to keep in sync. Returns [] when templates/ is unreadable.
322
+ */
323
+ function getTemplateFileNames(componentKey) {
324
+ const comp = COMPONENT_SPECS[componentKey];
325
+ if (!comp || comp.isFile) return [];
326
+
327
+ try {
328
+ return fs
329
+ .readdirSync(path.join(getTemplatesDir(), comp.src), { withFileTypes: true })
330
+ .filter((e) => e.isFile() && e.name.endsWith('.md'))
331
+ .map((e) => e.name)
332
+ .sort();
333
+ } catch {
334
+ return [];
335
+ }
336
+ }
337
+
338
+ const COMPONENTS = {};
339
+ for (const [key, spec] of Object.entries(COMPONENT_SPECS)) {
340
+ const comp = Object.assign({}, spec);
341
+ Object.defineProperty(comp, 'label', {
342
+ enumerable: true,
343
+ get() {
344
+ const n = countTemplateUnits(this);
345
+ if (n === null || !this.unit) return this.name;
346
+ return `${this.name} (${n} ${this.unit})`;
347
+ },
348
+ });
349
+ COMPONENTS[key] = comp;
350
+ }
351
+
266
352
  // ===========================================================================
267
353
  // Exports
268
354
  // ===========================================================================
@@ -306,4 +392,6 @@ module.exports = {
306
392
 
307
393
  // Components
308
394
  COMPONENTS,
395
+ countTemplateUnits,
396
+ getTemplateFileNames,
309
397
  };
@@ -20,10 +20,8 @@ When spawning agents, use descriptive names:
20
20
  - "Phase 5 Speaker Script"
21
21
 
22
22
  ## BTO Agent Patterns
23
- - /bto-test: 3 parallel judge agents (Domain Expert || Critic || Completeness Auditor)
24
- - /bto-optimize: N parallel variant workers (mutation + evaluation)
25
- - /bto-optimize Round 1: 5 parallel haiku agents (variant evaluation)
26
- - /bto-optimize Round 3: 3×3 parallel sonnet agents (Layer 2 full panel)
23
+ (Skill-evaluation swarms — BTO test/optimize — live in the separate `@dzhechkov/skills-bto`
24
+ package and are not available in a Keysarium-only install.)
27
25
 
28
26
  ## Cost Optimization
29
27
  - Use model="haiku" for simple file operations, formatting, and BTO Layer 0-1 evaluation
@@ -5,7 +5,7 @@
5
5
  | Trigger | Worker Type | Condition |
6
6
  |---------|------------|-----------|
7
7
  | Case completion | `consolidate` | After 3rd completed `/casarium` case in project |
8
- | Post-BTO test | `health-check` | After any `/bto-test` run (advisory, not enforced) |
8
+ | Post-BTO test | `health-check` | After a BTO evaluation run, if `@dzhechkov/skills-bto` is installed (advisory, not enforced) |
9
9
  | Manual | Any | User runs `/workers start <type>` |
10
10
 
11
11
  Auto-launch triggers are ADVISORY. The system may suggest launching a worker but
@@ -6,6 +6,7 @@ When starting a new pipeline run (`/casarium` or `/feature-adr`), the orchestrat
6
6
 
7
7
  1. Read `.keysarium/insights/trigger-state.json`
8
8
  2. Evaluate triggers using the protocol in `lib/dream-engine.md`
9
+ (under `init --minimal`, `lib/` is NOT installed — dream cycles are non-blocking, so skip)
9
10
  3. If any trigger is met, suggest to the user:
10
11
  ```
11
12
  Dream cycle trigger met ({reason}). Consider running /dream run for fresh insights.
@@ -8,7 +8,7 @@
8
8
  | Researching an AI case for hackathon | `/casarium` |
9
9
  | Solving a complex problem (no code) | `/solve` |
10
10
  | Designing architecture only (no code) | `/architecture-phase` |
11
- | Building a new skill/command | `/bto-build` |
11
+ | Building a new skill/command | BTO build — separate package: `npx @dzhechkov/skills-bto init` |
12
12
 
13
13
  ## Output Directory
14
14
 
@@ -24,7 +24,11 @@ They can be composed for different workflows.
24
24
  Shared logic lives in lib/ directory:
25
25
  - lib/phase-utils.md: Common phase utilities
26
26
  - lib/agent-patterns.md: Agent spawning patterns
27
- - lib/checkpoint-template.md: Checkpoint formatting
27
+ - lib/skill-loader.md: Skill loading conventions
28
+ - lib/domain-templates.md: Domain-specific templates
29
+
30
+ Under `init --minimal`, `lib/` is NOT installed; treat these modules as absent and skip the
31
+ optional behaviour they describe rather than failing.
28
32
 
29
33
  ## Extending the System
30
34
  To add a new phase:
@@ -9,6 +9,9 @@ Govern how the Keysarium pipeline integrates with the Reward-Calibrated Learning
9
9
  Read `lib/memory-protocol.md` for the full protocol specification.
10
10
  Read `lib/reward-tracker.md` for analytics and pattern detection.
11
11
 
12
+ Under `init --minimal`, `lib/` is NOT installed; memory operations are non-blocking, so skip them
13
+ silently when these files are absent.
14
+
12
15
  ## When to Call memory_query()
13
16
 
14
17
  **Trigger:** At the START of every pipeline phase (Phase 0 through Phase 5).
@@ -1,12 +1,17 @@
1
1
  # Trust Tier System
2
2
 
3
+ > **BTO evaluation is a SEPARATE package.** Keysarium installs no `/bto*` slash commands — the
4
+ > BTO evaluator ships as `@dzhechkov/skills-bto` (`npx @dzhechkov/skills-bto init`). Where this
5
+ > file refers to a "BTO evaluation", it means running that package. Tier promotion is therefore
6
+ > optional: without it, skills stay at the tier their structure earns (Tier 0/1).
7
+
3
8
  ## Tier Definitions
4
9
 
5
10
  | Tier | Label | Requirements | Promotion Path |
6
11
  |------|-------|-------------|----------------|
7
12
  | Tier 3 | Verified | Eval test suites with deterministic validation | — (highest) |
8
- | Tier 2 | Validated | Passed /bto-test with Layer 2 score ≥ 7.0 | Run /bto-test, score ≥ 8.5 on Layer 2 |
9
- | Tier 1 | Structured | SKILL.md + references/ or modules/ | Run /bto-test, score ≥ 7.0 on Layer 2 |
13
+ | Tier 2 | Validated | Passed a BTO evaluation with Layer 2 score ≥ 7.0 | Run a BTO evaluation, score ≥ 8.5 on Layer 2 |
14
+ | Tier 1 | Structured | SKILL.md + references/ or modules/ | Run a BTO evaluation, score ≥ 7.0 on Layer 2 |
10
15
  | Tier 0 | Advisory | Basic SKILL.md only | Add references/, examples/, structured output |
11
16
 
12
17
  ## Current Skill Tiers
@@ -19,24 +24,23 @@
19
24
  | problem-solver-enhanced | 1 | Structured | Comprehensive SKILL.md with TRIZ framework |
20
25
  | presentation-storyteller | 1 | Structured | SKILL.md + references/ |
21
26
  | reverse-engineering-unicorn | 1 | Structured | SKILL.md + modules/ + references/ + examples/ |
22
- | bto | 1 | Structured | SKILL.md + modules/ + references/ + examples/ |
23
- | knowledge-extractor | 2 | Validated | /bto-test Layer 2 score 7.5, optimized 2026-03-03 |
27
+ | knowledge-extractor | 2 | Validated | BTO evaluation Layer 2 score 7.5, optimized 2026-03-03 |
24
28
  | analyst-manual-full | 0 | Advisory | SKILL.md only (composite orchestrator, depends on explore + goap-research + problem-solver) |
25
29
  | feature-adr | 1 | Structured | SKILL.md + modules/ + references/ + examples/ |
26
30
  | edu-site-generator | 1 | Structured | SKILL.md + modules/ + references/ + examples/ |
27
- | transcript-site-generator | 2 | Validated | /bto-test Layer 2 score 7.82 |
31
+ | transcript-site-generator | 2 | Validated | BTO evaluation Layer 2 score 7.82 |
28
32
  | ai-factory-mapper | 1 | Structured | SKILL.md + references/ + assets/ + scripts/ (v1.0, апрель 2026) |
29
33
 
30
34
  ## Tier Enforcement
31
35
 
32
36
  - Tier 0 skills: Flag with warning when loaded in production pipeline
33
- - Tier 1 skills: Standard usage, recommend /bto-test for promotion
37
+ - Tier 1 skills: Standard usage, recommend a BTO evaluation for promotion
34
38
  - Tier 2 skills: Full confidence, include BTO score in metadata
35
39
  - Tier 3 skills: Highest confidence, deterministic validation available
36
40
 
37
41
  ## Promotion Protocol
38
42
 
39
- 1. Run `/bto-test .claude/skills/<name>/`
43
+ 1. Install the evaluator (`npx @dzhechkov/skills-bto init`), then run its BTO test on `.claude/skills/<name>/`
40
44
  2. If Layer 2 score ≥ 7.0 → promote to Tier 2, record score in SKILL.md
41
45
  3. If Layer 2 score ≥ 8.5 + deterministic eval tests exist → promote to Tier 3
42
46
  4. Record promotion date and score in SKILL.md frontmatter
@@ -10,7 +10,7 @@ trust_tier: 1
10
10
 
11
11
  # edu-site-generator — Gamified Educational Site Generator
12
12
 
13
- <!-- Trust Tier: 1 — Structured | Path to Tier 2: Run /bto-test for self-evaluation -->
13
+ <!-- Trust Tier: 1 — Structured | Path to Tier 2: run a BTO evaluation (separate package: npx @dzhechkov/skills-bto) -->
14
14
 
15
15
  > Generate a complete gamified educational SPA from documentation/content, optimized for GitHub Pages deployment.
16
16
 
@@ -10,7 +10,7 @@ description: >
10
10
  provide solutions until task is fully explored.
11
11
  trust_tier: 1
12
12
  trust_tier_label: "Structured"
13
- trust_tier_path: "Run /bto-test to promote to Tier 2"
13
+ trust_tier_path: "Run a BTO evaluation from the separate package @dzhechkov/skills-bto to promote to Tier 2"
14
14
  ---
15
15
 
16
16
  # Explore: Adaptive Task Clarification
@@ -11,7 +11,7 @@ description: >
11
11
  "implement feature", "/feature-adr".
12
12
  trust_tier: 0
13
13
  trust_tier_label: "Advisory"
14
- trust_tier_path: "Run /bto-test to promote to Tier 1"
14
+ trust_tier_path: "Run a BTO evaluation from the separate package @dzhechkov/skills-bto to promote to Tier 1"
15
15
  agentic_qe_version: "7.5.1"
16
16
  agentic_qe_source: "https://github.com/proffesor-for-testing/agentic-qe"
17
17
  agentic_qe_skills_core: 9
@@ -4,7 +4,7 @@ description: Create distinctive, production-grade frontend interfaces with high
4
4
  license: Complete terms in LICENSE.txt
5
5
  trust_tier: 0
6
6
  trust_tier_label: "Advisory"
7
- trust_tier_path: "Add references/ directory and run /bto-test to promote to Tier 1"
7
+ trust_tier_path: "Add references/ directory and run a BTO evaluation from the separate package @dzhechkov/skills-bto to promote to Tier 1"
8
8
  ---
9
9
 
10
10
  This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
@@ -3,7 +3,7 @@ name: goap-research-ed25519
3
3
  description: GOAP research system with Ed25519 provenance and tamper-evidence under pinned trusted-issuer keys. Use for high-stakes research that needs cited sources, explicit confidence, signed audit trails, or cryptographic proof of who signed a fact. Ed25519 does not prove truthfulness or prevent hallucination.
4
4
  trust_tier: 1
5
5
  trust_tier_label: "Structured"
6
- trust_tier_path: "Run /bto-test to promote to Tier 2"
6
+ trust_tier_path: "Run a BTO evaluation from the separate package @dzhechkov/skills-bto to promote to Tier 2"
7
7
  ---
8
8
 
9
9
  # GOAP Research with Ed25519 Provenance
@@ -9,7 +9,7 @@ trust_tier: 2
9
9
  trust_tier_label: "Validated"
10
10
  bto_score: 7.5
11
11
  bto_date: "2026-03-03"
12
- trust_tier_path: "Run /bto-test, score >= 8.5 + eval tests for Tier 3"
12
+ trust_tier_path: "Run a BTO evaluation from the separate package @dzhechkov/skills-bto, score >= 8.5 + eval tests for Tier 3"
13
13
  ---
14
14
 
15
15
  # Knowledge Extractor
@@ -227,7 +227,7 @@ Category-to-agent mapping (see `references/artifact-categories.md`):
227
227
  | memory_query() | Pipeline start | Load historical harvest patterns |
228
228
  | memory_store() | After user checkpoint | Store harvest reward data |
229
229
  | brain-export | N/A (passive) | Findings JSON is brain-compatible schema |
230
- | BTO | Post-harvest | Placed skills can be evaluated via `/bto-test` |
230
+ | BTO | Post-harvest | Placed skills can be evaluated with the separate package `npx @dzhechkov/skills-bto` |
231
231
  | dream cycles | Pipeline end | Update trigger-state.json |
232
232
  | /harvest command | Entry point | Thin wrapper loads this skill |
233
233
 
@@ -144,7 +144,7 @@ Placed artifacts:
144
144
  Gate pass rate: {rate}%
145
145
  Memory reward stored: {score} ({label})
146
146
 
147
- Run /bto-test on placed skills for promotion to Tier 2.
147
+ Run a BTO evaluation (separate package: `npx @dzhechkov/skills-bto`) on placed skills for promotion to Tier 2.
148
148
  ═══════════════════════════════════════════════════════
149
149
  ```
150
150