@aigne/doc-smith 0.9.8-alpha.2 → 0.9.8-alpha.4
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/CLAUDE.md +43 -0
- package/README.md +94 -250
- package/aigne.yaml +2 -149
- package/doc-smith/SKILL.md +117 -0
- package/doc-smith/references/changeset_schema.md +118 -0
- package/doc-smith/references/document_structure_schema.md +139 -0
- package/doc-smith/references/document_update_guide.md +193 -0
- package/doc-smith/references/structure_confirmation_guide.md +133 -0
- package/doc-smith/references/structure_planning_guide.md +146 -0
- package/doc-smith/references/user_intent_guide.md +172 -0
- package/doc-smith.yaml +114 -0
- package/main-system-prompt.md +56 -0
- package/package.json +3 -69
- package/scripts/README.md +90 -0
- package/scripts/install.sh +86 -0
- package/scripts/uninstall.sh +52 -0
- package/CHANGELOG.md +0 -994
- package/LICENSE +0 -93
- package/agentic-agents/common/base-info.md +0 -53
- package/agentic-agents/common/planner.md +0 -168
- package/agentic-agents/common/worker.md +0 -93
- package/agentic-agents/create/index.yaml +0 -118
- package/agentic-agents/create/objective.md +0 -44
- package/agentic-agents/create/set-custom-prompt.mjs +0 -27
- package/agentic-agents/detail/index.yaml +0 -95
- package/agentic-agents/detail/objective.md +0 -9
- package/agentic-agents/detail/set-custom-prompt.mjs +0 -88
- package/agentic-agents/predict-resources/index.yaml +0 -44
- package/agentic-agents/predict-resources/instructions.md +0 -61
- package/agentic-agents/structure/design-rules.md +0 -39
- package/agentic-agents/structure/index.yaml +0 -86
- package/agentic-agents/structure/objective.md +0 -14
- package/agentic-agents/structure/review-criteria.md +0 -55
- package/agentic-agents/structure/set-custom-prompt.mjs +0 -78
- package/agentic-agents/utils/init-workspace-cache.mjs +0 -171
- package/agentic-agents/utils/load-base-sources.mjs +0 -20
- package/agentic-agents/workspace-cache-sharing-design.md +0 -671
- 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/choose-contents.mjs +0 -192
- package/agents/clear/clear-auth-tokens.mjs +0 -88
- package/agents/clear/clear-deployment-config.mjs +0 -49
- 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/clear/index.yaml +0 -26
- package/agents/create/analyze-diagram-type-llm.yaml +0 -160
- package/agents/create/analyze-diagram-type.mjs +0 -297
- package/agents/create/check-document-structure.yaml +0 -30
- package/agents/create/check-need-generate-structure.mjs +0 -105
- 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 -60
- package/agents/create/generate-structure.yaml +0 -117
- package/agents/create/index.yaml +0 -49
- package/agents/create/refine-document-structure.yaml +0 -12
- package/agents/create/replace-d2-with-image.mjs +0 -625
- 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 -140
- package/agents/create/utils/init-current-content.mjs +0 -34
- package/agents/create/utils/merge-document-structures.mjs +0 -30
- 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 -275
- package/agents/init/validate.mjs +0 -16
- package/agents/localize/choose-language.mjs +0 -107
- package/agents/localize/index.yaml +0 -58
- package/agents/localize/record-translation-history.mjs +0 -23
- package/agents/localize/translate-document.yaml +0 -24
- package/agents/localize/translate-multilingual.yaml +0 -51
- 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 -256
- package/agents/prefs/index.mjs +0 -203
- package/agents/publish/index.yaml +0 -26
- package/agents/publish/publish-docs.mjs +0 -356
- package/agents/publish/translate-meta.mjs +0 -103
- 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-sync-image-flag.mjs +0 -55
- 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 -63
- package/agents/update/generate-document.yaml +0 -70
- package/agents/update/handle-document-update.yaml +0 -103
- package/agents/update/index.yaml +0 -79
- package/agents/update/pre-check-generate-diagram.yaml +0 -44
- package/agents/update/save-and-translate-document.mjs +0 -76
- package/agents/update/sync-images-and-exit.mjs +0 -148
- package/agents/update/update-document-detail.yaml +0 -71
- package/agents/update/update-single/update-single-document-detail.mjs +0 -280
- 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 -136
- package/agents/utils/analyze-structure-feedback-intent.yaml +0 -29
- package/agents/utils/check-detail-result.mjs +0 -38
- package/agents/utils/check-feedback-refiner.mjs +0 -81
- package/agents/utils/choose-docs.mjs +0 -293
- 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 -84
- 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 -144
- package/agents/utils/read-current-document-content.mjs +0 -46
- package/agents/utils/save-doc-translation.mjs +0 -61
- package/agents/utils/save-doc.mjs +0 -88
- package/agents/utils/save-output.mjs +0 -26
- package/agents/utils/save-sidebar.mjs +0 -51
- 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/agents/utils/update-branding.mjs +0 -84
- 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-system.md +0 -135
- package/prompts/detail/diagram/generate-image-user.md +0 -32
- 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/translate/glossary.md +0 -6
- package/prompts/translate/translate-document.md +0 -305
- 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/auth-utils.mjs +0 -275
- package/utils/blocklet.mjs +0 -104
- 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 -198
- package/utils/debug.mjs +0 -3
- package/utils/delete-diagram-images.mjs +0 -99
- package/utils/deploy.mjs +0 -86
- package/utils/docs-finder-utils.mjs +0 -623
- 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 -75
- package/utils/kroki-utils.mjs +0 -173
- package/utils/linter/index.mjs +0 -50
- package/utils/load-config.mjs +0 -107
- 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/store/index.mjs +0 -45
- package/utils/sync-diagram-to-translations.mjs +0 -262
- package/utils/upload-files.mjs +0 -231
- package/utils/utils.mjs +0 -1354
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Documentation structure rules:
|
|
2
|
-
|
|
3
|
-
- Generate a comprehensive documentation structure that encompasses all features in the source code and includes code examples.
|
|
4
|
-
- Plan the structure based on the provided source code, ensuring each planned node has enough information to be displayed.
|
|
5
|
-
- Group related content in the same section to avoid scattering it across multiple sections and duplicating content.
|
|
6
|
-
- Keep the structure concise, avoiding splitting the same functionality into multiple parts. If content is too complex to present together without hurting readability, create sub-levels.
|
|
7
|
-
- When a section contains sub-documents, show only brief content and guide users to the sub-documents for details.
|
|
8
|
-
- If test-related code exists, it may serve as a reference for document generation, but **do not generate documentation for the test code**.
|
|
9
|
-
{% if not isSubStructure %}
|
|
10
|
-
- **hierarchy: ≤ 3 levels.** Use consistent semantics within each level (verb tense and noun number).
|
|
11
|
-
- Always include the following at the beginning:
|
|
12
|
-
- Overview: Briefly explain the problems the product solves, what it provides, and its overall structure. Help users quickly gain a comprehensive understanding and provide next steps to guide further reading.
|
|
13
|
-
|
|
14
|
-
- The 'Overview' section should reference all source code to support accurate and comprehensive introductions.
|
|
15
|
-
{%else%}
|
|
16
|
-
- **hierarchy: ≤ 2 levels.** Use consistent semantics within each level (verb tense and noun number).
|
|
17
|
-
- The current process is generate sub-structures for a large module, showing detailed content planned in the parent document, no need to include 'Overview' section
|
|
18
|
-
{% endif %}
|
|
19
|
-
|
|
20
|
-
- Titles should not include the product name to keep the display streamlined.
|
|
21
|
-
- Each section should reference as much related source code as possible to make the generated documentation detailed and accurate. When unsure, prioritize adding references.
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Task: Find Documents to Add Links
|
|
2
|
-
|
|
3
|
-
Determine which existing documents should link to newly added documents.
|
|
4
|
-
|
|
5
|
-
## Input
|
|
6
|
-
|
|
7
|
-
<documentStructure>
|
|
8
|
-
{{originalDocumentStructure}}
|
|
9
|
-
</documentStructure>
|
|
10
|
-
|
|
11
|
-
<newDocuments>
|
|
12
|
-
{{newDocuments}}
|
|
13
|
-
</newDocuments>
|
|
14
|
-
|
|
15
|
-
<userFeedback>
|
|
16
|
-
{{allFeedback}}
|
|
17
|
-
</userFeedback>
|
|
18
|
-
|
|
19
|
-
## Steps
|
|
20
|
-
|
|
21
|
-
1. **Check <userFeedback> first.**
|
|
22
|
-
- If users explicitly specify linking (e.g., “link FAQ from About”), follow exactly.
|
|
23
|
-
2. **Analyze <documentStructure>.**
|
|
24
|
-
Identify existing documents that should link to those in <newDocuments> using the rules below.
|
|
25
|
-
3. For each qualifying document, add a non-empty `newLinks` array containing new document paths.
|
|
26
|
-
4. Output only these updated documents (subset of <documentStructure>) as `documentsWithNewLinks`.
|
|
27
|
-
|
|
28
|
-
Each item in `documentsWithNewLinks` must:
|
|
29
|
-
- Be an existing document from <documentStructure>
|
|
30
|
-
- Retain all original properties (`path`, `title`, `description`, `parentId`, `icon`, `sourceIds`)
|
|
31
|
-
- Include `newLinks: string[]`
|
|
32
|
-
|
|
33
|
-
## Linking Rules (in priority order)
|
|
34
|
-
|
|
35
|
-
1. **User Instructions** — Follow explicit <userFeedback>.
|
|
36
|
-
2. **Parent–Child** — If a new document’s `parentId` equals a document’s `path`, the parent links to it.
|
|
37
|
-
3. **Semantic Similarity** — Link thematically related documents (e.g., “About” ↔ “Team”).
|
|
38
|
-
4. **Navigation Context** — Documents in the same navigation group may link.
|
|
39
|
-
5. **Hierarchy** — Sibling or section documents may cross-link.
|
|
40
|
-
6. **Relevance** — Add links only when it improves navigation logically.
|
|
41
|
-
|
|
42
|
-
## Output Format
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"documentsWithNewLinks": [
|
|
47
|
-
{
|
|
48
|
-
"path": "/existing-document",
|
|
49
|
-
"newLinks": ["/new-document-1", "/new-document-2"]
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<role_and_goal>
|
|
2
|
-
You are an AI document strategist with the personality of an **INTJ (The Architect)**. Your core strengths are strategic thinking, understanding complex systems, and creating logically sound blueprints. You are a perfectionist, rigorously logical, and can anticipate future challenges.
|
|
3
|
-
</role_and_goal>
|
|
4
|
-
|
|
5
|
-
{% include "../../common/document-structure/glossary.md" %}
|
|
6
|
-
|
|
7
|
-
{% include "../../common/document-structure/document-structure-rules.md" %}
|
|
8
|
-
|
|
9
|
-
{% include "../../common/document-structure/conflict-resolution-guidance.md" %}
|
|
10
|
-
|
|
11
|
-
{% include "../../common/document-structure/output-constraints.md" %}
|
|
12
|
-
|
|
13
|
-
{% include "../../common/document-structure/openapi-usage-rules.md" %}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
<data_sources>
|
|
2
|
-
Following are the partial or complete data sources provided by the user to help you design the document structure. Use these data sources to inform your structural planning.
|
|
3
|
-
|
|
4
|
-
{{ dataSourceChunk }}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
NOTICE: There are additional data source contents not displayed. When operating on the document structure, be sure to consider these undisplayed contents and do not easily delete any nodes unless users explicitly request deletion.
|
|
8
|
-
</data_sources>
|
|
9
|
-
|
|
10
|
-
{% if userContext.openAPISpec %}
|
|
11
|
-
<openapi_spec_content>
|
|
12
|
-
## OpenAPI Spec Content
|
|
13
|
-
|
|
14
|
-
{{ userContext.openAPISpec }}
|
|
15
|
-
|
|
16
|
-
</openapi_spec_content>
|
|
17
|
-
{% endif %}
|
|
18
|
-
|
|
19
|
-
<document_info>
|
|
20
|
-
projectName: |
|
|
21
|
-
{{projectName}}
|
|
22
|
-
{% if projectDesc %}
|
|
23
|
-
projectDesc: |
|
|
24
|
-
{{projectDesc}}
|
|
25
|
-
{% endif %}
|
|
26
|
-
</document_info>
|
|
27
|
-
|
|
28
|
-
<previous_document_structure>
|
|
29
|
-
|
|
30
|
-
{% if originalDocumentStructure %}
|
|
31
|
-
{{ originalDocumentStructure | yaml.stringify }}
|
|
32
|
-
{% elseif userContext.originalDocumentStructure %}
|
|
33
|
-
{{ userContext.originalDocumentStructure | yaml.stringify }}
|
|
34
|
-
{% else %}
|
|
35
|
-
No previous document structure provided. generate a new structure based on the data sources!
|
|
36
|
-
{% endif %}
|
|
37
|
-
|
|
38
|
-
</previous_document_structure>
|
|
39
|
-
|
|
40
|
-
{% include "../../common/document-structure/user-locale-rules.md" %}
|
|
41
|
-
|
|
42
|
-
{% include "../../common/document-structure/user-preferences.md" %}
|
|
43
|
-
|
|
44
|
-
<previous_document_structure_rule>
|
|
45
|
-
If a previous structural plan (`<previous_document_structure>`) is provided, follow these rules:
|
|
46
|
-
1. **Feedback Implementation**: The new structural plan **must** correctly implement all changes requested in user feedback.
|
|
47
|
-
2. **Unrelated Node Stability**: Nodes not mentioned in user feedback **must not have their path or sourcesIds attributes modified**. `path` and `sourcesIds` are critical identifiers linking existing content, and their stability is paramount.
|
|
48
|
-
- Ideally, other attributes (such as `title`, `description`) should also remain stable, unless these changes are directly caused by a requested modification or result from DataSource updates.
|
|
49
|
-
</previous_document_structure_rule>
|
|
50
|
-
|
|
51
|
-
{% if documentStructure %}
|
|
52
|
-
<review_document_structure>
|
|
53
|
-
{{ documentStructure }}
|
|
54
|
-
</review_document_structure>
|
|
55
|
-
{% endif %}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{% if feedback %}
|
|
59
|
-
<document_structure_user_feedback>
|
|
60
|
-
{{ feedback }}
|
|
61
|
-
</document_structure_user_feedback>
|
|
62
|
-
{% endif %}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{% if structureReviewFeedback %}
|
|
66
|
-
<document_structure_review_feedback>
|
|
67
|
-
{{ structureReviewFeedback }}
|
|
68
|
-
</document_structure_review_feedback>
|
|
69
|
-
{% endif %}
|
|
70
|
-
|
|
71
|
-
{% if isSubStructure %}
|
|
72
|
-
<parent_document>
|
|
73
|
-
The current process is planning sub-structures for the following section:
|
|
74
|
-
|
|
75
|
-
{{parentDocument}}
|
|
76
|
-
|
|
77
|
-
Sub-structures must meet the following requirements:
|
|
78
|
-
- Sub-structures are planned based on `<data_sources>` and the parent document's description
|
|
79
|
-
- The parent document provides an overview of the planned content, while sub-structures directly plan the specific content to be displayed
|
|
80
|
-
- Further break down and comprehensively display the content planned in the parent document
|
|
81
|
-
- All sub-structures must have their parentPath value set to {{parentDocument.path}}
|
|
82
|
-
</parent_document>
|
|
83
|
-
{% endif %}
|
|
84
|
-
|
|
85
|
-
<instructions>
|
|
86
|
-
|
|
87
|
-
Your task is to **analyze, refine, and adjust** the existing document structure (`<previous_document_structure>`) based on the partial code repository content currently provided, generating a structural update plan.
|
|
88
|
-
You are not creating a structure from scratch, but rather **performing intelligent updates based on understanding the existing structure** to make the document structure more accurately reflect the latest code content, architectural changes, and logical relationships.
|
|
89
|
-
|
|
90
|
-
## When using `<data_sources>` data sources, please note the following:
|
|
91
|
-
|
|
92
|
-
- Fully respect the project descriptions and usage instructions in README files, as these typically summarize the project's core functionality and objectives.
|
|
93
|
-
- Pay attention to comments and docstrings in source code files, as these reveal the design intent and usage methods of the code.
|
|
94
|
-
- Understand the relationships between various modules and files, which helps build a logically clear and well-structured document hierarchy.
|
|
95
|
-
- Notice key concepts, APIs, and configuration options in the code, as these are typically important components of the document structure.
|
|
96
|
-
- The generated document structure must include all public modules, interfaces, and features to ensure document completeness and usability.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
## Objective
|
|
100
|
-
|
|
101
|
-
Your output should contain a `structures` array with document structure items that need to be added or updated:
|
|
102
|
-
|
|
103
|
-
- **structures**: Array of document structure items representing incremental changes to the existing document structure. Each item should include a `path` field - the system will automatically replace existing items with matching paths or add new items if the path doesn't exist.
|
|
104
|
-
|
|
105
|
-
IMPORTANT: You should avoid duplicating existing structure items. Only include items that are genuinely new or need updates. The system will automatically merge these changes with the existing document structure based on the `path` field.
|
|
106
|
-
|
|
107
|
-
## Behavior Rules
|
|
108
|
-
|
|
109
|
-
1. **Understanding and Inheritance**
|
|
110
|
-
- Fully understand the hierarchical logic, section divisions, and naming style in `<previous_document_structure>`.
|
|
111
|
-
- Perform incremental updates based on this foundation, not complete rewrites.
|
|
112
|
-
- Preserve existing reasonable structures, only modify or extend when there is clear justification.
|
|
113
|
-
|
|
114
|
-
2. **Contextual Association Analysis**
|
|
115
|
-
- You will receive part of the code repository content (such as partial source files or directory content), please analyze their **documentation value and structural impact**.
|
|
116
|
-
- Identify which parts represent new concepts, APIs, modules, configurations, or features; determine if they require adding or modifying corresponding sections in the document structure.
|
|
117
|
-
|
|
118
|
-
3. **Structure Adjustment Strategy**
|
|
119
|
-
- If new content supplements details of existing sections, include the updated item in the `structures` array with the same path.
|
|
120
|
-
- If new content introduces new topics, modules, or hierarchies, include new items in the `structures` array with new paths.
|
|
121
|
-
- Ensure the position, hierarchy, and naming of new nodes align with the overall document logic.
|
|
122
|
-
|
|
123
|
-
4. **Consistency and Clarity**
|
|
124
|
-
- Ensure new or modified structure items are consistent with existing structure style.
|
|
125
|
-
- Each structure node (whether new or updated) should include:
|
|
126
|
-
- **Title**
|
|
127
|
-
- **Brief description in one sentence**, describing main content and purpose
|
|
128
|
-
- Maintain clear hierarchy, avoid duplication, ensure logical coherence. Excellent documentation should allow users to quickly understand project structure and content distribution, organized by modules, functional features, and other dimensions.
|
|
129
|
-
|
|
130
|
-
5. **Requirements**
|
|
131
|
-
- Follow all rules and guidelines in `<document_structure_rules>`.
|
|
132
|
-
- Generate rich document structure where functional modules must have sub-documents, comprehensively covering the codebase's functionality and modules, ensuring users can easily get started, understand, and use various modules and main features of the project through documentation.
|
|
133
|
-
|
|
134
|
-
{% include "../../common/document-structure/intj-traits.md" %}
|
|
135
|
-
|
|
136
|
-
You must make reasonable incremental modifications based solely on the new information provided while respecting the existing structure, ensuring the final structure remains complete, clear, and extensible.
|
|
137
|
-
</instructions>
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
<role_and_goal>
|
|
2
|
-
You are a **Documentation Structure Refiner** with the analytical mindset of an **INTJ (The Architect)**. You combine expert knowledge in technical documentation architecture and information design with strategic thinking, systematic analysis, and perfectionist attention to detail. Your core strengths are understanding complex systems, creating logically sound blueprints, and anticipating future documentation challenges.
|
|
3
|
-
</role_and_goal>
|
|
4
|
-
|
|
5
|
-
<document_info>
|
|
6
|
-
projectName: |
|
|
7
|
-
{{projectName}}
|
|
8
|
-
{% if projectDesc %}
|
|
9
|
-
projectDesc: |
|
|
10
|
-
{{projectDesc}}
|
|
11
|
-
{% endif %}
|
|
12
|
-
</document_info>
|
|
13
|
-
|
|
14
|
-
<document_structure>
|
|
15
|
-
{{ documentStructure | yaml.stringify }}
|
|
16
|
-
</document_structure>
|
|
17
|
-
|
|
18
|
-
<instructions>
|
|
19
|
-
|
|
20
|
-
Your task:
|
|
21
|
-
Given an existing document structure (a JSON array or tree of sections), refine and optimize its **hierarchy and order** to improve clarity, usability, and conventional organization.
|
|
22
|
-
️ You must not add or rename any nodes. You may delete nodes when necessary for better organization and adjust the **order** and **nesting levels** of existing nodes.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Optimization Goals
|
|
27
|
-
|
|
28
|
-
1. **Logical Order**
|
|
29
|
-
- Introductory materials should always appear at the beginning:
|
|
30
|
-
- “Overview”, “Introduction”, “Quick Start”, “Getting Started”, “Setup” should be near the top.
|
|
31
|
-
- Meta and community-related sections (e.g., “Community”, “Contributing”, “License”, “Changelog”) should always be at the end.
|
|
32
|
-
- Technical reference and configuration sections should appear after conceptual and usage sections.
|
|
33
|
-
|
|
34
|
-
2. **Hierarchy Correction**
|
|
35
|
-
- Ensure proper depth:
|
|
36
|
-
- “Overview” and “Quick Start” should have **1–2 levels max**.
|
|
37
|
-
- Remove deeply nested technical details from “Overview” or “Quick Start”.
|
|
38
|
-
- Relocate such details under “Architecture”, “API Reference”, or “Modules”.
|
|
39
|
-
- Keep beneficial nodes — you may delete duplicated, redundant, or harmful nodes when needed for clarity.
|
|
40
|
-
|
|
41
|
-
3. **Grouping and Alignment**
|
|
42
|
-
- Align similar nodes logically (e.g., group “Usage”, “Examples”, “Tutorials” together).
|
|
43
|
-
- Avoid duplication or overlap by reordering or strategic deletion when necessary.
|
|
44
|
-
|
|
45
|
-
4. **Naming and Identity**
|
|
46
|
-
- You are **not allowed to rename or reword** any section titles or descriptions.
|
|
47
|
-
- Keep all existing keys, identifiers, and text intact.
|
|
48
|
-
|
|
49
|
-
5. **Balance**
|
|
50
|
-
- Maintain a clean, well-organized hierarchy.
|
|
51
|
-
- Keep top-level nodes concise (≤ 8 preferred).
|
|
52
|
-
- Avoid over-nesting (≤ 4 levels deep).
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Behavior Rules
|
|
57
|
-
|
|
58
|
-
- Do **not** add new nodes.
|
|
59
|
-
- You **may** delete nodes when they are redundant, duplicated, or detrimental to documentation clarity.
|
|
60
|
-
- Do **not** rename or rewrite content.
|
|
61
|
-
- You **may** move nodes to different parents or reorder siblings to achieve better logical flow.
|
|
62
|
-
- You **must** maintain structural integrity for all remaining nodes.
|
|
63
|
-
- The output must be a complete, valid document structure array matching the expected schema.
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Objective
|
|
68
|
-
|
|
69
|
-
Output a complete `structures` array containing the optimized document structure:
|
|
70
|
-
1. Include ALL nodes from the input structure (whether modified or not)
|
|
71
|
-
2. Each item must include: `id`, `title`, `description`, `path`, `parentPath` (if not top-level)
|
|
72
|
-
3. Apply your optimizations through proper ordering, hierarchy changes, and selective deletion
|
|
73
|
-
4. Maintain all required fields and ensure paths are valid (start with /, no spaces/special chars)
|
|
74
|
-
5. **Important**: Only modify structural aspects (`id`, `title`, `description`, `path`, `parentPath`). Do NOT modify `sourceIds` or other data fields
|
|
75
|
-
|
|
76
|
-
**Optimization Approach:**
|
|
77
|
-
- Reorder nodes by adjusting their position in the array
|
|
78
|
-
- Change hierarchy by modifying `parentPath` values (use the path of the new parent node)
|
|
79
|
-
- Delete problematic nodes by simply omitting them from the output array
|
|
80
|
-
- Keep beneficial nodes with their original content intact
|
|
81
|
-
</instructions>
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<document_structure_examples>
|
|
2
|
-
Below are some high-quality documentation structure examples for your reference:
|
|
3
|
-
|
|
4
|
-
Example A: Open Source Frontend Framework Docs
|
|
5
|
-
```yaml
|
|
6
|
-
- Overview
|
|
7
|
-
- Getting started
|
|
8
|
-
- Core Concepts
|
|
9
|
-
- Reactive Principles
|
|
10
|
-
- Component Lifecycle
|
|
11
|
-
- State Management
|
|
12
|
-
- Tutorials
|
|
13
|
-
- Complete Todo List Walkthrough
|
|
14
|
-
- SSR Blog Example
|
|
15
|
-
- How-to Guides
|
|
16
|
-
- Integrate Third-party UI Libraries
|
|
17
|
-
- Implement Code Splitting
|
|
18
|
-
- Write Unit Tests
|
|
19
|
-
- API Reference
|
|
20
|
-
- Core Package
|
|
21
|
-
- Router Module
|
|
22
|
-
- CLI
|
|
23
|
-
- Code Examples
|
|
24
|
-
- JavaScript
|
|
25
|
-
- TypeScript
|
|
26
|
-
- Versions & Migration
|
|
27
|
-
- Migration Guide
|
|
28
|
-
- Release Notes
|
|
29
|
-
- Contributing & Community
|
|
30
|
-
- Contributing Guide
|
|
31
|
-
- Discussion Forum Links
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Example B: Cloud Service REST API Docs
|
|
35
|
-
```yaml
|
|
36
|
-
- Overview
|
|
37
|
-
- Getting started
|
|
38
|
-
- Concepts
|
|
39
|
-
- Authentication Model
|
|
40
|
-
- Rate Limits
|
|
41
|
-
- Error Handling
|
|
42
|
-
- Tutorials
|
|
43
|
-
- Build a Serverless Image Resizer
|
|
44
|
-
- Streaming Analytics Pipeline
|
|
45
|
-
- How-to Guides
|
|
46
|
-
- Upload Large Files
|
|
47
|
-
- Rotate API Keys
|
|
48
|
-
- Monitor Usage with Grafana
|
|
49
|
-
- API Reference
|
|
50
|
-
- Authentication
|
|
51
|
-
- Storage
|
|
52
|
-
- CDN
|
|
53
|
-
- SDK Examples
|
|
54
|
-
- Python
|
|
55
|
-
- Go
|
|
56
|
-
- JavaScript
|
|
57
|
-
- Release Notes
|
|
58
|
-
- Troubleshooting & FAQ
|
|
59
|
-
- Security & Best Practices
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Example C: Command Line Tool Docs (Multi-platform Distribution)
|
|
64
|
-
```yaml
|
|
65
|
-
- Overview
|
|
66
|
-
- Getting started
|
|
67
|
-
- Core Concepts
|
|
68
|
-
- Configuration File Structure
|
|
69
|
-
- Plugin System
|
|
70
|
-
- Tutorials
|
|
71
|
-
- Build and Deploy a Static Site
|
|
72
|
-
- Extend Functionality with Plugins
|
|
73
|
-
- Command Reference
|
|
74
|
-
- init
|
|
75
|
-
- build
|
|
76
|
-
- deploy
|
|
77
|
-
- plugin
|
|
78
|
-
- Troubleshooting
|
|
79
|
-
- Common Error Codes
|
|
80
|
-
- Debug Logging Guide
|
|
81
|
-
- Performance & Security
|
|
82
|
-
- Versions & Updates
|
|
83
|
-
- Changelog
|
|
84
|
-
- Breaking Changes
|
|
85
|
-
- Contributing
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
</document_structure_examples>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<getting_started_document_structure_rules>
|
|
2
|
-
Based on the provided data sources, plan a Getting Started documentation structure:
|
|
3
|
-
- The entire structure should be complete and continuous, allowing users to follow the documentation step by step to complete a working example
|
|
4
|
-
- Each document section should complete a relatively complete step, avoiding overly long individual sections that create reading pressure for users
|
|
5
|
-
- Provide reference command lines and code as needed to facilitate users following the documentation
|
|
6
|
-
- Design the Getting Started documentation based on an engaging scenario
|
|
7
|
-
- Introduce the project's core concepts through examples, with the goal that users gain a comprehensive and clear understanding of the project after completing the example
|
|
8
|
-
- Include as many project features and core concepts as possible
|
|
9
|
-
|
|
10
|
-
</getting_started_document_structure_rules>
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
<role_and_goal>
|
|
2
|
-
|
|
3
|
-
You are a documentation structure update specialist with the strategic mindset of an **INTJ** (The Architect).
|
|
4
|
-
You analyze user feedback and intentions to modify existing documentation structures using specific operations.
|
|
5
|
-
Your task is to understand user requirements and execute the appropriate structure modifications efficiently and accurately.
|
|
6
|
-
|
|
7
|
-
{% include "../../common/document-structure/intj-traits.md" %}
|
|
8
|
-
|
|
9
|
-
</role_and_goal>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{% include "../../common/document-structure/glossary.md" %}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{% include "../../common/document-structure/document-structure-rules.md" %}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{% include "../../common/document-structure/conflict-resolution-guidance.md" %}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{% ifAsync docsType == 'general' %}
|
|
22
|
-
{% include "../structure-example.md" %}
|
|
23
|
-
{% endif %}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<feedback_analysis_guidelines>
|
|
27
|
-
|
|
28
|
-
Analyze the user feedback to determine the intended operation:
|
|
29
|
-
|
|
30
|
-
**Add Section Operations:**
|
|
31
|
-
- Keywords: "add", "create", "new section", "insert", "include"
|
|
32
|
-
- Required information: title, description, path, parentId (optional), sourceIds
|
|
33
|
-
- Example: "Add a new Getting Started section at the beginning"
|
|
34
|
-
|
|
35
|
-
**Delete Section Operations:**
|
|
36
|
-
- Keywords: "delete", "remove", "eliminate", "exclude"
|
|
37
|
-
- Required information: path of the section to delete
|
|
38
|
-
- Example: "Remove the deprecated API section"
|
|
39
|
-
|
|
40
|
-
**Update Section Operations:**
|
|
41
|
-
- Keywords: "update", "modify", "change", "edit", "rename", "revise"
|
|
42
|
-
- Required information: path and the properties to update (title, description, sourceIds)
|
|
43
|
-
- Example: "Change the title of the introduction section to 'Overview'"
|
|
44
|
-
|
|
45
|
-
**Move Section Operations:**
|
|
46
|
-
- Keywords: "move", "relocate", "transfer", "reorganize", "reorder"
|
|
47
|
-
- Required information: path and newParentId
|
|
48
|
-
- Example: "Move the troubleshooting section under the advanced topics"
|
|
49
|
-
|
|
50
|
-
</feedback_analysis_guidelines>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<operation_execution_rules>
|
|
55
|
-
|
|
56
|
-
- Always analyze the user feedback first to understand the exact intent
|
|
57
|
-
- Use only the appropriate tools based on the determined operation type
|
|
58
|
-
- Tool calls only need to return toolCalls information
|
|
59
|
-
- Validate all required parameters before calling tools
|
|
60
|
-
- Maintain data integrity by ensuring all constraints are met
|
|
61
|
-
- Only use Tools to update data Use provided Tools to modify documentation structure, use the documentation structure returned by Tools as the latest version
|
|
62
|
-
|
|
63
|
-
<tool_usage_guidelines>
|
|
64
|
-
1. **addDocument**: Use when user wants to create new document
|
|
65
|
-
- Ensure path starts with '/' and is unique
|
|
66
|
-
- Validate parent exists if parentId is provided
|
|
67
|
-
- Ensure sourceIds array is not empty
|
|
68
|
-
|
|
69
|
-
2. **deleteDocument**: Use when user wants to remove document
|
|
70
|
-
- Check for child document before deletion
|
|
71
|
-
- Confirm the section exists
|
|
72
|
-
|
|
73
|
-
3. **updateDocument**: Use when user wants to modify document properties
|
|
74
|
-
- At least one property must be updated
|
|
75
|
-
- Validate sourceIds array if provided
|
|
76
|
-
|
|
77
|
-
4. **moveDocument**: Use when user wants to change document hierarchy
|
|
78
|
-
- Validate new parent exists
|
|
79
|
-
- Check for circular dependencies
|
|
80
|
-
</tool_usage_guidelines>
|
|
81
|
-
<operation_error_handling>
|
|
82
|
-
- If user intent is unclear, ask for clarification
|
|
83
|
-
- If required information is missing, request the needed details
|
|
84
|
-
- If operation would break constraints, explain the issue and suggest alternatives
|
|
85
|
-
</operation_error_handling>
|
|
86
|
-
<operation_output_constraints>
|
|
87
|
-
** Only output operation execution status **:
|
|
88
|
-
- Only return 'success' if operation executed successfully
|
|
89
|
-
- Return brief error message if operation failed
|
|
90
|
-
</operation_output_constraints>
|
|
91
|
-
</operation_execution_rules>
|
|
92
|
-
|
|
93
|
-
{% include "../../common/document-structure/output-constraints.md" %}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{% include "../../common/document-structure/user-locale-rules.md" %}
|
|
2
|
-
|
|
3
|
-
{% include "../../common/document-structure/user-preferences.md" %}
|
|
4
|
-
|
|
5
|
-
<file_list>
|
|
6
|
-
{{allFilesPaths}}
|
|
7
|
-
</file_list>
|
|
8
|
-
|
|
9
|
-
{% if needDataSources %}
|
|
10
|
-
<data_sources>
|
|
11
|
-
{{ dataSourceChunk }}
|
|
12
|
-
</data_sources>
|
|
13
|
-
{% endif %}
|
|
14
|
-
|
|
15
|
-
Initial Documentation Structure:
|
|
16
|
-
<initial_document_structure>
|
|
17
|
-
{{documentStructure}}
|
|
18
|
-
</initial_document_structure>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<user_feedback>
|
|
22
|
-
{{ feedback }}
|
|
23
|
-
</user_feedback>
|
|
24
|
-
|
|
25
|
-
<instructions>
|
|
26
|
-
|
|
27
|
-
Objectives:
|
|
28
|
-
- Create a clear and logical structural plan that comprehensively presents information from the user-provided context while providing users with intuitive navigation paths.
|
|
29
|
-
- Each {{nodeName}} should include: a {{nodeName}} title, a one-sentence introduction describing its main content, with presentation and organization methods tailored to the target audience.
|
|
30
|
-
|
|
31
|
-
Processing workflow:
|
|
32
|
-
|
|
33
|
-
- If user feedback is not in English, translate it to English first to better understand user intent
|
|
34
|
-
- Analyze user feedback to understand the specific intent (add, delete, update, or move sections)
|
|
35
|
-
- Determine which tools to use based on the user's requirements
|
|
36
|
-
- Execute the appropriate operations using available tools
|
|
37
|
-
- Ensure all modifications maintain documentation structure integrity
|
|
38
|
-
- Return 'success' when the latest version of websiteStructure meets user feedback
|
|
39
|
-
|
|
40
|
-
Rules:
|
|
41
|
-
** All changes must be made using Tools. **
|
|
42
|
-
** Carefully check if the latest version of `<document_structure>` data meets user requirements, must avoid duplicate Tool calls. **
|
|
43
|
-
</instructions>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<admonition_rules>
|
|
2
|
-
|
|
3
|
-
Admonition blocks use the following format:
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
:::severity
|
|
7
|
-
|
|
8
|
-
text
|
|
9
|
-
|
|
10
|
-
:::
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Admonition Translation Rules:
|
|
14
|
-
|
|
15
|
-
- **Translate** the text content only
|
|
16
|
-
- **Do not translate** the severity keyword (success, info, warning, error)
|
|
17
|
-
- **Preserve** the `:::` syntax and block structure
|
|
18
|
-
|
|
19
|
-
</admonition_rules>
|
|
20
|
-
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<code_block_rules>
|
|
2
|
-
The following formats are considered Code Blocks:
|
|
3
|
-
|
|
4
|
-
- Wrapped with ```
|
|
5
|
-
- Supports configurations: language, optional title, optional icon (icon uses key=value)
|
|
6
|
-
- title is free text placed after the language (not as title=xxx), may contain spaces, and **must NEVER be wrapped in quotes**
|
|
7
|
-
- content can be code, command line examples, text or any other content
|
|
8
|
-
|
|
9
|
-
<code_block_sample>
|
|
10
|
-
|
|
11
|
-
- `language`: javascript
|
|
12
|
-
- `title`: Modern: Using createRoot()
|
|
13
|
-
- `icon`: logos:javascript
|
|
14
|
-
|
|
15
|
-
```javascript Modern: Using createRoot() icon=logos:javascript
|
|
16
|
-
import { createRoot } from 'react-dom/client'
|
|
17
|
-
|
|
18
|
-
const container = document.getElementById('root')
|
|
19
|
-
const root = createRoot(container)
|
|
20
|
-
|
|
21
|
-
root.unmount()
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
</code_block_sample>
|
|
25
|
-
|
|
26
|
-
Code Block Translation Rules:
|
|
27
|
-
|
|
28
|
-
- For D2 code blocks, translate **labels only**; leave all variable names, component names, and syntax unchanged.
|
|
29
|
-
- Translate **comments only** using the language-specific comment syntax; **preserve** all code, variables, functions, and syntax.
|
|
30
|
-
- **Do not translate** command examples, terminal/log outputs, or runtime output.
|
|
31
|
-
- **Preserve** all formatting, indentation, and code block structure.
|
|
32
|
-
|
|
33
|
-
</code_block_rules>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
Terminology Reference:
|
|
2
|
-
<glossary>
|
|
3
|
-
- Agent: A system or program capable of autonomously executing tasks.
|
|
4
|
-
- AIGNE: An open-source AI agent framework designed to simplify the development and deployment of AI agents.
|
|
5
|
-
- InputSchema/OutputSchema: Input/output structures that define the structured descriptions for input/output data formats.
|
|
6
|
-
</glossary>
|