@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.
Files changed (150) hide show
  1. package/README.md +109 -642
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/cli/deliver-defaults.d.ts +23 -0
  4. package/dist/cli/deliver-defaults.d.ts.map +1 -0
  5. package/dist/cli/deliver-defaults.js +121 -0
  6. package/dist/cli/deliver-defaults.js.map +1 -0
  7. package/dist/cli/init.d.ts.map +1 -1
  8. package/dist/cli/init.js +29 -0
  9. package/dist/cli/init.js.map +1 -1
  10. package/dist/cli/setup.d.ts.map +1 -1
  11. package/dist/cli/setup.js +19 -0
  12. package/dist/cli/setup.js.map +1 -1
  13. package/dist/policies/policy-tools.d.ts +7 -0
  14. package/dist/policies/policy-tools.d.ts.map +1 -1
  15. package/dist/policies/policy-tools.js +24 -2
  16. package/dist/policies/policy-tools.js.map +1 -1
  17. package/docs/INDEX.md +48 -286
  18. package/docs/architecture/OVERVIEW.md +328 -0
  19. package/docs/architecture/PROTOCOL.md +204 -0
  20. package/docs/benchmarks/README.md +17 -192
  21. package/docs/getting-started/CONFIGURATION.md +237 -0
  22. package/docs/getting-started/INSTALLATION.md +125 -0
  23. package/docs/getting-started/QUICKSTART.md +115 -0
  24. package/docs/guides/COORDINATION.md +162 -0
  25. package/docs/guides/DELIVER.md +115 -0
  26. package/docs/guides/DEPLOY_BATCHING.md +212 -0
  27. package/docs/guides/DROIDS_AND_SKILLS.md +202 -0
  28. package/docs/guides/LOCAL_MODELS.md +148 -0
  29. package/docs/guides/MCP_ROUTER.md +195 -0
  30. package/docs/guides/MEMORY.md +235 -0
  31. package/docs/guides/MULTI_MODEL.md +223 -0
  32. package/docs/guides/POLICIES.md +190 -0
  33. package/docs/guides/WORKTREE_WORKFLOW.md +185 -0
  34. package/docs/integrations/MCP_ROUTER.md +147 -0
  35. package/docs/integrations/RTK.md +102 -0
  36. package/docs/reference/API.md +485 -0
  37. package/docs/reference/CLI.md +719 -0
  38. package/docs/reference/CONFIGURATION.md +90 -193
  39. package/docs/reference/DATABASE_SCHEMA.md +110 -344
  40. package/docs/reference/FEATURES.md +176 -472
  41. package/docs/reference/PATTERNS.md +102 -0
  42. package/docs/reference/PLATFORMS.md +83 -0
  43. package/package.json +3 -1
  44. package/src/policies/enforcers/7ebbc721-7540-4e9f-879a-770e0213a09b_architecture_review.py +101 -0
  45. package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
  46. package/src/policies/enforcers/_common.py +100 -0
  47. package/src/policies/enforcers/artifact_hygiene.py +52 -0
  48. package/src/policies/enforcers/cluster_routing.py +63 -0
  49. package/src/policies/enforcers/codebase_read_before_plan.py +52 -0
  50. package/src/policies/enforcers/coord_overlap.py +81 -0
  51. package/src/policies/enforcers/delivery_enforcement.py +97 -0
  52. package/src/policies/enforcers/doc_live_over_report.py +50 -0
  53. package/src/policies/enforcers/expert_review_required.py +135 -0
  54. package/src/policies/enforcers/iac_parity.py +53 -0
  55. package/src/policies/enforcers/mcp_router_first.py +37 -0
  56. package/src/policies/enforcers/memory_before_plan.py +61 -0
  57. package/src/policies/enforcers/parallel_reads.py +50 -0
  58. package/src/policies/enforcers/rtk_wrap.py +44 -0
  59. package/src/policies/enforcers/schema_diff_gate.py +80 -0
  60. package/src/policies/enforcers/session_memory_write.py +52 -0
  61. package/src/policies/enforcers/task_required.py +131 -0
  62. package/src/policies/enforcers/test_gate.py +58 -0
  63. package/src/policies/enforcers/validate_plan_before_build.py +75 -0
  64. package/src/policies/enforcers/worktree_required.py +57 -0
  65. package/src/policies/schemas/policies/architecture-review.md +51 -0
  66. package/src/policies/schemas/policies/artifact-hygiene.md +29 -0
  67. package/src/policies/schemas/policies/cluster-routing.md +31 -0
  68. package/src/policies/schemas/policies/codebase-read-before-plan.md +30 -0
  69. package/src/policies/schemas/policies/coord-overlap.md +24 -0
  70. package/src/policies/schemas/policies/delivery-enforcement.md +45 -0
  71. package/src/policies/schemas/policies/doc-live-over-report.md +32 -0
  72. package/src/policies/schemas/policies/expert-review-required.md +60 -0
  73. package/src/policies/schemas/policies/iac-parity.md +31 -0
  74. package/src/policies/schemas/policies/mandatory-testing-deployment.md +147 -0
  75. package/src/policies/schemas/policies/mcp-router-first.md +24 -0
  76. package/src/policies/schemas/policies/memory-before-plan.md +24 -0
  77. package/src/policies/schemas/policies/merge-deploy-monitor-verify.md +145 -0
  78. package/src/policies/schemas/policies/parallel-reads.md +24 -0
  79. package/src/policies/schemas/policies/rtk-wrap.md +26 -0
  80. package/src/policies/schemas/policies/schema-diff-gate.md +30 -0
  81. package/src/policies/schemas/policies/session-memory-write.md +24 -0
  82. package/src/policies/schemas/policies/task-required.md +49 -0
  83. package/src/policies/schemas/policies/test-gate.md +24 -0
  84. package/src/policies/schemas/policies/validate-plan-before-build.md +28 -0
  85. package/src/policies/schemas/policies/worktree-required.md +28 -0
  86. package/templates/hooks/uap-policy-gate.sh +5 -0
  87. package/docs/AGENTS.md +0 -423
  88. package/docs/DOCUMENTATION_AUDIT_REPORT.md +0 -131
  89. package/docs/GETTING_STARTED.md +0 -288
  90. package/docs/PROJECT_ANALYSIS_REPORT.md +0 -510
  91. package/docs/architecture/COMPLETE_ARCHITECTURE.md +0 -748
  92. package/docs/architecture/EXPERT_STACK.md +0 -137
  93. package/docs/architecture/MULTI_MODEL.md +0 -224
  94. package/docs/architecture/PLATFORM_GATING.md +0 -68
  95. package/docs/architecture/SYSTEM_ANALYSIS.md +0 -334
  96. package/docs/architecture/UAP_COMPLIANCE.md +0 -217
  97. package/docs/architecture/UAP_PROTOCOL.md +0 -339
  98. package/docs/architecture/UAP_STRICT_DROIDS.md +0 -172
  99. package/docs/archive/BALLS_MODE_SELF_ANALYSIS.md +0 -260
  100. package/docs/archive/BENCHMARK_GAPS_AND_PLAN.md +0 -146
  101. package/docs/archive/FAILING_TASKS_SOLUTION_PLAN.md +0 -668
  102. package/docs/archive/JINJA2-SYSTEM-MESSAGE-FIX.md +0 -209
  103. package/docs/archive/MODEL_ROUTING_IMPLEMENTATION_SUMMARY.md +0 -281
  104. package/docs/archive/MODEL_ROUTING_OPTIMIZATION_PLAN.md +0 -320
  105. package/docs/archive/NPM-PUBLISH-V0.9.1.md +0 -240
  106. package/docs/archive/OPTIMIZATION_OPTIONS.md +0 -334
  107. package/docs/archive/PARALLELISM_GAPS_AND_OPTIONS.md +0 -422
  108. package/docs/archive/POLICY_GATE_IMPLEMENTATION.md +0 -245
  109. package/docs/archive/SETUP_IMPROVEMENTS.md +0 -213
  110. package/docs/archive/UAP_GENERIC_OPTIMIZATION_PLAN.md +0 -270
  111. package/docs/archive/UAP_OPTIMIZATION_PLAN.md +0 -701
  112. package/docs/archive/UAP_V103_PATTERN_DESIGN.md +0 -315
  113. package/docs/archive/UAP_V104_COMPLIANCE_DESIGN.md +0 -223
  114. package/docs/archive/changelog/2026-03-10_uap-100-compliance.md +0 -77
  115. package/docs/archive/changelog/2026-03-10_uap-full-system-verification.md +0 -109
  116. package/docs/archive/opencode-integration-guide.md +0 -740
  117. package/docs/archive/opencode-integration-quickref.md +0 -180
  118. package/docs/benchmarks/OVERNIGHT_RUNNER.md +0 -341
  119. package/docs/benchmarks/SPECULATIVE_DECODING_JOURNEY_2026-03.md +0 -221
  120. package/docs/benchmarks/VALIDATION_PLAN.md +0 -568
  121. package/docs/blog/SPECULATIVE_DECODING_PRODUCTION_PLAYBOOK.md +0 -139
  122. package/docs/blog/local-coding-agents.md +0 -266
  123. package/docs/blog/x-thread.md +0 -254
  124. package/docs/deployment/DEPLOYMENT.md +0 -895
  125. package/docs/deployment/DEPLOYMENT_STRATEGIES.md +0 -518
  126. package/docs/deployment/DEPLOY_BATCHER_ANALYSIS.md +0 -224
  127. package/docs/deployment/DEPLOY_BATCHING.md +0 -273
  128. package/docs/deployment/DEPLOY_BUCKETING_ANALYSIS.md +0 -420
  129. package/docs/deployment/QWEN35_LLAMA_CPP.md +0 -426
  130. package/docs/deployment/UAP_LLAMA_ANTHROPIC_PROXY_BOOTSTRAP.md +0 -279
  131. package/docs/getting-started/INTEGRATION.md +0 -628
  132. package/docs/getting-started/OVERVIEW.md +0 -324
  133. package/docs/getting-started/SETUP.md +0 -377
  134. package/docs/integrations/MCP_ROUTER_SETUP.md +0 -445
  135. package/docs/integrations/RTK_INTEGRATION.md +0 -468
  136. package/docs/operations/TROUBLESHOOTING.md +0 -660
  137. package/docs/pr/PR_SPECULATIVE_DOCS_TEMPLATE.md +0 -146
  138. package/docs/pr/UPSTREAM_PRS.md +0 -424
  139. package/docs/reference/API_REFERENCE.md +0 -903
  140. package/docs/reference/EXPERT_DROIDS.md +0 -219
  141. package/docs/reference/HARNESS-MATRIX.md +0 -318
  142. package/docs/reference/PATTERN_LIBRARY.md +0 -636
  143. package/docs/reference/UAP_CLI_REFERENCE.md +0 -620
  144. package/docs/research/BEHAVIORAL_PATTERNS.md +0 -228
  145. package/docs/research/DOMAIN_STRATEGIES.md +0 -316
  146. package/docs/research/MEMORY_SYSTEMS_COMPARISON.md +0 -812
  147. package/docs/research/PATTERN_ANALYSIS_2026-01-18.md +0 -436
  148. package/docs/research/PERFORMANCE_ANALYSIS_2026-01-18.md +0 -209
  149. package/docs/research/PERFORMANCE_TEST_PLAN.md +0 -383
  150. package/docs/research/TERMINAL_BENCH_LEARNINGS.md +0 -217
@@ -1,288 +0,0 @@
1
- # UAP - Universal Agent Protocol
2
-
3
- > **Version:** 1.20.32
4
- > **Last Updated:** 2026-04-08
5
- > **License:**
6
-
7
- **Universal Agent Protocol (UAP)** is an open protocol that enables AI agents to maintain persistent context, learn from past interactions, and apply proven patterns across tasks.
8
-
9
- ---
10
-
11
- ## Core Capabilities
12
-
13
- 1. **Persistent Memory**: Store and retrieve information across sessions with 4-layer architecture
14
- 2. **Pattern Application**: Leverage 58+ battle-tested workflows and decision frameworks
15
- 3. **Multi-Agent Coordination**: Coordinate work between agents to prevent conflicts
16
- 4. **CI/CD Optimization**: Reduce pipeline costs by 50-80% through intelligent batching
17
- 5. **MCP Integration**: Achieve 98% token reduction via meta-tool routing
18
-
19
- ### Quick Start
20
-
21
- ```bash
22
- # Install UAP CLI
23
- npm install -g universal-agent-protocol
24
-
25
- # Initialize in your project
26
- uap init
27
-
28
- # Create a tracked task
29
- uap task create "Implement feature X"
30
-
31
- # Use worktree for safe development
32
- uap worktree create feature-name
33
- cd .worktrees/NNN-feature-name/
34
- # Make changes...
35
- uap worktree pr <id>
36
- ```
37
-
38
- ### Prerequisites
39
-
40
- - Node.js >= 18.0.0
41
- - npm or yarn
42
- - Optional: Docker (for Qdrant semantic search)
43
-
44
- ---
45
-
46
- ## Architecture
47
-
48
- ### System Overview
49
-
50
- UAP implements a **4-layer memory architecture** combined with multi-agent coordination:
51
-
52
- ```
53
- ┌─────────────────────────────────────────────────────────────┐
54
- │ AI Agent Layer │
55
- │ (Claude, Factory.AI, OpenCode, etc.) │
56
- └──────────────────────┬──────────────────────────────────────┘
57
-
58
- ┌──────────────────────▼──────────────────────────────────────┐
59
- │ UAP Core Layer │
60
- │ CLI │ Memory │ Coordination │ Task │ Deploy Batcher │
61
- └──────────────────────┬──────────────────────────────────────┘
62
-
63
- ┌──────────────────────▼──────────────────────────────────────┐
64
- │ │
65
- │ CLI │ Memory │ Coordination │ Task │ Deploy Batcher │
66
- └──────────────────────┬──────────────────────────────────────┘
67
-
68
- ┌──────────────────────▼──────────────────────────────────────┐
69
- │ │ CLI │ Memory │ Coordination │ Task │ Deploy Batcher │
70
- ──────────────────────────────────────┘
71
-
72
- ┌──────────────────────▼──────────────────────────────────────┐
73
- │ Storage Layer │
74
- │ SQLite (Working) │ Qdrant (Semantic) │ Git (History) │ ─────────────────────────────────────────────────────────────┘
75
- ```
76
-
77
- ### Key Components
78
-
79
- | Component | Purpose | Impact |
80
- | ------------------- | ---------------------------- | ------------------------ |
81
- | **Memory System** | 4-layer persistent context | 10x retention |
82
- | ination\*\* | Multi-agent sync via SQLite | Zero conflicts |
83
- | **Task Management** | Structured workflow tracking | Full lifecycle |
84
- | **Deploy Batcher** | CI/CD optimization | 50-80% savings |
85
- | **MCP Router** | Meta-tool routing | 98% token reduction |
86
- | Worktrees\*\* | Safe isolated development | No main branch pollution |
87
-
88
- ---
89
-
90
- ## Reference
91
-
92
- ### CLI Commands
93
-
94
- #### Task Management
95
-
96
- ```bash
97
- # Create and track tasks
98
- uap task create "Fix bug" --priority high
99
- uap task list --active
100
- uap task complete --reason "Fixed"
101
- ```
102
-
103
- #### Memory Operations
104
-
105
- ```bash
106
- # Store and query memories
107
- uap memory store "Best practice: validate inputs"
108
- uap memory query "authentication" --top-k 5
109
- uap memory status
110
- ```
111
-
112
- #### Worktree Workflow
113
-
114
- ```bash
115
- # Safe isolated development
116
- uap worktree create feature-name
117
- cd .worktrees/NNN-feature-name/
118
- ges...
119
- uap worktree pr <id>
120
- uap worktree cleanup <id> # After merge
121
- ```
122
-
123
- #### Compliance
124
-
125
- ```bash
126
- # Verify protocol compliance
127
- uap compliance check
128
- uap hooks install all
129
- ```
130
-
131
- ### Database Schema
132
-
133
- UAP uses SQLite for structured data and Qdrant for semantic search:
134
-
135
- **SQLite Tables:**
136
-
137
- - `memories` - Short-term working memory (50 entries)
138
- - `session_memories` - Current session state
139
- - `entities/relationships` - Knowledge graph
140
- - `agent_registry` - Multi-agent coordination
141
- - `deploy_queue` - CI/CD batching queue
142
-
143
- **Qdrant Collections:**
144
-
145
- - `agent_memory` - Semantic embeddings (384-dim vectors)
146
- - `agent_patterns` - Pattern library indexing
147
-
148
- ---
149
-
150
- ## Deployment
151
-
152
- ### Production Setup
153
-
154
- ```bash
155
- # Start Qdrant for semantic search
156
- cd agents && docker-compose up -d
157
-
158
- # Install hooks
159
- uap hooks install all
160
-
161
- # Verify setup
162
- uap task ready
163
- ```
164
-
165
- ### CI/CD Integration
166
-
167
- UAP integrates with GitHub Actions via the DeployBatcher:
168
-
169
- ```yaml
170
- name: UAP CI
171
- on: [push, pull_request]
172
- jobs:
173
- build:
174
- runs-on: ubuntu-latest
175
- steps:
176
- - uses: actions/checkout@v4
177
- - name: Run UAP benchmarks
178
- run: npm run benchmark:full
179
- ```
180
-
181
- ### Model Providers
182
-
183
- | Provider | Use Case | Configuration |
184
- | --------------------- | ----------------- | ----------------------- |
185
- | **Qwen3.5** | General tasks | Default, cost-effective |
186
- | **Claude Opus** | Complex reasoning | High-accuracy scenarios |
187
- | **GPT-4** | Analysis tasks | Code generation |
188
- | **Local (llama.cpp)** | Privacy-focused | Self-hosted deployments |
189
-
190
- ---
191
-
192
- ## Benchmarks
193
-
194
- ### Performance Summary
195
-
196
- | Metric | Baseline | UAP v1.18 | Improvement |
197
- | ---------------- | -------- | --------- | ----------- |
198
- | **Success Rate** | 75% | **100%** | +25pp |
199
- | **Tokens/Task** | 52K | **23.4K** | -55% |
200
- | **Time/Task** | 45s | **32s** | -29% |
201
- | **Error Rate** | 12% | **0%** | -100% |
202
-
203
- ### Full Benchmark Suite
204
-
205
- Run the complete benchmark suite:
206
-
207
- ```bash
208
- # Quick test (10 tasks)
209
- npm run benchmark:short
210
-
211
- # Full validation (14 tasks)
212
- npm run benchmark:full
213
-
214
- # Overnight extended run
215
- npm run benchmark:overnight
216
- ```
217
-
218
- Results are documented in [COMPREHENSIVE_BENCHMARKS.md](benchmarks/COMPREHENSIVE_BENCHMARKS.md).
219
-
220
- ## Operations
221
-
222
- ### Troubleshooting
223
-
224
- | Issue | Solution |
225
- | -------------------------- | -------------------------------------- |
226
- | `Qdrant connection failed` | `cd agents && docker-compose up -d` |
227
- | `Worktree already exists` | `uap worktree cleanup <id>` |
228
- | Memory DB locked` | Close other processes using the DB |
229
- | `Compliance check failed` | Review specific gate failure in output |
230
-
231
- ### Debug Mode
232
-
233
- ```bash
234
- # Enable verbose logging
235
- export UAP_VERBOSE=true
236
-
237
- # Check memory queries
238
- uap task ready --verbose
239
-
240
- # Inspect database directly
241
- sqlite3 ./agents/data/memory/short_term.db ".tables"
242
- ```
243
-
244
- ---
245
-
246
- ## Contributing
247
-
248
- ### Development Setup
249
-
250
- ```bash
251
- git clone https://github.com/DammianMiller/universal-agent-protocol.git
252
- cd universal-agent-protocol
253
- npm install
254
- npm run build
255
- npm test
256
- ```
257
-
258
- ### Worktree Workflow
259
-
260
- All changes must be made in a worktree:
261
-
262
- ```bash
263
- # Create worktree for your feature
264
- uap worktree create feature-description
265
-
266
- # Make changes, commit, create PR
267
- cd .worktrees/NNN-feature-description/
268
- git add -A && git commit -m "feat: description"
269
- uap worktree pr <id>
270
-
271
- # After merge, cleanup is mandatory
272
- uap worktree cleanup <id>
273
- ```
274
-
275
- ---
276
-
277
- ## License
278
-
279
- MIT License - See [LICENSE](../LICENSE) file
280
-
281
- ---
282
-
283
- <div align="center">
284
-
285
- **Maintained by:** UAP Team
286
- **Repository:** https://github.com/DammianMiller/universal-agent-protocol
287
- **Issues:** https://github.com/DammianMiller/universal-agent-protocol/issues
288
- 306 lines)