@aigne/doc-smith 0.8.12-beta.7 → 0.8.12-beta.8
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/.aigne/doc-smith/config.yaml +1 -1
- package/.aigne/doc-smith/media-description.yaml +91 -0
- package/.aigne/doc-smith/upload-cache.yaml +6 -69
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +12 -0
- package/agents/clear/choose-contents.mjs +14 -1
- package/agents/clear/clear-media-description.mjs +129 -0
- package/agents/clear/index.yaml +3 -1
- package/agents/evaluate/code-snippet.mjs +28 -24
- package/agents/evaluate/document-structure.yaml +0 -4
- package/agents/evaluate/document.yaml +1 -5
- package/agents/generate/index.yaml +1 -0
- package/agents/init/index.mjs +10 -0
- package/agents/media/batch-generate-media-description.yaml +44 -0
- package/agents/media/generate-media-description.yaml +47 -0
- package/agents/media/load-media-description.mjs +238 -0
- package/agents/update/index.yaml +1 -0
- package/agents/utils/load-sources.mjs +103 -53
- package/aigne.yaml +6 -0
- package/assets/report-template/report.html +34 -34
- package/docs/configuration-initial-setup.md +74 -55
- package/docs/configuration.ja.md +59 -86
- package/docs/configuration.md +59 -86
- package/docs/configuration.zh-TW.md +59 -86
- package/docs/configuration.zh.md +59 -86
- package/docs/getting-started.ja.md +43 -24
- package/docs/getting-started.md +29 -10
- package/docs/getting-started.zh-TW.md +42 -23
- package/docs/getting-started.zh.md +39 -20
- package/docs/guides-cleaning-up.md +19 -18
- package/docs/guides-evaluating-documents.md +70 -29
- package/docs/guides-generating-documentation.md +59 -121
- package/docs/guides-interactive-chat.md +34 -26
- package/docs/guides-managing-history.md +18 -13
- package/docs/guides-publishing-your-docs.md +40 -35
- package/docs/guides-translating-documentation.md +39 -34
- package/docs/guides-updating-documentation.md +11 -9
- package/docs/overview.md +2 -2
- package/docs/release-notes.md +60 -27
- package/package.json +2 -1
- package/prompts/evaluate/document-structure.md +6 -7
- package/prompts/evaluate/document.md +16 -25
- package/prompts/media/media-description/system-prompt.md +35 -0
- package/prompts/media/media-description/user-prompt.md +8 -0
- package/utils/constants/index.mjs +0 -107
- package/utils/file-utils.mjs +41 -0
- package/media.md +0 -19
|
@@ -2,43 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
This guide provides instructions on how to translate your generated documentation into multiple languages using the `aigne doc translate` command. The process uses AI to ensure translations are contextually aware and maintain technical accuracy.
|
|
4
4
|
|
|
5
|
-
The tool supports 12 languages, allowing you to
|
|
5
|
+
The tool supports 12 languages, such as Chinese, Japanese, and German, allowing you to make your documentation accessible to a global audience. The primary language of your source documents is automatically excluded from the list of available translation languages.
|
|
6
6
|
|
|
7
7
|
## The `translate` Command
|
|
8
8
|
|
|
9
|
-
The `aigne doc translate` command
|
|
9
|
+
The `aigne doc translate` command generates translations for your existing documentation files. You can run it in an interactive mode for a step-by-step process or specify options directly on the command line for faster, automated workflows.
|
|
10
10
|
|
|
11
11
|
### Interactive Mode
|
|
12
12
|
|
|
13
|
-
For a guided experience, run the command without any arguments
|
|
13
|
+
For a guided experience, run the command without any arguments. This is the recommended approach for new users.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
aigne doc translate
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
When
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
When you run this command, the tool will guide you through the following steps:
|
|
20
|
+
|
|
21
|
+
1. **Select Documents:** You will be prompted to choose the specific documents you wish to translate from a list of all available files in your project.
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
2. **Select Languages:** Next, you will be asked to select the target languages for translation. Any languages you have used before will be pre-selected to save time.
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
3. **Process and Save:** The tool begins the translation process. Once complete, the translated files are saved in the same directory as the original files. The new files are named by adding a language code to the original filename. For example, a Chinese translation of `overview.md` will be saved as `overview.zh.md`.
|
|
25
30
|
|
|
26
31
|
### Command-Line Options
|
|
27
32
|
|
|
28
|
-
For non-interactive use or scripting, you can use
|
|
33
|
+
For non-interactive use or scripting, you can use command-line flags to control the translation process. This method is efficient when you already know which files and languages you need.
|
|
29
34
|
|
|
30
35
|
<x-field-group>
|
|
31
36
|
<x-field data-name="--docs" data-type="array<string>">
|
|
32
|
-
<x-field-desc markdown>Specify one or more document paths to translate. If not
|
|
37
|
+
<x-field-desc markdown>Specify one or more document paths to translate. If this flag is not used, the tool will start in interactive mode to let you select from a list of available documents.</x-field-desc>
|
|
33
38
|
</x-field>
|
|
34
39
|
<x-field data-name="--langs" data-type="array<string>">
|
|
35
|
-
<x-field-desc markdown>Specify one or more target language codes (e.g., `zh`, `ja`). If omitted, you will be prompted to select languages interactively.</x-field-desc>
|
|
40
|
+
<x-field-desc markdown>Specify one or more target language codes (e.g., `zh`, `ja`, `de`). If omitted, you will be prompted to select languages interactively.</x-field-desc>
|
|
36
41
|
</x-field>
|
|
37
42
|
<x-field data-name="--glossary" data-type="string">
|
|
38
|
-
<x-field-desc markdown>Provide a path to a glossary file (e.g., `@path/to/glossary.md`). This ensures that specific technical terms are translated consistently across all documents.</x-field-desc>
|
|
43
|
+
<x-field-desc markdown>Provide a path to a glossary file (e.g., `@path/to/glossary.md`). This ensures that specific technical terms, brand names, or acronyms are translated consistently across all documents.</x-field-desc>
|
|
39
44
|
</x-field>
|
|
40
45
|
<x-field data-name="--feedback" data-type="string">
|
|
41
|
-
<x-field-desc markdown>Provide specific instructions
|
|
46
|
+
<x-field-desc markdown>Provide specific instructions to guide the AI's translation style. For example, you can ask for a more formal tone or specify how to handle certain phrases.</x-field-desc>
|
|
42
47
|
</x-field>
|
|
43
48
|
</x-field-group>
|
|
44
49
|
|
|
@@ -46,7 +51,7 @@ For non-interactive use or scripting, you can use the following command-line fla
|
|
|
46
51
|
|
|
47
52
|
#### 1. Translate Specific Documents into Multiple Languages
|
|
48
53
|
|
|
49
|
-
To translate `overview.md` and `examples.md` into Chinese (`zh`) and Japanese (`ja`) without interactive prompts:
|
|
54
|
+
To translate `overview.md` and `examples.md` into Chinese (`zh`) and Japanese (`ja`) without any interactive prompts, run the following command:
|
|
50
55
|
|
|
51
56
|
```bash
|
|
52
57
|
aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
|
|
@@ -54,42 +59,42 @@ aigne doc translate --docs overview.md --docs examples.md --langs zh --langs ja
|
|
|
54
59
|
|
|
55
60
|
#### 2. Use a Glossary for Consistent Terminology
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
If your documentation contains specialized vocabulary or brand names, you can use a glossary file to ensure they are always translated correctly.
|
|
58
63
|
|
|
59
64
|
```bash
|
|
60
|
-
aigne doc translate --glossary @./glossary.md
|
|
65
|
+
aigne doc translate --glossary @./project-glossary.md
|
|
61
66
|
```
|
|
62
67
|
|
|
63
68
|
#### 3. Provide Feedback to Refine Translation Style
|
|
64
69
|
|
|
65
|
-
You can guide the translation style by providing feedback. For instance, to request a more formal tone:
|
|
70
|
+
You can guide the translation style by providing feedback. For instance, to request a more formal and technical tone for the output:
|
|
66
71
|
|
|
67
72
|
```bash
|
|
68
73
|
aigne doc translate --feedback "Use a formal, technical tone for all translations."
|
|
69
74
|
```
|
|
70
75
|
|
|
71
|
-
This feedback
|
|
76
|
+
This feedback is recorded in the document's update history, which can be useful for tracking changes.
|
|
72
77
|
|
|
73
78
|
## Supported Languages
|
|
74
79
|
|
|
75
80
|
The tool provides translation support for 12 languages. The native language of the documentation is English (`en`).
|
|
76
81
|
|
|
77
|
-
| Language
|
|
78
|
-
|
|
|
79
|
-
| Chinese (Simplified)
|
|
80
|
-
| Chinese (Traditional)| `zh-TW
|
|
81
|
-
| Japanese
|
|
82
|
-
| Korean
|
|
83
|
-
| Spanish
|
|
84
|
-
| French
|
|
85
|
-
| German
|
|
86
|
-
| Portuguese
|
|
87
|
-
| Russian
|
|
88
|
-
| Italian
|
|
89
|
-
| Arabic
|
|
82
|
+
| Language | Code |
|
|
83
|
+
| --------------------- | ------- |
|
|
84
|
+
| Chinese (Simplified) | `zh` |
|
|
85
|
+
| Chinese (Traditional) | `zh-TW` |
|
|
86
|
+
| Japanese | `ja` |
|
|
87
|
+
| Korean | `ko` |
|
|
88
|
+
| Spanish | `es` |
|
|
89
|
+
| French | `fr` |
|
|
90
|
+
| German | `de` |
|
|
91
|
+
| Portuguese | `pt` |
|
|
92
|
+
| Russian | `ru` |
|
|
93
|
+
| Italian | `it` |
|
|
94
|
+
| Arabic | `ar` |
|
|
90
95
|
|
|
91
96
|
## Summary
|
|
92
97
|
|
|
93
|
-
The `translate` command offers a structured method for localizing your documentation. You can use its interactive mode for guided
|
|
98
|
+
The `translate` command offers a structured and reliable method for localizing your documentation. You can use its interactive mode for a guided process or its command-line options for efficient, automated workflows. Features like glossaries and feedback help maintain the quality and consistency of the translated content.
|
|
94
99
|
|
|
95
|
-
After translating your documents,
|
|
100
|
+
After translating your documents, the next step is to make them available to your users. For instructions on how to do this, see the [Publishing Your Docs](./guides-publishing-your-docs.md) guide.
|
|
@@ -4,9 +4,11 @@ Maintaining the accuracy and relevance of documentation is a continuous process.
|
|
|
4
4
|
|
|
5
5
|
This guide explains the two primary methods for updating your documentation: an interactive mode for detailed, single-document refinement and a batch mode for applying changes to multiple documents at once.
|
|
6
6
|
|
|
7
|
+
For information on creating documents from scratch, please see the [Generating Documentation](./guides-generating-documentation.md) guide.
|
|
8
|
+
|
|
7
9
|
## Two Modes of Operation
|
|
8
10
|
|
|
9
|
-
The `update` command operates in one of two modes depending on the number of documents you select and the options you provide.
|
|
11
|
+
The `update` command operates in one of two modes depending on the number of documents you select and the options you provide. The system automatically chooses the appropriate mode based on your command.
|
|
10
12
|
|
|
11
13
|
1. **Interactive Mode**: Triggered when you update a single document without the `--reset` flag. This mode is designed for iterative refinement, allowing you to provide feedback, review the changes, and repeat the process until the document meets your standards.
|
|
12
14
|
2. **Batch Mode**: Used when you update multiple documents simultaneously or when you use the `--reset` flag. This mode applies your feedback to all selected documents in a single operation, which is efficient for broad changes.
|
|
@@ -41,20 +43,20 @@ Batch mode is designed for efficiency when you need to apply the same general fe
|
|
|
41
43
|
|
|
42
44
|
You can provide feedback directly from the command line to update one or more documents without entering an interactive session.
|
|
43
45
|
|
|
44
|
-
```bash
|
|
45
|
-
aigne doc update --docs overview
|
|
46
|
+
```bash Update a single document with feedback
|
|
47
|
+
aigne doc update --docs /overview --feedback "Add a section explaining the authentication flow"
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
```bash
|
|
49
|
-
aigne doc update --docs overview
|
|
50
|
+
```bash Update multiple documents with the same feedback
|
|
51
|
+
aigne doc update --docs /overview --docs /getting-started --feedback "Improve the clarity of all code examples"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
### Resetting and Regenerating
|
|
53
55
|
|
|
54
56
|
The `--reset` flag instructs the tool to ignore the previous versions of the documents and regenerate them from scratch based on the source code. This is useful when significant changes in the code have made the existing documentation obsolete.
|
|
55
57
|
|
|
56
|
-
```bash
|
|
57
|
-
aigne doc update --docs overview
|
|
58
|
+
```bash Regenerate a specific document from scratch
|
|
59
|
+
aigne doc update --docs /overview --reset
|
|
58
60
|
```
|
|
59
61
|
|
|
60
62
|
## Command Reference
|
|
@@ -63,7 +65,7 @@ The `update` command accepts several flags to control its behavior.
|
|
|
63
65
|
|
|
64
66
|
| Parameter | Description | Example |
|
|
65
67
|
| :--- | :--- | :--- |
|
|
66
|
-
| `--docs <path>` | Specifies one or more document paths to update.
|
|
68
|
+
| `--docs <path>` | Specifies one or more document paths to update. This flag can be used multiple times. | `--docs /overview --docs /guides/generating-documentation` |
|
|
67
69
|
| `--feedback <text>` | Provides instructions for what to change in the content. | `--feedback "Add more detail to the installation steps"` |
|
|
68
70
|
| `--glossary <file>` | Specifies a glossary file to ensure consistent terminology during regeneration. | `--glossary @/path/to/glossary.md` |
|
|
69
71
|
| `--reset` | A boolean flag that forces a complete regeneration of the selected documents, ignoring their previous versions. | `--reset` |
|
|
@@ -74,4 +76,4 @@ The `update` command offers a flexible workflow for keeping your documentation a
|
|
|
74
76
|
|
|
75
77
|
For related tasks, refer to the following guides:
|
|
76
78
|
- [Generating Documentation](./guides-generating-documentation.md)
|
|
77
|
-
- [Translating Documentation](./guides-translating-documentation.md)
|
|
79
|
+
- [Translating Documentation](./guides-translating-documentation.md)
|
package/docs/overview.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith is a tool that uses Artificial Intelligence to automatically create documentation from your project's source code. It is built on the [AIGNE Framework](https://www.aigne.io/framework) and is designed to produce structured, multi-language documents that accurately reflect your codebase.
|
|
3
|
+
AIGNE DocSmith is a tool that uses Artificial Intelligence to automatically create documentation from your project's source code. It is built on the [AIGNE Framework](https://www.aigne.io/en/framework) and is designed to produce structured, multi-language documents that accurately reflect your codebase.
|
|
4
4
|
|
|
5
5
|
The primary goal of DocSmith is to address the common challenges of manual documentation, such as being time-consuming to write, becoming outdated as code changes, and lacking consistency. By automating this process, DocSmith helps ensure your documentation remains current and accurate.
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ DocSmith provides a set of features to handle the documentation lifecycle from c
|
|
|
38
38
|
* **Multi-Language Support**: Translates documentation into 12 languages, including English, Chinese (Simplified), and Japanese. The translation process is context-aware to maintain technical accuracy.
|
|
39
39
|
* **Integration with LLMs**: Connects with various Large Language Models (LLMs). By default, it uses [AIGNE Hub](https://www.aigne.io/en/hub), a service that allows you to switch between models like Google Gemini and OpenAI GPT without needing separate API keys. You can also configure your own API keys for direct provider access.
|
|
40
40
|
* **Smart Updates**: Detects changes in your source code and updates the corresponding sections of your documentation. You can also provide specific feedback to refine generated content.
|
|
41
|
-
* **Publishing Options**: Publish your generated documentation with a single command. You can deploy to the official DocSmith platform or
|
|
41
|
+
* **Publishing Options**: Publish your generated documentation with a single command. You can deploy to the official DocSmith platform or run your own instance of [Discuss Kit](https://www.web3kit.rocks/discuss-kit). Discuss Kit is a service for hosting and displaying documentation.
|
|
42
42
|
|
|
43
43
|
## Available Commands
|
|
44
44
|
|
package/docs/release-notes.md
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
-
This document provides a
|
|
3
|
+
This document provides a chronological record of new features, improvements, and bug fixes for each version of the tool.
|
|
4
|
+
|
|
5
|
+
## Version 0.8.12-beta.7 (2025-10-12)
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
|
|
9
|
+
- The tool can now retrieve context more effectively from the project repository, leading to more accurate documentation.
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- Disabled Git-based update history tracking within repositories to prevent potential conflicts.
|
|
14
|
+
|
|
15
|
+
## Version 0.8.12-beta.6 (2025-10-11)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
- Improved the reliability of the publishing process by enhancing login session checks.
|
|
20
|
+
|
|
21
|
+
## Version 0.8.12-beta.5 (2025-10-11)
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
- Fixed a bug where the correct language setting was not applied during document checks.
|
|
26
|
+
|
|
27
|
+
## Version 0.8.12-beta.4 (2025-10-11)
|
|
28
|
+
|
|
29
|
+
### New Features
|
|
30
|
+
|
|
31
|
+
- Introduced optimizations for handling large projects, resulting in more efficient document generation.
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
- Ensured that generated documents follow a strict heading hierarchy (e.g., no skipping from H1 to H3).
|
|
36
|
+
- Improved the clarity of update notifications and added an option to clear deployment configurations.
|
|
4
37
|
|
|
5
38
|
## Version 0.8.12-beta.3 (2025-10-09)
|
|
6
39
|
|
|
@@ -12,19 +45,19 @@ This document provides a summary of new features, improvements, and bug fixes fo
|
|
|
12
45
|
|
|
13
46
|
### Bug Fixes
|
|
14
47
|
|
|
15
|
-
- Corrected an error with file
|
|
16
|
-
- Fixed
|
|
48
|
+
- Corrected an error with file path resolution when updating documents.
|
|
49
|
+
- Fixed an issue that could cause document generation and updates to fail.
|
|
17
50
|
|
|
18
51
|
## Version 0.8.12-beta.1 (2025-10-08)
|
|
19
52
|
|
|
20
53
|
### New Features
|
|
21
54
|
|
|
22
55
|
- Introduced history tracking, allowing you to view past changes to your documents.
|
|
23
|
-
-
|
|
56
|
+
- Made translation an optional step during the document update process for greater flexibility.
|
|
24
57
|
|
|
25
|
-
###
|
|
58
|
+
### Bug Fixes
|
|
26
59
|
|
|
27
|
-
-
|
|
60
|
+
- Refined the logic for document generation and updates to distinguish between system and user prompts.
|
|
28
61
|
|
|
29
62
|
## Version 0.8.12-beta (2025-10-07)
|
|
30
63
|
|
|
@@ -40,8 +73,8 @@ This version includes general maintenance and stability improvements.
|
|
|
40
73
|
|
|
41
74
|
### New Features
|
|
42
75
|
|
|
43
|
-
- Enhanced the document generator and updater
|
|
44
|
-
-
|
|
76
|
+
- Enhanced the document generator and updater with improved file system tools.
|
|
77
|
+
- Implemented a shared context mechanism to speed up document structure analysis and content refinement.
|
|
45
78
|
|
|
46
79
|
### Bug Fixes
|
|
47
80
|
|
|
@@ -58,18 +91,18 @@ This version includes general maintenance and stability improvements.
|
|
|
58
91
|
|
|
59
92
|
### New Features
|
|
60
93
|
|
|
61
|
-
- Added a "check-only" option for
|
|
94
|
+
- Added a "check-only" option for processes that use selection inputs.
|
|
62
95
|
|
|
63
96
|
### Bug Fixes
|
|
64
97
|
|
|
65
98
|
- Improved error handling in the document selection utility.
|
|
66
|
-
- Tuned the translation prompt
|
|
99
|
+
- Tuned the translation prompt to ensure that only comments within code blocks are translated.
|
|
67
100
|
|
|
68
101
|
## Version 0.8.11-beta.3 (2025-09-29)
|
|
69
102
|
|
|
70
103
|
### Bug Fixes
|
|
71
104
|
|
|
72
|
-
- Added a command-line entry for the evaluation agents.
|
|
105
|
+
- Added a command-line interface entry for the document evaluation agents.
|
|
73
106
|
|
|
74
107
|
## Version 0.8.11-beta.2 (2025-09-27)
|
|
75
108
|
|
|
@@ -82,12 +115,12 @@ This version includes general maintenance and stability improvements.
|
|
|
82
115
|
### New Features
|
|
83
116
|
|
|
84
117
|
- Introduced a document evaluation feature to generate quality reports.
|
|
85
|
-
- Enhanced the document and structure update process with improved tools.
|
|
118
|
+
- Enhanced the document and structure update process with improved internal tools.
|
|
86
119
|
- Improved vendor handling and debugging capabilities during the publishing process.
|
|
87
120
|
|
|
88
121
|
### Bug Fixes
|
|
89
122
|
|
|
90
|
-
- Fixed an issue where component descriptions were treated as attributes instead of text, improving custom component rendering.
|
|
123
|
+
- Fixed an issue where component descriptions were incorrectly treated as attributes instead of text content, improving custom component rendering.
|
|
91
124
|
|
|
92
125
|
## Version 0.8.10 (2025-09-20)
|
|
93
126
|
|
|
@@ -97,14 +130,14 @@ This version includes general maintenance and stability improvements.
|
|
|
97
130
|
|
|
98
131
|
### Bug Fixes
|
|
99
132
|
|
|
100
|
-
- Added links
|
|
101
|
-
- Polished the
|
|
133
|
+
- Added relevant links for enterprise deployment.
|
|
134
|
+
- Polished the text for the document review prompt for better clarity.
|
|
102
135
|
|
|
103
136
|
## Version 0.8.10-beta.2 (2025-09-18)
|
|
104
137
|
|
|
105
138
|
### Bug Fixes
|
|
106
139
|
|
|
107
|
-
- Improved the prompts and display for the documentation structure review.
|
|
140
|
+
- Improved the prompts and display for the documentation structure review feature.
|
|
108
141
|
- Updated the usage rules for field elements to ensure correct rendering.
|
|
109
142
|
|
|
110
143
|
## Version 0.8.10-beta.1 (2025-09-18)
|
|
@@ -128,7 +161,7 @@ This version includes general maintenance and stability improvements.
|
|
|
128
161
|
|
|
129
162
|
### Bug Fixes
|
|
130
163
|
|
|
131
|
-
- Optimized the
|
|
164
|
+
- Optimized the text for inquiry feedback prompts to be clearer and more helpful.
|
|
132
165
|
|
|
133
166
|
## Version 0.8.7 (2025-09-12)
|
|
134
167
|
|
|
@@ -140,11 +173,11 @@ This version includes general maintenance and stability improvements.
|
|
|
140
173
|
|
|
141
174
|
### New Features
|
|
142
175
|
|
|
143
|
-
- The URL is now displayed by default after a successful publishing process.
|
|
176
|
+
- The documentation URL is now displayed by default after a successful publishing process.
|
|
144
177
|
|
|
145
178
|
### Bug Fixes
|
|
146
179
|
|
|
147
|
-
- Ensured that logs are saved correctly during
|
|
180
|
+
- Ensured that logs are saved correctly during deployment to prevent data loss.
|
|
148
181
|
|
|
149
182
|
## Version 0.8.5 (2025-09-10)
|
|
150
183
|
|
|
@@ -156,7 +189,7 @@ This version includes general maintenance and stability improvements.
|
|
|
156
189
|
|
|
157
190
|
### Bug Fixes
|
|
158
191
|
|
|
159
|
-
- Markdown code blocks are now parsed into a custom
|
|
192
|
+
- Markdown code blocks are now parsed into a custom element with support for enhanced attributes like titles and icons.
|
|
160
193
|
- Made the background for D2 diagrams transparent for better integration with different themes.
|
|
161
194
|
|
|
162
195
|
## Version 0.8.3 (2025-09-05)
|
|
@@ -169,7 +202,7 @@ This version includes general maintenance and stability improvements.
|
|
|
169
202
|
|
|
170
203
|
### New Features
|
|
171
204
|
|
|
172
|
-
-
|
|
205
|
+
- Improved D2 chart generation with more comprehensive internal examples to enhance output quality.
|
|
173
206
|
|
|
174
207
|
## Version 0.8.0 (2025-09-03)
|
|
175
208
|
|
|
@@ -181,7 +214,7 @@ This version includes general maintenance and stability improvements.
|
|
|
181
214
|
|
|
182
215
|
### Bug Fixes
|
|
183
216
|
|
|
184
|
-
- Fixed a bug where using the
|
|
217
|
+
- Fixed a bug where using the Tab key for path selection did not work as expected.
|
|
185
218
|
|
|
186
219
|
## Version 0.7.0 (2025-08-30)
|
|
187
220
|
|
|
@@ -195,7 +228,7 @@ This version includes general maintenance and stability improvements.
|
|
|
195
228
|
|
|
196
229
|
### New Features
|
|
197
230
|
|
|
198
|
-
- Implemented
|
|
231
|
+
- Implemented support for media processing before publishing documents.
|
|
199
232
|
|
|
200
233
|
## Version 0.5.0 (2025-08-26)
|
|
201
234
|
|
|
@@ -205,7 +238,7 @@ This version includes general maintenance and stability improvements.
|
|
|
205
238
|
|
|
206
239
|
### Bug Fixes
|
|
207
240
|
|
|
208
|
-
- Polished the text of
|
|
241
|
+
- Polished the text of questions asked during the initial setup process.
|
|
209
242
|
|
|
210
243
|
## Version 0.4.4 (2025-08-22)
|
|
211
244
|
|
|
@@ -229,7 +262,7 @@ This version includes general maintenance and stability improvements.
|
|
|
229
262
|
|
|
230
263
|
### New Features
|
|
231
264
|
|
|
232
|
-
-
|
|
265
|
+
- Refined the workflow for collecting context during document generation.
|
|
233
266
|
|
|
234
267
|
### Bug Fixes
|
|
235
268
|
|
|
@@ -239,7 +272,7 @@ This version includes general maintenance and stability improvements.
|
|
|
239
272
|
|
|
240
273
|
### Bug Fixes
|
|
241
274
|
|
|
242
|
-
- Switched the default language model to improve generation quality.
|
|
275
|
+
- Switched the default large language model to improve generation quality.
|
|
243
276
|
|
|
244
277
|
## Version 0.2.5 (2025-08-08)
|
|
245
278
|
|
|
@@ -251,5 +284,5 @@ This version includes general maintenance and stability improvements.
|
|
|
251
284
|
|
|
252
285
|
### New Features
|
|
253
286
|
|
|
254
|
-
- The tool will now automatically initialize the configuration if it
|
|
287
|
+
- The tool will now automatically initialize the configuration if it is missing when a command is run.
|
|
255
288
|
- Added a new `update` command to refresh documents when source files have changed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/doc-smith",
|
|
3
|
-
"version": "0.8.12-beta.
|
|
3
|
+
"version": "0.8.12-beta.8",
|
|
4
4
|
"description": "AI-driven documentation generation tool built on the AIGNE Framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"fs-extra": "^11.3.1",
|
|
30
30
|
"glob": "^11.0.3",
|
|
31
31
|
"gpt-tokenizer": "^3.2.0",
|
|
32
|
+
"image-size": "^2.0.2",
|
|
32
33
|
"isbinaryfile": "^5.0.6",
|
|
33
34
|
"jsdom": "^26.1.0",
|
|
34
35
|
"marked": "^15.0.12",
|
|
@@ -31,16 +31,16 @@ You must **precisely map** the correspondence between each module in the structu
|
|
|
31
31
|
Start from a **baseline of 80 points**. Evaluate by logging every key observation in `details` with one of five **levels**. Each level contributes a fixed delta; sum all deltas and add them to the baseline (clamp the final score to 0–100). Treat every key point independently so strengths and gaps can stack.
|
|
32
32
|
|
|
33
33
|
**Level catalog (use consistently across all dimensions):**
|
|
34
|
-
- `Excellent` — Exceptional: fully satisfies the dimension with clear, actionable outputs
|
|
35
|
-
- `Good` — Strong: aligns well with the dimension with only minor gaps
|
|
36
|
-
- `Meets` — Adequate: acceptable baseline coverage without notable strengths or weaknesses
|
|
37
|
-
- `Minor` — Problematic: specific deficiencies that reduce usefulness and require fixes
|
|
38
|
-
- `Critical` — Failing: fundamental issues that prevent the dimension from being met
|
|
34
|
+
- `Excellent` — Exceptional: fully satisfies the dimension with clear, actionable outputs.
|
|
35
|
+
- `Good` — Strong: aligns well with the dimension with only minor gaps.
|
|
36
|
+
- `Meets` — Adequate: acceptable baseline coverage without notable strengths or weaknesses.
|
|
37
|
+
- `Minor` — Problematic: specific deficiencies that reduce usefulness and require fixes.
|
|
38
|
+
- `Critical` — Failing: fundamental issues that prevent the dimension from being met.
|
|
39
39
|
|
|
40
40
|
Apply these levels to the following key points. Create a separate detail entry for each observation; if the same issue repeats (e.g., multiple typos), record multiple entries at the appropriate level.
|
|
41
41
|
|
|
42
42
|
1. **Purpose Coverage** — Evaluate every selected purpose, paying special attention to declared priorities:
|
|
43
|
-
- `Excellent`: The structure provides dedicated modules, explicit workflows, and measurable steps that achieve the purpose end-to-end
|
|
43
|
+
- `Excellent`: The structure provides dedicated modules, explicit workflows, and measurable steps that achieve the purpose end-to-end.
|
|
44
44
|
- `Good`: The purpose is clearly mapped to modules with practical guidance and minimal omissions.
|
|
45
45
|
- `Meets`: The purpose appears in general sections or implicit references but lacks targeted treatment.
|
|
46
46
|
- `Minor`: Important sub-tasks or ordering for the purpose are missing or incomplete, reducing utility.
|
|
@@ -82,7 +82,6 @@ Strictly follow these steps:
|
|
|
82
82
|
|
|
83
83
|
<output_constraints>
|
|
84
84
|
|
|
85
|
-
- `baseline` must be fixed at 80
|
|
86
85
|
- `details` is an array. Each element must include:
|
|
87
86
|
- `dimension`: one of `purposeCoverage`, `audienceCoverage`, `coverageDepth`
|
|
88
87
|
- `level`: one of `excellent`, `good`, `meets`, `minor`, `critical`
|
|
@@ -48,73 +48,66 @@ Please **strictly adhere** to the evaluation standards defined in `<standards>`
|
|
|
48
48
|
|
|
49
49
|
<standards>
|
|
50
50
|
|
|
51
|
-
Start from a **baseline of 80 points**. Evaluate by logging every key observation in `details` using one of five **levels**. Each level corresponds to a fixed score delta
|
|
51
|
+
Start from a **baseline of 80 points**. Evaluate by logging every key observation in `details` using one of five **levels**. Each level corresponds to a fixed score delta. Sum deltas with the baseline and clamp the final score to 0–100. Treat each key point independently so strengths and gaps can stack. When the same issue recurs (e.g., multiple typos), create multiple entries.
|
|
52
52
|
|
|
53
53
|
**Level catalog (use consistently across all dimensions):**
|
|
54
|
-
- `Excellent` — Exceptional output that fully satisfies the dimension with clear, actionable results
|
|
55
|
-
- `Good` — Strong and mostly complete alignment with the dimension; minor gaps only
|
|
56
|
-
- `Meets` — Satisfactory baseline coverage without significant strengths or faults
|
|
57
|
-
- `Minor` — Specific problems that reduce usefulness and should be corrected
|
|
58
|
-
- `Critical` — Fundamental failures that prevent the dimension from being met
|
|
54
|
+
- `Excellent` — Exceptional output that fully satisfies the dimension with clear, actionable results.
|
|
55
|
+
- `Good` — Strong and mostly complete alignment with the dimension; minor gaps only.
|
|
56
|
+
- `Meets` — Satisfactory baseline coverage without significant strengths or faults.
|
|
57
|
+
- `Minor` — Specific problems that reduce usefulness and should be corrected.
|
|
58
|
+
- `Critical` — Fundamental failures that prevent the dimension from being met.
|
|
59
59
|
|
|
60
60
|
Apply these levels to the following evaluation dimensions:
|
|
61
61
|
|
|
62
|
-
1. **Readability** — Language clarity, grammar, spelling, and fluency.
|
|
62
|
+
1. **Readability** — Language clarity, grammar, spelling, and fluency. **MUST evaluate on every document**
|
|
63
63
|
- `Excellent`: Text is polished, natural, and easy to read; terminology is well chosen and consistent.
|
|
64
64
|
- `Good`: Minor slips (occasional typos or awkward phrasing) that do not impede understanding.
|
|
65
65
|
- `Meets`: Understandable but plain or mechanical; no major errors.
|
|
66
66
|
- `Minor`: Noticeable grammar or spelling mistakes in specific sentences that need fixes.
|
|
67
67
|
- `Critical`: Language prevents comprehension or is unusable.
|
|
68
68
|
|
|
69
|
-
2. **Coherence** — Logical flow, transitions, and absence of contradictions.
|
|
69
|
+
2. **Coherence** — Logical flow, transitions, and absence of contradictions. **MUST evaluate on every document**
|
|
70
70
|
- `Excellent`: Clear, well-ordered flow with explicit transitions and consistent argumentation.
|
|
71
71
|
- `Good`: Mostly coherent with small gaps in transitions or sequencing.
|
|
72
72
|
- `Meets`: Functional flow but requires reader inference to connect ideas.
|
|
73
73
|
- `Minor`: Local ordering problems or small contradictions that confuse the reader.
|
|
74
74
|
- `Critical`: Structural contradictions or ordering failures that break the document's logic.
|
|
75
75
|
|
|
76
|
-
3. **Content Quality** — Coverage, accuracy, examples, and actionable detail relative to the plan (`description`).
|
|
76
|
+
3. **Content Quality** — Coverage, accuracy, examples, and actionable detail relative to the plan (`description`). **MUST evaluate on every document**
|
|
77
77
|
- `Excellent`: Content fully implements the plan with accurate, actionable guidance and relevant examples.
|
|
78
78
|
- `Good`: Most planned items are addressed with only minor missing details.
|
|
79
79
|
- `Meets`: Baseline coverage is present but lacks depth or practical instructions.
|
|
80
80
|
- `Minor`: Certain sections are missing, incorrect, or ambiguous and should be corrected.
|
|
81
81
|
- `Critical`: Core content is wrong or absent, failing to deliver planned outcomes.
|
|
82
82
|
|
|
83
|
-
4. **Consistency** — Terminology, style, formatting, and references.
|
|
83
|
+
4. **Consistency** — Terminology, style, formatting, and references. **MUST evaluate on every document**
|
|
84
84
|
- `Excellent`: Terms, style, and formatting are uniform and purposeful across the document.
|
|
85
85
|
- `Good`: Largely consistent with only isolated mismatches that do not impede understanding.
|
|
86
86
|
- `Meets`: Acceptable uniformity but lacks deliberate stylistic cohesion.
|
|
87
87
|
- `Minor`: Specific term or formatting inconsistencies that should be standardized.
|
|
88
88
|
- `Critical`: Pervasive inconsistency that undermines trust in the content.
|
|
89
89
|
|
|
90
|
-
5. **Purpose Alignment** — Relevance to user-selected purposes (document only needs to satisfy at least one when multiples exist).
|
|
91
|
-
- `Excellent`: The document supplies targeted sections, validation steps, and clear calls-to-action that realize the chosen purpose
|
|
90
|
+
5. **Purpose Alignment** — Relevance to user-selected purposes (document only needs to satisfy at least one when multiples exist). (Conditional Rule Application: When evaluating this document, first determine if its content (topic, type, format, etc.) is highly relevant to the scope of this evaluation rule. Apply this specific criterion only if the content is deemed relevant.)
|
|
91
|
+
- `Excellent`: The document supplies targeted sections, validation steps, and clear calls-to-action that realize the chosen purpose.
|
|
92
92
|
- `Good`: Purpose is clearly addressed but may lack polish or some validation details.
|
|
93
93
|
- `Meets`: Purpose is present in general terms but lacks concrete steps or targeted content.
|
|
94
94
|
- `Minor`: Key components required by the purpose are missing or incomplete.
|
|
95
95
|
- `Critical`: Document fails to address the selected purpose or pursues a different objective.
|
|
96
96
|
|
|
97
|
-
6. **Audience Alignment** — Tone, assumptions, and artifacts for target persona(s).
|
|
97
|
+
6. **Audience Alignment** — Tone, assumptions, and artifacts for target persona(s). (Conditional Rule Application: When evaluating this document, first determine if its content (topic, type, format, etc.) is highly relevant to the scope of this evaluation rule. Apply this specific criterion only if the content is deemed relevant.)
|
|
98
98
|
- `Excellent`: Messaging, examples, and precautions are tailored to each audience persona and their needs.
|
|
99
99
|
- `Good`: Tone and examples suit the audience with only minor mismatches.
|
|
100
100
|
- `Meets`: Document is generally usable by audiences but lacks persona-specific guidance.
|
|
101
101
|
- `Minor`: Sections explicitly mismatch audience skill levels or expectations and should be revised.
|
|
102
102
|
- `Critical`: Document is pitched at the wrong audience and cannot be used meaningfully.
|
|
103
103
|
|
|
104
|
-
7. **Knowledge Level Alignment** — Depth versus reader expertise.
|
|
104
|
+
7. **Knowledge Level Alignment** — Depth versus reader expertise. (Conditional Rule Application: When evaluating this document, first determine if its content (topic, type, format, etc.) is highly relevant to the scope of this evaluation rule. Apply this specific criterion only if the content is deemed relevant.)
|
|
105
105
|
- `Excellent`: Material offers layered explanations, optional deep dives, and matches expected expertise.
|
|
106
106
|
- `Good`: Overall depth fits the reader with small areas that are slightly over- or under-advanced.
|
|
107
|
-
- `Meets`: Baseline depth is acceptable but uneven across topics
|
|
107
|
+
- `Meets`: Baseline depth is acceptable but uneven across topics.
|
|
108
108
|
- `Minor`: Specific sections are noticeably too shallow or too advanced and need rework.
|
|
109
109
|
- `Critical`: The document's level is consistently misaligned with reader expertise.
|
|
110
110
|
|
|
111
|
-
8. **Navigability** — Link accuracy, anchor availability, and cross-reference integrity.
|
|
112
|
-
- `Excellent`: TOC, anchors, and cross-links are accurate and make navigation effortless.
|
|
113
|
-
- `Good`: Navigation and links are mostly correct with minor issues scoring +2.
|
|
114
|
-
- `Meets`: Basic navigation exists but lacks robust anchors or enhancements.
|
|
115
|
-
- `Minor`: Some broken or mismatched links and missing anchors that should be fixed.
|
|
116
|
-
- `Critical`: Multiple broken links or mislabeled sections make navigation unreliable.
|
|
117
|
-
|
|
118
111
|
</standards>
|
|
119
112
|
|
|
120
113
|
<rules>
|
|
@@ -136,10 +129,8 @@ Strictly follow these steps:
|
|
|
136
129
|
</rules>
|
|
137
130
|
|
|
138
131
|
<output_constraints>
|
|
139
|
-
|
|
140
|
-
- `baseline` must be fixed at 80
|
|
141
132
|
- `details` is an array. Each element must include:
|
|
142
|
-
- `dimension`: one of `readability`, `coherence`, `contentQuality`, `consistency`, `purposeAlignment`, `audienceAlignment`, `knowledgeLevelAlignment
|
|
133
|
+
- `dimension`: one of `readability`, `coherence`, `contentQuality`, `consistency`, `purposeAlignment`, `audienceAlignment`, `knowledgeLevelAlignment`
|
|
143
134
|
- `level`: one of `excellent`, `good`, `meets`, `minor`, `critical`
|
|
144
135
|
- `topic`: short identifier for the passage/section being judged
|
|
145
136
|
- `line`: integer line number within the source document (use 0 if unknown)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<role_and_goal>
|
|
2
|
+
You are an expert at analyzing media files (images and videos) and generating concise, meaningful descriptions for documentation content.
|
|
3
|
+
|
|
4
|
+
Your goal is to examine a single media file and generate an accurate description that helps both AI content generators and human readers understand what the media depicts and how it can be used effectively in documentation.
|
|
5
|
+
</role_and_goal>
|
|
6
|
+
|
|
7
|
+
<analysis_workflow>
|
|
8
|
+
1. **Analyze**: Examine the media file carefully and identify:
|
|
9
|
+
- The main subject or component being shown
|
|
10
|
+
- Key visual elements (colors, composition, style)
|
|
11
|
+
- Notable features or functionality visible
|
|
12
|
+
- The purpose or context of this media
|
|
13
|
+
- Mood or atmosphere if distinctive
|
|
14
|
+
- For videos: key actions, movements, or transitions
|
|
15
|
+
|
|
16
|
+
2. **Generate Description**: Create a concise, human-readable description following these principles:
|
|
17
|
+
- Keep it between 2-3 sentences
|
|
18
|
+
- Be specific and descriptive about visual content
|
|
19
|
+
- For videos, describe the key content or action shown
|
|
20
|
+
- Focus on aspects that matter for documentation usage
|
|
21
|
+
- Remain objective - describe what you see, not what you interpret
|
|
22
|
+
</analysis_workflow>
|
|
23
|
+
|
|
24
|
+
<description_guidelines>
|
|
25
|
+
**What to Include:**
|
|
26
|
+
- Main subject or focus of the media
|
|
27
|
+
- Key visual elements and composition
|
|
28
|
+
- Context or setting if relevant for understanding
|
|
29
|
+
- Technical aspects if relevant (e.g., "screenshot", "diagram", "illustration", "animation")
|
|
30
|
+
- Key features or functionality visible
|
|
31
|
+
- Its purpose or functionality
|
|
32
|
+
- Any notable UI elements or features
|
|
33
|
+
- For videos: describe the main action, movement, or narrative
|
|
34
|
+
</description_guidelines>
|
|
35
|
+
|