@aigne/doc-smith 0.9.10 → 0.9.11-beta
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 +12 -0
- package/README.md +189 -219
- package/README.zh.md +270 -0
- package/agents/bash-executor/index.mjs +347 -0
- package/agents/clear/ai/intent.md +142 -0
- package/agents/clear/choose-contents.mjs +13 -65
- package/agents/clear/clear-auth-tokens.mjs +17 -21
- package/agents/clear/clear-deployment-config.mjs +33 -24
- package/agents/clear/index.yaml +1 -9
- package/agents/content-checker/ai/intent.md +209 -0
- package/agents/content-checker/clean-invalid-docs.mjs +254 -0
- package/agents/content-checker/index.mjs +191 -0
- package/agents/content-checker/validate-content.mjs +983 -0
- package/agents/generate-images/generate-image.yaml +75 -0
- package/agents/generate-images/generate-summary.mjs +213 -0
- package/agents/generate-images/index.yaml +39 -0
- package/agents/generate-images/prepare-generation.mjs +286 -0
- package/agents/generate-images/prepare-image-generation.mjs +130 -0
- package/{prompts/detail/diagram/generate-image-system.md → agents/generate-images/prompts/system.md} +22 -56
- package/agents/generate-images/prompts/user.md +85 -0
- package/agents/generate-images/save-image-result.mjs +247 -0
- package/agents/generate-images/scan-image-slots.mjs +247 -0
- package/agents/localize/index.yaml +19 -42
- package/{prompts/translate → agents/localize/prompts}/translate-document.md +0 -139
- package/agents/localize/translate-documents/generate-summary.mjs +163 -0
- package/agents/localize/translate-documents/load-glossary.mjs +52 -0
- package/agents/localize/translate-documents/prepare-translation.mjs +249 -0
- package/agents/localize/translate-documents/save-translation.mjs +171 -0
- package/agents/localize/translate-documents/translate-document-to-language.mjs +209 -0
- package/agents/localize/translate-documents/translate-document.yaml +23 -0
- package/agents/localize/translate-documents/translate-to-languages.yaml +10 -0
- package/agents/localize/translate-images/check-image-translation.mjs +225 -0
- package/agents/localize/translate-images/detect-text/detect-and-update-shared.mjs +148 -0
- package/agents/localize/translate-images/detect-text/detect-image-text.yaml +44 -0
- package/agents/localize/translate-images/detect-text/detect-images-text.yaml +21 -0
- package/agents/localize/translate-images/detect-text/prompts/detect-image-text-system.md +43 -0
- package/agents/localize/translate-images/detect-text/prompts/detect-image-text-user.md +14 -0
- package/agents/localize/translate-images/detect-text/save-text-detection.mjs +105 -0
- package/agents/localize/translate-images/prepare-image-input.mjs +124 -0
- package/agents/localize/translate-images/save-image-translation.mjs +172 -0
- package/agents/localize/translate-images/scan-doc-images.mjs +165 -0
- package/agents/localize/translate-images/translate-doc-images.yaml +24 -0
- package/agents/localize/{translate-diagram.yaml → translate-images/translate-image.yaml} +25 -14
- package/agents/publish/ai/intent.md +182 -0
- package/agents/publish/check.mjs +107 -0
- package/agents/publish/index.yaml +9 -14
- package/agents/publish/publish-docs.mjs +81 -61
- package/agents/publish/translate-meta.mjs +79 -58
- package/agents/save-document/index.mjs +260 -0
- package/agents/structure-checker/index.mjs +307 -0
- package/agents/structure-checker/validate-structure.mjs +477 -0
- package/agents/update-image/analyze-feedback.yaml +37 -0
- package/agents/update-image/index.yaml +78 -0
- package/agents/update-image/load-existing-image.mjs +211 -0
- package/agents/update-image/prompts/analyze-feedback-system.md +43 -0
- package/agents/update-image/prompts/analyze-feedback-user.md +15 -0
- package/aigne.yaml +26 -139
- package/package.json +16 -48
- package/scripts/README.md +90 -0
- package/scripts/install.sh +86 -0
- package/scripts/uninstall.sh +52 -0
- package/skills/doc-smith/SKILL.md +285 -0
- package/skills/doc-smith/ai/intent/sources-improve.md +290 -0
- package/skills/doc-smith/references/changeset-guide.md +171 -0
- package/skills/doc-smith/references/document-content-guide.md +214 -0
- package/skills/doc-smith/references/document-structure-schema.md +138 -0
- package/skills/doc-smith/references/patch-guide.md +96 -0
- package/skills/doc-smith/references/structure-confirmation-guide.md +133 -0
- package/skills/doc-smith/references/structure-planning-guide.md +149 -0
- package/skills/doc-smith/references/update-workflow.md +108 -0
- package/skills/doc-smith/references/user-intent-guide.md +175 -0
- package/skills/doc-smith/references/workspace-initialization.md +376 -0
- package/skills/doc-smith-docs-detail/SKILL.md +356 -0
- package/skills/doc-smith-docs-detail/ai/intent.md +271 -0
- package/skills-entry/doc-smith/ai/intent.md +260 -0
- package/skills-entry/doc-smith/index.mjs +66 -0
- package/skills-entry/doc-smith/prompt.md +57 -0
- package/skills-entry/doc-smith/utils.mjs +27 -0
- package/skills-entry/doc-smith-docs-detail/batch.yaml +56 -0
- package/skills-entry/doc-smith-docs-detail/index.mjs +95 -0
- package/skills-entry/doc-smith-docs-detail/prompt.md +64 -0
- package/utils/afs-factory.mjs +183 -0
- package/utils/agent-constants.mjs +97 -0
- package/utils/{auth-utils.mjs → auth.mjs} +6 -9
- package/{agents/utils/update-branding.mjs → utils/branding.mjs} +3 -4
- package/utils/config.mjs +261 -0
- package/utils/constants.mjs +32 -0
- package/utils/deploy.mjs +3 -3
- package/utils/docs-converter.mjs +454 -0
- package/utils/docs.mjs +212 -0
- package/utils/document-paths.mjs +172 -0
- package/utils/files.mjs +74 -0
- package/utils/git.mjs +65 -0
- package/utils/{blocklet.mjs → http.mjs} +18 -0
- package/utils/image-slots.mjs +57 -0
- package/utils/image-utils.mjs +114 -0
- package/utils/project.mjs +95 -0
- package/utils/sources-path-resolver.mjs +76 -0
- package/utils/{upload-files.mjs → upload.mjs} +3 -3
- package/utils/workspace.mjs +371 -0
- package/agents/chat/chat-system.md +0 -38
- package/agents/chat/index.mjs +0 -59
- package/agents/chat/skills/generate-document.yaml +0 -15
- package/agents/chat/skills/list-documents.mjs +0 -15
- package/agents/chat/skills/update-document.yaml +0 -24
- package/agents/clear/clear-document-config.mjs +0 -36
- package/agents/clear/clear-document-structure.mjs +0 -102
- package/agents/clear/clear-generated-docs.mjs +0 -142
- package/agents/clear/clear-media-description.mjs +0 -129
- package/agents/create/aggregate-document-structure.mjs +0 -21
- package/agents/create/analyze-diagram-type-llm.yaml +0 -159
- package/agents/create/analyze-diagram-type.mjs +0 -455
- package/agents/create/check-document-structure.yaml +0 -30
- package/agents/create/check-need-generate-structure.mjs +0 -138
- package/agents/create/document-structure-tools/add-document.mjs +0 -85
- package/agents/create/document-structure-tools/delete-document.mjs +0 -116
- package/agents/create/document-structure-tools/move-document.mjs +0 -109
- package/agents/create/document-structure-tools/update-document.mjs +0 -84
- package/agents/create/generate-diagram-image.yaml +0 -91
- package/agents/create/generate-structure.yaml +0 -106
- package/agents/create/index.yaml +0 -45
- package/agents/create/refine-document-structure.yaml +0 -12
- package/agents/create/replace-d2-with-image.mjs +0 -610
- package/agents/create/update-document-structure.yaml +0 -54
- package/agents/create/user-add-document/add-documents-to-structure.mjs +0 -90
- package/agents/create/user-add-document/find-documents-to-add-links.yaml +0 -47
- package/agents/create/user-add-document/index.yaml +0 -46
- package/agents/create/user-add-document/prepare-documents-to-translate.mjs +0 -22
- package/agents/create/user-add-document/print-add-document-summary.mjs +0 -63
- package/agents/create/user-add-document/review-documents-with-new-links.mjs +0 -110
- package/agents/create/user-remove-document/find-documents-with-invalid-links.mjs +0 -78
- package/agents/create/user-remove-document/index.yaml +0 -40
- package/agents/create/user-remove-document/prepare-documents-to-translate.mjs +0 -22
- package/agents/create/user-remove-document/print-remove-document-summary.mjs +0 -53
- package/agents/create/user-remove-document/remove-documents-from-structure.mjs +0 -99
- package/agents/create/user-remove-document/review-documents-with-invalid-links.mjs +0 -115
- package/agents/create/user-review-document-structure.mjs +0 -139
- package/agents/create/utils/init-current-content.mjs +0 -34
- package/agents/create/utils/merge-document-structures.mjs +0 -36
- package/agents/evaluate/code-snippet.mjs +0 -97
- package/agents/evaluate/document-structure.yaml +0 -67
- package/agents/evaluate/document.yaml +0 -82
- package/agents/evaluate/generate-report.mjs +0 -85
- package/agents/evaluate/index.yaml +0 -46
- package/agents/history/index.yaml +0 -6
- package/agents/history/view.mjs +0 -78
- package/agents/init/check.mjs +0 -16
- package/agents/init/index.mjs +0 -643
- package/agents/init/validate.mjs +0 -16
- package/agents/localize/choose-language.mjs +0 -107
- package/agents/localize/record-translation-history.mjs +0 -23
- package/agents/localize/save-doc-translation-or-skip.mjs +0 -18
- package/agents/localize/set-review-content.mjs +0 -58
- package/agents/localize/translate-document-wrapper.mjs +0 -34
- package/agents/localize/translate-document.yaml +0 -24
- package/agents/localize/translate-multilingual.yaml +0 -57
- package/agents/localize/translate-or-skip-diagram.mjs +0 -52
- package/agents/media/batch-generate-media-description.yaml +0 -46
- package/agents/media/generate-media-description.yaml +0 -50
- package/agents/media/load-media-description.mjs +0 -454
- package/agents/prefs/index.mjs +0 -203
- package/agents/schema/document-structure-item.yaml +0 -26
- package/agents/schema/document-structure-refine-item.yaml +0 -23
- package/agents/schema/document-structure.yaml +0 -29
- package/agents/update/batch-generate-document.yaml +0 -27
- package/agents/update/batch-update-document.yaml +0 -7
- package/agents/update/check-diagram-flag.mjs +0 -116
- package/agents/update/check-document.mjs +0 -162
- package/agents/update/check-generate-diagram.mjs +0 -106
- package/agents/update/check-update-is-single.mjs +0 -53
- package/agents/update/document-tools/update-document-content.mjs +0 -303
- package/agents/update/generate-diagram.yaml +0 -80
- package/agents/update/generate-document.yaml +0 -70
- package/agents/update/handle-document-update.yaml +0 -103
- package/agents/update/index.yaml +0 -69
- package/agents/update/pre-check-generate-diagram.yaml +0 -44
- package/agents/update/save-and-translate-document.mjs +0 -80
- package/agents/update/update-document-detail.yaml +0 -71
- package/agents/update/update-single/update-single-document-detail.mjs +0 -322
- package/agents/update/update-single-document.yaml +0 -7
- package/agents/update/user-review-document.mjs +0 -272
- package/agents/utils/action-success.mjs +0 -16
- package/agents/utils/analyze-document-feedback-intent.yaml +0 -32
- package/agents/utils/analyze-feedback-intent.mjs +0 -253
- package/agents/utils/analyze-structure-feedback-intent.yaml +0 -29
- package/agents/utils/check-detail-result.mjs +0 -51
- package/agents/utils/check-feedback-refiner.mjs +0 -81
- package/agents/utils/choose-docs.mjs +0 -251
- package/agents/utils/document-icon-generate.yaml +0 -52
- package/agents/utils/document-title-streamline.yaml +0 -48
- package/agents/utils/ensure-document-icons.mjs +0 -129
- package/agents/utils/exit.mjs +0 -6
- package/agents/utils/feedback-refiner.yaml +0 -50
- package/agents/utils/find-item-by-path.mjs +0 -114
- package/agents/utils/find-user-preferences-by-path.mjs +0 -37
- package/agents/utils/format-document-structure.mjs +0 -35
- package/agents/utils/generate-document-or-skip.mjs +0 -41
- package/agents/utils/handle-diagram-operations.mjs +0 -263
- package/agents/utils/load-all-document-content.mjs +0 -30
- package/agents/utils/load-document-all-content.mjs +0 -96
- package/agents/utils/load-sources.mjs +0 -405
- package/agents/utils/map-reasoning-effort-level.mjs +0 -15
- package/agents/utils/post-generate.mjs +0 -133
- package/agents/utils/read-current-document-content.mjs +0 -46
- package/agents/utils/save-doc-translation.mjs +0 -30
- package/agents/utils/save-doc.mjs +0 -54
- package/agents/utils/save-output.mjs +0 -26
- package/agents/utils/save-sidebar.mjs +0 -38
- package/agents/utils/skip-if-content-exists.mjs +0 -27
- package/agents/utils/streamline-document-titles-if-needed.mjs +0 -88
- package/agents/utils/transform-detail-data-sources.mjs +0 -45
- package/assets/report-template/report.html +0 -198
- package/docs-mcp/analyze-content-relevance.yaml +0 -50
- package/docs-mcp/analyze-docs-relevance.yaml +0 -59
- package/docs-mcp/docs-search.yaml +0 -42
- package/docs-mcp/get-docs-detail.mjs +0 -41
- package/docs-mcp/get-docs-structure.mjs +0 -16
- package/docs-mcp/read-doc-content.mjs +0 -119
- package/prompts/common/document/content-rules-core.md +0 -20
- package/prompts/common/document/markdown-syntax-rules.md +0 -65
- package/prompts/common/document/media-file-list-usage-rules.md +0 -18
- package/prompts/common/document/openapi-usage-rules.md +0 -189
- package/prompts/common/document/role-and-personality.md +0 -16
- package/prompts/common/document/user-preferences.md +0 -9
- package/prompts/common/document-structure/conflict-resolution-guidance.md +0 -16
- package/prompts/common/document-structure/document-icon-generate.md +0 -116
- package/prompts/common/document-structure/document-structure-rules.md +0 -43
- package/prompts/common/document-structure/document-title-streamline.md +0 -86
- package/prompts/common/document-structure/glossary.md +0 -7
- package/prompts/common/document-structure/intj-traits.md +0 -5
- package/prompts/common/document-structure/openapi-usage-rules.md +0 -28
- package/prompts/common/document-structure/output-constraints.md +0 -18
- package/prompts/common/document-structure/user-locale-rules.md +0 -10
- package/prompts/common/document-structure/user-preferences.md +0 -9
- package/prompts/detail/custom/admonition-usage-rules.md +0 -94
- package/prompts/detail/custom/code-block-usage-rules.md +0 -163
- package/prompts/detail/custom/custom-components/x-card-usage-rules.md +0 -63
- package/prompts/detail/custom/custom-components/x-cards-usage-rules.md +0 -83
- package/prompts/detail/custom/custom-components/x-field-desc-usage-rules.md +0 -120
- package/prompts/detail/custom/custom-components/x-field-group-usage-rules.md +0 -80
- package/prompts/detail/custom/custom-components/x-field-usage-rules.md +0 -189
- package/prompts/detail/custom/custom-components-usage-rules.md +0 -18
- package/prompts/detail/diagram/generate-image-user.md +0 -81
- package/prompts/detail/diagram/guide.md +0 -29
- package/prompts/detail/diagram/official-examples.md +0 -712
- package/prompts/detail/diagram/pre-check.md +0 -23
- package/prompts/detail/diagram/role-and-personality.md +0 -2
- package/prompts/detail/diagram/rules.md +0 -46
- package/prompts/detail/diagram/system-prompt.md +0 -1139
- package/prompts/detail/diagram/user-prompt.md +0 -43
- package/prompts/detail/generate/detail-example.md +0 -457
- package/prompts/detail/generate/document-rules.md +0 -45
- package/prompts/detail/generate/system-prompt.md +0 -61
- package/prompts/detail/generate/user-prompt.md +0 -99
- package/prompts/detail/jsx/rules.md +0 -6
- package/prompts/detail/update/system-prompt.md +0 -121
- package/prompts/detail/update/user-prompt.md +0 -41
- package/prompts/evaluate/document-structure.md +0 -93
- package/prompts/evaluate/document.md +0 -149
- package/prompts/media/media-description/system-prompt.md +0 -43
- package/prompts/media/media-description/user-prompt.md +0 -17
- package/prompts/structure/check-document-structure.md +0 -93
- package/prompts/structure/document-rules.md +0 -21
- package/prompts/structure/find-documents-to-add-links.md +0 -52
- package/prompts/structure/generate/system-prompt.md +0 -13
- package/prompts/structure/generate/user-prompt.md +0 -137
- package/prompts/structure/review/structure-review-system.md +0 -81
- package/prompts/structure/structure-example.md +0 -89
- package/prompts/structure/structure-getting-started.md +0 -10
- package/prompts/structure/update/system-prompt.md +0 -93
- package/prompts/structure/update/user-prompt.md +0 -43
- package/prompts/translate/admonition.md +0 -20
- package/prompts/translate/code-block.md +0 -33
- package/prompts/utils/analyze-document-feedback-intent.md +0 -54
- package/prompts/utils/analyze-structure-feedback-intent.md +0 -43
- package/prompts/utils/feedback-refiner.md +0 -105
- package/types/document-schema.mjs +0 -55
- package/types/document-structure-schema.mjs +0 -261
- package/utils/check-document-has-diagram.mjs +0 -95
- package/utils/conflict-detector.mjs +0 -149
- package/utils/constants/index.mjs +0 -620
- package/utils/constants/linter.mjs +0 -102
- package/utils/d2-utils.mjs +0 -205
- package/utils/debug.mjs +0 -3
- package/utils/delete-diagram-images.mjs +0 -99
- package/utils/diagram-version-utils.mjs +0 -14
- package/utils/docs-finder-utils.mjs +0 -548
- package/utils/evaluate/report-utils.mjs +0 -132
- package/utils/extract-api.mjs +0 -32
- package/utils/file-utils.mjs +0 -960
- package/utils/history-utils.mjs +0 -203
- package/utils/icon-map.mjs +0 -26
- package/utils/image-compress.mjs +0 -154
- package/utils/kroki-utils.mjs +0 -173
- package/utils/linter/index.mjs +0 -50
- package/utils/load-config.mjs +0 -78
- package/utils/markdown/index.mjs +0 -26
- package/utils/markdown-checker.mjs +0 -694
- package/utils/mermaid-validator.mjs +0 -140
- package/utils/mermaid-worker-pool.mjs +0 -250
- package/utils/mermaid-worker.mjs +0 -233
- package/utils/openapi/index.mjs +0 -28
- package/utils/preferences-utils.mjs +0 -175
- package/utils/request.mjs +0 -10
- package/utils/sync-diagram-to-translations.mjs +0 -272
- package/utils/translate-diagram-images.mjs +0 -807
- package/utils/utils.mjs +0 -1354
- /package/{prompts/translate → agents/localize/prompts}/glossary.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.11-beta](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.10...v0.9.11-beta) (2026-01-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* migrate to new skills-based architecture ([#370](https://github.com/AIGNE-io/aigne-doc-smith/issues/370)) ([bcd706a](https://github.com/AIGNE-io/aigne-doc-smith/commit/bcd706a29cf8df4d013df4f49c1d30a28ce856c4))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* pin jaison to 2.0.2 ([d70901d](https://github.com/AIGNE-io/aigne-doc-smith/commit/d70901dcc9f914408a0ffa9dff820e5f9a3cd25f))
|
|
14
|
+
|
|
3
15
|
## [0.9.10](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.10-beta...v0.9.10) (2025-12-22)
|
|
4
16
|
|
|
5
17
|
## [0.9.10-beta](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.9...v0.9.10-beta) (2025-12-18)
|
package/README.md
CHANGED
|
@@ -1,302 +1,272 @@
|
|
|
1
|
-
|
|
2
|
-
[](https://www.npmjs.com/package/@aigne/doc-smith)
|
|
3
|
-
[](https://www.npmjs.com/package/@aigne/doc-smith)
|
|
4
|
-
[](https://github.com/AIGNE-io/aigne-doc-smith/issues)
|
|
5
|
-
[](https://github.com/AIGNE-io/aigne-doc-smith/blob/main/LICENSE)
|
|
6
|
-
[](https://codecov.io/gh/AIGNE-io/aigne-doc-smith)
|
|
1
|
+
# DocSmith
|
|
7
2
|
|
|
8
|
-
|
|
3
|
+
AI-powered documentation generation tool built on the Aigne Framework.
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
[中文文档](./README.zh.md)
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
## Features
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
DocSmith is a complete documentation generation system that provides:
|
|
10
|
+
- 📚 Generate comprehensive documentation from code repositories, text files, and media resources
|
|
11
|
+
- 🏗️ Build organized documentation structures and documentation sites
|
|
12
|
+
- 📝 Intelligently analyze workspace content and generate structured documentation
|
|
13
|
+
- 🔄 Convert code/project content into readable documentation
|
|
14
|
+
- 🌍 Multi-language support and documentation localization
|
|
15
|
+
- 🖼️ Automatic generation and updating of documentation images
|
|
16
|
+
- 📤 One-click publishing to multiple platforms
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
18
|
+
Supports generating:
|
|
19
|
+
- Technical documentation
|
|
20
|
+
- User guides
|
|
21
|
+
- API references
|
|
22
|
+
- Tutorials and examples
|
|
23
|
+
- Product documentation
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
### User Intent Analysis
|
|
23
26
|
|
|
24
|
-
DocSmith
|
|
27
|
+
DocSmith automatically analyzes workspace content to infer:
|
|
28
|
+
- **Target audience** - Primary readers of the documentation (developers, operators, end users, etc.)
|
|
29
|
+
- **Use cases** - Context in which users consult the documentation (first contact, development integration, troubleshooting, etc.)
|
|
30
|
+
- **Documentation focus** - Documentation type (user guide, API reference, quick start, architecture overview, etc.)
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
Inference results are presented to users for confirmation, with support for multiple rounds of adjustments until satisfied.
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
### Structure Confirmation Mechanism
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
Before generating documentation, DocSmith displays the planned documentation structure:
|
|
37
|
+
- Total number of documents and hierarchy
|
|
38
|
+
- Title, description, and source files for each document
|
|
39
|
+
- Clear emoji indicators for quick browsing
|
|
31
40
|
|
|
32
|
-
|
|
41
|
+
Users can:
|
|
42
|
+
- Delete/add documents
|
|
43
|
+
- Adjust hierarchy (merge, split, adjust parent-child relationships)
|
|
44
|
+
- Modify content scope
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
- **Intelligent Content Creation**: Generates detailed, contextual content that explains both the "what" and the "why."
|
|
36
|
-
- **Adaptive Writing Styles**: Supports multiple documentation styles, including Technical, User-Friendly, and Developer-Focused.
|
|
46
|
+
Actual content generation begins only after user confirms the structure.
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
## Project Structure
|
|
39
49
|
|
|
40
|
-
- **12 Language Support**: English, Chinese (Simplified & Traditional), Japanese, Korean, Spanish, French, German, Portuguese, Russian, Italian, and Arabic.
|
|
41
|
-
- **Professional Translation**: Provides context-aware translations that maintain technical accuracy.
|
|
42
|
-
- **Glossary Integration**: Ensures consistent terminology across all languages.
|
|
43
|
-
|
|
44
|
-
### 🔗 Seamless Integration
|
|
45
|
-
|
|
46
|
-
- **AIGNE Hub Integration**: Use the [AIGNE Hub](https://www.aigne.io/en/hub) without API keys and switch between Google Gemini, OpenAI GPT, Claude, and more.
|
|
47
|
-
- **Multiple LLM Support**: Bring your own API keys for OpenAI, Anthropic, Google, and other providers.
|
|
48
|
-
- **One-Click Publishing**: Publish your docs and generate shareable links for your team. Publish to [docsmith.aigne.io](https://docsmith.aigne.io/app/) or your own [Discuss Kit](https://www.web3kit.rocks/discuss-kit) instance.
|
|
49
|
-
|
|
50
|
-
### 🔄 Smart Updates
|
|
51
|
-
|
|
52
|
-
- **Change Detection**: Automatically identifies code changes and updates the relevant documentation.
|
|
53
|
-
- **Targeted Regeneration**: Updates specific sections with custom feedback and requirements.
|
|
54
|
-
- **Version Awareness**: Maintains a history of your documentation and tracks changes over time.
|
|
55
|
-
|
|
56
|
-
## 🚀 Quick Start
|
|
57
|
-
|
|
58
|
-
### Prerequisites
|
|
59
|
-
|
|
60
|
-
- Node.js 20+ and npm/pnpm
|
|
61
|
-
- No API keys required (uses the AIGNE Hub by default).
|
|
62
|
-
|
|
63
|
-
### 📦 Installation
|
|
64
|
-
|
|
65
|
-
Install the AIGNE CLI globally:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npm install -g @aigne/cli
|
|
69
50
|
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
51
|
+
aigne-doc-smith/
|
|
52
|
+
├── aigne.yaml # Aigne framework configuration
|
|
53
|
+
├── package.json # Project dependencies and metadata
|
|
54
|
+
├── CLAUDE.md # Claude Code project description
|
|
55
|
+
├── README.md # This file
|
|
56
|
+
│
|
|
57
|
+
├── agents/ # Specialized Agents
|
|
58
|
+
│ ├── bash-executor/ # Bash command execution agent
|
|
59
|
+
│ ├── clear/ # Configuration cleanup agent
|
|
60
|
+
│ ├── content-checker/ # Content checking agent
|
|
61
|
+
│ ├── generate-images/ # Image generation agent
|
|
62
|
+
│ ├── localize/ # Documentation localization agent
|
|
63
|
+
│ ├── publish/ # Documentation publishing agent
|
|
64
|
+
│ ├── save-document/ # Document saving agent
|
|
65
|
+
│ ├── structure-checker/ # Structure checking agent
|
|
66
|
+
│ └── update-image/ # Image update agent
|
|
67
|
+
│
|
|
68
|
+
├── skills/ # Skill definitions
|
|
69
|
+
│ └── doc-smith/ # DocSmith Skill
|
|
70
|
+
│ ├── SKILL.md # Skill main document
|
|
71
|
+
│ └── references/ # Reference documents
|
|
72
|
+
│
|
|
73
|
+
├── skills-entry/ # Aigne framework entry configuration
|
|
74
|
+
│ └── doc-smith/
|
|
75
|
+
│ ├── index.yaml # Main entry configuration
|
|
76
|
+
│ └── prompt.md # Prompt template
|
|
77
|
+
│
|
|
78
|
+
├── utils/ # Utility library
|
|
79
|
+
│ ├── config.mjs # Configuration management
|
|
80
|
+
│ ├── docs.mjs # Document processing
|
|
81
|
+
│ ├── git.mjs # Git operations
|
|
82
|
+
│ ├── image-utils.mjs # Image utilities
|
|
83
|
+
│ ├── workspace.mjs # Workspace management
|
|
84
|
+
│ └── ... # More utilities
|
|
85
|
+
│
|
|
86
|
+
└── scripts/ # Helper scripts
|
|
87
|
+
└── ...
|
|
75
88
|
```
|
|
76
89
|
|
|
77
|
-
|
|
90
|
+
## Quick Start
|
|
78
91
|
|
|
79
|
-
|
|
92
|
+
### 1. Install Aigne CLI
|
|
80
93
|
|
|
81
94
|
```bash
|
|
82
|
-
|
|
83
|
-
aigne doc create
|
|
95
|
+
npm install -g @aigne/cli
|
|
84
96
|
```
|
|
85
97
|
|
|
86
|
-
DocSmith
|
|
87
|
-
|
|
88
|
-
1. 🔍 Auto-detect your project's structure and tech stack.
|
|
89
|
-
2. 🎯 Guide you through an interactive setup (first time only).
|
|
90
|
-
3. 📝 Generate comprehensive documentation.
|
|
91
|
-
4. 🌍 Optionally translate it into multiple languages.
|
|
92
|
-
5. 🚀 Publish it to your preferred platform.
|
|
98
|
+
### 2. Start DocSmith
|
|
93
99
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### LLM Providers
|
|
97
|
-
|
|
98
|
-
DocSmith supports multiple AI providers:
|
|
99
|
-
|
|
100
|
-
**🎯 AIGNE Hub (Recommended)**
|
|
101
|
-
|
|
102
|
-
- ✅ No API keys required.
|
|
103
|
-
- ✅ Easy model switching.
|
|
104
|
-
- ✅ Built-in rate limiting and optimization.
|
|
100
|
+
Run directly in your project root:
|
|
105
101
|
|
|
106
102
|
```bash
|
|
107
|
-
|
|
108
|
-
aigne doc
|
|
109
|
-
aigne doc create --model anthropic:claude-sonnet-4-5
|
|
110
|
-
aigne doc create --model openai:gpt-4o
|
|
103
|
+
cd my-project
|
|
104
|
+
aigne doc
|
|
111
105
|
```
|
|
112
106
|
|
|
113
|
-
|
|
114
|
-
Configure your own API keys for direct provider access:
|
|
115
|
-
|
|
116
|
-
- OpenAI GPT models
|
|
117
|
-
- Anthropic Claude models
|
|
118
|
-
- Google Gemini models
|
|
119
|
-
- and more...
|
|
107
|
+
On first execution, Aigne CLI will automatically install DocSmith and start the interactive documentation generation process.
|
|
120
108
|
|
|
121
|
-
|
|
109
|
+
**Automatic Initialization:**
|
|
122
110
|
|
|
123
|
-
|
|
111
|
+
DocSmith will automatically:
|
|
112
|
+
- Detect the current project
|
|
113
|
+
- Create workspace in `.aigne/doc-smith/` directory
|
|
114
|
+
- Generate config.yaml configuration file
|
|
124
115
|
|
|
125
|
-
|
|
116
|
+
**Completed During Conversation:**
|
|
126
117
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
118
|
+
DocSmith will guide you through:
|
|
119
|
+
1. Ask for output language (if not specified)
|
|
120
|
+
2. Analyze project content
|
|
121
|
+
3. Infer user intent
|
|
122
|
+
4. Plan documentation structure
|
|
123
|
+
5. Generate structured Markdown documentation
|
|
130
124
|
|
|
131
|
-
|
|
132
|
-
aigne doc create --forceRegenerate
|
|
125
|
+
### 3. Generated Directory Structure
|
|
133
126
|
|
|
134
|
-
# Generate with custom feedback
|
|
135
|
-
aigne doc create --feedback "Add more API examples and troubleshooting sections"
|
|
136
127
|
```
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
#
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
128
|
+
my-project/
|
|
129
|
+
├── .aigne/
|
|
130
|
+
│ └── doc-smith/ # DocSmith workspace
|
|
131
|
+
│ ├── config.yaml # Configuration file
|
|
132
|
+
│ ├── intent/ # User intent
|
|
133
|
+
│ ├── planning/ # Documentation structure planning
|
|
134
|
+
│ ├── docs/ # Generated documentation
|
|
135
|
+
│ │ ├── overview.md
|
|
136
|
+
│ │ ├── getting-started.md
|
|
137
|
+
│ │ └── api/
|
|
138
|
+
│ │ └── authentication.md
|
|
139
|
+
│ └── cache/ # Temporary data
|
|
140
|
+
└── (other project files...)
|
|
146
141
|
```
|
|
147
142
|
|
|
148
|
-
|
|
143
|
+
### 4. Independent Workspace Mode (Optional)
|
|
149
144
|
|
|
150
|
-
|
|
151
|
-
# Interactive translation with smart language selection
|
|
152
|
-
aigne doc localize
|
|
153
|
-
|
|
154
|
-
# Translate specific documents into multiple languages
|
|
155
|
-
aigne doc localize --langs zh --langs ja --docs examples.md --docs overview.md
|
|
156
|
-
|
|
157
|
-
# Translate with a custom glossary for consistent terminology
|
|
158
|
-
aigne doc localize --glossary @path/to/glossary.md --feedback "Use technical terminology consistently"
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
#### 🚀 Publishing & Deployment
|
|
145
|
+
To separate documentation project from source code, use independent workspace:
|
|
162
146
|
|
|
163
147
|
```bash
|
|
164
|
-
#
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
aigne doc publish --appUrl https://your-discuss-kit-instance.com
|
|
148
|
+
# Create independent workspace
|
|
149
|
+
mkdir my-docs
|
|
150
|
+
cd my-docs
|
|
151
|
+
aigne doc
|
|
169
152
|
```
|
|
170
153
|
|
|
171
|
-
|
|
154
|
+
Independent mode supports multiple data source configuration:
|
|
172
155
|
|
|
173
|
-
```
|
|
174
|
-
#
|
|
175
|
-
|
|
156
|
+
```yaml
|
|
157
|
+
# config.yaml
|
|
158
|
+
sources:
|
|
159
|
+
- name: "main"
|
|
160
|
+
type: local-path
|
|
161
|
+
path: "../my-project"
|
|
176
162
|
|
|
177
|
-
|
|
178
|
-
|
|
163
|
+
- name: "other-repo"
|
|
164
|
+
type: git-clone
|
|
165
|
+
url: "https://github.com/example/repo.git"
|
|
166
|
+
branch: "main"
|
|
179
167
|
```
|
|
180
168
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
DocSmith automatically detects your project's structure, but you can customize it to your needs:
|
|
184
|
-
|
|
185
|
-
- **📝 Documentation Styles**: Technical, User-Friendly, Developer-Focused, Academic
|
|
186
|
-
- **🎯 Target Audiences**: Developers, End Users, System Administrators, Business Users
|
|
187
|
-
- **🌍 Languages**: Choose from 12 supported languages.
|
|
188
|
-
- **📁 Source Paths**: Customize which files and directories to analyze.
|
|
189
|
-
- **📤 Output Settings**: Configure the documentation structure and formatting.
|
|
190
|
-
|
|
191
|
-
## 🌐 Supported Languages
|
|
192
|
-
|
|
193
|
-
DocSmith provides professional-grade translations for 12 languages:
|
|
194
|
-
|
|
195
|
-
| Language | Code | Support Level |
|
|
196
|
-
| --------- | ------- | ------------- |
|
|
197
|
-
| English | `en` | ✅ Native |
|
|
198
|
-
| 简体中文 | `zh-CN` | ✅ Full |
|
|
199
|
-
| 繁體中文 | `zh-TW` | ✅ Full |
|
|
200
|
-
| 日本語 | `ja` | ✅ Full |
|
|
201
|
-
| 한국어 | `ko` | ✅ Full |
|
|
202
|
-
| Español | `es` | ✅ Full |
|
|
203
|
-
| Français | `fr` | ✅ Full |
|
|
204
|
-
| Deutsch | `de` | ✅ Full |
|
|
205
|
-
| Português | `pt-BR` | ✅ Full |
|
|
206
|
-
| Русский | `ru` | ✅ Full |
|
|
207
|
-
| Italiano | `it` | ✅ Full |
|
|
208
|
-
| العربية | `ar` | ✅ Full |
|
|
169
|
+
## Core Features
|
|
209
170
|
|
|
210
|
-
|
|
171
|
+
### Documentation Generation
|
|
172
|
+
- Intelligent analysis of source code and project structure
|
|
173
|
+
- Automatic inference of user intent and target audience
|
|
174
|
+
- Generation of structured Markdown documentation
|
|
175
|
+
- Support for documentation hierarchy planning and confirmation
|
|
211
176
|
|
|
212
|
-
|
|
177
|
+
### Image Management
|
|
178
|
+
- Automatic generation of documentation images
|
|
179
|
+
- Image placeholder system support
|
|
180
|
+
- Batch update and edit images
|
|
181
|
+
- Multiple image generation model support
|
|
213
182
|
|
|
214
|
-
###
|
|
183
|
+
### Multi-language Support
|
|
184
|
+
- Documentation localization and translation
|
|
185
|
+
- Multi-language documentation structure management
|
|
186
|
+
- Automatic synchronization of different language versions
|
|
215
187
|
|
|
216
|
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
188
|
+
### Publishing and Deployment
|
|
189
|
+
- One-click publishing to multiple platforms
|
|
190
|
+
- Custom publishing configuration support
|
|
191
|
+
- Documentation site building and deployment
|
|
219
192
|
|
|
220
|
-
|
|
193
|
+
## Development
|
|
221
194
|
|
|
222
|
-
|
|
223
|
-
- 📋 Check our [roadmap](https://github.com/AIGNE-io/aigne-doc-smith/projects) for planned features.
|
|
224
|
-
- 🗳️ Vote on existing feature requests.
|
|
225
|
-
|
|
226
|
-
### 🔧 Development Setup
|
|
195
|
+
### Install Dependencies
|
|
227
196
|
|
|
228
197
|
```bash
|
|
229
|
-
# Clone the repository
|
|
230
|
-
git clone https://github.com/AIGNE-io/aigne-doc-smith.git
|
|
231
|
-
cd aigne-doc-smith
|
|
232
|
-
|
|
233
|
-
# Install dependencies
|
|
234
198
|
pnpm install
|
|
199
|
+
```
|
|
235
200
|
|
|
236
|
-
|
|
237
|
-
pnpm test
|
|
201
|
+
### Code Quality
|
|
238
202
|
|
|
239
|
-
|
|
203
|
+
Project uses Biome for code linting and formatting:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
# Check code
|
|
240
207
|
pnpm run lint
|
|
241
208
|
|
|
242
|
-
#
|
|
209
|
+
# Auto fix
|
|
243
210
|
pnpm run lint:fix
|
|
244
211
|
```
|
|
245
212
|
|
|
246
|
-
###
|
|
213
|
+
### Modifying Agents
|
|
247
214
|
|
|
248
|
-
|
|
215
|
+
To add or modify agents:
|
|
249
216
|
|
|
250
|
-
|
|
217
|
+
1. Create or modify agent in `agents/` directory
|
|
218
|
+
2. Register new agent in `aigne.yaml`
|
|
219
|
+
3. Write agent prompts and configuration files
|
|
251
220
|
|
|
252
|
-
###
|
|
221
|
+
### Modifying Utility Functions
|
|
253
222
|
|
|
254
|
-
|
|
255
|
-
- **Custom Branding**: White-label your documentation with your brand's identity.
|
|
256
|
-
- **API Integration**: Use REST APIs for automated documentation pipelines.
|
|
257
|
-
- **Analytics**: Track documentation usage and effectiveness.
|
|
223
|
+
To extend or optimize utility functions:
|
|
258
224
|
|
|
259
|
-
|
|
225
|
+
1. Add or modify utility functions in `utils/` directory
|
|
226
|
+
2. Ensure ES module syntax (`.mjs` files)
|
|
227
|
+
3. Import and use where needed
|
|
260
228
|
|
|
261
|
-
|
|
262
|
-
- **SSO Integration**: Connect with your existing identity providers.
|
|
263
|
-
- **Audit Logs**: Complete activity tracking and compliance reporting.
|
|
264
|
-
- **Data Privacy**: Your code never leaves your environment in private deployments.
|
|
229
|
+
## Tech Stack
|
|
265
230
|
|
|
266
|
-
|
|
231
|
+
- **Aigne Framework** - AI agent orchestration framework
|
|
232
|
+
- **Node.js** - Runtime environment (ES modules)
|
|
233
|
+
- **pnpm** - Package manager
|
|
234
|
+
- **Biome** - Code linting and formatting
|
|
235
|
+
- **YAML** - Configuration and data format
|
|
267
236
|
|
|
268
|
-
|
|
269
|
-
- **Custom Training**: We offer team onboarding and best practices workshops.
|
|
270
|
-
- **Professional Services**: We provide custom integrations and deployment assistance.
|
|
237
|
+
## Notes
|
|
271
238
|
|
|
272
|
-
|
|
239
|
+
- Ensure Node.js (v18+) and pnpm are installed
|
|
240
|
+
- Ensure Git is installed (for submodule and version management)
|
|
241
|
+
- Anthropic API key or other LLM provider configuration required
|
|
242
|
+
- Image generation features require corresponding API key configuration
|
|
273
243
|
|
|
274
|
-
##
|
|
244
|
+
## Migration Guide
|
|
275
245
|
|
|
276
|
-
|
|
246
|
+
If you previously used an older version (`.aigne/doc-smith/` directory structure), we recommend:
|
|
247
|
+
1. Create a new workspace directory
|
|
248
|
+
2. Regenerate documentation
|
|
249
|
+
3. Old version data can be manually migrated to the new workspace directory structure
|
|
277
250
|
|
|
278
|
-
|
|
251
|
+
## Version
|
|
279
252
|
|
|
280
|
-
|
|
253
|
+
Current version: `0.9.11`
|
|
281
254
|
|
|
282
|
-
|
|
283
|
-
- 🎮 [Community](https://community.arcblock.io/discussions/boards/aigne) - For real-time community chat.
|
|
255
|
+
## Support
|
|
284
256
|
|
|
285
|
-
|
|
257
|
+
For issues or suggestions, please open an issue in the project.
|
|
286
258
|
|
|
287
|
-
|
|
259
|
+
## Author
|
|
288
260
|
|
|
289
|
-
- [
|
|
261
|
+
**Arcblock** - [blocklet@arcblock.io](mailto:blocklet@arcblock.io)
|
|
290
262
|
|
|
291
|
-
|
|
263
|
+
GitHub: [@blocklet](https://github.com/blocklet)
|
|
292
264
|
|
|
293
|
-
|
|
265
|
+
## License
|
|
294
266
|
|
|
295
|
-
|
|
267
|
+
Elastic-2.0 License
|
|
296
268
|
|
|
297
|
-
|
|
298
|
-
- ✅ **Open source**: The full source code is available for review and contributions.
|
|
299
|
-
- ✅ **Commercial friendly**: Use it in your business applications and services.
|
|
300
|
-
- ❌ **Restrictions**: You cannot offer DocSmith as a competing hosted service.
|
|
269
|
+
## Related Links
|
|
301
270
|
|
|
302
|
-
[
|
|
271
|
+
- [Aigne Framework](https://www.npmjs.com/package/@aigne/cli)
|
|
272
|
+
- [Arcblock](https://www.arcblock.io/)
|