@miller-tech/uap 1.46.4 → 1.47.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/dist/.tsbuildinfo +1 -1
- package/dist/bin/cli.js +8 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/deliver.d.ts +14 -0
- package/dist/cli/deliver.d.ts.map +1 -1
- package/dist/cli/deliver.js +204 -11
- package/dist/cli/deliver.js.map +1 -1
- package/dist/delivery/agentic-executor.d.ts +8 -0
- package/dist/delivery/agentic-executor.d.ts.map +1 -1
- package/dist/delivery/agentic-executor.js +12 -2
- package/dist/delivery/agentic-executor.js.map +1 -1
- package/dist/delivery/applier.d.ts +8 -0
- package/dist/delivery/applier.d.ts.map +1 -1
- package/dist/delivery/applier.js +35 -1
- package/dist/delivery/applier.js.map +1 -1
- package/dist/delivery/auto-optimizer.d.ts +11 -0
- package/dist/delivery/auto-optimizer.d.ts.map +1 -1
- package/dist/delivery/auto-optimizer.js +11 -2
- package/dist/delivery/auto-optimizer.js.map +1 -1
- package/dist/delivery/ci-watcher.d.ts +72 -0
- package/dist/delivery/ci-watcher.d.ts.map +1 -0
- package/dist/delivery/ci-watcher.js +221 -0
- package/dist/delivery/ci-watcher.js.map +1 -0
- package/dist/delivery/deploy-dev-gate.d.ts +44 -0
- package/dist/delivery/deploy-dev-gate.d.ts.map +1 -0
- package/dist/delivery/deploy-dev-gate.js +175 -0
- package/dist/delivery/deploy-dev-gate.js.map +1 -0
- package/dist/delivery/verifier-ladder.d.ts +77 -0
- package/dist/delivery/verifier-ladder.d.ts.map +1 -1
- package/dist/delivery/verifier-ladder.js +225 -3
- package/dist/delivery/verifier-ladder.js.map +1 -1
- package/docs/INDEX.md +2 -2
- package/docs/guides/AUTOMATIC.md +255 -61
- package/docs/guides/AUTOMATIC_FEATURES.md +164 -0
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/tools/agents/scripts/anthropic_proxy.py +201 -24
package/docs/guides/AUTOMATIC.md
CHANGED
|
@@ -1,92 +1,286 @@
|
|
|
1
|
-
# What UAP Does
|
|
1
|
+
# What UAP Does Automatically
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> as you code.** You don't call commands or remember protocols. UAP watches the
|
|
5
|
-
> coding agent's lifecycle (session start, every prompt, every tool call, every
|
|
6
|
-
> stop) and injects the right help or enforces the right guardrail *at the moment
|
|
7
|
-
> it's needed*.
|
|
3
|
+
> **Install once. Every feature kicks in automatically.**
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
UAP is not a set of manual steps you orchestrate. It is a **policy-and-resolver
|
|
6
|
+
layer** that sits between your coding agent (Claude Code, Opencode, Cursor,
|
|
7
|
+
Windsurf, Codex, etc.) and the model you use. Every feature below activates
|
|
8
|
+
**automatically** based on what the agent is doing — no config changes, no
|
|
9
|
+
manual triggers, no prompts to remember.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## How it works
|
|
14
|
+
|
|
15
|
+
When you start a coding session, UAP's hooks (installed by `uap setup`)
|
|
16
|
+
intercept every prompt the agent sends to the model. The **Reactor**
|
|
17
|
+
(`CapabilityRouter` + `PatternRouter`) evaluates the prompt in
|
|
18
|
+
real-time and, when appropriate, **injects** context, skills, or tool calls
|
|
19
|
+
into the agent's next turn. You never notice it happening — the agent just
|
|
20
|
+
produces better results.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
You → hook → UAP Reactor (auto-inject) → model → agent → better output
|
|
12
24
|
```
|
|
13
25
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
26
|
+
The confidence gate controls injection:
|
|
27
|
+
|
|
28
|
+
| Confidence | Behavior |
|
|
29
|
+
|---|---|
|
|
30
|
+
| ≥ 0.30 | Inject context/skills/experts into the prompt |
|
|
31
|
+
| ≥ 0.80 | Auto-spawn subagent with `uap deliver` for heavy lifting |
|
|
32
|
+
| < 0.30 | Pass through unchanged — zero overhead |
|
|
18
33
|
|
|
19
34
|
---
|
|
20
35
|
|
|
21
|
-
##
|
|
36
|
+
## Every feature, when it kicks in
|
|
37
|
+
|
|
38
|
+
### Reactor — Expert, Skill & Pattern Injection
|
|
22
39
|
|
|
23
|
-
|
|
40
|
+
**Benefit:** Your model gets expert-level context for every prompt without you
|
|
41
|
+
having to craft the perfect system prompt.
|
|
24
42
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
delivery, run a dangerous command). Each has an escape hatch for the rare
|
|
32
|
-
sanctioned exception.
|
|
43
|
+
**When it kicks in:** On every prompt the agent sends. The `CapabilityRouter`
|
|
44
|
+
matches the prompt against known droids (docker, infra, security, etc.) and
|
|
45
|
+
skills. The `PatternRouter` matches against a RAG-indexed library of proven
|
|
46
|
+
patterns. When confidence is ≥ 0.30, the relevant context is injected
|
|
47
|
+
automatically. When confidence is ≥ 0.80, a subagent is spawned to handle it
|
|
48
|
+
via `uap deliver`.
|
|
33
49
|
|
|
34
|
-
|
|
50
|
+
**You get:** Better code from any model — even small local models — because
|
|
51
|
+
they receive expert context they wouldn't otherwise have.
|
|
35
52
|
|
|
36
53
|
---
|
|
37
54
|
|
|
38
|
-
|
|
55
|
+
### Delivery Enforcement — `uap deliver` for Verified Output
|
|
39
56
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
| **Reactor** (dynamic routing) | On every prompt, surfaces the expert droids, skills, and enforcement patterns relevant to *this* task, so the agent works like it already knows the domain. | Every substantive prompt (`UserPromptSubmit` / per-message). Confidence-gated — silent on "thanks"/"merge it", rich on "fix the auth race condition". |
|
|
43
|
-
| **Memory recall** | Pulls back the lessons, decisions, and gotchas you (or another agent) learned before, so mistakes aren't repeated and context survives across sessions. | Session start (recent + high-importance memories) and per-prompt semantic recall on the task text. |
|
|
44
|
-
| **Pattern RAG** | Injects battle-tested execution patterns (Output-Existence, Decoder-First, Round-Trip verify, …) mined from Terminal-Bench, so the agent uses the approach that actually passes. | Per-prompt, matched to the task; full set retrievable on demand via Qdrant. |
|
|
45
|
-
| **Expert droids** | Routes domain work (security, performance, data, testing, …) to a specialist persona instead of a generalist guess. | When the capability router matches the task's type/files — recommended automatically, with optional auto-spawn above a confidence threshold. |
|
|
46
|
-
| **Skills** | Surfaces the right *procedure* (git-forensics, compression, SQLite-WAL recovery, polyglot, …) for the task at hand. | Per-prompt match against the task; top-N surfaced. |
|
|
47
|
-
| **Model routing** | Picks the right model tier per step (plan with the strong model, execute with the fast one) instead of one model for everything. | On task classification, by complexity and role. |
|
|
57
|
+
**Benefit:** Your agent's output is actually correct before it touches your
|
|
58
|
+
code. No more "it compiled but the tests fail" or "it broke the build."
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
**When it kicks in:** Block-by-default. When the agent tries to edit source
|
|
61
|
+
files directly, the `delivery_enforcement` gate intercepts and routes the work
|
|
62
|
+
to `uap deliver` instead. The delivery harness runs a convergence loop: the
|
|
63
|
+
model iterates against real gates (build, typecheck, test) until everything
|
|
64
|
+
passes. Source-scoped: docs, configs, scripts, and tests are exempt (they
|
|
65
|
+
don't need delivery verification).
|
|
66
|
+
|
|
67
|
+
**Escape hatches:** `UAP_DELIVER_ACTIVE=1` to activate delivery for the
|
|
68
|
+
current session, `UAP_DELIVER_BYPASS=1` to skip enforcement,
|
|
69
|
+
`UAP_ENFORCE_DELIVERY=advisory` to downgrade from block to warning.
|
|
70
|
+
|
|
71
|
+
**You get:** Verified, working code from any model — including small local
|
|
72
|
+
models that would otherwise make mistakes.
|
|
51
73
|
|
|
52
74
|
---
|
|
53
75
|
|
|
54
|
-
|
|
76
|
+
### Memory — 4-Tier Auto-Recall
|
|
77
|
+
|
|
78
|
+
**Benefit:** Your coding agent remembers everything across sessions, projects,
|
|
79
|
+
and even different models. No more repeating yourself.
|
|
55
80
|
|
|
56
|
-
|
|
81
|
+
**When it kicks in:** On every prompt. The memory system has four tiers:
|
|
82
|
+
|
|
83
|
+
| Tier | What | How |
|
|
57
84
|
|---|---|---|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
| **Completion gates** | Won't let the agent declare "done" until build/type-check/tests actually pass and a version bump happened. | On `Stop` (end of turn). |
|
|
63
|
-
| **Coordination** | Detects when multiple agents would touch the same files and prevents them stepping on each other. | Session start (register) + work announcement before claiming a task. |
|
|
64
|
-
| **rtk token-optimization** | Rewrites heavy CLI output (git/docker/npm/…) into compact form so the agent burns far fewer tokens reading command output. | Every wrapped CLI command. |
|
|
65
|
-
| **Deploy batching** | Queues changes into conflict-free batched commits/deploys instead of racy one-off pushes. | On `uap deliver --deploy` success. |
|
|
85
|
+
| L1 — Semantic | Long-term project context | Nomic 768-dim embeddings, recalled via cosine similarity |
|
|
86
|
+
| L2 — Episodic | Past conversations & decisions | Stored as episodes, recalled by semantic similarity |
|
|
87
|
+
| L3 — Procedural | Commands, workflows, patterns | Stored as procedures, recalled when similar tasks arise |
|
|
88
|
+
| L4 — Declarative | Facts, configs, references | Direct key-value store, recalled by key lookup |
|
|
66
89
|
|
|
67
|
-
|
|
68
|
-
|
|
90
|
+
**You get:** Context-aware coding that improves over time. The agent remembers
|
|
91
|
+
your conventions, past decisions, and project architecture without you
|
|
92
|
+
re-explaining.
|
|
69
93
|
|
|
70
94
|
---
|
|
71
95
|
|
|
72
|
-
|
|
96
|
+
### Patterns RAG — Proven Solutions on Demand
|
|
97
|
+
|
|
98
|
+
**Benefit:** Your agent applies battle-tested patterns instead of reinventing
|
|
99
|
+
solutions. Every pattern is indexed and retrieved automatically.
|
|
100
|
+
|
|
101
|
+
**When it kicks in:** When the agent encounters a problem that matches a stored
|
|
102
|
+
pattern. The PatternRouter uses semantic search to find the best-matching
|
|
103
|
+
pattern from the library and injects it into the prompt.
|
|
104
|
+
|
|
105
|
+
**You get:** Consistent, proven solutions across all agents and sessions.
|
|
106
|
+
|
|
107
|
+
---
|
|
73
108
|
|
|
74
|
-
|
|
109
|
+
### Worktree Enforcement
|
|
110
|
+
|
|
111
|
+
**Benefit:** Your main branch stays clean. Every change happens in an isolated
|
|
112
|
+
worktree with proper version bumps and merge commits.
|
|
113
|
+
|
|
114
|
+
**When it kicks in:** On every file edit. The worktree gate verifies you're
|
|
115
|
+
working inside a valid worktree before allowing source file edits. Docs,
|
|
116
|
+
configs, and scripts are exempt from this gate.
|
|
117
|
+
|
|
118
|
+
**You get:** Clean git history, proper versioning, and no accidental commits
|
|
119
|
+
to main.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Policy Gates — Automated Safety
|
|
124
|
+
|
|
125
|
+
**Benefit:** Security, infrastructure parity, and delivery enforcement happen
|
|
126
|
+
automatically on every operation. No manual code reviews for common issues.
|
|
127
|
+
|
|
128
|
+
**When it kicks in:** On every tool use and CLI command:
|
|
129
|
+
|
|
130
|
+
| Gate | What it checks | When it fires |
|
|
75
131
|
|---|---|---|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
132
|
+
| rtk_wrap | Token optimization | Every CLI command |
|
|
133
|
+
| iac_parity | Infrastructure-as-Code safety | kubectl, helm, aws, gcloud, doctl |
|
|
134
|
+
| delivery_enforcement | Verified output | Every source file edit |
|
|
135
|
+
|
|
136
|
+
**You get:** Security and safety without manual intervention.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Droids & Skills — Specialized Expertise
|
|
141
|
+
|
|
142
|
+
**Benefit:** Your agent has access to specialized experts (docker, infra,
|
|
143
|
+
security, etc.) without you having to prompt for them.
|
|
144
|
+
|
|
145
|
+
**When it kicks in:** When the agent encounters work that matches a droid's
|
|
146
|
+
domain. The CapabilityRouter detects the match and injects the droid's context
|
|
147
|
+
automatically.
|
|
148
|
+
|
|
149
|
+
**You get:** Expert-level output in specialized domains from any model.
|
|
79
150
|
|
|
80
151
|
---
|
|
81
152
|
|
|
82
|
-
|
|
153
|
+
### Skills — Dynamic Capability Injection
|
|
154
|
+
|
|
155
|
+
**Benefit:** New capabilities are injected on-demand based on the prompt
|
|
156
|
+
content. No configuration needed.
|
|
157
|
+
|
|
158
|
+
**When it kicks in:** When the prompt matches a registered skill. Skills are
|
|
159
|
+
matched semantically and injected automatically.
|
|
160
|
+
|
|
161
|
+
**You get:** A coding agent that grows smarter over time as new skills are
|
|
162
|
+
added.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Coordination — Multi-Agent Orchestration
|
|
167
|
+
|
|
168
|
+
**Benefit:** Complex tasks are decomposed and executed automatically across
|
|
169
|
+
multiple agents with proper coordination.
|
|
170
|
+
|
|
171
|
+
**When it kicks in:** On complex prompts that benefit from multi-agent
|
|
172
|
+
parallelism. The coordinator decomposes the task, spawns parallel agents,
|
|
173
|
+
and merges results.
|
|
174
|
+
|
|
175
|
+
**You get:** Faster completion of complex tasks through parallel execution.
|
|
176
|
+
|
|
177
|
+
---
|
|
83
178
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
179
|
+
### MCP Router — 98% Token Reduction
|
|
180
|
+
|
|
181
|
+
**Benefit:** Massive token savings on Model Context Protocol calls. Instead of
|
|
182
|
+
sending full tool schemas on every turn, the router caches and compresses them.
|
|
183
|
+
|
|
184
|
+
**When it kicks in:** On every MCP tool call. The router intercepts the call,
|
|
185
|
+
looks up the cached schema, and sends only the minimal necessary context.
|
|
186
|
+
|
|
187
|
+
**You get:** 98% fewer tokens on MCP operations — dramatic cost and latency
|
|
188
|
+
reduction.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### Schema-Diff Gate — API Contract Validation
|
|
193
|
+
|
|
194
|
+
**Benefit:** Schema changes are validated automatically. No more breaking API
|
|
195
|
+
contracts silently.
|
|
196
|
+
|
|
197
|
+
**When it kicks in:** When the agent edits schema files or API contract
|
|
198
|
+
definitions. The gate diffs the before/after and validates compatibility.
|
|
199
|
+
|
|
200
|
+
**You get:** Safe API evolution without manual review of every schema change.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### Completion Gates — Verify "Done" is Actually Done
|
|
205
|
+
|
|
206
|
+
**Benefit:** When the agent claims it's done, the gates verify: tests pass,
|
|
207
|
+
build succeeds, lint is clean, version is bumped.
|
|
208
|
+
|
|
209
|
+
**When it kicks in:** When the agent claims a task is complete. The gates run
|
|
210
|
+
automated verification before accepting the result.
|
|
211
|
+
|
|
212
|
+
**You get:** Confidence that "done" means actually done.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### Deploy Batching — Atomic Multi-Change Deploys
|
|
217
|
+
|
|
218
|
+
**Benefit:** Multiple related changes are deployed atomically. No partial
|
|
219
|
+
deploys that leave the system in an inconsistent state.
|
|
220
|
+
|
|
221
|
+
**When it kicks in:** When the agent prepares deployable changes. Related
|
|
222
|
+
changes are batched together and deployed as a single atomic unit.
|
|
223
|
+
|
|
224
|
+
**You get:** Reliable deploys with zero downtime.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### rtk — 60–90% Token Savings
|
|
229
|
+
|
|
230
|
+
**Benefit:** Massive token savings on every CLI command. rtk intercepts commands,
|
|
231
|
+
optimizes them, and proxies through a token-efficient layer.
|
|
232
|
+
|
|
233
|
+
**When it kicks in:** On every CLI command. rtk rewrites commands to use
|
|
234
|
+
optimized paths and caches results.
|
|
235
|
+
|
|
236
|
+
**You get:** Dramatically lower API costs and faster command execution.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### HALO — Human Oversight
|
|
241
|
+
|
|
242
|
+
**Benefit:** Critical operations require human approval before execution.
|
|
243
|
+
Automatic escalation when confidence is low.
|
|
244
|
+
|
|
245
|
+
**When it kicks in:** On critical operations (deployments, schema changes,
|
|
246
|
+
security-sensitive actions). HALO escalates to a human for approval.
|
|
247
|
+
|
|
248
|
+
**You get:** Safety for operations that matter, without slowing down routine
|
|
249
|
+
work.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Local Models — Punching Above Their Weight
|
|
254
|
+
|
|
255
|
+
**Benefit:** Small local models (like Qwen3.6-35B-A3B running on consumer
|
|
256
|
+
hardware) produce code quality that rivals much larger models.
|
|
257
|
+
|
|
258
|
+
**How:** UAP's `uap deliver` convergence loop, expert injection, and pattern
|
|
259
|
+
RAG compensate for the smaller model's limitations. The model iterates against
|
|
260
|
+
real gates (build, test, typecheck) until everything passes.
|
|
261
|
+
|
|
262
|
+
**See:** [Local Models Guide](./LOCAL_MODELS.md) for setup instructions and
|
|
263
|
+
VRAM-tiered configurations.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Quick Reference
|
|
268
|
+
|
|
269
|
+
| Feature | Benefit | Trigger |
|
|
270
|
+
|---|---|---|
|
|
271
|
+
| Reactor | Expert context for every prompt | Every prompt |
|
|
272
|
+
| Delivery Enforcement | Verified, working code | Every source edit |
|
|
273
|
+
| Memory | Remembers everything | Every prompt |
|
|
274
|
+
| Patterns RAG | Proven solutions | Pattern match |
|
|
275
|
+
| Worktree Enforcement | Clean git history | Every file edit |
|
|
276
|
+
| Policy Gates | Security & safety | Every tool/CLI |
|
|
277
|
+
| Droids & Skills | Specialized expertise | Domain match |
|
|
278
|
+
| Coordination | Parallel task execution | Complex tasks |
|
|
279
|
+
| MCP Router | 98% token reduction | Every MCP call |
|
|
280
|
+
| Schema-diff | API contract safety | Schema edits |
|
|
281
|
+
| Completion gates | Verify "done" is done | Agent claims done |
|
|
282
|
+
| Deploy batching | Atomic multi-change deploys | Deployable changes |
|
|
283
|
+
| rtk | 60–90% token savings | Every CLI command |
|
|
284
|
+
| HALO | Human oversight for critical ops | Critical actions |
|
|
89
285
|
|
|
90
|
-
|
|
91
|
-
[Droids & Skills](DROIDS_AND_SKILLS.md) · [Policies](POLICIES.md) ·
|
|
92
|
-
the [Reactor design](../design/UAP_REACTOR.md).
|
|
286
|
+
**Install UAP. Use your coding agent normally. Everything else is automatic.**
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# UAP Automatic Features — What Fires When
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Per-Prompt Auto-Injection
|
|
8
|
+
|
|
9
|
+
### Reactor — Expert Skills, Patterns & Droids
|
|
10
|
+
**What it does:** Every time you submit a coding prompt, the Reactor evaluates the request against a router of 25+ droids (experts), skill libraries, and implementation patterns. Relevant ones are injected into the agent's context automatically.
|
|
11
|
+
|
|
12
|
+
**When it kicks in:**
|
|
13
|
+
- You ask to "fix the auth flow" → AuthDroid + relevant skill templates load
|
|
14
|
+
- You need a migration → MigrationDroid + schema-diff pattern activate
|
|
15
|
+
- You're refactoring → RefactorDroid + pattern-RAG suggestions appear
|
|
16
|
+
|
|
17
|
+
**Why it matters:** Your model gets domain-specific expertise injected per-prompt without you having to prompt for it. Confidence-gated: low-confidence matches are suggested; high-confidence matches (≥0.80) auto-spawn as subagents.
|
|
18
|
+
|
|
19
|
+
### Pattern RAG
|
|
20
|
+
**What it does:** Retrieves proven implementation patterns from the UAP pattern library based on your prompt's intent.
|
|
21
|
+
|
|
22
|
+
**When it kicks in:** Alongside Reactor evaluation — if your prompt matches a stored pattern (e.g., "add pagination", "implement rate limiting"), the pattern is injected as context.
|
|
23
|
+
|
|
24
|
+
**Why it matters:** Consistent, battle-tested implementations across every coding session. No reinventing the wheel.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Policy Gates (Block-by-Default)
|
|
29
|
+
|
|
30
|
+
### Delivery Enforcement
|
|
31
|
+
**What it does:** Prevents direct source-code edits by the model. Instead, routes changes through `uap deliver` — a convergence loop where the model iterates until real gates (build, typecheck, tests) pass.
|
|
32
|
+
|
|
33
|
+
**When it kicks in:** Any tool-use that touches source files (`.ts`, `.js`, `.py`, etc.). Docs, configs, scripts, tests, and `.worktrees/` are exempt (they don't need delivery).
|
|
34
|
+
|
|
35
|
+
**Why it matters:** Small models (Qwen3.6, Llama, etc.) frequently produce code that looks correct but doesn't compile. `uap deliver` catches this early — the model self-corrects through real compiler/test feedback until it actually works. Without it, broken code silently lands.
|
|
36
|
+
|
|
37
|
+
**Escape hatches:** `UAP_DELIVER_BYPASS=1` (one-shot), `UAP_DELIVER_ACTIVE=1` (session), `UAP_ENFORCE_DELIVERY=advisory` (warn-only).
|
|
38
|
+
|
|
39
|
+
### Schema-Diff Gate
|
|
40
|
+
**What it does:** Before any schema or API contract change is applied, generates and validates a diff to ensure backward compatibility.
|
|
41
|
+
|
|
42
|
+
**When it kicks in:** When the model proposes changes to TypeScript interfaces, OpenAPI specs, database schemas, or any contract file.
|
|
43
|
+
|
|
44
|
+
**Why it matters:** Prevents silent API breakage that would crash downstream consumers.
|
|
45
|
+
|
|
46
|
+
### Completion Gates
|
|
47
|
+
**What it does:** Before the model claims a task is "done," it must pass: build succeeds, tests pass, type-check clean, version bumped, self-reviewed.
|
|
48
|
+
|
|
49
|
+
**When it kicks in:** Automatically when the model attempts to mark a task complete.
|
|
50
|
+
|
|
51
|
+
**Why it matters:** Eliminates "it works on my machine" — every change is verified against the full test + build pipeline before being considered done.
|
|
52
|
+
|
|
53
|
+
### Worktree Enforcement
|
|
54
|
+
**What it does:** Requires all source edits to happen inside isolated worktrees. Prevents accidental commits to the wrong branch.
|
|
55
|
+
|
|
56
|
+
**When it kicks in:** Any attempt to edit source files outside a worktree.
|
|
57
|
+
|
|
58
|
+
**Why it matters:** Clean git history, isolated feature branches, no accidental merges of incomplete work.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Model Uplift
|
|
63
|
+
|
|
64
|
+
### `uap deliver` — Convergence Loop
|
|
65
|
+
**What it does:** When delivery-enforcement routes a task to `uap deliver`, the tool runs a loop: the model produces code → real gates (build, typecheck, tests) validate → if anything fails, the error is fed back to the model → repeat until all gates pass.
|
|
66
|
+
|
|
67
|
+
**When it kicks in:** Automatically when delivery-enforcement blocks a direct source edit and the model needs to make actual code changes.
|
|
68
|
+
|
|
69
|
+
**Why it matters:** This is the single biggest uplift for small local models. A Qwen3.6-35B-A3B running locally with ~18GB VRAM will produce broken code on first try — but after 2-3 convergence iterations through real compiler feedback, it produces working code that matches what opus-4.8 would produce. The model learns from its mistakes in real-time.
|
|
70
|
+
|
|
71
|
+
### Model Presets
|
|
72
|
+
**What it does:** Pre-configured model profiles in `src/models/types.ts` that set optimal parameters (temperature, max tokens, reasoning effort) per model.
|
|
73
|
+
|
|
74
|
+
**When it kicks in:** Automatically when you select a model. The `qwen35-a3b` preset is the default for local models.
|
|
75
|
+
|
|
76
|
+
**Why it matters:** No manual tuning. The right parameters are applied automatically for each model family.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Memory & Context
|
|
81
|
+
|
|
82
|
+
### Semantic Memory Recall
|
|
83
|
+
**What it does:** 4-tier memory system (short-term, long-term, episodic, semantic) with vector-based semantic search. Relevant memories are auto-recalled based on prompt context.
|
|
84
|
+
|
|
85
|
+
**When it kicks in:** Every prompt — the system searches memory for relevant past sessions, decisions, and patterns.
|
|
86
|
+
|
|
87
|
+
**Why it matters:** The agent remembers your project conventions, past decisions, and architectural choices across sessions. No re-explaining context.
|
|
88
|
+
|
|
89
|
+
### MCP Router
|
|
90
|
+
**What it does:** Routes model tool calls through a centralized MCP (Model Context Protocol) router, reducing token usage by ~98% by batching and caching tool responses.
|
|
91
|
+
|
|
92
|
+
**When it kicks in:** Automatically for every tool call the model makes.
|
|
93
|
+
|
|
94
|
+
**Why it matters:** Massive token savings on repeated tool calls (file reads, git operations, etc.). Also enables consistent tool behavior across different models.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Coordination & Multi-Agent
|
|
99
|
+
|
|
100
|
+
### Coordination Layer
|
|
101
|
+
**What it does:** Orchestrates multi-agent workflows with deterministic control flow — fan-out, pipeline, barrier, and synthesis phases.
|
|
102
|
+
|
|
103
|
+
**When it kicks in:** When tasks are complex enough to warrant parallel subagents (e.g., "audit these 50 files" or "review changes across dimensions").
|
|
104
|
+
|
|
105
|
+
**Why it matters:** Parallel execution of independent tasks. A 10-file audit that would take 10 minutes sequentially completes in ~1 minute with 10 parallel agents.
|
|
106
|
+
|
|
107
|
+
### Deploy Batching
|
|
108
|
+
**What it does:** Batches multiple changes into a single deploy operation, reducing deploy overhead and ensuring atomicity.
|
|
109
|
+
|
|
110
|
+
**When it kicks in:** When multiple independent changes are ready for deployment.
|
|
111
|
+
|
|
112
|
+
**Why it matters:** Fewer deploys, faster delivery, atomic rollouts.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Developer Experience
|
|
117
|
+
|
|
118
|
+
### RTK (Rust Token Killer)
|
|
119
|
+
**What it does:** CLI proxy that intercepts common commands (`git status`, `npm install`, etc.) and rewrites them for token efficiency — 60-90% token savings on dev operations.
|
|
120
|
+
|
|
121
|
+
**When it kicks in:** Automatically for every shell command you run. No flags needed.
|
|
122
|
+
|
|
123
|
+
**Why it matters:** Token costs add up fast. RTK transparently optimizes every command without you thinking about it.
|
|
124
|
+
|
|
125
|
+
### HALO (High-Level Agent Orchestrator)
|
|
126
|
+
**What it does:** Provides a high-level orchestration layer for complex multi-step tasks, automatically decomposing them into subtasks and managing dependencies.
|
|
127
|
+
|
|
128
|
+
**When it kicks in:** When prompts are complex enough to warrant decomposition (substantial coding prompts, architectural changes, multi-file refactors).
|
|
129
|
+
|
|
130
|
+
**Why it matters:** You describe the goal, not the steps. HALO figures out the plan and executes it.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Local Model Setup
|
|
135
|
+
|
|
136
|
+
### llama.cpp + Qwen3.6-35B-A3B
|
|
137
|
+
**What it does:** Continuity server script (`scripts/run-llama-server-continuity.sh`) launches llama.cpp with optimal settings for the Qwen3.6-35B-A3B MoE model.
|
|
138
|
+
|
|
139
|
+
**When it kicks in:** When you need a local model for `uap deliver` convergence or as a coding agent backend.
|
|
140
|
+
|
|
141
|
+
**Why it matters:** See [Local Models](./LOCAL_MODELS.md) for VRAM-tiered setup instructions (8GB through 32GB). Key insight: `uap deliver` uplifts small models to punch well above their weight — a 35B-A3B running locally with real compiler feedback produces code quality comparable to much larger models.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Summary Table
|
|
146
|
+
|
|
147
|
+
| Feature | Auto? | Triggers On | Benefit |
|
|
148
|
+
|---------|-------|-------------|---------|
|
|
149
|
+
| Reactor (experts/skills/patterns) | ✅ | Every prompt | Domain expertise injected per-request |
|
|
150
|
+
| Delivery enforcement | ✅ | Source edits | Small models self-correct through real gates |
|
|
151
|
+
| `uap deliver` convergence | ✅ | When delivery routes | Broken code fixed before landing |
|
|
152
|
+
| Schema-diff gate | ✅ | Contract changes | No silent API breakage |
|
|
153
|
+
| Completion gates | ✅ | Task completion | Verified before "done" |
|
|
154
|
+
| Worktree enforcement | ✅ | Source edits | Clean git history |
|
|
155
|
+
| Semantic memory | ✅ | Every prompt | Context remembered across sessions |
|
|
156
|
+
| MCP router | ✅ | Every tool call | ~98% token reduction |
|
|
157
|
+
| Pattern RAG | ✅ | Every prompt | Battle-tested implementations |
|
|
158
|
+
| Coordination | ✅ | Complex tasks | Parallel subagent execution |
|
|
159
|
+
| Deploy batching | ✅ | Multiple changes | Atomic, efficient deploys |
|
|
160
|
+
| RTK | ✅ | Every command | 60-90% token savings |
|
|
161
|
+
| HALO | ✅ | Substantial prompts | Automatic task decomposition |
|
|
162
|
+
| Model presets | ✅ | Model selection | Optimal params per model |
|
|
163
|
+
|
|
164
|
+
**Bottom line:** Install UAP, point it at your model (Claude Opus, Qwen3.6, Llama — any), and everything just works. No configuration required.
|
package/package.json
CHANGED
|
Binary file
|