Write technical blog posts with source code analysis OR doc-driven research...
file:line citations# [Topic] Deep Dive
Brief intro + why it matters.
> **Code Version**: Based on [project] `vX.Y.Z` (commit `abc1234`).
## 1. Introduction (problem + scope + navigation table)
## 2-N. Core Content (by data flow, not code structure)
## N+1. Design Decisions & Trade-offs
## N+2. Code Index (file, lines, responsibility)
## References
> โญ๏ธ First-time readers: skip to ยงX.โญ๏ธ| Source | When | Examples |
|---|---|---|
| Source code | Project-specific logic, defaults, file paths | Config params, implementation variants |
| Knowledge | Standard protocols, well-known algorithms | ES DSL, HTTP, B+ tree |
| Doc-driven | No source code; external systems | Official docs โ vendor blogs โ community |
Doc-driven rules: extract claim list โ cite at claim location โ reference-style links [Label]: URL โ separate fact vs. inference โ never fabricate numbers.
file_path:line_numberAll diagrams must use rich color styling. Monotone = rejected.
Color Palette
| Role | Fill | Stroke | Text |
|---|---|---|---|
| Primary Actor | #6C5CE7 |
#5A4BD1 |
#fff |
| Core Component | #0984E3 |
#0770C2 |
#fff |
| Service / Hub | #00B894 |
#009D7E |
#fff |
| Helper / Auxiliary | #FDCB6E |
#E0B050 |
#2D3436 |
| External / Remote | #E17055 |
#C0392B |
#fff |
| Data Store | #636E72 |
#2D3436 |
#fff |
| Output / Sink | #55EFC4 |
#00B894 |
#2D3436 |
| Light Accent | #74B9FF |
#0984E3 |
#2D3436 |
graph / flowchart โ every node styled; subgraphs: named ID + emoji label + colored bg
graph TB
subgraph local["๐ฅ๏ธ Local"]
A["Component A"]
B["Component B"]
end
subgraph remote["๐ฑ Remote"]
C["Client"]
end
A --> B --> C
style A fill:#0984E3,stroke:#0770C2,color:#fff,stroke-width:2px
style B fill:#00B894,stroke:#009D7E,color:#fff,stroke-width:2px
style C fill:#E17055,stroke:#C0392B,color:#fff,stroke-width:2px
style local fill:#DFE6E9,stroke:#636E72,stroke-width:2px,color:#2D3436
style remote fill:#FAD7D4,stroke:#E17055,stroke-width:2px,color:#2D3436
sequenceDiagram โ box rgb() per layer + emoji participants
sequenceDiagram
box rgb(232,245,253) CLI Side
participant CLI as ๐ง CLI
end
box rgb(220,247,235) Hub Side
participant Hub as ๐ Hub
end
CLI->>Hub: request
Hub-->>CLI: response
Box colors: CLI rgb(232,245,253) ยท Hub rgb(220,247,235) ยท Web rgb(255,235,238) ยท Agent rgb(237,231,246) ยท User rgb(255,243,224)
stateDiagram-v2 โ classDef per category + class binding
stateDiagram-v2
[*] --> Active
Active --> Idle : timeout
classDef activeStyle fill:#0984E3,color:#fff,stroke:#0770C2,stroke-width:2px
classDef idleStyle fill:#6C5CE7,color:#fff,stroke:#5A4BD1,stroke-width:2px
class Active activeStyle
class Idle idleStyle
Rules: step numbers for complex flows (A -->|1. Do X| B) ยท emoji in labels ยท no unstyled diagrams
| Pitfall | Fix |
|---|---|
| Abrupt transitions | Connection sentences between sections |
| One-sided comparison | Comparison table, analyze both sides |
| Code without context | Explain role in the system |
| Too much source code | Diagram + key snippet |
| Undefined concepts | Concept section before use |
| Missing big picture | Unified visual overview first |
| Fabricated data | Qualitative language or cite source |
| Missing commit id | Always specify for external repos |
| Monotone diagrams | Full Mermaid styling standard |
Draft-first: [topic]-DRAFT.md โ build โ review โ merge โ delete draft.
โญ๏ธ navigation hintsfile:line; 1-2 concrete examples per sectiondocs/, ai_docs/, or project folder[topic-name].md