@miller-tech/uap 1.92.0 → 1.93.1

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 (43) hide show
  1. package/README.md +46 -44
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/cli/guided-setup.d.ts.map +1 -1
  4. package/dist/cli/guided-setup.js +23 -0
  5. package/dist/cli/guided-setup.js.map +1 -1
  6. package/dist/cli/wizard-config.d.ts +2 -0
  7. package/dist/cli/wizard-config.d.ts.map +1 -1
  8. package/dist/cli/wizard-config.js +13 -0
  9. package/dist/cli/wizard-config.js.map +1 -1
  10. package/docs/INDEX.md +28 -7
  11. package/docs/architecture/OVERVIEW.md +106 -17
  12. package/docs/architecture/PROTOCOL.md +31 -13
  13. package/docs/design/SELF_HARNESS.md +8 -0
  14. package/docs/design/UAP_REACTOR.md +17 -2
  15. package/docs/getting-started/CONFIGURATION.md +16 -7
  16. package/docs/getting-started/INSTALLATION.md +37 -18
  17. package/docs/getting-started/QUICKSTART.md +20 -14
  18. package/docs/guides/AUTOMATIC.md +9 -1
  19. package/docs/guides/AUTOMATIC_FEATURES.md +7 -1
  20. package/docs/guides/COORDINATION.md +5 -2
  21. package/docs/guides/DELIVER.md +3 -1
  22. package/docs/guides/DELIVERY_PIPELINE.md +122 -0
  23. package/docs/guides/DEPLOY_BATCHING.md +13 -4
  24. package/docs/guides/DROIDS_AND_SKILLS.md +13 -3
  25. package/docs/guides/LOCAL_MODELS.md +22 -7
  26. package/docs/guides/MCP_ROUTER.md +3 -1
  27. package/docs/guides/MEMORY.md +9 -4
  28. package/docs/guides/MULTI_MODEL.md +19 -3
  29. package/docs/guides/POLICIES.md +4 -2
  30. package/docs/guides/QWEN36_LLAMACPP.md +12 -3
  31. package/docs/guides/WORKTREE_WORKFLOW.md +6 -2
  32. package/docs/integrations/MCP_ROUTER.md +12 -3
  33. package/docs/integrations/RTK.md +15 -4
  34. package/docs/reference/API.md +9 -2
  35. package/docs/reference/CLI.md +13 -7
  36. package/docs/reference/CONFIGURATION.md +9 -3
  37. package/docs/reference/DATABASE_SCHEMA.md +13 -6
  38. package/docs/reference/FEATURES.md +135 -38
  39. package/docs/reference/PATTERNS.md +28 -12
  40. package/docs/reference/PLATFORMS.md +12 -5
  41. package/package.json +1 -1
  42. package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
  43. package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
package/README.md CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  # Universal Agent Protocol (UAP)
4
4
 
5
- **Give your AI coding agents memory, judgment, and the discipline to finish the job.**
5
+ **The discipline layer that turns a talented-but-unreliable AI coding agent into a dependable member of your software delivery line.**
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/@miller-tech/uap?color=blue&label=npm)](https://www.npmjs.com/package/@miller-tech/uap)
8
8
  [![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
9
- [![Tests](https://img.shields.io/badge/tests-117_suites-brightgreen)](#testing)
9
+ [![Tests](https://img.shields.io/badge/tests-170%2B_suites-brightgreen)](#testing)
10
10
  [![License](https://img.shields.io/badge/license-MIT-black)](LICENSE)
11
11
 
12
- `v1.40.0` · 168 modules · 117 test suites · 9 agent harnesses
12
+ `v1.93.1` · 220+ modules · 170+ test suites · 9 agent harnesses
13
13
 
14
- [Quickstart](#quickstart) · [Why UAP?](#why-uap) · [`uap deliver`](#the-deliver-harness) · [Architecture](#architecture) · [Benchmarks](#benchmarks) · [Docs](docs/INDEX.md)
14
+ [Quickstart](#quickstart) · [Why UAP?](#why-uap) · [The delivery pipeline](docs/guides/DELIVERY_PIPELINE.md) · [`uap deliver`](#the-deliver-harness) · [Docs](docs/INDEX.md)
15
15
 
16
16
  </div>
17
17
 
@@ -19,19 +19,21 @@
19
19
 
20
20
  ## Why UAP?
21
21
 
22
- AI coding agents are capable but undisciplined. They forget everything between sessions, burn tokens echoing huge tool outputs, repeat the same mistakes, declare victory on work that doesn't compile, and trip over each other in shared repos. UAP is a production-tested layer that sits **underneath your agent harness** (Claude Code, Factory, Cursor, OpenCode, and more) and fixes these problems at the protocol level no model change required.
22
+ Shipping software with an AI agent is a lot like running a small factory floor. Intent comes in one end; working, verified, merged code should come out the other. In between are stations understand the job, set up a bench, build it, **check it actually works**, ship it and a jam at any one of them quietly ruins everything downstream.
23
23
 
24
- | The problem | What UAP does | Measured impact |
24
+ Coding agents are capable but undisciplined line workers. They forget yesterday's shift, grab the wrong tool, build something that *looks* right, stamp it "done" without plugging it in, and trip over the other workers on the floor. That's not a problem you fix by swapping in a smarter model — it's a *process* problem. UAP is the process: it sits **underneath your agent harness** (Claude Code, Factory, Cursor, OpenCode, and more) and puts a station at every point where the line usually breaks — no model change required.
25
+
26
+ | Where the line jams | What UAP puts there | What you get |
25
27
  |---|---|---|
26
- | Agents forget past sessions | 4-tier memory with semantic recall + write-gates | **49.7% fewer tokens** |
27
- | Tool output floods the context | MCP Router — tool-hiding + FTS5 output compression | **up to ~98%** on large tool calls |
28
- | Agents declare done on broken work | `uap deliver` — convergence loop against **real** gates | **+33pp** task success (25% 58%) |
29
- | Repetitive mistakes | 23 Terminal-Bench patterns + learning loop | **68% fewer errors** |
30
- | Wrong model for the job | Multi-model router, 7 profiles | optimal cost/perf per task |
31
- | Agents step on each other | Worktree isolation + coordination service | conflict-free parallel work |
32
- | "Guidelines" get ignored | Policy gates as executable hooks, not prose | violations are **blocked**, not suggested |
28
+ | Agent starts every session amnesiac | 4-tier memory with semantic recall + write-gates | It remembers your codebase and past decisions |
29
+ | Tool output floods the context window | MCP Router — tool-hiding + output compression | Up to **~98%** smaller on big tool calls |
30
+ | "Looks right" but doesn't run | `uap deliver` — a loop against your **real** gates | Code that compiles, not a mock-up of it |
31
+ | Agent grades its own homework | Execution/runtime verify + a separate acceptance judge | "Done" means *verified* done |
32
+ | Two agents clobber each other | Worktree isolation + live file coordination | Conflict-free parallel work |
33
+ | "Guidelines" get ignored | Policy gates as executable hooks, not prose | Violations are **blocked**, not politely suggested |
34
+ | Same mistake, every session | Memory promotion + pattern learning | The floor gets better every run |
33
35
 
34
- > Benchmarks below are from Terminal-Bench 2.0 (12 representative tasks). See [docs/benchmarks/](docs/benchmarks/) for the full methodology and raw data.
36
+ **→ Take the full station-by-station tour: [The UAP Delivery Pipeline](docs/guides/DELIVERY_PIPELINE.md).**
35
37
 
36
38
  ---
37
39
 
@@ -41,12 +43,12 @@ AI coding agents are capable but undisciplined. They forget everything between s
41
43
  # Install globally
42
44
  npm install -g @miller-tech/uap
43
45
 
44
- # One-command setup in your project (memory, patterns, hooks, policies)
46
+ # One friendly, arrow-key guided setup in your project
45
47
  cd your-project
46
48
  uap setup
47
49
  ```
48
50
 
49
- That's it. Your agent now has persistent memory, battle-tested patterns, policy gates, and multi-agent coordination wired into every session.
51
+ `uap setup` walks you through the whole line — memory, patterns, policy gates, model routing, multi-agent coordination, and the verification gates — and wires it into every agent session. Take the defaults and you're one Enter away from a disciplined agent.
50
52
 
51
53
  ```bash
52
54
  uap memory query "how did we handle auth last time?" # semantic recall
@@ -58,7 +60,7 @@ uap dashboard overview # live task / agent / me
58
60
 
59
61
  ## The `deliver` harness
60
62
 
61
- `uap deliver` is the headline of the v1.27–v1.40 line: a **convergence loop that iterates a model against your project's real completion gates until the work is actually delivered** — build passes, tests pass, lint is clean — not until the model *thinks* it's done.
63
+ The two stations that matter most are **Build** and **QC**, and `uap deliver` owns both. It's a **convergence loop that iterates a model against your project's real completion gates until the work is actually delivered** — build passes, tests pass, lint is clean — not until the model *thinks* it's done.
62
64
 
63
65
  ```bash
64
66
  uap deliver "implement the password reset flow"
@@ -66,36 +68,36 @@ uap deliver "implement the password reset flow"
66
68
 
67
69
  What happens under the hood:
68
70
 
69
- 1. **Explore → plan → apply** — the model proposes changes; the applier writes them safely (pre-existing tests and gate configs are protected from being overwritten).
70
- 2. **Verify against real gates** — a verifier ladder runs your build, tests, and lint. Nothing is "done" until they're green.
71
- 3. **Critique & iterate** — failures feed back as structured guidance; the loop continues, **persisting until delivered** (extends past `--max-turns` to a ceiling, stopping on genuine stagnation).
72
- 4. **Auto-optimization** — every task is classified by complexity and the matching aids (HALO trace analysis, divergent ideation, coordination, deploy batching) activate automatically.
71
+ 1. **Explore → plan → apply** — the model proposes changes; the applier writes them safely (existing tests and gate configs are protected from being overwritten).
72
+ 2. **Verify against real gates** — a verifier ladder runs your build, tests, and lint, and can *execute* the result (headless browser / vm-dom / child process) to prove it runs. Nothing is "done" until they're green.
73
+ 3. **Critique & iterate** — failures feed back as structured guidance and the loop continues, persisting until delivered.
74
+ 4. **Generator ≠ evaluator** — the check that signs off is deliberately not the model that wrote the code, so an agent can't confirm its own success.
73
75
  5. **Autonomy with a guidance channel** — runs the full mission without stopping to ask, while still accepting operator guidance mid-flight.
74
76
 
75
77
  It works with frontier models *and* local models (llama.cpp / Qwen) served over the Anthropic Messages API. See **[docs/guides/DELIVER.md](docs/guides/DELIVER.md)**.
76
78
 
77
79
  ---
78
80
 
79
- ## Features
81
+ ## The line, station by station
80
82
 
81
- - **🧠 4-tier memory** daily log working cache → semantic (Qdrant) → long-term archive, with write-gates that block low-quality/duplicate memories and corrections that cascade across tiers.
82
- - **🗜️ MCP Router** — a token-optimizing tool proxy; large outputs are compressed via FTS5 intent search instead of dumped into context.
83
- - **🎯 `uap deliver`** the convergence/delivery harness (above).
84
- - **🌳 Worktree workflow** isolated branch-per-feature, auto-PR, safe cleanup; enforced so agents never edit the project root.
85
- - **🛡️ Policy gates** 20 executable enforcers (worktree, test, schema-diff, expert-review, memory-before-plan, delivery-enforcement…) that *block* non-compliant tool calls.
86
- - **🤖 Expert droids & skills** 38 specialized droids and 32 skills, with an expert-router that recommends a droid chain per task.
87
- - **🧭 Multi-model routing** 7 profiles (Claude Opus/Sonnet/Haiku, GPT, Qwen, generic); the router picks by complexity, cost, and performance.
88
- - **🚦 Deploy batching & coordination** batched git/deploy actions and overlap detection keep multi-agent work conflict-free.
89
- - **📊 Dashboard** rich TUI/web views of tasks, agents, memory, benchmarks, and policy status.
90
- - **🔌 9 harnesses** Claude Code, Factory, Cursor, VSCode, OpenCode, Codex, ForgeCode, Oh-My-Pi, Hermes.
83
+ | Station | The break it prevents | Key machinery |
84
+ |---|---|---|
85
+ | **Intake** | Amnesiac sessions, invented scope | [Memory](docs/guides/MEMORY.md), reactor injection, [DESIGN.md](DESIGN.md) |
86
+ | **Prep / routing** | Wrong approach, wrong-sized model | [Multi-model routing](docs/guides/MULTI_MODEL.md), [patterns](docs/reference/PATTERNS.md), [droids & skills](docs/guides/DROIDS_AND_SKILLS.md) |
87
+ | **Isolation** | Editing `main`, clobbering files | [Worktrees](docs/guides/WORKTREE_WORKFLOW.md), live file coordination, delivery gate |
88
+ | **Build** | Plausible-but-wrong code, stubs, empty output | [`uap deliver`](docs/guides/DELIVER.md), serving-layer recipes, [local-model guardrails](docs/guides/LOCAL_MODELS.md) |
89
+ | **QC / verify** | "Done" on code that never ran | Completion gates, `uap verify`, acceptance judge, generator≠evaluator |
90
+ | **Coordination** | Parallel agents colliding/deadlocking | [Coordination](docs/guides/COORDINATION.md), model-slot concurrency, [deploy batching](docs/guides/DEPLOY_BATCHING.md) |
91
+ | **Shipping** | Regressions, red CI, skipped version bumps | Worktree→PR flow, version gates, CI feedback watcher |
92
+ | **Feedback** | The same mistake every session | Memory promotion, pattern learning, session analysis |
91
93
 
92
- Full list with code-level detail: **[docs/reference/FEATURES.md](docs/reference/FEATURES.md)**.
94
+ Running the whole length of the floor: **policy gates** (24 executable enforcers that *block* non-compliant tool calls — worktree, test, schema-diff, expert-review, delivery-enforcement…) and the **MCP Router** (keeps the context window lean). Full catalog: **[docs/reference/FEATURES.md](docs/reference/FEATURES.md)**.
93
95
 
94
96
  ---
95
97
 
96
98
  ## Architecture
97
99
 
98
- UAP installs hooks into your agent harness, then mediates every tool call through memory, policy, and token-optimization layers.
100
+ UAP installs hooks into your agent harness, then mediates every tool call through the memory, policy, and token-optimization layers — a control booth over the whole line.
99
101
 
100
102
  ```
101
103
  ┌─────────────────────────────────────────────────────────────┐
@@ -106,32 +108,29 @@ UAP installs hooks into your agent harness, then mediates every tool call throug
106
108
 
107
109
  ┌─────────────────────────────────────────────────────────────┐
108
110
  │ UAP CLI (uap) │
109
- │ setup · memory · deliver · worktree · policy · deploy
110
- │ task · droids · model · mcp-router · harness · ideate
111
+ │ setup · memory · deliver · verify · worktree · policy
112
+ │ task · coord · droids · model · mcp-router · design
111
113
  └──┬─────────┬──────────┬──────────┬──────────┬───────────────┘
112
114
  ▼ ▼ ▼ ▼ ▼
113
115
  Memory Policy MCP Router Delivery Coordination
114
- 4 tiers 20 gates FTS5 compr. harness + deploy batch
116
+ 4 tiers 24 gates compression + verify + deploy batch
115
117
  ```
116
118
 
117
- - **30+ CLI commands** across 18 source subsystems (168 TypeScript modules).
119
+ - **30+ CLI commands** across 18 source subsystems (220+ TypeScript modules).
118
120
  - Deep dive: **[docs/architecture/OVERVIEW.md](docs/architecture/OVERVIEW.md)** · protocol spec: **[docs/architecture/PROTOCOL.md](docs/architecture/PROTOCOL.md)**.
119
121
 
120
122
  ---
121
123
 
122
124
  ## Benchmarks
123
125
 
124
- The honest, controlled result (paired A/B — same model, tasks, and seeds,
125
- toggling only UAP, with confidence intervals): **UAP's accuracy lift depends on
126
- whether the base agent already self-verifies.**
126
+ The honest, controlled result (paired A/B — same model, tasks, and seeds, toggling only UAP, with confidence intervals): **UAP's accuracy lift depends on whether the base agent already checks its own work at the QC station.**
127
127
 
128
128
  | Baseline | UAP accuracy lift | |
129
129
  |---|---|---|
130
130
  | Agentic harness (self-tests) | **~0pp** (CI spans 0) | overhead only — value is efficiency/coordination |
131
131
  | Non-agentic single-shot model | **+20pp** (78%→98%, 95% CI [+8,+32], p=0.008) | gate loop repairs edge-case bugs |
132
132
 
133
- Run it yourself: `uap bench paired --adapter raw --suite benchmarks/suites/real-gate-gated`.
134
- Full analysis: **[docs/benchmarks/PAIRED_FINDINGS.md](docs/benchmarks/PAIRED_FINDINGS.md)**.
133
+ That's the pipeline thesis in one table: the more an agent skips the QC station on its own, the more UAP's gates are worth. Run it yourself: `uap bench paired --adapter raw --suite benchmarks/suites/real-gate-gated`. Full analysis: **[docs/benchmarks/PAIRED_FINDINGS.md](docs/benchmarks/PAIRED_FINDINGS.md)**.
135
134
 
136
135
  <details><summary>Earlier uncontrolled Terminal-Bench numbers (confounded — see TBench Investigation)</summary>
137
136
 
@@ -150,6 +149,8 @@ Methodology, raw runs, and cost analysis: **[docs/benchmarks/](docs/benchmarks/)
150
149
 
151
150
  ## Supported harnesses
152
151
 
152
+ Same line, whichever floor you code on.
153
+
153
154
  | Harness | Hooks | MCP Router | Policy gates |
154
155
  |---|---|---|---|
155
156
  | Claude Code | ✅ | ✅ | ✅ |
@@ -170,6 +171,7 @@ Install into all detected harnesses with `uap hooks install`; audit coverage wit
170
171
 
171
172
  | | |
172
173
  |---|---|
174
+ | **[The Delivery Pipeline](docs/guides/DELIVERY_PIPELINE.md)** | The station-by-station tour — start here for the big picture |
173
175
  | **[Getting Started](docs/getting-started/)** | Installation, quickstart, configuration |
174
176
  | **[Guides](docs/guides/)** | deliver, memory, MCP router, worktrees, policies, multi-model, local models |
175
177
  | **[Architecture](docs/architecture/)** | System overview + the UAP protocol |
@@ -186,7 +188,7 @@ Start at the **[documentation index](docs/INDEX.md)**.
186
188
  ```bash
187
189
  npm install
188
190
  npm run build # TypeScript compile
189
- npm test # vitest — 117 suites
191
+ npm test # vitest — 170+ suites
190
192
  npm run bench # benchmark suite
191
193
  ```
192
194