整理笔记

This commit is contained in:
2026-09-03 07:19:12 +08:00
parent 35f5436829
commit c9e5fa2b99
14 changed files with 1933 additions and 2250 deletions

View File

@@ -1,48 +0,0 @@
# Blogwatcher Daily — 分类: AI技术 — 2026-09-01
共 **15** 篇文章。
---
## 【AI (artificial intelligence) | The Guardian】
- [‘Superhuman’ AI tool spots heart disease in less than 2 seconds](https://www.theguardian.com/technology/2026/aug/31/superhuman-ai-tool-spots-heart-disease)
> Technology trained on millions of routine ECGs could fast-track high-risk patients for treatmentDoctors have developed a “superhuman” AI tool that can spot heart disease in less than two seconds.The g
- [From Bill Gates to Bernie Sanders, most agree the AI arms race is disastrous. Only Europe can make it stop](https://www.theguardian.com/commentisfree/2026/sep/01/from-bill-gates-to-bernie-sanders-most-agree-the-ai-arms-race-is-disastrous-only-europe-can-make-it-stop)
> An EU export ban on Dutch tech giant ASML’s machines could force the pause we all needAt this point, it should be clear that AI is a choose-your-own-adventure book where every option ends in disaster.
- [‘If you build something vastly smarter than you, it better be on your side’: can we stop AI from deceiving us?](https://www.theguardian.com/news/2026/sep/01/if-you-build-something-vastly-smarter-than-you-it-better-be-on-your-side-can-we-stop-ai-from-deceiving-us)
> We are used to the idea that our fellow humans might intentionally mislead or manipulate us, but the idea that machines can now do the same is deeply unsettling. Researchers are racing to find solutio
- [Trump attacks datacenter backlash, claiming communities pushing back risk becoming ‘backwards and poor’](https://www.theguardian.com/us-news/2026/aug/31/trump-datacenter-comments)
> Three-quarters of Americans said in a recent poll that they oppose datacenters being built next to their homesDonald Trump has criticized communities pushing back against datacenter projects across th
- [How to tackle the climate impact of datacentres | Letters](https://www.theguardian.com/uk-news/2026/aug/31/how-to-tackle-the-climate-impact-of-datacentres)
> Datacentres should generate their own power and control their emissions, writes Richard Lamming, while Michael McClelland says we should reduce our digital communication. Plus a letter from Malcolm Fr
- [‘Scary’: how misinformation and AI hallucinations are infiltrating Australia’s parliament](https://www.theguardian.com/australia-news/2026/sep/01/how-misinformation-ai-hallucinations-infiltrating-australian-parliament)
> Exclusive: Guardian analysis reveals that dozens of policy submissions from across the political spectrum incorrectly summarise real research and invent or wrongly cite sourcesFollow our Australia new
- [Anthropic sued over alleged theft of ‘tens of thousands’ of songs](https://www.theguardian.com/business/2026/aug/31/aanthropic-sued-alleged-theft-songs-ai-train-claude)
> AI company faces multibillion dollar lawsuit over misuse of copyrighted songs to train Claude modelsAll AI wants for Christmas is a vast back catalogue of songs without paying for it, according to a m
- [AI is hurting US politics. Here’s how candidates could use it for good | Bruce Schneier and Nathan E Sanders](https://www.theguardian.com/commentisfree/2026/aug/31/ai-politics-voters)
> The technology can help candidates listen more deeply to voters, as examples from Japan and Scotland showThere are plenty of signs that AI will make all of our experiences of the US midterm elections
- [AI could cause global economic downturn, Bank of England governor tells G20](https://www.theguardian.com/business/2026/aug/31/advanced-frontier-ai-financial-stability-andrew-bailey-g20)
> Andrew Bailey, in role as financial stability watchdog chief, warns advanced models risk destabilising systemThe Bank of England’s governor, Andrew Bailey, has joined the throng of figures warning abo
- [OnlyFans and AI training: why gen Z doesn’t care where our money comes from | Alice Lassman](https://www.theguardian.com/commentisfree/2026/aug/31/gen-z-stability-homeownership-onlyfans-ai)
> With traditional goals such as stability and home ownership feeling out of reach, young people are focused on the presentBy now, we all know the shape of financial nihilism: the throw-your-money-at-an
## 【AI懶人報 - YouTube】
- [EP398 - Zeabur資安大事件,使用者該如何保護自己,防範未然?AI時代的自保指南!](https://www.youtube.com/watch?v=n5wzZVX84KY)
> 🚀 特別感謝贊助本集節目由 VoAI 絕好聲創 提供技術支援。🎤 VoAI 提供最有「台灣味」的 AI 聲音,支援情感語音、台式口音,甚至能一鍵生成虛擬人!🎁 AI懶人報聽眾專屬優惠:👉 輸入優惠碼 AILRB26 立享 95 折!立刻體驗:https://www.voai.ai/━━━━━━━━━━━━━━━━━━━━⏱ 章節00:00 有人打開信箱,看到一筆不是他花的帳單01:04 第一段|這
- [EP397 - 依賴 AI 記憶是在埋地雷?Claude Memory 2.0 深度解析,別讓錯誤的自動化毀了你的開發專案!](https://www.youtube.com/watch?v=XWv2_wqzaFc)
> 🚀 特別感謝贊助本集節目由 VoAI 絕好聲創 提供技術支援。🎤 VoAI 提供最有「台灣味」的 AI 聲音,支援情感語音、台式口音,甚至能一鍵生成虛擬人!🎁 AI懶人報聽眾專屬優惠:👉 輸入優惠碼 AILRB26 立享 95 折!立刻體驗:https://www.voai.ai/Claude 的記憶功能升級了!這次我們不只聊它怎麼變聰明,還要提醒大家,在寫程式時過度依賴 AI 記憶,反而可能害你
## 【灵姐说AI | Ling Talk AI - YouTube】
- [5000万美元爱情大瓜该不该给?我追问4个AI,答案越问越不一样](https://www.youtube.com/watch?v=d_xSz16Mtbw)
> 假如你有88亿美元,毕生挚爱问你要5000万美元,你给不给?我把这道爱情考题交给Claude、ChatGPT、Gemini和豆包。首问,四家都说给;继续加条件,回答开始分岔。从“孙哥和甜姐”的话题出发,这期把争议抽离成假设题,聊的是AI如何理解爱情、金钱与关系边界,不验证或裁定真人私生活。这一期一起看:• 刚交往三个月、不给就分手,AI会怎样回应?• 同样一笔钱,被理解成交易还是家庭保障,会有什么
## 【Tech With Tim - YouTube】
- [Local AI Explained: How to Run AI Models on Your Computer](https://www.youtube.com/watch?v=edIHPoWgIKU)
> Use the MindsHub Cowork agentic harness for free (open-source): https://mindshub.ai?utm_medium=influencers&utm_source=youtube&utm_campaign=26q3-tech-with-tim&utm_content=integration-2Everyone's talkin
- [Building AI Agents in Pure Python - Beginner Course](https://www.youtube.com/watch?v=c9AnqCeyxbI)
> 🔹Download the free guide from HubSpot on Your 2026 Guide toAI Agents: https://clickhubspot.com/70c662🔹Code in this video (available inside Skool): https://www.skool.com/ai-agent-builders/classroom/faf

View File

@@ -1,169 +1,169 @@
# Chrome DevTools MCP - Infographic Prompts
Generated: 2026-04-20
Layout: circular-flow
Style: chalkboard
Aspect: 16:9
---
## Part 1: System Prompt
```
Create a professional infographic with the following specifications:
## Image Specifications
- Type: Infographic
- Layout: circular-flow (cyclic process showing continuous steps arranged in a circle)
- Style: chalkboard (chalk on black board aesthetic)
- Aspect Ratio: 16:9
- Language: English
## Core Principles
- Follow the circular-flow layout structure: arrange information nodes in a circle with directional arrows
- Each section represents a tool category as a node on the circle
- Use chalk-drawn style: imperfect hand-drawn lines, chalk dust effects, white/yellow/pink/blue chalk colors
- Black chalkboard background (#1A1A1A)
- Center can hold the main concept "Chrome DevTools MCP"
- Maintain authentic chalk texture on all elements
- Use circular arrangement to show the tool workflow cycle
- Clear visual hierarchy with color variety
## Text Requirements
- Main titles prominent and readable in chalk white
- Key concepts emphasized with chalk yellow/pink
- Labels clear and appropriately sized
```
---
## Part 2: Style Locking Prompt
```
## Style Guidelines - chalkboard
### Background
- Color: Chalkboard Black (#1A1A1A) or Dark Green-Black (#1C2B1C)
- Texture: Realistic chalkboard texture with subtle scratches, dust particles
### Typography
- Hand-drawn chalk lettering with visible chalk texture
- White or bright colored chalk for emphasis
### Color Palette
- Background: #1A1A1A (Chalkboard Black)
- Primary Text: #F5F5F5 (Chalk White)
- Accent 1: #FFE566 (Chalk Yellow) - highlights, emphasis
- Accent 2: #FF9999 (Chalk Pink) - secondary highlights
- Accent 3: #66B3FF (Chalk Blue) - links, connections
- Accent 4: #90EE90 (Chalk Green) - success indicators
### Visual Elements
- Hand-drawn chalk illustrations with sketchy, imperfect lines
- Chalk dust effects around text and key elements
- Doodles: stars, arrows, underlines, circles
- Connection lines with hand-drawn feel
- Directional arrows showing cycle flow
### Do
- Maintain authentic chalk texture on all elements
- Use imperfect, hand-drawn quality
- Add subtle chalk dust and smudge effects
- Create visual hierarchy with color variety
- Include playful doodles and annotations
### Don't
- Use perfect geometric shapes
- Create clean digital-looking lines
- Add photorealistic elements
- Use gradients or glossy effects
```
---
## Part 3: Content Structure Prompt
```
## Content Structure - circular-flow
### Center Element
- "Chrome DevTools MCP" - main concept in center of circle
### Circle Nodes (6 categories, clockwise flow):
1. INPUT AUTOMATION (9 tools)
- click, drag, fill, fill_form, handle_dialog, hover, press_key, type_text, upload_file
- Chalk Pink icon/node
2. NAVIGATION AUTOMATION (6 tools)
- close_page, list_pages, navigate_page, new_page, select_page, wait_for
- Chalk Blue icon/node
3. EMULATION (2 tools)
- emulate, resize_page
- Chalk Yellow icon/node
4. PERFORMANCE (4 tools)
- performance_analyze_insight, performance_start_trace, performance_stop_trace, take_memory_snapshot
- Chalk Green icon/node
5. NETWORK (2 tools)
- get_network_request, list_network_requests
- Chalk Pink icon/node
6. DEBUGGING (6 tools)
- evaluate_script, get_console_message, lighthouse_audit, list_console_messages, take_screenshot, take_snapshot
- Chalk Blue icon/node
### Supported Clients (around the outer edge):
- Claude Code, Cline, Cursor, VS Code, Copilot, Codex, Gemini, JetBrains, Kiro, Windsurf, Amp, Antigravity, Command Code, Factory, Mistral, OpenCode, Qoder, Warp
### Configuration Options (bottom section):
- --headless, --slim, --autoConnect, --browser-url, --channel, --viewport, --isolated, --user-data-dir
### Arrows
- Curved directional arrows connecting each node in clockwise direction
- Showing continuous workflow cycle
### Labels in English
- All text labels in English
- Use chalk white for main text, chalk yellow for emphasis
```
---
## Visual Layout Diagram
```
[INPUT]
↓
↙ ↘
[DEBUGGING] ← CENTER → [NAVIGATION]
↗ ↣
↙ ↘
[NETWORK] ←─────────────────────→ [EMULATION]
↘ ↙
↗ ↣
[PERFORMANCE] →
↓
[???]
Actually circular flow (clockwise):
┌─────────────────────────────────────────┐
│ │
│ [EMULATION] → [PERFORMANCE] │
│ ↗ ↗ │
│ │ │ │
│ [DEBUGGING] [NAVIGATION] │
│ │ │ │
│ ↖ ↘ │
│ [NETWORK] ← [INPUT] │
│ │
│ Center: "Chrome DevTools MCP" │
└─────────────────────────────────────────┘
```
---
## Final Prompt Summary
# Chrome DevTools MCP - Infographic Prompts
Generated: 2026-04-20
Layout: circular-flow
Style: chalkboard
Aspect: 16:9
---
## Part 1: System Prompt
```
Create a professional infographic with the following specifications:
## Image Specifications
- Type: Infographic
- Layout: circular-flow (cyclic process showing continuous steps arranged in a circle)
- Style: chalkboard (chalk on black board aesthetic)
- Aspect Ratio: 16:9
- Language: English
## Core Principles
- Follow the circular-flow layout structure: arrange information nodes in a circle with directional arrows
- Each section represents a tool category as a node on the circle
- Use chalk-drawn style: imperfect hand-drawn lines, chalk dust effects, white/yellow/pink/blue chalk colors
- Black chalkboard background (#1A1A1A)
- Center can hold the main concept "Chrome DevTools MCP"
- Maintain authentic chalk texture on all elements
- Use circular arrangement to show the tool workflow cycle
- Clear visual hierarchy with color variety
## Text Requirements
- Main titles prominent and readable in chalk white
- Key concepts emphasized with chalk yellow/pink
- Labels clear and appropriately sized
```
---
## Part 2: Style Locking Prompt
```
## Style Guidelines - chalkboard
### Background
- Color: Chalkboard Black (#1A1A1A) or Dark Green-Black (#1C2B1C)
- Texture: Realistic chalkboard texture with subtle scratches, dust particles
### Typography
- Hand-drawn chalk lettering with visible chalk texture
- White or bright colored chalk for emphasis
### Color Palette
- Background: #1A1A1A (Chalkboard Black)
- Primary Text: #F5F5F5 (Chalk White)
- Accent 1: #FFE566 (Chalk Yellow) - highlights, emphasis
- Accent 2: #FF9999 (Chalk Pink) - secondary highlights
- Accent 3: #66B3FF (Chalk Blue) - links, connections
- Accent 4: #90EE90 (Chalk Green) - success indicators
### Visual Elements
- Hand-drawn chalk illustrations with sketchy, imperfect lines
- Chalk dust effects around text and key elements
- Doodles: stars, arrows, underlines, circles
- Connection lines with hand-drawn feel
- Directional arrows showing cycle flow
### Do
- Maintain authentic chalk texture on all elements
- Use imperfect, hand-drawn quality
- Add subtle chalk dust and smudge effects
- Create visual hierarchy with color variety
- Include playful doodles and annotations
### Don't
- Use perfect geometric shapes
- Create clean digital-looking lines
- Add photorealistic elements
- Use gradients or glossy effects
```
---
## Part 3: Content Structure Prompt
```
## Content Structure - circular-flow
### Center Element
- "Chrome DevTools MCP" - main concept in center of circle
### Circle Nodes (6 categories, clockwise flow):
1. INPUT AUTOMATION (9 tools)
- click, drag, fill, fill_form, handle_dialog, hover, press_key, type_text, upload_file
- Chalk Pink icon/node
2. NAVIGATION AUTOMATION (6 tools)
- close_page, list_pages, navigate_page, new_page, select_page, wait_for
- Chalk Blue icon/node
3. EMULATION (2 tools)
- emulate, resize_page
- Chalk Yellow icon/node
4. PERFORMANCE (4 tools)
- performance_analyze_insight, performance_start_trace, performance_stop_trace, take_memory_snapshot
- Chalk Green icon/node
5. NETWORK (2 tools)
- get_network_request, list_network_requests
- Chalk Pink icon/node
6. DEBUGGING (6 tools)
- evaluate_script, get_console_message, lighthouse_audit, list_console_messages, take_screenshot, take_snapshot
- Chalk Blue icon/node
### Supported Clients (around the outer edge):
- Claude Code, Cline, Cursor, VS Code, Copilot, Codex, Gemini, JetBrains, Kiro, Windsurf, Amp, Antigravity, Command Code, Factory, Mistral, OpenCode, Qoder, Warp
### Configuration Options (bottom section):
- --headless, --slim, --autoConnect, --browser-url, --channel, --viewport, --isolated, --user-data-dir
### Arrows
- Curved directional arrows connecting each node in clockwise direction
- Showing continuous workflow cycle
### Labels in English
- All text labels in English
- Use chalk white for main text, chalk yellow for emphasis
```
---
## Visual Layout Diagram
```
[INPUT]
↓
↙ ↘
[DEBUGGING] ← CENTER → [NAVIGATION]
↗ ↣
↙ ↘
[NETWORK] ←─────────────────────→ [EMULATION]
↘ ↙
↗ ↣
[PERFORMANCE] →
↓
[???]
Actually circular flow (clockwise):
┌─────────────────────────────────────────┐
│ │
│ [EMULATION] → [PERFORMANCE] │
│ ↗ ↗ │
│ │ │ │
│ [DEBUGGING] [NAVIGATION] │
│ │ │ │
│ ↖ ↘ │
│ [NETWORK] ← [INPUT] │
│ │
│ Center: "Chrome DevTools MCP" │
└─────────────────────────────────────────┘
```
---
## Final Prompt Summary
Generate a chalkboard-style infographic showing Chrome DevTools MCP tool categories arranged in a circular flow pattern. The circle has 6 nodes representing the tool categories (Input Automation, Navigation, Emulation, Performance, Network, Debugging). Each node displays the tool count and key tool names in chalk-style lettering. The center shows "Chrome DevTools MCP" as the main concept. Arrows show clockwise flow indicating the continuous nature of browser automation workflow. Use authentic chalkboard aesthetic with black background (#1A1A1A), chalk white text, and colorful chalk accents (yellow, pink, blue, green) for visual hierarchy. Include chalk dust effects and hand-drawn imperfect lines throughout.

View File

@@ -1,158 +1,158 @@
Create a professional infographic following these specifications:
## Image Specifications
- **Type**: Infographic
- **Layout**: circular-flow (Cyclic process showing continuous or recurring steps)
- **Style**: chalkboard (Black chalkboard background with colorful chalk drawing style)
- **Aspect Ratio**: 16:9
- **Language**: English
## Core Principles
- Follow the layout structure precisely for information architecture
- Apply style aesthetics consistently throughout
- If content involves sensitive or copyrighted figures, create stylistically similar alternatives
- Keep information concise, highlight keywords and core concepts
- Use ample whitespace for visual clarity
- Maintain clear visual hierarchy
## Text Requirements
- All text must match the specified style treatment
- Main titles should be prominent and readable
- Key concepts should be visually emphasized
- Labels should be clear and appropriately sized
- Use the specified language for all text content
## Layout Guidelines
- Circular arrangement
- Steps around the circle
- Arrows showing direction
- No clear start/end (continuous)
- Center can hold main concept
- Circle or ring shape
- Directional arrows
- Step nodes evenly spaced
- Icons per step
- Optional center element
## Style Guidelines
- **Background**: Chalkboard Black (#1A1A1A) or Dark Green-Black (#1C2B1C)
- **Texture**: Realistic chalkboard texture with subtle scratches, dust particles, and faint eraser marks
- **Typography**: Hand-drawn chalk lettering style with visible chalk texture. Imperfect baseline adds authenticity.
- **Color Palette**:
- Background: Chalkboard Black (#1A1A1A)
- Primary Text: Chalk White (#F5F5F5)
- Accent 1: Chalk Yellow (#FFE566)
- Accent 2: Chalk Pink (#FF9999)
- Accent 3: Chalk Blue (#66B3FF)
- Accent 4: Chalk Green (#90EE90)
- Accent 5: Chalk Orange (#FFB366)
- **Visual Elements**:
- Hand-drawn chalk illustrations with sketchy, imperfect lines
- Chalk dust effects around text and key elements
- Doodles: stars, arrows, underlines, circles, checkmarks
- Eraser smudges and chalk residue textures
- Wooden frame border optional
- Stick figures and simple icons
- Connection lines with hand-drawn feel
- **Style Rules**:
- Maintain authentic chalk texture on all elements
- Use imperfect, hand-drawn quality throughout
- Add subtle chalk dust and smudge effects
- Create visual hierarchy with color variety
- Include playful doodles and annotations
- DO NOT use perfect geometric shapes
- DO NOT create clean digital-looking lines
---
Generate the infographic based on the content below:
# llm-wiki-sync: Turning Scattered Notes into a Reusable Knowledge Base
## Overview
A cyclical pipeline showing how raw notes are continuously transformed through LLM-powered ingestion into structured wiki pages, then feedback into the knowledge base for reuse.
## The Knowledge Pipeline Cycle (Center Concept)
The llm-wiki-sync pipeline operates as a continuous cycle, not a linear process.
7 stages in the cycle: Raw Note → Ingest → Extract → Source Page → Graph/Site → Reuse → Feedback Loop
## Circular Flow Diagram with 7 Stages:
1. **Raw Note** (Stage 1)
- Original documents stored in raw/ folder
- Contains unprocessed information awaiting structure
- Icon: Stack of paper/note icon
2. **Ingest** (Stage 2)
- LLM analyzes and extracts structured information
- Hermes skill triggers Claude Code for ingestion
- Context check against wiki/index.md prevents duplicates
- Icon: Brain/processing icon
3. **Extract** (Stage 3)
- Six key elements extracted from each document:
- Summary (核心主题, 问题域, 方法/机制, 结论/价值)
- Key Claims (Verifiable assertions)
- Key Quotes (Preserved citations)
- Key Entities (LaunchDarkly, HP, etc.)
- Key Concepts (RTO, RPO, Feature Flag, etc.)
- Connections (depends_on, enables, provides)
- Icon: Six circles/callouts
4. **Source Page** (Stage 4)
- Written to wiki/sources/<slug>.md
- Contains frontmatter and standard sections
- Links use [[PageName]] format
- Icon: Document/page icon
5. **Graph & Site** (Stage 5)
- graph.json: Machine-readable graph structure
- graph.html: Interactive visualization
- Quartz: Static site generation
- Icon: Network/graph icon
6. **Reuse** (Stage 6)
- Query, Synthesize, Write, Connect
- Icon: Multiple arrows pointing outward
7. **Feedback Loop** (Stage 7)
- New insights become new raw notes
- Cycle continues indefinitely
- Icon: Circular arrow completing the cycle
## Key Quotes (to include as callouts):
- "RTO is about speed: how fast you get back online. RPO is about data: how much you can afford to lose."
- "Deploy != Release. Feature flags change this. You can deploy code to production without releasing it to users."
## Design Requirements:
- Circular flow with 7 stages evenly spaced around a circle
- Clockwise arrow direction
- Center contains: "llm-wiki-sync" as main concept
- Each stage is a node with icon + label
- Extraction outputs (6 items) shown as callouts or inner ring
- Dark chalkboard background with hand-drawn chalk accents
- Chalk colors for visual hierarchy
- Imperfect, sketchy lines throughout
- Publication-ready quality
- NO clutter - only essential elements
- Clear hierarchy: title > headlines > labels > descriptions
## Text Labels (in English):
- Headline: "The Knowledge Pipeline Cycle"
- Subhead: "How llm-wiki-sync transforms scattered notes into a reusable knowledge base"
- Stage labels: "Raw Note", "Ingest", "Extract", "Source Page", "Graph & Site", "Reuse", "Feedback"
- Center: "llm-wiki-sync"
- Extraction labels: "Summary", "Claims", "Quotes", "Entities", "Concepts", "Connections"
## Key Constraints:
- 16:9 aspect ratio (landscape)
- All text in English
- Chalkboard style (dark background, chalk-like hand-drawn elements)
- Circular flow layout (NOT linear)
- Publication-ready, visually clear
Create a professional infographic following these specifications:
## Image Specifications
- **Type**: Infographic
- **Layout**: circular-flow (Cyclic process showing continuous or recurring steps)
- **Style**: chalkboard (Black chalkboard background with colorful chalk drawing style)
- **Aspect Ratio**: 16:9
- **Language**: English
## Core Principles
- Follow the layout structure precisely for information architecture
- Apply style aesthetics consistently throughout
- If content involves sensitive or copyrighted figures, create stylistically similar alternatives
- Keep information concise, highlight keywords and core concepts
- Use ample whitespace for visual clarity
- Maintain clear visual hierarchy
## Text Requirements
- All text must match the specified style treatment
- Main titles should be prominent and readable
- Key concepts should be visually emphasized
- Labels should be clear and appropriately sized
- Use the specified language for all text content
## Layout Guidelines
- Circular arrangement
- Steps around the circle
- Arrows showing direction
- No clear start/end (continuous)
- Center can hold main concept
- Circle or ring shape
- Directional arrows
- Step nodes evenly spaced
- Icons per step
- Optional center element
## Style Guidelines
- **Background**: Chalkboard Black (#1A1A1A) or Dark Green-Black (#1C2B1C)
- **Texture**: Realistic chalkboard texture with subtle scratches, dust particles, and faint eraser marks
- **Typography**: Hand-drawn chalk lettering style with visible chalk texture. Imperfect baseline adds authenticity.
- **Color Palette**:
- Background: Chalkboard Black (#1A1A1A)
- Primary Text: Chalk White (#F5F5F5)
- Accent 1: Chalk Yellow (#FFE566)
- Accent 2: Chalk Pink (#FF9999)
- Accent 3: Chalk Blue (#66B3FF)
- Accent 4: Chalk Green (#90EE90)
- Accent 5: Chalk Orange (#FFB366)
- **Visual Elements**:
- Hand-drawn chalk illustrations with sketchy, imperfect lines
- Chalk dust effects around text and key elements
- Doodles: stars, arrows, underlines, circles, checkmarks
- Eraser smudges and chalk residue textures
- Wooden frame border optional
- Stick figures and simple icons
- Connection lines with hand-drawn feel
- **Style Rules**:
- Maintain authentic chalk texture on all elements
- Use imperfect, hand-drawn quality throughout
- Add subtle chalk dust and smudge effects
- Create visual hierarchy with color variety
- Include playful doodles and annotations
- DO NOT use perfect geometric shapes
- DO NOT create clean digital-looking lines
---
Generate the infographic based on the content below:
# llm-wiki-sync: Turning Scattered Notes into a Reusable Knowledge Base
## Overview
A cyclical pipeline showing how raw notes are continuously transformed through LLM-powered ingestion into structured wiki pages, then feedback into the knowledge base for reuse.
## The Knowledge Pipeline Cycle (Center Concept)
The llm-wiki-sync pipeline operates as a continuous cycle, not a linear process.
7 stages in the cycle: Raw Note → Ingest → Extract → Source Page → Graph/Site → Reuse → Feedback Loop
## Circular Flow Diagram with 7 Stages:
1. **Raw Note** (Stage 1)
- Original documents stored in raw/ folder
- Contains unprocessed information awaiting structure
- Icon: Stack of paper/note icon
2. **Ingest** (Stage 2)
- LLM analyzes and extracts structured information
- Hermes skill triggers Claude Code for ingestion
- Context check against wiki/index.md prevents duplicates
- Icon: Brain/processing icon
3. **Extract** (Stage 3)
- Six key elements extracted from each document:
- Summary (核心主题, 问题域, 方法/机制, 结论/价值)
- Key Claims (Verifiable assertions)
- Key Quotes (Preserved citations)
- Key Entities (LaunchDarkly, HP, etc.)
- Key Concepts (RTO, RPO, Feature Flag, etc.)
- Connections (depends_on, enables, provides)
- Icon: Six circles/callouts
4. **Source Page** (Stage 4)
- Written to wiki/sources/<slug>.md
- Contains frontmatter and standard sections
- Links use [[PageName]] format
- Icon: Document/page icon
5. **Graph & Site** (Stage 5)
- graph.json: Machine-readable graph structure
- graph.html: Interactive visualization
- Quartz: Static site generation
- Icon: Network/graph icon
6. **Reuse** (Stage 6)
- Query, Synthesize, Write, Connect
- Icon: Multiple arrows pointing outward
7. **Feedback Loop** (Stage 7)
- New insights become new raw notes
- Cycle continues indefinitely
- Icon: Circular arrow completing the cycle
## Key Quotes (to include as callouts):
- "RTO is about speed: how fast you get back online. RPO is about data: how much you can afford to lose."
- "Deploy != Release. Feature flags change this. You can deploy code to production without releasing it to users."
## Design Requirements:
- Circular flow with 7 stages evenly spaced around a circle
- Clockwise arrow direction
- Center contains: "llm-wiki-sync" as main concept
- Each stage is a node with icon + label
- Extraction outputs (6 items) shown as callouts or inner ring
- Dark chalkboard background with hand-drawn chalk accents
- Chalk colors for visual hierarchy
- Imperfect, sketchy lines throughout
- Publication-ready quality
- NO clutter - only essential elements
- Clear hierarchy: title > headlines > labels > descriptions
## Text Labels (in English):
- Headline: "The Knowledge Pipeline Cycle"
- Subhead: "How llm-wiki-sync transforms scattered notes into a reusable knowledge base"
- Stage labels: "Raw Note", "Ingest", "Extract", "Source Page", "Graph & Site", "Reuse", "Feedback"
- Center: "llm-wiki-sync"
- Extraction labels: "Summary", "Claims", "Quotes", "Entities", "Concepts", "Connections"
## Key Constraints:
- 16:9 aspect ratio (landscape)
- All text in English
- Chalkboard style (dark background, chalk-like hand-drawn elements)
- Circular flow layout (NOT linear)
- Publication-ready, visually clear
- No clutter or excessive elements

View File

@@ -1,256 +1,256 @@
# Wiki Sync 循环流程信息图 - 提示词
> 日期:2026-04-20
> 布局:circular-flow
> 风格:chalkboard
---
## 一、系统提示词
```
Create a professional infographic following these specifications:
## Image Specifications
- **Type**: Infographic
- **Layout**: circular-flow
- **Style**: chalkboard
- **Aspect Ratio**: 16:9 (landscape)
- **Language**: 中文 (Simplified Chinese)
## Core Principles
- Follow the layout structure precisely for information architecture
- Apply style aesthetics consistently throughout
- If content involves sensitive or copyrighted figures, create stylistically similar alternatives
- Keep information concise, highlight keywords and core concepts
- Use ample whitespace for visual clarity
- Maintain clear visual hierarchy
## Text Requirements
- All text must match the specified style treatment
- Main titles should be prominent and readable
- Key concepts should be visually emphasized
- Labels should be clear and appropriately sized
- Use Chinese for all text content
## Layout Guidelines
### Circular Flow Layout
- 循环流程:展示持续运行的过程
- 环形排列:所有节点围绕中心点均布
- 方向箭头:显示顺时针或逆时针流动方向
- 无明确起点/终点(持续循环)
- 中心可放置核心概念或系统名称
### Wiki Sync 循环结构
1. 9个步骤节点均匀分布在圆环上
2. 循环箭头连接各步骤
3. 中心显示 "Wiki Sync" 系统名称
4. 标题位于圆环上方
## Style Guidelines
### Chalkboard Style
- 背景:黑板黑 (#1A1A1A) 或深绿黑板色 (#1C2B1C)
- 纹理:真实黑板质感,伴有划痕、粉尘、橡皮擦痕迹
- 线条:手绘粉笔质感,不完美的sketchy线条
- 颜色:仅使用粉笔色板
- 字体:手绘粉笔字体
- 装饰:手绘星星、下划线、箭头、圆圈、问号
```
---
## 二、风格锁定提示词
```
## Style Lock — 必须遵守
本信息图使用 chalkboard(粉笔黑板)风格。
### 背景
- 颜色:#1C2B1C(深绿黑板)或 #1A1A1A(黑板黑)
- 纹理:真实黑板纹理,细微划痕、粉尘粒子、橡皮擦痕迹
- 木质框边(可选):手绘木纹线条
### 粉笔线条质量
- 所有线条必须是手绘的、不完美的sketchy风格
- 轻微抖动和歪斜
- 不要干净的矢量线条
### 颜色色板(严格使用)
| 角色 | 颜色 | Hex |
|-----|------|-----|
| 主文字/轮廓 | 粉笔白 | #F5F5F5 |
| 高亮/下划线 | 粉笔黄 | #FFE566 |
| 次要高亮 | 粉笔粉 | #FF9999 |
| 技术元素/图表 | 粉笔蓝 | #66B3FF |
| 成功/自然 | 粉笔绿 | #90EE90 |
| 警告/能量 | 粉笔橙 | #FFB366 |
| 木框 | 棕色 | #8B6914 |
### 装饰元素
- 5-7角手绘星星(不规则)
- 手绘波浪下划线
- 手绘箭头(歪斜的笔触 + 箭头)
- 角落的粉笔问号、圆圈
- 底部散落的粉笔粉末
### 禁止出现
- 渐变
- 完美几何形状
- 写实元素
- 扁平数字图标
### 布局规则(circular-flow)
- 9个节点均布于圆环上
- 顺时针方向箭头连接各节点
- 中心放置核心概念
- 标题在圆环顶部
## Layout Guidelines - Circular Flow
### 环形结构
- 步骤节点:9个步骤均匀分布在圆周上
- 方向:顺时针流动的箭头
- 中心:系统名称 "Wiki Sync"
- 标题:信息图主标题在顶部
### 节点内容
每个节点包含:
- 步骤编号(圆形框)
- 步骤名称(粉笔白大字)
- 简要描述(1-2行,较小字体)
- 对应图标或符号
### 节点顺序(Wiki Sync 流程)
1. Cron 触发
2. 加载 skill
3. 启动 TMUX
4. 启动 Claude Code
5. 发送任务指令
6. 执行 9 步 ingest
7. 解析 SLUG
8. 更新 manifest
9. Telegram 通知
```
---
## 三、具体内容提示词
```
INFOGRAPHIC: Wiki Sync 系统循环流程
## 主标题
- 位置:圆环顶部居中
- 内容:"Wiki Sync 自动同步系统"
- 字体:大型粉笔白(#F5F5F5)手写体
- 装饰:粉笔黄(#FFE566)双下划线(波浪形手绘)
- 两侧:粉笔粉(#FF9999)小星星装饰
## 圆环中心
- 圆形区域放置系统图标或 "WS" 字样
- 颜色:粉笔蓝(#66B3FF)轮廓
- 背景:深绿黑板色 #1C2B1C
## 循环节点(顺时针排列)
### 节点 1:Cron 触发
- 编号圆圈:粉笔黄
- 步骤名:① Cron 触发
- 描述:定时器启动,每15分钟
- 图标:时钟或定时器手绘
### 节点 2:加载 Skill
- 编号圆圈:粉笔黄
- 步骤名:② 加载 Skill
- 描述:加载 llm-wiki-sync
- 图标:齿轮或技能图标
### 节点 3:检查待摄
- 编号圆圈:粉笔粉
- 步骤名:③ 待摄检查
- 描述:sync.py --check
- 图标:文档或清单
### 节点 4:启动 TMUX
- 编号圆圈:粉笔粉
- 步骤名:④ 启动 TMUX
- 描述:创建会话
- 图标:终端图标
### 节点 5:Claude Code
- 编号圆圈:粉笔蓝
- 步骤名:⑤ Claude Code
- 描述:bypassPermissions
- 图标:AI/机器人
### 节点 6:执行 Ingest
- 编号圆圈:粉笔蓝
- 步骤名:执行 Ingest
- 描述:9步标准流程
- 图标:输入箭头
### 节点 7:解析 SLUG
- 编号圆圈:粉笔绿
- 步骤名:⑦ 解析 SLUG
- 描述:从输出提取标识符
- 图标:标签/条形码
### 节点 8:更新 Manifest
- 编号圆圈:粉笔绿
- 步骤名:更新 Manifest
- 描述:写入 JSON 状态
- 图标:数据保存
### 节点 9:Telegram 通知
- 编号圆圈:粉笔橙
- 步骤名: Telegram 通知
- 描述:发送同步结果
- 图标:消息气泡
## 循环箭头
- 颜色:粉笔蓝(#66B3FF)
- 风格:手绘歪斜箭头
- 方向:顺时针
- 每两个节点之间
## 底部装饰
- 左侧:粉笔粉 "Claude Code Agent"
- 右侧:粉笔黄 "持续运行 ∞"
- 底部边缘:散落粉笔粉末痕迹
- 角落:粉笔问号、圆圈装饰
## 整体效果
- 深绿黑板背景 (#1C2B1C)
- 所有文字使用粉笔质感手写体
- 节点框使用手绘不规则圆形/圆角矩形
- 箭头使用手绘歪斜线条
- 保持信息密度,流程清晰
```
---
## 四、使用说明
```
使用方法:
1. 使用支持 circular-flow 布局 + chalkboard 风格的 AI 图像生成工具
2. 建议比例:16:9 (landscape)
3. 语言:中文(简体)
4. 参考本文件的三部分提示词组合使用
提示词组合优先级:
1. 第一部分(系统提示词)- 基础规范
2. 第二部分(风格锁定)- 必须遵守的约束
3. 具体内容提示词 - 实际图像内容
```
---
# Wiki Sync 循环流程信息图 - 提示词
> 日期:2026-04-20
> 布局:circular-flow
> 风格:chalkboard
---
## 一、系统提示词
```
Create a professional infographic following these specifications:
## Image Specifications
- **Type**: Infographic
- **Layout**: circular-flow
- **Style**: chalkboard
- **Aspect Ratio**: 16:9 (landscape)
- **Language**: 中文 (Simplified Chinese)
## Core Principles
- Follow the layout structure precisely for information architecture
- Apply style aesthetics consistently throughout
- If content involves sensitive or copyrighted figures, create stylistically similar alternatives
- Keep information concise, highlight keywords and core concepts
- Use ample whitespace for visual clarity
- Maintain clear visual hierarchy
## Text Requirements
- All text must match the specified style treatment
- Main titles should be prominent and readable
- Key concepts should be visually emphasized
- Labels should be clear and appropriately sized
- Use Chinese for all text content
## Layout Guidelines
### Circular Flow Layout
- 循环流程:展示持续运行的过程
- 环形排列:所有节点围绕中心点均布
- 方向箭头:显示顺时针或逆时针流动方向
- 无明确起点/终点(持续循环)
- 中心可放置核心概念或系统名称
### Wiki Sync 循环结构
1. 9个步骤节点均匀分布在圆环上
2. 循环箭头连接各步骤
3. 中心显示 "Wiki Sync" 系统名称
4. 标题位于圆环上方
## Style Guidelines
### Chalkboard Style
- 背景:黑板黑 (#1A1A1A) 或深绿黑板色 (#1C2B1C)
- 纹理:真实黑板质感,伴有划痕、粉尘、橡皮擦痕迹
- 线条:手绘粉笔质感,不完美的sketchy线条
- 颜色:仅使用粉笔色板
- 字体:手绘粉笔字体
- 装饰:手绘星星、下划线、箭头、圆圈、问号
```
---
## 二、风格锁定提示词
```
## Style Lock — 必须遵守
本信息图使用 chalkboard(粉笔黑板)风格。
### 背景
- 颜色:#1C2B1C(深绿黑板)或 #1A1A1A(黑板黑)
- 纹理:真实黑板纹理,细微划痕、粉尘粒子、橡皮擦痕迹
- 木质框边(可选):手绘木纹线条
### 粉笔线条质量
- 所有线条必须是手绘的、不完美的sketchy风格
- 轻微抖动和歪斜
- 不要干净的矢量线条
### 颜色色板(严格使用)
| 角色 | 颜色 | Hex |
|-----|------|-----|
| 主文字/轮廓 | 粉笔白 | #F5F5F5 |
| 高亮/下划线 | 粉笔黄 | #FFE566 |
| 次要高亮 | 粉笔粉 | #FF9999 |
| 技术元素/图表 | 粉笔蓝 | #66B3FF |
| 成功/自然 | 粉笔绿 | #90EE90 |
| 警告/能量 | 粉笔橙 | #FFB366 |
| 木框 | 棕色 | #8B6914 |
### 装饰元素
- 5-7角手绘星星(不规则)
- 手绘波浪下划线
- 手绘箭头(歪斜的笔触 + 箭头)
- 角落的粉笔问号、圆圈
- 底部散落的粉笔粉末
### 禁止出现
- 渐变
- 完美几何形状
- 写实元素
- 扁平数字图标
### 布局规则(circular-flow)
- 9个节点均布于圆环上
- 顺时针方向箭头连接各节点
- 中心放置核心概念
- 标题在圆环顶部
## Layout Guidelines - Circular Flow
### 环形结构
- 步骤节点:9个步骤均匀分布在圆周上
- 方向:顺时针流动的箭头
- 中心:系统名称 "Wiki Sync"
- 标题:信息图主标题在顶部
### 节点内容
每个节点包含:
- 步骤编号(圆形框)
- 步骤名称(粉笔白大字)
- 简要描述(1-2行,较小字体)
- 对应图标或符号
### 节点顺序(Wiki Sync 流程)
1. Cron 触发
2. 加载 skill
3. 启动 TMUX
4. 启动 Claude Code
5. 发送任务指令
6. 执行 9 步 ingest
7. 解析 SLUG
8. 更新 manifest
9. Telegram 通知
```
---
## 三、具体内容提示词
```
INFOGRAPHIC: Wiki Sync 系统循环流程
## 主标题
- 位置:圆环顶部居中
- 内容:"Wiki Sync 自动同步系统"
- 字体:大型粉笔白(#F5F5F5)手写体
- 装饰:粉笔黄(#FFE566)双下划线(波浪形手绘)
- 两侧:粉笔粉(#FF9999)小星星装饰
## 圆环中心
- 圆形区域放置系统图标或 "WS" 字样
- 颜色:粉笔蓝(#66B3FF)轮廓
- 背景:深绿黑板色 #1C2B1C
## 循环节点(顺时针排列)
### 节点 1:Cron 触发
- 编号圆圈:粉笔黄
- 步骤名:① Cron 触发
- 描述:定时器启动,每15分钟
- 图标:时钟或定时器手绘
### 节点 2:加载 Skill
- 编号圆圈:粉笔黄
- 步骤名:② 加载 Skill
- 描述:加载 llm-wiki-sync
- 图标:齿轮或技能图标
### 节点 3:检查待摄
- 编号圆圈:粉笔粉
- 步骤名:③ 待摄检查
- 描述:sync.py --check
- 图标:文档或清单
### 节点 4:启动 TMUX
- 编号圆圈:粉笔粉
- 步骤名:④ 启动 TMUX
- 描述:创建会话
- 图标:终端图标
### 节点 5:Claude Code
- 编号圆圈:粉笔蓝
- 步骤名:⑤ Claude Code
- 描述:bypassPermissions
- 图标:AI/机器人
### 节点 6:执行 Ingest
- 编号圆圈:粉笔蓝
- 步骤名:执行 Ingest
- 描述:9步标准流程
- 图标:输入箭头
### 节点 7:解析 SLUG
- 编号圆圈:粉笔绿
- 步骤名:⑦ 解析 SLUG
- 描述:从输出提取标识符
- 图标:标签/条形码
### 节点 8:更新 Manifest
- 编号圆圈:粉笔绿
- 步骤名:更新 Manifest
- 描述:写入 JSON 状态
- 图标:数据保存
### 节点 9:Telegram 通知
- 编号圆圈:粉笔橙
- 步骤名: Telegram 通知
- 描述:发送同步结果
- 图标:消息气泡
## 循环箭头
- 颜色:粉笔蓝(#66B3FF)
- 风格:手绘歪斜箭头
- 方向:顺时针
- 每两个节点之间
## 底部装饰
- 左侧:粉笔粉 "Claude Code Agent"
- 右侧:粉笔黄 "持续运行 ∞"
- 底部边缘:散落粉笔粉末痕迹
- 角落:粉笔问号、圆圈装饰
## 整体效果
- 深绿黑板背景 (#1C2B1C)
- 所有文字使用粉笔质感手写体
- 节点框使用手绘不规则圆形/圆角矩形
- 箭头使用手绘歪斜线条
- 保持信息密度,流程清晰
```
---
## 四、使用说明
```
使用方法:
1. 使用支持 circular-flow 布局 + chalkboard 风格的 AI 图像生成工具
2. 建议比例:16:9 (landscape)
3. 语言:中文(简体)
4. 参考本文件的三部分提示词组合使用
提示词组合优先级:
1. 第一部分(系统提示词)- 基础规范
2. 第二部分(风格锁定)- 必须遵守的约束
3. 具体内容提示词 - 实际图像内容
```
---
*Generated: 2026-04-20*

View File

@@ -1,263 +1,263 @@
## SYSTEM PROMPT (Set this once at the start of the Gemini session)
```
You are an infographic generation assistant. Your job is to create 6 chalkboard-style
infographic cards that form a complete visual guide.
== GLOBAL STYLE RULES (apply to EVERY card, no exceptions) ==
Background:
- Dark green-black chalkboard: #1C2B1C
- Realistic chalkboard texture with subtle scratches, dust particles, faint eraser smudge marks
- Wooden frame border on all cards (hand-drawn wood grain lines in chalk brown/tan)
- NO gradients, NO perfect geometric shapes, NO photorealistic elements
Chalk Lines & Quality:
- ALL lines must be hand-drawn, imperfect, sketchy — slight wobble and variation
- Lines should look like real white/colored chalk on a blackboard
- NO clean digital vectors, NO sharp vector paths
Color Palette (strict — use ONLY these exact hex values):
- Chalk White: #F5F5F5 (main text, outlines)
- Chalk Yellow: #FFE566 (highlights, emphasis, underlines)
- Chalk Pink: #FF9999 (secondary highlights, icons)
- Chalk Blue: #66B3FF (diagrams, technical elements)
- Chalk Green: #90EE90 (success, nature, positive)
- Chalk Orange: #FFB366 (warnings, energy)
- Frame Brown: #8B6914 (wooden frame, hand-drawn)
Doodles & Decorative Elements:
- Small hand-drawn stars (5-7 points, imperfect)
- Hand-drawn underlines (slightly wavy)
- Hand-drawn arrows (sketchy shaft + arrowhead)
- Hand-drawn circles/ovals around key terms
- Hand-drawn checkmarks
- Scattered chalk dust particles near bottom/sides
Typography:
- All text hand-drawn chalk lettering style
- Imperfect baseline (letters slightly off horizontal)
- Mix of uppercase headers and lowercase body text for authenticity
- Visible chalk texture on letters
== CARD STRUCTURE (identical for all 6 cards) ==
Each card follows this layout:
┌──────────────────────────────────────────┐
│ [WOODEN FRAME BORDER] │
│ ┌────────────────────────────────────┐ │
│ │ CARD TITLE (large, chalk white) │ │
│ │ ~~underlined with accent color~~ │ │
│ ├────────────────────────────────────┤ │
│ │ [SECTION 1] │ [SECTION 2 if any] │ │
│ │ Header color │ │ │
│ │ Bullets │ │ │
│ │ Icon │ │ │
│ ├────────────────────────────────────┤ │
│ │ [Additional sections as needed] │ │
│ │ [Decorative doodles in corners] │ │
│ └────────────────────────────────────┘ │
└──────────────────────────────────────────┘
== CONSISTENCY RULES ==
1. Generate Card 1 first, send it to me
2. For Card 2–6, EXPLICITLY include this instruction:
"Follow the exact same chalkboard style as the previous card —
same background #1C2B1C, same chalk dust texture, same hand-drawn
line quality, same color hex values (#F5F5F5, #FFE566, #FF9999,
#66B3FF, #90EE90, #FFB366), same wooden frame border, same doodle
elements. Do NOT deviate from this style."
3. Aspect ratio: 16:9 for all cards
4. Each card should visually "belong" to the same set
== HOW TO USE THESE PROMPTS ==
1. Copy the SYSTEM PROMPT above and paste it at the start of your Gemini session
2. Then copy Prompt 1 and send it to Gemini Image Gen (Card 1)
3. Once Card 1 is generated, copy Prompt 2 but FIRST include the STYLE LOCK BLOCK
4. Repeat for all 6 cards, always referencing the previous card's style
5. Review each generated image: if chalk line quality or colors deviate,
regenerate with stronger style enforcement
```
---
## STYLE LOCK BLOCK (Prepend this to Prompts 2–6)
```
== STYLE LOCK — MANDATORY ==
This card MUST follow the EXACT same chalkboard style as the previously
generated card. Do not deviate.
Checklist — verify these match the previous card BEFORE generating:
□ Background color: #1C2B1C (dark green-black chalkboard)
□ Chalk texture: subtle scratches, dust, eraser smudges
□ Line quality: hand-drawn, imperfect, sketchy wobble — NO perfect vectors
□ Color hex values: #F5F5F5 (white), #FFE566 (yellow), #FF9999 (pink),
#66B3FF (blue), #90EE90 (green), #FFB366 (orange)
□ Frame: wooden border with hand-drawn wood grain
□ Doodles: stars, underlines, arrows, circles — all chalk-drawn
□ Typography: chalk lettering, imperfect baseline, chalk texture on letters
If ANY element does not match, regenerate with corrections.
```
---
## CARD 1 — Saleable & Security
```
== STYLE LOCK — MANDATORY ==
This card MUST follow the EXACT same chalkboard style as the previously
generated card. Do not deviate.
Checklist — verify these match the previous card BEFORE generating:
□ Background color: #1C2B1C (dark green-black chalkboard)
□ Chalk texture: subtle scratches, dust, eraser smudges
□ Line quality: hand-drawn, imperfect, sketchy wobble — NO perfect vectors
□ Color hex values: #F5F5F5 (white), #FFE566 (yellow), #FF9999 (pink),
#66B3FF (blue), #90EE90 (green), #FFB366 (orange)
□ Frame: wooden border with hand-drawn wood grain
□ Doodles: stars, underlines, arrows, circles — all chalk-drawn
□ Typography: chalk lettering, imperfect baseline, chalk texture on letters
If ANY element does not match, regenerate with corrections.
---
INFOGRAPHIC CARD 1: Saleable & Security
Create a single infographic card in chalkboard style with a dark green-black
background (#1C2B1C), realistic chalk dust texture, subtle eraser smudge marks,
and a wooden frame border with hand-drawn wood grain lines.
Card is 16:9 aspect ratio. All elements must look hand-drawn with real chalk —
imperfect sketchy lines, slight wobble, no clean vectors.
TITLE SECTION:
- "Saleable & Security" in large hand-drawn chalk white (#F5F5F5) uppercase
lettering, centered at top
- Double underline in chalk yellow (#FFE566), slightly wavy hand-drawn lines
- Small hand-drawn star doodles on each side of the title
TWO-COLUMN LAYOUT below title:
LEFT COLUMN — "Saleable" (header in chalk pink #FF9999, hand-drawn rectangle bar):
• Complete product definition in Control Tower
• SKUs clearly defined
• License generation strategy complete
Bullet markers: small chalk pink circles
Icon: hand-drawn chalk sketch of a product box with a small price tag label,
in chalk yellow on white outline
RIGHT COLUMN — "Security" (header in chalk blue #66B3FF, hand-drawn rectangle bar):
• Application self-defensibility capability
• WAF rules to protect cloud apps
• Defend against incorrect usage (accidental & purposeful)
Bullet markers: small chalk blue circles
Icon: hand-drawn chalk shield with a simple checkmark inside, outline in
chalk white, fill in semi-transparent chalk blue
FOOTER DECORATION:
- A hand-drawn chalk dividing line across the card width
- Two small doodle checkmarks at bottom right in chalk green (#90EE90)
- Scattered chalk dust particles along the bottom edge
NO gradients, NO sharp geometric shapes, NO flat digital icons.
```
## ![IMG-20260418172056603.png](app://77d327b60ef00764e25eb25542b49a223773/D:/Workspace/nexus/Asset/Attachment/raw/AI/%E5%A6%82%E4%BD%95%E8%AE%A9AI%E7%94%9F%E6%88%90%E9%A3%8E%E6%A0%BC%E4%B8%80%E8%87%B4%E7%9A%84%E5%9B%BE%E7%89%87/IMG-20260418172056603.png?1776503642747)
## CARD 2 — Cloud Deployment & Configuration
```
== STYLE LOCK — MANDATORY ==
This card MUST follow the EXACT same chalkboard style as the previously
generated card. Do not deviate.
Checklist — verify these match the previous card BEFORE generating:
□ Background color: #1C2B1C (dark green-black chalkboard)
□ Chalk texture: subtle scratches, dust, eraser smudges
□ Line quality: hand-drawn, imperfect, sketchy wobble — NO perfect vectors
□ Color hex values: #F5F5F5 (white), #FFE566 (yellow), #FF9999 (pink),
#66B3FF (blue), #90EE90 (green), #FFB366 (orange)
□ Frame: wooden border with hand-drawn wood grain
□ Doodles: stars, underlines, arrows, circles — all chalk-drawn
□ Typography: chalk lettering, imperfect baseline, chalk texture on letters
If ANY element does not match, regenerate with corrections.
---
INFOGRAPHIC CARD 2: Cloud Deployment & Configuration
Create a single infographic card in chalkboard style with a dark green-black
background (#1A1A1A), realistic chalk dust texture, subtle eraser smudge marks,
and a wooden frame border with hand-drawn wood grain lines.
Card is 16:9 aspect ratio. All elements must look hand-drawn with real chalk —
imperfect sketchy lines, slight wobble, no clean vectors.
TITLE SECTION:
- "Cloud Deployment & Configuration" in large hand-drawn chalk white (#F5F5F5)
uppercase lettering, centered at top
- Underline in chalk green (#90EE90), hand-drawn wavy line
- Small star doodle on left side of title
MAIN CONTENT AREA:
Header bar: "Deployment Requirements" in chalk blue (#66B3FF) hand-drawn
rectangle
Bullet list (chalk white text, chalk yellow bullet markers):
✔ Fully automated cloud platform deployment
✔ Web / API enabled configuration management
✔ All feature & functional configs through API interface
✔ Tenant capability enablement
Sub-section header: "Configuration Management" in chalk pink (#FF9999)
HAND-DRAWN FLOWCHART (center of card):
Three chalk blue boxes connected by sketchy chalk arrows:
[Cloud Platform] --arrow--> [API Gateway] --arrow--> [Tenant Config]
Each box: hand-drawn rectangle with slightly wavy edges, white #F5F5F5 outline
Text inside boxes: chalk white
Arrows: hand-drawn with slight wobble, chalk blue
ADDITIONAL ELEMENT:
Hand-drawn stick figure engineer icon (simple, chalk white) on the right side
holding a small chalk-drawn tablet/device
CORNER DOODLES:
- Top right: small hand-drawn cloud shape labeled "SaaS" in chalk orange (#FFB366)
- Bottom left: chalk pink circle with "API" text inside
- Scattered chalk dust particles near the wooden frame
NO gradients, NO sharp geometry, NO digital-looking elements.
```
## How to Use This File
```
SEQUENCE:
1. Gemini session start → paste the SYSTEM PROMPT
2. Send CARD 1 prompt → receive Card 1 image
3. Paste CARD 2 prompt (it includes STYLE LOCK BLOCK) → receive Card 2
4. Repeat for Cards 3–6
VERIFICATION after each card:
- Does background look like #1C2B1C dark green-black chalkboard? ✓/✗
- Do all lines look hand-drawn/sketchy? ✓/✗
- Are colors using the exact hex values? ✓/✗
- Is there a wooden frame border? ✓/✗
- Are doodles (stars, underlines, arrows) hand-drawn? ✓/✗
- Does it match the previous card visually? ✓/✗
If any check fails → regenerate with stronger style enforcement.
## SYSTEM PROMPT (Set this once at the start of the Gemini session)
```
You are an infographic generation assistant. Your job is to create 6 chalkboard-style
infographic cards that form a complete visual guide.
== GLOBAL STYLE RULES (apply to EVERY card, no exceptions) ==
Background:
- Dark green-black chalkboard: #1C2B1C
- Realistic chalkboard texture with subtle scratches, dust particles, faint eraser smudge marks
- Wooden frame border on all cards (hand-drawn wood grain lines in chalk brown/tan)
- NO gradients, NO perfect geometric shapes, NO photorealistic elements
Chalk Lines & Quality:
- ALL lines must be hand-drawn, imperfect, sketchy — slight wobble and variation
- Lines should look like real white/colored chalk on a blackboard
- NO clean digital vectors, NO sharp vector paths
Color Palette (strict — use ONLY these exact hex values):
- Chalk White: #F5F5F5 (main text, outlines)
- Chalk Yellow: #FFE566 (highlights, emphasis, underlines)
- Chalk Pink: #FF9999 (secondary highlights, icons)
- Chalk Blue: #66B3FF (diagrams, technical elements)
- Chalk Green: #90EE90 (success, nature, positive)
- Chalk Orange: #FFB366 (warnings, energy)
- Frame Brown: #8B6914 (wooden frame, hand-drawn)
Doodles & Decorative Elements:
- Small hand-drawn stars (5-7 points, imperfect)
- Hand-drawn underlines (slightly wavy)
- Hand-drawn arrows (sketchy shaft + arrowhead)
- Hand-drawn circles/ovals around key terms
- Hand-drawn checkmarks
- Scattered chalk dust particles near bottom/sides
Typography:
- All text hand-drawn chalk lettering style
- Imperfect baseline (letters slightly off horizontal)
- Mix of uppercase headers and lowercase body text for authenticity
- Visible chalk texture on letters
== CARD STRUCTURE (identical for all 6 cards) ==
Each card follows this layout:
┌──────────────────────────────────────────┐
│ [WOODEN FRAME BORDER] │
│ ┌────────────────────────────────────┐ │
│ │ CARD TITLE (large, chalk white) │ │
│ │ ~~underlined with accent color~~ │ │
│ ├────────────────────────────────────┤ │
│ │ [SECTION 1] │ [SECTION 2 if any] │ │
│ │ Header color │ │ │
│ │ Bullets │ │ │
│ │ Icon │ │ │
│ ├────────────────────────────────────┤ │
│ │ [Additional sections as needed] │ │
│ │ [Decorative doodles in corners] │ │
│ └────────────────────────────────────┘ │
└──────────────────────────────────────────┘
== CONSISTENCY RULES ==
1. Generate Card 1 first, send it to me
2. For Card 2–6, EXPLICITLY include this instruction:
"Follow the exact same chalkboard style as the previous card —
same background #1C2B1C, same chalk dust texture, same hand-drawn
line quality, same color hex values (#F5F5F5, #FFE566, #FF9999,
#66B3FF, #90EE90, #FFB366), same wooden frame border, same doodle
elements. Do NOT deviate from this style."
3. Aspect ratio: 16:9 for all cards
4. Each card should visually "belong" to the same set
== HOW TO USE THESE PROMPTS ==
1. Copy the SYSTEM PROMPT above and paste it at the start of your Gemini session
2. Then copy Prompt 1 and send it to Gemini Image Gen (Card 1)
3. Once Card 1 is generated, copy Prompt 2 but FIRST include the STYLE LOCK BLOCK
4. Repeat for all 6 cards, always referencing the previous card's style
5. Review each generated image: if chalk line quality or colors deviate,
regenerate with stronger style enforcement
```
---
## STYLE LOCK BLOCK (Prepend this to Prompts 2–6)
```
== STYLE LOCK — MANDATORY ==
This card MUST follow the EXACT same chalkboard style as the previously
generated card. Do not deviate.
Checklist — verify these match the previous card BEFORE generating:
□ Background color: #1C2B1C (dark green-black chalkboard)
□ Chalk texture: subtle scratches, dust, eraser smudges
□ Line quality: hand-drawn, imperfect, sketchy wobble — NO perfect vectors
□ Color hex values: #F5F5F5 (white), #FFE566 (yellow), #FF9999 (pink),
#66B3FF (blue), #90EE90 (green), #FFB366 (orange)
□ Frame: wooden border with hand-drawn wood grain
□ Doodles: stars, underlines, arrows, circles — all chalk-drawn
□ Typography: chalk lettering, imperfect baseline, chalk texture on letters
If ANY element does not match, regenerate with corrections.
```
---
## CARD 1 — Saleable & Security
```
== STYLE LOCK — MANDATORY ==
This card MUST follow the EXACT same chalkboard style as the previously
generated card. Do not deviate.
Checklist — verify these match the previous card BEFORE generating:
□ Background color: #1C2B1C (dark green-black chalkboard)
□ Chalk texture: subtle scratches, dust, eraser smudges
□ Line quality: hand-drawn, imperfect, sketchy wobble — NO perfect vectors
□ Color hex values: #F5F5F5 (white), #FFE566 (yellow), #FF9999 (pink),
#66B3FF (blue), #90EE90 (green), #FFB366 (orange)
□ Frame: wooden border with hand-drawn wood grain
□ Doodles: stars, underlines, arrows, circles — all chalk-drawn
□ Typography: chalk lettering, imperfect baseline, chalk texture on letters
If ANY element does not match, regenerate with corrections.
---
INFOGRAPHIC CARD 1: Saleable & Security
Create a single infographic card in chalkboard style with a dark green-black
background (#1C2B1C), realistic chalk dust texture, subtle eraser smudge marks,
and a wooden frame border with hand-drawn wood grain lines.
Card is 16:9 aspect ratio. All elements must look hand-drawn with real chalk —
imperfect sketchy lines, slight wobble, no clean vectors.
TITLE SECTION:
- "Saleable & Security" in large hand-drawn chalk white (#F5F5F5) uppercase
lettering, centered at top
- Double underline in chalk yellow (#FFE566), slightly wavy hand-drawn lines
- Small hand-drawn star doodles on each side of the title
TWO-COLUMN LAYOUT below title:
LEFT COLUMN — "Saleable" (header in chalk pink #FF9999, hand-drawn rectangle bar):
• Complete product definition in Control Tower
• SKUs clearly defined
• License generation strategy complete
Bullet markers: small chalk pink circles
Icon: hand-drawn chalk sketch of a product box with a small price tag label,
in chalk yellow on white outline
RIGHT COLUMN — "Security" (header in chalk blue #66B3FF, hand-drawn rectangle bar):
• Application self-defensibility capability
• WAF rules to protect cloud apps
• Defend against incorrect usage (accidental & purposeful)
Bullet markers: small chalk blue circles
Icon: hand-drawn chalk shield with a simple checkmark inside, outline in
chalk white, fill in semi-transparent chalk blue
FOOTER DECORATION:
- A hand-drawn chalk dividing line across the card width
- Two small doodle checkmarks at bottom right in chalk green (#90EE90)
- Scattered chalk dust particles along the bottom edge
NO gradients, NO sharp geometric shapes, NO flat digital icons.
```
## ![IMG-20260418172056603.png](app://77d327b60ef00764e25eb25542b49a223773/D:/Workspace/nexus/Asset/Attachment/raw/AI/%E5%A6%82%E4%BD%95%E8%AE%A9AI%E7%94%9F%E6%88%90%E9%A3%8E%E6%A0%BC%E4%B8%80%E8%87%B4%E7%9A%84%E5%9B%BE%E7%89%87/IMG-20260418172056603.png?1776503642747)
## CARD 2 — Cloud Deployment & Configuration
```
== STYLE LOCK — MANDATORY ==
This card MUST follow the EXACT same chalkboard style as the previously
generated card. Do not deviate.
Checklist — verify these match the previous card BEFORE generating:
□ Background color: #1C2B1C (dark green-black chalkboard)
□ Chalk texture: subtle scratches, dust, eraser smudges
□ Line quality: hand-drawn, imperfect, sketchy wobble — NO perfect vectors
□ Color hex values: #F5F5F5 (white), #FFE566 (yellow), #FF9999 (pink),
#66B3FF (blue), #90EE90 (green), #FFB366 (orange)
□ Frame: wooden border with hand-drawn wood grain
□ Doodles: stars, underlines, arrows, circles — all chalk-drawn
□ Typography: chalk lettering, imperfect baseline, chalk texture on letters
If ANY element does not match, regenerate with corrections.
---
INFOGRAPHIC CARD 2: Cloud Deployment & Configuration
Create a single infographic card in chalkboard style with a dark green-black
background (#1A1A1A), realistic chalk dust texture, subtle eraser smudge marks,
and a wooden frame border with hand-drawn wood grain lines.
Card is 16:9 aspect ratio. All elements must look hand-drawn with real chalk —
imperfect sketchy lines, slight wobble, no clean vectors.
TITLE SECTION:
- "Cloud Deployment & Configuration" in large hand-drawn chalk white (#F5F5F5)
uppercase lettering, centered at top
- Underline in chalk green (#90EE90), hand-drawn wavy line
- Small star doodle on left side of title
MAIN CONTENT AREA:
Header bar: "Deployment Requirements" in chalk blue (#66B3FF) hand-drawn
rectangle
Bullet list (chalk white text, chalk yellow bullet markers):
✔ Fully automated cloud platform deployment
✔ Web / API enabled configuration management
✔ All feature & functional configs through API interface
✔ Tenant capability enablement
Sub-section header: "Configuration Management" in chalk pink (#FF9999)
HAND-DRAWN FLOWCHART (center of card):
Three chalk blue boxes connected by sketchy chalk arrows:
[Cloud Platform] --arrow--> [API Gateway] --arrow--> [Tenant Config]
Each box: hand-drawn rectangle with slightly wavy edges, white #F5F5F5 outline
Text inside boxes: chalk white
Arrows: hand-drawn with slight wobble, chalk blue
ADDITIONAL ELEMENT:
Hand-drawn stick figure engineer icon (simple, chalk white) on the right side
holding a small chalk-drawn tablet/device
CORNER DOODLES:
- Top right: small hand-drawn cloud shape labeled "SaaS" in chalk orange (#FFB366)
- Bottom left: chalk pink circle with "API" text inside
- Scattered chalk dust particles near the wooden frame
NO gradients, NO sharp geometry, NO digital-looking elements.
```
## How to Use This File
```
SEQUENCE:
1. Gemini session start → paste the SYSTEM PROMPT
2. Send CARD 1 prompt → receive Card 1 image
3. Paste CARD 2 prompt (it includes STYLE LOCK BLOCK) → receive Card 2
4. Repeat for Cards 3–6
VERIFICATION after each card:
- Does background look like #1C2B1C dark green-black chalkboard? ✓/✗
- Do all lines look hand-drawn/sketchy? ✓/✗
- Are colors using the exact hex values? ✓/✗
- Is there a wooden frame border? ✓/✗
- Are doodles (stars, underlines, arrows) hand-drawn? ✓/✗
- Does it match the previous card visually? ✓/✗
If any check fails → regenerate with stronger style enforcement.
```

View File

@@ -1,51 +1,51 @@
---
title: 养龙虾5天血泪史:我的AI Agent为什么总失忆?OpenClaw 记忆调试全记录
type: metaphor
palette: warm
rendering: digital
text: title-subtitle
mood: balanced
---
请为这篇文章生成封面图。
## 视觉概念
以"金鱼记忆"为核心隐喻:一条卡通金鱼游在透明的水缸中,金鱼的大脑位置是一个空白的问号框架,周围漂浮着记忆碎片(文字泡泡、对话气泡、代码片段),碎片正在逐渐消散到缸外。底部有简单的齿轮和调试工具元素,暗示"调试"过程。
## 主视觉元素
- 金鱼:卡通风格,圆形身体,大眼睛,尾巴呈波浪形游动姿态
- 空白大脑:空心问号形状,位于金鱼头部位置
- 记忆碎片:5-6个椭圆形气泡,包含模糊的文字轮廓、对话符号、代码片段
- 水缸:简单几何圆形边框,内部有微妙的涟漪效果
- 调试工具:底部角落有小型齿轮、螺丝刀、代码括号图标
## 配色方案(warm palette)
- 主色:温暖橙色 #F5A623(用于金鱼身体)
- 辅色:柔和珊瑚色 #FF8C74(用于记忆碎片)
- 强调色:深琥珀色 #C47A2B(用于鱼鳍和调试工具)
- 背景:米白色 #FFF8F0 到浅杏色 #FFE8D6 渐变
- 文字色:深棕色 #4A3728
## 渲染风格(digital)
- 干净的矢量线条,精确边缘
- 平滑渐变,无粗糙纹理
- 轻微阴影创造层次感
- 像专业UI插图一样现代简洁
## 文字布局
- 标题:"养龙虾5天血泪史" 使用大号粗体字(金鱼上方右侧)
- 副标题:"我的AI Agent为什么总失忆?" 使用较小字号(标题下方)
- 字体:现代无衬线体,清晰易读
- 文字颜色:深棕色 #4A3728
## 氛围(balanced)
- 中等对比度
- 正常饱和度
- 视觉重量平衡
---
title: 养龙虾5天血泪史:我的AI Agent为什么总失忆?OpenClaw 记忆调试全记录
type: metaphor
palette: warm
rendering: digital
text: title-subtitle
mood: balanced
---
请为这篇文章生成封面图。
## 视觉概念
以"金鱼记忆"为核心隐喻:一条卡通金鱼游在透明的水缸中,金鱼的大脑位置是一个空白的问号框架,周围漂浮着记忆碎片(文字泡泡、对话气泡、代码片段),碎片正在逐渐消散到缸外。底部有简单的齿轮和调试工具元素,暗示"调试"过程。
## 主视觉元素
- 金鱼:卡通风格,圆形身体,大眼睛,尾巴呈波浪形游动姿态
- 空白大脑:空心问号形状,位于金鱼头部位置
- 记忆碎片:5-6个椭圆形气泡,包含模糊的文字轮廓、对话符号、代码片段
- 水缸:简单几何圆形边框,内部有微妙的涟漪效果
- 调试工具:底部角落有小型齿轮、螺丝刀、代码括号图标
## 配色方案(warm palette)
- 主色:温暖橙色 #F5A623(用于金鱼身体)
- 辅色:柔和珊瑚色 #FF8C74(用于记忆碎片)
- 强调色:深琥珀色 #C47A2B(用于鱼鳍和调试工具)
- 背景:米白色 #FFF8F0 到浅杏色 #FFE8D6 渐变
- 文字色:深棕色 #4A3728
## 渲染风格(digital)
- 干净的矢量线条,精确边缘
- 平滑渐变,无粗糙纹理
- 轻微阴影创造层次感
- 像专业UI插图一样现代简洁
## 文字布局
- 标题:"养龙虾5天血泪史" 使用大号粗体字(金鱼上方右侧)
- 副标题:"我的AI Agent为什么总失忆?" 使用较小字号(标题下方)
- 字体:现代无衬线体,清晰易读
- 文字颜色:深棕色 #4A3728
## 氛围(balanced)
- 中等对比度
- 正常饱和度
- 视觉重量平衡
- 温暖友好但不强烈

View File

@@ -1,22 +1,22 @@
## 信息图任务指令
请用**claude-code-infographic-build** 这个技能为`Hermes/xingzhi/Hermes自定义技能说明` 这篇笔记生成信息图。
- 语言:英文
- 布局:circular-flow
- 风格:chalkboard
- 比例:16:9
## 封面图任务指令
请用**claude-code-executor**技能启动Claude Code
使用 **baoyu-cover-image** 技能为以下内容生成封面图提示词:
1. 读取 Hermes/xingzhi/wiki-sync-setup-2026-04-16.md 这篇笔记
2. 用**baoyu-cover-image** 生成一张封面图
- **类型 (Type)**:`hero`、`conceptual`、`typography`、`metaphor`、`scene`、`minimal`
- **配色 (Palette)**:`warm`、`elegant`、`cool`、`dark`、`earth`、`vivid`、`pastel`、`mono`、`retro`
- **渲染 (Rendering)**:`flat-vector`、`hand-drawn`、`painterly`、`digital`、`pixel`、`chalk`
- **文字 (Text)**:`none`、`title-only`(默认)、`title-subtitle`、`text-rich`
- **氛围 (Mood)**:`subtle`、`balanced`(默认)、`bold`
3. 不要生成图片,只输出提示词
## 信息图任务指令
请用**claude-code-infographic-build** 这个技能为`Hermes/xingzhi/Hermes自定义技能说明` 这篇笔记生成信息图。
- 语言:英文
- 布局:circular-flow
- 风格:chalkboard
- 比例:16:9
## 封面图任务指令
请用**claude-code-executor**技能启动Claude Code
使用 **baoyu-cover-image** 技能为以下内容生成封面图提示词:
1. 读取 Hermes/xingzhi/wiki-sync-setup-2026-04-16.md 这篇笔记
2. 用**baoyu-cover-image** 生成一张封面图
- **类型 (Type)**:`hero`、`conceptual`、`typography`、`metaphor`、`scene`、`minimal`
- **配色 (Palette)**:`warm`、`elegant`、`cool`、`dark`、`earth`、`vivid`、`pastel`、`mono`、`retro`
- **渲染 (Rendering)**:`flat-vector`、`hand-drawn`、`painterly`、`digital`、`pixel`、`chalk`
- **文字 (Text)**:`none`、`title-only`(默认)、`title-subtitle`、`text-rich`
- **氛围 (Mood)**:`subtle`、`balanced`(默认)、`bold`
3. 不要生成图片,只输出提示词
4. 输出提示词到 Hermes/xingzhi/ 新建一个笔记

View File

@@ -1,127 +1,125 @@
**副标题**:如何把每一份笔记,通过 llm-wiki-sync 自动分析与提炼成结构化的页面、实体与概念,以便长期检索与复用。
---
## 前言与来源说明
本方案借鉴并整合了几条重要线索:
- Andrej Karpathy 对“LLM Wiki”理念的阐述(将知识以可被大模型直接消费的结构化方式保存):https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
- 我们的实现基于开源项目 SamurAI 的 llm-wiki-agent(https://github.com/SamurAIGPT/llm-wiki-agent),在其基础上扩展了企业化的 ingest 流程、Cron 调度与 Hermes skill(llm-wiki-sync)。
- 最终静态化展示使用 Quartz(https://github.com/jackyzha0/quartz),把生成的 wiki 内容导出为可浏览、可分享的静态站点。
下面重点介绍 llm-wiki-sync 如何把一篇笔记做结构化分析与提炼,并用仓库中的实例(wiki/sources/RTO-vs-RPO-Key-Differences-for-Modern-Disaster-Recovery)作为逐项说明。
---
## llm-wiki-sync 的目标与核心能力
核心目标:把原始文档(raw/)自动转成结构化的 wiki source 页面,抽取关键要素(Summary、Key Claims、Key Quotes、Key Concepts、Key Entities、Connections),并记录 ingest 日志、差异与审计信息,供后续检索、合成与内容再生产使用。
关键能力:
- 文本解析与语义压缩:把长文本压缩为 2–4 句高密度 summary。
- 声明抽取(claim extraction):识别文中明确的结论与可验证断言。
- 实体与概念抽取(NER + linking):识别人名/公司/工具/概念,并把它们标准化为 wiki 实体页([[Name]])。
- 关系发现(connections):把句子级别的语义关系转成图边(A → depends_on → B)。
- 模板化输出:固定页面头(frontmatter)+ 标准段落(Summary / Key Claims / Quotes / Concepts / Entities / Connections / Contradictions)。
- 审计与可回滚:每次 ingest 都写入 wiki/log.md,并可通过 git/checkpoint 回滚变更。
实现技术栈要点:Hermes(skill 调用)、Claude Code / agent(可选)、llm-wiki-agent 基础脚本、以及最终的静态化工具 Quartz。
---
## 从笔记到 Source Page
仓库中的源页面:wiki/sources/RTO-vs-RPO-Key-Differences-for-Modern-Disaster-Recovery.md
下面逐项展示 llm-wiki-sync 针对该文档所做的提取结果(摘自生成的 source 页面):
1) Summary(Summary)
- 核心主题:RTO(恢复时间目标)与 RPO(恢复点目标)的定义、区别及在现代持续交付中的应用
- 问题域:灾难恢复规划、发布风险管控
- 方法/机制:通过 Feature Flag 实现秒级 RTO 和低 RPO
- 结论/价值:预防优于恢复,Feature Flag 将部署事故从灾难转为非事件
说明:Summary 由模型将整篇文章的主旨、问题背景、关键方法与结论压缩为 2–4 条,便于快速检索与索引。
2) Key Claims(断言提取)
- RTO 衡量系统恢复速度:允许的最大停机时间
- RPO 衡量数据保护:可接受的最大数据丢失量
- 传统灾备聚焦硬件故障,现代风险更多来自代码变更(部署 bug、数据库迁移、AI 模型更新等)
- Feature Flag 将 RTO 从小时级降至秒级,同时保护 RPO
- 应用分层策略(Critical / Important / Nice-to-have)对应不同的 RTO/RPO 指标
说明:断言提取用于建立事实层(fact layer),后续可自动化做一致性检查与冲突检测(Contradictions 段)。
3) Key Quotes(关键引用)
- “RTO is about speed: how fast you get back online. RPO is about data: how much you can afford to lose.”
- “Deploy != Release. Feature flags change this. You can deploy code to production without releasing it to users.”
说明:保留可引用原句,便于在后续合成(如写作、演讲稿)中引用来源。
4) Key Concepts(概念抽取)
- RTO(Recovery Time Objective)
- RPO(Recovery Point Objective)
- Feature Flag(特性开关)
- Kill Switch(紧急关闭机制)
- 渐进式发布(Gradual Rollout)
说明:概念会被标准化为 wiki 的 concept 页面(wiki/concepts/),用于聚合所有提到该概念的 source 页面。
5) Key Entities(实体抽取)
- LaunchDarkly(Feature Flag 管理平台)
- HP(示例企业)
- Christian Dior(示例企业 — 文档中作为案例提及)
说明:实体会被规范化为 wiki/entities/ 下的页面,并且 source 页面会在 sources 列表保留原始链接与引用。
6) Connections(关系构建)
- RTO ← depends_on ← Feature Flag
- RPO ← depends_on ← Feature Flag
- LaunchDarkly → provides → Feature Flag
- Feature Flag ← enables ← 渐进式发布
说明:Connections 用于图谱构建(graph/graph.json),后续能在可视化页面(graph.html)展示节点与边。
7) Contradictions(冲突检测)
- 当前文档无明显与现有 wiki 冲突的声明;若检测到冲突,llm-wiki-sync 会把冲突条目列出并标注来源,供人工审查。
![[IMG-20260420160439552.png|872]]
![[IMG-20260420160439600.png]]
---
## llm-wiki-sync 的典型运行步骤(工程视角)
1. 读取 raw/<path>,解析 frontmatter/元数据(若缺失则询回填)。
2. 检索 wiki/index.md 与 overview.md,获取上下文(避免重复 ingest)。
3. 用 LLM 生成 Source Page(Summary / Key Claims / Quotes / Concepts / Entities / Connections / Contradictions)。
4. 将结果写入 wiki/sources/<slug>.md,并更新 wiki/index.md、wiki/overview.md;如有新实体/概念也生成对应页面草稿。
5. 记录日志:在 wiki/log.md 追加 ingest 记录(时间、文件、摘要、状态)。
6. 可选:触发 graph 重建(增量或全量),并把 graph/graph.json、graph.html 更新到站点。
7. 通知:完成后通过 Hermes 的通知机制(deliver=origin 或 Telegram 指定 chat)告知负责人。
并发与配额注意:单文件 ingest 优先,批量操作分批(每批 2~3 篇);对接外部 agent/Claude Code 时避免并发超配额。
审计与回滚:每次 ingest 前执行 git branch 或 checkpoint;如需回滚,可用 git revert 或恢复 checkpoint。
---
## 总结与扩展
- llm-wiki-sync 把 Karpathy 关于 LLM Wiki 的理念落地为可执行的工程流程:把知识以结构化表征保存,使得大模型既是“读者”也是“执行者”。
- 在 Obsidian 中可以直接通过关系图(graph view)查看笔记间的关联;在 llm-wiki-agent 中可以通过 wiki-graph 构建并在 graph.html / graph/graph.json 中可视化展示。
- 我们的实现基于 SamurAI 的 llm-wiki-agent,并在其上加入了企业级的同步、审计与 Hermes skill 封装,最终通过 Quartz 静态站把生成的 wiki 内容对外展示与分享。
---
## Infographic Asset
![llm-wiki-sync Circular Flow Infographic](IMG-20260420160439662.png)
**Infographic**: The Knowledge Pipeline Cycle — circular flow showing how llm-wiki-sync transforms scattered notes into a reusable knowledge base.
- Layout: circular-flow (7-stage cycle)
- Style: chalkboard (dark background, hand-drawn chalk accents)
- Aspect ratio: 16:9
- Prompt file: `infographic/llm-wiki-sync-circular-flow/prompts/infographic.md`
- Image: `llm-wiki-sync-circular-flow-infographic.png`
**副标题**:如何把每一份笔记,通过 llm-wiki-sync 自动分析与提炼成结构化的页面、实体与概念,以便长期检索与复用。
---
## 前言与来源说明
本方案借鉴并整合了几条重要线索:
- Andrej Karpathy 对“LLM Wiki”理念的阐述(将知识以可被大模型直接消费的结构化方式保存):https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
- 我们的实现基于开源项目 SamurAI 的 llm-wiki-agent(https://github.com/SamurAIGPT/llm-wiki-agent),在其基础上扩展了企业化的 ingest 流程、Cron 调度与 Hermes skill(llm-wiki-sync)。
- 最终静态化展示使用 Quartz(https://github.com/jackyzha0/quartz),把生成的 wiki 内容导出为可浏览、可分享的静态站点。
下面重点介绍 llm-wiki-sync 如何把一篇笔记做结构化分析与提炼,并用仓库中的实例(wiki/sources/RTO-vs-RPO-Key-Differences-for-Modern-Disaster-Recovery)作为逐项说明。
---
## llm-wiki-sync 的目标与核心能力
核心目标:把原始文档(raw/)自动转成结构化的 wiki source 页面,抽取关键要素(Summary、Key Claims、Key Quotes、Key Concepts、Key Entities、Connections),并记录 ingest 日志、差异与审计信息,供后续检索、合成与内容再生产使用。
关键能力:
- 文本解析与语义压缩:把长文本压缩为 2–4 句高密度 summary。
- 声明抽取(claim extraction):识别文中明确的结论与可验证断言。
- 实体与概念抽取(NER + linking):识别人名/公司/工具/概念,并把它们标准化为 wiki 实体页([[Name]])。
- 关系发现(connections):把句子级别的语义关系转成图边(A → depends_on → B)。
- 模板化输出:固定页面头(frontmatter)+ 标准段落(Summary / Key Claims / Quotes / Concepts / Entities / Connections / Contradictions)。
- 审计与可回滚:每次 ingest 都写入 wiki/log.md,并可通过 git/checkpoint 回滚变更。
实现技术栈要点:Hermes(skill 调用)、Claude Code / agent(可选)、llm-wiki-agent 基础脚本、以及最终的静态化工具 Quartz。
---
## 从笔记到 Source Page
仓库中的源页面:wiki/sources/RTO-vs-RPO-Key-Differences-for-Modern-Disaster-Recovery.md
下面逐项展示 llm-wiki-sync 针对该文档所做的提取结果(摘自生成的 source 页面):
1) Summary(Summary)
- 核心主题:RTO(恢复时间目标)与 RPO(恢复点目标)的定义、区别及在现代持续交付中的应用
- 问题域:灾难恢复规划、发布风险管控
- 方法/机制:通过 Feature Flag 实现秒级 RTO 和低 RPO
- 结论/价值:预防优于恢复,Feature Flag 将部署事故从灾难转为非事件
说明:Summary 由模型将整篇文章的主旨、问题背景、关键方法与结论压缩为 2–4 条,便于快速检索与索引。
2) Key Claims(断言提取)
- RTO 衡量系统恢复速度:允许的最大停机时间
- RPO 衡量数据保护:可接受的最大数据丢失量
- 传统灾备聚焦硬件故障,现代风险更多来自代码变更(部署 bug、数据库迁移、AI 模型更新等)
- Feature Flag 将 RTO 从小时级降至秒级,同时保护 RPO
- 应用分层策略(Critical / Important / Nice-to-have)对应不同的 RTO/RPO 指标
说明:断言提取用于建立事实层(fact layer),后续可自动化做一致性检查与冲突检测(Contradictions 段)。
3) Key Quotes(关键引用)
- “RTO is about speed: how fast you get back online. RPO is about data: how much you can afford to lose.”
- “Deploy != Release. Feature flags change this. You can deploy code to production without releasing it to users.”
说明:保留可引用原句,便于在后续合成(如写作、演讲稿)中引用来源。
4) Key Concepts(概念抽取)
- RTO(Recovery Time Objective)
- RPO(Recovery Point Objective)
- Feature Flag(特性开关)
- Kill Switch(紧急关闭机制)
- 渐进式发布(Gradual Rollout)
说明:概念会被标准化为 wiki 的 concept 页面(wiki/concepts/),用于聚合所有提到该概念的 source 页面。
5) Key Entities(实体抽取)
- LaunchDarkly(Feature Flag 管理平台)
- HP(示例企业)
- Christian Dior(示例企业 — 文档中作为案例提及)
说明:实体会被规范化为 wiki/entities/ 下的页面,并且 source 页面会在 sources 列表保留原始链接与引用。
6) Connections(关系构建)
- RTO ← depends_on ← Feature Flag
- RPO ← depends_on ← Feature Flag
- LaunchDarkly → provides → Feature Flag
- Feature Flag ← enables ← 渐进式发布
说明:Connections 用于图谱构建(graph/graph.json),后续能在可视化页面(graph.html)展示节点与边。
7) Contradictions(冲突检测)
- 当前文档无明显与现有 wiki 冲突的声明;若检测到冲突,llm-wiki-sync 会把冲突条目列出并标注来源,供人工审查。
![[IMG-20260420160439552.png|872]]
![[IMG-20260420160439600.png]]
---
## llm-wiki-sync 的典型运行步骤(工程视角)
1. 读取 raw/<path>,解析 frontmatter/元数据(若缺失则询回填)。
2. 检索 wiki/index.md 与 overview.md,获取上下文(避免重复 ingest)。
3. 用 LLM 生成 Source Page(Summary / Key Claims / Quotes / Concepts / Entities / Connections / Contradictions)。
4. 将结果写入 wiki/sources/<slug>.md,并更新 wiki/index.md、wiki/overview.md;如有新实体/概念也生成对应页面草稿。
5. 记录日志:在 wiki/log.md 追加 ingest 记录(时间、文件、摘要、状态)。
6. 可选:触发 graph 重建(增量或全量),并把 graph/graph.json、graph.html 更新到站点。
7. 通知:完成后通过 Hermes 的通知机制(deliver=origin 或 Telegram 指定 chat)告知负责人。
并发与配额注意:单文件 ingest 优先,批量操作分批(每批 2~3 篇);对接外部 agent/Claude Code 时避免并发超配额。
审计与回滚:每次 ingest 前执行 git branch 或 checkpoint;如需回滚,可用 git revert 或恢复 checkpoint。
## 总结与扩展
- llm-wiki-sync 把 Karpathy 关于 LLM Wiki 的理念落地为可执行的工程流程:把知识以结构化表征保存,使得大模型既是“读者”也是“执行者”。
- 在 Obsidian 中可以直接通过关系图(graph view)查看笔记间的关联;在 llm-wiki-agent 中可以通过 wiki-graph 构建并在 graph.html / graph/graph.json 中可视化展示。
- 我们的实现基于 SamurAI 的 llm-wiki-agent,并在其上加入了企业级的同步、审计与 Hermes skill 封装,最终通过 Quartz 静态站把生成的 wiki 内容对外展示与分享。
---
## Infographic Asset
![llm-wiki-sync Circular Flow Infographic](IMG-20260420160439662.png)
**Infographic**: The Knowledge Pipeline Cycle — circular flow showing how llm-wiki-sync transforms scattered notes into a reusable knowledge base.
- Layout: circular-flow (7-stage cycle)
- Style: chalkboard (dark background, hand-drawn chalk accents)
- Aspect ratio: 16:9
- Prompt file: `infographic/llm-wiki-sync-circular-flow/prompts/infographic.md`
- Image: `llm-wiki-sync-circular-flow-infographic.png`

View File

@@ -1,65 +0,0 @@
# 自动分析和完善 MP3 信息的指南
## 1. 提取音频特征和元数据
使用音频指纹技术(如 **AcoustID**)来获取 MP3 文件的特征和元数据。
- **安装 Chromaprint**: 通过以下命令安装 Chromaprint。
```bash
sudo apt-get install chromaprint
```
- **生成音频指纹**: 使用 `fpcalc` 命令生成 MP3 文件的指纹。
```bash
fpcalc yourfile.mp3
```
## 2. 调用 AcoustID API
使用生成的指纹调用 AcoustID API,获取音频文件的音乐信息。示例请求:
```bash
curl -X GET "https://api.acoustid.org/v2/lookup?client=YOUR_ACOUSTID_API_KEY&format=json&duration=DURATION&fingerprint=YOUR_FINGERPRINT"
```
## 3. 从 AcoustID 获取 MusicBrainz ID
- AcoustID 的响应将包含与该指纹匹配的 MusicBrainz ID(MBID)、艺术家、专辑等信息。
## 4. 使用 MusicBrainz API 获取详细信息
使用获取的 MBID 查询详细的音乐信息:
```bash
GET https://musicbrainz.org/ws/2/artist/ARTIST_MBID?fmt=json
```
## 5. 更新 MP3 的元数据
使用 Python 的 `mutagen` 库更新 MP3 文件的元数据。示例代码如下:
```python
from mutagen.mp3 import MP3
from mutagen.id3 import ID3, TIT2, TPE1, TALB
def update_metadata(file_path, title, artist, album):
audio = MP3(file_path, ID3=ID3)
audio['TIT2'] = TIT2(encoding=3, text=title) # 标题
audio['TPE1'] = TPE1(encoding=3, text=artist) # 艺术家
audio['TALB'] = TALB(encoding=3, text=album) # 专辑
audio.save()
# 调用示例
update_metadata('yourfile.mp3', 'Correct Title', 'Correct Artist', 'Correct Album')
```
## 6. 添加专辑图片信息
可以使用 `mutagen` 库来在 MP3 文件中添加专辑图片:
```python
from mutagen.mp3 import MP3
from mutagen.id3 import ID3, APIC
def add_album_art(mp3_file, image_file):
audio = MP3(mp3_file, ID3=ID3)
with open(image_file, 'rb') as img_file:
img_data = img_file.read()
audio['APIC'] = APIC(encoding=3, mime='image/jpeg', type=3, desc='Cover', data=img_data)
audio.save()
# 调用示例
add_album_art('yourfile.mp3', 'cover_image.jpg')
```
## 7. 结论
此方法提供了一种系统化的方式来自动分析 MP3 文件并完善文件的信息,通过音乐指纹识别、使用 API 获取数据以及更新元数据的结合,实现音乐库的维护和信息准确性。

File diff suppressed because one or more lines are too long

View File

@@ -1,222 +1,222 @@
---
title: django-tenants 完整配置指南
created: 2026-04-21
tags: [django, django-tenants, postgresql, saas, multi-tenant]
category: 技术笔记
---
# django-tenants 完整配置指南
## 一、安装依赖
pip install django-tenants psycopg2-binary django-jazzmin
## 二、项目目录结构
myproject/
├── config/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── urls.py
│ └── wsgi.py
├── apps/
│ ├── tenants/
│ ├── subscription/
│ ├── accounts/
│ ├── listings/
│ ├── clients/
│ └── showings/
├── manage.py
└── requirements.txt
## 三、核心 Model:租户与域名
- Company 继承 TenantMixin
- Domain 继承 DomainMixin
- 每一个中介公司 = 一个租户 = 一个独立 PostgreSQL Schema
- 每个公司可绑定多个域名/子域名
## 四、Settings 完整配置
关键点:
- SHARED_APPS 放公共 Schema 应用
- TENANT_APPS 放租户私有应用
- TENANT_MODEL = "tenants.Company"
- TENANT_DOMAIN_MODEL = "tenants.Domain"
- DATABASES 使用 django_tenants.postgresql_backend
- DATABASE_ROUTERS 使用 TenantSyncRouter
- TenantMainMiddleware 必须第一个
- ROOT_URLCONF / PUBLIC_SCHEMA_URLCONF 分离
- AUTH_USER_MODEL = accounts.User
## 五、URL 路由拆分
- config/urls_public.py:公共域名、官网、注册、登录、超级管理后台
- config/urls_tenant.py:租户子域名、租户后台、房源/客源/带看/员工模块
## 六、自定义 User Model(跨租户关键)
- User 继承 AbstractUser
- role 支持平台超管、公司管理员、门店经理、资深经纪人、经纪人、实习经纪人
- Branch 作为门店模型
## 七、初始化与常用命令
- createdb realestate_saas
- python manage.py migrate_schemas --shared
- python manage.py createsuperuser
- python manage.py shell 创建 Company 与 Domain
示例:
- schema_name = zuoan
- domain = zuoan.localhost
- 访问 http://zuoan.localhost:8000/admin/ 进入专属后台
## 八、本地开发配置(hosts 文件)
- 127.0.0.1 localhost
- 127.0.0.1 zuoan.localhost
- 127.0.0.1 lianhe.localhost
- 127.0.0.1 xincheng.localhost
开发环境要点:
- ALLOWED_HOSTS 包含 .localhost
- 本地不用 HTTPS
## 九、数据隔离验证
使用 schema_context 切换 schema,验证 Listing 等数据互相隔离。
## 下一步建议
推荐顺序:
1. 先做房源/客源/带看完整数据模型
2. 再做 Django Admin 深度定制(Jazzmin 主题)
3. 最后补三级权限体系(总部/门店/经纪人)
---
# 上海房产中介 SaaS 系统规划
## 一、多租户架构选型
Django 多租户有三种主流方案,针对这个场景推荐独立 Schema 方案,也就是基于 PostgreSQL Schema 隔离的 django-tenants。
| 方案 | 原理 | 优点 | 缺点 | 适用场景 |
|---|---|---|---|---|
| 共享 Schema | 每张表加 tenant_id 字段 | 简单,运维成本低 | 数据隔离风险高 | 小规模、低安全需求 |
| 独立 Schema | PostgreSQL Schema 隔离 | 隔离好,性能佳 | 稍复杂 | 中介 SaaS,推荐 |
| 独立数据库 | 每租户独立 DB | 最高隔离 | 运维成本极高 | 超高安全需求 |
推荐使用 django-tenants:
pip install django-tenants
## 二、整体系统模块规划
SaaS 平台层:
- 租户注册
- 套餐管理
- 计费
- 超级后台
各中介公司 Tenant:
- 房源管理
- 客源管理
- 员工 / 权限管理
- 带看管理
- 合同管理
- 报表 / BI 看板
- 渠道推广
- 财务佣金
- 消息 / 通知中心
核心 Django App 拆分:
- tenants:租户管理(公共 Schema)
- accounts:用户 / 员工 / 角色权限
- listings:房源管理(核心)
- clients:客源 / 客户跟进
- showings:带看记录
- contracts:合同管理
- commissions:佣金 / 财务
- reports:数据报表
- notifications:消息通知
- subscription:套餐订阅(公共 Schema)
## 三、房源模块数据模型(核心)
Listing 关键字段包括:
- 基础信息:title、listing_type、status
- 上海地址结构:district、street、community、building、floor、unit
- 房屋属性:area、inner_area、layout、orientation、decoration、floor_total
- 价格:price、price_unit
- 归属:agent、source、exclusive
- 证件:certificate_no
- 时间:created_at、updated_at
## 四、技术栈推荐
后端:
- Django 5.x + DRF
- django-tenants
- django-guardian
- celery + redis
- django-filter
- PostgreSQL 15+
前端路径:
- 路径 A:Django Admin + 定制,最快上手,适合 MVP
- 路径 B:HTMX + Alpine.js + Tailwind,推荐中期方案
- 路径 C:Vue3 / React + DRF,长期推荐
建议:先 A,再 B,最后 C。
## 五、租户路由设计
通过子域名区分租户:
- company-a.yourapp.com
- company-b.yourapp.com
- admin.yourapp.com
核心设置:
- TENANT_MODEL = "tenants.Company"
- TENANT_DOMAIN_MODEL = "tenants.Domain"
- SHARED_APPS 放公共应用
- TENANT_APPS 放租户私有应用
## 六、开发阶段规划
Phase 1(1-2 月)MVP:
- 租户注册 / 登录
- 房源 CRUD + 图片上传
- 客源基础管理
- Django Admin 后台
Phase 2(2-3 月)核心业务:
- 带看流程
- 合同模板 + 生成
- 员工角色权限
- 基础报表
Phase 3(3-4 月)增长功能:
- 佣金结算
- 渠道推广(链家 / 安居客对接)
- 微信小程序端
- BI 数据看板
Phase 4 商业化:
- 套餐 / 计费系统
- 多城市扩展
## 七、优先推进建议
如果要最快落地,建议优先顺序:
1. django-tenants 完整配置
2. 房源 / 客源 / 带看数据模型
3. Django Admin 深度定制
4. 权限系统设计
5. 前端升级到 HTMX 或 Vue
---
title: django-tenants 完整配置指南
created: 2026-04-21
tags: [django, django-tenants, postgresql, saas, multi-tenant]
category: 技术笔记
---
# django-tenants 完整配置指南
## 一、安装依赖
pip install django-tenants psycopg2-binary django-jazzmin
## 二、项目目录结构
myproject/
├── config/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── urls.py
│ └── wsgi.py
├── apps/
│ ├── tenants/
│ ├── subscription/
│ ├── accounts/
│ ├── listings/
│ ├── clients/
│ └── showings/
├── manage.py
└── requirements.txt
## 三、核心 Model:租户与域名
- Company 继承 TenantMixin
- Domain 继承 DomainMixin
- 每一个中介公司 = 一个租户 = 一个独立 PostgreSQL Schema
- 每个公司可绑定多个域名/子域名
## 四、Settings 完整配置
关键点:
- SHARED_APPS 放公共 Schema 应用
- TENANT_APPS 放租户私有应用
- TENANT_MODEL = "tenants.Company"
- TENANT_DOMAIN_MODEL = "tenants.Domain"
- DATABASES 使用 django_tenants.postgresql_backend
- DATABASE_ROUTERS 使用 TenantSyncRouter
- TenantMainMiddleware 必须第一个
- ROOT_URLCONF / PUBLIC_SCHEMA_URLCONF 分离
- AUTH_USER_MODEL = accounts.User
## 五、URL 路由拆分
- config/urls_public.py:公共域名、官网、注册、登录、超级管理后台
- config/urls_tenant.py:租户子域名、租户后台、房源/客源/带看/员工模块
## 六、自定义 User Model(跨租户关键)
- User 继承 AbstractUser
- role 支持平台超管、公司管理员、门店经理、资深经纪人、经纪人、实习经纪人
- Branch 作为门店模型
## 七、初始化与常用命令
- createdb realestate_saas
- python manage.py migrate_schemas --shared
- python manage.py createsuperuser
- python manage.py shell 创建 Company 与 Domain
示例:
- schema_name = zuoan
- domain = zuoan.localhost
- 访问 http://zuoan.localhost:8000/admin/ 进入专属后台
## 八、本地开发配置(hosts 文件)
- 127.0.0.1 localhost
- 127.0.0.1 zuoan.localhost
- 127.0.0.1 lianhe.localhost
- 127.0.0.1 xincheng.localhost
开发环境要点:
- ALLOWED_HOSTS 包含 .localhost
- 本地不用 HTTPS
## 九、数据隔离验证
使用 schema_context 切换 schema,验证 Listing 等数据互相隔离。
## 下一步建议
推荐顺序:
1. 先做房源/客源/带看完整数据模型
2. 再做 Django Admin 深度定制(Jazzmin 主题)
3. 最后补三级权限体系(总部/门店/经纪人)
---
# 上海房产中介 SaaS 系统规划
## 一、多租户架构选型
Django 多租户有三种主流方案,针对这个场景推荐独立 Schema 方案,也就是基于 PostgreSQL Schema 隔离的 django-tenants。
| 方案 | 原理 | 优点 | 缺点 | 适用场景 |
|---|---|---|---|---|
| 共享 Schema | 每张表加 tenant_id 字段 | 简单,运维成本低 | 数据隔离风险高 | 小规模、低安全需求 |
| 独立 Schema | PostgreSQL Schema 隔离 | 隔离好,性能佳 | 稍复杂 | 中介 SaaS,推荐 |
| 独立数据库 | 每租户独立 DB | 最高隔离 | 运维成本极高 | 超高安全需求 |
推荐使用 django-tenants:
pip install django-tenants
## 二、整体系统模块规划
SaaS 平台层:
- 租户注册
- 套餐管理
- 计费
- 超级后台
各中介公司 Tenant:
- 房源管理
- 客源管理
- 员工 / 权限管理
- 带看管理
- 合同管理
- 报表 / BI 看板
- 渠道推广
- 财务佣金
- 消息 / 通知中心
核心 Django App 拆分:
- tenants:租户管理(公共 Schema)
- accounts:用户 / 员工 / 角色权限
- listings:房源管理(核心)
- clients:客源 / 客户跟进
- showings:带看记录
- contracts:合同管理
- commissions:佣金 / 财务
- reports:数据报表
- notifications:消息通知
- subscription:套餐订阅(公共 Schema)
## 三、房源模块数据模型(核心)
Listing 关键字段包括:
- 基础信息:title、listing_type、status
- 上海地址结构:district、street、community、building、floor、unit
- 房屋属性:area、inner_area、layout、orientation、decoration、floor_total
- 价格:price、price_unit
- 归属:agent、source、exclusive
- 证件:certificate_no
- 时间:created_at、updated_at
## 四、技术栈推荐
后端:
- Django 5.x + DRF
- django-tenants
- django-guardian
- celery + redis
- django-filter
- PostgreSQL 15+
前端路径:
- 路径 A:Django Admin + 定制,最快上手,适合 MVP
- 路径 B:HTMX + Alpine.js + Tailwind,推荐中期方案
- 路径 C:Vue3 / React + DRF,长期推荐
建议:先 A,再 B,最后 C。
## 五、租户路由设计
通过子域名区分租户:
- company-a.yourapp.com
- company-b.yourapp.com
- admin.yourapp.com
核心设置:
- TENANT_MODEL = "tenants.Company"
- TENANT_DOMAIN_MODEL = "tenants.Domain"
- SHARED_APPS 放公共应用
- TENANT_APPS 放租户私有应用
## 六、开发阶段规划
Phase 1(1-2 月)MVP:
- 租户注册 / 登录
- 房源 CRUD + 图片上传
- 客源基础管理
- Django Admin 后台
Phase 2(2-3 月)核心业务:
- 带看流程
- 合同模板 + 生成
- 员工角色权限
- 基础报表
Phase 3(3-4 月)增长功能:
- 佣金结算
- 渠道推广(链家 / 安居客对接)
- 微信小程序端
- BI 数据看板
Phase 4 商业化:
- 套餐 / 计费系统
- 多城市扩展
## 七、优先推进建议
如果要最快落地,建议优先顺序:
1. django-tenants 完整配置
2. 房源 / 客源 / 带看数据模型
3. Django Admin 深度定制
4. 权限系统设计
5. 前端升级到 HTMX 或 Vue

View File

@@ -1,98 +0,0 @@
---
title: django-tenants 完整配置指南
created: 2026-04-21
tags: [django, django-tenants, postgresql, saas, multi-tenant]
category: 技术笔记
---
# django-tenants 完整配置指南
## 一、安装依赖
pip install django-tenants psycopg2-binary django-jazzmin
## 二、项目目录结构
myproject/
├── config/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── urls.py
│ └── wsgi.py
├── apps/
│ ├── tenants/
│ ├── subscription/
│ ├── accounts/
│ ├── listings/
│ ├── clients/
│ └── showings/
├── manage.py
└── requirements.txt
## 三、核心 Model:租户与域名
- Company 继承 TenantMixin
- Domain 继承 DomainMixin
- 每一个中介公司 = 一个租户 = 一个独立 PostgreSQL Schema
- 每个公司可绑定多个域名/子域名
## 四、Settings 完整配置
关键点:
- SHARED_APPS 放公共 Schema 应用
- TENANT_APPS 放租户私有应用
- TENANT_MODEL = "tenants.Company"
- TENANT_DOMAIN_MODEL = "tenants.Domain"
- DATABASES 使用 django_tenants.postgresql_backend
- DATABASE_ROUTERS 使用 TenantSyncRouter
- TenantMainMiddleware 必须第一个
- ROOT_URLCONF / PUBLIC_SCHEMA_URLCONF 分离
- AUTH_USER_MODEL = accounts.User
## 五、URL 路由拆分
- config/urls_public.py:公共域名、官网、注册、登录、超级管理后台
- config/urls_tenant.py:租户子域名、租户后台、房源/客源/带看/员工模块
## 六、自定义 User Model(跨租户关键)
- User 继承 AbstractUser
- role 支持平台超管、公司管理员、门店经理、资深经纪人、经纪人、实习经纪人
- Branch 作为门店模型
## 七、初始化与常用命令
- createdb realestate_saas
- python manage.py migrate_schemas --shared
- python manage.py createsuperuser
- python manage.py shell 创建 Company 与 Domain
示例:
- schema_name = zuoan
- domain = zuoan.localhost
- 访问 http://zuoan.localhost:8000/admin/ 进入专属后台
## 八、本地开发配置(hosts 文件)
- 127.0.0.1 localhost
- 127.0.0.1 zuoan.localhost
- 127.0.0.1 lianhe.localhost
- 127.0.0.1 xincheng.localhost
开发环境要点:
- ALLOWED_HOSTS 包含 .localhost
- 本地不用 HTTPS
## 九、数据隔离验证
使用 schema_context 切换 schema,验证 Listing 等数据互相隔离。
## 下一步建议
推荐顺序:
1. 先做房源/客源/带看完整数据模型
2. 再做 Django Admin 深度定制(Jazzmin 主题)
3. 最后补三级权限体系(总部/门店/经纪人)