@aigne/doc-smith 0.8.10-beta.2 → 0.8.10

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.8.10-beta.2"
2
+ ".": "0.8.10"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.10](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.10-beta.3...v0.8.10) (2025-09-20)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * release 0.8.10 ([35ac7c8](https://github.com/AIGNE-io/aigne-doc-smith/commit/35ac7c8fb56d6612595af1429ccad1b7804edeb8))
9
+ * release 0.8.10 ([59c98bb](https://github.com/AIGNE-io/aigne-doc-smith/commit/59c98bbc479cd415c6540ee138e4e711c8dc0490))
10
+
11
+ ## [0.8.10-beta.3](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.10-beta.2...v0.8.10-beta.3) (2025-09-19)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **cli:** add enterprise deployment related links ([#125](https://github.com/AIGNE-io/aigne-doc-smith/issues/125)) ([f115309](https://github.com/AIGNE-io/aigne-doc-smith/commit/f11530967fef0bf2ead7f307a5513a1f3d6513f5))
17
+ * polish review prompt copywriting ([#124](https://github.com/AIGNE-io/aigne-doc-smith/issues/124)) ([ea3c6a8](https://github.com/AIGNE-io/aigne-doc-smith/commit/ea3c6a837a32b0135e75faf85406049406055931))
18
+
3
19
  ## [0.8.10-beta.2](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.10-beta.1...v0.8.10-beta.2) (2025-09-18)
4
20
 
5
21
 
package/README.md CHANGED
@@ -1,11 +1,23 @@
1
- [![GitHub star chart](https://img.shields.io/github/stars/AIGNE-io/aigne-doc-smith?style=flat-square)](https://star-history.com/#AIGNE-io/aigne-doc-smith)
1
+ [![GitHub stars](https://img.shields.io/github/stars/AIGNE-io/aigne-doc-smith?style=flat-square)](https://github.com/AIGNE-io/aigne-doc-smith/stargazers)
2
+ [![NPM Version](https://img.shields.io/npm/v/@aigne/doc-smith?style=flat-square)](https://www.npmjs.com/package/@aigne/doc-smith)
3
+ [![NPM Downloads](https://img.shields.io/npm/dm/@aigne/doc-smith?style=flat-square)](https://www.npmjs.com/package/@aigne/doc-smith)
2
4
  [![Open Issues](https://img.shields.io/github/issues-raw/AIGNE-io/aigne-doc-smith?style=flat-square)](https://github.com/AIGNE-io/aigne-doc-smith/issues)
5
+ [![License](https://img.shields.io/github/license/AIGNE-io/aigne-doc-smith?style=flat-square)](https://github.com/AIGNE-io/aigne-doc-smith/blob/main/LICENSE)
3
6
  [![codecov](https://codecov.io/gh/AIGNE-io/aigne-doc-smith/graph/badge.svg?token=95TQO2NKYC)](https://codecov.io/gh/AIGNE-io/aigne-doc-smith)
4
- [![NPM Version](https://img.shields.io/npm/v/@aigne/doc-smith)](https://www.npmjs.com/package/@aigne/doc-smith)
5
7
 
6
8
  # AIGNE DocSmith
7
9
 
8
- AIGNE DocSmith is a powerful, AI-driven documentation generation tool built on the [AIGNE Framework](https://www.aigne.io/en/framework). It automates the creation of detailed, structured, and multi-language documentation directly from your source code.
10
+ > 🚀 **AI-powered documentation generation that understands your code**
11
+
12
+ AIGNE DocSmith is a powerful, AI-driven documentation generation tool built on the [AIGNE Framework](https://www.aigne.io/en/framework). It automatically analyzes your codebase and generates comprehensive, structured, and multi-language documentation that stays in sync with your code.
13
+
14
+ ## 🎯 Why DocSmith?
15
+
16
+ - **🧠 Intelligent Analysis**: Understands your code structure, patterns, and intent
17
+ - **📚 Comprehensive Coverage**: Generates complete documentation from API references to user guides
18
+ - **🌍 Global Ready**: Supports 12 languages with professional translation
19
+ - **🔄 Always Current**: Automatically detects changes and updates documentation
20
+ - **⚡ Zero Config**: Works out of the box with smart defaults and auto-detection
9
21
 
10
22
  ## AIGNE Ecosystem
11
23
 
@@ -15,22 +27,34 @@ DocSmith is part of the [AIGNE](https://www.aigne.io) ecosystem, a comprehensive
15
27
 
16
28
  As shown in the diagram, DocSmith integrates seamlessly with other [AIGNE](https://www.aigne.io) components, leveraging the platform's AI capabilities and infrastructure.
17
29
 
18
- ## Features
30
+ ## Features
31
+
32
+ ### 🤖 AI-Powered Generation
33
+ - **Smart Structure Planning**: Automatically analyzes your codebase to create logical, comprehensive documentation structure
34
+ - **Intelligent Content Creation**: Generates detailed, contextual content that explains both "what" and "why"
35
+ - **Adaptive Writing Styles**: Supports multiple documentation styles (Technical, User-Friendly, Developer-Focused, etc.)
19
36
 
20
- - **Automated Document Structure Generation:** Intelligently analyzes your codebase to generate a comprehensive and logical document structure.
21
- - **AI-Powered Content Generation:** Populates the document structure with detailed, high-quality content.
22
- - **Multi-Language Support:** Seamlessly translates your documentation into 12 languages including English, Chinese, Japanese, Korean, Spanish, French, German, Portuguese, Russian, Italian, and Arabic.
23
- - **AIGNE Hub Integration:** Use [AIGNE Hub](https://www.aigne.io/en/hub) as your LLM provider without needing your own API keys, with easy switching between different large language models.
24
- - **Document Publishing:** Preview your documentation on the official platform at [docsmith.aigne.io](https://docsmith.aigne.io/app/), or publish to your own [Discuss Kit](https://www.arcblock.io/docs/web3-kit/en/discuss-kit) instance for full control.
25
- - **Document Update Mechanism:** Automatically detects source code changes and updates documentation accordingly.
26
- - **Individual Document Optimization:** Regenerate and optimize specific documents with targeted feedback.
37
+ ### 🌍 Multi-Language Excellence
38
+ - **12 Language Support**: English, Chinese (Simplified & Traditional), Japanese, Korean, Spanish, French, German, Portuguese, Russian, Italian, and Arabic
39
+ - **Professional Translation**: Context-aware translation that maintains technical accuracy
40
+ - **Glossary Integration**: Consistent terminology across all languages
27
41
 
28
- ## Getting Started
42
+ ### 🔗 Seamless Integration
43
+ - **AIGNE Hub Integration**: Use [AIGNE Hub](https://www.aigne.io/en/hub) without API keys, switch between Google Gemini, OpenAI GPT, Claude, and more
44
+ - **Multiple LLM Support**: Bring your own API keys for OpenAI, Anthropic, Google, and other providers
45
+ - **Discuss Kit Publishing**: Deploy to [docsmith.aigne.io](https://docsmith.aigne.io/app/) or your own [Discuss Kit](https://www.arcblock.io/docs/web3-kit/en/discuss-kit) instance
46
+
47
+ ### 🔄 Smart Updates
48
+ - **Change Detection**: Automatically identifies code changes and updates relevant documentation
49
+ - **Targeted Regeneration**: Update specific sections with custom feedback and requirements
50
+ - **Version Awareness**: Maintains documentation history and tracks changes over time
51
+
52
+ ## 🚀 Quick Start
29
53
 
30
54
  ### Prerequisites
31
55
 
32
- - Node.js and npm
33
- - AIGNE CLI
56
+ - Node.js 18+ and npm/pnpm
57
+ - No API keys required (uses AIGNE Hub by default)
34
58
 
35
59
  ### Node.js Installation
36
60
 
@@ -104,210 +128,244 @@ node --version
104
128
  npm --version
105
129
  ```
106
130
 
107
- ### Installation
131
+ ### 📦 Installation
108
132
 
109
- Install the latest version of AIGNE CLI globally:
133
+ Install the AIGNE CLI globally:
110
134
 
111
135
  ```bash
112
- npm i -g @aigne/cli
136
+ npm install -g @aigne/cli
113
137
  ```
114
138
 
115
139
  Verify the installation:
116
140
 
117
141
  ```bash
118
- aigne doc -h
142
+ aigne doc --help
119
143
  ```
120
144
 
121
- That's it! You can now use DocSmith directly through the AIGNE CLI.
122
-
123
- ### LLM Configuration
124
-
125
- DocSmith supports multiple LLM providers through AIGNE Hub:
145
+ ### 🎉 Generate Your First Documentation
126
146
 
127
- - **AIGNE Hub (Recommended):** No API key required, easy model switching
128
- - **Custom API Keys:** Support for OpenAI, Anthropic, and other providers
129
-
130
- To use AIGNE Hub, simply run commands without specifying API keys:
147
+ Navigate to your project directory and run:
131
148
 
132
149
  ```bash
133
- # Using AIGNE Hub with different models
134
- aigne doc generate --model google:gemini-2.5-flash
135
- aigne doc generate --model claude:claude-3-5-sonnet
136
- aigne doc generate --model openai:gpt-4o
150
+ # One command to rule them all
151
+ aigne doc generate
137
152
  ```
138
153
 
139
- ### Usage
154
+ DocSmith will:
155
+ 1. 🔍 Auto-detect your project structure and tech stack
156
+ 2. 🎯 Guide you through an interactive setup (first time only)
157
+ 3. 📝 Generate comprehensive documentation
158
+ 4. 🌍 Optionally translate to multiple languages
159
+ 5. 🚀 Publish to your preferred platform
140
160
 
141
- #### Generate Documentation
161
+ ## 🔧 Advanced Configuration
142
162
 
143
- To generate documentation, simply run:
144
-
145
- ```bash
146
- aigne doc generate
147
- ```
163
+ ### LLM Providers
148
164
 
149
- **Smart Auto-Configuration:** If you haven't run `init` before, DocSmith will automatically detect this and guide you through the interactive configuration wizard first. This includes:
150
- - Document generation rules and style selection
151
- - Target audience definition
152
- - Primary and translation language settings
153
- - Source code path configuration
154
- - Output directory setup
165
+ DocSmith supports multiple AI providers:
155
166
 
156
- **Force Regeneration:** To regenerate all documentation from scratch, use:
167
+ **🎯 AIGNE Hub (Recommended)**
168
+ - ✅ No API keys required
169
+ - ✅ Easy model switching
170
+ - ✅ Built-in rate limiting and optimization
157
171
 
158
172
  ```bash
159
- aigne doc generate --forceRegenerate
173
+ # Switch models effortlessly
174
+ aigne doc generate --model google:gemini-2.5-pro
175
+ aigne doc generate --model claude:claude-3-5-sonnet
176
+ aigne doc generate --model openai:gpt-4o
160
177
  ```
161
178
 
162
- This will regenerate all documentation based on the latest source code and configuration.
179
+ **🔑 Custom API Keys**
180
+ Configure your own API keys for direct provider access:
181
+ - OpenAI GPT models
182
+ - Anthropic Claude models
183
+ - Google Gemini models
184
+ - And more...
163
185
 
164
- #### Manual Configuration (Optional)
186
+ ## 📖 Usage Guide
165
187
 
166
- If you prefer to set up configuration manually or want to modify existing settings:
188
+ ### Core Commands
167
189
 
190
+ #### 📝 Generate Documentation
168
191
  ```bash
169
- aigne doc init
170
- ```
171
-
172
- This will start the interactive configuration wizard directly.
192
+ # Smart generation with auto-configuration
193
+ aigne doc generate
173
194
 
174
- #### Update Individual Documents
195
+ # Force complete regeneration
196
+ aigne doc generate --forceRegenerate
175
197
 
176
- Optimize specific documents with targeted feedback:
198
+ # Generate with custom feedback
199
+ aigne doc generate --feedback "Add more API examples and troubleshooting sections"
200
+ ```
177
201
 
202
+ #### 🔄 Update Existing Documents
178
203
  ```bash
179
204
  # Interactive document selection and update
180
205
  aigne doc update
181
206
 
182
- # Update a specific document
183
- aigne doc update --docs overview.md --feedback "Add more comprehensive FAQ entries"
207
+ # Update specific document with feedback
208
+ aigne doc update --docs overview.md --feedback "Add comprehensive FAQ section"
184
209
  ```
185
210
 
186
- **Interactive Mode:** When run without parameters, `aigne doc update` will present an interactive menu for you to select which document to regenerate and provide feedback.
211
+ #### 🌍 Multi-Language Translation
212
+ ```bash
213
+ # Interactive translation with smart language selection
214
+ aigne doc translate
215
+
216
+ # Translate specific documents to multiple languages
217
+ aigne doc translate --langs zh --langs ja --docs examples.md --docs overview.md
218
+
219
+ # Translation with custom glossary for consistent terminology
220
+ aigne doc translate --glossary @path/to/glossary.md --feedback "Use technical terminology consistently"
221
+ ```
187
222
 
188
- #### Optimize Document Structure
223
+ #### 🚀 Publishing & Deployment
224
+ ```bash
225
+ # Interactive publishing with platform selection
226
+ aigne doc publish
189
227
 
190
- Improve the overall documentation structure based on feedback:
228
+ # Publish to custom Discuss Kit instance
229
+ aigne doc publish --appUrl https://your-discuss-kit-instance.com
230
+ ```
191
231
 
232
+ #### ⚙️ Configuration Management
192
233
  ```bash
193
- # Optimize structure with feedback
194
- aigne doc generate --feedback "Remove About section and add API Reference"
234
+ # Interactive configuration setup
235
+ aigne doc init
195
236
 
196
- # Regenerate structure with specific improvements
197
- aigne doc generate --feedback "Add more detailed installation guide and troubleshooting section"
237
+ # View current configuration
238
+ aigne doc prefs
198
239
  ```
199
240
 
200
- **Structure Optimization:** Use `aigne doc generate` with `--feedback` to refine the overall documentation structure, add new sections, or reorganize existing content.
241
+ ### Configuration Options
201
242
 
202
- #### Document Translation
243
+ DocSmith automatically detects your project structure, but you can customize:
203
244
 
204
- Translate existing documentation to multiple languages:
245
+ - **📝 Documentation Styles**: Technical, User-Friendly, Developer-Focused, Academic
246
+ - **🎯 Target Audiences**: Developers, End Users, System Administrators, Business Users
247
+ - **🌍 Languages**: Choose from 12 supported languages
248
+ - **📁 Source Paths**: Customize which files and directories to analyze
249
+ - **📤 Output Settings**: Configure documentation structure and formatting
205
250
 
206
- ```bash
207
- # Translate specific documents to multiple languages
208
- aigne doc translate --langs zh --langs ja --docs examples.md --docs overview.md
209
251
 
210
- # Interactive translation with document and language selection
211
- aigne doc translate
212
- ```
213
252
 
214
- **Command Parameters:**
215
- - `--langs`: Specify target languages (can be used multiple times)
216
- - `--docs`: Specify document paths to translate (can be used multiple times)
217
- - `--feedback`: Provide feedback for translation improvement
218
- - `--glossary`: Use a glossary file for consistent terminology (@path/to/glossary.md)
253
+ ## 🌐 Supported Languages
219
254
 
220
- **Interactive Mode:** When run without parameters, `aigne doc translate` will present interactive menus to:
221
- - Select documents to translate from your documentation
222
- - Choose target languages from 12 supported languages
223
- - Add new translation languages to your configuration
255
+ DocSmith provides professional translation for 12 languages:
224
256
 
225
- #### Publishing to Discuss Kit
257
+ | Language | Code | Support Level |
258
+ |----------|------|---------------|
259
+ | English | `en` | ✅ Native |
260
+ | 简体中文 | `zh-CN` | ✅ Full |
261
+ | 繁體中文 | `zh-TW` | ✅ Full |
262
+ | 日本語 | `ja` | ✅ Full |
263
+ | 한국어 | `ko` | ✅ Full |
264
+ | Español | `es` | ✅ Full |
265
+ | Français | `fr` | ✅ Full |
266
+ | Deutsch | `de` | ✅ Full |
267
+ | Português | `pt-BR` | ✅ Full |
268
+ | Русский | `ru` | ✅ Full |
269
+ | Italiano | `it` | ✅ Full |
270
+ | العربية | `ar` | ✅ Full |
226
271
 
227
- Publish your documentation to Discuss Kit platforms:
228
272
 
229
- ```bash
230
- # Interactive publishing with platform selection
231
- aigne doc publish
232
- ```
273
+ ## 🤝 Contributing
233
274
 
234
- **Interactive Publishing:** When you run `aigne doc publish`, it will present an interactive menu for you to choose between:
235
- - **Official Platform:** [docsmith.aigne.io](https://docsmith.aigne.io/app/)
236
- - **Own Instance:** Your own deployed [Discuss Kit](https://store.blocklet.dev/blocklets/z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu) instance
275
+ We welcome contributions from the community! Here's how you can help:
237
276
 
277
+ ### 🐛 Reporting Issues
278
+ - 🔍 [Search existing issues](https://github.com/AIGNE-io/aigne-doc-smith/issues) first
279
+ - 📝 Use our issue templates for bug reports and feature requests
280
+ - 🚨 Include clear reproduction steps and environment details
238
281
 
282
+ ### 💡 Feature Requests
283
+ - 🌟 Share your ideas in [GitHub Discussions](https://github.com/AIGNE-io/aigne-doc-smith/discussions)
284
+ - 📋 Check our [roadmap](https://github.com/AIGNE-io/aigne-doc-smith/projects) for planned features
285
+ - 🗳️ Vote on existing feature requests
239
286
 
240
- ## Supported Languages
287
+ ### 🔧 Development Setup
288
+ ```bash
289
+ # Clone the repository
290
+ git clone https://github.com/AIGNE-io/aigne-doc-smith.git
291
+ cd aigne-doc-smith
241
292
 
242
- DocSmith supports 12 languages with automatic translation:
293
+ # Install dependencies
294
+ pnpm install
243
295
 
244
- - English (en)
245
- - 简体中文 (zh-CN)
246
- - 繁體中文 (zh-TW)
247
- - 日本語 (ja)
248
- - 한국어 (ko)
249
- - Español (es)
250
- - Français (fr)
251
- - Deutsch (de)
252
- - Português (pt-BR)
253
- - Русский (ru)
254
- - Italiano (it)
255
- - العربية (ar)
296
+ # Run tests
297
+ pnpm test
256
298
 
299
+ # Run linting
300
+ pnpm run lint
301
+ ```
257
302
 
258
- ## Contributing
303
+ ### 📜 Code of Conduct
304
+ Please read our [Code of Conduct](https://github.com/AIGNE-io/aigne-doc-smith/blob/main/CODE_OF_CONDUCT.md) before contributing.
259
305
 
260
- Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or find any bugs.
306
+ ## 💼 Enterprise & Production Use
261
307
 
262
- ## Command Examples
308
+ ### 🏢 Enterprise Features
309
+ - **Team Collaboration**: Multi-user workflows with role-based access
310
+ - **Custom Branding**: White-label documentation with your brand identity
311
+ - **API Integration**: REST APIs for automated documentation pipelines
312
+ - **Analytics**: Track documentation usage and effectiveness
263
313
 
264
- ### Basic Usage
314
+ ### 🔒 Security & Compliance
315
+ - **Private Cloud**: Deploy on your own infrastructure
316
+ - **SSO Integration**: Connect with your identity providers
317
+ - **Audit Logs**: Complete activity tracking and compliance reporting
318
+ - **Data Privacy**: Your code never leaves your environment in private deployments
265
319
 
266
- ```shell
267
- # Interactive setup and configuration
268
- aigne doc init
320
+ ### 📞 Support & Services
321
+ - **Priority Support**: Direct access to our engineering team
322
+ - **Custom Training**: Team onboarding and best practices workshops
323
+ - **Professional Services**: Custom integrations and deployment assistance
269
324
 
270
- # Generate documentation with default settings
271
- aigne doc generate
325
+ [Contact us](https://www.aigne.io/contact) for enterprise licensing and deployment options.
272
326
 
273
- # Generate with specific model
274
- aigne doc generate --model google:gemini-2.5-flash
327
+ ## 📊 Community & Resources
275
328
 
276
- # Force regenerate all documentation from scratch
277
- aigne doc generate --forceRegenerate
278
- ```
329
+ ### 📚 Documentation & Tutorials
330
+ - 📖 [Official Documentation](https://docsmith.aigne.io/docs/)
331
+ - 🎥 [Video Tutorials](https://www.youtube.com/@aigne-io)
332
+ - 📝 [Best Practices Guide](https://docsmith.aigne.io/guides/best-practices)
333
+ - 🔧 [API Reference](https://docsmith.aigne.io/api/)
279
334
 
280
- ### Advanced Usage
335
+ ### 💬 Community Support
336
+ - 💭 [GitHub Discussions](https://github.com/AIGNE-io/aigne-doc-smith/discussions) - Q&A and feature discussions
337
+ - 🐦 [Twitter](https://twitter.com/aigne_io) - Updates and announcements
338
+ - 🎮 [Discord Server](https://discord.gg/aigne) - Real-time community chat
339
+ - 📧 [Newsletter](https://www.aigne.io/newsletter) - Monthly updates and tips
281
340
 
282
- ```shell
283
- # Update structure with feedback
284
- aigne doc generate --feedback "Remove About section and add API Reference"
341
+ ### 🏆 Showcase
342
+ See DocSmith in action with real-world examples:
343
+ - [AIGNE Framework Docs](https://docs.aigne.io) - Generated with DocSmith
344
+ - [Community Projects](https://github.com/topics/aigne-docsmith) - Browse repositories using DocSmith
285
345
 
286
- # Update specific document
287
- aigne doc update --doc-path /faq --feedback "Add more comprehensive FAQ entries"
346
+ ## 📄 License
288
347
 
289
- # Translate documents to multiple languages
290
- aigne doc translate --langs zh --langs ja --docs examples.md --docs overview.md
348
+ This project is licensed under the **Elastic License 2.0** - see the [LICENSE](LICENSE) file for details.
291
349
 
292
- # Interactive translation (select documents and languages)
293
- aigne doc translate
350
+ ### What does this mean?
351
+ - **Free for most use cases**: Personal projects, internal use, and most commercial applications
352
+ - ✅ **Open source**: Full source code available for review and contributions
353
+ - ✅ **Commercial friendly**: Use in your business applications and services
354
+ - ❌ **Restrictions**: Cannot offer DocSmith as a competing hosted service
294
355
 
295
- # Translate with custom glossary and feedback
296
- aigne doc translate --glossary @glossary.md --feedback "Use technical terminology consistently"
297
- ```
356
+ [Learn more about Elastic License 2.0](https://www.elastic.co/licensing/elastic-license)
298
357
 
299
- ### Publishing and Integration
358
+ ---
300
359
 
301
- ```shell
302
- # Interactive publishing with platform selection
303
- aigne doc publish
360
+ <div align="center">
304
361
 
305
- # Publish to custom Discuss Kit instance
306
- aigne doc publish --appUrl https://your-discuss-kit-instance.com
362
+ **🚀 Start generating amazing documentation today!**
307
363
 
364
+ [![Get Started](https://img.shields.io/badge/Get_Started-brightgreen?style=for-the-badge&logo=rocket)](https://docsmith.aigne.io/get-started)
365
+ [![Join Community](https://img.shields.io/badge/Join_Community-blue?style=for-the-badge&logo=discord)](https://discord.gg/aigne)
366
+ [![Star on GitHub](https://img.shields.io/badge/Star_on_GitHub-yellow?style=for-the-badge&logo=github)](https://github.com/AIGNE-io/aigne-doc-smith)
308
367
 
309
- ```
368
+ Made with ❤️ by the [AIGNE Team](https://www.aigne.io/team)
310
369
 
311
- ## License
370
+ </div>
312
371
 
313
- This project is licensed under the Elastic License 2.0 License - see the [LICENSE](LICENSE) file for details.
@@ -21,11 +21,11 @@ export default async function checkNeedGenerateStructure(
21
21
  "Your project configuration is complete. Would you like to generate the document structure now?",
22
22
  choices: [
23
23
  {
24
- name: "Generate now - Start building the document structure",
24
+ name: "Generate now - Start generating the document structure",
25
25
  value: "generate",
26
26
  },
27
27
  {
28
- name: "Review configuration first - Modify settings before generating",
28
+ name: "Review configuration first - Edit configuration before generating",
29
29
  value: "later",
30
30
  },
31
31
  ],
@@ -34,7 +34,7 @@ export default async function checkNeedGenerateStructure(
34
34
  if (choice === "later") {
35
35
  console.log(`\nConfiguration file: ${chalk.cyan("./.aigne/doc-smith/config.yaml")}`);
36
36
  console.log(
37
- "Review and modify your configuration as needed, then run 'aigne doc generate' to continue.",
37
+ "Review and edit your configuration as needed, then run 'aigne doc generate' to continue.",
38
38
  );
39
39
 
40
40
  // In test environment, return a special result instead of exiting
@@ -81,12 +81,12 @@ export default async function checkNeedGenerateStructure(
81
81
  if (shouldRegenerate) {
82
82
  finalFeedback = `
83
83
  ${finalFeedback || ""}
84
-
85
- 根据最新的 DataSources 更新结构规划:
86
- 1. 对于新增的内容,可以根据需要新增节点,或补充到原有节点展示
87
- 2. 谨慎删除节点,除非节点关联 sourceIds 都被删除了
88
- 3. 不能修改原有节点的 path
89
- 4. 根据最新的 Data Sources 可以按需要更新节点的 sourceIds。
84
+
85
+ Update document structure based on the latest DataSources:
86
+ 1. For new content, add new sections as needed or supplement existing section displays
87
+ 2. Be cautious when deleting sections, unless all associated sourceIds have been removed
88
+ 3. Do not modify the path of existing sections
89
+ 4. Update section sourceIds as needed based on the latest Data Sources
90
90
  `;
91
91
  }
92
92
  }
@@ -97,7 +97,7 @@ export default async function checkNeedGenerateStructure(
97
97
  finalFeedback = `
98
98
  ${finalFeedback || ""}
99
99
 
100
- 用户请求强制重新生成结构规划,请根据最新的 Data Sources 和用户要求重生生成,**允许任何修改**。
100
+ User requested forced regeneration of document structure. Please regenerate based on the latest Data Sources and user requirements, **allowing any modifications**.
101
101
  `;
102
102
  }
103
103
 
@@ -74,7 +74,7 @@ export default async function userReviewDocumentStructure({ documentStructure, .
74
74
  // Ask user if they want to review the document structure
75
75
  const needReview = await options.prompts.select({
76
76
  message:
77
- "Would you like to optimize the document structure?\n You can modify titles, reorganize sections.",
77
+ "Would you like to optimize the document structure?\n You can edit titles, reorganize sections.",
78
78
  choices: [
79
79
  {
80
80
  name: "Looks good - proceed with current structure",
@@ -141,9 +141,6 @@ export default async function userReviewDocumentStructure({ documentStructure, .
141
141
  currentStructure = result.documentStructure;
142
142
  }
143
143
 
144
- // Print current document structure in a user-friendly format
145
- printDocumentStructure(currentStructure);
146
-
147
144
  // Check if feedback should be saved as user preference
148
145
  const feedbackRefinerAgent = options.context.agents["checkFeedbackRefiner"];
149
146
  if (feedbackRefinerAgent) {
@@ -157,6 +154,9 @@ export default async function userReviewDocumentStructure({ documentStructure, .
157
154
  console.warn("Your feedback was applied but not saved as a preference.");
158
155
  }
159
156
  }
157
+
158
+ // Print current document structure in a user-friendly format
159
+ printDocumentStructure(currentStructure);
160
160
  } catch (error) {
161
161
  console.error("Error processing your feedback:");
162
162
  console.error(`Type: ${error.name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/doc-smith",
3
- "version": "0.8.10-beta.2",
3
+ "version": "0.8.10",
4
4
  "description": "AI-driven documentation generation tool built on the AIGNE Framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -3,7 +3,7 @@
3
3
 
4
4
  When generating Markdown, you can add enhanced attributes to code blocks to provide richer functionality and better display effects. These attributes allow you to specify **titles**, **icons**, and more for code blocks.
5
5
 
6
- ** Please use these enhanced attributes as much as possible to improve display effects **
6
+ **Please use these enhanced attributes as much as possible to improve display effects**
7
7
 
8
8
  ### Attribute Definition
9
9
 
@@ -76,8 +76,8 @@ class ShoppingCart {
76
76
  **Example 1**
77
77
 
78
78
  There are two errors in this example:
79
- - Language name should not include suffixes, like ',no_run' in the example
80
- - Title does not need a key specified, just configure the value directly
79
+ - Language name should not include suffixes like ',no_run' in the example
80
+ - Title does not need a key specified; just configure the value directly
81
81
 
82
82
  ```rust,no_run title="main.rs" icon=logos:rust
83
83
  use tokio::runtime::Runtime;
@@ -213,7 +213,7 @@ Attribute Rules:
213
213
  - data-columns (optional): Number of columns, integer (e.g., 2, 3). Default is 2.
214
214
  - Must contain multiple <x-card> elements internally.
215
215
  - Consistency requirement: All <x-card> elements within the same <x-cards> must maintain visual consistency:
216
- - Recommended to always provide data-icon for each card.
216
+ - It's recommended to always provide data-icon for each card.
217
217
  - Or all cards should have data-image.
218
218
  - Avoid mixing (some with icons, some with only images).
219
219
 
@@ -1,4 +1,6 @@
1
- 以下是 d2 官方提供的一些示例,拥有比较好的展示效果,在实际生成图表的时候,可以参考官方示例的使用方式,来提升图表的表现力
1
+ <d2_official_example>
2
+ Here are examples from the official D2 documentation with good visual effects.
3
+ When generating charts in practice, you can refer to these official examples to enhance the expressiveness of your charts.
2
4
 
3
5
  - Bank Securities
4
6
  ```d2
@@ -706,3 +708,5 @@
706
708
  ```
707
709
  | {near: bottom-center}
708
710
  ```
711
+
712
+ </d2_official_example>
@@ -1,8 +1,9 @@
1
+ <d2_generate_constraints>
1
2
  # D2 Diagram Generation Expert Guide
2
3
 
3
4
  ## Preamble: LLM Role and Core Objective
4
5
 
5
- You are an expert Software Architect and a master of the D2 (Declarative Diagramming) language. Your primary function is to translate abstract descriptions of software systems, components, and processes into precise, readable, and visually effective D2 diagram code.
6
+ You are an expert software architect and a master of the D2 (Declarative Diagramming) language. Your primary function is to translate abstract descriptions of software systems, components, and processes into precise, readable, and visually effective D2 diagram code.
6
7
 
7
8
  Your core directive is to produce D2 code that is not only syntactically correct but also semantically meaningful and adheres to the highest standards of technical diagramming. The generated output must follow all instructions, constraints, and best practices detailed in this document. You will operate in a zero-tolerance mode for syntactical errors, especially concerning predefined keyword values. The fundamental principle is the separation of concerns: the logical structure of the diagram must be defined independently of its visual styling. The following chapters are structured to enforce this principle.
8
9
 
@@ -1090,3 +1091,5 @@ Session.t2 -> Lua: "Trigger OnPlayerTurn"
1090
1091
  User.t2 <- Session.t2
1091
1092
  ```
1092
1093
 
1094
+
1095
+ </d2_generate_constraints>
@@ -1,5 +1,5 @@
1
1
  <example>
2
- 下面是一些优质的文档详情供你参考:
2
+ Here are some high-quality documentation details for your reference:
3
3
 
4
4
  <example_item>
5
5
  # Quick install guide
@@ -438,16 +438,4 @@
438
438
  This section covered the essential operations for managing products within PaymentKit. You can now define and organize your offerings. Continue to the [Prices](/core-resources/prices) section to learn how to set up pricing for your products.
439
439
 
440
440
  </example_item>
441
-
442
- <bad_example>
443
- - 错误示例:
444
- - A["开始:`blocklet server upgrade`"]
445
- - A -- "执行命令(例如 `start`、`stop`)" --> B
446
- </bad_example>
447
-
448
- <good_example>
449
- - 正确示例:
450
- - A["开始:blocklet server upgrade"]
451
- - A -- "执行命令(例如 start、stop)" --> B
452
- </good_example>
453
441
  </example>