@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,620 +0,0 @@
1
- # UAP CLI Reference
2
-
3
- **Complete command reference for Universal Agent Protocol**
4
-
5
- ---
6
-
7
- ## Quick Start
8
-
9
- ```bash
10
- # Initialize UAP in existing project
11
- uap init
12
-
13
- # Create a new task with memory tracking
14
- uap task create --title "Add user authentication" --type feature
15
-
16
- # Query past decisions
17
- uap memory query "authentication patterns"
18
-
19
- # Create worktree for parallel development
20
- uap worktree create add-api-endpoints
21
- ```
22
-
23
- ---
24
-
25
- ## Command Reference
26
-
27
- ### `uap init`
28
-
29
- Initialize UAP in your project.
30
-
31
- ```bash
32
- uap init [options]
33
- ```
34
-
35
- **Options:**
36
-
37
- - `--interactive, -i` - Run interactive setup wizard
38
- - `--force, -f` - Overwrite existing configuration
39
- - `--skip-qdrant` - Skip Qdrant setup (use SQLite only)
40
- - `--skip-hooks` - Skip session hook installation
41
-
42
- **Example:**
43
-
44
- ```bash
45
- uap init --interactive
46
- ```
47
-
48
- ---
49
-
50
- ### `uap task`
51
-
52
- Task creation and management with memory integration.
53
-
54
- #### `uap task create`
55
-
56
- Create a new tracked task.
57
-
58
- ```bash
59
- uap task create --title "<name>" --type <task|bug|feature> [options]
60
- ```
61
-
62
- **Options:**
63
-
64
- - `--priority, -p` - Priority level: low, medium, high, critical (also accepts P0-P4)
65
- - `--estimate` - Estimated time in minutes
66
- - `--depends` - Task ID this task depends on
67
- - `--label, -l` - Add label (can be specified multiple times)
68
-
69
- **Example:**
70
-
71
- ```bash
72
- uap task create --title "Fix login timeout bug" --type bug --priority high
73
- uap task create --title "Add OAuth support" --type feature --label auth --label v2.0
74
- ```
75
-
76
- #### `uap task list`
77
-
78
- List all tasks with optional filters.
79
-
80
- ```bash
81
- uap task list [options]
82
- ```
83
-
84
- **Options:**
85
-
86
- - `--status, -s` - Filter by status: pending/open, in_progress, completed/done, blocked
87
- - `--type, -t` - Filter by type: task, bug, feature
88
- - `--priority, -p` - Filter by priority
89
- - `--json` - Output as JSON
90
-
91
- **Example:**
92
-
93
- ```bash
94
- uap task list --status in_progress
95
- uap task list --type bug --priority high --json
96
- ```
97
-
98
- #### `uap task update`
99
-
100
- Update task status or details.
101
-
102
- ```bash
103
- uap task update <task-id> [options]
104
- ```
105
-
106
- **Options:**
107
-
108
- - `--status, -s` - New status
109
- - `--priority, -p` - New priority
110
- - `--label, -l` - Add label
111
- - `--remove-label, -R` - Remove label
112
- - `--comment, -c` - Add comment
113
-
114
- **Example:**
115
-
116
- ```bash
117
- uap task update abc123 --status in_progress
118
- uap task update def456 --comment "Blocked waiting on API key"
119
- ```
120
-
121
- #### `uap task ready`
122
-
123
- Initialize session with memory context (run at start of agent session).
124
-
125
- ```bash
126
- uap task ready [options]
127
- ```
128
-
129
- **Options:**
130
-
131
- - `--verbose, -v` - Show detailed memory queries
132
- - `--quiet, -q` - Suppress all output except errors
133
-
134
- **Output:**
135
-
136
- ```
137
- === UAP SESSION INITIALIZED ===
138
- Current Task: abc123 - Fix login timeout bug
139
- Recent Memories: 5 relevant decisions found
140
- Past Failures: 2 similar bugs resolved
141
- Active Patterns: P13, P26, P32
142
- ```
143
-
144
- ---
145
-
146
- ### `uap memory`
147
-
148
- Memory storage and retrieval operations.
149
-
150
- #### `uap memory store`
151
-
152
- Store a new memory entry.
153
-
154
- ```bash
155
- uap memory store "<text>" [options]
156
- ```
157
-
158
- **Options:**
159
-
160
- - `--type, -t` - Memory type: decision, pattern, lesson, failure
161
- - `--tags, -T` - Comma-separated tags
162
-
163
- **Example:**
164
-
165
- ```bash
166
- uap memory store "Always validate CSRF tokens in auth flows" --type decision --tags security,auth
167
- uap memory store "Docker container timeout at 300s - increase to 600s" --type lesson --tags docker
168
- ```
169
-
170
- #### `uap memory query`
171
-
172
- Search memories using semantic search.
173
-
174
- ```bash
175
- uap memory query "<query>" [options]
176
- ```
177
-
178
- **Options:**
179
-
180
- - `--top-k, -k` - Number of results (default: 10, alias for --limit)
181
- - `--threshold, -t` - Minimum similarity score (0-1, default: 0.35)
182
- - `--type, -t` - Filter by memory type
183
- - `--tags, -T` - Filter by tags
184
-
185
- **Example:**
186
-
187
- ```bash
188
- uap memory query "authentication errors" --top-k 10
189
- uap memory query "performance optimization" --threshold 0.5
190
- ```
191
-
192
- #### `uap memory clear-session`
193
-
194
- Clear session-specific memories.
195
-
196
- ```bash
197
- uap memory clear-session [session-id]
198
- ```
199
-
200
- **Example:**
201
-
202
- ```bash
203
- uap memory clear-session current
204
- ```
205
-
206
- ---
207
-
208
- ### `uap worktree`
209
-
210
- Worktree management for isolated development.
211
-
212
- #### `uap worktree create`
213
-
214
- Create a new worktree with automatic branch naming.
215
-
216
- ```bash
217
- uap worktree create <slug> [options]
218
- ```
219
-
220
- **Options:**
221
-
222
- - `--from, -f` - Base branch (default: current)
223
- - `--description, -d` - Worktree description
224
-
225
- **Example:**
226
-
227
- ```bash
228
- uap worktree create add-rate-limiting
229
- uap worktree create hotfix-auth-bug --from develop
230
- ```
231
-
232
- #### `uap worktree pr`
233
-
234
- Create a pull request for a worktree. This command now syncs the branch with `origin/master` before push/PR creation to reduce mergeability issues.
235
-
236
- ```bash
237
- uap worktree pr <worktree-id> [options]
238
- ```
239
-
240
- **Options:**
241
-
242
- - `--draft` - Create as draft PR
243
-
244
- **Example:**
245
-
246
- ```bash
247
- uap worktree pr 123
248
- uap worktree pr 123 --draft
249
- ```
250
-
251
- #### `uap worktree finish`
252
-
253
- Recommended completion flow for worktrees. This command enforces the safe sequence to prevent sync/merge problems:
254
-
255
- 1. Sync branch with `origin/master`
256
- 2. Push branch
257
- 3. Create PR if missing
258
- 4. Merge PR
259
- 5. Auto-clean local worktree and branch
260
-
261
- If GitHub cannot delete the local branch due worktree branch locks, `uap worktree finish` automatically falls back to merge + local cleanup, so local branch deletion still completes.
262
-
263
- ```bash
264
- uap worktree finish <worktree-id>
265
- ```
266
-
267
- **Example:**
268
-
269
- ```bash
270
- uap worktree finish 123
271
- ```
272
-
273
- #### `uap worktree cleanup`
274
-
275
- Remove merged worktrees.
276
-
277
- ```bash
278
- uap worktree cleanup <worktree-id> [options]
279
- ```
280
-
281
- **Options:**
282
-
283
- - `--force, -f` - Skip confirmation prompt
284
-
285
- **Example:**
286
-
287
- ```bash
288
- uap worktree cleanup 123 --force
289
- ```
290
-
291
- #### `uap worktree list`
292
-
293
- List all active worktrees.
294
-
295
- ```bash
296
- uap worktree list [options]
297
- ```
298
-
299
- **Options:**
300
-
301
- - `--json` - Output as JSON
302
-
303
- ---
304
-
305
- ### `uap hooks`
306
-
307
- Session hook management for persistent memory.
308
-
309
- #### `uap hooks install`
310
-
311
- Install session hooks for automatic memory tracking.
312
-
313
- ```bash
314
- uap hooks install [options]
315
- ```
316
-
317
- **Options:**
318
-
319
- - `--platform, -p` - Platform: claude/claude-code, factory, vscode, opencode
320
- - `--force, -f` - Overwrite existing hooks
321
-
322
- **Example:**
323
-
324
- ```bash
325
- uap hooks install --platform claude-code
326
- ```
327
-
328
- #### `uap hooks uninstall`
329
-
330
- Remove session hooks.
331
-
332
- ```bash
333
- uap hooks uninstall [options]
334
- ```
335
-
336
- **Options:**
337
-
338
- - `--all` - Remove all platform hooks
339
-
340
- ---
341
-
342
- ### `uap compliance`
343
-
344
- Protocol compliance checking and verification.
345
-
346
- #### `uap compliance check`
347
-
348
- Run all compliance checks.
349
-
350
- ```bash
351
- uap compliance check [options]
352
- ```
353
-
354
- **Options:**
355
-
356
- - `--verbose, -v` - Show all checks including passed
357
- - `--fail-fast` - Stop on first failure
358
- - `--json` - Output as JSON
359
-
360
- **Output:**
361
-
362
- ```
363
- === UAP COMPLIANCE CHECK ===
364
- [✓] CLAUDE.md present and valid
365
- [✓] .uap.json configuration exists
366
- [✓] Memory database accessible
367
- [✓] Worktree workflow enforced
368
- [✓] No direct commits to main
369
- [✓] All outputs verified with ls -la
370
- [✓] Schema matches test expectations
371
- [✓] Tests run 3+ times minimum
372
- [✓] CLI tested as ./script
373
- [✓] Critical files backed up
374
- [✓] Decoder round-trip passes
375
- [✓] Recovery artifacts copied
376
-
377
- === COMPLIANCE SCORE: 12/12 (100%) ===
378
- ```
379
-
380
- #### `uap compliance report`
381
-
382
- Generate detailed compliance report.
383
-
384
- ```bash
385
- uap compliance report [options]
386
- ```
387
-
388
- **Options:**
389
-
390
- - `--output, -o` - Output file path
391
- - `--format, -f` - Format: text, markdown, json
392
-
393
- ---
394
-
395
- ### `uap coordination`
396
-
397
- Multi-agent collaboration tools.
398
-
399
- #### `uap coordination check`
400
-
401
- Check for overlapping work between agents.
402
-
403
- ```bash
404
- uap coordination check --agents <agent1,agent2,...> [options]
405
- ```
406
-
407
- **Options:**
408
-
409
- - `--verbose, -v` - Show detailed overlap analysis
410
- - `--json` - Output as JSON
411
-
412
- #### `uap coordination resolve`
413
-
414
- Resolve identified overlaps.
415
-
416
- ```bash
417
- uap coordination resolve <overlap-id> --action <assign|merge|delegate>
418
- ```
419
-
420
- ---
421
-
422
- ### `uap skill`
423
-
424
- Skill management and loading.
425
-
426
- #### `uap skill list`
427
-
428
- List available skills.
429
-
430
- ```bash
431
- uap skill list [options]
432
- ```
433
-
434
- **Options:**
435
-
436
- - `--category, -c` - Filter by category
437
- - `--json` - Output as JSON
438
-
439
- #### `uap skill load`
440
-
441
- Load a specific skill for current session.
442
-
443
- ```bash
444
- uap skill load <skill-name> [options]
445
- ```
446
-
447
- **Example:**
448
-
449
- ```bash
450
- uap skill load chess-engine
451
- uap skill load compression --category optimization
452
- ```
453
-
454
- ---
455
-
456
- ### `uap agent`
457
-
458
- Agent status and management.
459
-
460
- #### `uap agent status`
461
-
462
- Show current agent status.
463
-
464
- ```bash
465
- uap agent status [options]
466
- ```
467
-
468
- **Options:**
469
-
470
- - `--verbose, -v` - Show detailed memory stats
471
- - `--json` - Output as JSON
472
-
473
- ---
474
-
475
- ### `uap generate`
476
-
477
- Generate CLAUDE.md from template.
478
-
479
- ```bash
480
- uap generate [options]
481
- ```
482
-
483
- **Options:**
484
-
485
- - `--force, -f` - Overwrite existing CLAUDE.md
486
- - `--template, -t` - Custom template path
487
- - `--sections` - Comma-separated section list to include
488
-
489
- **Example:**
490
-
491
- ```bash
492
- uap generate --force
493
- uap generate --sections memorySystem,worktreeWorkflow,troubleshooting
494
- ```
495
-
496
- ---
497
-
498
- ## Environment Variables
499
-
500
- | Variable | Description | Default |
501
- | -------------------- | ---------------------------- | ------------------------------------ |
502
- | `UAP_VERBOSE` | Enable verbose logging | `false` |
503
- | `UAP_DB_PATH` | Custom database path | `./agents/data/memory/short_term.db` |
504
- | `UAP_QDRANT_URL` | Qdrant endpoint | `localhost:6333` |
505
- | `UAP_DEFAULT_BRANCH` | Default worktree base branch | `main` |
506
-
507
- ---
508
-
509
- ## Exit Codes
510
-
511
- | Code | Meaning |
512
- | ---- | ------------------------- |
513
- | 0 | Success |
514
- | 1 | General error |
515
- | 2 | Invalid arguments |
516
- | 3 | Configuration error |
517
- | 4 | Memory operation failed |
518
- | 5 | Worktree operation failed |
519
- | 6 | Compliance check failed |
520
-
521
- ---
522
-
523
- ## Shell Completion
524
-
525
- Enable tab completion for your shell:
526
-
527
- ```bash
528
- # Bash
529
- echo 'eval "$(_UAP_COMPLETE=bash_source uap)"' >> ~/.bashrc
530
-
531
- # Zsh
532
- echo 'eval "$(_UAP_COMPLETE=zsh_source uap)"' >> ~/.zshrc
533
-
534
- # Fish
535
- _uap_complete_fish | source
536
- ```
537
-
538
- ---
539
-
540
- ## Examples
541
-
542
- ### Complete Development Workflow
543
-
544
- ```bash
545
- # 1. Initialize project
546
- uap init --interactive
547
-
548
- # 2. Create task
549
- uap task create --title "Implement user registration" --type feature --priority high
550
-
551
- # 3. Start session with memory
552
- uap task ready
553
-
554
- # 4. Create worktree for changes
555
- uap worktree create implement-user-registration
556
-
557
- # 5. Make changes, commit
558
- cd .worktrees/NNN-implement-user-registration/
559
- git add -A && git commit -m "feat: add user registration endpoint"
560
-
561
- # 6. Create PR
562
- uap worktree pr 123 --title "Add user registration API"
563
-
564
- # 7. Store lessons learned
565
- uap memory store "User validation must check email format before DB insert" \
566
- --type decision --tags auth,validation
567
-
568
- # 8. After merge, cleanup
569
- uap worktree cleanup 123 --force
570
-
571
- # 9. Verify compliance
572
- uap compliance check
573
- ```
574
-
575
- ### Memory-Enhanced Debugging
576
-
577
- ```bash
578
- # 1. Start with memory context
579
- uap task ready --verbose
580
-
581
- # 2. Query similar past failures
582
- uap memory query "database connection timeout" --top-k 5
583
-
584
- # 3. Apply pattern P26 (same error twice = change approach)
585
- # 4. Fix and test
586
- # 5. Store solution
587
- uap memory store "Connection pool exhaustion fixed by increasing maxPoolSize from 10 to 50" \
588
- --type lesson --tags database,performance
589
- ```
590
-
591
- ---
592
-
593
- ## Troubleshooting
594
-
595
- ### Common Issues
596
-
597
- | Error | Solution |
598
- | -------------------------- | --------------------------------------- |
599
- | `command not found: uap` | Ensure npm global bin is in PATH |
600
- | `Database locked` | Close other processes using the DB |
601
- | `Qdrant connection failed` | Run `cd agents && docker-compose up -d` |
602
- | `Worktree already exists` | Use `uap worktree cleanup <id>` first |
603
- | `Compliance check failed` | Review specific gate failure in output |
604
-
605
- ### Debug Mode
606
-
607
- ```bash
608
- # Enable verbose logging
609
- export UAP_VERBOSE=true
610
-
611
- # Check database contents
612
- sqlite3 ./agents/data/memory/short_term.db "SELECT * FROM memories ORDER BY id DESC LIMIT 5;"
613
-
614
- # Inspect session state
615
- sqlite3 ./agents/data/memory/short_term.db "SELECT * FROM session_memories WHERE session_id='current';"
616
- ```
617
-
618
- ---
619
-
620
- For more information, see [UAP Overview](./UAP_OVERVIEW.md) or visit the [GitHub repository](https://github.com/DammianMiller/universal-agent-protocol).