@aigne/doc-smith 0.8.11-beta.5 → 0.8.11-beta.6

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.
Files changed (95) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +9 -2
  4. package/README.md +1 -1
  5. package/agents/clear/choose-contents.mjs +2 -2
  6. package/agents/clear/clear-document-structure.mjs +8 -8
  7. package/agents/clear/index.yaml +1 -1
  8. package/agents/evaluate/document-structure.yaml +1 -1
  9. package/agents/generate/check-document-structure.yaml +3 -3
  10. package/agents/generate/check-need-generate-structure.mjs +8 -8
  11. package/agents/generate/document-structure-tools/add-document.mjs +3 -3
  12. package/agents/generate/document-structure-tools/delete-document.mjs +2 -2
  13. package/agents/generate/document-structure-tools/move-document.mjs +3 -2
  14. package/agents/generate/document-structure-tools/update-document.mjs +2 -2
  15. package/agents/generate/generate-structure.yaml +1 -1
  16. package/agents/generate/update-document-structure.yaml +3 -3
  17. package/agents/generate/user-review-document-structure.mjs +10 -10
  18. package/agents/update/batch-generate-document.yaml +1 -1
  19. package/agents/update/check-document.mjs +2 -2
  20. package/agents/utils/check-feedback-refiner.mjs +1 -1
  21. package/agents/utils/choose-docs.mjs +1 -1
  22. package/agents/utils/load-document-all-content.mjs +3 -3
  23. package/agents/utils/load-sources.mjs +1 -1
  24. package/agents/utils/save-docs.mjs +7 -28
  25. package/aigne.yaml +2 -2
  26. package/docs/_sidebar.md +1 -1
  27. package/docs/advanced-how-it-works.md +3 -3
  28. package/docs/advanced-quality-assurance.md +1 -1
  29. package/docs/cli-reference.ja.md +151 -80
  30. package/docs/cli-reference.md +126 -55
  31. package/docs/cli-reference.zh-TW.md +133 -62
  32. package/docs/cli-reference.zh.md +143 -72
  33. package/docs/configuration-interactive-setup.md +1 -1
  34. package/docs/configuration-language-support.md +1 -1
  35. package/docs/configuration-preferences.md +1 -1
  36. package/docs/configuration.ja.md +104 -48
  37. package/docs/configuration.md +58 -2
  38. package/docs/configuration.zh-TW.md +99 -42
  39. package/docs/configuration.zh.md +78 -21
  40. package/docs/features-generate-documentation.ja.md +63 -44
  41. package/docs/features-generate-documentation.md +54 -35
  42. package/docs/features-generate-documentation.zh-TW.md +67 -48
  43. package/docs/features-generate-documentation.zh.md +61 -41
  44. package/docs/features-publish-your-docs.ja.md +69 -46
  45. package/docs/features-publish-your-docs.md +65 -42
  46. package/docs/features-publish-your-docs.zh-TW.md +73 -50
  47. package/docs/features-publish-your-docs.zh.md +67 -44
  48. package/docs/features-translate-documentation.ja.md +35 -33
  49. package/docs/features-translate-documentation.md +24 -22
  50. package/docs/features-translate-documentation.zh-TW.md +32 -30
  51. package/docs/features-translate-documentation.zh.md +29 -27
  52. package/docs/features-update-and-refine.ja.md +120 -66
  53. package/docs/features-update-and-refine.md +110 -56
  54. package/docs/features-update-and-refine.zh-TW.md +116 -62
  55. package/docs/features-update-and-refine.zh.md +118 -64
  56. package/docs/getting-started.ja.md +22 -22
  57. package/docs/getting-started.md +1 -1
  58. package/docs/getting-started.zh-TW.md +16 -16
  59. package/docs/getting-started.zh.md +28 -28
  60. package/docs/overview.md +3 -3
  61. package/docs-mcp/analyze-docs-relevance.yaml +6 -6
  62. package/docs-mcp/docs-search.yaml +1 -1
  63. package/package.json +2 -2
  64. package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
  65. package/prompts/common/document-structure/document-structure-rules.md +2 -2
  66. package/prompts/detail/document-rules.md +1 -1
  67. package/prompts/detail/generate-document.md +1 -1
  68. package/prompts/evaluate/document-structure.md +6 -6
  69. package/prompts/structure/check-document-structure.md +10 -10
  70. package/prompts/structure/document-rules.md +2 -2
  71. package/prompts/structure/generate-structure-system.md +3 -3
  72. package/prompts/structure/structure-example.md +1 -1
  73. package/prompts/structure/structure-getting-started.md +1 -1
  74. package/prompts/structure/update-document-structure.md +9 -9
  75. package/prompts/utils/feedback-refiner.md +1 -1
  76. package/tests/agents/clear/choose-contents.test.mjs +1 -1
  77. package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
  78. package/tests/agents/evaluate/generate-report.test.mjs +1 -1
  79. package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
  80. package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
  81. package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
  82. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +3 -3
  83. package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
  84. package/tests/agents/generate/user-review-document-structure.test.mjs +7 -5
  85. package/tests/agents/update/check-document.test.mjs +1 -1
  86. package/tests/agents/utils/format-document-structure.test.mjs +5 -5
  87. package/tests/agents/utils/load-sources.test.mjs +4 -4
  88. package/tests/agents/utils/save-docs.test.mjs +1 -1
  89. package/tests/utils/conflict-detector.test.mjs +1 -1
  90. package/tests/utils/docs-finder-utils.test.mjs +8 -8
  91. package/types/document-structure-schema.mjs +9 -9
  92. package/utils/conflict-detector.mjs +1 -1
  93. package/utils/constants/index.mjs +4 -4
  94. package/utils/docs-finder-utils.mjs +11 -11
  95. package/utils/markdown-checker.mjs +1 -1
@@ -350,7 +350,7 @@ export const SUPPORTED_FILE_EXTENSIONS = [".txt", ".md", ".json", ".yaml", ".yml
350
350
  export const CONFLICT_RULES = {
351
351
  // Internal conflicts within the same question (multi-select conflicts)
352
352
  internalConflicts: {
353
- // Note: Most conflicts can be resolved through intelligent document structure
353
+ // Note: Most conflicts can be resolved through intelligent documentation structure
354
354
  // Only keeping conflicts that represent fundamental incompatibilities
355
355
  },
356
356
 
@@ -424,7 +424,7 @@ export const CONFLICT_RULES = {
424
424
 
425
425
  // Conflict resolution rules - defines how to handle conflicts when users select conflicting options
426
426
  export const CONFLICT_RESOLUTION_RULES = {
427
- // Document purpose conflicts that can be resolved through document structure
427
+ // Document purpose conflicts that can be resolved through documentation structure
428
428
  documentPurpose: [
429
429
  {
430
430
  conflictItems: ["getStarted", "findAnswers"],
@@ -451,7 +451,7 @@ export const CONFLICT_RESOLUTION_RULES = {
451
451
  },
452
452
  ],
453
453
 
454
- // Target audience conflicts that can be resolved through document structure
454
+ // Target audience conflicts that can be resolved through documentation structure
455
455
  targetAudienceTypes: [
456
456
  {
457
457
  conflictItems: ["endUsers", "developers"],
@@ -475,7 +475,7 @@ export const CONFLICT_RESOLUTION_RULES = {
475
475
  // Resolution strategy descriptions
476
476
  export const RESOLUTION_STRATEGIES = {
477
477
  layered_structure: (items) =>
478
- `Detected "${items.join('" and "')}" purpose conflict. Resolution strategy: Create layered document structure
478
+ `Detected "${items.join('" and "')}" purpose conflict. Resolution strategy: Create layered documentation structure
479
479
  - Quick start section: Uses "get started" style - optimizes for speed, key steps, working examples, skips complex edge cases
480
480
  - API reference section: Uses "find answers" style - comprehensive coverage, searchability, rich examples, skips narrative flow
481
481
  - Ensure sections complement rather than conflict with each other`,
@@ -24,8 +24,8 @@ function generateFileName(flatName, locale) {
24
24
  }
25
25
 
26
26
  /**
27
- * Find a single item by path in document structure result and read its content
28
- * @param {Array} documentExecutionStructure - Array of document structure items
27
+ * Find a single item by path in documentation structure result and read its content
28
+ * @param {Array} documentExecutionStructure - Array of documentation structure items
29
29
  * @param {string} docPath - Document path to find (supports .md filenames)
30
30
  * @param {string} boardId - Board ID for fallback matching
31
31
  * @param {string} docsDir - Docs directory path for reading content
@@ -116,7 +116,7 @@ export async function readFileContent(docsDir, fileName) {
116
116
  * Get main language markdown files from docs directory
117
117
  * @param {string} docsDir - Docs directory path
118
118
  * @param {string} locale - Main language locale (e.g., 'en', 'zh', 'fr')
119
- * @param {Array} documentExecutionStructure - Array of document structure items to determine file order
119
+ * @param {Array} documentExecutionStructure - Array of documentation structure items to determine file order
120
120
  * @returns {Promise<string[]>} Array of main language .md files ordered by documentExecutionStructure
121
121
  */
122
122
  export async function getMainLanguageFiles(docsDir, locale, documentExecutionStructure = null) {
@@ -153,7 +153,7 @@ export async function getMainLanguageFiles(docsDir, locale, documentExecutionStr
153
153
 
154
154
  // If documentExecutionStructure is provided, sort files according to the order in documentExecutionStructure
155
155
  if (documentExecutionStructure && Array.isArray(documentExecutionStructure)) {
156
- // Create a map from flat file name to document structure order
156
+ // Create a map from flat file name to documentation structure order
157
157
  const orderMap = new Map();
158
158
  documentExecutionStructure.forEach((item, index) => {
159
159
  const itemFlattenedPath = item.path.replace(/^\//, "").replace(/\//g, "-");
@@ -166,16 +166,16 @@ export async function getMainLanguageFiles(docsDir, locale, documentExecutionStr
166
166
  const orderA = orderMap.get(a);
167
167
  const orderB = orderMap.get(b);
168
168
 
169
- // If both files are in the document structure, sort by order
169
+ // If both files are in the documentation structure, sort by order
170
170
  if (orderA !== undefined && orderB !== undefined) {
171
171
  return orderA - orderB;
172
172
  }
173
173
 
174
- // If only one file is in the document structure, it comes first
174
+ // If only one file is in the documentation structure, it comes first
175
175
  if (orderA !== undefined) return -1;
176
176
  if (orderB !== undefined) return 1;
177
177
 
178
- // If neither file is in the document structure, maintain alphabetical order
178
+ // If neither file is in the documentation structure, maintain alphabetical order
179
179
  return a.localeCompare(b);
180
180
  });
181
181
  }
@@ -200,8 +200,8 @@ export function fileNameToFlatPath(fileName) {
200
200
  }
201
201
 
202
202
  /**
203
- * Find document structure item by flattened file name
204
- * @param {Array} documentExecutionStructure - Array of document structure items
203
+ * Find documentation structure item by flattened file name
204
+ * @param {Array} documentExecutionStructure - Array of documentation structure items
205
205
  * @param {string} flatName - Flattened file name
206
206
  * @returns {Object|null} Found item or null
207
207
  */
@@ -215,7 +215,7 @@ export function findItemByFlatName(documentExecutionStructure, flatName) {
215
215
  /**
216
216
  * Process selected files and convert to found items with content
217
217
  * @param {string[]} selectedFiles - Array of selected file names
218
- * @param {Array} documentExecutionStructure - Array of document structure items
218
+ * @param {Array} documentExecutionStructure - Array of documentation structure items
219
219
  * @param {string} docsDir - Docs directory path
220
220
  * @returns {Promise<Object[]>} Array of found items with content
221
221
  */
@@ -244,7 +244,7 @@ export async function processSelectedFiles(selectedFiles, documentExecutionStruc
244
244
 
245
245
  foundItems.push(result);
246
246
  } else {
247
- console.warn(`⚠️ No document structure item found for file: ${selectedFile}`);
247
+ console.warn(`⚠️ No documentation structure item found for file: ${selectedFile}`);
248
248
  }
249
249
  }
250
250
 
@@ -87,7 +87,7 @@ function checkDeadLinks(markdown, source, allowedLinks, errorMessages) {
87
87
  // Check if this link is in the allowed links set
88
88
  if (!allowedLinks.has(path)) {
89
89
  errorMessages.push(
90
- `Found a dead link in ${source}: [${match[1]}](${trimLink}), ensure the link exists in the document structure path`,
90
+ `Found a dead link in ${source}: [${match[1]}](${trimLink}), ensure the link exists in the documentation structure path`,
91
91
  );
92
92
  }
93
93
  }