@miller-tech/uap 1.133.1 → 1.134.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 +4 -1
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/config-command.d.ts +49 -0
- package/dist/cli/config-command.d.ts.map +1 -0
- package/dist/cli/config-command.js +465 -0
- package/dist/cli/config-command.js.map +1 -0
- package/dist/cli/config-wizard.d.ts +13 -0
- package/dist/cli/config-wizard.d.ts.map +1 -0
- package/dist/cli/config-wizard.js +134 -0
- package/dist/cli/config-wizard.js.map +1 -0
- package/dist/cli/guided-setup.d.ts.map +1 -1
- package/dist/cli/guided-setup.js +11 -0
- package/dist/cli/guided-setup.js.map +1 -1
- package/dist/cli/policy.d.ts.map +1 -1
- package/dist/cli/policy.js +34 -0
- package/dist/cli/policy.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +22 -0
- package/dist/cli/setup.js.map +1 -1
- package/dist/config/policy-recommendations.d.ts +29 -0
- package/dist/config/policy-recommendations.d.ts.map +1 -0
- package/dist/config/policy-recommendations.js +108 -0
- package/dist/config/policy-recommendations.js.map +1 -0
- package/dist/config/settings-registry.d.ts +65 -0
- package/dist/config/settings-registry.d.ts.map +1 -0
- package/dist/config/settings-registry.js +334 -0
- package/dist/config/settings-registry.js.map +1 -0
- package/dist/dashboard/server.d.ts +9 -0
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +21 -6
- package/dist/dashboard/server.js.map +1 -1
- package/docs/INDEX.md +2 -0
- package/docs/guides/POLICY_SELECTION.md +98 -0
- package/docs/reference/CONFIGURATION_REFERENCE.md +688 -0
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
- package/tools/agents/scripts/anthropic_proxy.py +137 -12
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Policy Selection & Recommendations
|
|
2
|
+
|
|
3
|
+
UAP ships ~33 executable policies (the [enforcer catalog](POLICIES.md)). You don't want all of them on for every project — you want the set that fits *your* workflow. This guide gives you a recommended core plus tailored add-ons by scenario, and the commands to apply them.
|
|
4
|
+
|
|
5
|
+
> **Live version of this guide:** `uap policy recommend` (all scenarios) or `uap policy recommend <scenario>` (a tailored set with an install command). The recommendations here and in the CLI come from the same source (`src/config/policy-recommendations.ts`).
|
|
6
|
+
|
|
7
|
+
## How policies work (the 20-second version)
|
|
8
|
+
|
|
9
|
+
A policy is enforced by a hook → the enforcer inspects the tool call → it **allows (exit 0)** or **blocks (exit 2)**. Only `REQUIRED`-level policies hard-block; `RECOMMENDED`/`OPTIONAL` are advisory. Each enforcer also has an env kill-switch (e.g. `UAP_NO_WORKTREE`, `UAP_DELIVER_BYPASS`) so a human can override a single call — they're **cooperative guardrails**, not a sandbox. For a true write boundary, pair them with the [sandbox](SANDBOX.md). Full mechanics: [Policies](POLICIES.md).
|
|
10
|
+
|
|
11
|
+
## Apply them
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uap policy recommend # list the core set + all scenarios
|
|
15
|
+
uap policy recommend team # tailored set for a scenario + an install command
|
|
16
|
+
uap policy install <slug> # install one policy (attaches its enforcer)
|
|
17
|
+
uap policy matrix # see everything installed + how to adjust it
|
|
18
|
+
uap config wizard # interactive: pick a scenario, install in one step
|
|
19
|
+
uap setup --profile custom # baseline setup, then the wizard (config + policies)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## The core set — recommended for every project
|
|
23
|
+
|
|
24
|
+
The safety floor. `uap setup` installs the delivery-enforcement + self-protect pieces automatically; the rest are one `uap policy install` away.
|
|
25
|
+
|
|
26
|
+
| Policy | Why |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `worktree-required` | Edits land in an isolated worktree, never the working tree. |
|
|
29
|
+
| `delivery-enforcement` | Source changes route through the verified `deliver` loop. |
|
|
30
|
+
| `enforcement-self-protect` | Agents cannot disable the gates that constrain them. |
|
|
31
|
+
| `task-required` | Work is tied to a tracked task, not ad-hoc. |
|
|
32
|
+
| `test-gate` | Changed code must pass tests before "done". |
|
|
33
|
+
| `memory-before-plan` | The agent recalls prior decisions before re-deriving them. |
|
|
34
|
+
| `workdir-scope` | Writes are contained to the project directory. |
|
|
35
|
+
|
|
36
|
+
## Scenarios — add these on top of the core
|
|
37
|
+
|
|
38
|
+
Pick the row that matches how you work. Each adds to the core set above.
|
|
39
|
+
|
|
40
|
+
### Solo dev, local model
|
|
41
|
+
*One person driving a local (llama.cpp/Qwen) model that needs strong guardrails.*
|
|
42
|
+
|
|
43
|
+
`codebase-read-before-plan` · `validate-plan-before-build` · `mcp-router-first` · `local-build-before-push` · `ship-loop-gate` · `doc-live-over-report`
|
|
44
|
+
|
|
45
|
+
Weaker models benefit most from "read before you plan", a lean context window, and converging to green before shipping.
|
|
46
|
+
|
|
47
|
+
### Team / multi-agent
|
|
48
|
+
*Multiple people or agents working the same repo concurrently.*
|
|
49
|
+
|
|
50
|
+
`coord-overlap` · `expert-review-required` · `schema-diff-gate` · `session-memory-write` · `artifact-hygiene`
|
|
51
|
+
|
|
52
|
+
The point is to stop agents colliding, surface contract changes for review, and capture learnings so peers compound them.
|
|
53
|
+
|
|
54
|
+
### CI-gated delivery
|
|
55
|
+
*Changes must survive a CI pipeline and controlled deploys.*
|
|
56
|
+
|
|
57
|
+
`local-build-before-push` · `ship-loop-gate` · `merge-deploy-monitor-verify` · `schema-diff-gate`
|
|
58
|
+
|
|
59
|
+
Fail fast locally, re-converge on red CI, and treat deploys as monitored + verified rather than fire-and-forget.
|
|
60
|
+
|
|
61
|
+
### High autonomy / hands-free
|
|
62
|
+
*Long unattended builds where the model must not cut corners.*
|
|
63
|
+
|
|
64
|
+
`validate-plan-before-build` · `ship-loop-gate` · `artifact-hygiene` · `doc-live-over-report` · `codebase-read-before-plan`
|
|
65
|
+
|
|
66
|
+
A wrong plan wastes an entire autonomous run — validate up front, grade the real system (not the model's optimism), and only end when the work is genuinely done.
|
|
67
|
+
|
|
68
|
+
### Security-sensitive
|
|
69
|
+
*Handling secrets, infrastructure, or regulated code.*
|
|
70
|
+
|
|
71
|
+
`bearer-lockdown` · `schema-diff-gate` · `iac-parity` · `iac-plan-destruction-check`
|
|
72
|
+
|
|
73
|
+
Block credential leaks, forbid silent permission/API-surface changes, and flag destructive infra plans before apply.
|
|
74
|
+
|
|
75
|
+
### UI / design work
|
|
76
|
+
*Projects with a front-end and a design system.*
|
|
77
|
+
|
|
78
|
+
`design-token-gate` · `visual-verification`
|
|
79
|
+
|
|
80
|
+
Keep UI edits on your design tokens/spacing and verify changes visually, not just by tests. Pair with [DESIGN.md](../design/UAP_REACTOR.md) and `uap config set design.enabled true`.
|
|
81
|
+
|
|
82
|
+
## Tuning the level of any policy
|
|
83
|
+
|
|
84
|
+
A policy's *level* decides whether it hard-blocks or just warns:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uap policy level <id> RECOMMENDED # downgrade a REQUIRED gate to advisory
|
|
88
|
+
uap policy level <id> REQUIRED # promote an advisory to a hard block
|
|
89
|
+
uap policy disable <id> # turn it off entirely
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Start stricter than you think you need — it's easier to relax a gate that's too noisy than to notice a class of mistakes a missing gate let through. Run `uap config doctor` to catch settings that quietly weaken the whole set (e.g. a leaked `UAP_ENFORCE_DELIVERY=advisory`).
|
|
93
|
+
|
|
94
|
+
## See also
|
|
95
|
+
|
|
96
|
+
- [Policies](POLICIES.md) — the full enforcer catalog + CLI reference
|
|
97
|
+
- [Configuration Reference](../reference/CONFIGURATION_REFERENCE.md) — every setting `uap config` exposes
|
|
98
|
+
- [Sandbox](SANDBOX.md) — the kernel-level write boundary that backs the cooperative gates
|