@miller-tech/uap 1.137.1 → 1.137.2

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/docs/INDEX.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # UAP Documentation
2
2
 
3
- The complete documentation for the **Universal Agent Protocol** (`@miller-tech/uap` v1.124.1) — the discipline layer that turns a talented-but-unreliable AI coding agent into a dependable member of your software delivery line.
3
+ The complete documentation for the **Universal Agent Protocol** (`@miller-tech/uap` v1.137.1) — the discipline layer that turns a talented-but-unreliable AI coding agent into a dependable member of your software delivery line.
4
4
 
5
5
  > **Reviewing the system?** The reverse-engineered, code-verified reference set lives in
6
6
  > [`documentation/`](../documentation/architecture.md): architecture, flows, permissions
@@ -24,7 +24,7 @@ UAP is organized like a delivery line. If you know which part of the pipeline yo
24
24
  | **QC / verify** — prove it runs | "Done" on code that never ran | [`uap deliver`](guides/DELIVER.md) · [Policies](guides/POLICIES.md) |
25
25
  | **Coordination** — many workers, one floor | Parallel agents colliding | [Coordination](guides/COORDINATION.md) · [Deploy Batching](guides/DEPLOY_BATCHING.md) |
26
26
  | **Shipping** — out the door safely | Regressions, red CI, skipped bumps | [Worktree Workflow](guides/WORKTREE_WORKFLOW.md) · [Policies](guides/POLICIES.md) |
27
- | **Feedback** — the floor learns | The same mistake every session | [Memory](guides/MEMORY.md) · [Self-Harness](design/SELF_HARNESS.md) |
27
+ | **Feedback** — the floor learns | The same mistake every session | [Memory](guides/MEMORY.md) · [Self-Harness](design/SELF_HARNESS.md) · [Self-Tuning](guides/SELF_TUNING.md) |
28
28
  | *Cross-cutting* — the whole line | Ignored rules, bloated context | [Policies](guides/POLICIES.md) · [MCP Router](guides/MCP_ROUTER.md) |
29
29
 
30
30
  Full map: **[The UAP Delivery Pipeline](guides/DELIVERY_PIPELINE.md)**.
@@ -54,12 +54,14 @@ Full map: **[The UAP Delivery Pipeline](guides/DELIVERY_PIPELINE.md)**.
54
54
  | [Sandbox](guides/SANDBOX.md) | Kernel-level (bubblewrap) write isolation — the boundary that survives `--dangerously-skip-permissions` |
55
55
  | [Policies](guides/POLICIES.md) | Executable policy gates that block non-compliant tool calls |
56
56
  | [**Policy Selection & Recommendations**](guides/POLICY_SELECTION.md) | Which policies to enable for your workflow — a recommended core + tailored sets by scenario; `uap policy recommend` ⭐ |
57
+ | [Pay2U Policy Pack](guides/POLICY_PACK_PAY2U.md) | The pay2u-tailored policy bundle |
57
58
  | [Multi-Model Routing](guides/MULTI_MODEL.md) | Plan → route → execute across 7 model profiles |
58
- | [Droids & Skills](guides/DROIDS_AND_SKILLS.md) | 38 expert droids, 32 skills, the expert router |
59
+ | [Droids & Skills](guides/DROIDS_AND_SKILLS.md) | 38 expert droids, 36 skills, the expert router |
59
60
  | [Deploy Batching](guides/DEPLOY_BATCHING.md) | Conflict-free batched git/deploy actions |
60
61
  | [Coordination](guides/COORDINATION.md) | Multi-agent overlap detection |
61
62
  | [Local Models](guides/LOCAL_MODELS.md) | Running agents against local llama.cpp / Qwen models |
62
63
  | [Qwen3.6 on llama.cpp by VRAM](guides/QWEN36_LLAMACPP.md) | Tiered 8/12/16/24/32 GB setup; how `uap deliver` uplifts small local models |
64
+ | [**LLM Self-Tuning**](guides/SELF_TUNING.md) | `uap tune` — raise a small model toward Opus by tuning UAP's flag surface with a benchmark-validated LLM/GP-BO loop; quality scoring, model profiles, auto-on real-time adaptation ⭐ |
63
65
 
64
66
  ## Architecture
65
67
 
@@ -68,7 +70,8 @@ Full map: **[The UAP Delivery Pipeline](guides/DELIVERY_PIPELINE.md)**.
68
70
  | [Overview](architecture/OVERVIEW.md) | System architecture as the delivery-line floor plan; subsystems, tool-call flow |
69
71
  | [Protocol](architecture/PROTOCOL.md) | The harness↔UAP contract, hook lifecycle, decision loop |
70
72
  | [Reactor (auto-apply)](design/UAP_REACTOR.md) | Dynamic experts/skills/patterns injected per prompt across harnesses; the assist vs enforce model, per-harness wiring |
71
- | [Self-Harness (proposal)](design/SELF_HARNESS.md) | Self-improving harness: autonomous mine→propose→validate loop over a bounded Mod DSL; cross-model transfer, online mining |
73
+ | [Self-Harness](design/SELF_HARNESS.md) | Self-improving harness (shipped as `uap self-harness`): autonomous mine→propose→validate loop over a bounded Mod DSL; cross-model transfer, online mining |
74
+ | [LLM Self-Tuning (analysis)](design/LLM_SELF_TUNING_ANALYSIS.md) | The design behind `uap tune`: quality signal, LLM-guided + Gaussian-process flag search, closed-loop validation, model profiles, real-time adaptation |
72
75
 
73
76
  ## Reference
74
77
 
@@ -88,6 +88,14 @@ Install UAP (`npm i -g universal-agent-protocol`) and every feature below activa
88
88
 
89
89
  **Why it matters:** No manual tuning. The right parameters are applied automatically for each model family.
90
90
 
91
+ ### Real-Time Adaptation (self-tuning) ✨
92
+
93
+ **What it does:** During a session the reactor watches live signals — tool-failure rate, per-turn quality, context-window pressure, and RECON no-write streaks — and, when one breaches a threshold, emits a per-session adjustment the proxy honors mid-flight: escalate the turn to the judge model (fusion), converge sooner (lower the recon threshold), or force synthesis to break an exploration loop.
94
+
95
+ **When it kicks in:** Auto-on. It is conservative — a signal is emitted only on a real threshold breach, so a nominal session is unchanged. Opt out with `uap config set realtimeAdapt.enabled false` (or `UAP_REALTIME_ADAPT=0`).
96
+
97
+ **Why it matters:** The static per-model config (`uap tune`) can't foresee everything; this catches the failures that only show up live, escalating a small model exactly when it starts to struggle. See [LLM Self-Tuning](SELF_TUNING.md).
98
+
91
99
  ---
92
100
 
93
101
  ## Memory & Context
@@ -156,7 +156,7 @@ A skill is a reusable workflow. Skills live in directories under
156
156
  [`.factory/skills/`](../../.factory/skills/), each containing a `SKILL.md` file
157
157
  with frontmatter (`name`, `version`, `compatibility`) and the workflow body.
158
158
 
159
- UAP ships **32 skills** in `.factory/skills/`, including:
159
+ UAP ships **36 skills** in `.factory/skills/`, including:
160
160
 
161
161
  - **Coordination & workflow** — `uap-coordination`, `uap-tasks`,
162
162
  `uap-worktree`, `worktree-workflow`, `parallel-expert-review`, `batch-review`
@@ -29,7 +29,7 @@ runs, keeping `--help` fast.
29
29
  | Command | Purpose |
30
30
  |---------|---------|
31
31
  | [`init`](#init) | Initialize agent context in the current project |
32
- | [`setup`](#setup) | One-command setup: init + Qdrant + Python deps + index patterns |
32
+ | [`setup`](#setup) | Guided setup wizard (arrow-key), or `--profile maximum\|minimal\|custom`; backs up instruction files, extracts custom content |
33
33
  | [`analyze`](#analyze) | Analyze project structure and emit metadata |
34
34
  | [`generate`](#generate) | Generate or update CLAUDE.md and related files |
35
35
  | [`update`](#update) | Update CLAUDE.md, memory system, and related components |
@@ -41,6 +41,19 @@ runs, keeping `--help` fast.
41
41
  | [`expert-route`](#expert-route) | Recommend an expert droid chain for a task |
42
42
  | [`deliver`](#deliver) | Convergence loop: iterate a model against gates until delivery |
43
43
  | [`harness`](#harness) | HALO harness optimization over execution traces |
44
+ | [`bench`](#bench) | Controlled paired (UAP-on vs UAP-off) benchmark with CIs |
45
+ | [`self-harness`](#self-harness) | Self-improving harness: mine failures → propose → validate → commit |
46
+ | [`tune`](#tune) | LLM self-tuning: raise a small model toward Opus by tuning UAP flags |
47
+ | [`verify`](#verify) | Runtime verification gate: prove changed code actually runs |
48
+ | [`config`](#config) | Inspect and change every UAP setting (`.uap.json` / `.uap/proxy.env`) |
49
+ | [`design`](#design) | DESIGN.md interrogation, lint, and the off-token UI gate |
50
+ | [`proxy`](#proxy) | Reference-counted, session-scoped local inference proxy lifecycle |
51
+ | [`orchestrator`](#orchestrator) | Toggle the long multi-turn deliver orchestrator |
52
+ | [`handsfree`](#handsfree) (`hf`) | Hands-free persistence: loop any model to a 100% ledger |
53
+ | [`challenge`](#challenge) | Open multi-agent challenge with a significance-gated leaderboard |
54
+ | [`sandbox`](#sandbox) | Run a command with a kernel-enforced writable-dir boundary |
55
+ | [`react`](#react) | Resolve dynamic experts/skills/patterns for a lifecycle event (JSON) |
56
+ | [`status`](#status) | Show HALO trace collection state |
44
57
  | [`ideate`](#ideate) | Divergent ideation (open-collider) for hard problems |
45
58
  | [`coord`](#coord) | Agent coordination and status |
46
59
  | [`agent`](#agent) | Agent lifecycle, work coordination, and communication |
@@ -379,6 +392,254 @@ The trace file defaults to `$UAP_HALO_TRACE_PATH` or `.uap/halo/traces.jsonl`.
379
392
 
380
393
  ---
381
394
 
395
+ ## `bench`
396
+
397
+ Controlled paired benchmark — hold the base model + agent constant and toggle
398
+ UAP on/off over the same real-gate suite and seeds, then report paired deltas
399
+ with confidence intervals, a McNemar gate-value 2×2, and a cost–accuracy Pareto.
400
+
401
+ | Subcommand | Key flags | Purpose |
402
+ |------------|-----------|---------|
403
+ | `paired` | `--suite`, `--adapter <mock\|opencode\|claude\|mini\|raw\|deliver>`, `--model`, `--epochs`, `--concurrency`, `--ablation`, `--lazy`, `--seed`, `--iterations`, `--rope-margin`, `--out`, `--json` | Run the UAP-on vs UAP-off A/B; writes `records.jsonl` + Markdown/JSON reports |
404
+
405
+ ```bash
406
+ uap bench paired --adapter opencode --model qwen36-a3b --epochs 5
407
+ uap bench paired --ablation # leave-one-out per UAP component
408
+ ```
409
+
410
+ See [Paired Harness](../benchmarks/PAIRED_HARNESS.md) for the methodology.
411
+
412
+ ---
413
+
414
+ ## `self-harness`
415
+
416
+ Self-improving harness: mine model-specific failures from traces, propose a
417
+ bounded, reversible modification (the "Mod" DSL), validate it with a real paired
418
+ bench, and — with `--apply` — commit it and snapshot a versioned profile.
419
+
420
+ | Subcommand | Key flags | Purpose |
421
+ |------------|-----------|---------|
422
+ | `analyze` | `--records`, `--env`, `--transfer`, `--json` | Mine weaknesses + propose candidate Mods (read-only) |
423
+ | `run` | `--records`, `--suite`, `--heldout`, `--adapter`, `--model`, `--epochs`, `--max-candidates`, `--apply`, `--json` | The full loop; `--apply` commits + snapshots |
424
+ | `transfer` | `--transfer`, `--json` | List the cross-model transfer store |
425
+ | `mine-prod` | `--traces`, `--unit`, `--since`, `--pending`, `--json` | Mine production traces → enqueue proposals (never applies) |
426
+ | `pending` / `prune` | `--pending`, `--transfer`, `--json` | Inspect / ablation-prune the queue + store |
427
+ | `tune` | (alias of `uap tune`) | The LLM/GP flag self-tuning loop |
428
+
429
+ ```bash
430
+ uap self-harness run --suite benchmarks/suites/real-gate --adapter opencode
431
+ ```
432
+
433
+ See [Self-Harness (design)](../design/SELF_HARNESS.md).
434
+
435
+ ---
436
+
437
+ ## `tune`
438
+
439
+ LLM self-tuning — raise a small model (e.g. qwen3.6) toward Opus-level output by
440
+ tuning UAP's own flag surface (recipes, hands-free, memory, concurrency, proxy
441
+ guardrails) with a benchmark-validated closed loop. An LLM proposes small flag
442
+ changes when a judge model is configured; otherwise a Gaussian-process Bayesian
443
+ optimizer picks the next config. `uap self-harness tune` is an alias.
444
+
445
+ | Flag | Purpose |
446
+ |------|---------|
447
+ | `--model <id>` | Executor model family to tune (default `qwen36-a3b`) |
448
+ | `--adapter <name>` | `mock \| opencode \| claude \| mini \| raw \| deliver` |
449
+ | `--judge <id>` | Judge/tuner model; else `recipes.judge.model`, else GP-only |
450
+ | `--phase <name>` | Force one search phase: `coarse \| medium \| fine \| combinatorial` |
451
+ | `--max-iterations <n>` | Tuning-loop budget (default 6) |
452
+ | `--epochs`, `--concurrency`, `--iterations`, `--seed` | Paired-bench + stats controls |
453
+ | `--apply` | Commit accepted configs + save the profile (default: dry-run) |
454
+ | `--json` | Machine-readable result |
455
+
456
+ ```bash
457
+ uap tune --model qwen36-a3b --adapter opencode --judge opus-4.8 --apply
458
+ uap tune --adapter mock --max-iterations 3 --json # offline smoke test
459
+ ```
460
+
461
+ See [LLM Self-Tuning](../guides/SELF_TUNING.md).
462
+
463
+ ---
464
+
465
+ ## `verify`
466
+
467
+ Run the project's completion gates — including the **runtime execution gate**
468
+ that actually runs the changed code — against the current files and report
469
+ pass/fail. This is what the Stop hook calls to block "done" on code that never
470
+ ran.
471
+
472
+ | Flag | Purpose |
473
+ |------|---------|
474
+ | `-d, --dir <path>` | Project directory (default: cwd) |
475
+ | `--strict` | Treat "no verifiable gates" as a failure (fail-closed) |
476
+ | `--runtime-only` | Run only the cheap runtime execution gate |
477
+ | `--full` | Also run the expensive integration / deploy-dev tiers |
478
+ | `--gates <ids>` | Comma-separated rung subset (e.g. `build,test,execution`) |
479
+ | `--acceptance <specfile>` | LLM acceptance gate: judge behavioral completeness vs a spec |
480
+ | `--no-visual` | Skip the headless visual gate |
481
+ | `-m, --model`, `--endpoint` | Model + endpoint for the acceptance gate |
482
+ | `--timeout <ms>`, `--json` | Per-rung timeout; JSON output |
483
+
484
+ ```bash
485
+ uap verify --runtime-only # prove the artifact runs
486
+ uap verify --acceptance spec.md --strict
487
+ ```
488
+
489
+ ---
490
+
491
+ ## `config`
492
+
493
+ Inspect and change every UAP setting from one place — the single source of truth
494
+ is `src/config/settings-registry.ts`, which also generates the
495
+ [Configuration Reference](CONFIGURATION_REFERENCE.md).
496
+
497
+ | Subcommand | Purpose |
498
+ |------------|---------|
499
+ | `list` | All settings + current values |
500
+ | `get <key>` / `explain <key>` | Read / learn one setting |
501
+ | `set <key> <value>` | Change it (writes `.uap.json`, `.uap/proxy.env`, or prints a shell export) |
502
+ | `doctor` | Flag risky / sub-optimal settings |
503
+ | `wizard` | Interactive expert configurator (also `uap setup --profile custom`) |
504
+ | `docs` | Regenerate `docs/reference/CONFIGURATION_REFERENCE.md` from the registry |
505
+
506
+ ```bash
507
+ uap config set recipes.enabled true
508
+ uap config set realtimeAdapt.enabled false # opt out of real-time adaptation
509
+ uap config doctor
510
+ ```
511
+
512
+ ---
513
+
514
+ ## `design`
515
+
516
+ DESIGN.md integration: interrogate an existing UI into a design brief, lint UI
517
+ work against it, and gate off-token colors / off-scale spacing.
518
+
519
+ | Flag | Purpose |
520
+ |------|---------|
521
+ | `-d, --project-dir <path>` | Project directory (default: cwd) |
522
+ | `-o, --out <path>` | Output path for `interrogate` (default `DESIGN.md`) |
523
+ | `--force` | Overwrite an existing DESIGN.md |
524
+ | `-f, --file <path>` | Target file (lint/check) or `"old,new"` (diff) |
525
+ | `--json` | Machine-readable output |
526
+
527
+ ---
528
+
529
+ ## `proxy`
530
+
531
+ Reference-counted, session-scoped lifecycle for the local inference proxy (the
532
+ Anthropic-compatible gateway in front of a local llama.cpp/Qwen). Hooks
533
+ `ensure`/`release` it per session so it starts on demand and stops when the last
534
+ session leaves — but it never kills a proxy that systemd manages or that other
535
+ sessions still use.
536
+
537
+ `uap proxy [ensure | release | status | start | stop | restart | enable | disable]`
538
+
539
+ | Flag | Purpose |
540
+ |------|---------|
541
+ | `--client <id>` | Client/session id (defaults to the session env or parent pid) |
542
+ | `--client-pid <n>` | Long-lived agent pid for liveness (hooks pass `$PPID`) |
543
+ | `--port <n>` | Proxy port (default 4000 / `$PROXY_PORT`) |
544
+ | `--if-enabled` | No-op unless `.uap.json` `proxy.autostart` is true (hook-safe) |
545
+ | `--quiet` / `--json` | Suppress output (hooks) / machine-readable status |
546
+
547
+ ```bash
548
+ uap proxy status --json
549
+ uap proxy restart # e.g. after changing PROXY_* in .uap/proxy.env
550
+ ```
551
+
552
+ The proxy binds `127.0.0.1` by default; see the proxy `PROXY_*` settings in the
553
+ [Configuration Reference](CONFIGURATION_REFERENCE.md) and [Local Models](../guides/LOCAL_MODELS.md).
554
+
555
+ ---
556
+
557
+ ## `orchestrator`
558
+
559
+ Toggle the long multi-turn deliver orchestrator (blackboard decomposition +
560
+ epic controller for big autonomous builds). Persists to `.uap.json`
561
+ (`deliver.orchestrate`).
562
+
563
+ `uap orchestrator [on | off | auto | status]` — `auto` (default) engages it only
564
+ for large multi-epic work. See [Orchestrator & Hands-Free](../guides/ORCHESTRATOR.md).
565
+
566
+ ---
567
+
568
+ ## `handsfree`
569
+
570
+ Hands-free persistence (alias `hf`): drive any model to keep working until the
571
+ multi-epic build **completion ledger** is 100% done instead of stopping early.
572
+ Auto-on.
573
+
574
+ `uap handsfree [status | on | off | init | complete <id> | fail <id> | remaining | stop-check]`
575
+
576
+ | Flag | Purpose |
577
+ |------|---------|
578
+ | `--mission <text>` | Mission text for `init` |
579
+ | `--items <json>` | JSON array of ledger items for `init` |
580
+
581
+ See [Orchestrator & Hands-Free](../guides/ORCHESTRATOR.md).
582
+
583
+ ---
584
+
585
+ ## `challenge`
586
+
587
+ Open multi-agent challenge: a shared goal, verified submissions, and a
588
+ significance-gated leaderboard (scores within a ROPE margin of the leader are
589
+ ties, not wins).
590
+
591
+ | Subcommand | Key flags | Purpose |
592
+ |------------|-----------|---------|
593
+ | `open` | `--metric <name>`, `--rope-margin <x>`, `--lower-is-better` | Open a challenge with a shared goal + scoring metric |
594
+ | `submit` / `leaderboard` / `status` | — | Submit a verified result / view the ranked board / show state |
595
+
596
+ ```bash
597
+ uap challenge open --metric tps --rope-margin 4
598
+ ```
599
+
600
+ ---
601
+
602
+ ## `sandbox`
603
+
604
+ Run a command with a kernel-enforced workdir boundary (bubblewrap): only the
605
+ current dir + scratch are writable, so writes outside fail at the kernel — the
606
+ boundary `--dangerously-skip-permissions` cannot bypass.
607
+
608
+ ```bash
609
+ uap sandbox -- <command> [args...]
610
+ ```
611
+
612
+ See [Sandbox](../guides/SANDBOX.md).
613
+
614
+ ---
615
+
616
+ ## `react`
617
+
618
+ Resolve the dynamic UAP capabilities (experts / skills / patterns) for a
619
+ lifecycle event and emit JSON — the engine behind the per-prompt Reactor. Hook
620
+ adapters pipe a JSON `ReactorContext` on stdin; the flags below are for manual
621
+ invocation.
622
+
623
+ | Flag | Purpose |
624
+ |------|---------|
625
+ | `--event <event>` | `user-prompt \| session-start \| pre-tool \| post-tool \| stop \| session-end` |
626
+ | `--prompt <text>` | Prompt text (when not piping a JSON payload) |
627
+ | `-f, --files <files...>` | Changed files (routing signal) |
628
+ | `--inject-threshold <n>` | Min confidence to inject (default 0.30) |
629
+ | `--auto-spawn-threshold <n>` | Min confidence to auto-spawn an expert (default 0.80) |
630
+ | `--max-inject-chars <n>` | Inject character budget (default 1200) |
631
+
632
+ See [Reactor (auto-apply)](../design/UAP_REACTOR.md).
633
+
634
+ ---
635
+
636
+ ## `status`
637
+
638
+ Show HALO trace collection state (enabled, path, span count). `--json` for
639
+ machine-readable output. (Equivalent to `uap harness status`.)
640
+
641
+ ---
642
+
382
643
  ## `ideate`
383
644
 
384
645
  Divergent ideation (open-collider): generate non-trivial ideas for hard
@@ -598,6 +598,30 @@ The serving recipe the proxy applies (mirror of `recipes.recipe`, consumed by th
598
598
 
599
599
  **Recommendation:** Keep in sync with `recipes.recipe`; `uap setup`/`uap config` write both.
600
600
 
601
+ ### `realtimeAdapt.enabled`
602
+
603
+ | | |
604
+ |---|---|
605
+ | **Where** | `.uap.json` |
606
+ | **Type** | boolean |
607
+ | **Default** | `true` |
608
+
609
+ Real-time flag adaptation (LLM Self-Tuning P4): the reactor emits per-session adjustments from live signals (tool-failure/quality/context/RECON) so the proxy can escalate or converge mid-session. This is the effective master switch — off means no signal is emitted.
610
+
611
+ **Recommendation:** Leave on. It is conservative (emits only when a live signal breaches a threshold) and is the effective master switch — disabling it turns the whole feature off regardless of the proxy side.
612
+
613
+ ### `PROXY_REALTIME_ADAPT`
614
+
615
+ | | |
616
+ |---|---|
617
+ | **Where** | `.uap/proxy.env` |
618
+ | **Type** | boolean |
619
+ | **Default** | `true` |
620
+
621
+ Proxy side of real-time adaptation: whether the serving proxy honors a fresh adaptation signal per request. Auto-on; harmless when no emitter is running (no signal to honor).
622
+
623
+ **Recommendation:** Leave on. Set `false` only to make the proxy ignore adaptation signals even when the reactor emits them.
624
+
601
625
  ## Dashboard
602
626
 
603
627
  <a id="dashboard"></a>The live analytics server and its mutation token.
@@ -231,7 +231,19 @@ Hierarchical MCP router that collapses 150+ MCP tools to 2
231
231
  | Subsystem | Description |
232
232
  |-----------|-------------|
233
233
  | Observability (`observability/halo-exporter.ts`) | Emits agent/LLM/tool spans as OTLP/OpenInference JSONL for the HALO engine. Opt-in via `UAP_HALO_TRACE`; zero-overhead when off. |
234
- | Telemetry (`telemetry/session-telemetry.ts`) | Session-level telemetry capture. |
234
+ | Telemetry (`telemetry/session-telemetry.ts`) | Session-level telemetry capture, incl. per-turn quality estimates for real-time tuning. |
235
+
236
+ ## Self-Improvement (`src/self-harness/`, `src/self-tuning/`) — Feedback
237
+
238
+ > **Stage: Feedback.** The floor doesn't just log its mistakes — it rewrites its
239
+ > own harness to stop making them. Two closed loops, both validated by the same
240
+ > paired benchmark so a "fix" is never accepted on faith.
241
+
242
+ | Subsystem | Description |
243
+ |-----------|-------------|
244
+ | Self-Harness (`self-harness/`) | Autonomous mine → propose → validate → decide loop over a bounded, reversible **Mod DSL** (proxy/llama env knobs, scaffold text, middleware, and settings-registry `ConfigMod`s). Cross-model transfer store; online production-trace mining. Fixes **correctness** bugs. `uap self-harness`. |
245
+ | Self-Tuning (`self-tuning/`) | `uap tune` — raises a small model toward Opus by tuning UAP's flag surface against a multi-dimensional **quality** score. LLM-guided proposals with a real Gaussian-process Bayesian-optimizer fallback; atomic rollback-safe flag writes; per-model tuning profiles (bundled qwen3.6 / Opus). |
246
+ | Real-time adaptation (`self-tuning/realtime-adaptor.ts`) | Per-session flag adjustments from live signals (tool-failure / quality / context pressure / RECON loop) over the adaptation-signal channel the proxy honors mid-session. **Auto-on**; opt out with `realtimeAdapt.enabled:false`. |
235
247
 
236
248
  ## Browser & Benchmarks — QC / Verify
237
249
 
@@ -267,7 +279,10 @@ similarity, and system resource detection.
267
279
 
268
280
  The `uap` CLI is the single door into the whole factory (top-level commands):
269
281
  `init`, `setup`, `analyze`, `generate`, `memory`, `patterns`, `worktree`,
270
- `sync`, `droids`, `expert-route`, `deliver`, `harness` (HALO), `ideate`,
271
- `coord`, `agent`, `deploy`, `task`, `compliance`, `coordination`, `skill`,
272
- `update`, `dashboard` (alias `dash`), `model`, `mcp-router`, `hooks`,
273
- `tool-calls`, `rtk`, `mcp-setup`, `schema-diff`, `policy`, `uap-omp`.
282
+ `sync`, `droids`, `expert-route`, `deliver`, `verify`, `harness` (HALO),
283
+ `bench`, `self-harness`, `tune`, `config`, `design`, `proxy`, `orchestrator`,
284
+ `handsfree` (`hf`), `challenge`, `sandbox`, `react`, `ideate`, `coord`, `agent`,
285
+ `deploy`, `task`, `compliance`, `coordination`, `skill`, `update`,
286
+ `dashboard` (alias `dash`), `model`, `mcp-router`, `hooks`, `tool-calls`,
287
+ `rtk`, `mcp-setup`, `schema-diff`, `policy`, `uap-omp`. See
288
+ [CLI reference](CLI.md) for every command and flag.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miller-tech/uap",
3
- "version": "1.137.1",
3
+ "version": "1.137.2",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",