@dxtmisha/scripts 0.10.12 → 0.10.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.10.12] - 2026-08-05
5
+ ## [0.10.13] - 2026-08-06
6
+
7
+ ### Changed
8
+ - **AI Workspace Memory**: Updated `aiCodeGlobalPrompt` templates (EN & RU) and root `ai-prompt.md` to restrict `ai-memory.md` updates strictly to explicit developer requests or critical architectural rules.
9
+ - **DesignTypes**: Refined AI prompt summary generation in `toAiPromptName` to produce high-density topic and trigger criteria descriptions, and fixed prompt string joining formatting.
10
+
11
+
6
12
 
7
13
  ### Changed
8
14
  - **AI Generators & Design Types**: Added support for generating `ai-mcp.json` resources in `LibraryAiPrompt`, updated `DesignTypes.toAiEdit` JSDoc instructions, updated `AiZAiLite` prompt parameters, and updated package metadata (`ai-memory.md`).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/scripts",
3
3
  "private": false,
4
- "version": "0.10.12",
4
+ "version": "0.10.13",
5
5
  "type": "module",
6
6
  "description": "CLI tools, AI integration scripts, and automation utilities for DXT UI — automated component scaffolding, Figma layout generation, library packaging, documentation building, screenshot captures, and AI prompt processing.",
7
7
  "keywords": [
@@ -89,6 +89,7 @@
89
89
  "puppeteer": "*",
90
90
  "sass": "*",
91
91
  "typescript": "*",
92
+ "vite-node": "*",
92
93
  "vue": "*"
93
94
  },
94
95
  "devDependencies": {
@@ -311,6 +311,7 @@ export class DesignTypes {
311
311
 
312
312
  if (ai) {
313
313
  ai.addPrompt('You are a world-class senior developer and an exceptional technical writer.')
314
+ ai.addPrompt('CRITICAL DIRECTIVE: No data stored in history, previous chat messages, or prior conversation context must influence the result. Process strictly and exclusively the data provided in the text below.')
314
315
  ai.addPrompt(prompt)
315
316
  ai.addPrompt(`File Content: ${content}`)
316
317
 
@@ -408,24 +409,20 @@ export class DesignTypes {
408
409
  */
409
410
  protected async toAiPrompts(list: DesignTypesList): Promise<string> {
410
411
  const projectName = this.getProjectName()
411
- const promptList = await Promise.all(
412
- forEach(list, async (item) => {
413
- const content = await this.toAiPromptName(item.content)
412
+ const prompts: string[] = []
414
413
 
415
- if (isFilled(content)) {
416
- return `- '${UI_MODULES}/${projectName}/${item.path}': ${content}`
417
- }
418
-
419
- return ''
420
- })
421
- )
414
+ for (const item of list) {
415
+ const content = await this.toAiPromptName(item.content)
422
416
 
423
- const prompts = promptList.filter(Boolean).join('\n')
417
+ if (isFilled(content)) {
418
+ prompts.push(`- '${UI_MODULES}/${projectName}/${item.path}': ${content}`)
419
+ }
420
+ }
424
421
 
425
- if (prompts) {
422
+ if (prompts.length > 0) {
426
423
  return '## Mandatory Rules\n'
427
424
  + 'Read the corresponding file ONLY when working on a task related to (even if not working directly with this package):\n'
428
- + `${prompts}`
425
+ + `${prompts.join('\n')}`
429
426
  }
430
427
 
431
428
  return ''
@@ -440,18 +437,19 @@ export class DesignTypes {
440
437
  protected async toAiPromptName(content: string): Promise<string> {
441
438
  const generate = await this.toAi(
442
439
  content,
443
- 'Goal: Generate an EXTREMELY SHORT, high-density topic summary for an AI coding assistant describing what rules/topics are covered in this prompt document.\n\n'
440
+ 'Goal: Generate an EXTREMELY SHORT, high-density trigger and topic summary for an AI coding assistant describing what rules/topics are covered AND under what specific tasks, conditions, or use cases this document must be studied.\n\n'
444
441
  + 'CRITICAL RESTRICTIONS:\n'
445
- + '- The output MUST be EXTREMELY CONCISE: 1 short sentence or clause (maximum 10-15 words).\n'
446
- + '- Do NOT include repetitive filler like "When working with...", "you MUST study this document", or "in order to follow...".\n'
442
+ + '- The output MUST be EXTREMELY CONCISE: 1-2 short sentence or clause (maximum 30-35 words).\n'
443
+ + '- Clearly specify BOTH the key topics/rules AND the specific scenarios, tasks, or triggers when this document must be read.\n'
444
+ + '- Do NOT include repetitive filler like "you MUST study this document", "in order to follow...", or "when working with...".\n'
447
445
  + '- Analyze ONLY the text explicitly provided in this prompt.\n'
448
446
  + '- Do NOT include file paths, URLs, quotes, or markdown syntax.\n\n'
449
447
  + 'EXAMPLES OF GOOD OUTPUT:\n'
450
- + '- "Class structure, typing standards, SSR safety, and primitive helpers"\n'
451
- + '- "HTTP client, storage management, localization, and DOM event helpers"\n'
452
- + '- "MDX documentation generation rules for TypeScript classes"\n\n'
448
+ + '- "Class structure, typing standards, SSR safety, and primitive utility functions"\n'
449
+ + '- "HTTP client, storage management, localization formatting, and DOM event helpers"\n'
450
+ + '- "Implementing or wrapping D1 components, slot/event types, or customizing theme variables"\n\n'
453
451
  + 'OUTPUT REQUIREMENTS:\n'
454
- + 'Return ONLY the resulting short topic summary. No markdown code blocks (```), no labels, no quotes, and no conversational text.'
452
+ + 'Return ONLY the resulting short trigger and topic summary. No markdown code blocks (```), no labels, no quotes, and no conversational text.'
455
453
  )
456
454
 
457
455
  return generate ?? ''
@@ -17,5 +17,5 @@ Strictly follow these rules for flawless dxt-ui code:
17
17
  7. **Security & Performance**: Error-proof code (`?.`, `??`, guard clauses). Use explicit `try-catch` for async. Never swallow errors. Avoid heavy ops in loops/reactivity.
18
18
  8. **Aesthetics & Conciseness**: Group logically. Save tokens by avoiding redundant comments if code is self-explanatory.
19
19
  9. **Strict Adherence & Optimization**: Follow instructions precisely without guessing. Propose relevant technical optimizations while strictly adhering to plans.
20
- 10. **AI Workspace Memory (`ai-memory.md`)**: Actively APPLY its rules (highest priority). Update it on developer feedback. **CRITICAL**: Any remark from the developer that has value for the future (e.g., code style, dos and don'ts) MUST be saved here. If the developer explicitly asks to save or remember something, you MUST save it. Do NOT store change logs or absolute paths (use relative). Keep it focused strictly on architectural constraints and developer preferences.
20
+ 10. **AI Workspace Memory (`ai-memory.md`)**: Actively APPLY its rules (highest priority). Update local `ai-memory.md` **ONLY** upon explicit developer command (e.g., "remember", "save to memory") or for critical architectural rules/fixes. Do NOT add routine edits indiscriminately, change logs, or absolute paths (use relative only). Keep it focused strictly on critical architectural constraints and explicit developer instructions.
21
21
  11. **Mandatory Full-File Self-Audit**: When creating new entities, you MUST audit the ENTIRE file (not just modified parts) to ensure no logic duplication (DRY) and full compliance with project rules. *Exception: minor bug fixes to existing code do not require a full audit.*
@@ -17,5 +17,5 @@
17
17
  7. **Безопасность и Производительность**: Защищенный код (`?.`, `??`, guard clauses). Явный `try-catch` для асинхронности. Не скрывай ошибки. Избегай тяжелых операций в циклах/реактивности.
18
18
  8. **Эстетика и Лаконичность**: Логическая группировка. Экономь токены, избегая избыточных комментариев, если код очевиден.
19
19
  9. **Строгое следование инструкциям**: Выполняй команды без додумывания, но предлагай уместные технические оптимизации, придерживаясь плана.
20
- 10. **Память ИИ (`ai-memory.md`)**: Активно ПРИМЕНЯЙ ее правила (высший приоритет). Обновляй при правках от разработчика. **ВАЖНО**: Любое замечание от разработчика, которое имеет ценность для будущего (например, стиль кода, что надо делать, а что нет), ДОЛЖНО быть сохранено здесь. Также, если разработчик просит сохранить или запомнить какую-либо информацию, ты ОБЯЗАН это сделать. ЗАПРЕЩЕНО хранить историю изменений (changelogs) и абсолютные пути (только относительные). Только актуальные стандарты и предпочтения разработчика.
20
+ 10. **Память ИИ (`ai-memory.md`)**: Активно ПРИМЕНЯЙ ее правила (высший приоритет). Обновляй локальный `ai-memory.md` **ТОЛЬКО** по явной команде разработчика (напр., «запомни», «сохрани в память») или при критических архитектурных правках/правилах. ЗАПРЕЩЕНО добавлять всё подряд, историю изменений (changelogs) и абсолютные пути (только относительные). Храни только действительно важные архитектурные ограничения и явные указания разработчика.
21
21
  11. **Обязательный полный самоаудит**: При создании новых сущностей ОБЯЗАТЕЛЬНО проверяй ВЕСЬ файл целиком. Строго контролируй отсутствие дублирования (DRY) и соблюдение всех правил проекта. *Исключение: мелкие правки существующего кода не требуют полного аудита.*