@miller-tech/uap 1.183.3 → 1.184.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 +14 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/principles.d.ts +10 -0
- package/dist/cli/principles.d.ts.map +1 -0
- package/dist/cli/principles.js +138 -0
- package/dist/cli/principles.js.map +1 -0
- package/dist/config/policy-recommendations.d.ts.map +1 -1
- package/dist/config/policy-recommendations.js +17 -0
- package/dist/config/policy-recommendations.js.map +1 -1
- package/dist/config/settings-registry.d.ts +1 -1
- package/dist/config/settings-registry.d.ts.map +1 -1
- package/dist/config/settings-registry.js +24 -0
- package/dist/config/settings-registry.js.map +1 -1
- package/dist/coordination/reactor.d.ts.map +1 -1
- package/dist/coordination/reactor.js +15 -0
- package/dist/coordination/reactor.js.map +1 -1
- package/dist/delivery/convergence-loop.d.ts +7 -1
- package/dist/delivery/convergence-loop.d.ts.map +1 -1
- package/dist/delivery/convergence-loop.js +32 -4
- package/dist/delivery/convergence-loop.js.map +1 -1
- package/dist/delivery/judge.d.ts.map +1 -1
- package/dist/delivery/judge.js +6 -0
- package/dist/delivery/judge.js.map +1 -1
- package/dist/delivery/task-orchestrator.d.ts.map +1 -1
- package/dist/delivery/task-orchestrator.js +8 -1
- package/dist/delivery/task-orchestrator.js.map +1 -1
- package/dist/principles/config.d.ts +10 -0
- package/dist/principles/config.d.ts.map +1 -0
- package/dist/principles/config.js +32 -0
- package/dist/principles/config.js.map +1 -0
- package/dist/principles/index.d.ts +16 -0
- package/dist/principles/index.d.ts.map +1 -0
- package/dist/principles/index.js +34 -0
- package/dist/principles/index.js.map +1 -0
- package/dist/principles/reactor-inject.d.ts +12 -0
- package/dist/principles/reactor-inject.d.ts.map +1 -0
- package/dist/principles/reactor-inject.js +69 -0
- package/dist/principles/reactor-inject.js.map +1 -0
- package/dist/principles/render.d.ts +14 -0
- package/dist/principles/render.d.ts.map +1 -0
- package/dist/principles/render.js +64 -0
- package/dist/principles/render.js.map +1 -0
- package/dist/principles/rules.d.ts +53 -0
- package/dist/principles/rules.d.ts.map +1 -0
- package/dist/principles/rules.js +101 -0
- package/dist/principles/rules.js.map +1 -0
- package/dist/principles/stance.d.ts +54 -0
- package/dist/principles/stance.d.ts.map +1 -0
- package/dist/principles/stance.js +154 -0
- package/dist/principles/stance.js.map +1 -0
- package/dist/types/config.d.ts +46 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +17 -0
- package/dist/types/config.js.map +1 -1
- package/docs/reference/CONFIGURATION_REFERENCE.md +221 -0
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/src/policies/schemas/policies/engineering-principles.md +93 -0
- package/templates/hooks/__pycache__/deliver_autoroute.cpython-312.pyc +0 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# engineering-principles
|
|
2
|
+
|
|
3
|
+
**Category**: quality
|
|
4
|
+
**Level**: RECOMMENDED
|
|
5
|
+
**Enforcement Stage**: pre-exec
|
|
6
|
+
**Tags**: quality, simplicity, architecture, dependencies, prior-art
|
|
7
|
+
|
|
8
|
+
## Rule
|
|
9
|
+
|
|
10
|
+
Write code to these principles. Rules 2-8 always apply. Rule 1 depends on a
|
|
11
|
+
stance resolved per project per session — run `uap principles show` to see the
|
|
12
|
+
form in force, and `uap principles ask` to answer it.
|
|
13
|
+
|
|
14
|
+
1. **Backward compatibility — stance-dependent.**
|
|
15
|
+
- `remove`: delete obsolete paths instead of adding compatibility layers,
|
|
16
|
+
fallbacks, or migrations.
|
|
17
|
+
- `preserve`: keep existing paths working and migrate callers before
|
|
18
|
+
removing anything.
|
|
19
|
+
|
|
20
|
+
Under `remove`, these surfaces are still preserved and migrated, never
|
|
21
|
+
deleted, because their callers are not yours to update:
|
|
22
|
+
- the public CLI surface — command names, flags, and their output contracts
|
|
23
|
+
- MCP tool names and input schemas
|
|
24
|
+
- database, config, and on-disk state schemas, including their migrations
|
|
25
|
+
- exported types and public module entry points
|
|
26
|
+
|
|
27
|
+
2. **Choose the simplest implementation that fully meets the current
|
|
28
|
+
requirements.** Avoid speculative abstractions, configuration, and
|
|
29
|
+
indirection.
|
|
30
|
+
|
|
31
|
+
3. **Grow the system in layers.** Start from the smallest version that works end
|
|
32
|
+
to end, and add each new capability on top of a product that already works.
|
|
33
|
+
Never trade a working product for unfinished complexity.
|
|
34
|
+
|
|
35
|
+
4. **Keep components modular and concerns clearly separated.**
|
|
36
|
+
|
|
37
|
+
5. **Prefer established, well-maintained libraries** when they reduce overall
|
|
38
|
+
complexity or improve reliability. Do not reimplement common functionality
|
|
39
|
+
without a clear reason.
|
|
40
|
+
|
|
41
|
+
6. **Lean on the dependencies already in the project** before writing your own
|
|
42
|
+
implementation or adding packages. Do not assume a library lacks a capability
|
|
43
|
+
without checking its documentation and types.
|
|
44
|
+
|
|
45
|
+
7. **Make architectural decisions for the long term.** Do not accept a stopgap
|
|
46
|
+
that only works for now and is meant to be replaced later.
|
|
47
|
+
|
|
48
|
+
8. **Study how established products solve the problem before designing a
|
|
49
|
+
solution.** Adopt their proven patterns and conventions rather than inventing
|
|
50
|
+
an approach from scratch.
|
|
51
|
+
|
|
52
|
+
## Why
|
|
53
|
+
|
|
54
|
+
Adapted from an AGENTS.md distilled from roughly 60B tokens of agent-driven
|
|
55
|
+
coding (x.com/MarcosHernanz/status/2083954734487212511). Its author scopes it to
|
|
56
|
+
side projects — "don't use it in production if you don't want to destroy your
|
|
57
|
+
codebase" — and rule 1 is why: deleting obsolete paths is right when you own
|
|
58
|
+
every caller and destructive when you do not. Rather than adopt or drop rule 1
|
|
59
|
+
wholesale, UAP resolves it per project per session and carves out the surfaces
|
|
60
|
+
other people are bound to.
|
|
61
|
+
|
|
62
|
+
The remaining rules are direction-of-travel guidance, not gates. They are
|
|
63
|
+
RECOMMENDED because a machine cannot tell a speculative abstraction from a
|
|
64
|
+
necessary one, and a blocking check that guesses would cost more than it saves.
|
|
65
|
+
|
|
66
|
+
## Enforcement
|
|
67
|
+
|
|
68
|
+
Advisory. There is no Python enforcer: these are judgment calls, and blocking
|
|
69
|
+
gates in this repo have repeatedly cost more in false positives than they
|
|
70
|
+
prevented. The principles reach the model three other ways:
|
|
71
|
+
|
|
72
|
+
- **Deliver prompts** — the compact form is injected into every convergence-loop
|
|
73
|
+
and orchestrated task prompt, so generated code is held to them rather than
|
|
74
|
+
only the agent's preamble.
|
|
75
|
+
- **Reactor** — while the rule-1 stance is unresolved, the agent is told to ask
|
|
76
|
+
the user once; after that it stays silent.
|
|
77
|
+
- **Judge** — competing candidates are scored on reuse-over-reimplementation and
|
|
78
|
+
absence of stopgaps.
|
|
79
|
+
|
|
80
|
+
Related: pattern P38 (Prior Art First) covers rules 5, 6 and 8 at plan time; the
|
|
81
|
+
`/simplify` and `distill` skills cover rule 2 on existing code.
|
|
82
|
+
|
|
83
|
+
```rules
|
|
84
|
+
- title: "Simplest implementation that meets the requirement"
|
|
85
|
+
keywords: [implement, refactor, design, abstraction, config, indirection]
|
|
86
|
+
antiPatterns: [speculative-abstraction, premature-config, needless-indirection]
|
|
87
|
+
- title: "Reuse before reimplementation"
|
|
88
|
+
keywords: [library, dependency, package, util, helper, from scratch]
|
|
89
|
+
antiPatterns: [reimplemented-common-functionality, unchecked-library-capability]
|
|
90
|
+
- title: "No stopgaps"
|
|
91
|
+
keywords: [temporary, for now, placeholder, replace later, quick fix]
|
|
92
|
+
antiPatterns: [stopgap-architecture, deferred-rewrite]
|
|
93
|
+
```
|
|
Binary file
|