Loading...
Loading...
Automatically detect story settings (genre, era, theme) based on keywords and activate corresponding knowledge bases - works silently in the background to provide relevant writing guidance without user intervention
npx skill4agent add wordflowlab/novelweave setting-detector触发词:言情、爱情、恋爱、浪漫、感情线、关系弧、CP、甜文、虐文、
HE、BE、双洁、破镜重圆、先婚后爱、契约关系
激活:templates/knowledge-base/genres/romance.md触发词:悬疑、推理、侦探、破案、谜团、线索、真相、凶手、犯罪、
密室、诡计、不在场证明、推理小说
激活:templates/knowledge-base/genres/mystery.md触发词:历史、古代、朝代、考据、时代背景、历史小说、古言、
穿越、重生古代、架空历史、宫斗、宅斗
激活:templates/knowledge-base/genres/historical.md触发词:复仇、报仇、打脸、爽文、逆袭、反击、重生复仇、
穿越复仇、系统、金手指、女主爽文、男主爽文
激活:templates/knowledge-base/genres/revenge.md触发词:武侠、江湖、武功、侠客、门派、武学、剑客、
轻功、内功、武林、江湖恩仇、侠义
激活:templates/knowledge-base/genres/wuxia.md触发词:1920、民国、军阀、北洋、穿越民国、二十年代、
民国时期、军阀混战
激活:templates/knowledge-base/references/china-1920s/User: "I want to write a romance novel"
↓
[Detected keyword: "romance"]
↓
✓ Automatically loaded: romance.md
↓
AI Response: "Great! Let me help you create your romance novel.
According to romance genre conventions, we need to clarify several core elements...
(Automatically applying knowledge from romance.md)"User: "I want to write a romance revenge novel set in the 1920s"
↓
[Detected keywords: "1920", "romance", "revenge"]
↓
✓ Automatically loaded: romance.md
✓ Automatically loaded: revenge.md
✓ Automatically loaded: references/china-1920s/
↓
📚 Activated Knowledge Bases:
- genres/romance.md (Romance novel conventions)
- genres/revenge.md (Revenge novel techniques)
- references/china-1920s/ (1920s China background)
↓
AI Response: "Great combination! This is romantic suspense + revenge + Republican-era background.
Based on the fusion of these three genres, it is recommended that...
(Content from all three knowledge bases is applied simultaneously)"/constitution phase:
→ Activated: romance.md
→ Reminder: Romance novels require HEA/HFN ending commitment
/specify phase:
→ Activated: romance.md + revenge.md
→ Suggestion: Define relationship arc + revenge goals
/plan phase:
→ Activated: All knowledge bases
→ Application: Emotional rhythm points + "face-slapping" rhythm + 1920s details
/write phase:
→ Activated: All knowledge bases
→ Real-time: Dialogue skills + scene description + era atmosphere
/analyze phase:
→ Activated: All knowledge bases
→ Check: Romance conventions + revenge rationality + historical accuracy50 independent Skills × 40 lines per SKILL.md = 2000 tokens
All Skills are loaded in every conversation1 detector Skill (this file): ~100 tokens
Load knowledge bases on demand:
- romance.md: ~520 tokens
- revenge.md: ~480 tokens
- references/china-1920s/: ~650 tokens
Total: 100 + 520 + 480 + 650 = ~1750 tokens
(Only relevant knowledge bases are loaded)"What knowledge bases are currently activated?"📚 Currently activated knowledge bases:
✓ genres/romance.md - Romance novel creation conventions
✓ genres/revenge.md - Revenge novel "face-slapping" techniques
✓ references/china-1920s/ - 1920s China reference materials
Token consumption: approximately 1650 tokens"Please load the romance and mystery knowledge bases"
"This story requires 1920s China reference materials"
"Activate the wuxia knowledge base""Deactivate the revenge knowledge base, this story does not involve revenge"/constitution【Automatically inserted into constitution】
## Genre-Specific Principles (automatically added by setting-detector)
### Core Principles of Romance Novels
1. Relationship arc is the main plot
2. HEA/HFN ending is mandatory
3. Chemistry must be authentic and credible
### Core Principles of Revenge Novels
1. Hatred must be deep and specific
2. "Face-slapping" rhythm should be progressive
3. Moral balance: Evil must be punished/specify【Automatic Prompt】
💡 Based on activated knowledge bases, it is recommended to define the following in specifications:
【From romance.md】
- Relationship arc setting
- Emotional rhythm point planning
- HEA/HFN ending type
【From revenge.md】
- Source of hatred (specific crime)
- "Golden finger" setting
- "Face-slapping" rhythm planning
【From china-1920s】
- Specific year (1920-1929)
- Geographic location (Beijing/Shanghai/other)
- Social class setting/plan【Automatically Applied】
## Chapter Plan (integrating 3 knowledge bases)
Chapters 1-5: Encounter and establishment of hatred
- [romance] Initial meeting scene (meet-cute)
- [revenge] Display deep hatred from past life/past
- [1920s] Create Republican-era atmosphere
Chapters 6-10: Relationship warming and minor "face-slapping"
- [romance] Ambiguous period: physical contact, emotional accumulation
- [revenge] First "face-slapping": enemy's surprise
- [1920s] Display of clothing, etiquette, social rules
.../write【Automatic Reminder Before Writing】
📋 Knowledge bases applied in this chapter:
✓ romance.md - Dialogue spark techniques
→ Flirtation dialogue: challenge rather than compliance
→ Body language: eye contact, touch, distance
✓ revenge.md - "Face-slapping" scene satisfaction
→ Expectation → Reversal → Amazement → Dominance
✓ 1920s - Era details
→ Addresses: Sir, Master, Miss
→ Scenes: Teahouse, foreign firm, concession/analyze【Automatic Analysis】
## Genre Compliance Analysis
### Romance Novel Check (based on romance.md)
- [x] Relationship arc is the main plot
- [x] Contains necessary emotional rhythm points
- [ ] ⚠️ Missing first kiss scene (suggested in Chapter 15)
- [x] HEA ending commitment is clear
### Revenge Novel Check (based on revenge.md)
- [x] Hatred is deep and specific
- [x] "Face-slapping" frequency is reasonable (once every 5 chapters)
- [x] Protagonist's strength improvement is reasonable
### Historical Accuracy Check (based on 1920s)
- [x] Era background is correct
- [ ] ⚠️ "Mobile phone" appears in Chapter 8 (inconsistent with era)
- [x] Address system is correct| Category | Completed | Planned |
|---|---|---|
| Genre Knowledge | 5 | 10+ |
| Reference Materials | 1 | 20+ |
templates/knowledge-base/templates/knowledge-base/README.md# 1. Create file
touch templates/knowledge-base/genres/fantasy.md
# 2. Update keyword mapping in README.md
fantasy:
keywords: [奇幻, 魔法, 世界构建, 魔法系统]
auto_load: genres/fantasy.md
# 3. Done! Next time the user says "fantasy", it will be activated automatically"I want to write a revenge story set in the Republican era after time travel"
↓
Recognition: "Republican era" → 1920s China
"revenge" → revenge
"The female protagonist wants to take revenge after rebirth"
↓
Recognition: "rebirth" + "take revenge" → revenge (rebirth revenge)1st message: "I want to write a novel"
→ No knowledge bases activated (waiting for more information)
2nd message: "The protagonist is a detective"
→ Activate mystery.md
3rd message: "There's also a romantic subplot"
→ Additionally activate romance.md
→ Currently activated: mystery + romance (romantic suspense)User: "This is a wuxia novel, set in the jianghu, with martial arts"
↓
3 wuxia keywords detected, but wuxia.md is only activated once"This is not a romance novel, please deactivate the romance knowledge base"
"This is a sci-fi novel, please activate the sci-fi knowledge base" (if available)Recommended:
User: "I want to write a romance revenge novel set in the Republican era"
Not recommended:
User: "I want to write a novel"
AI: "Okay"
User: "The protagonist's surname is Li"
AI: "Got it"
(It takes 20 rounds of dialogue to mention the genre)"Are the currently activated knowledge bases still suitable?"✓ Good combinations:
- romance + mystery (romantic suspense)
- historical + romance (ancient romance)
- revenge + romance (revenge + romance)
⚠️ Difficult combinations:
- horror + romance (horror romance? Readers may not adapt)
- mystery + wuxia (detective wuxia, requires special design)
It's not impossible, but you need to be extra careful with the integration method."1920s" → china-1920s
"Ancient times" → Specify the specific dynasty (e.g., "Tang Dynasty", "Ming Dynasty")1. User input → Extract keywords
2. Keywords → Map to knowledge bases (based on README.md)
3. Deduplication → Avoid repeated activation
4. Loading → Read corresponding .md files
5. Application → Continuously apply knowledge in subsequent conversationsActivation status check: At the start of each conversation
Knowledge base content: Loaded on demand, cached in conversation context
Update strategy: Re-read only when explicitly requiredsetting-detector → Decides which knowledge to load
consistency-checker → Checks consistency based on activated knowledge bases
workflow-guide → Provides specific process guidance based on genre
genre-specific skills → Provides in-depth genre-specific techniques