@dzhechkov/harness-cli 0.3.28 → 0.3.30

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 (2) hide show
  1. package/README.md +58 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -365,6 +365,63 @@ dz dashboard # Visual panel with all packages, adapters, skill packs
365
365
 
366
366
  ---
367
367
 
368
+ ## Self-Learning: JSONL vs AgentDB
369
+
370
+ DZ Harness supports two memory backends for self-learning:
371
+
372
+ ```bash
373
+ dz setup --target claude-code --preset devops # JSONL (default, lightweight)
374
+ dz setup --target claude-code --preset devops --memory agentdb # AgentDB (vector memory)
375
+ ```
376
+
377
+ | Capability | JSONL (default) | AgentDB (`--memory agentdb`) |
378
+ |------------|----------------|------------------------------|
379
+ | **Session tracking** | Append-only JSONL log | HNSW vector store (.rvf) |
380
+ | **Pattern storage** | `dz teach` → patterns.jsonl | `dz teach` → .rvf + agentdb_pattern_store |
381
+ | **Search** | Keyword (grep) | **Semantic** (HNSW nearest-neighbor, cosine similarity) |
382
+ | **Retrieval** | Sequential scan | **O(log n)** approximate nearest neighbor |
383
+ | **Self-learning** | Frequency-based | **9 RL algorithms** + Thompson Sampling bandit |
384
+ | **Memory tiers** | Flat file | **3-tier** (working → short-term → long-term) |
385
+ | **Reflexion** | Reward scores (0-1) | Episodic memory (task + outcome + self-critique) |
386
+ | **Causal reasoning** | No | **Cypher-like graph queries** (X caused Y) |
387
+ | **Skill composition** | Manual (presets) | **Bandit-picked** skill chains (A→B→C) |
388
+ | **Audit trail** | No | **Cryptographic attestation log** |
389
+ | **Size** | ~0 KB | 4.6 MB (agentdb) |
390
+ | **MCP tools** | 0 | **41 tools** (pattern, reflexion, causal, skill, hierarchy) |
391
+ | **Dependencies** | None | agentdb (optional, via npx) |
392
+
393
+ ### AgentDB self-learning algorithms
394
+
395
+ When using `--memory agentdb`, the following algorithms automatically tune search quality:
396
+
397
+ 1. **Thompson Sampling** — multi-armed bandit for ranking search results
398
+ 2. **UCB1** (Upper Confidence Bound) — exploration-exploitation balancing
399
+ 3. **EXP3** — adversarial bandit for non-stationary environments
400
+ 4. **Softmax** — temperature-based action selection
401
+ 5. **Epsilon-Greedy** — simple exploration with decay
402
+ 6. **Gradient Bandit** — preference-based action selection
403
+ 7. **Contextual Bandit** — context-aware ranking using features
404
+ 8. **REINFORCE** — policy gradient for complex reward landscapes
405
+ 9. **PPO-lite** — proximal policy optimization for stable learning
406
+
407
+ The bandit automatically selects the best algorithm for your usage pattern — no manual tuning needed.
408
+
409
+ ### How to enable AgentDB
410
+
411
+ ```bash
412
+ # One command — everything is set up:
413
+ dz setup --target claude-code --preset devops --memory agentdb
414
+ ```
415
+
416
+ This creates `.dz/memory.rvf`, registers the agentdb MCP server (41 tools), and configures session hooks. The agent can immediately use `agentdb_pattern_store`, `agentdb_reflexion_recall`, etc. — no additional `dz init` needed.
417
+
418
+ | Command | When to use |
419
+ |---------|-------------|
420
+ | `dz setup --memory agentdb` | **Recommended** — full setup in one step |
421
+ | `dz init --select agentdb-memory` | Only if you want the SKILL.md guide without the infrastructure |
422
+
423
+ ---
424
+
368
425
  ## How it works
369
426
 
370
427
  - `dz init` compiles canonical skills from the [agentskills.io](https://agentskills.io) standard into the target platform's layout
@@ -541,4 +598,4 @@ npx @dzhechkov/p-replicator init
541
598
 
542
599
  ## Status
543
600
 
544
- `v0.3.27` — published on npm. Part of [DZ Harness Hub](https://github.com/djd1m/dz-harness-hub).
601
+ `v0.3.29` — published on npm. Part of [DZ Harness Hub](https://github.com/djd1m/dz-harness-hub).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzhechkov/harness-cli",
3
- "version": "0.3.28",
3
+ "version": "0.3.30",
4
4
  "description": "The dz CLI — install AI skills for Claude Code, Codex, OpenCode, Hermes. 11 commands, 7 presets, 4 platform adapters.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,8 +34,8 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@dzhechkov/harness-presets": "0.2.9",
38
37
  "@dzhechkov/harness-core": "0.3.12",
38
+ "@dzhechkov/harness-presets": "0.2.9",
39
39
  "@dzhechkov/scout": "0.7.1"
40
40
  },
41
41
  "devDependencies": {