@owlmeans/viable-common 0.0.35 → 0.0.37

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.
@@ -1,286 +0,0 @@
1
- import { SubProject } from '../slot/consts.js';
2
- import { ViableSkill } from '../skills/consts.js';
3
- import { ViablePersona } from '../skills/roles.js';
4
- import { aiLibraryList, gameLibraryList } from '../skills/catalogue.js';
5
- import { LandingGatePreference } from './types.js';
6
- /**
7
- * WHICH KIND of product is being built on a blueprint.
8
- *
9
- * A blueprint says what the STACK is — the language, the framework, the topology, the seeds. A
10
- * case says what is being built ON it, and that is a different question with different consumers:
11
- * the analyst framing the brief, the architect deciding whether a story needs a queue, the coder
12
- * choosing which packages it may import.
13
- *
14
- * Deliberately NOT a second blueprint. Everything a case has to say is already a blueprint field,
15
- * so a case is a PATCH and the resolution order stays base → case → per-run overrides. That is
16
- * also why adding one is a data change: nothing reads `BlueprintCase` except the table below and
17
- * the prompt that classifies a project into it.
18
- */
19
- export var BlueprintCase;
20
- (function (BlueprintCase) {
21
- /** A web application whose every feature fits inside a request. No queue, no worker, no agents. */
22
- BlueprintCase["Web"] = "web";
23
- /** A web application with work that genuinely belongs off the request path. */
24
- BlueprintCase["Scalable"] = "scalable";
25
- /** The product's value comes from ordered, deterministic model-driven steps. */
26
- BlueprintCase["AiPipeline"] = "ai-pipeline";
27
- /** The product's value comes from an agent that decides its own path through tools. */
28
- BlueprintCase["AiAgent"] = "ai-agent";
29
- /** A browser game: a three.js scene with an ordinary React interface over it. */
30
- BlueprintCase["Game"] = "game";
31
- })(BlueprintCase || (BlueprintCase = {}));
32
- /**
33
- * How a game is played, which decides who owns its state.
34
- *
35
- * Recorded beside the case rather than folded into it, because it changes nothing about the
36
- * dependencies and everything about where the logic goes. `OnlineTurn` is the default for
37
- * anything multiplayer unless the brief plainly asks for live play — it is the shape that
38
- * actually builds, and it needs no socket, no tick loop and no reconciliation.
39
- */
40
- export var GameKind;
41
- (function (GameKind) {
42
- GameKind["Casual"] = "casual";
43
- GameKind["OnlineTurn"] = "online-turn";
44
- GameKind["OnlineLive"] = "online-live";
45
- })(GameKind || (GameKind = {}));
46
- /** What every AI case installs. The langchain peers are declared here, at ONE range. */
47
- const AI_DEPS = {
48
- [SubProject.Backend]: {
49
- '@owlmeans/llm': '^0.1.18-rc.37',
50
- '@owlmeans/agent': '^0.1.18-rc.38',
51
- '@langchain/core': '^1.2.9',
52
- '@langchain/anthropic': '^1.5.8',
53
- '@langchain/openai': '^1.5.10',
54
- '@langchain/langgraph': '^1.4.13',
55
- '@langchain/langgraph-checkpoint': '^1.1.5',
56
- },
57
- };
58
- /** The library allow-list a backend persona gets once the AI packages are installed. */
59
- const AI_LIBRARIES = {
60
- [SubProject.Backend]: aiLibraryList,
61
- [SubProject.Api]: aiLibraryList,
62
- [SubProject.Worker]: aiLibraryList,
63
- };
64
- /** Skills every AI case adds on top of the blueprint's own. */
65
- const AI_SKILLS = [
66
- ViableSkill.AgenticChoice,
67
- ViableSkill.TargetLlm,
68
- ViableSkill.LibrariesAi,
69
- ];
70
- /**
71
- * What the API side is told once a project may have a queue.
72
- *
73
- * The endpoint that starts slow work is the PRODUCER, and it is generated by a persona that
74
- * otherwise has no reason to know a broker exists. Its job alias is declared before it runs
75
- * (`runtime-declare`), so by the time this coder writes the handler there is something to enqueue
76
- * onto — and this is what tells it to, instead of doing the work inline behind a request the user
77
- * is waiting on.
78
- */
79
- const PRODUCER_PERSONA_SKILLS = {
80
- [ViablePersona.ApiArchitect]: [ViableSkill.QueueDiscipline, ViableSkill.WorkerJobs],
81
- [ViablePersona.ApiCoder]: [ViableSkill.WorkerJobs],
82
- };
83
- /**
84
- * What the analysis stage is told about a product whose value is a model.
85
- *
86
- * The pairing rule is the load-bearing one: an agent holds no permissions and owns no screen, so
87
- * a story that is the AGENT's work is invisible unless a human story starts it and watches it.
88
- */
89
- const AI_PERSONA_SKILLS = {
90
- ...PRODUCER_PERSONA_SKILLS,
91
- [ViablePersona.BusinessAnalyst]: [ViableSkill.AgenticChoice],
92
- [ViablePersona.UxDesigner]: [ViableSkill.AgenticChoice],
93
- [ViablePersona.RuntimeArchitect]: [ViableSkill.AgenticChoice, ViableSkill.TargetLlm],
94
- [ViablePersona.WorkerCoder]: [
95
- ViableSkill.AgenticChoice, ViableSkill.TargetLlm, ViableSkill.LibrariesAi,
96
- ],
97
- };
98
- /**
99
- * Join persona-skill maps, UNIONING a persona two maps both name.
100
- *
101
- * An object spread would keep only the last map's list for that persona — `BusinessAnalyst`
102
- * carries `AgenticChoice` in an AI case and `LandingGate` from the gate map, and a spread would
103
- * silently drop whichever came first.
104
- */
105
- const joinPersonaSkills = (...maps) => {
106
- const out = {};
107
- for (const map of maps) {
108
- for (const [persona, skills] of Object.entries(map)) {
109
- const key = persona;
110
- out[key] = [...new Set([...(out[key] ?? []), ...(skills ?? [])])];
111
- }
112
- }
113
- return out;
114
- };
115
- /**
116
- * Who has to know the landing-gate pattern in a case that encourages one.
117
- *
118
- * The analyst decides whether a story is gate-worthy and plans the gate's copy; the UX designer
119
- * shapes the full-scale screen that continues what the guest started; the frontend personas draw
120
- * the gate, write the handoff and read it back. Nobody else touches it.
121
- */
122
- const LANDING_GATE_PERSONA_SKILLS = {
123
- [ViablePersona.BusinessAnalyst]: [ViableSkill.LandingGate],
124
- [ViablePersona.UxDesigner]: [ViableSkill.LandingGate],
125
- [ViablePersona.LayoutArchitect]: [ViableSkill.LandingGate],
126
- [ViablePersona.ComponentArchitect]: [ViableSkill.LandingGate],
127
- [ViablePersona.UiViewCoder]: [ViableSkill.LandingGate],
128
- [ViablePersona.UiNavCoder]: [ViableSkill.LandingGate],
129
- };
130
- /** The experience layer of a case whose product usually has a step a guest can begin. */
131
- const ENCOURAGE_GATE = { landingGate: LandingGatePreference.Encourage };
132
- const GAME_PERSONA_SKILLS = {
133
- [ViablePersona.BusinessAnalyst]: [ViableSkill.GameDesign],
134
- [ViablePersona.UxDesigner]: [ViableSkill.GameDesign, ViableSkill.GameUi],
135
- [ViablePersona.VisualDesigner]: [ViableSkill.GameUi],
136
- [ViablePersona.ComponentArchitect]: [ViableSkill.GameScene, ViableSkill.GameUi],
137
- [ViablePersona.LayoutArchitect]: [ViableSkill.GameScene, ViableSkill.GameUi],
138
- [ViablePersona.UiViewCoder]: [
139
- ViableSkill.GameScene, ViableSkill.GameUi, ViableSkill.LibrariesGame,
140
- ],
141
- [ViablePersona.RuntimeArchitect]: [ViableSkill.GameNetworking],
142
- [ViablePersona.WorkerCoder]: [ViableSkill.GameNetworking],
143
- [ViablePersona.ApiArchitect]: [ViableSkill.GameNetworking],
144
- [ViablePersona.ApiCoder]: [ViableSkill.GameNetworking],
145
- };
146
- /**
147
- * The cases the platform ships.
148
- *
149
- * Read as a table: the left column is what a prompt has to look like, the right column is what
150
- * that costs the generated application. Nothing here turns a capability on without also
151
- * installing what makes it real — a blueprint that promises `agents` over a manifest with no
152
- * `@owlmeans/agent` in it produces a story that reports success and a library that will not
153
- * compile.
154
- */
155
- export const BLUEPRINT_CASES = {
156
- [BlueprintCase.Web]: {
157
- id: BlueprintCase.Web,
158
- title: 'Web application',
159
- when: `
160
- Everything the product does fits inside a request: forms, lists, records, search, reports a
161
- person waits a second for. Nothing has to survive the tab closing, nothing calls a slow third
162
- party, nothing walks an unbounded set, nothing is scheduled. Most products are this.
163
- `.trim(),
164
- patch: {
165
- packages: {
166
- capabilities: { postgres: true, kv: false, queue: false, worker: false, agents: false, validation: true, marketingConsent: true },
167
- personaSkills: LANDING_GATE_PERSONA_SKILLS,
168
- },
169
- experience: ENCOURAGE_GATE,
170
- },
171
- },
172
- [BlueprintCase.Scalable]: {
173
- id: BlueprintCase.Scalable,
174
- title: 'Web application with background work',
175
- when: `
176
- Like a web application, except that some named part of it genuinely cannot run inside a request:
177
- it walks every row a user owns, talks to a slow or rate-limited third party, is scheduled or
178
- repeated, must survive the tab closing, or must be retried without the user doing anything.
179
- Choose this only when you can NAME that part; "it might get slow" is not it.
180
-
181
- NOT this when the slow part is a MODEL. Background work whose content comes out of a language
182
- model is one of the two AI kinds below, and choosing this one for it leaves the application unable
183
- to call a model at all.
184
- `.trim(),
185
- patch: {
186
- packages: {
187
- capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: false, validation: true, marketingConsent: true },
188
- personaSkills: PRODUCER_PERSONA_SKILLS,
189
- },
190
- // Neutral: the named off-request part is usually operator-side work, and whether a guest
191
- // can begin anything is the specification's to say.
192
- experience: { landingGate: LandingGatePreference.Allow },
193
- },
194
- },
195
- [BlueprintCase.AiPipeline]: {
196
- id: BlueprintCase.AiPipeline,
197
- title: 'AI pipeline',
198
- when: `
199
- The product's value comes from a language model, and the work it does is a KNOWN sequence:
200
- transcribe then summarise then file; extract then validate then store; draft then check then send.
201
- You can name the steps before it runs. The application decides the order; the model performs each
202
- step.
203
-
204
- Any product whose OUTPUT is written by a model is this kind or the one below — never a plain web
205
- application, and never merely a scalable one.
206
- `.trim(),
207
- patch: {
208
- packages: {
209
- capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: true, validation: true, marketingConsent: true },
210
- deps: AI_DEPS,
211
- libraries: AI_LIBRARIES,
212
- skills: AI_SKILLS,
213
- personaSkills: joinPersonaSkills(AI_PERSONA_SKILLS, LANDING_GATE_PERSONA_SKILLS),
214
- },
215
- experience: ENCOURAGE_GATE,
216
- },
217
- },
218
- [BlueprintCase.AiAgent]: {
219
- id: BlueprintCase.AiAgent,
220
- title: 'AI agent',
221
- when: `
222
- The product's value comes from a model that decides its own path: how many steps the work takes
223
- cannot be predicted, and which tool to reach for next is a judgement rather than a rule anyone
224
- could write down. Choose this over an AI pipeline only when the order genuinely cannot be fixed
225
- in advance.
226
- `.trim(),
227
- patch: {
228
- packages: {
229
- capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: true, validation: true, marketingConsent: true },
230
- deps: {
231
- [SubProject.Backend]: {
232
- ...AI_DEPS[SubProject.Backend],
233
- '@owlmeans/agent-skills': '^0.1.18-rc.38',
234
- },
235
- },
236
- libraries: AI_LIBRARIES,
237
- skills: [...AI_SKILLS, ViableSkill.TargetAgentTools],
238
- personaSkills: joinPersonaSkills(AI_PERSONA_SKILLS, LANDING_GATE_PERSONA_SKILLS, {
239
- [ViablePersona.WorkerCoder]: [ViableSkill.TargetAgentTools],
240
- }),
241
- },
242
- experience: ENCOURAGE_GATE,
243
- },
244
- },
245
- [BlueprintCase.Game]: {
246
- id: BlueprintCase.Game,
247
- title: 'Browser game',
248
- when: `
249
- The person asked for a GAME, in those words or unmistakably — something played rather than used,
250
- with a loop, a score or a win condition. Never infer this from "gamified", "playful", "fun" or a
251
- leaderboard attached to an ordinary product. If the prompt does not plainly ask for a game, this
252
- is not it.
253
- `.trim(),
254
- patch: {
255
- packages: {
256
- capabilities: { postgres: true, kv: true, queue: true, worker: true, agents: false, validation: true, marketingConsent: true },
257
- deps: {
258
- [SubProject.Web]: { three: '^0.186.0', '@types/three': '^0.185.4' },
259
- },
260
- libraries: { [SubProject.Web]: gameLibraryList, 'ui-state': gameLibraryList },
261
- skills: [ViableSkill.GameScene, ViableSkill.GameUi, ViableSkill.LibrariesGame],
262
- personaSkills: { ...PRODUCER_PERSONA_SKILLS, ...GAME_PERSONA_SKILLS },
263
- },
264
- // A game's first value is PLAYING it, and the play screen is its own front door — a
265
- // pick-and-preview card on a landing page is the wrong shape for it.
266
- experience: { landingGate: LandingGatePreference.Discourage },
267
- },
268
- },
269
- };
270
- /**
271
- * The case a reference names, or `undefined`.
272
- *
273
- * Total over anything: an unknown name, a name from a deploy this one does not have, and an
274
- * absent one all read the same way — no patch, which is the base blueprint. That is the only
275
- * answer that cannot take a capability away from a project that already has it.
276
- */
277
- export const blueprintCaseOf = (name) => name == null ? undefined : BLUEPRINT_CASES[name];
278
- /** Every case the platform ships, in the order a classifier should weigh them. */
279
- export const BLUEPRINT_CASE_ORDER = [
280
- BlueprintCase.Web,
281
- BlueprintCase.Scalable,
282
- BlueprintCase.AiPipeline,
283
- BlueprintCase.AiAgent,
284
- BlueprintCase.Game,
285
- ];
286
- //# sourceMappingURL=case.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"case.js","sourceRoot":"","sources":["../../src/blueprint/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAGlD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,aAWX;AAXD,WAAY,aAAa;IACvB,mGAAmG;IACnG,4BAAW,CAAA;IACX,+EAA+E;IAC/E,sCAAqB,CAAA;IACrB,gFAAgF;IAChF,2CAA0B,CAAA;IAC1B,uFAAuF;IACvF,qCAAoB,CAAA;IACpB,iFAAiF;IACjF,8BAAa,CAAA;AACf,CAAC,EAXW,aAAa,KAAb,aAAa,QAWxB;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,sCAA0B,CAAA;IAC1B,sCAA0B,CAAA;AAC5B,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAgBD,wFAAwF;AACxF,MAAM,OAAO,GAAG;IACd,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QACpB,eAAe,EAAE,eAAe;QAChC,iBAAiB,EAAE,eAAe;QAClC,iBAAiB,EAAE,QAAQ;QAC3B,sBAAsB,EAAE,QAAQ;QAChC,mBAAmB,EAAE,SAAS;QAC9B,sBAAsB,EAAE,SAAS;QACjC,iCAAiC,EAAE,QAAQ;KAC5C;CACF,CAAA;AAED,wFAAwF;AACxF,MAAM,YAAY,GAAG;IACnB,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,aAAa;IACnC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,UAAU,EAAE,EAAE,WAAW,EAAE,qBAAqB,CAAC,UAAU,EAAE;SAC9D;KACF;CACF,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAa,EAAuC,EAAE,CACpF,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,eAA2D,CAAC,IAAI,CAAC,CAAA;AAE/F,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAoB;IACnD,aAAa,CAAC,GAAG;IACjB,aAAa,CAAC,QAAQ;IACtB,aAAa,CAAC,UAAU;IACxB,aAAa,CAAC,OAAO;IACrB,aAAa,CAAC,IAAI;CACnB,CAAA"}
@@ -1,51 +0,0 @@
1
- import type { ViablePersona } from '../skills/roles.js';
2
- import type { ViableSkill } from '../skills/consts.js';
3
- import type { Blueprint, BlueprintPatch } from './types.js';
4
- /**
5
- * Merge one layer's override over a resolved value.
6
- *
7
- * Objects merge key by key; ARRAYS REPLACE. That asymmetry is deliberate and is the difference
8
- * between an override and an addition: a blueprint that narrows a library allow-list to three
9
- * entries means those three, and a concatenating merge would hand the coder back the very imports
10
- * the override existed to forbid. A layer that wants to add spreads the base itself.
11
- */
12
- export declare const mergeBlueprintValue: <T>(base: T, patch: unknown) => T;
13
- /**
14
- * Apply an override patch to a blueprint, layer by layer.
15
- *
16
- * Frozen on the way out — shallowly at each layer, which is enough to make the accidental
17
- * `blueprint.packages.capabilities.worker = true` a visible failure rather than a change every
18
- * later helper silently inherits.
19
- */
20
- export declare const applyBlueprintPatch: (base: Blueprint, patch?: BlueprintPatch) => Blueprint;
21
- export declare const freezeBlueprint: (blueprint: Blueprint) => Blueprint;
22
- /** Every skill the blueprint asks for, stack first, deduped, order preserved. */
23
- export declare const blueprintSkills: (blueprint: Blueprint) => Blueprint['stack']['skills'];
24
- /**
25
- * Apply a CASE to a blueprint — which kind of product is being built on this stack.
26
- *
27
- * A case is an ordinary {@link BlueprintPatch} and follows every rule an override does, with two
28
- * deliberate exceptions: `skills` and `personaSkills` are UNIONED with the base rather than
29
- * replacing it.
30
- *
31
- * The asymmetry is the difference between the two things a patch can be. An override is written
32
- * by somebody looking at the resolved value and narrowing it — "these three libraries and no
33
- * others" — and a concatenating merge would hand back the very imports it existed to forbid. A
34
- * case is written once, in a table, by somebody who cannot see the blueprint it will be applied
35
- * to; it says what this KIND of product needs IN ADDITION, and replacing there would silently
36
- * drop every rule the stack itself established. A case that genuinely needs to take a skill away
37
- * does it by narrowing a capability, which is what stops the prompt being asked at all.
38
- *
39
- * Unknown, absent and unregistered case names all resolve to the blueprint unchanged. A project
40
- * records the case it was drawn with, that record outlives the deploy that knew the name, and
41
- * "built against the stack as it stands" is a far better answer than a project that cannot open.
42
- */
43
- export declare const applyBlueprintCase: (base: Blueprint, name?: string) => Blueprint;
44
- /**
45
- * The skills ONE persona gets from the blueprint, beyond its own.
46
- *
47
- * Total, and empty for every persona a blueprint says nothing about — which is every one of them
48
- * on the blueprint the platform ships. `withPersona` unions this into the policy it composes.
49
- */
50
- export declare const personaSkillsOf: (blueprint: Blueprint, persona: ViablePersona) => ViableSkill[];
51
- //# sourceMappingURL=resolve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/blueprint/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAK3D;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,QAAQ,CAAC,SAAS,OAAO,KAAG,CAWhE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,SAAU,SAAS,UAAU,cAAc,KAAG,SAQ7E,CAAA;AAED,eAAO,MAAM,eAAe,cAAe,SAAS,KAAG,SAarD,CAAA;AAEF,iFAAiF;AACjF,eAAO,MAAM,eAAe,cAAe,SAAS,KAAG,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CACT,CAAA;AAMzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,kBAAkB,SAAU,SAAS,SAAS,MAAM,KAAG,SAwBnE,CAAA;AAeD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,cACf,SAAS,WAAW,aAAa,KAC3C,WAAW,EAAuD,CAAA"}
@@ -1,111 +0,0 @@
1
- import { blueprintCaseOf } from './case.js';
2
- const isPlainObject = (value) => value != null && typeof value === 'object' && !Array.isArray(value);
3
- /**
4
- * Merge one layer's override over a resolved value.
5
- *
6
- * Objects merge key by key; ARRAYS REPLACE. That asymmetry is deliberate and is the difference
7
- * between an override and an addition: a blueprint that narrows a library allow-list to three
8
- * entries means those three, and a concatenating merge would hand the coder back the very imports
9
- * the override existed to forbid. A layer that wants to add spreads the base itself.
10
- */
11
- export const mergeBlueprintValue = (base, patch) => {
12
- if (patch === undefined)
13
- return base;
14
- if (!isPlainObject(base) || !isPlainObject(patch))
15
- return patch;
16
- const out = { ...base };
17
- for (const [key, value] of Object.entries(patch)) {
18
- if (value === undefined)
19
- continue;
20
- out[key] = mergeBlueprintValue(out[key], value);
21
- }
22
- return out;
23
- };
24
- /**
25
- * Apply an override patch to a blueprint, layer by layer.
26
- *
27
- * Frozen on the way out — shallowly at each layer, which is enough to make the accidental
28
- * `blueprint.packages.capabilities.worker = true` a visible failure rather than a change every
29
- * later helper silently inherits.
30
- */
31
- export const applyBlueprintPatch = (base, patch) => {
32
- if (patch == null)
33
- return base;
34
- const merged = mergeBlueprintValue(base, patch);
35
- return freezeBlueprint(merged);
36
- };
37
- export const freezeBlueprint = (blueprint) => Object.freeze({
38
- ...blueprint,
39
- technology: Object.freeze({ ...blueprint.technology }),
40
- stack: Object.freeze({ ...blueprint.stack }),
41
- template: Object.freeze({ ...blueprint.template }),
42
- createApp: Object.freeze({ ...blueprint.createApp }),
43
- packages: Object.freeze({
44
- ...blueprint.packages,
45
- capabilities: Object.freeze({ ...blueprint.packages.capabilities }),
46
- }),
47
- // The one optional layer: frozen when present, and never ADDED when absent, so a blueprint that
48
- // has none still compares equal to what it was before the layer existed.
49
- ...(blueprint.experience != null ? { experience: Object.freeze({ ...blueprint.experience }) } : {}),
50
- });
51
- /** Every skill the blueprint asks for, stack first, deduped, order preserved. */
52
- export const blueprintSkills = (blueprint) => [...new Set([...blueprint.stack.skills, ...blueprint.packages.skills])];
53
- const union = (base = [], extra = []) => [...new Set([...base, ...extra])];
54
- /**
55
- * Apply a CASE to a blueprint — which kind of product is being built on this stack.
56
- *
57
- * A case is an ordinary {@link BlueprintPatch} and follows every rule an override does, with two
58
- * deliberate exceptions: `skills` and `personaSkills` are UNIONED with the base rather than
59
- * replacing it.
60
- *
61
- * The asymmetry is the difference between the two things a patch can be. An override is written
62
- * by somebody looking at the resolved value and narrowing it — "these three libraries and no
63
- * others" — and a concatenating merge would hand back the very imports it existed to forbid. A
64
- * case is written once, in a table, by somebody who cannot see the blueprint it will be applied
65
- * to; it says what this KIND of product needs IN ADDITION, and replacing there would silently
66
- * drop every rule the stack itself established. A case that genuinely needs to take a skill away
67
- * does it by narrowing a capability, which is what stops the prompt being asked at all.
68
- *
69
- * Unknown, absent and unregistered case names all resolve to the blueprint unchanged. A project
70
- * records the case it was drawn with, that record outlives the deploy that knew the name, and
71
- * "built against the stack as it stands" is a far better answer than a project that cannot open.
72
- */
73
- export const applyBlueprintCase = (base, name) => {
74
- const cased = blueprintCaseOf(name);
75
- if (cased == null)
76
- return base;
77
- const merged = applyBlueprintPatch(base, cased.patch);
78
- const patch = cased.patch;
79
- const personaSkills = patch.packages?.personaSkills;
80
- const stackSkills = patch.stack?.skills;
81
- const packageSkills = patch.packages?.skills;
82
- return freezeBlueprint({
83
- ...merged,
84
- stack: { ...merged.stack, skills: union(base.stack.skills, stackSkills) },
85
- packages: {
86
- ...merged.packages,
87
- skills: union(base.packages.skills, packageSkills),
88
- ...(personaSkills != null || base.packages.personaSkills != null
89
- ? {
90
- personaSkills: mergePersonaSkills(base.packages.personaSkills, personaSkills),
91
- }
92
- : {}),
93
- },
94
- });
95
- };
96
- const mergePersonaSkills = (base, extra) => {
97
- const out = { ...base };
98
- for (const [persona, skills] of Object.entries(extra ?? {})) {
99
- const key = persona;
100
- out[key] = union(out[key], skills);
101
- }
102
- return out;
103
- };
104
- /**
105
- * The skills ONE persona gets from the blueprint, beyond its own.
106
- *
107
- * Total, and empty for every persona a blueprint says nothing about — which is every one of them
108
- * on the blueprint the platform ships. `withPersona` unions this into the policy it composes.
109
- */
110
- export const personaSkillsOf = (blueprint, persona) => blueprint.packages.personaSkills?.[persona] ?? [];
111
- //# sourceMappingURL=resolve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/blueprint/resolve.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,MAAM,aAAa,GAAG,CAAC,KAAc,EAAoC,EAAE,CACzE,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAErE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAI,IAAO,EAAE,KAAc,EAAK,EAAE;IACnE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACpC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;QAAE,OAAO,KAAU,CAAA;IAEpE,MAAM,GAAG,GAA4B,EAAE,GAAG,IAAI,EAAE,CAAA;IAChD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,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AAG,MAAM,CAAC,QAAQ;YAClB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;YAClD,GAAG,CAAC,aAAa,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,IAAI,IAAI;gBAC9D,CAAC,CAAC;oBACA,aAAa,EAAE,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;iBAC9E;gBACD,CAAC,CAAC,EAAE,CAAC;SACR;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,CACzB,IAAoD,EACpD,KAAqD,EACN,EAAE;IACjD,MAAM,GAAG,GAAkD,EAAE,GAAG,IAAI,EAAE,CAAA;IACtE,KAAK,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;QAC5D,MAAM,GAAG,GAAG,OAAwB,CAAA;QACpC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAuB,CAAC,CAAA;IACrD,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,SAAoB,EAAE,OAAsB,EAC7B,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA"}
@@ -1,41 +0,0 @@
1
- import { BlueprintCase, GameKind } from './case.js';
2
- /**
3
- * What kind of product a prompt describes.
4
- *
5
- * A schema rather than a free answer because the value is a KEY: it is written onto the project
6
- * record, resolved into a blueprint patch on every run afterwards, and decides which dependencies
7
- * the tree is staged with. A model that answered "an AI-powered agent app" in prose would leave
8
- * the caller matching strings, and a miss there is silent — the project simply builds as the
9
- * default and nobody can say why.
10
- */
11
- export interface BlueprintCaseChoice {
12
- case: BlueprintCase;
13
- /** Only meaningful for the game case; ignored everywhere else. */
14
- gameKind?: GameKind;
15
- /** One sentence, from the prompt. Recorded so a later run can disagree with it. */
16
- rationale: string;
17
- }
18
- export declare const BlueprintCaseChoiceSchema: {
19
- readonly type: 'object';
20
- readonly title: 'BlueprintCaseChoice';
21
- readonly description: 'Which kind of application the described product is';
22
- readonly properties: {
23
- readonly case: {
24
- readonly type: 'string';
25
- readonly enum: BlueprintCase[];
26
- readonly description: 'The least capable kind that can deliver what was asked for.';
27
- };
28
- readonly gameKind: {
29
- readonly type: 'string';
30
- readonly enum: GameKind[];
31
- readonly description: string;
32
- };
33
- readonly rationale: {
34
- readonly type: 'string';
35
- readonly description: 'One sentence naming what in the prompt decided it.';
36
- };
37
- };
38
- readonly required: readonly ['case', 'rationale'];
39
- readonly additionalProperties: false;
40
- };
41
- //# sourceMappingURL=schemas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/blueprint/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEnD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAA;IACnB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,yBAAyB;aACpC,IAAI,EAAE,QAAQ;aACd,KAAK,EAAE,qBAAqB;aAC5B,WAAW,EAAE,oDAAoD;aACjE,UAAU;iBACR,IAAI;qBACF,IAAI,EAAE,QAAQ;qBACd,IAAI;qBACJ,WAAW,EAAE,6DAA6D;;iBAE5E,QAAQ;qBACN,IAAI,EAAE,QAAQ;qBACd,IAAI;qBACJ,WAAW;;iBAIb,SAAS;qBACP,IAAI,EAAE,QAAQ;qBACd,WAAW,EAAE,oDAAoD;;;aAGrE,QAAQ,YAAG,MAAM,EAAE,WAAW;aAC9B,oBAAoB;CACZ,CAAA"}
@@ -1,27 +0,0 @@
1
- import { BlueprintCase, GameKind } from './case.js';
2
- export const BlueprintCaseChoiceSchema = {
3
- type: 'object',
4
- title: 'BlueprintCaseChoice',
5
- description: 'Which kind of application the described product is',
6
- properties: {
7
- case: {
8
- type: 'string',
9
- enum: Object.values(BlueprintCase),
10
- description: 'The least capable kind that can deliver what was asked for.',
11
- },
12
- gameKind: {
13
- type: 'string',
14
- enum: Object.values(GameKind),
15
- description: 'Only when the case is `game`. `casual` for one player in one browser, '
16
- + '`online-turn` for players acting one after another, `online-live` only when the brief '
17
- + 'plainly asks for players acting at the same moment.',
18
- },
19
- rationale: {
20
- type: 'string',
21
- description: 'One sentence naming what in the prompt decided it.',
22
- },
23
- },
24
- required: ['case', 'rationale'],
25
- additionalProperties: false,
26
- };
27
- //# sourceMappingURL=schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/blueprint/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAmBnD,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,oDAAoD;IACjE,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;YAClC,WAAW,EAAE,6DAA6D;SAC3E;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,wEAAwE;kBACjF,wFAAwF;kBACxF,qDAAqD;SAC1D;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oDAAoD;SAClE;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;IAC/B,oBAAoB,EAAE,KAAK;CACnB,CAAA"}
@@ -1,47 +0,0 @@
1
- import type { SkillDefinition } from '@owlmeans/llm-common';
2
- import { ViableSkill } from './consts.js';
3
- /** The one rendering of a library allow-list — an override must match it byte for byte. */
4
- export declare const renderLibraries: (list: string[]) => string;
5
- /**
6
- * What a file in the shared package imports. Deliberately just `ajv`: this list is carried by
7
- * `DomainTypesArchitect`/`AccessArchitect` too, and a domain model type file imports nothing
8
- * else. `@owlmeans/entrypoint` and `@owlmeans/route` are named by `OwlMeansEntrypoints`
9
- * instead — the personas that actually author `entrypoints.ts` carry that skill, and naming a
10
- * package pulls its whole published documentation into the prompt.
11
- */
12
- export declare const commonLibraryList: string[];
13
- export declare const uiStateLibraryList: string[];
14
- export declare const uiComponentLibraryList: string[];
15
- /**
16
- * Deliberately WITHOUT `drizzle-orm`. This list renders last of all the skills (order 90), so a
17
- * package named here is the final instruction a backend persona reads — and it used to say
18
- * "use drizzle" directly under `ResourceLayer` saying "never import it". `postgres-resource`
19
- * owns drizzle internally (its own dependency; the peers are `pg` and `ajv`), and a target
20
- * reaches the builder through the resource, never through an import. Do not re-add it.
21
- */
22
- export declare const backendLibraryList: string[];
23
- export declare const fullUiLibraryList: string[];
24
- /**
25
- * The backend list plus the two packages that make a model call possible.
26
- *
27
- * Naming them is what pulls their own published documentation into the prompt, so this list
28
- * carries the API contract without this catalogue restating a line of it. It is reachable only
29
- * through a blueprint case that also installs them — a coder told about a package the manifest
30
- * does not declare writes `TS2307`.
31
- */
32
- export declare const aiLibraryList: string[];
33
- /**
34
- * The UI list plus three.js. Scene code and interface code are the same package and the same
35
- * bundle here; what separates them is the component, not the dependency list.
36
- */
37
- export declare const gameLibraryList: string[];
38
- /**
39
- * How an entrypoint alias is spelled. Shared verbatim by the entrypoints skill and by every
40
- * helper prompt that asks a model to invent one — two renderings would drift, and the pipeline
41
- * splits screen from API access rules on the prefix alone.
42
- */
43
- export declare const ALIAS_CONVENTION: string;
44
- export declare const VIABLE_SKILLS: SkillDefinition[];
45
- /** Look one up by alias — for the places that still splice a rule into a task prompt. */
46
- export declare const viableSkill: (alias: ViableSkill) => SkillDefinition;
47
- //# sourceMappingURL=catalogue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../../src/skills/catalogue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAe,WAAW,EAAE,MAAM,aAAa,CAAA;AAgBtD,2FAA2F;AAC3F,eAAO,MAAM,eAAe,SAAU,MAAM,EAAE,KAAG,MACuC,CAAA;AAKxF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAA;AACxC,eAAO,MAAM,kBAAkB,UAE9B,CAAA;AACD,eAAO,MAAM,sBAAsB,UAKlC,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,UAE9B,CAAA;AACD,eAAO,MAAM,iBAAiB,UAAmE,CAAA;AAEjG;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,UAEzB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAgD,CAAA;AAE5E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAUrB,CAAA;AAER,eAAO,MAAM,aAAa,EAAE,eAAe,EA2uD1C,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,WAAW,UAAW,WAAW,KAAG,eACI,CAAA"}