@aigne/doc-smith 0.8.11-beta.5 → 0.8.11-beta.7
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 +3 -1
- package/.aigne/doc-smith/output/structure-plan.json +2 -2
- package/.aigne/doc-smith/preferences.yml +28 -20
- package/.aigne/doc-smith/upload-cache.yaml +702 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +22 -2
- package/README.md +2 -2
- package/agents/clear/choose-contents.mjs +2 -2
- package/agents/clear/clear-document-structure.mjs +8 -8
- package/agents/clear/index.yaml +1 -1
- package/agents/evaluate/document-structure.yaml +1 -1
- package/agents/generate/check-document-structure.yaml +3 -3
- package/agents/generate/check-need-generate-structure.mjs +8 -8
- package/agents/generate/document-structure-tools/add-document.mjs +38 -13
- package/agents/generate/document-structure-tools/delete-document.mjs +37 -14
- package/agents/generate/document-structure-tools/move-document.mjs +46 -19
- package/agents/generate/document-structure-tools/update-document.mjs +39 -12
- package/agents/generate/generate-structure.yaml +1 -1
- package/agents/generate/update-document-structure.yaml +3 -9
- package/agents/generate/user-review-document-structure.mjs +15 -14
- package/agents/translate/translate-document.yaml +1 -9
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/check-document.mjs +2 -2
- package/agents/update/check-update-is-single.mjs +2 -1
- package/agents/update/document-tools/update-document-content.mjs +24 -14
- package/agents/update/fs-tools/glob.mjs +184 -0
- package/agents/update/fs-tools/grep.mjs +317 -0
- package/agents/update/fs-tools/read-file.mjs +307 -0
- package/agents/update/generate-document.yaml +4 -7
- package/agents/update/update-document-detail.yaml +6 -10
- package/agents/update/user-review-document.mjs +13 -13
- package/agents/utils/check-feedback-refiner.mjs +1 -1
- package/agents/utils/choose-docs.mjs +1 -1
- package/agents/utils/load-document-all-content.mjs +3 -3
- package/agents/utils/load-sources.mjs +1 -1
- package/agents/utils/save-docs.mjs +7 -28
- package/aigne.yaml +2 -2
- package/assets/screenshots/doc-complete-setup.png +0 -0
- package/assets/screenshots/doc-generate-docs.png +0 -0
- package/assets/screenshots/doc-generate.png +0 -0
- package/assets/screenshots/doc-generated-successfully.png +0 -0
- package/assets/screenshots/doc-publish.png +0 -0
- package/assets/screenshots/doc-regenerate.png +0 -0
- package/assets/screenshots/doc-translate-langs.png +0 -0
- package/assets/screenshots/doc-translate.png +0 -0
- package/assets/screenshots/doc-update.png +0 -0
- package/docs/_sidebar.md +1 -1
- package/docs/advanced-how-it-works.ja.md +31 -31
- package/docs/advanced-how-it-works.md +10 -10
- package/docs/advanced-how-it-works.zh-TW.md +24 -24
- package/docs/advanced-how-it-works.zh.md +20 -20
- package/docs/advanced-quality-assurance.ja.md +57 -61
- package/docs/advanced-quality-assurance.md +57 -61
- package/docs/advanced-quality-assurance.zh-TW.md +57 -61
- package/docs/advanced-quality-assurance.zh.md +57 -61
- package/docs/advanced.ja.md +8 -4
- package/docs/advanced.md +7 -3
- package/docs/advanced.zh-TW.md +9 -5
- package/docs/advanced.zh.md +9 -5
- package/docs/changelog.ja.md +206 -29
- package/docs/changelog.md +177 -0
- package/docs/changelog.zh-TW.md +229 -52
- package/docs/changelog.zh.md +204 -27
- package/docs/cli-reference.ja.md +181 -80
- package/docs/cli-reference.md +168 -67
- package/docs/cli-reference.zh-TW.md +177 -76
- package/docs/cli-reference.zh.md +172 -71
- package/docs/configuration-interactive-setup.ja.md +45 -42
- package/docs/configuration-interactive-setup.md +9 -6
- package/docs/configuration-interactive-setup.zh-TW.md +26 -23
- package/docs/configuration-interactive-setup.zh.md +25 -22
- package/docs/configuration-language-support.ja.md +33 -63
- package/docs/configuration-language-support.md +32 -62
- package/docs/configuration-language-support.zh-TW.md +35 -65
- package/docs/configuration-language-support.zh.md +32 -62
- package/docs/configuration-llm-setup.ja.md +25 -23
- package/docs/configuration-llm-setup.md +20 -18
- package/docs/configuration-llm-setup.zh-TW.md +21 -19
- package/docs/configuration-llm-setup.zh.md +20 -18
- package/docs/configuration-preferences.ja.md +67 -52
- package/docs/configuration-preferences.md +55 -40
- package/docs/configuration-preferences.zh-TW.md +69 -54
- package/docs/configuration-preferences.zh.md +68 -53
- package/docs/configuration.ja.md +98 -58
- package/docs/configuration.md +42 -2
- package/docs/configuration.zh-TW.md +86 -46
- package/docs/configuration.zh.md +76 -36
- package/docs/features-generate-documentation.ja.md +49 -55
- package/docs/features-generate-documentation.md +49 -55
- package/docs/features-generate-documentation.zh-TW.md +54 -60
- package/docs/features-generate-documentation.zh.md +48 -54
- package/docs/features-publish-your-docs.ja.md +68 -45
- package/docs/features-publish-your-docs.md +65 -42
- package/docs/features-publish-your-docs.zh-TW.md +74 -51
- package/docs/features-publish-your-docs.zh.md +67 -44
- package/docs/features-translate-documentation.ja.md +46 -35
- package/docs/features-translate-documentation.md +39 -28
- package/docs/features-translate-documentation.zh-TW.md +45 -34
- package/docs/features-translate-documentation.zh.md +39 -28
- package/docs/features-update-and-refine.ja.md +75 -71
- package/docs/features-update-and-refine.md +67 -63
- package/docs/features-update-and-refine.zh-TW.md +72 -67
- package/docs/features-update-and-refine.zh.md +71 -67
- package/docs/features.ja.md +29 -19
- package/docs/features.md +25 -15
- package/docs/features.zh-TW.md +28 -18
- package/docs/features.zh.md +31 -21
- package/docs/getting-started.ja.md +43 -46
- package/docs/getting-started.md +36 -39
- package/docs/getting-started.zh-TW.md +41 -44
- package/docs/getting-started.zh.md +39 -42
- package/docs/overview.ja.md +63 -11
- package/docs/overview.md +62 -10
- package/docs/overview.zh-TW.md +67 -15
- package/docs/overview.zh.md +62 -10
- package/docs-mcp/analyze-docs-relevance.yaml +6 -6
- package/docs-mcp/docs-search.yaml +1 -1
- package/media.md +9 -9
- package/package.json +2 -2
- package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
- package/prompts/common/document-structure/document-structure-rules.md +2 -2
- package/prompts/detail/custom/custom-components.md +304 -188
- package/prompts/detail/document-rules.md +5 -5
- package/prompts/detail/generate-document.md +21 -8
- package/prompts/detail/update-document.md +8 -12
- package/prompts/evaluate/document-structure.md +6 -6
- package/prompts/structure/check-document-structure.md +10 -10
- package/prompts/structure/document-rules.md +2 -2
- package/prompts/structure/generate-structure-system.md +3 -3
- package/prompts/structure/structure-example.md +1 -1
- package/prompts/structure/structure-getting-started.md +1 -1
- package/prompts/structure/update-document-structure.md +18 -14
- package/prompts/utils/feedback-refiner.md +3 -3
- package/tests/agents/clear/choose-contents.test.mjs +1 -1
- package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
- package/tests/agents/evaluate/generate-report.test.mjs +1 -1
- package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
- package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
- package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +12 -12
- package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
- package/tests/agents/generate/user-review-document-structure.test.mjs +36 -13
- package/tests/agents/update/check-document.test.mjs +1 -1
- package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
- package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
- package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
- package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
- package/tests/agents/update/user-review-document.test.mjs +48 -27
- package/tests/agents/utils/format-document-structure.test.mjs +5 -5
- package/tests/agents/utils/load-sources.test.mjs +4 -4
- package/tests/agents/utils/save-docs.test.mjs +1 -1
- package/tests/utils/conflict-detector.test.mjs +1 -1
- package/tests/utils/docs-finder-utils.test.mjs +8 -8
- package/types/document-schema.mjs +5 -6
- package/types/document-structure-schema.mjs +25 -13
- package/utils/conflict-detector.mjs +1 -1
- package/utils/constants/index.mjs +4 -4
- package/utils/docs-finder-utils.mjs +11 -11
- package/utils/markdown-checker.mjs +1 -1
|
@@ -1,96 +1,92 @@
|
|
|
1
1
|
# 品質保証
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
生成されるすべてのドキュメントが高い品質、一貫性、正確性の基準を満たすように、DocSmithには包括的で自動化された品質保証パイプラインが含まれています。これらの組み込みチェックは自動的に実行され、公開前に一般的なフォーマットエラー、リンク切れ、構造的な問題を特定してフラグを立てます。このプロセスにより、最終的な出力がプロフェッショナルで信頼性が高く、ユーザーがナビゲートしやすいものになることが保証されます。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```d2
|
|
5
|
+
```d2 品質保証パイプライン icon=lucide:shield-check
|
|
8
6
|
direction: down
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
label: "
|
|
8
|
+
Documentation-Content: {
|
|
9
|
+
label: "ドキュメントコンテンツ"
|
|
12
10
|
shape: rectangle
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
label: "
|
|
13
|
+
Quality-Assurance-Pipeline: {
|
|
14
|
+
label: "品質保証パイプライン"
|
|
17
15
|
shape: rectangle
|
|
18
|
-
grid-columns:
|
|
16
|
+
grid-columns: 3
|
|
19
17
|
grid-gap: 50
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
label: "
|
|
19
|
+
Markdown-Validation: {
|
|
20
|
+
label: "1. Markdownとコンテンツの検証\n(remark-lintベース)"
|
|
23
21
|
shape: rectangle
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
|
|
23
|
+
Check-1: "有効なMarkdown構文"
|
|
24
|
+
Check-2: "見出しの整合性"
|
|
25
|
+
Check-3: "テーブルのフォーマット"
|
|
26
|
+
Check-4: "コードブロックの整合性"
|
|
27
|
+
Check-5: "コンテンツの完全性"
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
label: "
|
|
30
|
+
Link-Asset-Validation: {
|
|
31
|
+
label: "2. リンクとアセットの整合性"
|
|
31
32
|
shape: rectangle
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Table-Formatting: "列数が一致するか確認"
|
|
33
|
+
|
|
34
|
+
Check-6: "リンク切れの検出"
|
|
35
|
+
Check-7: "ローカル画像の検証"
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
label: "
|
|
38
|
+
D2-Diagram-Validation: {
|
|
39
|
+
label: "3. D2ダイアグラムの検証"
|
|
40
40
|
shape: rectangle
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Markdown-Linting: "スタイルルールを強制"
|
|
41
|
+
|
|
42
|
+
Check-8: "D2構文チェック"
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
label: "
|
|
49
|
-
shape:
|
|
46
|
+
Validation-Result: {
|
|
47
|
+
label: "すべてのチェックに合格?"
|
|
48
|
+
shape: diamond
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
DocSmithの品質保証プロセスは、ドキュメントの完全性を保証するため、いくつかの主要な領域をカバーしています。
|
|
59
|
-
|
|
60
|
-
#### コンテンツの構造と完全性
|
|
61
|
-
|
|
62
|
-
DocSmithは、コンテンツの構造的完全性を保証するために、いくつかのチェックを実行します:
|
|
51
|
+
Published-Documentation: {
|
|
52
|
+
label: "公開済みドキュメント"
|
|
53
|
+
shape: rectangle
|
|
54
|
+
style.fill: "#d4edda"
|
|
55
|
+
}
|
|
63
56
|
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
Error-Report: {
|
|
58
|
+
label: "エラーレポート"
|
|
59
|
+
shape: rectangle
|
|
60
|
+
style.fill: "#f8d7da"
|
|
61
|
+
}
|
|
68
62
|
|
|
69
|
-
|
|
63
|
+
Documentation-Content -> Quality-Assurance-Pipeline: "入力"
|
|
64
|
+
Quality-Assurance-Pipeline -> Validation-Result: "検証"
|
|
65
|
+
Validation-Result -> Published-Documentation: "はい"
|
|
66
|
+
Validation-Result -> Error-Report: "いいえ"
|
|
67
|
+
```
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
## Markdownとコンテンツ構造の検証
|
|
72
70
|
|
|
73
|
-
-
|
|
71
|
+
品質保証の基盤は、コアとなるMarkdownが整形され、構造的に健全であることを保証することです。DocSmithは`remark-lint`をベースにした高度なリンターを採用しており、一般的な構造上の問題を検出するためのカスタムチェックで補完されています。
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
主な構造およびフォーマットのチェックには、次のものが含まれます。
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
* **有効なMarkdown構文**:標準のMarkdownおよびGFM(GitHub Flavored Markdown)仕様への準拠。
|
|
76
|
+
* **見出しの整合性**:同一ドキュメント内の重複した見出し、不適切な見出しのインデント、複数のトップレベル見出し(H1)の使用などの問題を検出します。
|
|
77
|
+
* **テーブルのフォーマット**:テーブル構造が正しいことを検証します。特に、ヘッダー、区切り線、およびデータ行の列数の不一致をチェックします。
|
|
78
|
+
* **コードブロックの整合性**:すべてのコードブロックが ``` で適切に開始および終了していることを保証します。また、レンダリングに影響を与える可能性のある、コードブロック内の一貫性のないインデントもチェックします。
|
|
79
|
+
* **コンテンツの完全性**:生成されたコンテンツが適切な句読点で終わっていることを確認し、コンテンツが切り捨てられていないことを保証する検証ステップです。
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
## リンクとアセットの整合性
|
|
80
82
|
|
|
81
|
-
|
|
83
|
+
リンク切れや画像が見つからないことは、ユーザーエクスペリエンスを低下させます。DocSmithは、すべてのローカルリソースを検証するためのチェックを実行します。
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
* **リンク切れの検出**:システムはすべての相対Markdownリンクをスキャンし、ターゲットパスがプロジェクトのドキュメント構造で定義された有効なドキュメントに対応していることを検証します。このチェックにより、ユーザーがドキュメントをナビゲートする際に「404 Not Found」エラーに遭遇するのを防ぎます。`http://`または`https://`で始まる外部リンクはチェックされません。
|
|
86
|
+
* **ローカル画像の検証**:`![]()`を介して含まれるすべてのローカル画像について、バリデーターは参照されている画像ファイルが指定されたパスに存在することを確認します。これにより、最終的な出力に壊れた画像が表示されないようにします。
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|---|---|
|
|
87
|
-
| `no-duplicate-headings` | 同じセクション内で同じ内容の複数の見出しを防ぎます。 |
|
|
88
|
-
| `no-undefined-references` | すべてのリンクと画像の参照が定義されていることを保証します。 |
|
|
89
|
-
| `no-unused-definitions` | 使用されていないリンクや画像の定義にフラグを立てます。 |
|
|
90
|
-
| `no-heading-content-indent` | 見出しの内容の前にインデントを許可しません。 |
|
|
91
|
-
| `no-multiple-toplevel-headings` | ドキュメントごとにトップレベルの見出し(H1)を1つだけ許可します。 |
|
|
92
|
-
| `code-block-style` | コードブロックに一貫したスタイル(例:バッククォートの使用)を強制します。 |
|
|
88
|
+
## D2ダイアグラムの検証
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
すべてのダイアグラムが正しくレンダリングされることを保証するため、DocSmithはすべてのD2ダイアグラムの構文を検証します。
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
`d2`とマークされた各コードブロックは、厳密な構文チェッカーによって処理されます。構文エラーが見つかった場合、生成プロセスは説明的なエラーメッセージとともに停止されます。これにより、壊れた、または不適切にレンダリングされた視覚的なダイアグラムを含むドキュメントの公開を防ぎます。
|
|
@@ -1,96 +1,92 @@
|
|
|
1
1
|
# Quality Assurance
|
|
2
2
|
|
|
3
|
-
To ensure all generated documentation
|
|
3
|
+
To ensure that all generated documentation meets a high standard of quality, consistency, and accuracy, DocSmith includes a comprehensive, automated quality assurance pipeline. These built-in checks run automatically to identify and flag common formatting errors, broken links, and structural issues before publication. This process guarantees that the final output is professional, reliable, and easy for users to navigate.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```d2
|
|
5
|
+
```d2 Quality Assurance Pipeline icon=lucide:shield-check
|
|
8
6
|
direction: down
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
label: "
|
|
8
|
+
Documentation-Content: {
|
|
9
|
+
label: "Documentation Content"
|
|
12
10
|
shape: rectangle
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
label: "
|
|
13
|
+
Quality-Assurance-Pipeline: {
|
|
14
|
+
label: "Quality Assurance Pipeline"
|
|
17
15
|
shape: rectangle
|
|
18
|
-
grid-columns:
|
|
16
|
+
grid-columns: 3
|
|
19
17
|
grid-gap: 50
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
label: "
|
|
19
|
+
Markdown-Validation: {
|
|
20
|
+
label: "1. Markdown & Content Validation\n(remark-lint based)"
|
|
23
21
|
shape: rectangle
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
|
|
23
|
+
Check-1: "Valid Markdown Syntax"
|
|
24
|
+
Check-2: "Heading Integrity"
|
|
25
|
+
Check-3: "Table Formatting"
|
|
26
|
+
Check-4: "Code Block Integrity"
|
|
27
|
+
Check-5: "Content Completeness"
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
label: "
|
|
30
|
+
Link-Asset-Validation: {
|
|
31
|
+
label: "2. Link & Asset Integrity"
|
|
31
32
|
shape: rectangle
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Table-Formatting: "Matches column counts"
|
|
33
|
+
|
|
34
|
+
Check-6: "Dead Link Detection"
|
|
35
|
+
Check-7: "Local Image Validation"
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
label: "
|
|
38
|
+
D2-Diagram-Validation: {
|
|
39
|
+
label: "3. D2 Diagram Validation"
|
|
40
40
|
shape: rectangle
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Markdown-Linting: "Enforces style rules"
|
|
41
|
+
|
|
42
|
+
Check-8: "D2 Syntax Check"
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
label: "
|
|
49
|
-
shape:
|
|
46
|
+
Validation-Result: {
|
|
47
|
+
label: "All Checks Pass?"
|
|
48
|
+
shape: diamond
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
DocSmith's quality assurance process covers several key areas to ensure document integrity.
|
|
59
|
-
|
|
60
|
-
#### Content Structure & Completeness
|
|
61
|
-
|
|
62
|
-
DocSmith performs several checks to ensure the structural integrity of the content:
|
|
51
|
+
Published-Documentation: {
|
|
52
|
+
label: "Published Documentation"
|
|
53
|
+
shape: rectangle
|
|
54
|
+
style.fill: "#d4edda"
|
|
55
|
+
}
|
|
63
56
|
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
Error-Report: {
|
|
58
|
+
label: "Error Report"
|
|
59
|
+
shape: rectangle
|
|
60
|
+
style.fill: "#f8d7da"
|
|
61
|
+
}
|
|
68
62
|
|
|
69
|
-
|
|
63
|
+
Documentation-Content -> Quality-Assurance-Pipeline: "Input"
|
|
64
|
+
Quality-Assurance-Pipeline -> Validation-Result: "Validation"
|
|
65
|
+
Validation-Result -> Published-Documentation: "Yes"
|
|
66
|
+
Validation-Result -> Error-Report: "No"
|
|
67
|
+
```
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
## Markdown and Content Structure Validation
|
|
72
70
|
|
|
73
|
-
|
|
71
|
+
The foundation of quality assurance is ensuring the core Markdown is well-formed and structurally sound. DocSmith employs a sophisticated linter based on `remark-lint`, supplemented with custom checks to catch common structural problems.
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
Key structural and formatting checks include:
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
* **Valid Markdown Syntax**: Adherence to standard Markdown and GFM (GitHub Flavored Markdown) specifications.
|
|
76
|
+
* **Heading Integrity**: Detects issues such as duplicate headings within the same document, incorrect heading indentation, and the use of more than one top-level heading (H1).
|
|
77
|
+
* **Table Formatting**: Verifies that table structures are correct, specifically checking for mismatches between the number of columns in the header, the separator line, and the data rows.
|
|
78
|
+
* **Code Block Integrity**: Ensures that all code blocks are properly opened and closed with ```. It also checks for inconsistent indentation within a code block, which can affect rendering.
|
|
79
|
+
* **Content Completeness**: A verification step to ensure that generated content does not appear truncated by checking that it ends with appropriate punctuation.
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
## Link and Asset Integrity
|
|
80
82
|
|
|
81
|
-
|
|
83
|
+
Broken links and missing images degrade the user experience. DocSmith performs checks to validate all local resources.
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
* **Dead Link Detection**: The system scans all relative Markdown links and verifies that the target path corresponds to a valid document defined in the project's documentation structure. This check prevents users from encountering "404 Not Found" errors when navigating the documentation. External links beginning with `http://` or `https://` are not checked.
|
|
86
|
+
* **Local Image Validation**: For all local images included via `![]()`, the validator confirms that the referenced image file exists at the specified path. This ensures that no broken images appear in the final output.
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|---|---|
|
|
87
|
-
| `no-duplicate-headings` | Prevents multiple headings with the same content in the same section. |
|
|
88
|
-
| `no-undefined-references` | Ensures all link and image references are defined. |
|
|
89
|
-
| `no-unused-definitions` | Flags link or image definitions that are not used. |
|
|
90
|
-
| `no-heading-content-indent` | Disallows indentation before heading content. |
|
|
91
|
-
| `no-multiple-toplevel-headings` | Allows only one top-level heading (H1) per document. |
|
|
92
|
-
| `code-block-style` | Enforces a consistent style for code blocks (e.g., using backticks). |
|
|
88
|
+
## D2 Diagram Validation
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
To guarantee that all diagrams are rendered correctly, DocSmith validates the syntax of every D2 diagram.
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
Each code block marked with `d2` is processed through a strict syntax checker. If any syntax errors are found, the generation process is halted with a descriptive error message. This prevents the publication of documents containing broken or improperly rendered visual diagrams.
|
|
@@ -1,96 +1,92 @@
|
|
|
1
1
|
# 品質保證
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
為確保所有產生的文件都符合高品質、一致性和準確性的標準,DocSmith 內建了一個全面、自動化的品質保證流程。這些內建的檢查會在發布前自動運行,以識別並標記常見的格式錯誤、失效連結和結構性問題。此過程確保最終的輸出成品具備專業性、可靠性,並讓使用者易於瀏覽。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```d2
|
|
5
|
+
```d2 品質保證流程 icon=lucide:shield-check
|
|
8
6
|
direction: down
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
label: "
|
|
8
|
+
Documentation-Content: {
|
|
9
|
+
label: "文件內容"
|
|
12
10
|
shape: rectangle
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
label: "
|
|
13
|
+
Quality-Assurance-Pipeline: {
|
|
14
|
+
label: "品質保證流程"
|
|
17
15
|
shape: rectangle
|
|
18
|
-
grid-columns:
|
|
16
|
+
grid-columns: 3
|
|
19
17
|
grid-gap: 50
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
label: "
|
|
19
|
+
Markdown-Validation: {
|
|
20
|
+
label: "1. Markdown 與內容驗證\n(基於 remark-lint)"
|
|
23
21
|
shape: rectangle
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
|
|
23
|
+
Check-1: "有效的 Markdown 語法"
|
|
24
|
+
Check-2: "標題完整性"
|
|
25
|
+
Check-3: "表格格式"
|
|
26
|
+
Check-4: "程式碼區塊完整性"
|
|
27
|
+
Check-5: "內容完整性"
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
label: "
|
|
30
|
+
Link-Asset-Validation: {
|
|
31
|
+
label: "2. 連結與資源完整性"
|
|
31
32
|
shape: rectangle
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Table-Formatting: "匹配欄位數量"
|
|
33
|
+
|
|
34
|
+
Check-6: "失效連結偵測"
|
|
35
|
+
Check-7: "本地圖片驗證"
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
label: "
|
|
38
|
+
D2-Diagram-Validation: {
|
|
39
|
+
label: "3. D2 圖表驗證"
|
|
40
40
|
shape: rectangle
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Markdown-Linting: "強制執行樣式規則"
|
|
41
|
+
|
|
42
|
+
Check-8: "D2 語法檢查"
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
label: "
|
|
49
|
-
shape:
|
|
46
|
+
Validation-Result: {
|
|
47
|
+
label: "所有檢查是否通過?"
|
|
48
|
+
shape: diamond
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
DocSmith 的品質保證流程涵蓋了幾個關鍵領域,以確保文檔的完整性。
|
|
59
|
-
|
|
60
|
-
#### 內容結構與完整性
|
|
61
|
-
|
|
62
|
-
DocSmith 執行多項檢查,以確保內容的結構完整性:
|
|
51
|
+
Published-Documentation: {
|
|
52
|
+
label: "已發布的文件"
|
|
53
|
+
shape: rectangle
|
|
54
|
+
style.fill: "#d4edda"
|
|
55
|
+
}
|
|
63
56
|
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
Error-Report: {
|
|
58
|
+
label: "錯誤報告"
|
|
59
|
+
shape: rectangle
|
|
60
|
+
style.fill: "#f8d7da"
|
|
61
|
+
}
|
|
68
62
|
|
|
69
|
-
|
|
63
|
+
Documentation-Content -> Quality-Assurance-Pipeline: "輸入"
|
|
64
|
+
Quality-Assurance-Pipeline -> Validation-Result: "驗證"
|
|
65
|
+
Validation-Result -> Published-Documentation: "是"
|
|
66
|
+
Validation-Result -> Error-Report: "否"
|
|
67
|
+
```
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
## Markdown 與內容結構驗證
|
|
72
70
|
|
|
73
|
-
|
|
71
|
+
品質保證的基礎是確保核心 Markdown 格式正確且結構健全。DocSmith 採用一個基於 `remark-lint` 的精密 linter,並輔以自訂檢查來捕捉常見的結構性問題。
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
主要的結構和格式檢查包括:
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
* **有效的 Markdown 語法**:遵循標準 Markdown 和 GFM (GitHub Flavored Markdown) 規範。
|
|
76
|
+
* **標題完整性**:偵測同一文件內的重複標題、不正確的標題縮排,以及使用超過一個頂層標題 (H1) 等問題。
|
|
77
|
+
* **表格格式**:驗證表格結構是否正確,特別是檢查標頭、分隔線和資料列之間的欄位數量是否不匹配。
|
|
78
|
+
* **程式碼區塊完整性**:確保所有程式碼區塊都以 ``` 正確地開啟和關閉。它還會檢查程式碼區塊內可能影響渲染結果的不一致縮排。
|
|
79
|
+
* **內容完整性**:一個驗證步驟,透過檢查產生的內容是否以適當的標點符號結尾,來確保內容不會看似被截斷。
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
## 連結與資源完整性
|
|
80
82
|
|
|
81
|
-
|
|
83
|
+
失效連結和遺失的圖片會降低使用者體驗。DocSmith 會執行檢查以驗證所有本地資源。
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
* **失效連結偵測**:系統會掃描所有相對 Markdown 連結,並驗證目標路徑是否對應到專案文件結構中定義的有效文件。此檢查可防止使用者在瀏覽文件時遇到「404 Not Found」錯誤。以 `http://` 或 `https://` 開頭的外部連結則不會被檢查。
|
|
86
|
+
* **本地圖片驗證**:對於所有透過 `![]()` 包含的本地圖片,驗證器會確認所引用的圖片檔案是否存在於指定路徑。這能確保最終的輸出成品中不會出現破損的圖片。
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|---|---|
|
|
87
|
-
| `no-duplicate-headings` | 防止在同一部分中出現內容相同的多個標題。 |
|
|
88
|
-
| `no-undefined-references` | 確保所有連結和圖片引用都已定義。 |
|
|
89
|
-
| `no-unused-definitions` | 標記未使用的連結或圖片定義。 |
|
|
90
|
-
| `no-heading-content-indent` | 不允許在標題內容前縮排。 |
|
|
91
|
-
| `no-multiple-toplevel-headings` | 每個文件只允許一個頂層標題 (H1)。 |
|
|
92
|
-
| `code-block-style` | 強制執行一致的程式碼區塊樣式(例如,使用反引號)。 |
|
|
88
|
+
## D2 圖表驗證
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
為保證所有圖表都能正確渲染,DocSmith 會驗證每個 D2 圖表的語法。
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
每個標記為 `d2` 的程式碼區塊都會經過嚴格的語法檢查器處理。若發現任何語法錯誤,產生過程將會被中止,並顯示一則描述性的錯誤訊息。這可以防止發布含有破損或渲染不當的視覺圖表的文件。
|
|
@@ -1,96 +1,92 @@
|
|
|
1
1
|
# 质量保证
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
为确保所有生成的文档都符合高质量、一致性和准确性的标准,DocSmith 包含一个全面的自动化质量保证流程。这些内置检查会自动运行,以在发布前识别并标记常见的格式错误、断开的链接和结构性问题。此过程保证最终输出专业、可靠且易于用户浏览。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```d2
|
|
5
|
+
```d2 质量保证流程 icon=lucide:shield-check
|
|
8
6
|
direction: down
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
label: "
|
|
8
|
+
Documentation-Content: {
|
|
9
|
+
label: "文档内容"
|
|
12
10
|
shape: rectangle
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
label: "
|
|
13
|
+
Quality-Assurance-Pipeline: {
|
|
14
|
+
label: "质量保证流程"
|
|
17
15
|
shape: rectangle
|
|
18
|
-
grid-columns:
|
|
16
|
+
grid-columns: 3
|
|
19
17
|
grid-gap: 50
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
label: "
|
|
19
|
+
Markdown-Validation: {
|
|
20
|
+
label: "1. Markdown 和内容验证\n(基于 remark-lint)"
|
|
23
21
|
shape: rectangle
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
|
|
23
|
+
Check-1: "有效的 Markdown 语法"
|
|
24
|
+
Check-2: "标题完整性"
|
|
25
|
+
Check-3: "表格格式"
|
|
26
|
+
Check-4: "代码块完整性"
|
|
27
|
+
Check-5: "内容完整性"
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
label: "
|
|
30
|
+
Link-Asset-Validation: {
|
|
31
|
+
label: "2. 链接和资产完整性"
|
|
31
32
|
shape: rectangle
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Table-Formatting: "匹配列数"
|
|
33
|
+
|
|
34
|
+
Check-6: "死链检测"
|
|
35
|
+
Check-7: "本地图片验证"
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
label: "
|
|
38
|
+
D2-Diagram-Validation: {
|
|
39
|
+
label: "3. D2 图表验证"
|
|
40
40
|
shape: rectangle
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Markdown-Linting: "强制执行样式规则"
|
|
41
|
+
|
|
42
|
+
Check-8: "D2 语法检查"
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
label: "
|
|
49
|
-
shape:
|
|
46
|
+
Validation-Result: {
|
|
47
|
+
label: "所有检查是否通过?"
|
|
48
|
+
shape: diamond
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
DocSmith 的质量保证流程涵盖了几个关键领域,以确保文档的完整性。
|
|
59
|
-
|
|
60
|
-
#### 内容结构与完整性
|
|
61
|
-
|
|
62
|
-
DocSmith 执行多项检查以确保内容的结构完整性:
|
|
51
|
+
Published-Documentation: {
|
|
52
|
+
label: "已发布的文档"
|
|
53
|
+
shape: rectangle
|
|
54
|
+
style.fill: "#d4edda"
|
|
55
|
+
}
|
|
63
56
|
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
Error-Report: {
|
|
58
|
+
label: "错误报告"
|
|
59
|
+
shape: rectangle
|
|
60
|
+
style.fill: "#f8d7da"
|
|
61
|
+
}
|
|
68
62
|
|
|
69
|
-
|
|
63
|
+
Documentation-Content -> Quality-Assurance-Pipeline: "输入"
|
|
64
|
+
Quality-Assurance-Pipeline -> Validation-Result: "验证"
|
|
65
|
+
Validation-Result -> Published-Documentation: "是"
|
|
66
|
+
Validation-Result -> Error-Report: "否"
|
|
67
|
+
```
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
## Markdown 和内容结构验证
|
|
72
70
|
|
|
73
|
-
|
|
71
|
+
质量保证的基础是确保核心 Markdown 格式良好且结构合理。DocSmith 采用基于 `remark-lint` 的精密 linter,并辅以自定义检查来捕获常见的结构性问题。
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
关键的结构和格式检查包括:
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
* **有效的 Markdown 语法**:遵循标准 Markdown 和 GFM(GitHub Flavored Markdown)规范。
|
|
76
|
+
* **标题完整性**:检测同一文档中重复的标题、不正确的标题缩进以及使用多个顶级标题(H1)等问题。
|
|
77
|
+
* **表格格式**:验证表格结构是否正确,特别是检查表头、分隔行和数据行之间的列数是否不匹配。
|
|
78
|
+
* **代码块完整性**:确保所有代码块都使用 ``` 正确地开始和结束。它还会检查代码块内不一致的缩进,这可能会影响渲染。
|
|
79
|
+
* **内容完整性**:一个验证步骤,通过检查生成的内容是否以适当的标点符号结尾,来确保内容没有被截断。
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
## 链接和资产完整性
|
|
80
82
|
|
|
81
|
-
|
|
83
|
+
断开的链接和缺失的图片会降低用户体验。DocSmith 会执行检查以验证所有本地资源。
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
* **死链检测**:系统会扫描所有相对 Markdown 链接,并验证目标路径是否对应于项目文档结构中定义的有效文档。此检查可防止用户在浏览文档时遇到“404 Not Found”错误。以 `http://` 或 `https://` 开头的外部链接不会被检查。
|
|
86
|
+
* **本地图片验证**:对于所有通过 `![]()` 包含的本地图片,验证器会确认引用的图片文件是否存在于指定路径。这可以确保最终输出中不会出现损坏的图片。
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|---|---|
|
|
87
|
-
| `no-duplicate-headings` | 防止在同一部分中出现内容相同的多个标题。 |
|
|
88
|
-
| `no-undefined-references` | 确保所有链接和图片引用都已定义。 |
|
|
89
|
-
| `no-unused-definitions` | 标记未被使用的链接或图片定义。 |
|
|
90
|
-
| `no-heading-content-indent` | 禁止在标题内容前缩进。 |
|
|
91
|
-
| `no-multiple-toplevel-headings` | 每个文档只允许一个顶级标题 (H1)。 |
|
|
92
|
-
| `code-block-style` | 强制代码块使用一致的样式(例如,使用反引号)。 |
|
|
88
|
+
## D2 图表验证
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
为保证所有图表都能正确渲染,DocSmith 会验证每个 D2 图表的语法。
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
每个标记为 `d2` 的代码块都会经过严格的语法检查器处理。如果发现任何语法错误,生成过程将停止并显示描述性错误消息。这可以防止发布包含损坏或渲染不当的可视图表的文档。
|