@zodic/shared 0.0.206 → 0.0.208

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.
@@ -51,6 +51,7 @@ export class ConceptService {
51
51
 
52
52
  let attempts = 0;
53
53
  const maxAttempts = 3;
54
+ const MAX_NAME_LENGTH = 44;
54
55
 
55
56
  while (attempts < maxAttempts) {
56
57
  let phase = 'generation';
@@ -86,14 +87,19 @@ export class ConceptService {
86
87
 
87
88
  console.log(`🎭 Generated names: EN - "${nameEN}", PT - "${namePT}"`);
88
89
 
89
- // ✅ Name length check
90
- const MAX_NAME_LENGTH = 44;
91
- if (nameEN.length > MAX_NAME_LENGTH || namePT.length > MAX_NAME_LENGTH) {
92
- console.warn(`⚠️ Name too long: "${nameEN}" | "${namePT}". Retrying...`);
93
- allNamesEN.push(nameEN);
94
- allNamesPT.push(namePT);
95
- continue;
96
- }
90
+ // ✅ Forcefully trim the name to exactly 5 words if it's too long
91
+ const enforceWordLimit = (name: string): string => {
92
+ const words = name.split(/\s+/);
93
+ if (words.length > 5) {
94
+ return words.slice(0, 5).join(' ');
95
+ }
96
+ return name;
97
+ };
98
+
99
+ nameEN = enforceWordLimit(nameEN);
100
+ namePT = enforceWordLimit(namePT);
101
+
102
+ console.log(`✂️ Trimmed names: EN - "${nameEN}", PT - "${namePT}"`);
97
103
 
98
104
  // ✅ Check uniqueness before storing
99
105
  if (allNamesEN.includes(nameEN) || allNamesPT.includes(namePT)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.206",
3
+ "version": "0.0.208",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -216,59 +216,59 @@ A list of previously used names will be provided. The new name must be unique an
216
216
 
217
217
  For the given combination, generate the following in both languages, ensuring the content remains identical in meaning and tone except for the poem, which should be independently written in each language:
218
218
 
219
- 1. Name (Nome)
220
- - The name must contain exactly 5 words—no more, no less.
221
- - It must start with "The Amulet of" in English and "O Amuleto de" in Portuguese.
222
- - Only two additional words are allowed after "The Amulet of".
223
- - These two words must each be a single, standalone word—do not use compound expressions or phrases.
224
- - Do not include multiple symbolic elements. The name must focus on a single theme.
225
- - Do not use conjunctions, extra descriptors, or additional prepositional phrases.
226
- - The name must not include "and," "of," "with," "for," or similar linking words.
227
-
228
- Correct Examples:
229
- - EN: "The Amulet of Serene Strength"
230
- - PT: "O Amuleto de Força Serena"
231
- - EN: "The Amulet of Healing Light"
232
- - PT: "O Amuleto de Luz Curativa"
233
-
234
- Incorrect Examples:
235
- - "The Amulet of Anchored Serenity and Flourishing Light" (Too long, uses conjunction "and")
236
- - "The Amulet of the Eternal Sun" (Includes extra article "the")
237
- - "The Amulet of Serenity’s Radiance" (Uses possessive form, which breaks structure)
238
-
239
- 2. Description (Descrição)
240
- - Write a concise and grounded narrative that links the Amulet’s qualities to the traits of the zodiac combination.
241
- - Emphasize protection, nurturing energy, and personal growth.
242
- - Keep the Portuguese version faithful in tone and depth to the English version.
243
-
244
- 3. Poetic Passage (Passagem Poética)
245
- - Create two separate and independent poetic passages—one in English, one in Portuguese.
246
- - The passage should be 4 poetic lines long.
247
- - It must evoke protection, resilience, and healing.
248
- - Do not translate the poem directly—let each version flourish naturally in its own language.
249
- - The passage should flow rhythmically and be immersive.
250
- - Do not mention the Amulet directly in the poem.
251
-
252
- Rules and Restrictions:
253
- - Do not mention zodiac signs or planets.
254
- - Do not include the Amulet’s name in the description or poem.
255
- - Ensure both descriptions are structurally and emotionally equivalent.
256
- - The poem must be free-flowing and symbolic, avoiding direct translation.
257
- - Ensure the name is exactly 5 words. The first three must be standard ("The Amulet of" / "O Amuleto de"), followed by two individual, standalone words only.
258
-
259
- Response Format:
260
-
261
- EN:
262
- • Name: The Amulet of [Symbolic Word] [Symbolic Word]
263
- • Description: [Concise and grounded explanation]
264
- • Poetic Passage:
265
- [4 poetic lines uniquely written in English]
266
-
267
- PT:
268
- • Nome: O Amuleto de [Palavra Simbólica] [Palavra Simbólica]
269
- • Descrição: [Explicação concisa e bem fundamentada]
270
- • Passagem Poética:
271
- [4 poetic lines uniquely written in Portuguese]
219
+ 1. Name (Nome)
220
+ - The name must contain exactly 6 words—no more, no less.
221
+ - It must start with "The Amulet of" in English and "O Amuleto de" in Portuguese.
222
+ - Only three additional words are allowed after "The Amulet of".
223
+ - These three words must each be a single, standalone word—do not use compound expressions or phrases.
224
+ - Do not include multiple symbolic elements. The name must focus on a single theme.
225
+ - Do not use conjunctions, extra descriptors, or additional prepositional phrases.
226
+ - The name must not include "and," "of," "with," "for," or similar linking words.
227
+
228
+ Correct Examples:
229
+ - EN: "The Amulet of Serene Strength Radiance"
230
+ - PT: "O Amuleto de Força Serena Radiante"
231
+ - EN: "The Amulet of Healing Light Purity"
232
+ - PT: "O Amuleto de Luz Curativa Pura"
233
+
234
+ Incorrect Examples:
235
+ - "The Amulet of Anchored Serenity and Flourishing Light" (Too long, uses conjunction "and")
236
+ - "The Amulet of the Eternal Sun" (Includes extra article "the")
237
+ - "The Amulet of Serenity’s Radiance" (Uses possessive form, which breaks structure)
238
+
239
+ 2. Description (Descrição)
240
+ - Write a concise and grounded narrative that links the Amulet’s qualities to the traits of the zodiac combination.
241
+ - Emphasize protection, nurturing energy, and personal growth.
242
+ - Keep the Portuguese version faithful in tone and depth to the English version.
243
+
244
+ 3. Poetic Passage (Passagem Poética)
245
+ - Create two separate and independent poetic passages—one in English, one in Portuguese.
246
+ - The passage should be 4 poetic lines long.
247
+ - It must evoke protection, resilience, and healing.
248
+ - Do not translate the poem directly—let each version flourish naturally in its own language.
249
+ - The passage should flow rhythmically and be immersive.
250
+ - Do not mention the Amulet directly in the poem.
251
+
252
+ Rules and Restrictions:
253
+ - Do not mention zodiac signs or planets.
254
+ - Do not include the Amulet’s name in the description or poem.
255
+ - Ensure both descriptions are structurally and emotionally equivalent.
256
+ - The poem must be free-flowing and symbolic, avoiding direct translation.
257
+ - Ensure the name is exactly 6 words. The first three must be standard ("The Amulet of" / "O Amuleto de"), followed by three individual, standalone words only.
258
+
259
+ Response Format:
260
+
261
+ EN:
262
+ • Name: The Amulet of [Symbolic Word] [Symbolic Word] [Symbolic Word]
263
+ • Description: [Concise and grounded explanation]
264
+ • Poetic Passage:
265
+ [4 poetic lines uniquely written in English]
266
+
267
+ PT:
268
+ • Nome: O Amuleto de [Palavra Simbólica] [Palavra Simbólica] [Palavra Simbólica]
269
+ • Descrição: [Explicação concisa e bem fundamentada]
270
+ • Passagem Poética:
271
+ [4 poetic lines uniquely written in Portuguese]
272
272
  `;
273
273
 
274
274
  export const PROMPT_GENERATE_LANTERN = `