-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path1.html
More file actions
412 lines (391 loc) · 13.3 KB
/
1.html
File metadata and controls
412 lines (391 loc) · 13.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>Superpowers · 架构与流程深度解析</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #f5f3f0;
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', sans-serif;
display: flex;
justify-content: center;
align-items: flex-start;
min-height: 100vh;
padding: 2rem 1.5rem;
color: #2d2a26;
line-height: 1.5;
}
.container {
max-width: 1300px;
width: 100%;
background: rgba(255, 251, 245, 0.9);
backdrop-filter: blur(20px);
border-radius: 2.5rem;
padding: 2.5rem 2rem;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
border: 1px solid rgba(180, 160, 130, 0.2);
}
h1 {
font-size: 2.8rem;
font-weight: 600;
letter-spacing: -0.5px;
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.5rem;
color: #1e1b18;
}
h1 span {
background: #d44c2f;
color: white;
font-size: 1.8rem;
padding: 0.2rem 1rem;
border-radius: 3rem;
letter-spacing: 0.5px;
}
.subtitle {
font-size: 1.2rem;
color: #5f5547;
margin-bottom: 2.5rem;
border-left: 4px solid #d44c2f;
padding-left: 1.2rem;
font-weight: 400;
}
/* 流程图区域 */
.flow-section {
background: #fefaf2;
border-radius: 2rem;
padding: 2rem 1.5rem;
margin-bottom: 2.5rem;
border: 1px solid #e7dbcd;
box-shadow: 0 10px 25px -8px rgba(0,0,0,0.05);
}
.flow-title {
font-size: 1.6rem;
font-weight: 600;
margin-bottom: 1.8rem;
display: flex;
align-items: center;
gap: 0.5rem;
color: #3a332b;
}
.pipeline {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: flex-start;
gap: 1rem;
margin: 1.5rem 0;
}
.step {
background: white;
border-radius: 1.8rem;
padding: 1.4rem 1rem;
flex: 1 1 160px;
min-width: 140px;
text-align: center;
box-shadow: 0 8px 18px rgba(0,0,0,0.04);
border: 1px solid #e1d6c7;
transition: all 0.2s ease;
position: relative;
}
.step:hover {
transform: translateY(-3px);
border-color: #d44c2f;
box-shadow: 0 15px 25px rgba(212, 76, 47, 0.12);
}
.step-icon {
font-size: 2rem;
margin-bottom: 0.5rem;
}
.step-name {
font-weight: 700;
font-size: 1.1rem;
color: #2b241e;
margin-bottom: 0.4rem;
}
.step-eng {
font-size: 0.8rem;
color: #b28b6f;
text-transform: uppercase;
letter-spacing: 0.3px;
margin-bottom: 0.6rem;
}
.step-desc {
font-size: 0.85rem;
color: #5c5143;
line-height: 1.4;
}
.arrow-symbol {
display: flex;
align-items: center;
font-size: 1.8rem;
color: #c9b392;
font-weight: 300;
margin: 0 -0.2rem;
}
/* 核心架构卡片 */
.architecture-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin-top: 1.5rem;
}
.arch-card {
background: white;
border-radius: 1.5rem;
padding: 1.5rem;
border: 1px solid #e2d6c8;
transition: 0.2s;
box-shadow: 0 6px 14px rgba(0,0,0,0.03);
}
.arch-card:hover {
border-color: #c7a88b;
background: #fffdf7;
}
.arch-card h3 {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: 0.8rem;
display: flex;
align-items: center;
gap: 0.4rem;
}
.arch-card p, .arch-card ul {
font-size: 0.9rem;
color: #4a4036;
}
.arch-card ul {
padding-left: 1.3rem;
margin-top: 0.5rem;
}
.arch-card li {
margin-bottom: 0.35rem;
}
.badge {
background: #efe3d4;
color: #5b3e2b;
padding: 0.15rem 0.7rem;
border-radius: 2rem;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.4px;
margin-left: 0.5rem;
}
hr {
border: 0.5px solid #e1d5c5;
margin: 2rem 0 1.2rem;
}
.two-column {
display: flex;
flex-wrap: wrap;
gap: 2rem;
margin-top: 1rem;
}
.col {
flex: 1 1 280px;
}
.highlight {
background: #fff1e5;
border-left: 4px solid #d44c2f;
padding: 1rem 1.3rem;
border-radius: 0.8rem;
margin: 1.8rem 0;
font-weight: 500;
color: #482c1b;
}
@media (max-width: 700px) {
body { padding: 1rem; }
.container { padding: 1.8rem 1rem; }
h1 { font-size: 2rem; }
.pipeline { flex-direction: column; align-items: center; }
.arrow-symbol { transform: rotate(90deg); margin: 0.2rem 0; }
}
</style>
</head>
<body>
<div class="container">
<h1>
⚡Superpowers
<span>深度架构</span>
</h1>
<div class="subtitle">
一套让编程智能体遵循严格工程纪律的代理技能框架 · 子智能体驱动开发
</div>
<!-- 核心流程:7步工作流 -->
<div class="flow-section">
<div class="flow-title">
<span>🔄 核心开发流水线</span>
<span class="badge">强制顺序 · 不可跳过</span>
</div>
<div class="pipeline">
<div class="step">
<div class="step-icon">🧠</div>
<div class="step-name">头脑风暴</div>
<div class="step-eng">brainstorming</div>
<div class="step-desc">苏格拉底式提问,提炼模糊想法为清晰规格</div>
</div>
<div class="arrow-symbol">→</div>
<div class="step">
<div class="step-icon">🌿</div>
<div class="step-name">Git工作树</div>
<div class="step-eng">using-git-worktrees</div>
<div class="step-desc">创建隔离分支,验证干净测试基线</div>
</div>
<div class="arrow-symbol">→</div>
<div class="step">
<div class="step-icon">📋</div>
<div class="step-name">编写计划</div>
<div class="step-eng">writing-plans</div>
<div class="step-desc">拆分2-5分钟任务,精确到文件路径和验证</div>
</div>
<div class="arrow-symbol">→</div>
<div class="step">
<div class="step-icon">🤖</div>
<div class="step-name">子智能体执行</div>
<div class="step-eng">subagent-driven-dev</div>
<div class="step-desc">每个任务分派新子智能体,两阶段审查</div>
</div>
<div class="arrow-symbol">→</div>
<div class="step">
<div class="step-icon">🧪</div>
<div class="step-name">测试驱动开发</div>
<div class="step-eng">TDD</div>
<div class="step-desc">红-绿-重构,禁止先写代码</div>
</div>
<div class="arrow-symbol">→</div>
<div class="step">
<div class="step-icon">🔍</div>
<div class="step-name">代码审查</div>
<div class="step-eng">requesting-code-review</div>
<div class="step-desc">对照计划检查,严重问题阻断进度</div>
</div>
<div class="arrow-symbol">→</div>
<div class="step">
<div class="step-icon">🏁</div>
<div class="step-name">完成分支</div>
<div class="step-eng">finishing-branch</div>
<div class="step-desc">验证测试,合并/PR/丢弃决策</div>
</div>
</div>
<div class="highlight" style="margin-top: 1.5rem;">
💡 <strong>智能体会在每个任务前自动检查相关技能</strong> —— 这不是建议,而是强制工作流。
</div>
</div>
<!-- 整体架构:技能库 + 哲学 -->
<div style="margin: 2rem 0 1rem;">
<h2 style="font-size: 1.8rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem;">
🧱 架构设计 · 技能库全景
</h2>
</div>
<div class="architecture-grid">
<div class="arch-card">
<h3>🧪 测试技能</h3>
<p><strong>test-driven-development</strong> 强制红-绿-重构循环,包含反模式参考。</p>
<ul>
<li>先写失败测试</li>
<li>最小代码实现</li>
<li>提交前删除非测试代码</li>
</ul>
</div>
<div class="arch-card">
<h3>🐞 调试技能</h3>
<p><strong>systematic-debugging</strong> 四阶段根因分析 + <strong>verification-before-completion</strong> 验证修复。</p>
<ul>
<li>根因追踪</li>
<li>纵深防御</li>
<li>条件等待技术</li>
</ul>
</div>
<div class="arch-card">
<h3>🤝 协作技能组</h3>
<p>核心子智能体编排层:</p>
<ul>
<li><strong>subagent-driven-development</strong> ⭐</li>
<li><strong>executing-plans</strong> (人工检查点)</li>
<li><strong>dispatching-parallel-agents</strong></li>
<li><strong>requesting-code-review</strong></li>
<li><strong>receiving-code-review</strong></li>
<li><strong>using-git-worktrees</strong></li>
</ul>
</div>
<div class="arch-card">
<h3>📘 元技能</h3>
<p><strong>writing-skills</strong> 指导创建新技能(含测试方法)。</p>
<p><strong>using-superpowers</strong> 系统介绍。</p>
<p style="margin-top:0.5rem; font-size:0.8rem; color:#8b7355;">确保所有技能跨平台一致</p>
</div>
</div>
<!-- 深入:子智能体机制与上下文管理 -->
<div style="margin-top: 2.5rem;">
<h2 style="font-size: 1.8rem; font-weight: 600; margin-bottom: 1.2rem;">⚙️ 子智能体机制 · 上下文与质量保障</h2>
<div class="two-column">
<div class="col">
<div class="arch-card" style="height: 100%;">
<h3>🧩 为什么必须用子智能体?</h3>
<p><strong>上下文隔离:</strong>每个子智能体启动时拥有全新干净上下文,仅包含当前任务文件与规范。</p>
<p><strong>防止窗口爆炸:</strong>主智能体不携带历史细节,只充当协调者。</p>
<p><strong>专注执行:</strong>2-5分钟微小任务,避免分心。</p>
<p style="margin-top:0.8rem;"><strong>两阶段审查:</strong></p>
<ul>
<li>① 规范合规检查</li>
<li>② 代码质量检查</li>
</ul>
<p>任何严重问题都会阻止继续前进。</p>
</div>
</div>
<div class="col">
<div class="arch-card" style="height: 100%;">
<h3>📊 计划是唯一真相源</h3>
<p>每个任务精确包含:</p>
<ul>
<li><strong>完整文件路径</strong></li>
<li><strong>预期代码或指令</strong></li>
<li><strong>验证步骤</strong></li>
</ul>
<p>子智能体无需理解全局,只需忠实执行片段。</p>
<div class="highlight" style="margin-top:1rem; padding:0.7rem;">
✨ 实现<strong>数小时自主开发</strong>而不偏离计划。
</div>
</div>
</div>
</div>
</div>
<!-- 设计哲学 -->
<hr>
<div>
<h2 style="font-size: 1.6rem; font-weight: 600; margin-bottom: 1rem;">📜 设计哲学</h2>
<div style="display: flex; flex-wrap: wrap; gap: 1rem;">
<div style="background: #f3ede5; border-radius: 2rem; padding: 0.7rem 1.4rem; font-weight: 500;">🔴 测试驱动开发</div>
<div style="background: #f3ede5; border-radius: 2rem; padding: 0.7rem 1.4rem; font-weight: 500;">📐 系统化 > 临时应对</div>
<div style="background: #f3ede5; border-radius: 2rem; padding: 0.7rem 1.4rem; font-weight: 500;">🧹 复杂度缩减</div>
<div style="background: #f3ede5; border-radius: 2rem; padding: 0.7rem 1.4rem; font-weight: 500;">🔎 证据 > 声称</div>
</div>
<p style="margin-top: 1.2rem; color: #5e4e3a;">
YAGNI (你不会需要它) · DRY (不要重复自己) · 始终验证后再宣布成功。
</p>
</div>
<!-- 安装与跨平台支持说明 -->
<hr>
<div style="display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start;">
<div style="flex:1;">
<h3 style="font-weight: 600; margin-bottom: 0.5rem;">🔌 安装方式</h3>
<p style="font-size:0.9rem;">支持 Claude Code 官方市场、Codex、Cursor、OpenCode、Gemini CLI 等。每个平台需单独安装。</p>
</div>
<div style="flex:1;">
<h3 style="font-weight: 600; margin-bottom: 0.5rem;">🧰 技能触发</h3>
<p style="font-size:0.9rem;">所有技能<strong>自动触发</strong>,无需手动调用。代理会在执行任务前检查相关技能。</p>
</div>
</div>
<div style="margin-top: 2rem; text-align: center; color: #8e7a64; font-size: 0.85rem; border-top: 1px solid #e2d6c8; padding-top: 1.5rem;">
Superpowers by Jesse Vincent · 代理技能框架 · 适用于生产级 AI 辅助开发
</div>
</div>
</body>
</html>