aico-cli 2.0.38 → 2.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,165 @@
1
+ # 设计系统详解
2
+
3
+ 技术白皮书的视觉设计系统,基于现代简约风格构建。
4
+
5
+ ## 设计原则
6
+
7
+ ### 以读者为中心
8
+ - 每个视觉元素服务于信息传达
9
+ - 杜绝无意义的装饰
10
+ - 清晰的视觉层级引导阅读
11
+
12
+ ### 统一视觉语言
13
+ - 全文档保持一致的样式
14
+ - CSS变量驱动,易于定制
15
+ - 响应式适配多端阅读
16
+
17
+ ## CSS变量定制
18
+
19
+ ### 品牌色
20
+ ```css
21
+ :root {
22
+ --brand-primary: #2563eb; /* 主品牌色 - 链接、按钮、强调 */
23
+ --brand-secondary: #1e40af; /* 次品牌色 - hover状态 */
24
+ --brand-accent: #3b82f6; /* 点缀色 - 高亮元素 */
25
+ }
26
+ ```
27
+
28
+ **定制示例**:
29
+ - 科技蓝: `#2563eb` (默认)
30
+ - 商务绿: `#059669`
31
+ - 活力橙: `#ea580c`
32
+ - 专业紫: `#7c3aed`
33
+
34
+ ### 文字色
35
+ ```css
36
+ :root {
37
+ --text-primary: #111827; /* 标题、重要文字 */
38
+ --text-secondary: #4b5563; /* 正文、段落 */
39
+ --text-muted: #9ca3af; /* 辅助文字、图注 */
40
+ }
41
+ ```
42
+
43
+ ### 间距系统
44
+ ```css
45
+ :root {
46
+ --space-xs: 8px; /* 紧凑间距 */
47
+ --space-sm: 16px; /* 小间距 */
48
+ --space-md: 24px; /* 中等间距 */
49
+ --space-lg: 48px; /* 大间距 */
50
+ --space-xl: 80px; /* 章节间距 */
51
+ }
52
+ ```
53
+
54
+ ## 布局结构
55
+
56
+ ### 单栏居中布局
57
+ ```css
58
+ .container {
59
+ max-width: 900px; /* 最佳阅读宽度 */
60
+ margin: 0 auto;
61
+ padding: 0 24px;
62
+ }
63
+ ```
64
+
65
+ ### 章节结构
66
+ ```html
67
+ <section id="section-id">
68
+ <span class="section-label">Section 01</span>
69
+ <h2>章节标题</h2>
70
+ <p class="lead">导语段落,字体稍大</p>
71
+ <p>正文内容...</p>
72
+ </section>
73
+ ```
74
+
75
+ ## 组件使用
76
+
77
+ ### 特性卡片网格
78
+ 用于展示3-6个核心特性:
79
+ ```html
80
+ <div class="feature-grid">
81
+ <div class="feature-card">
82
+ <h4>🔗 特性标题</h4>
83
+ <p>特性描述文字</p>
84
+ </div>
85
+ <!-- 更多卡片 -->
86
+ </div>
87
+ ```
88
+
89
+ ### 图片与图注
90
+ 单图:
91
+ ```html
92
+ <figure>
93
+ <img src="path/to/image.png" alt="描述">
94
+ <figcaption>图 X-X: 图片说明</figcaption>
95
+ </figure>
96
+ ```
97
+
98
+ 双图并排:
99
+ ```html
100
+ <div class="image-grid">
101
+ <figure>
102
+ <img src="image1.png" alt="">
103
+ <figcaption>图 X-1: 说明1</figcaption>
104
+ </figure>
105
+ <figure>
106
+ <img src="image2.png" alt="">
107
+ <figcaption>图 X-2: 说明2</figcaption>
108
+ </figure>
109
+ </div>
110
+ ```
111
+
112
+ ### 提示框
113
+ ```html
114
+ <div class="callout">
115
+ <p><strong>提示:</strong>重要信息内容</p>
116
+ </div>
117
+ ```
118
+
119
+ ### 表格
120
+ ```html
121
+ <div class="table-wrapper">
122
+ <table>
123
+ <thead>
124
+ <tr><th>列1</th><th>列2</th></tr>
125
+ </thead>
126
+ <tbody>
127
+ <tr><td>数据1</td><td>数据2</td></tr>
128
+ </tbody>
129
+ </table>
130
+ </div>
131
+ ```
132
+
133
+ ## 交互功能
134
+
135
+ ### 图片灯箱
136
+ - 悬停放大:`scale(1.02)` + 阴影增强
137
+ - 点击查看:全屏遮罩 + 居中大图
138
+ - 关闭方式:点击遮罩 / 按ESC键
139
+
140
+ ### 目录导航
141
+ - 锚点跳转到各章节
142
+ - 编号 + 标题组合
143
+ - 响应式网格布局
144
+
145
+ ## 响应式断点
146
+
147
+ ```css
148
+ @media (max-width: 768px) {
149
+ /* 移动端适配 */
150
+ .image-grid {
151
+ grid-template-columns: 1fr; /* 单列显示 */
152
+ }
153
+ .hero h1 {
154
+ font-size: 2rem; /* 缩小标题 */
155
+ }
156
+ }
157
+ ```
158
+
159
+ ## 最佳实践
160
+
161
+ 1. **标题层级**:h1仅用于产品名,h2用于章节,h3用于子标题
162
+ 2. **图片命名**:使用中文描述性名称,如"智能体市场.png"
163
+ 3. **Emoji使用**:特性卡片标题前加emoji增加视觉区分
164
+ 4. **段落长度**:每段3-5句,避免大段文字
165
+ 5. **留白控制**:章节间使用`--space-xl`,内容间使用`--space-md`
@@ -0,0 +1,195 @@
1
+ # Mermaid 架构图模式
2
+
3
+ 技术白皮书中常用的 Mermaid 图表模式,确保正确渲染。
4
+
5
+ ## 关键配置
6
+
7
+ ### HTML 容器
8
+ **必须使用 `<pre>` 标签**,不要使用 `<div>`:
9
+ ```html
10
+ <pre class="mermaid">
11
+ flowchart TB
12
+ A --> B
13
+ </pre>
14
+ ```
15
+
16
+ ### 代码格式
17
+ - **无缩进**:Mermaid代码从第一列开始
18
+ - **简化标签**:避免特殊字符和过长文字
19
+ - **使用引号**:节点标签用双引号包裹
20
+
21
+ ### Mermaid 初始化
22
+ ```javascript
23
+ mermaid.initialize({
24
+ startOnLoad: true,
25
+ securityLevel: 'loose', // 必须设置
26
+ theme: 'neutral',
27
+ flowchart: {
28
+ useMaxWidth: true,
29
+ htmlLabels: true, // 必须开启
30
+ curve: 'basis',
31
+ padding: 20
32
+ }
33
+ });
34
+ ```
35
+
36
+ ## 常用图表模式
37
+
38
+ ### 1. 系统架构图(分层)
39
+ ```
40
+ flowchart TB
41
+ subgraph Client["客户端层"]
42
+ Web["Web Console"]
43
+ Mobile["Mobile App"]
44
+ API["API Client"]
45
+ end
46
+ subgraph Gateway["网关层"]
47
+ Nginx["Nginx"]
48
+ end
49
+ subgraph Backend["后端服务层"]
50
+ Core["核心服务"]
51
+ Service1["服务1"]
52
+ Service2["服务2"]
53
+ end
54
+ subgraph Data["数据层"]
55
+ DB["数据库"]
56
+ Cache["缓存"]
57
+ end
58
+ Client --> Gateway
59
+ Gateway --> Backend
60
+ Backend --> Data
61
+ ```
62
+
63
+ ### 2. 流程图(决策分支)
64
+ ```
65
+ flowchart TB
66
+ Start((开始)) --> Input["输入数据"]
67
+ Input --> Check{条件判断?}
68
+ Check -->|是| ProcessA["处理A"]
69
+ Check -->|否| ProcessB["处理B"]
70
+ ProcessA --> Result["输出结果"]
71
+ ProcessB --> Result
72
+ Result --> End((结束))
73
+ style Start fill:#22c55e
74
+ style End fill:#ef4444
75
+ ```
76
+
77
+ ### 3. 数据流图(左到右)
78
+ ```
79
+ flowchart LR
80
+ Input["用户输入"] --> Process1["预处理"]
81
+ Process1 --> Process2["核心处理"]
82
+ Process2 --> Output["输出结果"]
83
+ style Input fill:#3b82f6,color:#fff
84
+ style Output fill:#22c55e,color:#fff
85
+ ```
86
+
87
+ ### 4. 智能体架构图
88
+ ```
89
+ flowchart LR
90
+ subgraph Manager["管理器"]
91
+ Register["注册"]
92
+ Lifecycle["生命周期"]
93
+ Monitor["监控"]
94
+ end
95
+ subgraph Agents["智能体"]
96
+ Agent1["Agent 1"]
97
+ Agent2["Agent 2"]
98
+ Agent3["Agent 3"]
99
+ end
100
+ subgraph Tools["工具系统"]
101
+ Tool1["工具1"]
102
+ Tool2["工具2"]
103
+ end
104
+ Manager --> Agents
105
+ Agents --> Tools
106
+ ```
107
+
108
+ ### 5. RAG 检索流程
109
+ ```
110
+ flowchart TB
111
+ Query["用户查询"] --> Keywords["关键词生成"]
112
+ subgraph Retrieval["双路召回"]
113
+ Keywords --> Vector["向量搜索"]
114
+ Keywords --> Graph["图谱搜索"]
115
+ end
116
+ Vector --> Merge["结果合并"]
117
+ Graph --> Merge
118
+ Merge --> Rerank["重排序"]
119
+ Rerank --> Response["生成响应"]
120
+ style Query fill:#3b82f6,color:#fff
121
+ style Response fill:#22c55e,color:#fff
122
+ ```
123
+
124
+ ### 6. 部署架构图
125
+ ```
126
+ flowchart LR
127
+ subgraph Dev["开发环境"]
128
+ D1["docker-compose"]
129
+ D2["热更新"]
130
+ end
131
+ subgraph Staging["测试环境"]
132
+ S1["K8s Staging"]
133
+ end
134
+ subgraph Prod["生产环境"]
135
+ P1["K8s Cluster"]
136
+ P2["CDN"]
137
+ end
138
+ Dev --> Staging
139
+ Staging --> Prod
140
+ ```
141
+
142
+ ### 7. 路由决策流程
143
+ ```
144
+ flowchart TB
145
+ Request["请求"] --> Cache{缓存命中?}
146
+ Cache -->|是| Return["返回缓存"]
147
+ Cache -->|否| Analyze["分析请求"]
148
+ Analyze --> Route{路由决策}
149
+ Route -->|类型A| ModelA["模型A"]
150
+ Route -->|类型B| ModelB["模型B"]
151
+ Route -->|默认| Default["默认模型"]
152
+ ModelA --> Execute["执行"]
153
+ ModelB --> Execute
154
+ Default --> Execute
155
+ Execute --> Return
156
+ ```
157
+
158
+ ## 样式定制
159
+
160
+ ### 节点颜色
161
+ ```
162
+ style NodeId fill:#颜色,color:#文字色
163
+ ```
164
+
165
+ 常用配色:
166
+ - 起点:`fill:#22c55e` (绿色)
167
+ - 终点:`fill:#ef4444` (红色)
168
+ - 强调:`fill:#3b82f6,color:#fff` (蓝色)
169
+ - 成功:`fill:#22c55e,color:#fff` (绿色)
170
+
171
+ ### subgraph 分组
172
+ ```
173
+ subgraph GroupName["显示标题"]
174
+ Node1["节点1"]
175
+ Node2["节点2"]
176
+ end
177
+ ```
178
+
179
+ ## 常见问题
180
+
181
+ ### 图表显示为代码文本
182
+ 1. 检查是否使用 `<pre class="mermaid">` 而非 `<div>`
183
+ 2. 确认 `securityLevel: 'loose'` 已设置
184
+ 3. 确认 `htmlLabels: true` 已开启
185
+ 4. 检查代码是否有缩进(必须从第一列开始)
186
+
187
+ ### 节点标签显示异常
188
+ - 避免使用特殊字符:`< > { } | &`
189
+ - 使用双引号包裹标签:`Node["标签文字"]`
190
+ - 简化标签文字,避免过长
191
+
192
+ ### 连接线显示问题
193
+ - 使用 `-->` 实线箭头
194
+ - 使用 `-.->` 虚线箭头
195
+ - 使用 `---` 无箭头连线