@contractspec/module.lifecycle-advisor 2.3.0 → 2.5.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.
@@ -5,7 +5,1043 @@ import {
5
5
 
6
6
  // src/data/stage-playbooks.ts
7
7
  import { LifecycleStage } from "@contractspec/lib.lifecycle";
8
- var stagePlaybooks = [
8
+
9
+ // src/i18n/messages.ts
10
+ import {
11
+ createI18nFactory
12
+ } from "@contractspec/lib.contracts-spec/translations";
13
+
14
+ // src/i18n/catalogs/en.ts
15
+ import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
16
+ var enMessages = defineTranslation({
17
+ meta: {
18
+ key: "lifecycle-advisor.messages",
19
+ version: "1.0.0",
20
+ domain: "lifecycle-advisor",
21
+ description: "Playbook, ceremony, library, and engine strings for the lifecycle-advisor module",
22
+ owners: ["platform"],
23
+ stability: "experimental"
24
+ },
25
+ locale: "en",
26
+ fallback: "en",
27
+ messages: {
28
+ "playbook.stage0.focus.0": {
29
+ value: "Discovery",
30
+ description: "Stage 0 focus area: discovery research"
31
+ },
32
+ "playbook.stage0.focus.1": {
33
+ value: "Problem clarity",
34
+ description: "Stage 0 focus area: sharpening the problem definition"
35
+ },
36
+ "playbook.stage0.focus.2": {
37
+ value: "Persona",
38
+ description: "Stage 0 focus area: identifying the target persona"
39
+ },
40
+ "playbook.stage1.focus.0": {
41
+ value: "Prototype",
42
+ description: "Stage 1 focus area: building a prototype"
43
+ },
44
+ "playbook.stage1.focus.1": {
45
+ value: "Feedback",
46
+ description: "Stage 1 focus area: gathering user feedback"
47
+ },
48
+ "playbook.stage1.focus.2": {
49
+ value: "Value proof",
50
+ description: "Stage 1 focus area: proving the value proposition"
51
+ },
52
+ "playbook.stage2.focus.0": {
53
+ value: "Activation",
54
+ description: "Stage 2 focus area: user activation"
55
+ },
56
+ "playbook.stage2.focus.1": {
57
+ value: "Telemetry",
58
+ description: "Stage 2 focus area: usage telemetry"
59
+ },
60
+ "playbook.stage2.focus.2": {
61
+ value: "Feedback",
62
+ description: "Stage 2 focus area: continuous user feedback"
63
+ },
64
+ "playbook.stage3.focus.0": {
65
+ value: "Retention",
66
+ description: "Stage 3 focus area: user retention"
67
+ },
68
+ "playbook.stage3.focus.1": {
69
+ value: "Reliability",
70
+ description: "Stage 3 focus area: product reliability"
71
+ },
72
+ "playbook.stage3.focus.2": {
73
+ value: "Story",
74
+ description: "Stage 3 focus area: building the narrative"
75
+ },
76
+ "playbook.stage4.focus.0": {
77
+ value: "Systems",
78
+ description: "Stage 4 focus area: scalable systems"
79
+ },
80
+ "playbook.stage4.focus.1": {
81
+ value: "Growth loops",
82
+ description: "Stage 4 focus area: repeatable growth loops"
83
+ },
84
+ "playbook.stage4.focus.2": {
85
+ value: "Specialization",
86
+ description: "Stage 4 focus area: team specialization"
87
+ },
88
+ "playbook.stage5.focus.0": {
89
+ value: "Partners",
90
+ description: "Stage 5 focus area: partner ecosystem"
91
+ },
92
+ "playbook.stage5.focus.1": {
93
+ value: "APIs",
94
+ description: "Stage 5 focus area: platform APIs"
95
+ },
96
+ "playbook.stage5.focus.2": {
97
+ value: "Expansion bets",
98
+ description: "Stage 5 focus area: expansion experiments"
99
+ },
100
+ "playbook.stage6.focus.0": {
101
+ value: "Optimization",
102
+ description: "Stage 6 focus area: operational optimization"
103
+ },
104
+ "playbook.stage6.focus.1": {
105
+ value: "Renewal",
106
+ description: "Stage 6 focus area: product renewal"
107
+ },
108
+ "playbook.stage6.focus.2": {
109
+ value: "Portfolio",
110
+ description: "Stage 6 focus area: portfolio management"
111
+ },
112
+ "playbook.stage0.action0.title": {
113
+ value: "Run a 5-day interview burst",
114
+ description: "Action title for stage 0 interview sprint"
115
+ },
116
+ "playbook.stage0.action0.description": {
117
+ value: "Schedule at least 5 back-to-back interviews and capture raw quotes.",
118
+ description: "Action description for stage 0 interview sprint"
119
+ },
120
+ "playbook.stage0.action1.title": {
121
+ value: "Write the problem story",
122
+ description: "Action title for stage 0 problem narrative"
123
+ },
124
+ "playbook.stage0.action1.description": {
125
+ value: "Summarize the pain in one paragraph you can repeat to partners.",
126
+ description: "Action description for stage 0 problem narrative"
127
+ },
128
+ "playbook.stage1.action0.title": {
129
+ value: "Prototype feedback loop",
130
+ description: "Action title for stage 1 prototype iteration"
131
+ },
132
+ "playbook.stage1.action0.description": {
133
+ value: "Ship a low-fidelity prototype and collect 3 rounds of reactions.",
134
+ description: "Action description for stage 1 prototype iteration"
135
+ },
136
+ "playbook.stage1.action1.title": {
137
+ value: "Capture referral signals",
138
+ description: "Action title for stage 1 referral tracking"
139
+ },
140
+ "playbook.stage1.action1.description": {
141
+ value: "Ask each tester who else should see the demo.",
142
+ description: "Action description for stage 1 referral tracking"
143
+ },
144
+ "playbook.stage2.action0.title": {
145
+ value: "Define activation checklist",
146
+ description: "Action title for stage 2 activation definition"
147
+ },
148
+ "playbook.stage2.action0.description": {
149
+ value: "Document the 3 steps users must finish to get value.",
150
+ description: "Action description for stage 2 activation definition"
151
+ },
152
+ "playbook.stage2.action1.title": {
153
+ value: "Weekly user sync",
154
+ description: "Action title for stage 2 user communication"
155
+ },
156
+ "playbook.stage2.action1.description": {
157
+ value: "Host a standing call with your 5 most active testers.",
158
+ description: "Action description for stage 2 user communication"
159
+ },
160
+ "playbook.stage3.action0.title": {
161
+ value: "Run a retention study",
162
+ description: "Action title for stage 3 retention analysis"
163
+ },
164
+ "playbook.stage3.action0.description": {
165
+ value: "Interview 3 retained users and publish their before/after metrics.",
166
+ description: "Action description for stage 3 retention analysis"
167
+ },
168
+ "playbook.stage3.action1.title": {
169
+ value: "Lightweight incident review",
170
+ description: "Action title for stage 3 reliability review"
171
+ },
172
+ "playbook.stage3.action1.description": {
173
+ value: "Review the last 2 reliability hiccups and capture fixes.",
174
+ description: "Action description for stage 3 reliability review"
175
+ },
176
+ "playbook.stage4.action0.title": {
177
+ value: "Codify a growth loop",
178
+ description: "Action title for stage 4 growth loop setup"
179
+ },
180
+ "playbook.stage4.action0.description": {
181
+ value: "Choose one loop (SEO, referrals, outbound) and document owners + inputs.",
182
+ description: "Action description for stage 4 growth loop setup"
183
+ },
184
+ "playbook.stage4.action1.title": {
185
+ value: "Create hiring map",
186
+ description: "Action title for stage 4 hiring plan"
187
+ },
188
+ "playbook.stage4.action1.description": {
189
+ value: "List specialized roles you need in the next 2 quarters.",
190
+ description: "Action description for stage 4 hiring plan"
191
+ },
192
+ "playbook.stage5.action0.title": {
193
+ value: "Partner readiness brief",
194
+ description: "Action title for stage 5 partner preparation"
195
+ },
196
+ "playbook.stage5.action0.description": {
197
+ value: "Document partner types, value props, and onboarding steps.",
198
+ description: "Action description for stage 5 partner preparation"
199
+ },
200
+ "playbook.stage5.action1.title": {
201
+ value: "Expansion experiment portfolio",
202
+ description: "Action title for stage 5 expansion planning"
203
+ },
204
+ "playbook.stage5.action1.description": {
205
+ value: "List the top 3 markets or product lines with owners.",
206
+ description: "Action description for stage 5 expansion planning"
207
+ },
208
+ "playbook.stage6.action0.title": {
209
+ value: "Run a cost-to-value review",
210
+ description: "Action title for stage 6 margin audit"
211
+ },
212
+ "playbook.stage6.action0.description": {
213
+ value: "Audit each major surface for margin impact.",
214
+ description: "Action description for stage 6 margin audit"
215
+ },
216
+ "playbook.stage6.action1.title": {
217
+ value: "Define the renewal bet",
218
+ description: "Action title for stage 6 reinvention track"
219
+ },
220
+ "playbook.stage6.action1.description": {
221
+ value: "Choose one reinvention or sunset track and set checkpoints.",
222
+ description: "Action description for stage 6 reinvention track"
223
+ },
224
+ "ceremony.stage0.title": {
225
+ value: "Discovery Spark",
226
+ description: "Ceremony title for stage 0"
227
+ },
228
+ "ceremony.stage0.copy": {
229
+ value: "Share the sharpest pain quote with your crew. Frame it, celebrate focus.",
230
+ description: "Ceremony copy for stage 0"
231
+ },
232
+ "ceremony.stage1.title": {
233
+ value: "Solution Resonance",
234
+ description: "Ceremony title for stage 1"
235
+ },
236
+ "ceremony.stage1.copy": {
237
+ value: "Record a short screen share telling the before/after story to your future self.",
238
+ description: "Ceremony copy for stage 1"
239
+ },
240
+ "ceremony.stage2.title": {
241
+ value: "Traction Toast",
242
+ description: "Ceremony title for stage 2"
243
+ },
244
+ "ceremony.stage2.copy": {
245
+ value: "Toast your first 20 real users—say their names, tell them why they matter.",
246
+ description: "Ceremony copy for stage 2"
247
+ },
248
+ "ceremony.stage3.title": {
249
+ value: "PMF Signal Fire",
250
+ description: "Ceremony title for stage 3"
251
+ },
252
+ "ceremony.stage3.copy": {
253
+ value: "Write a letter to your future Series A self describing the pull you feel today.",
254
+ description: "Ceremony copy for stage 3"
255
+ },
256
+ "ceremony.stage4.title": {
257
+ value: "Scale Systems",
258
+ description: "Ceremony title for stage 4"
259
+ },
260
+ "ceremony.stage4.copy": {
261
+ value: "Invite the team to map the journey from first user to repeatable machine.",
262
+ description: "Ceremony copy for stage 4"
263
+ },
264
+ "ceremony.stage5.title": {
265
+ value: "Platform Threshold",
266
+ description: "Ceremony title for stage 5"
267
+ },
268
+ "ceremony.stage5.copy": {
269
+ value: "Host a partner circle—invite allies to share what they need from your platform.",
270
+ description: "Ceremony copy for stage 5"
271
+ },
272
+ "ceremony.stage6.title": {
273
+ value: "Renewal Summit",
274
+ description: "Ceremony title for stage 6"
275
+ },
276
+ "ceremony.stage6.copy": {
277
+ value: "Pause to honor what got you here, then commit publicly to the next reinvention.",
278
+ description: "Ceremony copy for stage 6"
279
+ },
280
+ "library.stage0.item0": {
281
+ value: "Summarize interviews and synthesize IC insights.",
282
+ description: "Library tool description for stage 0 item 0"
283
+ },
284
+ "library.stage0.item1": {
285
+ value: "Craft low-fi storyboards without custom code.",
286
+ description: "Library tool description for stage 0 item 1"
287
+ },
288
+ "library.stage1.item0": {
289
+ value: "Gate prototype features behind lightweight flags.",
290
+ description: "Library tool description for stage 1 item 0"
291
+ },
292
+ "library.stage1.item1": {
293
+ value: "Capture questionnaire signals for early scoring.",
294
+ description: "Library tool description for stage 1 item 1"
295
+ },
296
+ "library.stage2.item0": {
297
+ value: "Instrument activation paths + cohorts.",
298
+ description: "Library tool description for stage 2 item 0"
299
+ },
300
+ "library.stage2.item1": {
301
+ value: "Collect minimum viable traces and metrics.",
302
+ description: "Library tool description for stage 2 item 1"
303
+ },
304
+ "library.stage3.item0": {
305
+ value: "Auto-detect contract gaps and spec improvements.",
306
+ description: "Library tool description for stage 3 item 0"
307
+ },
308
+ "library.stage3.item1": {
309
+ value: "Generate retention-focused guidance at scale.",
310
+ description: "Library tool description for stage 3 item 1"
311
+ },
312
+ "library.stage4.item0": {
313
+ value: "Experiment orchestration with guardrails.",
314
+ description: "Library tool description for stage 4 item 0"
315
+ },
316
+ "library.stage4.item1": {
317
+ value: "Stabilize infra and SLOs as teams split.",
318
+ description: "Library tool description for stage 4 item 1"
319
+ },
320
+ "library.stage5.item0": {
321
+ value: "Automate partner workflows and integrations.",
322
+ description: "Library tool description for stage 5 item 0"
323
+ },
324
+ "library.stage5.item1": {
325
+ value: "Expose managed partner onboarding via Studio.",
326
+ description: "Library tool description for stage 5 item 1"
327
+ },
328
+ "library.stage6.item0": {
329
+ value: "Model margin scenarios and reinvestment bets.",
330
+ description: "Library tool description for stage 6 item 0"
331
+ },
332
+ "library.stage6.item1": {
333
+ value: "Standardize renewal rituals and automation.",
334
+ description: "Library tool description for stage 6 item 1"
335
+ },
336
+ "engine.fallbackAction.title": {
337
+ value: "Advance {focus}",
338
+ description: "Fallback action title when no specific action exists",
339
+ placeholders: [{ name: "focus", type: "string" }]
340
+ },
341
+ "engine.fallbackAction.description": {
342
+ value: 'Identify one task that will improve "{focus}" this week.',
343
+ description: "Fallback action description when no specific action exists",
344
+ placeholders: [{ name: "focus", type: "string" }]
345
+ }
346
+ }
347
+ });
348
+
349
+ // src/i18n/catalogs/fr.ts
350
+ import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
351
+ var frMessages = defineTranslation2({
352
+ meta: {
353
+ key: "lifecycle-advisor.messages",
354
+ version: "1.0.0",
355
+ domain: "lifecycle-advisor",
356
+ description: "Playbook, ceremony, library, and engine strings (French)",
357
+ owners: ["platform"],
358
+ stability: "experimental"
359
+ },
360
+ locale: "fr",
361
+ fallback: "en",
362
+ messages: {
363
+ "playbook.stage0.focus.0": {
364
+ value: "Découverte",
365
+ description: "Stage 0 focus area: Discovery"
366
+ },
367
+ "playbook.stage0.focus.1": {
368
+ value: "Clarté du problème",
369
+ description: "Stage 0 focus area: Problem clarity"
370
+ },
371
+ "playbook.stage0.focus.2": {
372
+ value: "Persona",
373
+ description: "Stage 0 focus area: Persona"
374
+ },
375
+ "playbook.stage1.focus.0": {
376
+ value: "Prototype",
377
+ description: "Stage 1 focus area: Prototype"
378
+ },
379
+ "playbook.stage1.focus.1": {
380
+ value: "Retours",
381
+ description: "Stage 1 focus area: Feedback"
382
+ },
383
+ "playbook.stage1.focus.2": {
384
+ value: "Preuve de valeur",
385
+ description: "Stage 1 focus area: Value proof"
386
+ },
387
+ "playbook.stage2.focus.0": {
388
+ value: "Activation",
389
+ description: "Stage 2 focus area: Activation"
390
+ },
391
+ "playbook.stage2.focus.1": {
392
+ value: "Télémétrie",
393
+ description: "Stage 2 focus area: Telemetry"
394
+ },
395
+ "playbook.stage2.focus.2": {
396
+ value: "Retours",
397
+ description: "Stage 2 focus area: Feedback"
398
+ },
399
+ "playbook.stage3.focus.0": {
400
+ value: "Rétention",
401
+ description: "Stage 3 focus area: Retention"
402
+ },
403
+ "playbook.stage3.focus.1": {
404
+ value: "Fiabilité",
405
+ description: "Stage 3 focus area: Reliability"
406
+ },
407
+ "playbook.stage3.focus.2": {
408
+ value: "Récit",
409
+ description: "Stage 3 focus area: Story"
410
+ },
411
+ "playbook.stage4.focus.0": {
412
+ value: "Systèmes",
413
+ description: "Stage 4 focus area: Systems"
414
+ },
415
+ "playbook.stage4.focus.1": {
416
+ value: "Boucles de croissance",
417
+ description: "Stage 4 focus area: Growth loops"
418
+ },
419
+ "playbook.stage4.focus.2": {
420
+ value: "Spécialisation",
421
+ description: "Stage 4 focus area: Specialization"
422
+ },
423
+ "playbook.stage5.focus.0": {
424
+ value: "Partenaires",
425
+ description: "Stage 5 focus area: Partners"
426
+ },
427
+ "playbook.stage5.focus.1": {
428
+ value: "APIs",
429
+ description: "Stage 5 focus area: APIs"
430
+ },
431
+ "playbook.stage5.focus.2": {
432
+ value: "Paris d'expansion",
433
+ description: "Stage 5 focus area: Expansion bets"
434
+ },
435
+ "playbook.stage6.focus.0": {
436
+ value: "Optimisation",
437
+ description: "Stage 6 focus area: Optimization"
438
+ },
439
+ "playbook.stage6.focus.1": {
440
+ value: "Renouvellement",
441
+ description: "Stage 6 focus area: Renewal"
442
+ },
443
+ "playbook.stage6.focus.2": {
444
+ value: "Portefeuille",
445
+ description: "Stage 6 focus area: Portfolio"
446
+ },
447
+ "playbook.stage0.action0.title": {
448
+ value: "Mener un sprint d'entretiens de 5 jours",
449
+ description: "Stage 0 action 0 title"
450
+ },
451
+ "playbook.stage0.action0.description": {
452
+ value: "Planifier au moins 5 entretiens consécutifs et capturer les citations brutes.",
453
+ description: "Stage 0 action 0 description"
454
+ },
455
+ "playbook.stage0.action1.title": {
456
+ value: "Rédiger l'histoire du problème",
457
+ description: "Stage 0 action 1 title"
458
+ },
459
+ "playbook.stage0.action1.description": {
460
+ value: "Résumer la douleur en un paragraphe que vous pouvez répéter aux partenaires.",
461
+ description: "Stage 0 action 1 description"
462
+ },
463
+ "playbook.stage1.action0.title": {
464
+ value: "Boucle de retours sur le prototype",
465
+ description: "Stage 1 action 0 title"
466
+ },
467
+ "playbook.stage1.action0.description": {
468
+ value: "Livrer un prototype basse fidélité et recueillir 3 tours de réactions.",
469
+ description: "Stage 1 action 0 description"
470
+ },
471
+ "playbook.stage1.action1.title": {
472
+ value: "Capturer les signaux de recommandation",
473
+ description: "Stage 1 action 1 title"
474
+ },
475
+ "playbook.stage1.action1.description": {
476
+ value: "Demander à chaque testeur qui d'autre devrait voir la démo.",
477
+ description: "Stage 1 action 1 description"
478
+ },
479
+ "playbook.stage2.action0.title": {
480
+ value: "Définir la checklist d'activation",
481
+ description: "Stage 2 action 0 title"
482
+ },
483
+ "playbook.stage2.action0.description": {
484
+ value: "Documenter les 3 étapes que les utilisateurs doivent terminer pour obtenir de la valeur.",
485
+ description: "Stage 2 action 0 description"
486
+ },
487
+ "playbook.stage2.action1.title": {
488
+ value: "Synchronisation hebdomadaire avec les utilisateurs",
489
+ description: "Stage 2 action 1 title"
490
+ },
491
+ "playbook.stage2.action1.description": {
492
+ value: "Organiser un appel récurrent avec vos 5 testeurs les plus actifs.",
493
+ description: "Stage 2 action 1 description"
494
+ },
495
+ "playbook.stage3.action0.title": {
496
+ value: "Mener une étude de rétention",
497
+ description: "Stage 3 action 0 title"
498
+ },
499
+ "playbook.stage3.action0.description": {
500
+ value: "Interviewer 3 utilisateurs retenus et publier leurs métriques avant/après.",
501
+ description: "Stage 3 action 0 description"
502
+ },
503
+ "playbook.stage3.action1.title": {
504
+ value: "Revue légère d'incidents",
505
+ description: "Stage 3 action 1 title"
506
+ },
507
+ "playbook.stage3.action1.description": {
508
+ value: "Examiner les 2 derniers incidents de fiabilité et capturer les correctifs.",
509
+ description: "Stage 3 action 1 description"
510
+ },
511
+ "playbook.stage4.action0.title": {
512
+ value: "Codifier une boucle de croissance",
513
+ description: "Stage 4 action 0 title"
514
+ },
515
+ "playbook.stage4.action0.description": {
516
+ value: "Choisir une boucle (SEO, recommandations, outbound) et documenter les responsables + entrées.",
517
+ description: "Stage 4 action 0 description"
518
+ },
519
+ "playbook.stage4.action1.title": {
520
+ value: "Créer la carte de recrutement",
521
+ description: "Stage 4 action 1 title"
522
+ },
523
+ "playbook.stage4.action1.description": {
524
+ value: "Lister les rôles spécialisés nécessaires pour les 2 prochains trimestres.",
525
+ description: "Stage 4 action 1 description"
526
+ },
527
+ "playbook.stage5.action0.title": {
528
+ value: "Brief de préparation partenaire",
529
+ description: "Stage 5 action 0 title"
530
+ },
531
+ "playbook.stage5.action0.description": {
532
+ value: "Documenter les types de partenaires, propositions de valeur et étapes d'intégration.",
533
+ description: "Stage 5 action 0 description"
534
+ },
535
+ "playbook.stage5.action1.title": {
536
+ value: "Portefeuille d'expériences d'expansion",
537
+ description: "Stage 5 action 1 title"
538
+ },
539
+ "playbook.stage5.action1.description": {
540
+ value: "Lister les 3 principaux marchés ou lignes de produits avec les responsables.",
541
+ description: "Stage 5 action 1 description"
542
+ },
543
+ "playbook.stage6.action0.title": {
544
+ value: "Mener une revue coût-valeur",
545
+ description: "Stage 6 action 0 title"
546
+ },
547
+ "playbook.stage6.action0.description": {
548
+ value: "Auditer chaque surface majeure pour l’impact sur les marges.",
549
+ description: "Stage 6 action 0 description"
550
+ },
551
+ "playbook.stage6.action1.title": {
552
+ value: "Définir le pari de renouvellement",
553
+ description: "Stage 6 action 1 title"
554
+ },
555
+ "playbook.stage6.action1.description": {
556
+ value: "Choisir une piste de réinvention ou d'arrêt et définir des points de contrôle.",
557
+ description: "Stage 6 action 1 description"
558
+ },
559
+ "ceremony.stage0.title": {
560
+ value: "Étincelle de découverte",
561
+ description: "Stage 0 ceremony title"
562
+ },
563
+ "ceremony.stage0.copy": {
564
+ value: "Partagez la citation la plus percutante avec votre équipe. Encadrez-la, célébrez le focus.",
565
+ description: "Stage 0 ceremony copy"
566
+ },
567
+ "ceremony.stage1.title": {
568
+ value: "Résonance de la solution",
569
+ description: "Stage 1 ceremony title"
570
+ },
571
+ "ceremony.stage1.copy": {
572
+ value: "Enregistrez un court partage d'écran racontant l'histoire avant/après à votre futur vous.",
573
+ description: "Stage 1 ceremony copy"
574
+ },
575
+ "ceremony.stage2.title": {
576
+ value: "Toast à la traction",
577
+ description: "Stage 2 ceremony title"
578
+ },
579
+ "ceremony.stage2.copy": {
580
+ value: "Portez un toast à vos 20 premiers vrais utilisateurs — dites leurs noms, dites-leur pourquoi ils comptent.",
581
+ description: "Stage 2 ceremony copy"
582
+ },
583
+ "ceremony.stage3.title": {
584
+ value: "Signal PMF",
585
+ description: "Stage 3 ceremony title"
586
+ },
587
+ "ceremony.stage3.copy": {
588
+ value: "Écrivez une lettre à votre futur vous de la Série A décrivant l'attraction que vous ressentez aujourd'hui.",
589
+ description: "Stage 3 ceremony copy"
590
+ },
591
+ "ceremony.stage4.title": {
592
+ value: "Systèmes d'échelle",
593
+ description: "Stage 4 ceremony title"
594
+ },
595
+ "ceremony.stage4.copy": {
596
+ value: "Invitez l'équipe à cartographier le parcours du premier utilisateur à la machine répétable.",
597
+ description: "Stage 4 ceremony copy"
598
+ },
599
+ "ceremony.stage5.title": {
600
+ value: "Seuil de la plateforme",
601
+ description: "Stage 5 ceremony title"
602
+ },
603
+ "ceremony.stage5.copy": {
604
+ value: "Organisez un cercle de partenaires — invitez les alliés à partager ce dont ils ont besoin de votre plateforme.",
605
+ description: "Stage 5 ceremony copy"
606
+ },
607
+ "ceremony.stage6.title": {
608
+ value: "Sommet du renouvellement",
609
+ description: "Stage 6 ceremony title"
610
+ },
611
+ "ceremony.stage6.copy": {
612
+ value: "Faites une pause pour honorer ce qui vous a amené ici, puis engagez-vous publiquement pour la prochaine réinvention.",
613
+ description: "Stage 6 ceremony copy"
614
+ },
615
+ "library.stage0.item0": {
616
+ value: "Résumer les entretiens et synthétiser les insights IC.",
617
+ description: "Stage 0 library item 0"
618
+ },
619
+ "library.stage0.item1": {
620
+ value: "Créer des storyboards basse fidélité sans code personnalisé.",
621
+ description: "Stage 0 library item 1"
622
+ },
623
+ "library.stage1.item0": {
624
+ value: "Contrôler les fonctionnalités prototype derrière des flags légers.",
625
+ description: "Stage 1 library item 0"
626
+ },
627
+ "library.stage1.item1": {
628
+ value: "Capturer les signaux de questionnaire pour un scoring précoce.",
629
+ description: "Stage 1 library item 1"
630
+ },
631
+ "library.stage2.item0": {
632
+ value: "Instrumenter les parcours d'activation + cohortes.",
633
+ description: "Stage 2 library item 0"
634
+ },
635
+ "library.stage2.item1": {
636
+ value: "Collecter les traces et métriques minimales viables.",
637
+ description: "Stage 2 library item 1"
638
+ },
639
+ "library.stage3.item0": {
640
+ value: "Détecter automatiquement les lacunes de contrat et améliorations de spec.",
641
+ description: "Stage 3 library item 0"
642
+ },
643
+ "library.stage3.item1": {
644
+ value: "Générer des conseils axés sur la rétention à grande échelle.",
645
+ description: "Stage 3 library item 1"
646
+ },
647
+ "library.stage4.item0": {
648
+ value: "Orchestration d'expériences avec garde-fous.",
649
+ description: "Stage 4 library item 0"
650
+ },
651
+ "library.stage4.item1": {
652
+ value: "Stabiliser l’infra et les SLOs au fur et à mesure que les équipes se divisent.",
653
+ description: "Stage 4 library item 1"
654
+ },
655
+ "library.stage5.item0": {
656
+ value: "Automatiser les workflows partenaires et intégrations.",
657
+ description: "Stage 5 library item 0"
658
+ },
659
+ "library.stage5.item1": {
660
+ value: "Exposer l'intégration partenaire gérée via Studio.",
661
+ description: "Stage 5 library item 1"
662
+ },
663
+ "library.stage6.item0": {
664
+ value: "Modéliser les scénarios de marge et paris de réinvestissement.",
665
+ description: "Stage 6 library item 0"
666
+ },
667
+ "library.stage6.item1": {
668
+ value: "Standardiser les rituels de renouvellement et l'automatisation.",
669
+ description: "Stage 6 library item 1"
670
+ },
671
+ "engine.fallbackAction.title": {
672
+ value: "Avancer sur {focus}",
673
+ description: "Fallback action title with focus placeholder"
674
+ },
675
+ "engine.fallbackAction.description": {
676
+ value: "Identifier une tâche qui améliorera « {focus} » cette semaine.",
677
+ description: "Fallback action description with focus placeholder"
678
+ }
679
+ }
680
+ });
681
+
682
+ // src/i18n/catalogs/es.ts
683
+ import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
684
+ var esMessages = defineTranslation3({
685
+ meta: {
686
+ key: "lifecycle-advisor.messages",
687
+ version: "1.0.0",
688
+ domain: "lifecycle-advisor",
689
+ description: "Playbook, ceremony, library, and engine strings (Spanish)",
690
+ owners: ["platform"],
691
+ stability: "experimental"
692
+ },
693
+ locale: "es",
694
+ fallback: "en",
695
+ messages: {
696
+ "playbook.stage0.focus.0": {
697
+ value: "Descubrimiento",
698
+ description: "Stage 0 focus area: discovery research"
699
+ },
700
+ "playbook.stage0.focus.1": {
701
+ value: "Claridad del problema",
702
+ description: "Stage 0 focus area: sharpening the problem definition"
703
+ },
704
+ "playbook.stage0.focus.2": {
705
+ value: "Persona",
706
+ description: "Stage 0 focus area: identifying the target persona"
707
+ },
708
+ "playbook.stage1.focus.0": {
709
+ value: "Prototipo",
710
+ description: "Stage 1 focus area: building a prototype"
711
+ },
712
+ "playbook.stage1.focus.1": {
713
+ value: "Retroalimentación",
714
+ description: "Stage 1 focus area: gathering user feedback"
715
+ },
716
+ "playbook.stage1.focus.2": {
717
+ value: "Prueba de valor",
718
+ description: "Stage 1 focus area: proving the value proposition"
719
+ },
720
+ "playbook.stage2.focus.0": {
721
+ value: "Activación",
722
+ description: "Stage 2 focus area: user activation"
723
+ },
724
+ "playbook.stage2.focus.1": {
725
+ value: "Telemetría",
726
+ description: "Stage 2 focus area: usage telemetry"
727
+ },
728
+ "playbook.stage2.focus.2": {
729
+ value: "Retroalimentación",
730
+ description: "Stage 2 focus area: continuous user feedback"
731
+ },
732
+ "playbook.stage3.focus.0": {
733
+ value: "Retención",
734
+ description: "Stage 3 focus area: user retention"
735
+ },
736
+ "playbook.stage3.focus.1": {
737
+ value: "Fiabilidad",
738
+ description: "Stage 3 focus area: product reliability"
739
+ },
740
+ "playbook.stage3.focus.2": {
741
+ value: "Historia",
742
+ description: "Stage 3 focus area: building the narrative"
743
+ },
744
+ "playbook.stage4.focus.0": {
745
+ value: "Sistemas",
746
+ description: "Stage 4 focus area: scalable systems"
747
+ },
748
+ "playbook.stage4.focus.1": {
749
+ value: "Bucles de crecimiento",
750
+ description: "Stage 4 focus area: repeatable growth loops"
751
+ },
752
+ "playbook.stage4.focus.2": {
753
+ value: "Especialización",
754
+ description: "Stage 4 focus area: team specialization"
755
+ },
756
+ "playbook.stage5.focus.0": {
757
+ value: "Socios",
758
+ description: "Stage 5 focus area: partner ecosystem"
759
+ },
760
+ "playbook.stage5.focus.1": {
761
+ value: "APIs",
762
+ description: "Stage 5 focus area: platform APIs"
763
+ },
764
+ "playbook.stage5.focus.2": {
765
+ value: "Apuestas de expansión",
766
+ description: "Stage 5 focus area: expansion experiments"
767
+ },
768
+ "playbook.stage6.focus.0": {
769
+ value: "Optimización",
770
+ description: "Stage 6 focus area: operational optimization"
771
+ },
772
+ "playbook.stage6.focus.1": {
773
+ value: "Renovación",
774
+ description: "Stage 6 focus area: product renewal"
775
+ },
776
+ "playbook.stage6.focus.2": {
777
+ value: "Portafolio",
778
+ description: "Stage 6 focus area: portfolio management"
779
+ },
780
+ "playbook.stage0.action0.title": {
781
+ value: "Realizar un sprint de entrevistas de 5 días",
782
+ description: "Action title for stage 0 interview sprint"
783
+ },
784
+ "playbook.stage0.action0.description": {
785
+ value: "Programar al menos 5 entrevistas consecutivas y capturar citas sin editar.",
786
+ description: "Action description for stage 0 interview sprint"
787
+ },
788
+ "playbook.stage0.action1.title": {
789
+ value: "Redactar la historia del problema",
790
+ description: "Action title for stage 0 problem narrative"
791
+ },
792
+ "playbook.stage0.action1.description": {
793
+ value: "Resumir el dolor en un párrafo que puedas repetir a los socios.",
794
+ description: "Action description for stage 0 problem narrative"
795
+ },
796
+ "playbook.stage1.action0.title": {
797
+ value: "Ciclo de retroalimentación del prototipo",
798
+ description: "Action title for stage 1 prototype iteration"
799
+ },
800
+ "playbook.stage1.action0.description": {
801
+ value: "Entregar un prototipo de baja fidelidad y recopilar 3 rondas de reacciones.",
802
+ description: "Action description for stage 1 prototype iteration"
803
+ },
804
+ "playbook.stage1.action1.title": {
805
+ value: "Capturar señales de recomendación",
806
+ description: "Action title for stage 1 referral tracking"
807
+ },
808
+ "playbook.stage1.action1.description": {
809
+ value: "Preguntar a cada tester quién más debería ver la demo.",
810
+ description: "Action description for stage 1 referral tracking"
811
+ },
812
+ "playbook.stage2.action0.title": {
813
+ value: "Definir lista de verificación de activación",
814
+ description: "Action title for stage 2 activation definition"
815
+ },
816
+ "playbook.stage2.action0.description": {
817
+ value: "Documentar los 3 pasos que los usuarios deben completar para obtener valor.",
818
+ description: "Action description for stage 2 activation definition"
819
+ },
820
+ "playbook.stage2.action1.title": {
821
+ value: "Sincronización semanal con usuarios",
822
+ description: "Action title for stage 2 user communication"
823
+ },
824
+ "playbook.stage2.action1.description": {
825
+ value: "Organizar una llamada recurrente con tus 5 testers más activos.",
826
+ description: "Action description for stage 2 user communication"
827
+ },
828
+ "playbook.stage3.action0.title": {
829
+ value: "Realizar un estudio de retención",
830
+ description: "Action title for stage 3 retention analysis"
831
+ },
832
+ "playbook.stage3.action0.description": {
833
+ value: "Entrevistar a 3 usuarios retenidos y publicar sus métricas antes/después.",
834
+ description: "Action description for stage 3 retention analysis"
835
+ },
836
+ "playbook.stage3.action1.title": {
837
+ value: "Revisión ligera de incidentes",
838
+ description: "Action title for stage 3 reliability review"
839
+ },
840
+ "playbook.stage3.action1.description": {
841
+ value: "Revisar los últimos 2 problemas de fiabilidad y capturar las correcciones.",
842
+ description: "Action description for stage 3 reliability review"
843
+ },
844
+ "playbook.stage4.action0.title": {
845
+ value: "Codificar un bucle de crecimiento",
846
+ description: "Action title for stage 4 growth loop setup"
847
+ },
848
+ "playbook.stage4.action0.description": {
849
+ value: "Elegir un bucle (SEO, referencias, outbound) y documentar responsables + entradas.",
850
+ description: "Action description for stage 4 growth loop setup"
851
+ },
852
+ "playbook.stage4.action1.title": {
853
+ value: "Crear mapa de contratación",
854
+ description: "Action title for stage 4 hiring plan"
855
+ },
856
+ "playbook.stage4.action1.description": {
857
+ value: "Listar los roles especializados necesarios para los próximos 2 trimestres.",
858
+ description: "Action description for stage 4 hiring plan"
859
+ },
860
+ "playbook.stage5.action0.title": {
861
+ value: "Brief de preparación para socios",
862
+ description: "Action title for stage 5 partner preparation"
863
+ },
864
+ "playbook.stage5.action0.description": {
865
+ value: "Documentar tipos de socios, propuestas de valor y pasos de incorporación.",
866
+ description: "Action description for stage 5 partner preparation"
867
+ },
868
+ "playbook.stage5.action1.title": {
869
+ value: "Portafolio de experimentos de expansión",
870
+ description: "Action title for stage 5 expansion planning"
871
+ },
872
+ "playbook.stage5.action1.description": {
873
+ value: "Listar los 3 principales mercados o líneas de producto con responsables.",
874
+ description: "Action description for stage 5 expansion planning"
875
+ },
876
+ "playbook.stage6.action0.title": {
877
+ value: "Realizar una revisión costo-valor",
878
+ description: "Action title for stage 6 margin audit"
879
+ },
880
+ "playbook.stage6.action0.description": {
881
+ value: "Auditar cada superficie principal por impacto en márgenes.",
882
+ description: "Action description for stage 6 margin audit"
883
+ },
884
+ "playbook.stage6.action1.title": {
885
+ value: "Definir la apuesta de renovación",
886
+ description: "Action title for stage 6 reinvention track"
887
+ },
888
+ "playbook.stage6.action1.description": {
889
+ value: "Elegir una pista de reinvención o descontinuación y establecer puntos de control.",
890
+ description: "Action description for stage 6 reinvention track"
891
+ },
892
+ "ceremony.stage0.title": {
893
+ value: "Chispa de descubrimiento",
894
+ description: "Ceremony title for stage 0"
895
+ },
896
+ "ceremony.stage0.copy": {
897
+ value: "Comparte la cita de dolor más impactante con tu equipo. Enmárcala, celebra el enfoque.",
898
+ description: "Ceremony copy for stage 0"
899
+ },
900
+ "ceremony.stage1.title": {
901
+ value: "Resonancia de la solución",
902
+ description: "Ceremony title for stage 1"
903
+ },
904
+ "ceremony.stage1.copy": {
905
+ value: "Graba un breve screencast contando la historia antes/después a tu futuro yo.",
906
+ description: "Ceremony copy for stage 1"
907
+ },
908
+ "ceremony.stage2.title": {
909
+ value: "Brindis por la tracción",
910
+ description: "Ceremony title for stage 2"
911
+ },
912
+ "ceremony.stage2.copy": {
913
+ value: "Brinda por tus primeros 20 usuarios reales—di sus nombres, diles por qué importan.",
914
+ description: "Ceremony copy for stage 2"
915
+ },
916
+ "ceremony.stage3.title": {
917
+ value: "Señal de fuego PMF",
918
+ description: "Ceremony title for stage 3"
919
+ },
920
+ "ceremony.stage3.copy": {
921
+ value: "Escribe una carta a tu futuro yo de la Serie A describiendo la atracción que sientes hoy.",
922
+ description: "Ceremony copy for stage 3"
923
+ },
924
+ "ceremony.stage4.title": {
925
+ value: "Sistemas de escala",
926
+ description: "Ceremony title for stage 4"
927
+ },
928
+ "ceremony.stage4.copy": {
929
+ value: "Invita al equipo a mapear el viaje desde el primer usuario hasta la máquina repetible.",
930
+ description: "Ceremony copy for stage 4"
931
+ },
932
+ "ceremony.stage5.title": {
933
+ value: "Umbral de la plataforma",
934
+ description: "Ceremony title for stage 5"
935
+ },
936
+ "ceremony.stage5.copy": {
937
+ value: "Organiza un círculo de socios—invita a los aliados a compartir lo que necesitan de tu plataforma.",
938
+ description: "Ceremony copy for stage 5"
939
+ },
940
+ "ceremony.stage6.title": {
941
+ value: "Cumbre de renovación",
942
+ description: "Ceremony title for stage 6"
943
+ },
944
+ "ceremony.stage6.copy": {
945
+ value: "Haz una pausa para honrar lo que te trajo aquí, luego comprómetete públicamente con la próxima reinvención.",
946
+ description: "Ceremony copy for stage 6"
947
+ },
948
+ "library.stage0.item0": {
949
+ value: "Resumir entrevistas y sintetizar insights de IC.",
950
+ description: "Library tool description for stage 0 item 0"
951
+ },
952
+ "library.stage0.item1": {
953
+ value: "Crear storyboards de baja fidelidad sin código personalizado.",
954
+ description: "Library tool description for stage 0 item 1"
955
+ },
956
+ "library.stage1.item0": {
957
+ value: "Controlar funcionalidades del prototipo detrás de flags ligeros.",
958
+ description: "Library tool description for stage 1 item 0"
959
+ },
960
+ "library.stage1.item1": {
961
+ value: "Capturar señales de cuestionario para scoring temprano.",
962
+ description: "Library tool description for stage 1 item 1"
963
+ },
964
+ "library.stage2.item0": {
965
+ value: "Instrumentar rutas de activación + cohortes.",
966
+ description: "Library tool description for stage 2 item 0"
967
+ },
968
+ "library.stage2.item1": {
969
+ value: "Recopilar trazas y métricas mínimas viables.",
970
+ description: "Library tool description for stage 2 item 1"
971
+ },
972
+ "library.stage3.item0": {
973
+ value: "Detectar automáticamente brechas de contrato y mejoras de spec.",
974
+ description: "Library tool description for stage 3 item 0"
975
+ },
976
+ "library.stage3.item1": {
977
+ value: "Generar orientación enfocada en retención a escala.",
978
+ description: "Library tool description for stage 3 item 1"
979
+ },
980
+ "library.stage4.item0": {
981
+ value: "Orquestación de experimentos con barandillas.",
982
+ description: "Library tool description for stage 4 item 0"
983
+ },
984
+ "library.stage4.item1": {
985
+ value: "Estabilizar infraestructura y SLOs a medida que los equipos se dividen.",
986
+ description: "Library tool description for stage 4 item 1"
987
+ },
988
+ "library.stage5.item0": {
989
+ value: "Automatizar flujos de trabajo de socios e integraciones.",
990
+ description: "Library tool description for stage 5 item 0"
991
+ },
992
+ "library.stage5.item1": {
993
+ value: "Exponer incorporación de socios gestionada vía Studio.",
994
+ description: "Library tool description for stage 5 item 1"
995
+ },
996
+ "library.stage6.item0": {
997
+ value: "Modelar escenarios de margen y apuestas de reinversión.",
998
+ description: "Library tool description for stage 6 item 0"
999
+ },
1000
+ "library.stage6.item1": {
1001
+ value: "Estandarizar rituales de renovación y automatización.",
1002
+ description: "Library tool description for stage 6 item 1"
1003
+ },
1004
+ "engine.fallbackAction.title": {
1005
+ value: "Avanzar en {focus}",
1006
+ description: "Fallback action title when no specific action exists",
1007
+ placeholders: [{ name: "focus", type: "string" }]
1008
+ },
1009
+ "engine.fallbackAction.description": {
1010
+ value: 'Identificar una tarea que mejore "{focus}" esta semana.',
1011
+ description: "Fallback action description when no specific action exists",
1012
+ placeholders: [{ name: "focus", type: "string" }]
1013
+ }
1014
+ }
1015
+ });
1016
+
1017
+ // src/i18n/messages.ts
1018
+ var factory = createI18nFactory({
1019
+ specKey: "lifecycle-advisor.messages",
1020
+ catalogs: [enMessages, frMessages, esMessages]
1021
+ });
1022
+ var createLifecycleAdvisorI18n = factory.create;
1023
+ var getDefaultI18n = factory.getDefault;
1024
+ var resetI18nRegistry = factory.resetRegistry;
1025
+
1026
+ // src/data/stage-playbooks.ts
1027
+ function getLocalizedStagePlaybooks(locale) {
1028
+ const i18n = createLifecycleAdvisorI18n(locale);
1029
+ return staticPlaybooks.map((playbook, stageIdx) => ({
1030
+ ...playbook,
1031
+ focusAreas: playbook.focusAreas.map((_, focusIdx) => i18n.t(`playbook.stage${stageIdx}.focus.${focusIdx}`)),
1032
+ actions: playbook.actions.map((action, actionIdx) => ({
1033
+ ...action,
1034
+ title: i18n.t(`playbook.stage${stageIdx}.action${actionIdx}.title`),
1035
+ description: i18n.t(`playbook.stage${stageIdx}.action${actionIdx}.description`)
1036
+ })),
1037
+ ceremony: playbook.ceremony ? {
1038
+ ...playbook.ceremony,
1039
+ title: i18n.t(`ceremony.stage${stageIdx}.title`),
1040
+ copy: i18n.t(`ceremony.stage${stageIdx}.copy`)
1041
+ } : undefined
1042
+ }));
1043
+ }
1044
+ var staticPlaybooks = [
9
1045
  {
10
1046
  stage: LifecycleStage.Exploration,
11
1047
  focusAreas: ["Discovery", "Problem clarity", "Persona"],
@@ -237,6 +1273,7 @@ var stagePlaybooks = [
237
1273
  }
238
1274
  }
239
1275
  ];
1276
+ var stagePlaybooks = staticPlaybooks;
240
1277
  var stage_playbooks_default = stagePlaybooks;
241
1278
 
242
1279
  // src/recommendations/recommendation-engine.ts
@@ -254,36 +1291,54 @@ class LifecycleRecommendationEngine {
254
1291
  this.playbooks = overrides?.length ? new Map(overrides.map((entry) => [entry.stage, entry])) : PLAYBOOK_MAP;
255
1292
  }
256
1293
  generate(assessment, options = {}) {
257
- const entry = this.playbooks.get(assessment.stage) ?? createFallbackPlaybook(assessment.stage);
258
- const limit = options.limit ?? 3;
1294
+ const { locale, limit: rawLimit, upcomingMilestones } = options;
1295
+ const limit = rawLimit ?? 3;
1296
+ const entry = locale ? resolveLocalizedPlaybook(assessment.stage, locale) : this.playbooks.get(assessment.stage) ?? createFallbackPlaybook(assessment.stage);
259
1297
  const actions = (entry.actions ?? []).slice(0, limit);
260
- const finalActions = actions.length > 0 ? actions : fallbackActions(assessment, limit);
1298
+ const finalActions = actions.length > 0 ? actions : fallbackActions(assessment, limit, locale);
261
1299
  return {
262
1300
  assessmentId: assessment.generatedAt,
263
1301
  stage: assessment.stage,
264
1302
  actions: finalActions,
265
- upcomingMilestones: options.upcomingMilestones ?? [],
1303
+ upcomingMilestones: upcomingMilestones ?? [],
266
1304
  ceremony: entry.ceremony
267
1305
  };
268
1306
  }
269
1307
  }
270
- var createFallbackPlaybook = (stage) => ({
1308
+ function resolveLocalizedPlaybook(stage, locale) {
1309
+ const localized = getLocalizedStagePlaybooks(locale);
1310
+ return localized.find((p) => p.stage === stage) ?? createFallbackPlaybook(stage, locale);
1311
+ }
1312
+ var createFallbackPlaybook = (stage, locale) => ({
271
1313
  stage,
272
1314
  actions: [],
273
- focusAreas: LIFECYCLE_STAGE_META[stage].focusAreas
1315
+ focusAreas: locale ? getLocalizedStagePlaybooks(locale).find((p) => p.stage === stage)?.focusAreas ?? LIFECYCLE_STAGE_META[stage].focusAreas : LIFECYCLE_STAGE_META[stage].focusAreas
274
1316
  });
275
- var fallbackActions = (assessment, limit) => (assessment.focusAreas ?? LIFECYCLE_STAGE_META[assessment.stage].focusAreas).slice(0, limit).map((focus, index) => ({
276
- id: `fallback-${assessment.stage}-${index}`,
277
- stage: assessment.stage,
278
- title: `Advance ${focus}`,
279
- description: `Identify one task that will improve "${focus}" this week.`,
280
- priority: index + 1,
281
- estimatedImpact: "low",
282
- effortLevel: "s",
283
- category: "product"
284
- }));
1317
+ var fallbackActions = (assessment, limit, locale) => {
1318
+ const i18n = locale ? createLifecycleAdvisorI18n(locale) : undefined;
1319
+ return (assessment.focusAreas ?? LIFECYCLE_STAGE_META[assessment.stage].focusAreas).slice(0, limit).map((focus, index) => ({
1320
+ id: `fallback-${assessment.stage}-${index}`,
1321
+ stage: assessment.stage,
1322
+ title: i18n ? i18n.t("engine.fallbackAction.title", { focus }) : `Advance ${focus}`,
1323
+ description: i18n ? i18n.t("engine.fallbackAction.description", { focus }) : `Identify one task that will improve "${focus}" this week.`,
1324
+ priority: index + 1,
1325
+ estimatedImpact: "low",
1326
+ effortLevel: "s",
1327
+ category: "product"
1328
+ }));
1329
+ };
285
1330
  // src/data/library-stage-map.ts
286
- var libraryStageMap = [
1331
+ function getLocalizedLibraryStageMap(locale) {
1332
+ const i18n = createLifecycleAdvisorI18n(locale);
1333
+ return staticLibraryStageMap.map((entry, stageIdx) => ({
1334
+ ...entry,
1335
+ items: entry.items.map((item, itemIdx) => ({
1336
+ ...item,
1337
+ description: i18n.t(`library.stage${stageIdx}.item${itemIdx}`)
1338
+ }))
1339
+ }));
1340
+ }
1341
+ var staticLibraryStageMap = [
287
1342
  {
288
1343
  stage: 0,
289
1344
  items: [
@@ -390,6 +1445,7 @@ var libraryStageMap = [
390
1445
  ]
391
1446
  }
392
1447
  ];
1448
+ var libraryStageMap = staticLibraryStageMap;
393
1449
  var library_stage_map_default = libraryStageMap;
394
1450
 
395
1451
  // src/recommendations/library-recommender.ts
@@ -400,7 +1456,12 @@ class ContractSpecLibraryRecommender {
400
1456
  constructor(overrides) {
401
1457
  this.mapping = overrides?.length ? new Map(overrides.map((entry) => [entry.stage, entry.items])) : LIBRARY_MAP;
402
1458
  }
403
- recommend(stage, limit = 4) {
1459
+ recommend(stage, limit = 4, locale) {
1460
+ if (locale) {
1461
+ const localized = getLocalizedLibraryStageMap(locale);
1462
+ const entry = localized.find((e) => e.stage === stage);
1463
+ return entry?.items.slice(0, limit) ?? [];
1464
+ }
404
1465
  const items = this.mapping.get(stage);
405
1466
  if (!items?.length)
406
1467
  return [];
@@ -418,11 +1479,18 @@ class LifecycleCeremonyDesigner {
418
1479
  constructor(overrides) {
419
1480
  this.ceremonies = overrides?.length ? new Map(overrides.map((entry) => [entry.stage, entry.ceremony])) : CEREMONY_MAP;
420
1481
  }
421
- design(stage) {
1482
+ design(stage, locale) {
1483
+ if (locale) {
1484
+ const localized = getLocalizedStagePlaybooks(locale);
1485
+ const entry = localized.find((p) => p.stage === stage);
1486
+ return entry?.ceremony;
1487
+ }
422
1488
  return this.ceremonies.get(stage);
423
1489
  }
424
1490
  }
425
1491
  export {
1492
+ getLocalizedStagePlaybooks,
1493
+ getLocalizedLibraryStageMap,
426
1494
  LifecycleRecommendationEngine,
427
1495
  LifecycleCeremonyDesigner,
428
1496
  ContractSpecLibraryRecommender