project-wiki

Original🇨🇳 Chinese
Translated
5 scriptsChecked / no sensitive code detected

Intelligent project knowledge base construction tool that automatically analyzes code to extract implicit knowledge, generates structured documents and architecture diagrams, and supports 13+ mainstream frameworks (React/Vue/Django/Spring Boot, etc.)

17installs
Added on

NPX Install

npx skill4agent add morning-start/coze-skills project-wiki

SKILL.md Content (Chinese)

View Translation Comparison →

Project Wiki - Project Knowledge Base Construction Tool

📋 Table of Contents


Core Values

Differences from Traditional Documentation
AspectTraditional DocumentationKnowledge Base Wiki
Update MethodManually maintained, prone to obsolescenceAutomatic incremental updates on code changes
Organization MethodLinear directoryKnowledge graph network
Knowledge TypeExplicit documentation (API/configuration)Explicit + implicit knowledge (design decisions/best practices)
Retrieval MethodFile tree browsingMulti-dimensional tag search + related recommendations
Core Capabilities
  • 🏗️ Architecture Parsing: Automatically identifies project structure, module division, and tech stack
  • 🧠 Implicit Knowledge Mining: Extracts design patterns, architecture decisions, and best practices from code
  • 🔗 Knowledge Graph Construction: Generates relationship networks of modules/APIs/concepts (Mermaid visualization)
  • 📚 Structured Document Generation: Automatically generates README, API documentation, and architecture documentation
Applicable Scenarios
  • New employee onboarding: Quickly understand project architecture and core modules
  • Code refactoring: Assess impact scope and identify technical debt
  • Knowledge inheritance: Externalize implicit knowledge from senior developers
  • Architecture review: Visually display system design

Quick Start

Minimal Usage (1 Minute)

bash
# 1. Analyze project
python3 scripts/analyze_project.py --path ./your-project

# 2. View results
cat project-analysis.json
Sample Output:
json
{
  "languages": ["Python", "JavaScript"],
  "frameworks": ["fastapi", "vue"],
  "project_structure": {...}
}

Complete Workflow (5 Minutes)

bash
# 1. Project analysis
python3 scripts/analyze_project.py --path ./your-project

# 2. Build knowledge graph
python3 scripts/knowledge_graph.py --path ./your-project --format mermaid

# 3. Extract implicit knowledge
python3 scripts/knowledge_extractor.py --path ./your-project --language python

# 4. View results
# - project-analysis.json: Project structure analysis
# - knowledge-graph.json: Knowledge graph data
# - knowledge-graph.mmd: Mermaid diagram
# - implicit-knowledge.json: Implicit knowledge extraction

Operation Steps

Step 1: Project Structure Analysis

Purpose: Identify programming languages, frameworks, build tools, and project structure
bash
python3 scripts/analyze_project.py --path ./your-project
Output File:
project-analysis.json
Key Fields
  • languages
    : List of programming languages (Python, JavaScript, Java, Go, Rust, etc.)
  • frameworks
    : List of frameworks (all lowercase, corresponding to framework guide anchors)
  • build_tools
    : Build tools (npm, pip, maven, gradle, cargo, etc.)
  • project_structure
    : Directory tree structure
Framework Identification Notes
  • Supports identification of 13+ mainstream frameworks (see Framework Support)
  • Identified based on feature keywords and file patterns, detectable even without explicit dependencies
  • Returned framework names can be directly used to access corresponding framework guides

Step 2: Access Framework Guides

Trigger Condition: Step 1 returns the
frameworks
field
Access Methods
Method 1: Direct Jump
# Example: frameworks: ["fastapi", "vue"]
→ View FastAPI and Vue sections in references/frameworks/index.md
→ Use anchor jumps: #fastapi, #vue
Method 2: Framework Selection Recommendations Select the most suitable framework guide based on
languages
and project characteristics:
  • Python Web → Django (enterprise-level)/Flask (lightweight)/FastAPI (asynchronous)
  • Frontend → React (rich ecosystem)/Vue (easy to learn)/Svelte (high performance)
  • Desktop Applications → Electron (mature)/Tauri (lightweight)

Step 3: Build Knowledge Graph

Purpose: Generate relationship networks of modules/APIs/configurations
bash
python3 scripts/knowledge_graph.py --path ./your-project --format mermaid
Output Files
  • knowledge-graph.json
    : Structured data (nodes and edges)
  • knowledge-graph.mmd
    : Mermaid flow chart (directly renderable)
Knowledge Graph Includes
  • Node types: Modules, APIs, Configurations, Databases, External Services
  • Relationship types: Contains, Depends on, Calls, Data Flow
  • Visualization: Directory structure diagram, module relationship diagram, API call diagram

Step 4: Extract Implicit Knowledge

Purpose: Mine design decisions, best practices, and code conventions from code
bash
python3 scripts/knowledge_extractor.py --path ./your-project --language python
Output File:
implicit-knowledge.json
Extracted Content
  • Design pattern recognition (Singleton, Factory, Observer, etc.)
  • Architecture decision records (why a certain solution was chosen)
  • Best practice extraction (naming conventions, comment styles)
  • Code convention summary (module division, interface design)

Step 5: Generate Documents (Agent-led)

Based on extracted data, the agent generates the following documents
Document TypeGeneration MethodOutput Format
READMEReference template + project dataMarkdown
API DocumentationAST parsing + comment extractionMarkdown + JSON
Architecture DocumentationKnowledge graph + architecture decisionsMarkdown + Mermaid
Knowledge Base HomepageKnowledge classification + timelineMarkdown
Agent Responsibilities
  • Generate framework-specific document structures based on framework guides
  • Convert implicit knowledge into readable natural language descriptions
  • Generate visual diagrams (architecture diagrams, sequence diagrams, flow charts)

Framework Support

Supported Frameworks (13)

⭐ Most Commonly Used Frameworks (Recommended for Priority Access):
  • React: Enterprise-level frontend, richest ecosystem
  • Vue: Progressive frontend, easy to learn
  • Django: Python full-stack, rapid development
  • Spring Boot: Java enterprise-level, Spring ecosystem
Desktop Applications (3):
  • Electron - Mature ecosystem, cross-platform
  • Tauri - Small size, high security
  • Wails - Developer-friendly, simple configuration
Frontend Frameworks (4):
  • React - Virtual DOM, large ecosystem
  • Vue - Reactive, progressive
  • Svelte - Compiled, high performance
  • SolidJS - Fine-grained reactivity
Web API Frameworks (5):
  • Django - Python full-stack, ORM
  • Flask - Python lightweight
  • FastAPI - Python modern asynchronous
  • Spring Boot - Java enterprise-level
  • Gin - Go high performance
Cross-platform UI Frameworks (1):
  • Flutter - Dart, multi-platform
Complete Index: references/frameworks/index.md
Framework Selection Guide: Directly access the corresponding guide using the framework name returned in
project-analysis.json
.

Resource Index

Core Scripts

ScriptPurposeParametersOutput
analyze_project.pyProject structure analysis
--path
Project path
project-analysis.json
knowledge_graph.pyKnowledge graph construction
--path
Project path<br>
--format
Output format
knowledge-graph.json
<br>
knowledge-graph.mmd
knowledge_extractor.pyImplicit knowledge extraction
--path
Project path<br>
--language
Programming language
implicit-knowledge.json
extract_docs.pyDocumentation and API extraction
--path
Project path<br>
--language
Programming language
docs-metadata.json
analyze_dependencies.pyDependency relationship analysis
--path
Project path<br>
--format
Output format
Dependency graph (JSON/Mermaid)

Reference Documents

DocumentPurposeWhen to Read
frameworks/index.mdFramework Guide Index (Most Important)After detecting frameworks
knowledge-base-guide.mdKnowledge base construction guideWhen building a knowledge base
knowledge-structure.mdKnowledge structure organizationWhen designing knowledge classification
readme-template.mdREADME generation templateWhen generating project README
api-doc-guide.mdAPI documentation generation specificationWhen generating API documentation
architecture-guide.mdArchitecture documentation generation guideWhen generating architecture documentation
mermaid-syntax.mdMermaid diagram syntaxWhen generating visual diagrams

FAQs

Q1: How to quickly locate framework guides?

A: After executing Step 1, check the
frameworks
field in
project-analysis.json
, for example:
json
{
  "frameworks": ["fastapi", "vue"]
}
Then search for
#fastapi
and
#vue
in
references/frameworks/index.md
to jump to the corresponding sections.

Q2: Which programming languages are supported?

A: Currently supported languages:
  • Python, JavaScript, Java, Go, Rust
  • C/C++, Ruby, PHP, Dart

Q3: Is framework detection accurate?

A: Identified based on multi-dimensional features:
  1. Dependency package detection (package.json, requirements.txt, etc.)
  2. File pattern detection (*.vue, *.jsx, manage.py, etc.)
  3. Directory structure detection (src-tauri/, android/, etc.)
  4. Code pattern detection (@app.route, @SpringBootApplication, etc.)
It can infer frameworks through file and code features even without explicit dependencies.

Q4: How to visualize the knowledge graph?

A: Two methods:
Method 1: Directly Render Mermaid
bash
# Generate Mermaid file
python3 scripts/knowledge_graph.py --path ./your-project --format mermaid

# Open knowledge-graph.mmd with a Markdown editor that supports Mermaid (e.g., Typora, GitHub)
Method 2: Online Rendering

Q5: How to incrementally update the knowledge base?

A: Re-execute the affected steps:
  • Code changes → Re-run
    analyze_project.py
  • Architecture adjustments → Re-run
    knowledge_graph.py
  • Requirements updates → Re-run
    knowledge_extractor.py
It is recommended to integrate the above scripts into the CI/CD pipeline.

Q6: What is the principle of implicit knowledge extraction?

A: Implicit knowledge is mined through the following methods:
  • Comment Analysis: Extract design rationales and trade-off explanations
  • Code Patterns: Identify design patterns (Singleton, Factory, etc.)
  • Naming Conventions: Analyze the design intent of class names and function names
  • Dependency Relationships: Infer architecture decisions through module dependencies
The agent converts this structured data into natural language descriptions.

Q7: Can the format of generated documents be customized?

A: Yes. Refer to the template files in the
references/
directory:
  • readme-template.md - README template
  • api-doc-guide.md - API documentation format
  • architecture-guide.md - Architecture documentation format
The agent generates documents based on the templates, and you can modify the templates to customize the format.