@dxtmisha/scripts 0.10.10 → 0.10.11

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,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.10.11] - 2026-08-05
6
+
7
+ ### Changed
8
+ - **DesignTypes**: Updated AI JSDoc generation prompt rules in `toAiEdit` to delete JSDocs for obvious entities and generate concise (1-line) or detailed descriptions for non-obvious entities based on JS code inspection.
9
+ - **DesignTypes**: Extended `toAiMcpPrompts` to include `ai-types.md` and `ai-description.md` alongside prompt files when generating MCP server resources (`ai-mcp.json`).
10
+
11
+ ## [0.10.10] - 2026-08-05
12
+
13
+ ### Changed
14
+ - **AI Prompts**: Updated prompt templates (`aiCodeGlobalPrompt.en.md`, `aiCodeGlobalPrompt.ru.md`) to strictly mandate recording developer preferences into package `ai-memory.md` files.
15
+
5
16
  ## [0.10.9] - 2026-08-03
6
17
 
7
18
  ### Changed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/scripts",
3
3
  "private": false,
4
- "version": "0.10.10",
4
+ "version": "0.10.11",
5
5
  "type": "module",
6
6
  "description": "Development scripts and CLI tools for DXT UI projects - automated component generation, library building and project management tools",
7
7
  "keywords": [
@@ -60,9 +60,22 @@ export class DesignTypes {
60
60
  const promptList = this.getListPrompts()
61
61
  const prompts = await this.toAiPrompts(promptList)
62
62
 
63
- this.saveDescription(`${aiDescription}\n${prompts}`)
64
-
65
- const mcpPrompts = await this.toAiMcpPrompts(promptList)
63
+ const fullDescription = `${aiDescription}\n${prompts}`
64
+ this.saveDescription(fullDescription)
65
+
66
+ const mcpList: DesignTypesList = [
67
+ {
68
+ path: UI_FILE_AI_TYPES,
69
+ content: aiContent
70
+ },
71
+ {
72
+ path: UI_FILE_AI_DESCRIPTION,
73
+ content: fullDescription
74
+ },
75
+ ...promptList
76
+ ]
77
+
78
+ const mcpPrompts = await this.toAiMcpPrompts(mcpList)
66
79
 
67
80
  if (mcpPrompts) {
68
81
  this.saveMcp(mcpPrompts)
@@ -233,12 +246,7 @@ export class DesignTypes {
233
246
  PropertiesFile.writeByPath(
234
247
  UI_FILE_AI_TYPES,
235
248
  [
236
- `1) All these methods are in the ${packageJson.name} library.`,
237
- '2) Everything that is exported can be used.',
238
- '3) Use what is in this library if it exists; do not use other libraries if there is an analogue here. Do not create new ones if an analogue already exists here.',
239
- '',
240
- 'The following is the content of "exports" from package.json:',
241
- JSON.stringify(packageJson.exports, null, 2),
249
+ `All these methods are in the ${packageJson.name} library.`,
242
250
  '',
243
251
  content
244
252
  ].join('\n')
@@ -337,14 +345,16 @@ export class DesignTypes {
337
345
  + '- Do NOT return the provided JS code in your response.\n\n'
338
346
  + 'JSDOC & COMMENT RULES:\n'
339
347
  + '- STUDY THE PROVIDED JS CODE: You are explicitly provided with the JS implementation code (`File JS Code`). You MUST study the JS code for every function/method/property to understand its exact logic, behavior, and purpose.\n'
340
- + '- GENERATE MISSING JSDOCS FROM JS CODE: If an entity lacks a JSDoc comment in the input declarations, but its provided JS code implementation reveals its behavior or purpose, you MUST generate and add a clear, fluff-free English JSDoc description directly above its declaration.\n'
341
- + '- DEFINITION OF OBVIOUS (NO JSDOC): An entity is "obvious" ONLY IF its name uses clear, standard English naming conventions (e.g., `isString`, `capitalize`, `copyObject`) AND its functionality is 100% self-evident from its signature alone. Obvious entities MUST NOT have a JSDoc.\n'
342
- + '- MANDATORY JSDOC FOR NON-OBVIOUS ENTITIES: Any entity with an obscure, non-standard, custom, abbreviated, or ambiguous name (e.g., `abutaSudatoho`, `transformation`), or complex logic, MUST have a clear English JSDoc description generated by inspecting its JS implementation code.\n'
343
- + '- Write JSDoc comments WITHOUT fluff or filler text, focusing strictly on operational logic and behavior.\n'
348
+ + '- IF AN EXISTING JSDOC / COMMENT IS PRESENT:\n'
349
+ + ' * Obvious entities (e.g., `isString`, `capitalize`, `copyObject`): DELETE the JSDoc / comment entirely.\n'
350
+ + ' * Non-obvious entities: OPTIMIZE the existing JSDoc remove fluff, translate to clear English, and PRESERVE ONLY `@example`, `@remarks`, `@note`, and `@warning` tags (remove all other JSDoc tags).\n'
351
+ + '- IF NO JSDOC / COMMENT IS PRESENT:\n'
352
+ + ' * Obvious entities: DO NOTHING (do NOT add any JSDoc).\n'
353
+ + ' * Moderately non-obvious entities (obscure, custom, abbreviated, or ambiguous naming): Generate and add a SHORT, concise, 1-line English JSDoc description derived from inspecting its JS implementation code.\n'
354
+ + ' * Very unclear or highly complex entities (intricate operational logic, complex parameters, or subtle side effects): Generate and add a DETAILED, comprehensive English JSDoc description derived from inspecting its JS implementation code.\n'
344
355
  + '- Place all JSDoc comments STRICTLY directly above the target declaration.\n'
345
356
  + '- Translate all non-English comments and JSDocs to English.\n'
346
357
  + '- Remove regular inline comments (`//` or `/* ... */`).\n'
347
- + '- STRICTLY PRESERVE all JSDoc tags like `@example`, `@remarks`, `@note`, and warnings—keep them intact, translating only to English if needed.\n\n'
348
358
  + 'CLEANING & OPTIMIZATION:\n'
349
359
  + '- Remove all `import` statements and local internal re-exports (e.g., `export * from "./..."`). Strictly KEEP exports from external packages.\n'
350
360
  + '- Delete all non-public content (private/protected class members, unexported elements). Keep all public API surfaces.\n'
@@ -447,10 +457,10 @@ export class DesignTypes {
447
457
  }
448
458
 
449
459
  /**
450
- * Generates MCP server resources structure for prompt files using AI.
460
+ * Generates MCP server resources structure for prompt, type definition, and description files using AI.
451
461
  *
452
- * Генерирует структуру ресурсов MCP-сервера для файлов промптов с помощью ИИ.
453
- * @param list list of prompt files / список файлов промптов
462
+ * Генерирует структуру ресурсов MCP-сервера для файлов промптов, определений типов и описаний с помощью ИИ.
463
+ * @param list list of documentation files / список файлов документации
454
464
  * @returns object with resources array or undefined / объект со массивом ресурсов или undefined
455
465
  */
456
466
  protected async toAiMcpPrompts(list: DesignTypesList): Promise<DesignMcpResources | undefined> {