@miller-tech/uap 1.93.0 → 1.94.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.
- package/README.md +46 -44
- package/docs/INDEX.md +28 -7
- package/docs/architecture/OVERVIEW.md +106 -17
- package/docs/architecture/PROTOCOL.md +31 -13
- package/docs/design/SELF_HARNESS.md +8 -0
- package/docs/design/UAP_REACTOR.md +17 -2
- package/docs/getting-started/CONFIGURATION.md +16 -7
- package/docs/getting-started/INSTALLATION.md +37 -18
- package/docs/getting-started/QUICKSTART.md +20 -14
- package/docs/guides/AUTOMATIC.md +9 -1
- package/docs/guides/AUTOMATIC_FEATURES.md +7 -1
- package/docs/guides/COORDINATION.md +5 -2
- package/docs/guides/DELIVER.md +3 -1
- package/docs/guides/DELIVERY_PIPELINE.md +122 -0
- package/docs/guides/DEPLOY_BATCHING.md +13 -4
- package/docs/guides/DROIDS_AND_SKILLS.md +13 -3
- package/docs/guides/LOCAL_MODELS.md +22 -7
- package/docs/guides/MCP_ROUTER.md +3 -1
- package/docs/guides/MEMORY.md +9 -4
- package/docs/guides/MULTI_MODEL.md +19 -3
- package/docs/guides/POLICIES.md +4 -2
- package/docs/guides/QWEN36_LLAMACPP.md +12 -3
- package/docs/guides/WORKTREE_WORKFLOW.md +6 -2
- package/docs/integrations/MCP_ROUTER.md +12 -3
- package/docs/integrations/RTK.md +15 -4
- package/docs/reference/API.md +9 -2
- package/docs/reference/CLI.md +13 -7
- package/docs/reference/CONFIGURATION.md +9 -3
- package/docs/reference/DATABASE_SCHEMA.md +13 -6
- package/docs/reference/FEATURES.md +135 -38
- package/docs/reference/PATTERNS.md +28 -12
- package/docs/reference/PLATFORMS.md +12 -5
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
- package/tools/agents/scripts/anthropic_proxy.py +106 -17
- package/tools/agents/tests/test_anthropic_proxy_streaming.py +8 -3
- package/tools/agents/tests/test_overflow_truncate_count_tokens.py +112 -0
|
@@ -5,16 +5,28 @@ Goal: every UAP capability that is appropriate to apply automatically fires
|
|
|
5
5
|
automatically and *dynamically* (context-aware) across all supported coding
|
|
6
6
|
agents, instead of requiring manual invocation.
|
|
7
7
|
|
|
8
|
+
> **🏭 Where this fits:** Intake & Prep/routing stations (with a cross-cutting
|
|
9
|
+
> enforce arm) — a capability nobody remembers to invoke never fires, so your
|
|
10
|
+
> agent walks into the work without the right memory, expert, skill, or model
|
|
11
|
+
> and skips the gates it should have hit. **What it delivers:** per-prompt,
|
|
12
|
+
> context-aware auto-application — the right context is injected at intake and
|
|
13
|
+
> routing without you asking, and the hard gates fire on their own — so the
|
|
14
|
+
> [delivery pipeline](../guides/DELIVERY_PIPELINE.md)'s stations run themselves
|
|
15
|
+
> instead of relying on the agent's memory.
|
|
16
|
+
|
|
8
17
|
## 1. Two modes (never conflated)
|
|
9
18
|
|
|
10
19
|
- **Enforce** — deterministic, hard gates that must always fire (worktree,
|
|
11
20
|
policy/compliance, delivery, schema-diff, completion). These *block*
|
|
12
|
-
(exit 2 / throw). Already largely wired; this feature fills the gaps.
|
|
21
|
+
(exit 2 / throw). Already largely wired; this feature fills the gaps. (These
|
|
22
|
+
are the station gates across isolation, build, QC, and shipping.)
|
|
13
23
|
- **Assist** — capabilities that *should* fire when contextually appropriate
|
|
14
24
|
(memory recall, pattern RAG, expert-route, skill surfacing, model routing,
|
|
15
25
|
task linking). These *inject context* the model sees — raising the odds it
|
|
16
26
|
uses the right tool without removing judgement. Optionally **auto-spawn**
|
|
17
|
-
an expert above a confidence threshold for whitelisted task types.
|
|
27
|
+
an expert above a confidence threshold for whitelisted task types. (This is
|
|
28
|
+
the intake/routing work: getting the right context and approach onto the belt
|
|
29
|
+
before the agent commits.)
|
|
18
30
|
|
|
19
31
|
## 2. Architecture: one resolver, many adapters
|
|
20
32
|
|
|
@@ -107,6 +119,9 @@ export function resolve(
|
|
|
107
119
|
|
|
108
120
|
## 4. Feature → auto-application matrix
|
|
109
121
|
|
|
122
|
+
Each row is a station capability the reactor fires on your behalf, tagged by
|
|
123
|
+
mode (Assist = intake/routing context; Enforce = a station gate):
|
|
124
|
+
|
|
110
125
|
| Feature | Trigger | Mode |
|
|
111
126
|
|---|---|---|
|
|
112
127
|
| memory recall | per-prompt (semantic on prompt) | Assist |
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
# Configuration
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
> **🏭 Where this fits:** The control panel for the whole line — every station's knobs in one place. **What it delivers:** sensible defaults out of the box (via `uap setup`), and precise control when you want to tune how your [delivery pipeline](../guides/DELIVERY_PIPELINE.md) behaves.
|
|
4
|
+
|
|
5
|
+
Most of the time you won't touch any of this — `uap init` / `uap setup` write a
|
|
6
|
+
working `.uap.json` and a `.uap/proxy.env` for you, and the wizard picks sensible
|
|
7
|
+
defaults for every station on the line. But when you're ready to tune how your
|
|
8
|
+
delivery line behaves, this is the page. UAP is configured through the
|
|
9
|
+
project-level `.uap.json` file plus a set of environment variables, and every
|
|
10
|
+
option below actually exists in the code, so you can adjust it by hand with
|
|
11
|
+
confidence. The proxy auto-loads `.uap/proxy.env`, so model wiring you set there
|
|
12
|
+
is picked up automatically.
|
|
7
13
|
|
|
8
14
|
## Project config: `.uap.json`
|
|
9
15
|
|
|
10
16
|
`.uap.json` lives at the project root and is validated against a strict schema —
|
|
11
|
-
unknown keys and bad types are rejected
|
|
12
|
-
|
|
17
|
+
unknown keys and bad types are rejected, so a typo fails loudly instead of
|
|
18
|
+
silently doing the wrong thing. Every section is optional except `project`;
|
|
19
|
+
defaults are applied for anything you omit.
|
|
13
20
|
|
|
14
21
|
```json
|
|
15
22
|
{
|
|
@@ -177,7 +184,9 @@ compare, presets, select, export, health) and `uap dashboard models`.
|
|
|
177
184
|
|
|
178
185
|
## Environment variables
|
|
179
186
|
|
|
180
|
-
These are the environment variables read by the code.
|
|
187
|
+
These are the environment variables read by the code. You'll usually leave them
|
|
188
|
+
alone — the wizard writes what's needed into `.uap/proxy.env` — but here's the
|
|
189
|
+
full set for when you want to override something.
|
|
181
190
|
|
|
182
191
|
### Memory & Qdrant
|
|
183
192
|
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
# Installation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(
|
|
3
|
+
> **🏭 Where this fits:** Setting up the floor — before any station can run, UAP has to be installed and wired into your agent harness. **What it delivers:** one `npm install` + one `uap setup` and every station on the [delivery pipeline](../guides/DELIVERY_PIPELINE.md) is live in your project.
|
|
4
|
+
|
|
5
|
+
Welcome. The Universal Agent Protocol (UAP) is the discipline layer that turns
|
|
6
|
+
your AI agent into a reliable member of your software delivery line. Left to its
|
|
7
|
+
own devices an agent forgets what it learned yesterday, picks the wrong approach,
|
|
8
|
+
edits your main branch, writes plausible-but-wrong code, and cheerfully declares
|
|
9
|
+
"done" on something that never actually ran. UAP puts a station at each of those
|
|
10
|
+
break points so the work that comes off the line is trustworthy.
|
|
11
|
+
|
|
12
|
+
It ships as a single npm package (`@miller-tech/uap`, v1.93.1) that installs the
|
|
13
|
+
`uap` CLI. This page gets it onto your machine and wired into your project.
|
|
6
14
|
|
|
7
15
|
## Prerequisites
|
|
8
16
|
|
|
17
|
+
You don't need all of these to start — UAP works with just Node, and turns on
|
|
18
|
+
more stations as you provide the pieces.
|
|
19
|
+
|
|
9
20
|
| Requirement | Needed for | Notes |
|
|
10
21
|
| --- | --- | --- |
|
|
11
22
|
| **Node.js >= 18** | Everything | The CLI is published as ESM and requires Node 18 or newer. |
|
|
@@ -14,9 +25,10 @@ CLAUDE.md protocol enforcement. It ships as a single npm package
|
|
|
14
25
|
| **Python 3** | Pattern RAG indexing & embeddings | Optional. `uap setup` creates a virtualenv and installs the pattern indexing dependencies. |
|
|
15
26
|
| **A local OpenAI-compatible model** | `uap deliver`, multi-model routing | Optional. Points at an OpenAI-compatible `/v1` endpoint (default `http://localhost:4000/v1`). |
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
the
|
|
19
|
-
|
|
28
|
+
If you skip Docker, Python, or a local model, those steps are simply skipped and
|
|
29
|
+
the matching features (semantic recall, pattern RAG, the convergence harness) sit
|
|
30
|
+
dormant until you provide them later. Nothing breaks — you just start with fewer
|
|
31
|
+
stations lit up.
|
|
20
32
|
|
|
21
33
|
## Install
|
|
22
34
|
|
|
@@ -32,7 +44,7 @@ npm install -g @miller-tech/uap
|
|
|
32
44
|
uap --version
|
|
33
45
|
```
|
|
34
46
|
|
|
35
|
-
This prints the installed package version (e.g. `1.
|
|
47
|
+
This prints the installed package version (e.g. `1.93.1`).
|
|
36
48
|
|
|
37
49
|
## One-command setup
|
|
38
50
|
|
|
@@ -42,14 +54,21 @@ From the root of the project you want to wire up, run:
|
|
|
42
54
|
uap setup
|
|
43
55
|
```
|
|
44
56
|
|
|
45
|
-
`uap setup` is a **
|
|
46
|
-
@clack/prompts). It walks you through the
|
|
47
|
-
tiers
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
`uap setup` is a **friendly, arrow-key guided wizard by default** (powered by
|
|
58
|
+
@clack/prompts). It walks you through the whole delivery line, one station at a
|
|
59
|
+
time — memory tiers so your agent remembers, patterns and the policy engine so it
|
|
60
|
+
follows your rules, your model provider/profile, harness hooks, the browser
|
|
61
|
+
dashboard, and the newer stations too: **recipes and the escalation judge,
|
|
62
|
+
delivery gates, model-slot concurrency, cross-agent collaboration, DESIGN.md, and
|
|
63
|
+
the reactor**. Each prompt comes with a **smart default inferred from your
|
|
64
|
+
environment** (Docker → offer Qdrant; a detected local model endpoint →
|
|
65
|
+
preselect the local provider/profile), so you can usually just press Enter to
|
|
66
|
+
accept the recommended path.
|
|
67
|
+
|
|
68
|
+
When it finishes, setup writes your `.uap.json` and a `.uap/proxy.env` (the proxy
|
|
69
|
+
auto-loads that env file, so your model wiring is picked up automatically). On a
|
|
70
|
+
non-TTY/CI run, or with `--non-interactive`/`-y`, it runs the same flow
|
|
71
|
+
non-interactively with defaults so pipelines never hang on a prompt.
|
|
53
72
|
|
|
54
73
|
Before it changes anything, setup **backs up your existing agent instruction
|
|
55
74
|
files** (`CLAUDE.md`, `AGENTS.md`, `.cursorrules`, …, plus `.uap.json`) to
|
|
@@ -135,10 +154,10 @@ to overwrite existing configuration.
|
|
|
135
154
|
|
|
136
155
|
## Installing harness hooks
|
|
137
156
|
|
|
138
|
-
UAP
|
|
157
|
+
UAP works with nine AI coding harnesses: **Claude Code, Factory, Cursor, VSCode,
|
|
139
158
|
OpenCode, Codex, ForgeCode, Oh-My-Pi, and Hermes**. `uap setup` installs hooks
|
|
140
|
-
for the project
|
|
141
|
-
|
|
159
|
+
for the platforms it finds in your project automatically, but you can install or
|
|
160
|
+
re-install them by hand any time.
|
|
142
161
|
|
|
143
162
|
Install hooks for every detected harness:
|
|
144
163
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
> **🏭 The big idea:** UAP is the discipline layer for your AI delivery line — memory so agents remember, isolation so they don't clobber your repo, real verification so "done" means it actually runs, and coordination so many agents don't collide. See the [delivery pipeline](../guides/DELIVERY_PIPELINE.md) for the full station-by-station tour.
|
|
4
|
+
|
|
5
|
+
Let's get you from a clean checkout to your first delivered task in about five
|
|
6
|
+
minutes. This assumes you've already installed the CLI — head to
|
|
7
|
+
[Installation](./INSTALLATION.md) first if not.
|
|
6
8
|
|
|
7
9
|
## 1. Set up your project (~1 min)
|
|
8
10
|
|
|
@@ -12,12 +14,13 @@ From the root of your project:
|
|
|
12
14
|
uap setup
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
This initializes `.uap.json`, the memory
|
|
16
|
-
`CLAUDE.md`, starts Qdrant (if Docker is
|
|
17
|
-
installs the harness hooks. It
|
|
18
|
-
|
|
17
|
+
This lights up the delivery line: it initializes `.uap.json`, the memory
|
|
18
|
+
directories and database, generates `CLAUDE.md`, starts Qdrant (if Docker is
|
|
19
|
+
available), wires the MCP Router, and installs the harness hooks. It also writes
|
|
20
|
+
a `.uap/proxy.env` that the proxy auto-loads, so your model wiring is ready to
|
|
21
|
+
go. It finishes with a summary showing which steps succeeded.
|
|
19
22
|
|
|
20
|
-
Confirm memory is healthy:
|
|
23
|
+
Confirm memory — the station that lets your agent remember — is healthy:
|
|
21
24
|
|
|
22
25
|
```bash
|
|
23
26
|
uap memory status
|
|
@@ -28,7 +31,8 @@ long-term endpoint reported at `http://localhost:6333`.
|
|
|
28
31
|
|
|
29
32
|
## 2. Store and query a memory (~1 min)
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
This is the intake station: instead of starting every task from zero, your agent
|
|
35
|
+
keeps what it learns. Write a learning into long-term memory:
|
|
32
36
|
|
|
33
37
|
```bash
|
|
34
38
|
uap memory store "API keys are loaded from the QDRANT_API_KEY env var" -t config,memory -i 7
|
|
@@ -37,7 +41,7 @@ uap memory store "API keys are loaded from the QDRANT_API_KEY env var" -t config
|
|
|
37
41
|
`-t` adds comma-separated tags and `-i` sets the importance score (1-10). The
|
|
38
42
|
store applies a quality write gate by default; pass `-f` to bypass it.
|
|
39
43
|
|
|
40
|
-
Now query it back semantically:
|
|
44
|
+
Now query it back semantically — you don't need the exact words, just the idea:
|
|
41
45
|
|
|
42
46
|
```bash
|
|
43
47
|
uap memory query "where do api keys come from"
|
|
@@ -49,9 +53,10 @@ matching entries with their similarity scores. Tune results with
|
|
|
49
53
|
|
|
50
54
|
## 3. Run `uap deliver` on a small task (~2 min)
|
|
51
55
|
|
|
52
|
-
`uap deliver` is the
|
|
56
|
+
`uap deliver` is the build-and-QC station: it iterates a model against your
|
|
53
57
|
project's **real completion gates** (build, typecheck, test, lint) until every
|
|
54
|
-
required gate passes or the turn budget is exhausted.
|
|
58
|
+
required gate passes or the turn budget is exhausted. This is how "done" stops
|
|
59
|
+
meaning "the model said so" and starts meaning "the code actually passed".
|
|
55
60
|
|
|
56
61
|
First do a dry run to see the detected gates and plan without calling a model:
|
|
57
62
|
|
|
@@ -69,7 +74,7 @@ When the plan looks right, run it for real:
|
|
|
69
74
|
uap deliver "fix the failing test in src/utils/dates"
|
|
70
75
|
```
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
A few things worth knowing:
|
|
73
78
|
|
|
74
79
|
- The default model preset is `qwen35-a3b` (override with `-m <preset>` or the
|
|
75
80
|
`UAP_DELIVER_MODEL` env var).
|
|
@@ -86,7 +91,8 @@ Notes on behaviour:
|
|
|
86
91
|
|
|
87
92
|
## 4. View the dashboard (~1 min)
|
|
88
93
|
|
|
89
|
-
UAP ships a rich terminal dashboard
|
|
94
|
+
UAP ships a rich terminal dashboard so you can watch the line from above. View
|
|
95
|
+
the full system overview:
|
|
90
96
|
|
|
91
97
|
```bash
|
|
92
98
|
uap dashboard overview
|
package/docs/guides/AUTOMATIC.md
CHANGED
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
> **Install once. Every feature kicks in automatically.**
|
|
4
4
|
|
|
5
|
+
> **🏭 Where this fits:** CROSS-CUTTING — this is what breaks in most agentic
|
|
6
|
+
> setups: the safeguards exist but nobody remembers to run them, so the line
|
|
7
|
+
> only runs as well as the operator's discipline that day. **What it delivers:**
|
|
8
|
+
> the line runs itself — the right station on your [delivery
|
|
9
|
+
> pipeline](./DELIVERY_PIPELINE.md) activates automatically for each task, with
|
|
10
|
+
> no flags to set and nothing to remember.
|
|
11
|
+
|
|
5
12
|
UAP is not a set of manual steps you orchestrate. It is a **policy-and-resolver
|
|
6
13
|
layer** that sits between your coding agent (Claude Code, Opencode, Cursor,
|
|
7
14
|
Windsurf, Codex, etc.) and the model you use. Every feature below activates
|
|
8
15
|
**automatically** based on what the agent is doing — no config changes, no
|
|
9
|
-
manual triggers, no prompts to remember.
|
|
16
|
+
manual triggers, no prompts to remember. Each one guards a different station on
|
|
17
|
+
the delivery line so the whole thing keeps running without you standing over it.
|
|
10
18
|
|
|
11
19
|
---
|
|
12
20
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# UAP Automatic Features — What Fires When
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **🏭 Where this fits:** CROSS-CUTTING — this is what breaks in a normal
|
|
4
|
+
> agentic workflow: every safeguard is a manual step, so the one you forget is
|
|
5
|
+
> the one that bites you. **What it delivers:** every station on your [delivery
|
|
6
|
+
> pipeline](./DELIVERY_PIPELINE.md) fires automatically at the right moment —
|
|
7
|
+
> the line runs itself, no flags to set, no config to remember.
|
|
8
|
+
|
|
9
|
+
Install UAP (`npm i -g universal-agent-protocol`) and every feature below activates automatically. There are no flags to set, no config to edit. UAP observes your workflow and injects the right capability at the right time — the right station on the line kicking in for each task, without you routing work by hand.
|
|
4
10
|
|
|
5
11
|
---
|
|
6
12
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Multi-Agent Coordination
|
|
2
2
|
|
|
3
|
-
> UAP v1.
|
|
3
|
+
> UAP v1.93.1
|
|
4
|
+
|
|
5
|
+
> **🏭 Where this fits:** LINE COORDINATION — the station where parallel agents on the [delivery pipeline](./DELIVERY_PIPELINE.md) quietly step on each other: two of them editing the same file, duplicating work, or deadlocking at merge. **What it delivers:** agents register, announce what they're about to touch, and check for overlaps *before* they start — so the line runs many workers at once and still stays conflict-free.
|
|
4
6
|
|
|
5
7
|
When multiple agents work a codebase in parallel, the expensive failure is two
|
|
6
8
|
of them editing the same file at the same time and colliding at merge. UAP's
|
|
@@ -34,7 +36,8 @@ and routing/pattern helpers. The CLI entry points are
|
|
|
34
36
|
|
|
35
37
|
## The announce / overlaps workflow
|
|
36
38
|
|
|
37
|
-
The recommended flow, printed by `uap agent register` itself
|
|
39
|
+
The recommended flow, printed by `uap agent register` itself — think of it as
|
|
40
|
+
each worker calling out "I've got this one" before reaching for a part:
|
|
38
41
|
|
|
39
42
|
```bash
|
|
40
43
|
# 1. Register (once per agent)
|
package/docs/guides/DELIVER.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# `uap deliver` — the delivery harness
|
|
2
2
|
|
|
3
|
+
> **🏭 Where this fits:** BUILD + QC/VERIFY — the two stations where a normal agentic workflow breaks hardest. Your agent writes plausible-but-wrong code (or empty, looping local-model output), then declares "done" on something that never compiled. **What it delivers:** a convergence loop that keeps working the code against your project's *real* gates — build, tests, lint, integration, even a dev deploy — and refuses to call it finished until they actually pass.
|
|
4
|
+
|
|
3
5
|
`uap deliver` drives a model through a **convergence loop that iterates against your project's real completion gates until the work is actually delivered** — build green, tests passing, lint clean — not until the model *claims* it's done.
|
|
4
6
|
|
|
5
|
-
It is UAP's answer to "the agent said it finished, but nothing compiles." Instead of a single shot, `deliver` runs an execute → verify → critique → iterate loop, feeding real gate failures back to the model and persisting until the gates pass or the run provably stalls.
|
|
7
|
+
Think of it as the quality-control station on your [delivery pipeline](./DELIVERY_PIPELINE.md): raw code goes in, and nothing leaves the line until it has been inspected against the real definition of done. It is UAP's answer to "the agent said it finished, but nothing compiles." Instead of a single shot, `deliver` runs an execute → verify → critique → iterate loop, feeding real gate failures back to the model and persisting until the gates pass or the run provably stalls.
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
10
|
uap deliver "implement the password reset flow"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# The UAP Delivery Pipeline
|
|
2
|
+
|
|
3
|
+
**A station-by-station tour of where agentic coding actually breaks — and what UAP puts in place to catch it.**
|
|
4
|
+
|
|
5
|
+
Think of shipping software with an AI agent like running a small factory floor. Raw intent comes in one end; working, verified, merged code should come out the other. In between there are stations — understand the job, set up a workbench, build the thing, check it actually works, ship it — and a break at any one of them quietly ruins everything downstream.
|
|
6
|
+
|
|
7
|
+
Left to their own devices, coding agents are talented 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. None of that is a model-quality problem you can fix by swapping in a smarter model — it's a *process* problem. UAP is the process: a station at every point where the line usually jams.
|
|
8
|
+
|
|
9
|
+
Here's the whole floor at a glance, then a walk through each station.
|
|
10
|
+
|
|
11
|
+
| # | Station | Where a normal agent breaks | What UAP delivers |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| 1 | **Intake** | Starts every session cold; forgets past decisions; invents scope | The agent walks in already knowing your codebase, conventions, and history |
|
|
14
|
+
| 2 | **Prep / routing** | Picks the wrong approach or burns a frontier model on a trivial edit | The right job goes to the right station and the right-sized model |
|
|
15
|
+
| 3 | **Isolation** | Edits `main` directly; clobbers files; two agents overwrite each other | Every job gets its own bench; nothing lands in your working tree by surprise |
|
|
16
|
+
| 4 | **Build** | Produces plausible-but-wrong code, stubs, or (on local models) empty/looping output | Real code that compiles — not scaffolding theatre |
|
|
17
|
+
| 5 | **QC / verify** | Declares "done" on code that never ran, and grades its own homework | "Done" means *verified* done, checked by something other than the author |
|
|
18
|
+
| 6 | **Line coordination** | Parallel agents collide, duplicate work, or deadlock | Agents compound each other's progress instead of fighting over it |
|
|
19
|
+
| 7 | **Shipping** | Regresses on merge, breaks CI, skips the version bump, force-pushes over history | Clean PRs, correct versioning, CI-verified merges |
|
|
20
|
+
| 8 | **Feedback** | Makes the same mistake next session, and the one after | The floor gets a little better every run |
|
|
21
|
+
|
|
22
|
+
Two things run the length of the whole line: **policy gates** (the rules are *executable hooks that block*, not prose an agent can ignore) and the **MCP Router** (keeps the context window lean so the agent can think). And all of it works across [9 agent harnesses](../reference/PLATFORMS.md) — same line, whichever floor you're standing on.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Station 1 — Intake: understand the work
|
|
27
|
+
|
|
28
|
+
**The break:** a fresh agent session is amnesiac. It doesn't remember the auth pattern you agreed on last week, the reason you *didn't* use library X, or the shape of your codebase. So it re-derives everything from scratch — and re-makes old mistakes.
|
|
29
|
+
|
|
30
|
+
**What UAP puts here:**
|
|
31
|
+
- **[4-tier memory](MEMORY.md)** — a daily log, a working cache, semantic recall (Qdrant vectors), and a long-term archive, with write-gates that keep junk and duplicates out. Ask *"how did we handle auth last time?"* and get a real answer.
|
|
32
|
+
- **The reactor** — per-prompt injection of the capabilities, skills, and patterns that match what you just asked for, so relevant context is on the bench before the agent starts.
|
|
33
|
+
- **[DESIGN.md](../../DESIGN.md)** — a design brief the agent interrogates and lints against, so UI work starts from your intent, not its guess.
|
|
34
|
+
|
|
35
|
+
**Delivered:** the agent shows up already onboarded.
|
|
36
|
+
|
|
37
|
+
## Station 2 — Prep / routing: the right job to the right station
|
|
38
|
+
|
|
39
|
+
**The break:** agents over-think a one-line fix and under-think a migration, and they'll happily spend a frontier model's budget rewriting a README.
|
|
40
|
+
|
|
41
|
+
**What UAP puts here:**
|
|
42
|
+
- **[Multi-model routing](MULTI_MODEL.md)** — cheap tasks go to cheap models, hard tasks get the firepower, across 7 profiles.
|
|
43
|
+
- **Pattern router + query-complexity** — the task is matched to a known [playbook](../reference/PATTERNS.md) and a difficulty tier before work starts.
|
|
44
|
+
- **[Expert droids & skills](DROIDS_AND_SKILLS.md)** — specialist stations (security, tests, performance) that a router recommends per task.
|
|
45
|
+
|
|
46
|
+
**Delivered:** effort and cost matched to the actual job.
|
|
47
|
+
|
|
48
|
+
## Station 3 — Isolation: each job gets its own bench
|
|
49
|
+
|
|
50
|
+
**The break:** an agent editing your working tree directly is one bad diff away from wrecking your afternoon — and two agents in the same repo will overwrite each other.
|
|
51
|
+
|
|
52
|
+
**What UAP puts here:**
|
|
53
|
+
- **[Worktree workflow](WORKTREE_WORKFLOW.md)** — branch-per-feature, auto-PR, safe cleanup, *enforced* so agents never edit the project root.
|
|
54
|
+
- **Always-on file coordination** — agents announce the files they're touching and same-file edits across agents are blocked live.
|
|
55
|
+
- **The delivery gate** — code changes route through the verified `deliver` path instead of raw edits.
|
|
56
|
+
|
|
57
|
+
**Delivered:** no more "the agent nuked my working tree."
|
|
58
|
+
|
|
59
|
+
## Station 4 — Build: actually make the thing
|
|
60
|
+
|
|
61
|
+
**The break:** this is where "looks right" bites. Agents emit plausible-but-wrong code, quietly replace real files with stubs, and — on cheap local models — spiral into empty or looping output.
|
|
62
|
+
|
|
63
|
+
**What UAP puts here:**
|
|
64
|
+
- **[`uap deliver`](DELIVER.md)** — a convergence loop that keeps iterating a model against your real gates until the work is actually built.
|
|
65
|
+
- **Serving-layer recipes** — Fusion / Confidence / Ratings / ReMoM run behind the proxy to raise output quality, *escalating to a stronger, distinct judge* when it counts. (A same-model judge — qwen grading qwen — was measured to add nothing, so recipes only spend that budget when a genuinely stronger judge is wired.)
|
|
66
|
+
- **[Local-model handling](LOCAL_MODELS.md)** — the proxy's guardrails (loop-breaker, recon-convergence, the no-tool empty-output guard, path normalization) keep a cheap local model on the rails so it produces real modules, not scaffolding.
|
|
67
|
+
|
|
68
|
+
**Delivered:** code that compiles, not a convincing mock-up of code that compiles.
|
|
69
|
+
|
|
70
|
+
## Station 5 — QC / verify: prove it actually works
|
|
71
|
+
|
|
72
|
+
**The break:** this is the station everyone skips, and it's the expensive one. The agent says "done" on code that doesn't compile, doesn't run, or doesn't do what you asked — and then *grades its own homework* and confirms its own success. A generator that is also its own evaluator will always pass itself.
|
|
73
|
+
|
|
74
|
+
**What UAP puts here:**
|
|
75
|
+
- **Completion gates** — build, tests, lint, type-check must be green before anything can claim "done."
|
|
76
|
+
- **Execution / runtime verify** (`uap verify`) — the generated code is actually *run* (headless browser, vm-dom, or child process) to prove it works, not just that it parses.
|
|
77
|
+
- **The acceptance judge** — an independent check that the behaviour matches the spec.
|
|
78
|
+
- **Generator ≠ evaluator** — the thing that grades the work is deliberately *not* the thing that wrote it.
|
|
79
|
+
|
|
80
|
+
**Delivered:** "done" you can trust, because a different checker signed off.
|
|
81
|
+
|
|
82
|
+
## Station 6 — Line coordination: many workers, one floor
|
|
83
|
+
|
|
84
|
+
**The break:** fan out to several agents and, without traffic control, they duplicate each other, stomp on shared files, exhaust the inference server's slots, or deadlock waiting on one another.
|
|
85
|
+
|
|
86
|
+
**What UAP puts here:**
|
|
87
|
+
- **[Coordination service](COORDINATION.md)** — a shared board of who's doing what, with findings, dead-ends, hand-offs, and challenge mode so agents build on each other.
|
|
88
|
+
- **Model-slot concurrency** — a budget + lease so fan-out doesn't exhaust the inference backend's real slot capacity.
|
|
89
|
+
- **[Deploy batching](DEPLOY_BATCHING.md)** — git/deploy actions are batched and de-conflicted.
|
|
90
|
+
|
|
91
|
+
**Delivered:** more agents make things *faster*, not messier.
|
|
92
|
+
|
|
93
|
+
## Station 7 — Shipping: out the door safely
|
|
94
|
+
|
|
95
|
+
**The break:** the last mile is where good work dies — a merge that regresses, a red CI that gets ignored, a skipped version bump, a force-push over someone's history.
|
|
96
|
+
|
|
97
|
+
**What UAP puts here:**
|
|
98
|
+
- **Worktree → PR flow** with completion and version gates, so merges are clean and versioned.
|
|
99
|
+
- **CI feedback watcher** — when CI goes red after a push, the loop re-converges instead of walking away.
|
|
100
|
+
- **Never-regress + git-safety** — destructive git operations are guarded; passing work stays passing.
|
|
101
|
+
|
|
102
|
+
**Delivered:** changes reach `main` clean, versioned, and CI-verified.
|
|
103
|
+
|
|
104
|
+
## Station 8 — Feedback: the floor learns
|
|
105
|
+
|
|
106
|
+
**The break:** without a memory of what went wrong, an agent re-learns the same lesson every session — forever.
|
|
107
|
+
|
|
108
|
+
**What UAP puts here:**
|
|
109
|
+
- **Memory promotion** — significant learnings graduate from short-term to long-term memory.
|
|
110
|
+
- **Pattern reinforcement learning** — patterns that work get reinforced; ones that don't fade.
|
|
111
|
+
- **Session analysis** — each session records what got done, what stalled, and why.
|
|
112
|
+
|
|
113
|
+
**Delivered:** a line that's measurably better next week than it is today.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Where to go next
|
|
118
|
+
|
|
119
|
+
- New here? Start with the **[Quickstart](../getting-started/QUICKSTART.md)** and let `uap setup` wire the whole line for you.
|
|
120
|
+
- Want the catalog of every station's machinery? See **[Features](../reference/FEATURES.md)**.
|
|
121
|
+
- Want the engineering view of how the stations fit together? See the **[Architecture Overview](../architecture/OVERVIEW.md)**.
|
|
122
|
+
- Care most about the QC station (the one that matters most)? Start with **[`uap deliver`](DELIVER.md)**.
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
# Deploy Batching
|
|
2
2
|
|
|
3
|
-
> UAP v1.
|
|
3
|
+
> UAP v1.93.1
|
|
4
|
+
|
|
5
|
+
> **🏭 Where this fits:** LINE COORDINATION → SHIPPING — this is the station
|
|
6
|
+
> where parallel agents collide: two push to the same branch within seconds and
|
|
7
|
+
> one gets rejected, or a burst of redundant deploys stampedes CI. **What it
|
|
8
|
+
> delivers:** git and deploy actions are queued, squashed, and deduplicated into
|
|
9
|
+
> one ordered batch — so many agents can ship down the same line without
|
|
10
|
+
> trampling each other.
|
|
4
11
|
|
|
5
12
|
When several agents work in parallel, they all want to commit, push, merge, and
|
|
6
|
-
deploy at roughly the same time.
|
|
7
|
-
|
|
13
|
+
deploy at roughly the same time. That's the moment a normal agentic workflow
|
|
14
|
+
falls apart at the end of the [delivery pipeline](./DELIVERY_PIPELINE.md). Left
|
|
15
|
+
unmanaged, it produces two failure modes:
|
|
8
16
|
|
|
9
17
|
- **Merge conflicts** — two agents push to the same branch within seconds of
|
|
10
18
|
each other and the second push is rejected (or worse, races into a conflicted
|
|
@@ -15,7 +23,8 @@ modes:
|
|
|
15
23
|
The deploy batcher solves this by *queueing* git/deploy actions and grouping
|
|
16
24
|
them inside short, per-action-type time windows. Commits to the same branch are
|
|
17
25
|
squashed, duplicate pushes and workflow triggers are deduplicated, and the
|
|
18
|
-
result is executed as a single ordered batch
|
|
26
|
+
result is executed as a single ordered batch — the line coordinator that keeps
|
|
27
|
+
the shipping station orderly.
|
|
19
28
|
|
|
20
29
|
The implementation lives in
|
|
21
30
|
[`src/coordination/deploy-batcher.ts`](../../src/coordination/deploy-batcher.ts),
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Droids and Skills
|
|
2
2
|
|
|
3
|
-
> Applies to UAP **v1.
|
|
3
|
+
> Applies to UAP **v1.93.1**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **🏭 Where this fits:** PREP/ROUTING — this is the station where a
|
|
6
|
+
> generalist agent takes the wrong approach on specialist work: reviewing
|
|
7
|
+
> security like a linter, refactoring without an architect's eye. **What it
|
|
8
|
+
> delivers:** the right specialist station gets put in front of your model
|
|
9
|
+
> *before* it starts — a security auditor for auth work, a language expert for
|
|
10
|
+
> the language at hand — so the approach is right from the first line.
|
|
11
|
+
|
|
12
|
+
UAP ships two complementary extension mechanisms that decide *who* and *how* at
|
|
13
|
+
the prep stage of your [delivery pipeline](./DELIVERY_PIPELINE.md):
|
|
6
14
|
|
|
7
15
|
- **Droids** — markdown-defined specialist agents (a reviewer, a language
|
|
8
16
|
expert, an architect). Each droid is a focused persona with its own tools and
|
|
@@ -11,7 +19,9 @@ UAP ships two complementary extension mechanisms:
|
|
|
11
19
|
protocol, a navigation technique, a memory operation).
|
|
12
20
|
|
|
13
21
|
Droids answer *"who should do this?"*; skills answer *"how is this done?"*. A
|
|
14
|
-
droid can pull in skills when a domain-specific workflow applies.
|
|
22
|
+
droid can pull in skills when a domain-specific workflow applies. Think of them
|
|
23
|
+
as swapping in the right specialist station for the job rather than sending
|
|
24
|
+
everything down one generalist line.
|
|
15
25
|
|
|
16
26
|
## What a droid is
|
|
17
27
|
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# Running UAP Against Local Models
|
|
2
2
|
|
|
3
|
-
> UAP v1.
|
|
3
|
+
> UAP v1.93.1
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
> **🏭 Where this fits:** BUILD — this is the station where a cheap local model
|
|
6
|
+
> flails: plausible-but-wrong code, empty output, or a loop that never lands a
|
|
7
|
+
> real change. **What it delivers:** the proxy and the convergence loop keep a
|
|
8
|
+
> small, zero-per-token model on the rails so it produces *verified* code
|
|
9
|
+
> instead of stubs — real results on a GPU you already own.
|
|
10
|
+
|
|
11
|
+
Here's the pain: you *want* to run your agent on a local model — inference on
|
|
12
|
+
your own hardware, zero per-token cost — but on its own a small quantized model
|
|
13
|
+
rarely nails a non-trivial change. It one-shots something that looks right and
|
|
14
|
+
doesn't compile.
|
|
15
|
+
|
|
16
|
+
Here's the fix: UAP drives its coding/convergence loop against **local models**
|
|
17
|
+
served by [llama.cpp](https://github.com/ggml-org/llama.cpp) instead of a hosted
|
|
18
|
+
API. The loop iterates the model against your real gates until the change is
|
|
19
|
+
verified — that's what turns a modest open-weight model such as Qwen 3.x into a
|
|
20
|
+
productive station on your [delivery pipeline](./DELIVERY_PIPELINE.md).
|
|
9
21
|
|
|
10
22
|
> **Just want the recommended local setup?** See
|
|
11
23
|
> [Qwen3.6 35B-A3B on llama.cpp, by VRAM tier](QWEN36_LLAMACPP.md) for
|
|
@@ -123,8 +135,11 @@ to `http://localhost:4000/v1`.
|
|
|
123
135
|
| `--deploy` | On success, queue a commit of applied files into the deploy batcher |
|
|
124
136
|
| `--dry-run` | Show detected gates and plan without calling the model |
|
|
125
137
|
|
|
126
|
-
A common local pattern is a cheap local executor that escalates to a
|
|
127
|
-
model only when it stalls:
|
|
138
|
+
A common local pattern is a cheap local executor that escalates to a **stronger,
|
|
139
|
+
distinct** model only when it stalls. This distinction matters: a same-model
|
|
140
|
+
judge (a local model grading its own output) was measured to add no lift —
|
|
141
|
+
escalation only pays off when the model you escalate *to* is genuinely more
|
|
142
|
+
capable than the one that stalled.
|
|
128
143
|
|
|
129
144
|
```bash
|
|
130
145
|
uap deliver "implement the retry logic" \
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# MCP Router
|
|
2
2
|
|
|
3
|
-
> UAP v1.
|
|
3
|
+
> UAP v1.93.1
|
|
4
|
+
|
|
5
|
+
> **🏭 Where this fits:** CROSS-CUTTING — keeping the context window lean at every station of the [delivery pipeline](./DELIVERY_PIPELINE.md). In a normal agentic workflow every tool call dumps its full result into context, so mostly-irrelevant output crowds out the details your agent actually needs. **What it delivers:** a proxy that compresses tool output before it reaches the model — up to 98% fewer tokens on large results — so the agent keeps room for real work and you spend less per session.
|
|
4
6
|
|
|
5
7
|
The MCP Router is a token-optimizing proxy that sits between an AI harness and
|
|
6
8
|
its MCP tool servers. It is implemented as 11 modules under
|
package/docs/guides/MEMORY.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Memory System
|
|
2
2
|
|
|
3
|
-
> UAP v1.
|
|
3
|
+
> UAP v1.93.1
|
|
4
|
+
|
|
5
|
+
> **🏭 Where this fits:** INTAKE + FEEDBACK — the front and back doors of the [delivery pipeline](./DELIVERY_PIPELINE.md). At intake, a fresh agent forgets everything the last session learned and re-hallucinates scope; at feedback, nobody records the lesson, so the same mistake ships again next week. **What it delivers:** a persistent, searchable memory that hands each new agent the relevant past learnings on the way in, and captures durable lessons on the way out — so your team of agents gets smarter every run instead of starting from zero.
|
|
4
6
|
|
|
5
7
|
The Universal Agent Protocol gives agents a persistent, multi-tier memory so
|
|
6
8
|
that learnings survive across sessions, compactions, and even harness switches.
|
|
@@ -14,7 +16,8 @@ only the most relevant ones on demand via semantic search.
|
|
|
14
16
|
## The four tiers
|
|
15
17
|
|
|
16
18
|
Memory flows from a cheap, high-churn staging area down to a durable, searchable
|
|
17
|
-
archive
|
|
19
|
+
archive — think of it as raw notes at the head of the line being refined into
|
|
20
|
+
finished, shelved knowledge. Each tier has a distinct cost/permanence trade-off.
|
|
18
21
|
|
|
19
22
|
| Tier | Name | Storage | Purpose | Module(s) |
|
|
20
23
|
|------|------|---------|---------|-----------|
|
|
@@ -71,7 +74,8 @@ threshold (default `0.35`).
|
|
|
71
74
|
|
|
72
75
|
Not every observation deserves to be a memory. The write gate
|
|
73
76
|
([`write-gate.ts`](../../src/memory/write-gate.ts)) scores incoming content and
|
|
74
|
-
**rejects low-value writes** before they consume storage or pollute recall
|
|
77
|
+
**rejects low-value writes** before they consume storage or pollute recall —
|
|
78
|
+
quality control at the feedback door, so the archive stays high-signal.
|
|
75
79
|
Rejections include:
|
|
76
80
|
|
|
77
81
|
- Empty content
|
|
@@ -210,7 +214,8 @@ uap memory maintain [-v|--verbose]
|
|
|
210
214
|
## How agents use memory
|
|
211
215
|
|
|
212
216
|
The recommended decision loop (see the project `CLAUDE.md`) wires memory into
|
|
213
|
-
every task
|
|
217
|
+
every task — pulling context in at intake and pushing lessons back out at
|
|
218
|
+
feedback:
|
|
214
219
|
|
|
215
220
|
1. **READ** recent context with `uap memory query`.
|
|
216
221
|
2. **QUERY** long-term memory for related learnings (semantic search).
|