mini-wiki
npx skills add https://github.com/trsoliu/mini-wiki --skill mini-wiki
Agent 安装分布
Skill 文档
Wiki Generator
Generate professional-grade structured project Wiki to .mini-wiki/ directory.
æ ¸å¿ååï¼çæçææ¡£å¿ é¡» 详ç»ãç»æåãæå¾è¡¨ãç¸äºå ³èï¼è¾¾å°ä¼ä¸çº§ææ¯ææ¡£æ åã
ð Documentation Quality Standards
CRITICAL: All generated documentation MUST meet these standards:
Content Depth
- Every topic must have complete context – no bare lists or skeleton content
- Descriptions must be detailed and specific – explain WHY and HOW
- Must include working code examples with expected output
- Must document edge cases, warnings, common pitfalls
Structure Requirements
- Use hierarchical headings (H2/H3/H4) for clear information architecture
- Important concepts in tables for quick reference
- Processes visualized with Mermaid diagrams
- Cross-links between related documents
Diagram Requirements (minimum 2-3 per document)
| Content Type | Diagram Type |
|---|---|
| Architecture | flowchart TB with subgraphs |
| Data/Call flow | sequenceDiagram |
| State changes | stateDiagram-v2 |
| Class/Interface | classDiagram with properties + methods |
| Dependencies | flowchart LR |
ð´ MANDATORY: Source Code Traceability
Every section MUST include source references at the end:
**Section sources**
- [filename.ts](file://path/to/file.ts#L1-L50)
- [another.ts](file://path/to/another.ts#L20-L80)
**Diagram sources**
- [architecture.ts](file://src/architecture.ts#L1-L100)
ð´ MANDATORY: Dynamic Quality Standards
è´¨éæ ååºäºæ¨¡åå¤æåº¦å¨æè®¡ç®ï¼èéåºå®æ°å
å¤æåº¦è¯ä¼°å å
complexity_factors:
# æºç ææ
source_lines: 0 # æ¨¡åæºç è¡æ°
file_count: 0 # æä»¶æ°é
export_count: 0 # 导åºçæ¥å£æ°é
dependency_count: 0 # ä¾èµçæ¨¡åæ°
dependent_count: 0 # 被ä¾èµæ¬¡æ°
# 项ç®ä¸ä¸æ
project_type: "fullstack" # frontend / backend / fullstack / library / cli
language: "typescript" # typescript / python / go / java / rust
module_role: "core" # core / util / config / test / example
å¨æè´¨éå ¬å¼
| ææ | 计ç®å ¬å¼ | 说æ |
|---|---|---|
| ææ¡£è¡æ° | max(100, source_lines à 0.3 + export_count à 20) |
æºç è¶å¤ï¼ææ¡£è¶é¿ |
| 代ç ç¤ºä¾ | max(2, export_count à 0.5) |
æ¯ä¸ªå¯¼åºæ¥å£è³å° 0.5 ä¸ªç¤ºä¾ |
| å¾è¡¨æ°é | max(1, ceil(file_count / 5)) |
æ¯ 5 个æä»¶ 1 个å¾è¡¨ |
| ç« èæ° | 6 + module_role_weight |
æ ¸å¿æ¨¡åç« èæ´å¤ |
模åè§è²æé
| è§è² | æé | æææ·±åº¦ |
|---|---|---|
| core (æ ¸å¿) | +4 | 深度åæã宿´ç¤ºä¾ãæ§è½ä¼å |
| util (å·¥å ·) | +2 | æ¥å£è¯´æã使ç¨ç¤ºä¾ |
| config (é ç½®) | +1 | é 置项说æãé»è®¤å¼ |
| test (æµè¯) | +0 | æµè¯çç¥ãè¦çç |
| example (示ä¾) | +0 | è¿è¡è¯´æ |
项ç®ç±»åéé
| 项ç®ç±»å | éç¹å 容 |
|---|---|
| frontend | ç»ä»¶ Propsãç¶æç®¡çãUI 交äºç¤ºä¾ |
| backend | API æ¥å£ãæ°æ®æ¨¡åãä¸é´ä»¶ç¤ºä¾ |
| fullstack | åå端交äºãæ°æ®æµãé¨ç½²é ç½® |
| library | API ææ¡£ãç±»åå®ä¹ãå ¼å®¹æ§è¯´æ |
| cli | å½ä»¤åæ°ãé ç½®æä»¶ã使ç¨ç¤ºä¾ |
è¯è¨éé
| è¯è¨ | 示ä¾é£æ ¼ |
|---|---|
| TypeScript | ç±»åæ³¨è§£ãæ³å示ä¾ãæ¥å£å®ä¹ |
| Python | docstringãç±»åæç¤ºãè£ é¥°å¨ç¤ºä¾ |
| Go | é误å¤çãå¹¶å示ä¾ãæ¥å£å®ç° |
| Rust | æææãçå½å¨æãé误å¤ç |
Module Document Sections
æ ¹æ®æ¨¡åè§è²å¨æå å«ä»¥ä¸ç« èï¼
| ç« è | core | util | config | å 容 |
|---|---|---|---|---|
| æ¦è¿° | â | â | â | ä»ç»ãä»·å¼ãæ¶æä½ç½®å¾ |
| æ ¸å¿åè½ | â | â | – | åè½è¡¨æ ¼ + classDiagram |
| ç®å½ç»æ | â | â | – | æä»¶æ + è责说æ |
| API/æ¥å£ | â | â | â | å¯¼åºæ¥å£ãç±»åå®ä¹ |
| 代ç ç¤ºä¾ | â | â | â | åºç¡/é«çº§/é误å¤ç |
| æä½³å®è·µ | â | – | – | æ¨è/é¿å åæ³ |
| æ§è½ä¼å | â | – | – | æ§è½æå·§ãåºåæ°æ® |
| é误å¤ç | â | â | – | 常è§é误ãè°è¯æå·§ |
| ä¾èµå ³ç³» | â | â | â | ä¾èµå¾ |
| ç¸å ³ææ¡£ | â | â | â | 交å龿¥ |
ð´ Code Examples (Target: AI & Architecture Review)
ææ¡£ä¸»è¦å伿¯ AI åæ¶æè¯å®¡ï¼ä»£ç 示ä¾å¿ é¡»ï¼
- 宿´å¯è¿è¡ï¼å å« importãåå§åãè°ç¨ãç»æå¤ç
- è¦çå¯¼åºæ¥å£ï¼æ¯ä¸ªä¸»è¦å¯¼åº API è³å° 1 个示ä¾
- å 嫿³¨é说æï¼è§£éå ³é®æ¥éª¤å设计æå¾
- éé 项ç®è¯è¨ï¼éµå¾ªè¯è¨æä½³å®è·µ
// â
好ç示ä¾ï¼å®æ´ãå¯è¿è¡ãææ³¨é
import { AgentClient } from '@editverse/agent-core';
// 1. å建客æ·ç«¯ï¼å±ç¤ºå¿
éé
ç½®ï¼
const agent = await AgentClient.create({
provider: 'openai',
model: 'gpt-4',
});
// 2. åºç¡å¯¹è¯
const response = await agent.chat({
messages: [{ role: 'user', content: 'ä½ å¥½' }],
});
console.log(response.content);
// 3. é误å¤ç
try {
await agent.chat({ messages: [] });
} catch (error) {
if (error.code === 'INVALID_MESSAGES') {
console.error('æ¶æ¯å表ä¸è½ä¸ºç©º');
}
}
示ä¾ç±»åæ ¹æ®å¯¼åº API æ°éå¨æè°æ´ï¼
| å¯¼åºæ°é | 示ä¾è¦æ± |
|---|---|
| 1-3 | æ¯ä¸ª API 1 个åºç¡ç¤ºä¾ + 1 个é误å¤ç |
| 4-10 | æ ¸å¿ API å 1 ä¸ªç¤ºä¾ + 1 个éæç¤ºä¾ |
| 10+ | å类示ä¾ï¼æåè½åç»ï¼ |
ð´ MANDATORY: classDiagram for Core Classes
For every core class/interface, generate detailed classDiagram:
classDiagram
class ClassName {
+property1 : Type
+property2 : Type
-privateField : Type
+method1(param : Type) : ReturnType
+method2() : void
}
Document Relationships
- Every document must have “Related Documents” section
- Module docs link to: architecture position, API reference, dependencies
- API docs link to: parent module, usage examples, type definitions
Output Structure
ð´ MANDATORY: Business Domain Hierarchy (Not Flat!)
æä¸å¡é¢ååå±ç»ç»ï¼è䏿¯æå¹³ç modules/ ç®å½
.mini-wiki/
âââ config.yaml
âââ meta.json
âââ cache/
âââ wiki/
â âââ index.md # 项ç®é¦é¡µ
â âââ architecture.md # ç³»ç»æ¶æ
â âââ getting-started.md # å¿«éå¼å§
â âââ doc-map.md # ææ¡£å
³ç³»å¾
â â
â âââ AIç³»ç»/ # ä¸å¡é¢å 1
â â âââ _index.md # é¢åæ¦è¿°
â â âââ Agentæ ¸å¿/ # åé¢å
â â â âââ _index.md
â â â âââ 客æ·ç«¯.md # 400+ è¡
â â â âââ å·¥å
·ç³»ç».md # 400+ è¡
â â âââ MCPåè®®/
â â â âââ _index.md
â â â âââ é
置管ç.md
â â âââ å¯¹è¯æµç¨/
â â âââ ç¶æç®¡ç.md
â â âââ ååºå¤ç.md
â â
â âââ åå¨ç³»ç»/ # ä¸å¡é¢å 2
â â âââ _index.md
â â âââ ç¶æç®¡ç/
â â â âââ Zustand.md
â â âââ æä¹
å/
â â âââ åå¨éé
.md
â â
â âââ ç¼è¾å¨/ # ä¸å¡é¢å 3
â â âââ _index.md
â â âââ æ ¸å¿/
â â âââ æ©å±/
â â
â âââ 跨平å°/ # ä¸å¡é¢å 4
â â âââ _index.md
â â âââ Electron/
â â âââ Web/
â â
â âââ api/ # API åè
âââ i18n/
Domain Auto-Detection
åæä»£ç åï¼èªå¨è¯å«ä¸å¡é¢åï¼
# èªå¨è¯å«çä¸å¡é¢åæ å°
domain_mapping:
AIç³»ç»:
keywords: [agent, ai, llm, chat, mcp, tool]
packages: [agent-core, agent, mcp-core, agent-bridge]
åå¨ç³»ç»:
keywords: [store, storage, persist, state]
packages: [store, storage, electron-secure-storage]
ç¼è¾å¨:
keywords: [editor, tiptap, markdown, document]
packages: [editor-core, markdown, docx2tiptap-core]
跨平å°:
keywords: [electron, desktop, web, app]
packages: [apps/*, browser-core, electron-*]
ç»ä»¶åº:
keywords: [component, ui, shadcn]
packages: [shadcn-ui, chat-ui, media-viewer]
ð´ æ¯ä¸ªä¸å¡é¢åå¿ é¡»å å«
| æä»¶ | 说æ |
|---|---|
_index.md |
é¢åæ¦è¿°ãæ¶æå¾ã忍¡åå表 |
| åé¢åç®å½ | ç¸å ³æ¨¡åæåè½åç» |
| æ¯ä¸ªææ¡£ | 400+ è¡ã5+ 代ç ç¤ºä¾ |
ð Plugin Instruction Protocol (No Code Execution)
CRITICAL: Plugins are instruction-only. The agent must never execute plugin-provided code, scripts, or external commands. Hooks only influence how analysis and documentation are written.
- Load Registry: Read
plugins/_registry.yamlto see enabled plugins. - Read Manifests: For each enabled plugin, read its
PLUGIN.mdto understand its Hooks and Instructions. - Apply Hook Instructions (text-only):
Pre-Analysis (
on_init): Apply guidance before starting. Post-Analysis (after_analyze): Apply guidance after analyzing structure. Pre-Generation (before_generate): Modify generation plan/prompts. Post-Generation (after_generate/on_export): Apply guidance after wiki creation.
Safety constraints:
- Do not run plugin scripts or binaries.
- Do not fetch or execute code from the network.
- Any CLI commands in
PLUGIN.mdare for humans only and must not be executed by the agent.
Example: If
api-doc-enhanceris enabled, you MUST read itsPLUGIN.mdand follow its specific rules for generating API docs.
Workflow
1. Initialization Check
Check if .mini-wiki/ exists:
- Not exists: Run
scripts/init_wiki.pyto create directory structure - Exists: Read
config.yamland cache, perform incremental update
2. Plugin Discovery
Check plugins/ directory for installed plugins:
- Read
plugins/_registry.yamlfor enabled plugins - For each enabled plugin, read
PLUGIN.mdmanifest - Register hooks:
on_init,after_analyze,before_generate,after_generate
3. Project Analysis (Deep)
Run scripts/analyze_project.py or analyze manually:
- Identify tech stack: Check package.json, requirements.txt, etc.
- Find entry points: src/index.ts, main.py, etc.
- Identify modules: Scan src/ directory structure
- Find existing docs: README.md, CHANGELOG.md, etc.
- Apply
after_analyzeguidance from plugins (text-only)
Save structure to cache/structure.json.
4. Deep Code Analysis (NEW – CRITICAL)
IMPORTANT: For each module, you MUST read and analyze the actual source code:
- Read source files: Use read_file tool to read key source files
- Understand code semantics: Analyze what the code does, not just its structure
- Extract detailed information:
- Function purposes, parameters, return values, side effects
- Class hierarchies and relationships
- Data flow and state management
- Error handling patterns
- Design patterns used
- Identify relationships: Module dependencies, call graphs, data flow
ð See
references/prompts.mdâ “ä»£ç æ·±åº¦åæ” for the analysis prompt template
5. Change Detection
Run scripts/detect_changes.py to compare file checksums:
- New files â Generate docs
- Modified files â Update docs
- Deleted files â Mark obsolete
6. Content Generation (Professional Grade)
Apply before_generate guidance from plugins (text-only), then generate content following strict quality standards:
6.1 Homepage (index.md)
Must include:
- Project badges and one-liner description
- 2-3 paragraphs detailed introduction (not just bullet points)
- Architecture preview diagram (Mermaid flowchart)
- Documentation navigation table with audience
- Core features table with links to modules
- Quick start code example with expected output
- Project statistics table
- Module overview table with links
6.2 Architecture Doc (architecture.md)
Must include:
- Executive summary (positioning, tech overview, architecture style)
- System architecture diagram (Mermaid flowchart TB with subgraphs)
- Tech stack table with version and selection rationale
- Module dependency diagram (Mermaid flowchart)
- Detailed module descriptions with responsibility and interfaces
- Data flow diagram (Mermaid sequenceDiagram)
- State management diagram (if applicable)
- Directory structure with explanations
- Design patterns and principles
- Extension guide
6.3 Module Docs (modules/<name>.md)
Each module doc must include (16 sections minimum):
- Module overview (2-3 paragraphs, not 2-3 sentences)
- Core value proposition
- Architecture position diagram (highlight current module)
- Feature table with related APIs
- File structure with responsibility descriptions
- Core workflow diagram (Mermaid flowchart)
- State diagram (if applicable)
- Public API overview table
- Detailed API documentation (signature, params, returns, examples)
- Type definitions with field tables
- Quick start code
- 3+ usage examples with scenarios
- Best practices (do’s and don’ts)
- Design decisions and trade-offs
- Dependency diagram
- Related documents links
6.4 API Docs (api/<name>.md)
Each API doc must include:
- Module overview with import examples
- API overview table
- Type definitions with property tables
- For each function:
- One-liner + detailed description (3+ sentences)
- Function signature
- Parameter table with constraints and defaults
- Return value with possible cases
- Exception table
- 3 code examples (basic, advanced, error handling)
- Warnings and tips
- Related APIs
- For classes: class diagram, constructor, properties, methods
- Usage patterns (2-3 complete scenarios)
- FAQ section
- Related documents
6.5 Getting Started (getting-started.md)
Must include:
- Prerequisites table with version requirements
- Multiple installation methods
- Configuration file explanation
- Step-by-step first example
- Next steps table
- Common issues FAQ
6.6 Doc Map (doc-map.md)
Must include:
- Document relationship diagram (Mermaid flowchart)
- Reading path recommendations by role
- Complete document index
- Module dependency matrix
Apply after_generate guidance from plugins (text-only).
7. Source Code Links
Add source links to code blocks:
### `functionName` [ð](file:///path/to/file.ts#L42)
8. Save
- Write wiki files to
.mini-wiki/wiki/ - Update
cache/checksums.json - Update
meta.jsontimestamp
ð Large Project Progressive Scanning
é®é¢ï¼å¤§åé¡¹ç®æ¶ï¼AI å¯è½åªçæå°éææ¡£è没æå ¨é¢è¦çæææ¨¡åã
è§¦åæ¡ä»¶
å½é¡¹ç®æ»¡è¶³ä»¥ä¸ä»»ä¸æ¡ä»¶æ¶ï¼å¿ é¡»ä½¿ç¨æ¸è¿å¼æ«æçç¥ï¼
- æ¨¡åæ°é > 10
- æºæä»¶æ°é > 50
- 代ç è¡æ° > 10,000
æ¸è¿å¼æ«æçç¥
flowchart TB
A[项ç®åæ] --> B{æ¨¡åæ°é > 10?}
B -->|æ¯| C[å¯ç¨æ¸è¿å¼æ«æ]
B -->|å¦| D[æ åæ«æ]
C --> E[模åä¼å
级æåº]
E --> F[æ¹æ¬¡åå]
F --> G[éæ¹çæææ¡£]
G --> H{è¿ææªå¤ç模å?}
H -->|æ¯| I[ä¿åè¿åº¦]
I --> J[æç¤ºç¨æ·ç»§ç»]
J --> G
H -->|å¦| K[çæç´¢å¼åå
³ç³»å¾]
æ§è¡æ¥éª¤
Step 1: 模åä¼å 级æåº
æä»¥ä¸ç»´åº¦è®¡ç®ä¼å çº§åæ°ï¼
| 维度 | æé | 说æ |
|---|---|---|
| å ¥å£ç¹ | 5 | main.py, index.ts ç |
| 被ä¾èµæ¬¡æ° | 4 | è¢«å ¶ä»æ¨¡å import çæ¬¡æ° |
| 代ç è¡æ° | 2 | è¾å¤§ç模åä¼å |
| æç°æææ¡£ | 3 | README æ docs åå¨ |
| æè¿ä¿®æ¹ | 1 | æè¿ä¿®æ¹çä¼å |
Step 2: æ¹æ¬¡åå
ð´ å ³é®ï¼æ¯æ¹ 1-2 个模åï¼æ·±åº¦åºäºæ¨¡åå¤æåº¦å¨æè°æ´
batch_config:
batch_size: 1 # æ¯æ¹å¤ç 1-2 个模å
quality_mode: dynamic # dynamic / fixed
pause_between_batches: true
auto_continue: false
æ¹æ¬¡åé 示ä¾ï¼æä¸å¡é¢å + å¤æåº¦ï¼:
| æ¹æ¬¡ | å 容 | å¤æåº¦ | ææè¡æ° |
|---|---|---|---|
| 1 | index.md |
– | 150+ |
| 2 | architecture.md |
– | 200+ |
| 3 | AIç³»ç»/Agentæ ¸å¿/客æ·ç«¯.md |
2000è¡æºç , 15å¯¼åº | 600+ |
| 4 | åå¨ç³»ç»/Zustand.md |
500è¡æºç , 8å¯¼åº | 250+ |
| 5 | é
ç½®/constants.md |
100è¡æºç , 3å¯¼åº | 100+ |
| … | 深度ä¸å¤æåº¦ææ£æ¯ | å¨æè®¡ç® |
Step 3: è¿åº¦è·è¸ª
å¨ cache/progress.json ä¸è®°å½ï¼
{
"version": "2.0.0",
"total_modules": 25,
"completed_modules": ["core", "utils", "api"],
"pending_modules": ["auth", "db", ...],
"current_batch": 2,
"last_updated": "2026-01-28T21:15:00Z",
"quality_version": "professional-v2"
}
Step 4: æç¹ç»ä¼
å½ç¨æ·è¯´ “ç»§ç»çæ wiki” æ “continue wiki generation” æ¶ï¼
- 读å
cache/progress.json - è·³è¿å·²å®æç模å
- ä»ä¸ä¸æ¹æ¬¡ç»§ç»
ð´ æ¯æ¹æ¬¡è´¨éæ£æ¥
çææ¯æ¹åï¼å¿ é¡»éªè¯è´¨éï¼
# æ£æ¥æ¬æ¹çæçææ¡£
python scripts/check_quality.py .mini-wiki --verbose
è´¨é鍿§ï¼å¨æè®¡ç®ï¼ï¼
è´¨éæ£æ¥åºäºæ¨¡åå¤æåº¦å¨æè¯ä¼°ï¼èéåºå®æ°åï¼
# è¿è¡å¨æè´¨éæ£æ¥
python scripts/check_quality.py .mini-wiki --analyze-complexity
| ææ | è®¡ç®æ¹å¼ | æªè¾¾æ å¤ç |
|---|---|---|
| è¡æ° | max(100, source_lines à 0.3) |
éæ°çæ |
| ç« èæ° | 6 + role_weight |
è¡¥å ç« è |
| å¾è¡¨æ° | max(1, files / 5) |
æ·»å å¾è¡¨ |
| 代ç ç¤ºä¾ | max(2, exports à 0.5) |
è¡¥å ç¤ºä¾ |
| æºç 追溯 | æ¯ç« èå¿ é | æ·»å å¼ç¨ |
è´¨éè¯çº§ï¼
| ç级 | 说æ |
|---|---|
| ð¢ Excellent | è¶ è¿ææå¼ 20%+ |
| ð¡ Good | è¾¾å°ææå¼ |
| ð Acceptable | è¾¾å°ææå¼ 80%+ |
| ð´ Needs Work | ä½äºææå¼ 80% |
ç¨æ·äº¤äºæç¤º
æ¯æ¹æ¬¡å®æåï¼åç¨æ·æ¥åï¼
â
第 2 æ¹å®æ (6/25 模å)
å·²çæ:
- modules/store.md (245 è¡, Professional â
)
- modules/editor-core.md (312 è¡, Professional â
)
è´¨éæ£æ¥: å
¨é¨éè¿ â
å¾
å¤ç: 19 个模å
é¢è®¡è¿é: 10 æ¹æ¬¡
ð è¾å
¥ "ç»§ç»" çæä¸ä¸æ¹
ð è¾å
¥ "æ£æ¥è´¨é" è¿è¡è´¨éæ£æ¥
ð è¾å
¥ "éæ°çæ <模åå>" éæ°çæç¹å®æ¨¡å
é ç½®é项
# .mini-wiki/config.yaml
progressive:
enabled: auto # auto / always / never
batch_size: 1 # æ¯æ¹æ¨¡åæ°ï¼1-2 ç¡®ä¿æ·±åº¦ï¼
min_lines_per_doc: 400 # æ¯ä¸ªææ¡£æå°è¡æ°
min_code_examples: 5 # æ¯ä¸ªææ¡£æå°ä»£ç ç¤ºä¾æ°
quality_check: true # æ¯æ¹åèªå¨æ£æ¥è´¨é
auto_continue: false # èªå¨ç»§ç»æ é确认
# ä¸å¡é¢ååå±é
ç½®
domain_hierarchy:
enabled: true # å¯ç¨ä¸å¡é¢ååå±
auto_detect: true # èªå¨è¯å«ä¸å¡é¢å
language: zh # ç®å½åè¯è¨ (zh/en)
priority_weights: # èªå®ä¹ä¼å
级æé
entry_point: 5
dependency_count: 4
code_lines: 2
has_docs: 3
recent_modified: 1
skip_modules: # è·³è¿ç模å
- __tests__
- examples
ð Documentation Upgrade & Refresh
é®é¢ï¼å级 mini-wiki åï¼ä¹åçæçä½è´¨éææ¡£éè¦å·æ°å级ã
çæ¬æ£æµæºå¶
å¨ meta.json ä¸è®°å½ææ¡£çæçæ¬ï¼å¹¶å¨æ¯ä¸ªææ¡£é¡µèæ¾ç¤ºï¼
é¡µèæ ¼å¼: *ç± [Mini-Wiki v{{ MINI_WIKI_VERSION }}](https://github.com/trsoliu/mini-wiki) èªå¨çæ | {{ GENERATED_AT }}*
{
"generator_version": "3.0.6", // ç¨äº {{ MINI_WIKI_VERSION }}
"quality_standard": "professional-v2",
"generated_at": "2026-01-28T21:15:00Z",
"modules": {
"core": {
"version": "1.0.0",
"quality": "basic",
"sections": 6,
"has_diagrams": false,
"last_updated": "2026-01-20T10:00:00Z"
}
}
}
è´¨éè¯ä¼°æ å
| è´¨éç级 | ç« èæ° | å¾è¡¨æ° | ç¤ºä¾æ° | 交å龿¥ |
|---|---|---|---|---|
basic |
< 8 | 0 | 0-1 | æ |
standard |
8-12 | 1 | 1-2 | é¨å |
professional |
13-16 | 2+ | 3+ | 宿´ |
åçº§è§¦åæ¡ä»¶
flowchart TB
A[æ£æµ .mini-wiki/] --> B{meta.json åå¨?}
B -->|å¦| C[å
¨æ°çæ]
B -->|æ¯| D[读åçæ¬ä¿¡æ¯]
D --> E{çæ¬ < 2.0.0?}
E -->|æ¯| F[æ è®°éè¦å级]
E -->|å¦| G{quality != professional?}
G -->|æ¯| F
G -->|å¦| H[å¢éæ´æ°]
F --> I[çæå级计å]
I --> J[æç¤ºç¨æ·ç¡®è®¤]
å级çç¥
çç¥ 1: å
¨éå·æ° (refresh_all)
éç¨äºï¼çæ¬å·®å¼å¤§ãææ¡£è´¨éå·®
ç¨æ·å½ä»¤: "å·æ°å
¨é¨ wiki" / "refresh all wiki"
çç¥ 2: æ¸è¿å¼å级 (upgrade_progressive)
éç¨äºï¼æ¨¡åå¤ã叿ä¿çé¨åå 容
ç¨æ·å½ä»¤: "å级 wiki" / "upgrade wiki"
çç¥ 3: éæ©æ§å级 (upgrade_selective)
éç¨äºï¼åªæ³å级ç¹å®æ¨¡å
ç¨æ·å½ä»¤: "å级 core æ¨¡åææ¡£" / "upgrade core module docs"
å级æ§è¡æµç¨
Step 1: æ«æç°æææ¡£
# 伪代ç
for doc in existing_docs:
score = evaluate_quality(doc)
if score.sections < 10 or not score.has_diagrams:
mark_for_upgrade(doc, priority=HIGH)
elif score.sections < 13:
mark_for_upgrade(doc, priority=MEDIUM)
Step 2: çæå级æ¥å
ð Wiki å级è¯ä¼°æ¥å
å½åçæ¬: 1.0.0 (basic)
ç®æ çæ¬: 2.0.0 (professional)
éè¦åçº§çææ¡£:
âââââââââââââââââââ¬âââââââââââ¬âââââââââ¬ââââââââââ¬âââââââââââ
â ææ¡£ â å½åç« è â ç®æ â 缺å°å¾è¡¨â ä¼å
级 â
âââââââââââââââââââ¼âââââââââââ¼âââââââââ¼ââââââââââ¼âââââââââââ¤
â modules/core.md â 6 â 16 â æ¯ â ð´ é« â
â modules/api.md â 8 â 16 â æ¯ â ð´ é« â
â modules/utils.mdâ 10 â 16 â å¦ â ð¡ ä¸ â
â architecture.md â 5 â 12 â æ¯ â ð´ é« â
âââââââââââââââââââ´âââââââââââ´âââââââââ´ââââââââââ´âââââââââââ
ð è¾å
¥ "确认å级" å¼å§ï¼æ "è·³è¿ <ææ¡£>" æé¤ç¹å®ææ¡£
Step 3: ä¿çä¸åå¹¶
å级æ¶ä¿çï¼
- ç¨æ·æå¨æ·»å çå
容ï¼éè¿
<!-- user-content -->æ è®°ï¼ - èªå®ä¹é ç½®
- åå²çæ¬å¤ä»½å°
cache/backup/
Step 4: æ¸è¿å¼å级æ§è¡
ð æ£å¨å级 modules/core.md (1/8)
å级å
容:
â
æ©å±æ¨¡åæ¦è¿° (2å¥ â 3段)
â
æ·»å æ¶æä½ç½®å¾
â
æ·»å æ ¸å¿å·¥ä½æµå¾
â
æ©å± API ææ¡£ (æ·»å 3个示ä¾)
â
æ·»å æä½³å®è·µç« è
â
æ·»å 设计å³çç« è
â
æ·»å ä¾èµå
³ç³»å¾
â
æ·»å ç¸å
³ææ¡£é¾æ¥
ç« èæ°: 6 â 16 â
å¾è¡¨æ°: 0 â 3 â
é ç½®é项
# .mini-wiki/config.yaml
upgrade:
auto_detect: true # èªå¨æ£æµéè¦åçº§çææ¡£
backup_before_upgrade: true # å级åå¤ä»½
preserve_user_content: true # ä¿çç¨æ·èªå®ä¹å
容
user_content_marker: "<!-- user-content -->"
upgrade_strategy: progressive # all / progressive / selective
min_quality: professional # æä½è´¨éè¦æ±
ç¨æ·å½ä»¤
| å½ä»¤ | 说æ |
|---|---|
æ£æ¥ wiki è´¨é / check wiki quality |
çæè´¨éè¯ä¼°æ¥å |
å级 wiki / upgrade wiki |
æ¸è¿å¼å级ä½è´¨éææ¡£ |
å·æ°å
¨é¨ wiki / refresh all wiki |
éæ°çæææææ¡£ |
å级 <模å> ææ¡£ / upgrade <module> docs |
å级ç¹å®æ¨¡å |
ç»§ç»å级 / continue upgrade |
ç»§ç»æªå®æçå级 |
Plugin System
å®å ¨æ¨¡åï¼æä»¶ä» æä¾ææ¬æä»¤ï¼ç¨äºå½±ååæä¸åä½çç¥ï¼ä¸æ§è¡ä»»ä½æä»¶ä»£ç /èæ¬ã
Plugin Commands
| Command | Usage |
|---|---|
list plugins |
Show installed plugins |
install plugin <path/url> |
Install from path or URL |
update plugin <name> |
Update plugin to latest version |
enable plugin <name> |
Enable plugin |
disable plugin <name> |
Disable plugin |
uninstall plugin <name> |
Remove plugin |
Installation Sources:
- Local:
/path/to/plugin - GitHub:
owner/repo(e.g.,trsoliu/mini-wiki-extras) - Skills.sh: Any compatible skill repo
- URL:
https://example.com/plugin.zip
Note: Generic skills (SKILL.md) will be automatically wrapped as plugins. These are still instruction-only and are not executed as code.
Plugin Script
python scripts/plugin_manager.py list
python scripts/plugin_manager.py install owner/repo
python scripts/plugin_manager.py install ./my-plugin
Manual only: CLI commands are for humans. The agent must not run plugin scripts or external commands.
Creating Plugins
See references/plugin-template.md for plugin format.
Plugins support hooks:
on_init– Initialization guidanceafter_analyze– Add analysis guidancebefore_generate– Modify prompts/generation guidanceafter_generate– Post-process guidanceon_export– Export guidance
Scripts Reference
| Script | Usage |
|---|---|
scripts/init_wiki.py <path> |
Initialize .mini-wiki directory |
scripts/analyze_project.py <path> |
Analyze project structure |
scripts/detect_changes.py <path> |
Detect file changes |
scripts/generate_diagram.py <wiki-dir> |
Generate Mermaid diagrams |
scripts/extract_docs.py <file> |
Extract code comments |
scripts/generate_toc.py <wiki-dir> |
Generate table of contents |
scripts/plugin_manager.py <cmd> |
Manage plugins (install/list/etc) |
scripts/check_quality.py <wiki-dir> |
Check doc quality against v3.0.2 standards |
Quality Check Script
# åºæ¬æ£æ¥
python scripts/check_quality.py /path/to/.mini-wiki
# è¯¦ç»æ¥å
python scripts/check_quality.py /path/to/.mini-wiki --verbose
# å¯¼åº JSON æ¥å
python scripts/check_quality.py /path/to/.mini-wiki --json report.json
æ£æ¥é¡¹ç®:
- è¡æ° (â¥200)
- ç« èæ° (â¥9)
- å¾è¡¨æ° (â¥2-3)
- classDiagram ç±»å¾
- 代ç ç¤ºä¾ (â¥3)
- æºç 追溯 (Section sources)
- å¿ éç« è (æä½³å®è·µãæ§è½ä¼åãé误å¤ç)
è´¨éç级:
| ç级 | 说æ |
|---|---|
| ð¢ Professional | å®å ¨ç¬¦å v3.0.2 æ å |
| ð¡ Standard | åºæ¬åæ ¼ï¼å¯ä¼å |
| ð´ Basic | éè¦å级 |
References
See references/ directory for detailed templates and prompts:
- prompts.md: AI prompt templates for professional-grade content generation
- éç¨è´¨éæ å (Universal quality standards)
- ä»£ç æ·±åº¦åæ (Deep code analysis)
- æ¨¡åææ¡£ (Module documentation – 16 sections)
- æ¶æææ¡£ (Architecture documentation)
- API ææ¡£ (API reference)
- é¦é¡µ (Homepage)
- å ³ç³»å¾è°± (Document relationship map)
- templates.md: Wiki page templates with Mermaid diagrams
- é¦é¡µæ¨¡æ¿ (Homepage template)
- æ¶æææ¡£æ¨¡æ¿ (Architecture template)
- æ¨¡åææ¡£æ¨¡æ¿ (Module template – comprehensive)
- API åèæ¨¡æ¿ (API reference template)
- å¿«éå¼å§æ¨¡æ¿ (Getting started template)
- ææ¡£ç´¢å¼æ¨¡æ¿ (Doc map template)
- é ç½®æ¨¡æ¿ (Config template)
- plugin-template.md: Plugin format
Configuration
.mini-wiki/config.yaml format:
generation:
language: zh # zh / en / both
detail_level: detailed # minimal / standard / detailed
include_diagrams: true # Generate Mermaid diagrams
include_examples: true # Include code examples
link_to_source: true # Link to source files
min_sections: 10 # Minimum sections per module doc
diagrams:
architecture_style: flowchart TB
dataflow_style: sequenceDiagram
use_colors: true # Color-code module types
linking:
auto_cross_links: true # Auto-generate cross references
generate_doc_map: true # Generate doc-map.md
generate_dependency_graph: true
exclude:
- node_modules
- dist
- "*.test.ts"