@miller-tech/uap 1.40.0 → 1.41.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 +109 -642
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/deliver-defaults.d.ts +23 -0
- package/dist/cli/deliver-defaults.d.ts.map +1 -0
- package/dist/cli/deliver-defaults.js +121 -0
- package/dist/cli/deliver-defaults.js.map +1 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +29 -0
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +19 -0
- package/dist/cli/setup.js.map +1 -1
- package/dist/policies/policy-tools.d.ts +7 -0
- package/dist/policies/policy-tools.d.ts.map +1 -1
- package/dist/policies/policy-tools.js +24 -2
- package/dist/policies/policy-tools.js.map +1 -1
- package/docs/INDEX.md +48 -286
- package/docs/architecture/OVERVIEW.md +328 -0
- package/docs/architecture/PROTOCOL.md +204 -0
- package/docs/benchmarks/README.md +17 -192
- package/docs/getting-started/CONFIGURATION.md +237 -0
- package/docs/getting-started/INSTALLATION.md +125 -0
- package/docs/getting-started/QUICKSTART.md +115 -0
- package/docs/guides/COORDINATION.md +162 -0
- package/docs/guides/DELIVER.md +115 -0
- package/docs/guides/DEPLOY_BATCHING.md +212 -0
- package/docs/guides/DROIDS_AND_SKILLS.md +202 -0
- package/docs/guides/LOCAL_MODELS.md +148 -0
- package/docs/guides/MCP_ROUTER.md +195 -0
- package/docs/guides/MEMORY.md +235 -0
- package/docs/guides/MULTI_MODEL.md +223 -0
- package/docs/guides/POLICIES.md +190 -0
- package/docs/guides/WORKTREE_WORKFLOW.md +185 -0
- package/docs/integrations/MCP_ROUTER.md +147 -0
- package/docs/integrations/RTK.md +102 -0
- package/docs/reference/API.md +485 -0
- package/docs/reference/CLI.md +719 -0
- package/docs/reference/CONFIGURATION.md +90 -193
- package/docs/reference/DATABASE_SCHEMA.md +110 -344
- package/docs/reference/FEATURES.md +176 -472
- package/docs/reference/PATTERNS.md +102 -0
- package/docs/reference/PLATFORMS.md +83 -0
- package/package.json +3 -1
- package/src/policies/enforcers/7ebbc721-7540-4e9f-879a-770e0213a09b_architecture_review.py +101 -0
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/src/policies/enforcers/_common.py +100 -0
- package/src/policies/enforcers/artifact_hygiene.py +52 -0
- package/src/policies/enforcers/cluster_routing.py +63 -0
- package/src/policies/enforcers/codebase_read_before_plan.py +52 -0
- package/src/policies/enforcers/coord_overlap.py +81 -0
- package/src/policies/enforcers/delivery_enforcement.py +97 -0
- package/src/policies/enforcers/doc_live_over_report.py +50 -0
- package/src/policies/enforcers/expert_review_required.py +135 -0
- package/src/policies/enforcers/iac_parity.py +53 -0
- package/src/policies/enforcers/mcp_router_first.py +37 -0
- package/src/policies/enforcers/memory_before_plan.py +61 -0
- package/src/policies/enforcers/parallel_reads.py +50 -0
- package/src/policies/enforcers/rtk_wrap.py +44 -0
- package/src/policies/enforcers/schema_diff_gate.py +80 -0
- package/src/policies/enforcers/session_memory_write.py +52 -0
- package/src/policies/enforcers/task_required.py +131 -0
- package/src/policies/enforcers/test_gate.py +58 -0
- package/src/policies/enforcers/validate_plan_before_build.py +75 -0
- package/src/policies/enforcers/worktree_required.py +57 -0
- package/src/policies/schemas/policies/architecture-review.md +51 -0
- package/src/policies/schemas/policies/artifact-hygiene.md +29 -0
- package/src/policies/schemas/policies/cluster-routing.md +31 -0
- package/src/policies/schemas/policies/codebase-read-before-plan.md +30 -0
- package/src/policies/schemas/policies/coord-overlap.md +24 -0
- package/src/policies/schemas/policies/delivery-enforcement.md +45 -0
- package/src/policies/schemas/policies/doc-live-over-report.md +32 -0
- package/src/policies/schemas/policies/expert-review-required.md +60 -0
- package/src/policies/schemas/policies/iac-parity.md +31 -0
- package/src/policies/schemas/policies/mandatory-testing-deployment.md +147 -0
- package/src/policies/schemas/policies/mcp-router-first.md +24 -0
- package/src/policies/schemas/policies/memory-before-plan.md +24 -0
- package/src/policies/schemas/policies/merge-deploy-monitor-verify.md +145 -0
- package/src/policies/schemas/policies/parallel-reads.md +24 -0
- package/src/policies/schemas/policies/rtk-wrap.md +26 -0
- package/src/policies/schemas/policies/schema-diff-gate.md +30 -0
- package/src/policies/schemas/policies/session-memory-write.md +24 -0
- package/src/policies/schemas/policies/task-required.md +49 -0
- package/src/policies/schemas/policies/test-gate.md +24 -0
- package/src/policies/schemas/policies/validate-plan-before-build.md +28 -0
- package/src/policies/schemas/policies/worktree-required.md +28 -0
- package/templates/hooks/uap-policy-gate.sh +5 -0
- package/docs/AGENTS.md +0 -423
- package/docs/DOCUMENTATION_AUDIT_REPORT.md +0 -131
- package/docs/GETTING_STARTED.md +0 -288
- package/docs/PROJECT_ANALYSIS_REPORT.md +0 -510
- package/docs/architecture/COMPLETE_ARCHITECTURE.md +0 -748
- package/docs/architecture/EXPERT_STACK.md +0 -137
- package/docs/architecture/MULTI_MODEL.md +0 -224
- package/docs/architecture/PLATFORM_GATING.md +0 -68
- package/docs/architecture/SYSTEM_ANALYSIS.md +0 -334
- package/docs/architecture/UAP_COMPLIANCE.md +0 -217
- package/docs/architecture/UAP_PROTOCOL.md +0 -339
- package/docs/architecture/UAP_STRICT_DROIDS.md +0 -172
- package/docs/archive/BALLS_MODE_SELF_ANALYSIS.md +0 -260
- package/docs/archive/BENCHMARK_GAPS_AND_PLAN.md +0 -146
- package/docs/archive/FAILING_TASKS_SOLUTION_PLAN.md +0 -668
- package/docs/archive/JINJA2-SYSTEM-MESSAGE-FIX.md +0 -209
- package/docs/archive/MODEL_ROUTING_IMPLEMENTATION_SUMMARY.md +0 -281
- package/docs/archive/MODEL_ROUTING_OPTIMIZATION_PLAN.md +0 -320
- package/docs/archive/NPM-PUBLISH-V0.9.1.md +0 -240
- package/docs/archive/OPTIMIZATION_OPTIONS.md +0 -334
- package/docs/archive/PARALLELISM_GAPS_AND_OPTIONS.md +0 -422
- package/docs/archive/POLICY_GATE_IMPLEMENTATION.md +0 -245
- package/docs/archive/SETUP_IMPROVEMENTS.md +0 -213
- package/docs/archive/UAP_GENERIC_OPTIMIZATION_PLAN.md +0 -270
- package/docs/archive/UAP_OPTIMIZATION_PLAN.md +0 -701
- package/docs/archive/UAP_V103_PATTERN_DESIGN.md +0 -315
- package/docs/archive/UAP_V104_COMPLIANCE_DESIGN.md +0 -223
- package/docs/archive/changelog/2026-03-10_uap-100-compliance.md +0 -77
- package/docs/archive/changelog/2026-03-10_uap-full-system-verification.md +0 -109
- package/docs/archive/opencode-integration-guide.md +0 -740
- package/docs/archive/opencode-integration-quickref.md +0 -180
- package/docs/benchmarks/OVERNIGHT_RUNNER.md +0 -341
- package/docs/benchmarks/SPECULATIVE_DECODING_JOURNEY_2026-03.md +0 -221
- package/docs/benchmarks/VALIDATION_PLAN.md +0 -568
- package/docs/blog/SPECULATIVE_DECODING_PRODUCTION_PLAYBOOK.md +0 -139
- package/docs/blog/local-coding-agents.md +0 -266
- package/docs/blog/x-thread.md +0 -254
- package/docs/deployment/DEPLOYMENT.md +0 -895
- package/docs/deployment/DEPLOYMENT_STRATEGIES.md +0 -518
- package/docs/deployment/DEPLOY_BATCHER_ANALYSIS.md +0 -224
- package/docs/deployment/DEPLOY_BATCHING.md +0 -273
- package/docs/deployment/DEPLOY_BUCKETING_ANALYSIS.md +0 -420
- package/docs/deployment/QWEN35_LLAMA_CPP.md +0 -426
- package/docs/deployment/UAP_LLAMA_ANTHROPIC_PROXY_BOOTSTRAP.md +0 -279
- package/docs/getting-started/INTEGRATION.md +0 -628
- package/docs/getting-started/OVERVIEW.md +0 -324
- package/docs/getting-started/SETUP.md +0 -377
- package/docs/integrations/MCP_ROUTER_SETUP.md +0 -445
- package/docs/integrations/RTK_INTEGRATION.md +0 -468
- package/docs/operations/TROUBLESHOOTING.md +0 -660
- package/docs/pr/PR_SPECULATIVE_DOCS_TEMPLATE.md +0 -146
- package/docs/pr/UPSTREAM_PRS.md +0 -424
- package/docs/reference/API_REFERENCE.md +0 -903
- package/docs/reference/EXPERT_DROIDS.md +0 -219
- package/docs/reference/HARNESS-MATRIX.md +0 -318
- package/docs/reference/PATTERN_LIBRARY.md +0 -636
- package/docs/reference/UAP_CLI_REFERENCE.md +0 -620
- package/docs/research/BEHAVIORAL_PATTERNS.md +0 -228
- package/docs/research/DOMAIN_STRATEGIES.md +0 -316
- package/docs/research/MEMORY_SYSTEMS_COMPARISON.md +0 -812
- package/docs/research/PATTERN_ANALYSIS_2026-01-18.md +0 -436
- package/docs/research/PERFORMANCE_ANALYSIS_2026-01-18.md +0 -209
- package/docs/research/PERFORMANCE_TEST_PLAN.md +0 -383
- package/docs/research/TERMINAL_BENCH_LEARNINGS.md +0 -217
|
@@ -1,472 +1,176 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
|
114
|
-
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
|
150
|
-
|
|
151
|
-
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
| Skip trivial | false (mandatory validation since v4.8.0) |
|
|
178
|
-
|
|
179
|
-
### 2.5 Benchmark-Data Model Router — ENABLED
|
|
180
|
-
|
|
181
|
-
**Source:** `src/memory/model-router.ts:68`
|
|
182
|
-
**Purpose:** Separate routing system using real Terminal-Bench benchmark data with SQLite-persisted fingerprints and adaptive learning (EMA)
|
|
183
|
-
|
|
184
|
-
| Setting | Value |
|
|
185
|
-
| ------------------- | --------------------------- |
|
|
186
|
-
| DB pool | 5 connections, WAL mode |
|
|
187
|
-
| EMA alpha (success) | 0.1 |
|
|
188
|
-
| EMA alpha (latency) | 0.2 |
|
|
189
|
-
| Fingerprint blend | 70% persisted / 30% default |
|
|
190
|
-
| Max cost/task | $0.05 |
|
|
191
|
-
| Max latency | 120s |
|
|
192
|
-
|
|
193
|
-
**Note:** This is independent from `src/models/router.ts`. The two routing systems are not yet integrated.
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## 3. Multi-Agent Coordination
|
|
198
|
-
|
|
199
|
-
### 3.1 Coordination Database — ENABLED
|
|
200
|
-
|
|
201
|
-
**Source:** `src/coordination/database.ts:5`
|
|
202
|
-
**Storage:** `./agents/data/coordination/coordination.db`
|
|
203
|
-
**Tables:** 6 (agent_registry, agent_messages, work_announcements, work_claims, deploy_queue, deploy_batches)
|
|
204
|
-
|
|
205
|
-
| Setting | Value |
|
|
206
|
-
| ------------ | ----------------------- |
|
|
207
|
-
| Journal mode | WAL (added v4.8.1) |
|
|
208
|
-
| Synchronous | NORMAL (added v4.8.1) |
|
|
209
|
-
| Busy timeout | 10,000ms (added v4.8.1) |
|
|
210
|
-
|
|
211
|
-
### 3.2 Coordination Service — ENABLED
|
|
212
|
-
|
|
213
|
-
**Source:** `src/coordination/service.ts:31`
|
|
214
|
-
**Purpose:** Agent lifecycle, resource claiming, work announcements, messaging, deploy queue, overlap detection, conflict risk assessment
|
|
215
|
-
|
|
216
|
-
| Setting | Default |
|
|
217
|
-
| -------------------- | --------------------------- |
|
|
218
|
-
| Heartbeat interval | 30,000ms (30s) |
|
|
219
|
-
| Claim expiry | 300,000ms (5 min) |
|
|
220
|
-
| Stale agent cutoff | 3x heartbeat interval (90s) |
|
|
221
|
-
| Message retention | 24 hours |
|
|
222
|
-
| Deploy default delay | 30,000ms (30s) |
|
|
223
|
-
|
|
224
|
-
**Overlap Detection:** Same-file, same-directory, overlapping-files conflicts
|
|
225
|
-
**Conflict Risk:** `none` / `low` / `medium` / `high` / `critical`
|
|
226
|
-
|
|
227
|
-
### 3.3 Auto Agent Coordinator — ENABLED
|
|
228
|
-
|
|
229
|
-
**Source:** `src/coordination/auto-agent.ts:22`
|
|
230
|
-
**Purpose:** Automatic agent registration, heartbeat, graceful exit cleanup
|
|
231
|
-
|
|
232
|
-
| Setting | Default |
|
|
233
|
-
| ------------------ | ---------------------------------------------------- |
|
|
234
|
-
| Heartbeat interval | 30,000ms |
|
|
235
|
-
| Exit handlers | SIGINT, SIGTERM, exit (tracked + removed on cleanup) |
|
|
236
|
-
|
|
237
|
-
**Improvements in v4.8.1:**
|
|
238
|
-
|
|
239
|
-
- Idempotent cleanup (safe to call multiple times)
|
|
240
|
-
- Exit handlers tracked and removed to prevent listener leaks
|
|
241
|
-
|
|
242
|
-
### 3.4 Capability Router — ENABLED
|
|
243
|
-
|
|
244
|
-
**Source:** `src/coordination/capability-router.ts:159`
|
|
245
|
-
**Purpose:** Routes tasks to droids/skills by file patterns, task types, keywords
|
|
246
|
-
|
|
247
|
-
| Setting | Value |
|
|
248
|
-
| ------------------------- | -------------------------------------------------------------------------------- |
|
|
249
|
-
| Default mappings | 12 (TS, JS, CLI, security, perf, docs, review, testing, infra, Python, Rust, Go) |
|
|
250
|
-
| Max recommended droids | 3 |
|
|
251
|
-
| Max recommended skills | 2 |
|
|
252
|
-
| Always-included reviewers | code-quality-guardian, security-auditor |
|
|
253
|
-
|
|
254
|
-
### 3.5 Pattern Router — ENABLED (restored in v4.8.1)
|
|
255
|
-
|
|
256
|
-
**Source:** `src/coordination/pattern-router.ts`
|
|
257
|
-
**Purpose:** Loads Terminal-Bench patterns from `.factory/patterns/index.json`, keyword matching, enforcement checklists
|
|
258
|
-
|
|
259
|
-
**Was a no-op stub prior to v4.8.1.** Now fully implemented with:
|
|
260
|
-
|
|
261
|
-
- Pattern loading from project directory
|
|
262
|
-
- Keyword-based matching
|
|
263
|
-
- Always-included critical patterns (P12 Output Existence, P35 Decoder-First)
|
|
264
|
-
- Singleton with lazy initialization
|
|
265
|
-
|
|
266
|
-
### 3.6 Deploy Batcher — ENABLED
|
|
267
|
-
|
|
268
|
-
**Source:** `src/coordination/deploy-batcher.ts:47`
|
|
269
|
-
**Purpose:** Intelligent deployment batching with squashing, deduplication, parallel execution
|
|
270
|
-
|
|
271
|
-
| Action | Normal Window | Urgent Window |
|
|
272
|
-
| -------- | ------------- | ------------- |
|
|
273
|
-
| commit | 30s | 2s |
|
|
274
|
-
| push | 5s | 1s |
|
|
275
|
-
| merge | 10s | 2s |
|
|
276
|
-
| workflow | 5s | 1s |
|
|
277
|
-
| deploy | 60s | 5s |
|
|
278
|
-
|
|
279
|
-
| Setting | Default |
|
|
280
|
-
| -------------------- | ------- |
|
|
281
|
-
| Max batch size | 20 |
|
|
282
|
-
| Parallel execution | enabled |
|
|
283
|
-
| Max parallel actions | 5 |
|
|
284
|
-
|
|
285
|
-
**Fixed in v5.0.0:** Replaced `execSync` with async `execFile` using argument arrays. Eliminates shell injection risk and event loop blocking.
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
## 4. Task Management
|
|
290
|
-
|
|
291
|
-
### 4.1 Task Database — ENABLED
|
|
292
|
-
|
|
293
|
-
**Source:** `src/tasks/database.ts:5`
|
|
294
|
-
**Storage:** `./.uap/tasks/tasks.db`
|
|
295
|
-
**Tables:** 5 (tasks, task_dependencies, task_history, task_activity, task_summaries)
|
|
296
|
-
|
|
297
|
-
| Setting | Value |
|
|
298
|
-
| ------------ | ----------------------- |
|
|
299
|
-
| Journal mode | WAL (added v4.8.1) |
|
|
300
|
-
| Synchronous | NORMAL (added v4.8.1) |
|
|
301
|
-
| Busy timeout | 10,000ms (added v4.8.1) |
|
|
302
|
-
|
|
303
|
-
### 4.2 Task Service — ENABLED
|
|
304
|
-
|
|
305
|
-
**Source:** `src/tasks/service.ts:31`
|
|
306
|
-
**Purpose:** Full CRUD, dependency DAG with cycle detection (BFS), history/audit trail, JSONL sync, compaction
|
|
307
|
-
|
|
308
|
-
| Setting | Default |
|
|
309
|
-
| -------------- | -------------------------- |
|
|
310
|
-
| JSONL path | `./.uap/tasks/tasks.jsonl` |
|
|
311
|
-
| Compact cutoff | 90 days |
|
|
312
|
-
|
|
313
|
-
**Fixed in v5.0.0:** Added `due_date` column with migration for existing DBs. `overdue` stats now query tasks past due date that aren't closed.
|
|
314
|
-
|
|
315
|
-
### 4.3 Task Coordinator — ENABLED
|
|
316
|
-
|
|
317
|
-
**Source:** `src/tasks/coordination.ts:31`
|
|
318
|
-
**Purpose:** Bridge between task system and coordination system
|
|
319
|
-
|
|
320
|
-
**Scoring for `suggestNextTask()`:**
|
|
321
|
-
|
|
322
|
-
- Priority weight: `(4 - priority) * 10` (P0=40, P4=0)
|
|
323
|
-
- No-overlap bonus: +20
|
|
324
|
-
- No-dependencies bonus: +5
|
|
325
|
-
- Unblocks-others bonus: +3 per blocked task
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
|
-
## 5. CLI Commands
|
|
330
|
-
|
|
331
|
-
### Fully Implemented (20+)
|
|
332
|
-
|
|
333
|
-
| Command | Source | Purpose |
|
|
334
|
-
| ---------------- | ---------------------------------- | -------------------------------------- |
|
|
335
|
-
| `uap init` | `src/cli/init.ts` | Project initialization |
|
|
336
|
-
| `uap setup` | `src/cli/setup.ts` | Full setup chain |
|
|
337
|
-
| `uap memory` | `src/cli/memory.ts` | Memory management (10 subcommands) |
|
|
338
|
-
| `uap task` | `src/cli/task.ts` | Task CRUD + workflow (14 subcommands) |
|
|
339
|
-
| `uap agent` | `src/cli/agent.ts` | Agent lifecycle (11 subcommands) |
|
|
340
|
-
| `uap deploy` | `src/cli/deploy.ts` | Deploy batching (8 subcommands) |
|
|
341
|
-
| `uap worktree` | `src/cli/worktree.ts` | Git worktree management |
|
|
342
|
-
| `uap droids` | `src/cli/droids.ts` | Droid management |
|
|
343
|
-
| `uap coord` | `src/cli/coord.ts` | Coordination status/flush/cleanup |
|
|
344
|
-
| `uap model` | `src/cli/model.ts` | Model routing/planning (4 subcommands) |
|
|
345
|
-
| `uap dashboard` | `src/cli/dashboard.ts` | Rich visualization (6 sub-dashboards) |
|
|
346
|
-
| `uap patterns` | `src/cli/patterns.ts` | Pattern RAG management |
|
|
347
|
-
| `uap hooks` | `src/cli/hooks.ts` | Hook installer (6 platforms) |
|
|
348
|
-
| `uap compliance` | `src/cli/compliance.ts` | Protocol compliance (12 gates) |
|
|
349
|
-
| `uap generate` | `src/cli/generate.ts` | CLAUDE.md generation |
|
|
350
|
-
| `uap analyze` | `src/cli/analyze.ts` | Project structure analysis |
|
|
351
|
-
| `uap mcp-router` | `src/cli/mcp-router.ts` | MCP Router management |
|
|
352
|
-
| `uap update` | `src/cli/update.ts` | System update |
|
|
353
|
-
| `uap rtk` | `src/cli/rtk.ts` | RTK integration |
|
|
354
|
-
| `llama-optimize` | `src/bin/llama-server-optimize.ts` | llama.cpp parameter optimization |
|
|
355
|
-
|
|
356
|
-
### Stubs
|
|
357
|
-
|
|
358
|
-
| Command | Source | Status |
|
|
359
|
-
| ----------------- | ------------------------ | --------------------------------- |
|
|
360
|
-
| `uap schema-diff` | `src/cli/schema-diff.ts` | Prints "disabled in this version" |
|
|
361
|
-
|
|
362
|
-
### Implemented in v5.0.0
|
|
363
|
-
|
|
364
|
-
| Command | Source | Status |
|
|
365
|
-
| --------------------- | ------------------ | --------------------------------------------------------------------- |
|
|
366
|
-
| `uap sync` | `src/cli/sync.ts` | Syncs droids, skills, commands between claude/factory/opencode/vscode |
|
|
367
|
-
| `uap model --execute` | `src/cli/model.ts` | Executes plans via MockModelClient (dry-run mode) |
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## 6. Hooks System
|
|
372
|
-
|
|
373
|
-
| Hook | Source | Status |
|
|
374
|
-
| ------------ | ---------------------------------- | ------------------------------------------- |
|
|
375
|
-
| SessionStart | `templates/hooks/session-start.sh` | ENABLED — Injects compliance checklist |
|
|
376
|
-
| PreCompact | `templates/hooks/pre-compact.sh` | ENABLED — DB optimization before compaction |
|
|
377
|
-
| PreToolUse | Pattern injection | ENABLED — Via hook system |
|
|
378
|
-
| PostToolUse | Memory persistence | ENABLED — Via hook system |
|
|
379
|
-
|
|
380
|
-
**Platforms:** Claude Code, Factory.AI, VSCode, Cursor, OpenCode, ForgeCode
|
|
381
|
-
|
|
382
|
-
---
|
|
383
|
-
|
|
384
|
-
## 7. Droid System
|
|
385
|
-
|
|
386
|
-
**Source:** `src/uap-droids-strict.ts:35` (schema), `:183` (plugin entry)
|
|
387
|
-
**Storage:** `.factory/droids/*.md` (JSON frontmatter + markdown body)
|
|
388
|
-
**Validation:** Zod schema (`DROID_SCHEMA`), decoder-first gate
|
|
389
|
-
|
|
390
|
-
**Built-in Templates:** code-reviewer, security-reviewer, performance-reviewer, test-writer
|
|
391
|
-
|
|
392
|
-
---
|
|
393
|
-
|
|
394
|
-
## 8. Utilities
|
|
395
|
-
|
|
396
|
-
| Utility | Source | Status |
|
|
397
|
-
| ----------------- | ---------------------------------- | ---------------------------------------- |
|
|
398
|
-
| CLAUDE.md Merger | `src/utils/merge-claude-md.ts:325` | ENABLED |
|
|
399
|
-
| JSON Validator | `src/utils/validate-json.ts:73` | ENABLED |
|
|
400
|
-
| String Similarity | `src/utils/string-similarity.ts` | ENABLED |
|
|
401
|
-
| Config Manager | `src/utils/config-manager.ts:4` | ENABLED |
|
|
402
|
-
| Fetch with Retry | `src/utils/fetch-with-retry.ts:1` | ENABLED (3 retries, exponential backoff) |
|
|
403
|
-
| Rate Limiter | `src/utils/rate-limiter.ts:16` | ENABLED (sliding window, Zod validated) |
|
|
404
|
-
| Dijkstra | `src/utils/dijkstra.ts:17` | ENABLED |
|
|
405
|
-
|
|
406
|
-
---
|
|
407
|
-
|
|
408
|
-
## 9. Test Coverage
|
|
409
|
-
|
|
410
|
-
| Test File | Tests | What's Covered |
|
|
411
|
-
| --------------------------------------------------- | ------- | ------------------------------------- |
|
|
412
|
-
| `test/tasks.test.ts` | 30 | Task CRUD, dependencies, sync, stats |
|
|
413
|
-
| `test/models.test.ts` | 26 | Router, planner, executor, presets |
|
|
414
|
-
| `src/memory/optimization.test.ts` | 21 | Memory optimization |
|
|
415
|
-
| `test/coordination.test.ts` | 20 | Agent lifecycle, claims, messaging |
|
|
416
|
-
| `test/deploy-batcher.test.ts` | 16 | Deploy batching, squashing, execution |
|
|
417
|
-
| `test/write-gate.test.ts` | 14 | Write gate criteria and scoring |
|
|
418
|
-
| `benchmark-env/src/utils/__tests__/helpers.test.ts` | 13 | Benchmark helpers |
|
|
419
|
-
| `src/tests/uap-strict-droids.test.ts` | 12 | Droid schema validation, decoder gate |
|
|
420
|
-
| `test/agent-scoped-memory.test.ts` | 8 | Agent memory isolation |
|
|
421
|
-
| `test/session-stats.test.ts` | 8 | Session statistics |
|
|
422
|
-
| `src/memory/short-term/indexeddb.test.ts` | 8 | IndexedDB short-term memory |
|
|
423
|
-
| `test/hooks.test.ts` | 7 | Hook system |
|
|
424
|
-
| `test/mcp-router-output-compressor.test.ts` | 7 | Output compression |
|
|
425
|
-
| `test/daily-log.test.ts` | 6 | Daily log staging |
|
|
426
|
-
| `src/memory/backends/github.test.ts` | 6 | GitHub backend |
|
|
427
|
-
| `test/memory-maintenance.test.ts` | 6 | Memory maintenance |
|
|
428
|
-
| `test/correction-propagator.test.ts` | 5 | Correction propagation |
|
|
429
|
-
| `test/mcp-router-filter.test.ts` | 5 | MCP router filtering |
|
|
430
|
-
| `src/memory/backends/qdrant-cloud.test.ts` | 5 | Qdrant backend |
|
|
431
|
-
| `src/utils/merge-claude-md.test.ts` | 4 | CLAUDE.md merging |
|
|
432
|
-
| `src/tests/droids-parallel.test.ts` | 1 | Parallel droid execution |
|
|
433
|
-
| **Total** | **228** | **21 files, 100% pass rate** |
|
|
434
|
-
|
|
435
|
-
---
|
|
436
|
-
|
|
437
|
-
## 10. Known Gaps & Future Work
|
|
438
|
-
|
|
439
|
-
| Gap | Impact | Effort | Status |
|
|
440
|
-
| ------------------------------------------ | -------------------------------------------------------------------------------- | ------ | ---------------- |
|
|
441
|
-
| No real `ModelClient` implementation | High — executor only works with mock | High | Fixed in v1.0.0 |
|
|
442
|
-
| Two routing systems not integrated | Medium — `src/models/router.ts` and `src/memory/model-router.ts` are independent | Medium | Fixed in v1.0.0 |
|
|
443
|
-
| `task_sync_meta` table unused | Low — created but never populated | Low | Fixed in v1.0.0 |
|
|
444
|
-
| `routingStrategy` `adaptive` == `balanced` | Low — 3 of 4 strategies differentiated | Low | Fixed in v1.0.0 |
|
|
445
|
-
| `routingStrategy` 3/4 differentiated | Medium — `cost-optimized`, `performance-first`, `balanced` work | N/A | Fixed in v8.0.0 |
|
|
446
|
-
| `execSync` in DeployBatcher | Medium — blocks event loop, shell injection risk | Medium | Fixed in v5.0.0 |
|
|
447
|
-
| Shell injection in embeddings/prepopulate | High — user text in shell commands | Medium | Fixed in v8.0.0 |
|
|
448
|
-
| Race condition in exclusive claims | High — concurrent agents could both acquire exclusive lock | Low | Fixed in v8.0.0 |
|
|
449
|
-
| L4 schema missing columns | Medium — `description` and `strength` columns missing from base schema | Low | Fixed in v8.0.0 |
|
|
450
|
-
| Embedding cache key collisions | Low — `text.slice(0,500)` caused collisions for long texts | Low | Fixed in v8.0.0 |
|
|
451
|
-
| No tests for coordination/task subsystems | High — ~2,600 lines untested | High | Fixed in v5.0.0 |
|
|
452
|
-
| `uap sync` not implemented | Low — planned for v0.9.0 | Medium | Fixed in v5.0.0 |
|
|
453
|
-
| `uap model --execute` not implemented | Medium — plan execution only via API | Medium | Fixed in v5.0.0 |
|
|
454
|
-
| Task `overdue` stats unimplemented | Low — no due_date column | Low | Fixed in v5.0.0 |
|
|
455
|
-
| MCP Router CLI setup placeholder | Medium — CLI setup not functional | Low | Fixed in v1.0.0 |
|
|
456
|
-
| `uap uninstall` not implemented | Low — no cleanup command | Low | Fixed in v1.0.0 |
|
|
457
|
-
| Plugin install only for 2 harnesses | Medium — 13+ harnesses unsupported | Medium | Fixed in v1.0.0 |
|
|
458
|
-
| Deploy batch config not persistent | Medium — settings lost on restart | Low | Fixed in v1.0.0 |
|
|
459
|
-
| No droid schema validation | Medium — invalid droids not caught | Medium | Fixed in v1.0.0 |
|
|
460
|
-
| No decoder gate | Medium — no input/output validation | Medium | Fixed in v1.0.0 |
|
|
461
|
-
| No dynamic compression | Low — static compression only | Medium | Fixed in v1.0.0 |
|
|
462
|
-
| No context pruning | Low — no intelligent context removal | Medium | Fixed in v1.0.0 |
|
|
463
|
-
| No adaptive patterns | Low — patterns don't self-tune | Medium | Fixed in v1.0.0 |
|
|
464
|
-
| No predictive memory | Low — no context prefetching | High | Fixed in v1.0.0 |
|
|
465
|
-
| No multi-turn agent loop | Medium — no error recovery loop | High | Fixed in v1.0.0 |
|
|
466
|
-
| PATH_MIGRATIONS TODO in code | Low — dead TODO comment | Low | Fixed in v1.0.0 |
|
|
467
|
-
|
|
468
|
-
---
|
|
469
|
-
|
|
470
|
-
**Last Updated:** 2026-03-17
|
|
471
|
-
**npm Package:** @miller-tech/uap v1.0.0
|
|
472
|
-
**Build:** 0 errors | **Tests:** 258 passing (23 files) | **Lint:** 0 errors
|
|
1
|
+
# Feature Catalog
|
|
2
|
+
|
|
3
|
+
> Universal Agent Protocol (UAP) v1.40.0
|
|
4
|
+
|
|
5
|
+
UAP is a universal AI-agent memory, coordination, and enforcement system. This
|
|
6
|
+
catalog groups its features by source subsystem under `src/`. Each entry is a
|
|
7
|
+
code-grounded summary of what the subsystem provides.
|
|
8
|
+
|
|
9
|
+
## Memory (`src/memory/`)
|
|
10
|
+
|
|
11
|
+
Hierarchical, tiered memory with semantic recall — the largest subsystem.
|
|
12
|
+
|
|
13
|
+
| Feature | Description |
|
|
14
|
+
|---------|-------------|
|
|
15
|
+
| Embedding service (`embeddings.ts`) | Multi-provider embeddings with priority order llama.cpp → Ollama → OpenAI → sentence-transformers → TF-IDF. Default nomic-embed-text (768-dim); MiniLM/TF-IDF fallback at 384. |
|
|
16
|
+
| Hierarchical memory (`hierarchical-memory.ts`) | Hot/warm/cold tiered memory with SQLite persistence and embeddings. |
|
|
17
|
+
| Short-term store (`short-term/`) | SQLite L1/L2 memory: memories, sessions, FTS5 search, knowledge-graph entities. |
|
|
18
|
+
| Model router w/ feedback (`model-router.ts`) | Routes to models using latency/success fingerprints. |
|
|
19
|
+
| Task classifier (`task-classifier.ts`) | Classifies task type/complexity to drive retrieval and routing. |
|
|
20
|
+
| Dynamic retrieval (`dynamic-retrieval.ts`) | Context-aware retrieval of relevant memories. |
|
|
21
|
+
| Adaptive context (`adaptive-context.ts`) | Context optimizations driven by historical task outcomes + semantic cache. |
|
|
22
|
+
| Semantic/context compression (`semantic-compression.ts`, `context-compressor.ts`, `context-pruner.ts`) | Compress/prune context to fit token budgets. |
|
|
23
|
+
| Speculative cache (`speculative-cache.ts`) | Pre-fetches likely-needed memory. |
|
|
24
|
+
| Consolidator / maintenance (`memory-consolidator.ts`, `memory-maintenance.ts`) | Consolidate and garbage-collect memory over time. |
|
|
25
|
+
| Write gate (`write-gate.ts`) | Quality filter for what gets written to memory. |
|
|
26
|
+
| Daily log (`daily-log.ts`) | Staging log with promotion (`gate_score`) to long-term memory. |
|
|
27
|
+
| Correction propagation (`correction-propagator.ts`) | Supersedes stale entries when corrections are made. |
|
|
28
|
+
| Predictive memory (`predictive-memory.ts`) | Learns query patterns to predict needed context. |
|
|
29
|
+
| Knowledge graph (`knowledge-graph.ts`) | L4 entity/relationship graph. |
|
|
30
|
+
| Ambiguity detector (`ambiguity-detector.ts`) | Implements P37 ambiguity detection. |
|
|
31
|
+
| Serverless Qdrant (`serverless-qdrant.ts`) | Lazy-local Docker Qdrant (`qdrant/qdrant:latest`, port 6333) or cloud. |
|
|
32
|
+
| Backends (`backends/`) | Pluggable long-term stores: Qdrant cloud, GitHub, factory selector. |
|
|
33
|
+
| Prepopulate (`prepopulate.ts`) | Seeds memory and discovers skills for CLAUDE.md generation. |
|
|
34
|
+
| Terminal-bench knowledge (`terminal-bench-knowledge.ts`) | Curated benchmark knowledge. |
|
|
35
|
+
|
|
36
|
+
## Models (`src/models/`)
|
|
37
|
+
|
|
38
|
+
Multi-model, two-tier (planner/executor) architecture.
|
|
39
|
+
|
|
40
|
+
| Feature | Description |
|
|
41
|
+
|---------|-------------|
|
|
42
|
+
| Router (`router.ts`, `unified-router.ts`) | Classifies tasks and selects models. |
|
|
43
|
+
| Planner (`planner.ts`) | Decomposes tasks into subtasks (`TaskPlanner`). |
|
|
44
|
+
| Executor (`executor.ts`) | Runs subtasks with retry/fallback (`TaskExecutor`, `MockModelClient`). |
|
|
45
|
+
| Plan validator (`plan-validator.ts`) | Validates plans before build. |
|
|
46
|
+
| Execution profiles (`execution-profiles.ts`, `profile-loader.ts`) | Named model profiles (`UAP_MODEL_PROFILE`). |
|
|
47
|
+
| Analytics (`analytics.ts`) | Per-task token/cost/outcome metrics (`model_analytics.db`). |
|
|
48
|
+
| OpenAI-compat client (`openai-compat-client.ts`) | OpenAI `/v1`-compatible client (default endpoint `http://localhost:4000/v1`). |
|
|
49
|
+
|
|
50
|
+
## Coordination (`src/coordination/`)
|
|
51
|
+
|
|
52
|
+
Multi-agent coordination layer.
|
|
53
|
+
|
|
54
|
+
| Feature | Description |
|
|
55
|
+
|---------|-------------|
|
|
56
|
+
| Database/service (`database.ts`, `service.ts`) | Agent registry, heartbeats, messages, work announcements/claims. |
|
|
57
|
+
| Deploy batcher (`deploy-batcher.ts`) | Batches commit/push/merge/deploy actions into windows. |
|
|
58
|
+
| Capability router (`capability-router.ts`) | Routes tasks to droids by capability. |
|
|
59
|
+
| Auto-agent (`auto-agent.ts`) | Auto-agent driver. |
|
|
60
|
+
| Pattern router (`pattern-router.ts`) | Matches tasks to execution patterns; always includes P12/P35. |
|
|
61
|
+
| Adaptive patterns (`adaptive-patterns.ts`) | Tracks pattern success outcomes to adapt selection. |
|
|
62
|
+
| Expert orchestrator (`expert-orchestrator.ts`) | Orchestrates parallel expert/droid review. |
|
|
63
|
+
|
|
64
|
+
## Tasks (`src/tasks/`)
|
|
65
|
+
|
|
66
|
+
Task management system (positioned as an alternative to Beads).
|
|
67
|
+
|
|
68
|
+
| Feature | Description |
|
|
69
|
+
|---------|-------------|
|
|
70
|
+
| Service (`service.ts`) | CRUD, dependencies, claim/release, board, stats. |
|
|
71
|
+
| Database (`database.ts`) | SQLite store (`.uap/tasks/tasks.db`) + JSONL mirror. |
|
|
72
|
+
| Coordination (`coordination.ts`) | Task ↔ agent coordination. |
|
|
73
|
+
| Decoder gate (`decoder-gate.ts`) | Full decoder-first (P35) validator. |
|
|
74
|
+
| Event bus (`event-bus.ts`) | `TaskEventBus` for task lifecycle events. |
|
|
75
|
+
|
|
76
|
+
## Policies (`src/policies/`)
|
|
77
|
+
|
|
78
|
+
DB-driven policy enforcement engine.
|
|
79
|
+
|
|
80
|
+
| Feature | Description |
|
|
81
|
+
|---------|-------------|
|
|
82
|
+
| Policy gate (`policy-gate.ts`) | `PolicyGate` + `PolicyViolationError` — the enforcement core. |
|
|
83
|
+
| Tool registry (`policy-tools.ts`) | `PolicyToolRegistry` of executable policy tools. |
|
|
84
|
+
| Policy memory (`policy-memory.ts`) | Persists policies (`policies.db`). |
|
|
85
|
+
| Enforced tool router (`enforced-tool-router.ts`) | Routes tool calls through the gate. |
|
|
86
|
+
| CLAUDE.md conversion (`convert-policy-to-claude.ts`) | Renders policies into CLAUDE.md. |
|
|
87
|
+
| Enforcers (`enforcers/`) | ~20 Python enforcers (worktree_required, test_gate, schema_diff_gate, memory_before_plan, coord_overlap, mcp_router_first, rtk_wrap, iac_parity, expert_review_required, etc.). |
|
|
88
|
+
|
|
89
|
+
## Delivery (`src/delivery/`)
|
|
90
|
+
|
|
91
|
+
Convergence loop that drives a model through execute → apply → verify → feedback
|
|
92
|
+
against real completion gates until "delivered".
|
|
93
|
+
|
|
94
|
+
| Feature | Description |
|
|
95
|
+
|---------|-------------|
|
|
96
|
+
| Convergence loop (`convergence-loop.ts`) | The main delivery loop. |
|
|
97
|
+
| Run coordinator (`run-coordinator.ts`) | Coordinates a delivery run. |
|
|
98
|
+
| Explorer (`explorer.ts`) | Best-of-N candidate generation. |
|
|
99
|
+
| Applier (`applier.ts`) | Applies file changes. |
|
|
100
|
+
| Verifier ladder (`verifier-ladder.ts`) | Build/typecheck/test/lint gate ladder. |
|
|
101
|
+
| Judge / critic (`judge.ts`, `critic.ts`) | Evaluate and critique turns. |
|
|
102
|
+
| Escalation (`escalation.ts`) | Stagnation escalation ladder. |
|
|
103
|
+
| Auto-optimizer (`auto-optimizer.ts`) | Dynamically enables aids. |
|
|
104
|
+
| Ideation / practice / spec-imports | Divergent strategy seeds, best-practice cards, curated project seeds. |
|
|
105
|
+
| HALO trace (`halo-trace.ts`) | Emits HALO spans. |
|
|
106
|
+
| Integrity (`integrity.ts`) | Test-protection / integrity guard. |
|
|
107
|
+
|
|
108
|
+
## MCP Router (`src/mcp-router/`)
|
|
109
|
+
|
|
110
|
+
Hierarchical MCP router that collapses 150+ MCP tools to 2
|
|
111
|
+
(`discover_tools`, `execute_tool`) for ~98% token reduction.
|
|
112
|
+
|
|
113
|
+
| Feature | Description |
|
|
114
|
+
|---------|-------------|
|
|
115
|
+
| Server (`server.ts`) | `McpRouter` + stdio server. |
|
|
116
|
+
| Output compressor (`output-compressor.ts`) | Compresses tool output. |
|
|
117
|
+
| Session stats (`session-stats.ts`) | Token-savings statistics. |
|
|
118
|
+
| Config parser (`config/parser.ts`) | Loads/merges `mcp.json` with path expansion. |
|
|
119
|
+
| Executor (`executor/client.ts`) | `McpClient` / `McpClientPool`. |
|
|
120
|
+
| Fuzzy search (`search/fuzzy.ts`) | `ToolSearchIndex`. |
|
|
121
|
+
| Experts (`experts/registry.ts`) | Expert-consult registry. |
|
|
122
|
+
| Tools (`tools/`) | `discover`, `execute`, `deliver` handlers. |
|
|
123
|
+
|
|
124
|
+
## Dashboard (`src/dashboard/`)
|
|
125
|
+
|
|
126
|
+
| Feature | Description |
|
|
127
|
+
|---------|-------------|
|
|
128
|
+
| Data service (`data-service.ts`) | Aggregates task/agent/memory/model/system data. |
|
|
129
|
+
| Event stream (`event-stream.ts`) | Real-time dashboard events. |
|
|
130
|
+
| Server (`server.ts`) | Web dashboard server (default port 3847). |
|
|
131
|
+
| Data seeder (`data-seeder.ts`) | Seeds demo/initial dashboard data. |
|
|
132
|
+
|
|
133
|
+
## Analyzers & Generators
|
|
134
|
+
|
|
135
|
+
| Subsystem | Description |
|
|
136
|
+
|-----------|-------------|
|
|
137
|
+
| Analyzers (`analyzers/`) | `analyzeProject(cwd)` builds a `ProjectAnalysis` (languages, frameworks, dirs) from `.uap.json`, git, package files. |
|
|
138
|
+
| Generators (`generators/claude-md.ts`) | Handlebars-based CLAUDE.md / web AGENT.md generation from analysis + discovered skills. |
|
|
139
|
+
|
|
140
|
+
## Observability & Telemetry
|
|
141
|
+
|
|
142
|
+
| Subsystem | Description |
|
|
143
|
+
|-----------|-------------|
|
|
144
|
+
| 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. |
|
|
145
|
+
| Telemetry (`telemetry/session-telemetry.ts`) | Session-level telemetry capture. |
|
|
146
|
+
|
|
147
|
+
## Browser & Benchmarks
|
|
148
|
+
|
|
149
|
+
| Subsystem | Description |
|
|
150
|
+
|-----------|-------------|
|
|
151
|
+
| Browser (`browser/web-browser.ts`) | `WebBrowser` automation wrapper for agents. |
|
|
152
|
+
| Benchmarks (`benchmarks/`) | Benchmark harness comparing a naive agent vs UAP-augmented agent; multi-turn loops, token throughput, speculative autotune. |
|
|
153
|
+
|
|
154
|
+
## Droids
|
|
155
|
+
|
|
156
|
+
The expert-droid roster lives as markdown-with-JSON-frontmatter files under
|
|
157
|
+
`.factory/droids/*.md`, discovered at runtime by `discoverDroids()` in
|
|
158
|
+
`src/uap-droids-strict.ts`. The strict plugin validates droids against a Zod
|
|
159
|
+
schema and exposes `uap_droid_list` / `uap_droid_invoke`, plus the
|
|
160
|
+
decoder-first (P35) and worktree gates. See `docs/reference/EXPERT_DROIDS.md`.
|
|
161
|
+
|
|
162
|
+
## Utilities (`src/utils/`)
|
|
163
|
+
|
|
164
|
+
Shared helpers: adaptive cache, concurrency pools (retry/timeout/fallback),
|
|
165
|
+
config loader, lazy imports, structured logger, CLAUDE.md merge, performance
|
|
166
|
+
monitor, query-complexity scoring, rate limiter, string similarity, and system
|
|
167
|
+
resource detection.
|
|
168
|
+
|
|
169
|
+
## CLI surface (`src/bin/cli.ts`)
|
|
170
|
+
|
|
171
|
+
The `uap` CLI exposes (top-level commands): `init`, `setup`, `analyze`,
|
|
172
|
+
`generate`, `memory`, `patterns`, `worktree`, `sync`, `droids`, `expert-route`,
|
|
173
|
+
`deliver`, `harness` (HALO), `ideate`, `coord`, `agent`, `deploy`, `task`,
|
|
174
|
+
`compliance`, `coordination`, `skill`, `update`, `dashboard` (alias `dash`),
|
|
175
|
+
`model`, `mcp-router`, `hooks`, `tool-calls`, `rtk`, `mcp-setup`, `schema-diff`,
|
|
176
|
+
`policy`, `uap-omp`.
|