Workflow for Business Knowledge Acquisition and Skill Document Creation
This Skill describes the complete workflow for acquiring business knowledge from external documents (such as iWiki), verifying with code analysis, and ultimately institutionalizing it into high-quality Skill documents.
Trigger Conditions
Use this when you need to:
- Familiarize yourself with a new business module or subsystem
- Acquire business knowledge from iWiki or other document systems
- Cross-verify document content with actual code
- Generate or restructure module architecture documents
- Institutionalize business knowledge into reusable Skills
Core Workflow
┌─────────────────────────────────────────────────────────────────┐
│ Business Knowledge Acquisition Workflow │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Phase 1: Document Acquisition Phase 2: Code Verification Phase 3: Knowledge Institutionalization │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ iWiki Search │───────▶│ Code Location │───────▶│ Document Restructuring │ │
│ │ Document Reading │ │ Cross-Verification │ │ Skill Creation │ │
│ │ Structure Extraction │ │ Detail Supplementation │ │ Quality Review │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Phase 1: Document Acquisition
1.1 Search with iWiki MCP Tool
Tool: iWiki.searchDocument
Parameters: query = "Module Name + Keywords"
Search Strategy:
| Scenario | Example Search Terms |
|---|
| Understand module architecture | Buildless Architecture Design
|
| Understand specific functions | Buildless Task Scheduling
|
| Understand data models | |
1.2 Retrieve Document Content
Tool: iWiki.getDocument
Parameters: docId = Document ID from search results
Key Extraction Items:
- Background and objectives
- Core concepts/terminology
- Architecture design diagrams
- Process descriptions
- Data models
- Configuration instructions
1.3 Build Knowledge Framework
Extract and organize from documents:
markdown
## Initial Knowledge Framework
### Core Concepts
- Concept A: xxx
- Concept B: xxx
### Architecture Key Points
- Component relationships
- Data flow
### Pending Verification Questions
- [ ] Is this implemented this way in the code?
- [ ] Are there any missing details?
Phase 2: Code Verification
2.1 Locate Core Code
Locate code based on class names, method names, and configuration items from documents:
Tools: search_content / search_file
Strategy:
1. Search core class names → Find entry points
2. Search key methods → Understand processes
3. Search configuration items → Confirm parameters
Example Search Sequence:
bash
# 1. Find core service class
search_content: "class BuildLessStartDispatcher"
# 2. Find core method
search_content: "fun canDispatch"
# 3. Find configuration items
search_content: "dispatch.buildless"
2.2 Cross-Verification
Compare document descriptions with actual code implementations:
| Document Description | Code Verification | Result |
|---|
| Redis Key format | Check actual Key definitions | ✅ Consistent / ⚠️ Has discrepancies |
| Process steps | Check method call chains | ✅ Consistent / ⚠️ Has discrepancies |
| Data models | Check entity class definitions | ✅ Consistent / ⚠️ Has discrepancies |
2.3 Supplement Code Details
Content usually missing from documents:
- Exception handling logic
- Boundary condition judgments
- Performance optimization details
- Dependency injection relationships
- Default configuration values
Supplementation Method:
kotlin
// Extract key logic from code
data class CodeInsight(
val className: String,
val keyMethod: String,
val businessLogic: String,
val edgeCases: List<String>
)
Phase 3: Knowledge Institutionalization
3.1 Document Restructuring Principles
Simplification Principles:
| Principle | Description |
|---|
| Deduplication | Keep only one instance of identical content |
| Aggregation | Merge scattered related content |
| Layering | Overview → Details → Code |
| Tabulation | Convert list content to tables |
Structure Template:
markdown
# Module Name
## Overview
One-sentence description + Core features table
## Architecture Design
Diagram + Component table
## Core Processes
Flowchart + Phase description table
## Data Models
ER diagram + Field table
## Configuration Reference
Configuration item table
## Code Index
File path table
3.2 Restructuring Checklist
3.3 Generate Skill Documents
Create according to
specifications:
yaml
---
name: module-name-architecture
description: Module description. Use this when you need to understand xxx, develop xxx features, etc.
---
Quick Reference for Tool Usage
iWiki MCP Tools
| Tool | Purpose | Common Parameters |
|---|
| Search documents | |
| Retrieve content | |
| Retrieve directory | , |
| Retrieve metadata | |
Code Analysis Tools
| Tool | Purpose | Example |
|---|
| Search code content | Class names, method names, strings |
| Search file names | , |
| Read files | View complete implementations |
| List directories | Understand module structure |
Practical Case: Buildless Module
Step 1: Retrieve iWiki Documents
1. searchDocument("Buildless Compile-Free Build Machine")
2. getDocument(docId) → Retrieve over 2000 lines of original documents
3. Extract core concepts: Container Pool, Task Queue, DeferredResult
Step 2: Code Cross-Verification
1. search_content("BuildLessStartDispatcher") → Entry class
2. search_content("BuildLessTaskResource") → API definition
3. search_content("dispatch.buildless") → Configuration items
4. read_file to verify document descriptions one by one
Step 3: Document Restructuring
Original document: ~2100 lines, with the following issues:
- Redis Key description duplicated 3 times
- Task process described repeatedly
- Code snippets scattered
Restructured version: ~500 lines, with improvements:
- Merged duplicate content
- Unified process descriptions
- Tabulated configurations and indexes
Quality Standards
Document Quality Metrics
| Metric | Standard |
|---|
| Simplification Rate | ≥ 50% (compared to original document) |
| Duplicate Content | 0 instances |
| Number of Flowcharts | ≤ 3 core diagrams |
| Code Examples | Only keep key logic |
| Table Proportion | ≥ 30% |
Skill Verification Checklist
Frequently Asked Questions
Q1: What if documents and code are inconsistent?
Prioritize code, and mark discrepancies in the document:
markdown
> ⚠️ **Note**: The iWiki document describes xxx, but the actual code implementation is yyy
Q2: How to handle overly long documents?
Adopt a layered strategy:
- Place core content (overview, processes, configurations) in SKILL.md
- Place detailed content (complete data models, all configuration items) in the reference/ directory
Q3: How to decide which content to keep?
Retention Criteria:
- Concepts necessary for understanding the module
- Information needed during development
- Clues required for troubleshooting
Removal Criteria:
- Repeated content
- Overly detailed implementations
- Outdated descriptions
Output Deliverables
After completing this workflow, you will produce:
- Architecture Skill Document: Core knowledge institutionalization for the module
- Reference Supplementary Documents (optional): Detailed reference information
- Code Index: List of key file paths
Related Skills
- : Skill writing specifications
00-bkci-global-architecture
: Global architecture overview
- Module architecture Skills (Series 29-xx): References for specific modules