@aigne/doc-smith 0.8.12-beta.8 → 0.8.12

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 (264) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/agents/publish/index.yaml +4 -0
  3. package/agents/publish/publish-docs.mjs +77 -5
  4. package/agents/publish/translate-meta.mjs +103 -0
  5. package/agents/update/generate-document.yaml +30 -28
  6. package/agents/update/update-document-detail.yaml +3 -1
  7. package/agents/utils/update-branding.mjs +69 -0
  8. package/package.json +16 -2
  9. package/prompts/common/document/role-and-personality.md +3 -1
  10. package/prompts/detail/d2-diagram/guide.md +7 -1
  11. package/prompts/detail/d2-diagram/user-prompt.md +3 -0
  12. package/prompts/detail/generate/system-prompt.md +6 -7
  13. package/prompts/detail/generate/user-prompt.md +12 -3
  14. package/prompts/detail/update/user-prompt.md +0 -2
  15. package/prompts/structure/update/user-prompt.md +0 -4
  16. package/utils/file-utils.mjs +69 -24
  17. package/utils/markdown-checker.mjs +0 -20
  18. package/utils/request.mjs +7 -0
  19. package/utils/upload-files.mjs +231 -0
  20. package/utils/utils.mjs +11 -1
  21. package/.aigne/doc-smith/config.yaml +0 -77
  22. package/.aigne/doc-smith/history.yaml +0 -37
  23. package/.aigne/doc-smith/media-description.yaml +0 -91
  24. package/.aigne/doc-smith/output/structure-plan.json +0 -162
  25. package/.aigne/doc-smith/preferences.yml +0 -97
  26. package/.aigne/doc-smith/upload-cache.yaml +0 -1830
  27. package/.github/PULL_REQUEST_TEMPLATE.md +0 -28
  28. package/.github/workflows/ci.yml +0 -54
  29. package/.github/workflows/create-release-pr.yaml +0 -21
  30. package/.github/workflows/publish-docs.yml +0 -65
  31. package/.github/workflows/release.yml +0 -49
  32. package/.github/workflows/reviewer.yml +0 -54
  33. package/.release-please-manifest.json +0 -3
  34. package/RELEASE.md +0 -9
  35. package/assets/screenshots/doc-complete-setup.png +0 -0
  36. package/assets/screenshots/doc-generate-docs.png +0 -0
  37. package/assets/screenshots/doc-generate.png +0 -0
  38. package/assets/screenshots/doc-generated-successfully.png +0 -0
  39. package/assets/screenshots/doc-publish.png +0 -0
  40. package/assets/screenshots/doc-regenerate.png +0 -0
  41. package/assets/screenshots/doc-translate-langs.png +0 -0
  42. package/assets/screenshots/doc-translate.png +0 -0
  43. package/assets/screenshots/doc-update.png +0 -0
  44. package/biome.json +0 -73
  45. package/codecov.yml +0 -15
  46. package/docs/_sidebar.md +0 -15
  47. package/docs/configuration-initial-setup.ja.md +0 -179
  48. package/docs/configuration-initial-setup.md +0 -198
  49. package/docs/configuration-initial-setup.zh-TW.md +0 -179
  50. package/docs/configuration-initial-setup.zh.md +0 -179
  51. package/docs/configuration-managing-preferences.ja.md +0 -100
  52. package/docs/configuration-managing-preferences.md +0 -100
  53. package/docs/configuration-managing-preferences.zh-TW.md +0 -100
  54. package/docs/configuration-managing-preferences.zh.md +0 -100
  55. package/docs/configuration.ja.md +0 -69
  56. package/docs/configuration.md +0 -69
  57. package/docs/configuration.zh-TW.md +0 -69
  58. package/docs/configuration.zh.md +0 -69
  59. package/docs/getting-started.ja.md +0 -107
  60. package/docs/getting-started.md +0 -107
  61. package/docs/getting-started.zh-TW.md +0 -107
  62. package/docs/getting-started.zh.md +0 -107
  63. package/docs/guides-cleaning-up.ja.md +0 -51
  64. package/docs/guides-cleaning-up.md +0 -52
  65. package/docs/guides-cleaning-up.zh-TW.md +0 -51
  66. package/docs/guides-cleaning-up.zh.md +0 -51
  67. package/docs/guides-evaluating-documents.ja.md +0 -66
  68. package/docs/guides-evaluating-documents.md +0 -107
  69. package/docs/guides-evaluating-documents.zh-TW.md +0 -66
  70. package/docs/guides-evaluating-documents.zh.md +0 -66
  71. package/docs/guides-generating-documentation.ja.md +0 -151
  72. package/docs/guides-generating-documentation.md +0 -89
  73. package/docs/guides-generating-documentation.zh-TW.md +0 -151
  74. package/docs/guides-generating-documentation.zh.md +0 -151
  75. package/docs/guides-interactive-chat.ja.md +0 -85
  76. package/docs/guides-interactive-chat.md +0 -93
  77. package/docs/guides-interactive-chat.zh-TW.md +0 -85
  78. package/docs/guides-interactive-chat.zh.md +0 -85
  79. package/docs/guides-managing-history.ja.md +0 -48
  80. package/docs/guides-managing-history.md +0 -53
  81. package/docs/guides-managing-history.zh-TW.md +0 -48
  82. package/docs/guides-managing-history.zh.md +0 -48
  83. package/docs/guides-publishing-your-docs.ja.md +0 -78
  84. package/docs/guides-publishing-your-docs.md +0 -83
  85. package/docs/guides-publishing-your-docs.zh-TW.md +0 -78
  86. package/docs/guides-publishing-your-docs.zh.md +0 -78
  87. package/docs/guides-translating-documentation.ja.md +0 -95
  88. package/docs/guides-translating-documentation.md +0 -100
  89. package/docs/guides-translating-documentation.zh-TW.md +0 -95
  90. package/docs/guides-translating-documentation.zh.md +0 -95
  91. package/docs/guides-updating-documentation.ja.md +0 -77
  92. package/docs/guides-updating-documentation.md +0 -79
  93. package/docs/guides-updating-documentation.zh-TW.md +0 -77
  94. package/docs/guides-updating-documentation.zh.md +0 -77
  95. package/docs/guides.ja.md +0 -32
  96. package/docs/guides.md +0 -32
  97. package/docs/guides.zh-TW.md +0 -32
  98. package/docs/guides.zh.md +0 -32
  99. package/docs/overview.ja.md +0 -61
  100. package/docs/overview.md +0 -61
  101. package/docs/overview.zh-TW.md +0 -61
  102. package/docs/overview.zh.md +0 -61
  103. package/docs/release-notes.ja.md +0 -255
  104. package/docs/release-notes.md +0 -288
  105. package/docs/release-notes.zh-TW.md +0 -255
  106. package/docs/release-notes.zh.md +0 -255
  107. package/prompts/common/afs/afs-tools-usage.md +0 -5
  108. package/prompts/common/afs/use-afs-instruction.md +0 -1
  109. package/release-please-config.json +0 -14
  110. package/tests/agents/chat/chat.test.mjs +0 -46
  111. package/tests/agents/clear/choose-contents.test.mjs +0 -284
  112. package/tests/agents/clear/clear-auth-tokens.test.mjs +0 -268
  113. package/tests/agents/clear/clear-document-config.test.mjs +0 -167
  114. package/tests/agents/clear/clear-document-structure.test.mjs +0 -380
  115. package/tests/agents/clear/clear-generated-docs.test.mjs +0 -222
  116. package/tests/agents/evaluate/code-snippet.test.mjs +0 -163
  117. package/tests/agents/evaluate/fixtures/api-services.md +0 -87
  118. package/tests/agents/evaluate/fixtures/js-sdk.md +0 -94
  119. package/tests/agents/evaluate/generate-report.test.mjs +0 -312
  120. package/tests/agents/generate/check-document-structure.test.mjs +0 -45
  121. package/tests/agents/generate/check-need-generate-structure.test.mjs +0 -279
  122. package/tests/agents/generate/document-structure-tools/add-document.test.mjs +0 -449
  123. package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +0 -410
  124. package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +0 -277
  125. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +0 -476
  126. package/tests/agents/generate/document-structure-tools/update-document.test.mjs +0 -548
  127. package/tests/agents/generate/generate-structure.test.mjs +0 -45
  128. package/tests/agents/generate/user-review-document-structure.test.mjs +0 -319
  129. package/tests/agents/history/view.test.mjs +0 -97
  130. package/tests/agents/init/init.test.mjs +0 -1657
  131. package/tests/agents/prefs/prefs.test.mjs +0 -431
  132. package/tests/agents/publish/publish-docs.test.mjs +0 -787
  133. package/tests/agents/translate/choose-language.test.mjs +0 -311
  134. package/tests/agents/translate/translate-document.test.mjs +0 -51
  135. package/tests/agents/update/check-document.test.mjs +0 -463
  136. package/tests/agents/update/check-update-is-single.test.mjs +0 -300
  137. package/tests/agents/update/document-tools/update-document-content.test.mjs +0 -329
  138. package/tests/agents/update/generate-document.test.mjs +0 -51
  139. package/tests/agents/update/save-and-translate-document.test.mjs +0 -369
  140. package/tests/agents/update/user-review-document.test.mjs +0 -582
  141. package/tests/agents/utils/action-success.test.mjs +0 -54
  142. package/tests/agents/utils/check-detail-result.test.mjs +0 -743
  143. package/tests/agents/utils/check-feedback-refiner.test.mjs +0 -478
  144. package/tests/agents/utils/choose-docs.test.mjs +0 -406
  145. package/tests/agents/utils/exit.test.mjs +0 -70
  146. package/tests/agents/utils/feedback-refiner.test.mjs +0 -51
  147. package/tests/agents/utils/find-item-by-path.test.mjs +0 -517
  148. package/tests/agents/utils/find-user-preferences-by-path.test.mjs +0 -382
  149. package/tests/agents/utils/format-document-structure.test.mjs +0 -364
  150. package/tests/agents/utils/fs.test.mjs +0 -267
  151. package/tests/agents/utils/load-sources.test.mjs +0 -1470
  152. package/tests/agents/utils/save-docs.test.mjs +0 -109
  153. package/tests/agents/utils/save-output.test.mjs +0 -315
  154. package/tests/agents/utils/save-single-doc.test.mjs +0 -364
  155. package/tests/agents/utils/transform-detail-datasources.test.mjs +0 -320
  156. package/tests/utils/auth-utils.test.mjs +0 -596
  157. package/tests/utils/blocklet.test.mjs +0 -336
  158. package/tests/utils/conflict-detector.test.mjs +0 -355
  159. package/tests/utils/constants.test.mjs +0 -295
  160. package/tests/utils/d2-utils.test.mjs +0 -437
  161. package/tests/utils/deploy.test.mjs +0 -399
  162. package/tests/utils/docs-finder-utils.test.mjs +0 -650
  163. package/tests/utils/file-utils.test.mjs +0 -521
  164. package/tests/utils/history-utils.test.mjs +0 -206
  165. package/tests/utils/kroki-utils.test.mjs +0 -646
  166. package/tests/utils/linter/fixtures/css/keyword-error.css +0 -1
  167. package/tests/utils/linter/fixtures/css/missing-semicolon.css +0 -1
  168. package/tests/utils/linter/fixtures/css/syntax-error.css +0 -1
  169. package/tests/utils/linter/fixtures/css/undeclare-variable.css +0 -1
  170. package/tests/utils/linter/fixtures/css/unused-variable.css +0 -2
  171. package/tests/utils/linter/fixtures/css/valid-code.css +0 -1
  172. package/tests/utils/linter/fixtures/dockerfile/keyword-error.dockerfile +0 -1
  173. package/tests/utils/linter/fixtures/dockerfile/missing-semicolon.dockerfile +0 -2
  174. package/tests/utils/linter/fixtures/dockerfile/syntax-error.dockerfile +0 -2
  175. package/tests/utils/linter/fixtures/dockerfile/undeclare-variable.dockerfile +0 -1
  176. package/tests/utils/linter/fixtures/dockerfile/unused-variable.dockerfile +0 -1
  177. package/tests/utils/linter/fixtures/dockerfile/valid-code.dockerfile +0 -2
  178. package/tests/utils/linter/fixtures/go/keyword-error.go +0 -5
  179. package/tests/utils/linter/fixtures/go/missing-semicolon.go +0 -5
  180. package/tests/utils/linter/fixtures/go/syntax-error.go +0 -6
  181. package/tests/utils/linter/fixtures/go/undeclare-variable.go +0 -5
  182. package/tests/utils/linter/fixtures/go/unused-variable.go +0 -5
  183. package/tests/utils/linter/fixtures/go/valid-code.go +0 -7
  184. package/tests/utils/linter/fixtures/js/keyword-error.js +0 -3
  185. package/tests/utils/linter/fixtures/js/missing-semicolon.js +0 -6
  186. package/tests/utils/linter/fixtures/js/syntax-error.js +0 -4
  187. package/tests/utils/linter/fixtures/js/undeclare-variable.js +0 -3
  188. package/tests/utils/linter/fixtures/js/unused-variable.js +0 -7
  189. package/tests/utils/linter/fixtures/js/valid-code.js +0 -15
  190. package/tests/utils/linter/fixtures/json/keyword-error.json +0 -1
  191. package/tests/utils/linter/fixtures/json/missing-semicolon.json +0 -1
  192. package/tests/utils/linter/fixtures/json/syntax-error.json +0 -1
  193. package/tests/utils/linter/fixtures/json/undeclare-variable.json +0 -1
  194. package/tests/utils/linter/fixtures/json/unused-variable.json +0 -1
  195. package/tests/utils/linter/fixtures/json/valid-code.json +0 -1
  196. package/tests/utils/linter/fixtures/jsx/keyword-error.jsx +0 -5
  197. package/tests/utils/linter/fixtures/jsx/missing-semicolon.jsx +0 -5
  198. package/tests/utils/linter/fixtures/jsx/syntax-error.jsx +0 -5
  199. package/tests/utils/linter/fixtures/jsx/undeclare-variable.jsx +0 -5
  200. package/tests/utils/linter/fixtures/jsx/unused-variable.jsx +0 -4
  201. package/tests/utils/linter/fixtures/jsx/valid-code.jsx +0 -5
  202. package/tests/utils/linter/fixtures/python/keyword-error.py +0 -3
  203. package/tests/utils/linter/fixtures/python/missing-semicolon.py +0 -2
  204. package/tests/utils/linter/fixtures/python/syntax-error.py +0 -3
  205. package/tests/utils/linter/fixtures/python/undeclare-variable.py +0 -3
  206. package/tests/utils/linter/fixtures/python/unused-variable.py +0 -6
  207. package/tests/utils/linter/fixtures/python/valid-code.py +0 -12
  208. package/tests/utils/linter/fixtures/ruby/keyword-error.rb +0 -2
  209. package/tests/utils/linter/fixtures/ruby/missing-semicolon.rb +0 -1
  210. package/tests/utils/linter/fixtures/ruby/syntax-error.rb +0 -2
  211. package/tests/utils/linter/fixtures/ruby/undeclare-variable.rb +0 -1
  212. package/tests/utils/linter/fixtures/ruby/unused-variable.rb +0 -2
  213. package/tests/utils/linter/fixtures/ruby/valid-code.rb +0 -1
  214. package/tests/utils/linter/fixtures/sass/keyword-error.sass +0 -2
  215. package/tests/utils/linter/fixtures/sass/missing-semicolon.sass +0 -3
  216. package/tests/utils/linter/fixtures/sass/syntax-error.sass +0 -3
  217. package/tests/utils/linter/fixtures/sass/undeclare-variable.sass +0 -2
  218. package/tests/utils/linter/fixtures/sass/unused-variable.sass +0 -4
  219. package/tests/utils/linter/fixtures/sass/valid-code.sass +0 -2
  220. package/tests/utils/linter/fixtures/scss/keyword-error.scss +0 -1
  221. package/tests/utils/linter/fixtures/scss/missing-semicolon.scss +0 -1
  222. package/tests/utils/linter/fixtures/scss/syntax-error.scss +0 -1
  223. package/tests/utils/linter/fixtures/scss/undeclare-variable.scss +0 -1
  224. package/tests/utils/linter/fixtures/scss/unused-variable.scss +0 -2
  225. package/tests/utils/linter/fixtures/scss/valid-code.scss +0 -1
  226. package/tests/utils/linter/fixtures/shell/keyword-error.sh +0 -5
  227. package/tests/utils/linter/fixtures/shell/missing-semicolon.sh +0 -3
  228. package/tests/utils/linter/fixtures/shell/syntax-error.sh +0 -4
  229. package/tests/utils/linter/fixtures/shell/undeclare-variable.sh +0 -3
  230. package/tests/utils/linter/fixtures/shell/unused-variable.sh +0 -4
  231. package/tests/utils/linter/fixtures/shell/valid-code.sh +0 -3
  232. package/tests/utils/linter/fixtures/ts/keyword-error.ts +0 -1
  233. package/tests/utils/linter/fixtures/ts/missing-semicolon.ts +0 -1
  234. package/tests/utils/linter/fixtures/ts/syntax-error.ts +0 -1
  235. package/tests/utils/linter/fixtures/ts/undeclare-variable.ts +0 -1
  236. package/tests/utils/linter/fixtures/ts/unused-variable.ts +0 -3
  237. package/tests/utils/linter/fixtures/ts/valid-code.ts +0 -3
  238. package/tests/utils/linter/fixtures/tsx/keyword-error.tsx +0 -5
  239. package/tests/utils/linter/fixtures/tsx/missing-semicolon.tsx +0 -5
  240. package/tests/utils/linter/fixtures/tsx/syntax-error.tsx +0 -5
  241. package/tests/utils/linter/fixtures/tsx/undeclare-variable.tsx +0 -6
  242. package/tests/utils/linter/fixtures/tsx/unused-variable.tsx +0 -6
  243. package/tests/utils/linter/fixtures/tsx/valid-code.tsx +0 -5
  244. package/tests/utils/linter/fixtures/vue/keyword-error.vue +0 -6
  245. package/tests/utils/linter/fixtures/vue/missing-semicolon.vue +0 -6
  246. package/tests/utils/linter/fixtures/vue/syntax-error.vue +0 -6
  247. package/tests/utils/linter/fixtures/vue/undeclare-variable.vue +0 -6
  248. package/tests/utils/linter/fixtures/vue/unused-variable.vue +0 -7
  249. package/tests/utils/linter/fixtures/vue/valid-code.vue +0 -6
  250. package/tests/utils/linter/fixtures/yaml/keyword-error.yml +0 -1
  251. package/tests/utils/linter/fixtures/yaml/missing-semicolon.yml +0 -2
  252. package/tests/utils/linter/fixtures/yaml/syntax-error.yml +0 -1
  253. package/tests/utils/linter/fixtures/yaml/undeclare-variable.yml +0 -1
  254. package/tests/utils/linter/fixtures/yaml/unused-variable.yml +0 -2
  255. package/tests/utils/linter/fixtures/yaml/valid-code.yml +0 -3
  256. package/tests/utils/linter/index.test.mjs +0 -440
  257. package/tests/utils/linter/scan-results.mjs +0 -42
  258. package/tests/utils/load-config.test.mjs +0 -141
  259. package/tests/utils/markdown/index.test.mjs +0 -478
  260. package/tests/utils/mermaid-validator.test.mjs +0 -541
  261. package/tests/utils/mock-chat-model.mjs +0 -12
  262. package/tests/utils/preferences-utils.test.mjs +0 -465
  263. package/tests/utils/save-value-to-config.test.mjs +0 -483
  264. package/tests/utils/utils.test.mjs +0 -941
@@ -1,66 +0,0 @@
1
- # ドキュメントの評価
2
-
3
- `evaluate` コマンドは、生成されたドキュメントの品質と整合性を評価するための体系的なプロセスを提供します。初期設定で定義した目標に対して、ドキュメント全体の構造と個々のドキュメントの内容の両方を分析します。このプロセスにより詳細なレポートが生成され、改善点を特定し、ドキュメントが意図した目的と対象読者に効果的に役立つことを確認するのに役立ちます。
4
-
5
- ## 仕組み
6
-
7
- 評価プロセスは、主に2つの段階で動作します。まず、高レベルのドキュメント構造を評価し、次に、個々のドキュメントの内容を分析します。
8
-
9
- 1. **構造評価**: このツールは、ドキュメント全体の構成(目次など)を検査します。選択したドキュメントの目標、対象読者、および内容の深さに基づいて、構造が論理的で完全であるかどうかを検証します。
10
- 2. **内容評価**: 構造を分析した後、ツールは各ドキュメントの内容を検査します。読みやすさ、一貫性、正確性など、いくつかの品質次元に対してドキュメントをスコアリングします。また、コード例が正しく実装されているかもチェックします。
11
-
12
- 完了すると、ツールは結果をユーザーフレンドリーなHTMLレポートにまとめ、高レベルのスコアと詳細で実行可能なフィードバックの両方を提供します。
13
-
14
- ## 評価の実行
15
-
16
- 評価プロセスを開始するには、ターミナルで次のコマンドを実行します。
17
-
18
- ```bash
19
- aignite evaluate
20
- ```
21
-
22
- コマンドは、ドキュメントを分析する際の進捗状況を表示します。完了すると、生成されたレポートファイルの場所を示すメッセージが表示されます。
23
-
24
- ```text
25
- ✔ Generate evaluation report
26
- Evaluation report generated successfully.
27
- - JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
28
- - HTML Report: .aigc/evaluate/20231027103000/report.html
29
- ```
30
-
31
- Webブラウザで `report.html` ファイルを開くと、詳細な分析を表示できます。
32
-
33
- ## レポートの理解
34
-
35
- 評価レポートは、分析プロセスの2つの段階を反映して、2つの主要なセクションに分かれています。
36
-
37
- ### 構造評価
38
-
39
- このセクションでは、ドキュメント全体のアーキテクチャに関するフィードバックを提供します。生成されたドキュメント階層が、指定した設定とどれだけ整合しているかを測定します。
40
-
41
- | ディメンション | 説明 |
42
- | :--- | :--- |
43
- | **目的カバレッジ** | ドキュメント構造が、選択した主要な目標(例:「すぐに始める」)を効果的にサポートしているかを評価します。 |
44
- | **対象読者カバレッジ** | 構造が、定義した対象読者(例:「非技術系ユーザー」)に対して適切であるかを判断します。 |
45
- | **深度カバレッジ** | 構造の詳細レベルが、選択した内容の深さ(例:「すべてのパラメータをカバー」)と一致しているかを確認します。 |
46
-
47
- ### ドキュメント内容の評価
48
-
49
- このセクションでは、内容の品質をドキュメントごとに分析します。各ドキュメントは、一連の標準化された基準に基づいてスコアリングされます。
50
-
51
- | ディメンション | 説明 |
52
- | :--- | :--- |
53
- | **読みやすさ** | テキストがどれだけ読みやすく、理解しやすいかを測定します。 |
54
- | **整合性** | ドキュメント内の情報の論理的な流れと構成を評価します。 |
55
- | **内容の品質** | 提示された情報の正確性、関連性、明確さを評価します。 |
56
- | **統一性** | ドキュメント全体で用語、フォーマット、スタイルが統一されているかを確認します。 |
57
- | **目的との整合性** | 内容が指定されたドキュメントの目標をどれだけ満たしているかを判断します。 |
58
- | **対象読者との整合性** | 言語と例が対象読者に適しているかを評価します。 |
59
- | **知識レベルとの整合性** | 内容の複雑さが、定義された読者の知識レベルと一致しているかを確認します。 |
60
- | **ナビゲーション性** | ユーザーが情報を見つけるのに役立つ内部リンクや構造要素の有効性を評価します。 |
61
-
62
- ## まとめ
63
-
64
- `evaluate` コマンドの使用は、正確で効果的なドキュメントを維持するための重要なステップです。具体的な指標と特定のフィードバックを提供し、内容を体系的に改善することができます。評価レポートを確認した後、的を絞った改善を進めることができます。
65
-
66
- このフィードバックに基づいてドキュメントを修正する次のステップについては、[ドキュメントの更新](./guides-updating-documentation.md)のガイドを参照してください。
@@ -1,107 +0,0 @@
1
- # Evaluating Documents
2
-
3
- The `evaluate` command provides a systematic method to assess the quality and completeness of your generated documentation. It analyzes both the overall document structure and the content of individual files against the criteria defined during project setup. The process concludes by generating a detailed report, which helps identify areas for improvement and ensures the documentation aligns with its intended purpose and audience.
4
-
5
- ## The Evaluation Process
6
-
7
- The evaluation command executes a two-stage analysis to provide a comprehensive assessment of your documentation.
8
-
9
- ```d2
10
- direction: down
11
-
12
- start: {
13
- label: "Run Command\naignite evaluate"
14
- shape: oval
15
- }
16
-
17
- structure-eval: {
18
- label: "Stage 1: Evaluate\nDocument Structure"
19
- shape: rectangle
20
- }
21
-
22
- content-eval: {
23
- label: "Stage 2: Evaluate\nDocument Content"
24
- shape: rectangle
25
- }
26
-
27
- report-gen: {
28
- label: "Generate Report"
29
- shape: rectangle
30
- }
31
-
32
- output: {
33
- label: "Output HTML &\nJSON Report Files"
34
- shape: oval
35
- }
36
-
37
- start -> structure-eval: "Analyzes overall organization"
38
- structure-eval -> content-eval: "Analyzes each file individually"
39
- content-eval -> report-gen: "Aggregates all findings"
40
- report-gen -> output: "Saves report to disk"
41
- ```
42
-
43
- 1. **Structure Evaluation**: The tool first examines the documentation's high-level organization, analogous to a table of contents. It verifies whether the structure is logical and complete based on the specified documentation goals, target audience, and content depth.
44
- 2. **Content Evaluation**: Following the structural analysis, the tool inspects the content of each document. It scores each file against several quality dimensions, including readability, coherence, and factual accuracy. It also validates the correctness and formatting of included code snippets.
45
-
46
- The findings from both stages are compiled into an HTML report that presents high-level scores and specific, actionable feedback.
47
-
48
- ## How to Run an Evaluation
49
-
50
- To initiate the evaluation process, execute the `evaluate` command from your project's root directory.
51
-
52
- ### Execute the Command
53
-
54
- Open your terminal and run the following command:
55
-
56
- ```bash
57
- aignite evaluate
58
- ```
59
-
60
- The tool will display its progress as it analyzes the documentation.
61
-
62
- ### Review the Output
63
-
64
- Upon completion, a confirmation message will appear in the terminal, specifying the location of the generated report files.
65
-
66
- ```text
67
- ✔ Generate evaluation report
68
- Evaluation report generated successfully.
69
- - JSON Report: .aigc/evaluate/20240520114500/integrity-report.json
70
- - HTML Report: .aigc/evaluate/20240520114500/report.html
71
- ```
72
-
73
- Open the `report.html` file in a web browser to view the detailed analysis.
74
-
75
- ## Understanding the Evaluation Report
76
-
77
- The report is organized into sections that correspond to the stages of the evaluation process, providing a clear breakdown of the analysis.
78
-
79
- ### Structure Evaluation Details
80
-
81
- This section presents feedback on the overall architecture of your documentation. It measures how effectively the document hierarchy aligns with the project's configuration.
82
-
83
- | Dimension | Description |
84
- | :--- | :--- |
85
- | **Purpose Coverage** | Assesses if the document structure adequately supports the primary goals selected (e.g., "Get started quickly"). |
86
- | **Audience Coverage** | Determines if the structure is organized in a way that is suitable for the defined target audience (e.g., "non-technical users"). |
87
- | **Depth Coverage** | Checks if the level of detail implied by the structure matches the selected content depth (e.g., "covers all parameters"). |
88
-
89
- ### Document Content Evaluation Details
90
-
91
- This section provides a file-by-file breakdown of content quality. Each document is scored based on a set of standardized criteria.
92
-
93
- | Dimension | Description |
94
- | :--- | :--- |
95
- | **Readability** | Measures the ease with which the text can be read and understood. |
96
- | **Coherence** | Evaluates the logical flow and organization of information within the document. |
97
- | **Content Quality** | Assesses the accuracy, relevance, and clarity of the information presented. |
98
- | **Consistency** | Checks for uniform terminology, formatting, and style throughout the document. |
99
- | **Purpose Alignment** | Determines how well the content fulfills the specified documentation goals. |
100
- | **Audience Alignment** | Assesses if the language, tone, and examples are appropriate for the target audience. |
101
- | **Knowledge Level Alignment** | Checks if the content's complexity matches the defined reader knowledge level. |
102
-
103
- ## Summary
104
-
105
- Using the `evaluate` command is an essential step for maintaining accurate and effective documentation. It provides objective metrics and specific feedback, enabling a methodical approach to refining your content. After reviewing the evaluation report, you can make targeted improvements to enhance documentation quality.
106
-
107
- For guidance on modifying your documents based on this feedback, refer to the [Updating Documentation](./guides-updating-documentation.md) guide.
@@ -1,66 +0,0 @@
1
- # 評估文件
2
-
3
- `evaluate` 指令提供了一個系統化的流程,用以評估您所產生的文件的品質與契合度。它會根據您在初始設定中定義的目標,分析整體結構以及個別文件的內容。此流程會產出一份詳細的報告,幫助您找出需要改進的地方,並確保文件能有效地服務其預期目的和讀者。
4
-
5
- ## 運作方式
6
-
7
- 評估流程主要分為兩個階段。首先,它會評估高層次的文件結構;其次,它會分析每份個別文件的內容。
8
-
9
- 1. **結構評估**:該工具會檢查您文件的整體組織(例如目錄)。它會根據您所選的文件目標、目標讀者和內容深度,驗證結構是否合乎邏輯且完整。
10
- 2. **內容評估**:分析完結構後,該工具會檢視每份文件的內容。它會根據多個品質維度(包括可讀性、連貫性和準確性)對文件進行評分。它還會檢查程式碼範例的實作是否正確。
11
-
12
- 完成後,該工具會將結果彙編成一份易於使用的 HTML 報告,提供高層次的分數和詳細、可行的回饋。
13
-
14
- ## 執行評估
15
-
16
- 要啟動評估流程,請在您的終端機中執行以下指令:
17
-
18
- ```bash
19
- aignite evaluate
20
- ```
21
-
22
- 該指令在分析您的文件時會顯示進度。完成後,它會提供一則訊息,指出所產生的報告檔案的位置。
23
-
24
- ```text
25
- ✔ Generate evaluation report
26
- Evaluation report generated successfully.
27
- - JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
28
- - HTML Report: .aigc/evaluate/20231027103000/report.html
29
- ```
30
-
31
- 您可以在網頁瀏覽器中開啟 `report.html` 檔案,以查看詳細的分析。
32
-
33
- ## 理解報告
34
-
35
- 評估報告分為兩個主要部分,對應分析流程的兩個階段。
36
-
37
- ### 結構評估
38
-
39
- 此部分提供關於您文件整體架構的回饋。它衡量所產生的文件層級結構與您指定的設定的契合程度。
40
-
41
- | 維度 | 說明 |
42
- | :--- | :--- |
43
- | **目的涵蓋率** | 評估文件結構是否有效地支援您所選的主要目標(例如,「快速入門」)。 |
44
- | **讀者涵蓋率** | 判斷結構是否適合您所定義的目標讀者(例如,「非技術使用者」)。 |
45
- | **深度涵蓋率** | 檢查結構中的細節層級是否與您所選的內容深度相符(例如,「涵蓋所有參數」)。 |
46
-
47
- ### 文件內容評估
48
-
49
- 此部分逐一分析各文件的內容品質。每份文件都會根據一組標準化準則進行評分。
50
-
51
- | 維度 | 說明 |
52
- | :--- | :--- |
53
- | **可讀性** | 衡量文字閱讀和理解的難易程度。 |
54
- | **連貫性** | 評估文件內資訊的邏輯流程與組織。 |
55
- | **內容品質** | 評估所呈現資訊的準確性、相關性和清晰度。 |
56
- | **一致性** | 檢查整份文件中的術語、格式和風格是否統一。 |
57
- | **目的契合度** | 判斷內容與指定文件目標的契合程度。 |
58
- | **讀者契合度** | 評估語言和範例是否適合目標讀者。 |
59
- | **知識水準契合度** | 檢查內容的複雜度是否與所定義的讀者知識水準相符。 |
60
- | **導覽性** | 評估內部連結和結構元素在幫助使用者尋找資訊方面的有效性。 |
61
-
62
- ## 總結
63
-
64
- 使用 `evaluate` 指令是維護準確且有效文件的關鍵步驟。它提供具體的指標和明確的回饋,讓您能有條不紊地完善您的內容。檢視評估報告後,您便可以著手進行針對性的改進。
65
-
66
- 關於根據此回饋修改文件的後續步驟,請參閱 [更新文件](./guides-updating-documentation.md) 的指南。
@@ -1,66 +0,0 @@
1
- # 评估文档
2
-
3
- `evaluate` 命令提供了一个系统化的流程,用于评估您生成的文档的质量和一致性。它会根据您在初始设置中定义的目标,分析文档的整体结构和单个文档的内容。此过程会生成一份详细的报告,帮助您识别需要改进的地方,并确保文档能够有效地服务于其预定目的和受众。
4
-
5
- ## 工作原理
6
-
7
- 评估过程分为两个主要阶段。首先,它评估高层级的文档结构;其次,它分析每个独立文档的内容。
8
-
9
- 1. **结构评估**:该工具会检查您文档的整体组织结构(例如目录)。它会根据您选择的文档目标、目标受众和内容深度,验证结构是否逻辑清晰且完整。
10
- 2. **内容评估**:在分析结构之后,该工具会检查每个文档的内容。它会根据可读性、连贯性和准确性等多个质量维度对文档进行评分。它还会检查代码示例的正确实现。
11
-
12
- 完成后,该工具会将结果汇编成一份用户友好的 HTML 报告,提供高层级评分和详细、可操作的反馈。
13
-
14
- ## 运行评估
15
-
16
- 要启动评估过程,请在终端中执行以下命令:
17
-
18
- ```bash
19
- aignite evaluate
20
- ```
21
-
22
- 该命令在分析您的文档时会显示进度。完成后,它将提供一条消息,指明生成的报告文件的位置。
23
-
24
- ```text
25
- ✔ Generate evaluation report
26
- Evaluation report generated successfully.
27
- - JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
28
- - HTML Report: .aigc/evaluate/20231027103000/report.html
29
- ```
30
-
31
- 您可以在 Web 浏览器中打开 `report.html` 文件以查看详细分析。
32
-
33
- ## 理解报告
34
-
35
- 评估报告分为两个主要部分,对应分析过程的两个阶段。
36
-
37
- ### 结构评估
38
-
39
- 本节提供关于您文档整体架构的反馈。它衡量了生成的文档层次结构与您指定配置的对齐程度。
40
-
41
- | 维度 | 描述 |
42
- | :--- | :--- |
43
- | **目的覆盖率** | 评估文档结构是否有效支持您选择的主要目标(例如,“快速入门”)。 |
44
- | **受众覆盖率** | 判断结构是否适合您定义的目标受众(例如,“非技术用户”)。 |
45
- | **深度覆盖率** | 检查结构中的细节层次是否与您选择的内容深度相匹配(例如,“涵盖所有参数”)。 |
46
-
47
- ### 文档内容评估
48
-
49
- 本节按文档逐一分解内容质量。每个文档都根据一组标准化标准进行评分。
50
-
51
- | 维度 | 描述 |
52
- | :--- | :--- |
53
- | **可读性** | 衡量文本阅读和理解的难易程度。 |
54
- | **连贯性** | 评估文档内信息的逻辑流程和组织。 |
55
- | **内容质量** | 评估所呈现信息的准确性、相关性和清晰度。 |
56
- | **一致性** | 检查整个文档中术语、格式和风格的统一性。 |
57
- | **目的对齐** | 判断内容与指定的文档目标的契合程度。 |
58
- | **受众对齐** | 评估语言和示例是否适合目标受众。 |
59
- | **知识水平对齐** | 检查内容复杂度是否与定义的读者知识水平相匹配。 |
60
- | **导航性** | 评估内部链接和结构元素在帮助用户查找信息方面的有效性。 |
61
-
62
- ## 总结
63
-
64
- 使用 `evaluate` 命令是维护准确有效文档的关键步骤。它提供具体的指标和明确的反馈,让您能够有条不紊地优化内容。在审阅评估报告后,您可以着手进行有针对性的改进。
65
-
66
- 关于根据此反馈修改文档的后续步骤,请参阅[更新文档](./guides-updating-documentation.md)指南。
@@ -1,151 +0,0 @@
1
- # ドキュメントの生成
2
-
3
- このガイドでは、プロジェクトのソースファイルから完全なドキュメント一式を作成するための体系的な手順を説明します。このプロセスは `aigne doc generate` コマンドを使用して開始します。このコマンドはコードベースを分析し、論理的な構造を提案し、各ドキュメントのコンテンツを書き込みます。
4
-
5
- このコマンドは、ドキュメントを最初に作成するための主要なツールです。作成済みのドキュメントを修正する場合は、[ドキュメントの更新](./guides-updating-documentation.md)ガイドを参照してください。
6
-
7
- ### 生成ワークフロー
8
-
9
- `generate` コマンドは、ドキュメントを構築するための一連の自動化されたステップを実行します。このプロセスは対話形式で設計されており、コンテンツが書き込まれる前に、提案された構造を確認・承認できます。
10
-
11
- ```d2
12
- direction: down
13
-
14
- start: {
15
- label: "開始"
16
- shape: oval
17
- }
18
-
19
- run_command: {
20
- label: "'aigne doc generate' を実行"
21
- shape: rectangle
22
- }
23
-
24
- check_config: {
25
- label: "設定ファイルは存在するか?"
26
- shape: diamond
27
- }
28
-
29
- interactive_setup: {
30
- label: "対話型セットアップをガイド"
31
- shape: rectangle
32
- tooltip: ".aigne/doc-smith/config.yaml が見つからない場合、対話型セットアップがトリガーされます。"
33
- }
34
-
35
- propose_structure: {
36
- label: "プロジェクトを分析し、ドキュメント構造を提案"
37
- shape: rectangle
38
- }
39
-
40
- review_structure: {
41
- label: "ユーザーが提案された構造を確認"
42
- shape: rectangle
43
- }
44
-
45
- user_approve: {
46
- label: "構造を承認するか?"
47
- shape: diamond
48
- }
49
-
50
- provide_feedback: {
51
- label: "構造を洗練させるためのフィードバックを提供"
52
- shape: rectangle
53
- tooltip: "ユーザーはセクションの名前変更、追加、削除などの変更を要求できます。"
54
- }
55
-
56
- generate_content: {
57
- label: "すべてのドキュメントのコンテンツを生成"
58
- shape: rectangle
59
- }
60
-
61
- end: {
62
- label: "終了"
63
- shape: oval
64
- }
65
-
66
- start -> run_command
67
- run_command -> check_config
68
- check_config -> interactive_setup: {
69
- label: "いいえ"
70
- }
71
- interactive_setup -> propose_structure
72
- check_config -> propose_structure: {
73
- label: "はい"
74
- }
75
- propose_structure -> review_structure
76
- review_structure -> user_approve
77
- user_approve -> provide_feedback: {
78
- label: "いいえ"
79
- }
80
- provide_feedback -> review_structure
81
- user_approve -> generate_content: {
82
- label: "はい"
83
- }
84
- generate_content -> end
85
- ```
86
-
87
- ## ステップバイステップのプロセス
88
-
89
- ドキュメントを生成するには、ターミナルでプロジェクトのルートディレクトリに移動し、以下の手順に従ってください。
90
-
91
- ### 1. 生成コマンドの実行
92
-
93
- `generate` コマンドを実行してプロセスを開始します。ツールはプロジェクトのファイルと構造の分析から始めます。
94
-
95
- ```bash 基本的な生成コマンド
96
- aigne doc generate
97
- ```
98
-
99
- 簡潔にするために、エイリアスの `gen` や `g` を使用することもできます。
100
-
101
- ### 2. ドキュメント構造の確認
102
-
103
- 分析が完了すると、ツールは提案されたドキュメント構造を表示し、確認を求めます。
104
-
105
- ```
106
- ドキュメント構造を最適化しますか?
107
- ❯ いいえ、問題ありません
108
- はい、構造を最適化します(例:「はじめに」を「クイックスタート」に名称変更、「APIリファレンス」を「設定」の前に移動するなど)
109
- ```
110
-
111
- - **いいえ、問題ありません**: このオプションを選択すると、提案された構造を承認し、直接コンテンツ生成に進みます。
112
- - **はい、構造を最適化します**: このオプションを選択すると、プランを修正できます。ツールは対話ループでフィードバックを求めます。次のようなプレーンテキストで指示を与えることができます。
113
- - `「トラブルシューティング」という新しいドキュメントを追加`
114
- - `「レガシー機能」ドキュメントを削除`
115
- - `「インストール」を構造の最上部に移動`
116
-
117
- フィードバックのたびに、AIが構造を修正し、再度確認できます。フィードバックを入力せずにEnterキーを押すと、ループを終了して最終的な構造を承認します。
118
-
119
- ### 3. コンテンツの生成
120
-
121
- ドキュメント構造が承認されると、DocSmithはプラン内の各ドキュメントの詳細なコンテンツの生成を開始します。このプロセスは自動的に実行され、所要時間はプロジェクトの規模と複雑さによって異なります。
122
-
123
- 完了すると、生成されたファイルは設定で指定された出力ディレクトリ(例:`./docs`)に保存されます。
124
-
125
- ## コマンドパラメータ
126
-
127
- `generate` コマンドは、その動作を制御するためのいくつかのオプションパラメータを受け入れます。
128
-
129
- | パラメータ | 説明 | 例 |
130
- |---|---|---|
131
- | `--forceRegenerate` | 既存の構造やコンテンツをすべて無視して、すべてのドキュメントを最初から再構築します。完全にリセットしたい場合に便利です。 | `aigne doc generate --forceRegenerate` |
132
- | `--feedback` | 対話型の確認が始まる前に、構造生成フェーズでAIをガイドするための初期のテキストベースの指示を提供します。 | `aigne doc generate --feedback "Add more API examples"` |
133
- | `--glossary` | 用語集ファイル(例:`glossary.md`)を指定して、ドキュメント全体で一貫した用語の使用を保証します。 | `aigne doc generate --glossary @/path/to/glossary.md` |
134
-
135
- ### 例:完全な再構築の強制
136
-
137
- 以前に生成されたすべてのドキュメントを破棄し、コードの現在の状態に基づいて新しいセットを作成したい場合は、`--forceRegenerate` フラグを使用します。
138
-
139
- ```bash 再構築の強制
140
- aigne doc generate --forceRegenerate
141
- ```
142
-
143
- ## まとめ
144
-
145
- `generate` コマンドは、初期プロジェクトドキュメントを作成するプロセス全体を統括します。自動化されたコード分析と対話型の確認プロセスを組み合わせることで、構造化された関連性の高いドキュメント一式を生成します。
146
-
147
- ドキュメントが生成されたら、次のような操作ができます。
148
-
149
- - [ドキュメントの更新](./guides-updating-documentation.md): 特定のドキュメントに変更を加える。
150
- - [ドキュメントの翻訳](./guides-translating-documentation.md): コンテンツを他の言語に翻訳する。
151
- - [ドキュメントの公開](./guides-publishing-your-docs.md): ドキュメントをオンラインで利用可能にする。
@@ -1,89 +0,0 @@
1
- # Generating Documentation
2
-
3
- This guide provides a step-by-step process for creating a new set of documentation for your project using the `generate` command. This is the primary command used to transform your source files into a structured set of documents from start to finish.
4
-
5
- The generation process is designed to be systematic and interactive, ensuring the final output meets your project's specific needs.
6
-
7
- ## The Generation Process
8
-
9
- When you run `aigne doc generate`, the tool follows a methodical process to create your documentation. Here is a breakdown of each step.
10
-
11
- ### Step 1: Initiate Generation
12
-
13
- To begin, navigate to your project's root directory in your terminal and execute the core command.
14
-
15
- ```bash title="Terminal" icon=lucide:terminal
16
- aigne doc generate
17
- ```
18
-
19
- This single command initiates the entire documentation creation workflow. If it's your first time running the command, you will be guided through an interactive setup process.
20
-
21
- ![Generate Documentation Dialog](https://docsmith.aigne.io/image-bin/uploads/d409b85c2c7760778c18251e06d997d9.png)
22
-
23
- ### Step 2: Code Analysis and Structure Planning
24
-
25
- First, DocSmith analyzes your source code to understand its structure, components, and relationships. Based on this analysis, it proposes an initial documentation structure. This plan organizes topics into a logical hierarchy, which may include sections like "Getting Started," "Guides," and "API Reference," tailored to your project's content.
26
-
27
- ### Step 3: Interactive Structure Review
28
-
29
- After the initial structure is planned, you will be prompted to review it in the terminal. This is a critical step that allows you to refine the organization of your documents before the content is written.
30
-
31
- You can either approve the structure as is or provide feedback in plain language to make changes.
32
-
33
- ![Reviewing the Documentation Structure](https://docsmith.aigne.io/image-bin/uploads/c530510525d8041c304d9c0258169904.png)
34
-
35
- Examples of feedback you can provide:
36
-
37
- * Rename a section (e.g., change "Getting Started" to "Quick Start").
38
- * Add a new document for "Troubleshooting."
39
- * Remove a document that is not needed.
40
- * Reorder sections to place "API Reference" before "Configuration."
41
-
42
- The tool will apply your feedback and present the updated structure for another review. You can repeat this process until the structure aligns perfectly with your requirements.
43
-
44
- ### Step 4: Content Creation
45
-
46
- Once you approve the final structure, DocSmith proceeds to generate the detailed content for each document. It reads the relevant source files and writes clear explanations, code examples, and descriptions for every planned section. This process is executed for all documents in the approved plan.
47
-
48
- ### Step 5: Completion
49
-
50
- When the process is complete, you will see a confirmation message indicating that the documentation has been generated successfully. The output files will be located in the directory specified in your configuration (the default is `./docs`).
51
-
52
- ![Documentation Generated Successfully](https://docsmith.aigne.io/image-bin/uploads/19c72054cd662d51259e8f668571891e.png)
53
-
54
- ## Command Options
55
-
56
- You can modify the behavior of the `generate` command by using optional flags. These flags provide more control over the generation process.
57
-
58
- | Option | Description |
59
- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60
- | `--forceRegenerate` | Re-creates all documentation from scratch, ignoring any existing files. This is useful if you have made significant changes to your source code or want a completely fresh build. |
61
- | `--glossary <path>` | Specifies a glossary file (e.g., `--glossary @glossary.md`). This ensures that technical terms are defined and used consistently across all generated documents. |
62
-
63
- ### Example Usage
64
-
65
- Here are a few examples demonstrating how to use the command with its options.
66
-
67
- **Standard Generation**
68
- This is the most common use case for creating your initial set of documents.
69
- ```bash title="Terminal" icon=lucide:terminal
70
- aigne doc generate
71
- ```
72
-
73
- **Forced Regeneration**
74
- Use this command when you need to discard all existing documents and rebuild them entirely.
75
- ```bash title="Terminal" icon=lucide:terminal
76
- aigne doc generate --forceRegenerate
77
- ```
78
-
79
- **Using a Glossary**
80
- To ensure consistent terminology, provide a path to your glossary file.
81
- ```bash title="Terminal" icon=lucide:terminal
82
- aigne doc generate --glossary @./glossary.md
83
- ```
84
-
85
- ## Summary
86
-
87
- You have now learned the complete process for generating documentation from your project's source files. This workflow involves initiating the command, interactively reviewing the proposed structure, and allowing the tool to write the content.
88
-
89
- After generating your documents, your next steps might be to [update specific documents](./guides-updating-documentation.md) with new information or [publish your documentation](./guides-publishing-your-docs.md) to make it accessible to your audience.