@miller-tech/uap 1.28.0 → 1.30.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.
@@ -0,0 +1,252 @@
1
+ /**
2
+ * Practice Store (Phase 4)
3
+ *
4
+ * Best-practice "cards" learned from past deliveries and injected into future
5
+ * prompts for similar tasks. A card records guidance distilled from a
6
+ * *successful* run — the winning strategy seed and how many turns it took —
7
+ * keyed by task keywords.
8
+ *
9
+ * Provenance matters: cards are derived from the harness's own strategy seeds
10
+ * and gate outcomes, never from raw model output. This keeps the long-term
11
+ * store free of model-authored text (a stored-prompt-injection vector).
12
+ */
13
+ import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'fs';
14
+ import { dirname, join } from 'path';
15
+ /** Strategy ids are harness-owned seed labels; this guards the template
16
+ * against injection if a tampered store supplies an arbitrary string. */
17
+ const STRATEGY_RE = /^[a-z][a-z0-9-]{0,31}$/;
18
+ const STOP_WORDS = new Set([
19
+ 'the', 'a', 'an', 'to', 'of', 'and', 'or', 'in', 'on', 'for', 'with', 'that',
20
+ 'returns', 'return', 'create', 'add', 'make', 'write', 'into', 'from', 'as',
21
+ 'is', 'it', 'be', 'should', 'when', 'this', 'each', 'two', 'using',
22
+ ]);
23
+ /** Extract lowercased keyword tokens from a task instruction. */
24
+ export function extractKeywords(text, max = 12) {
25
+ const seen = new Set();
26
+ const tokens = [];
27
+ for (const raw of text.toLowerCase().split(/[^a-z0-9]+/)) {
28
+ if (raw.length < 3 || STOP_WORDS.has(raw) || seen.has(raw))
29
+ continue;
30
+ seen.add(raw);
31
+ tokens.push(raw);
32
+ if (tokens.length >= max)
33
+ break;
34
+ }
35
+ return tokens;
36
+ }
37
+ /** Jaccard-ish overlap: shared keywords / query keywords. */
38
+ function relevance(card, queryKeywords) {
39
+ if (queryKeywords.length === 0)
40
+ return 0;
41
+ const cardSet = new Set(card.keywords);
42
+ const shared = queryKeywords.filter((k) => cardSet.has(k)).length;
43
+ return shared / queryKeywords.length;
44
+ }
45
+ const MIN_RELEVANCE = 0.25;
46
+ /** Default cosine-similarity floor for a semantic match to count. */
47
+ const MIN_SIMILARITY = 0.45;
48
+ /**
49
+ * Text used to represent a card for embedding. Built only from the card's
50
+ * keywords (which derive from the user instruction), never from model output
51
+ * — the semantic path preserves the same provenance guarantee as keyword
52
+ * retrieval.
53
+ */
54
+ function cardEmbeddingText(card) {
55
+ return card.keywords.join(' ');
56
+ }
57
+ /**
58
+ * Retrieve practices by semantic similarity to the instruction, ranked by
59
+ * cosine distance then reinforcement (success count, fewest turns). This
60
+ * catches near-misses that keyword overlap drops — "parse a duration" vs
61
+ * "parse durations into seconds".
62
+ *
63
+ * Fail-soft and degenerate-safe: if the embedding provider is unavailable,
64
+ * throws, or yields no match above the similarity floor, it falls back to the
65
+ * synchronous keyword retrieval so practices are never silently disabled.
66
+ */
67
+ export async function retrievePracticesSemantic(store, instruction, retriever, options = {}) {
68
+ const limit = options.limit ?? 3;
69
+ const minSim = options.minSimilarity ?? MIN_SIMILARITY;
70
+ const cards = store.all();
71
+ if (cards.length === 0)
72
+ return [];
73
+ try {
74
+ const queryVec = await retriever.embed(instruction.toLowerCase());
75
+ if (!Array.isArray(queryVec) || queryVec.length === 0) {
76
+ return store.retrieve(instruction, limit);
77
+ }
78
+ // Isolate per-card failures: a single card whose embedding errors or
79
+ // whose vector dimension mismatches the query (cosineSimilarity throws)
80
+ // must not collapse the whole batch into keyword fallback. A failed card
81
+ // simply scores -1 and drops out below the floor.
82
+ const scored = await Promise.all(cards.map(async (card) => {
83
+ try {
84
+ const vec = await retriever.embed(cardEmbeddingText(card));
85
+ const sim = retriever.cosineSimilarity(queryVec, vec);
86
+ return { card, sim: Number.isFinite(sim) ? sim : -1 };
87
+ }
88
+ catch {
89
+ return { card, sim: -1 };
90
+ }
91
+ }));
92
+ const hits = scored
93
+ .filter((s) => s.sim >= minSim)
94
+ .sort((a, b) => {
95
+ if (b.sim !== a.sim)
96
+ return b.sim - a.sim;
97
+ if (b.card.successCount !== a.card.successCount)
98
+ return b.card.successCount - a.card.successCount;
99
+ return a.card.bestTurns - b.card.bestTurns;
100
+ })
101
+ .slice(0, limit)
102
+ .map((s) => s.card);
103
+ // Degenerate provider (e.g. unfitted TF-IDF) or genuinely no relevant
104
+ // card — fall back to keyword overlap rather than inject nothing.
105
+ return hits.length > 0 ? hits : store.retrieve(instruction, limit);
106
+ }
107
+ catch {
108
+ return store.retrieve(instruction, limit);
109
+ }
110
+ }
111
+ /** In-memory store — the base implementation; the file store persists it. */
112
+ export class InMemoryPracticeStore {
113
+ cards;
114
+ constructor(cards = []) {
115
+ this.cards = cards;
116
+ }
117
+ retrieve(instruction, limit = 3) {
118
+ const keywords = extractKeywords(instruction);
119
+ return this.cards
120
+ .map((card) => ({ card, score: relevance(card, keywords) }))
121
+ .filter(({ score }) => score >= MIN_RELEVANCE)
122
+ .sort((a, b) => {
123
+ if (b.score !== a.score)
124
+ return b.score - a.score;
125
+ if (b.card.successCount !== a.card.successCount)
126
+ return b.card.successCount - a.card.successCount;
127
+ return a.card.bestTurns - b.card.bestTurns;
128
+ })
129
+ .slice(0, limit)
130
+ .map(({ card }) => card);
131
+ }
132
+ record(input) {
133
+ const strategy = STRATEGY_RE.test(input.strategy) ? input.strategy : 'direct';
134
+ // Dedup on strategy, not rendered guidance (which varies by turn count).
135
+ const existing = this.cards.find((c) => c.strategy === strategy);
136
+ if (existing) {
137
+ existing.successCount += 1;
138
+ existing.bestTurns = Math.min(existing.bestTurns, input.turns);
139
+ existing.keywords = [...new Set([...existing.keywords, ...input.keywords])];
140
+ existing.guidance = distillPractice(strategy, existing.bestTurns);
141
+ return;
142
+ }
143
+ this.cards.push({
144
+ id: this.nextId(),
145
+ strategy,
146
+ keywords: input.keywords,
147
+ guidance: distillPractice(strategy, input.turns),
148
+ successCount: 1,
149
+ bestTurns: input.turns,
150
+ });
151
+ }
152
+ /** Smallest unused pN id — robust to merges and dropped (corrupt) cards. */
153
+ nextId() {
154
+ const used = new Set(this.cards.map((c) => c.id));
155
+ for (let i = 1;; i++) {
156
+ const id = `p${i}`;
157
+ if (!used.has(id))
158
+ return id;
159
+ }
160
+ }
161
+ all() {
162
+ // Copy so callers can't mutate the store's internal array (matches the
163
+ // fresh-array convention of retrieve()).
164
+ return [...this.cards];
165
+ }
166
+ }
167
+ /** File-backed practice store (JSON). Self-heals on missing/corrupt files. */
168
+ export class FilePracticeStore extends InMemoryPracticeStore {
169
+ path;
170
+ constructor(path) {
171
+ super(FilePracticeStore.load(path));
172
+ this.path = path;
173
+ }
174
+ /**
175
+ * Load cards from disk, validating every field. The on-disk file is NOT
176
+ * trusted to supply guidance text — guidance is regenerated from the
177
+ * validated strategy + bestTurns via distillPractice, so a tampered file
178
+ * cannot inject prompt text (the read path enforces the same provenance
179
+ * the write path guarantees). Structurally-invalid cards are dropped.
180
+ */
181
+ static load(path) {
182
+ if (!existsSync(path))
183
+ return [];
184
+ let parsed;
185
+ try {
186
+ parsed = JSON.parse(readFileSync(path, 'utf-8'));
187
+ }
188
+ catch {
189
+ return [];
190
+ }
191
+ if (!Array.isArray(parsed))
192
+ return [];
193
+ const cards = [];
194
+ for (const raw of parsed) {
195
+ if (typeof raw !== 'object' || raw === null)
196
+ continue;
197
+ const c = raw;
198
+ if (typeof c.strategy !== 'string' || !STRATEGY_RE.test(c.strategy))
199
+ continue;
200
+ if (!Array.isArray(c.keywords) || !c.keywords.every((k) => typeof k === 'string'))
201
+ continue;
202
+ const successCount = Number(c.successCount);
203
+ const bestTurns = Number(c.bestTurns);
204
+ if (!Number.isFinite(successCount) || successCount < 1)
205
+ continue;
206
+ if (!Number.isFinite(bestTurns) || bestTurns < 1)
207
+ continue;
208
+ cards.push({
209
+ id: typeof c.id === 'string' ? c.id : `p${cards.length + 1}`,
210
+ strategy: c.strategy,
211
+ keywords: c.keywords,
212
+ guidance: distillPractice(c.strategy, bestTurns), // regenerated, never trusted from disk
213
+ successCount: Math.floor(successCount),
214
+ bestTurns: Math.floor(bestTurns),
215
+ });
216
+ }
217
+ return cards;
218
+ }
219
+ record(input) {
220
+ super.record(input);
221
+ this.persist();
222
+ }
223
+ persist() {
224
+ try {
225
+ mkdirSync(dirname(this.path), { recursive: true });
226
+ // Atomic write: temp file + rename, so a crash mid-write cannot corrupt
227
+ // the store and we never follow a pre-planted symlink at the final path.
228
+ const tmp = `${this.path}.tmp`;
229
+ writeFileSync(tmp, JSON.stringify(this.all(), null, 2), 'utf-8');
230
+ renameSync(tmp, this.path);
231
+ }
232
+ catch {
233
+ // Persistence is best-effort; in-memory state remains valid
234
+ }
235
+ }
236
+ }
237
+ /** Default on-disk location for a project's learned practices. */
238
+ export function defaultPracticePath(projectRoot) {
239
+ return join(projectRoot, '.uap', 'delivery-practices.json');
240
+ }
241
+ /**
242
+ * Distill a one-line practice from a successful delivery. Provenance-safe:
243
+ * built only from the winning strategy and turn count, not model output.
244
+ */
245
+ export function distillPractice(winningStrategy, turns) {
246
+ const strategy = winningStrategy ?? 'direct';
247
+ if (turns === 1) {
248
+ return `A '${strategy}' approach solved a similar task on the first attempt — lead with it.`;
249
+ }
250
+ return `A '${strategy}' approach converged on a similar task in ${turns} turns — prefer it and verify against the gates early.`;
251
+ }
252
+ //# sourceMappingURL=practice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"practice.js","sourceRoot":"","sources":["../../src/delivery/practice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AA2CrC;yEACyE;AACzE,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAE7C,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EA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,yEAAyE;YACzE,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,MAAM,CAAC;YAC/B,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACjE,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,4DAA4D;QAC9D,CAAC;IACH,CAAC;CACF;AAED,kEAAkE;AAClE,MAAM,UAAU,mBAAmB,CAAC,WAAmB;IACrD,OAAO,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,eAAmC,EAAE,KAAa;IAChF,MAAM,QAAQ,GAAG,eAAe,IAAI,QAAQ,CAAC;IAC7C,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,OAAO,MAAM,QAAQ,uEAAuE,CAAC;IAC/F,CAAC;IACD,OAAO,MAAM,QAAQ,6CAA6C,KAAK,wDAAwD,CAAC;AAClI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miller-tech/uap",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",