sumulige-claude 1.4.0 → 1.5.0
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.
- package/.claude/MEMORY.md +26 -0
- package/.claude/hooks/hook-registry.json +15 -0
- package/.claude/hooks/live-quality.cjs +286 -0
- package/.claude/hooks/plan-gate.cjs +173 -0
- package/.claude/hooks/pre-commit.cjs +15 -4
- package/.claude/quality-gate.json +19 -4
- package/.claude/rules/linus-style.md +54 -0
- package/.claude/settings.json +19 -1
- package/.claude/settings.local.json +12 -3
- package/.claude/skills/react-best-practices/SKILL.md +125 -0
- package/.claude/skills/threejs-fundamentals/SKILL.md +488 -0
- package/.claude/skills/web-design-guidelines/SKILL.md +39 -0
- package/AGENTS.md +0 -54
- package/CHANGELOG.md +135 -0
- package/README.md +65 -1
- package/demos/power-3d-scatter.html +683 -0
- package/package.json +1 -1
- package/prompts/linus-architect.md +71 -0
- package/scripts/sync-to-home.sh +108 -0
- package/.claude/sessions/active-sessions.json +0 -1
- package/.claude/sessions/session_2026-01-22T13-07-26-625Z.json +0 -23
- package/.claude/skills/api-tester/SKILL.md +0 -61
- package/.claude/skills/api-tester/examples/basic.md +0 -3
- package/.claude/skills/api-tester/metadata.yaml +0 -30
- package/.claude/skills/api-tester/templates/default.md +0 -3
- package/.claude/skills/code-reviewer-123/SKILL.md +0 -61
- package/.claude/skills/code-reviewer-123/examples/basic.md +0 -3
- package/.claude/skills/code-reviewer-123/metadata.yaml +0 -30
- package/.claude/skills/code-reviewer-123/templates/default.md +0 -3
- package/.claude/skills/my-skill/SKILL.md +0 -61
- package/.claude/skills/my-skill/examples/basic.md +0 -3
- package/.claude/skills/my-skill/metadata.yaml +0 -30
- package/.claude/skills/my-skill/templates/default.md +0 -3
- package/.claude/skills/test-skill-name/SKILL.md +0 -61
- package/.claude/skills/test-skill-name/examples/basic.md +0 -3
- package/.claude/skills/test-skill-name/metadata.yaml +0 -30
- package/.claude/skills/test-skill-name/templates/default.md +0 -3
package/AGENTS.md
CHANGED
|
@@ -442,12 +442,6 @@ Usage notes:
|
|
|
442
442
|
<location>project</location>
|
|
443
443
|
</skill>
|
|
444
444
|
|
|
445
|
-
<skill>
|
|
446
|
-
<name>api-tester</name>
|
|
447
|
-
<description></description>
|
|
448
|
-
<location>project</location>
|
|
449
|
-
</skill>
|
|
450
|
-
|
|
451
445
|
<skill>
|
|
452
446
|
<name>brand-guidelines</name>
|
|
453
447
|
<description>Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.</description>
|
|
@@ -460,12 +454,6 @@ Usage notes:
|
|
|
460
454
|
<location>project</location>
|
|
461
455
|
</skill>
|
|
462
456
|
|
|
463
|
-
<skill>
|
|
464
|
-
<name>code-reviewer-123</name>
|
|
465
|
-
<description></description>
|
|
466
|
-
<location>project</location>
|
|
467
|
-
</skill>
|
|
468
|
-
|
|
469
457
|
<skill>
|
|
470
458
|
<name>design-brain</name>
|
|
471
459
|
<description></description>
|
|
@@ -508,12 +496,6 @@ Usage notes:
|
|
|
508
496
|
<location>project</location>
|
|
509
497
|
</skill>
|
|
510
498
|
|
|
511
|
-
<skill>
|
|
512
|
-
<name>my-skill</name>
|
|
513
|
-
<description></description>
|
|
514
|
-
<location>project</location>
|
|
515
|
-
</skill>
|
|
516
|
-
|
|
517
499
|
<skill>
|
|
518
500
|
<name>pdf</name>
|
|
519
501
|
<description>Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.</description>
|
|
@@ -562,12 +544,6 @@ Usage notes:
|
|
|
562
544
|
<location>project</location>
|
|
563
545
|
</skill>
|
|
564
546
|
|
|
565
|
-
<skill>
|
|
566
|
-
<name>test-skill-name</name>
|
|
567
|
-
<description></description>
|
|
568
|
-
<location>project</location>
|
|
569
|
-
</skill>
|
|
570
|
-
|
|
571
547
|
<skill>
|
|
572
548
|
<name>test-workflow</name>
|
|
573
549
|
<description>Automated testing workflow that combines Playwright testing, Slack GIF recording, and test report generation. Use when user mentions "测试"、"test"、"Playwright" or asks for QA/testing workflows. Automatically generates: (1) Test execution with Playwright, (2) Slack-optimized GIF of test process, (3) Screenshot at each verification point, (4) Markdown test report with embedded screenshots.</description>
|
|
@@ -598,36 +574,6 @@ Usage notes:
|
|
|
598
574
|
<location>project</location>
|
|
599
575
|
</skill>
|
|
600
576
|
|
|
601
|
-
<skill>
|
|
602
|
-
<name>architect</name>
|
|
603
|
-
<description>|</description>
|
|
604
|
-
<location>global</location>
|
|
605
|
-
</skill>
|
|
606
|
-
|
|
607
|
-
<skill>
|
|
608
|
-
<name>builder</name>
|
|
609
|
-
<description>|</description>
|
|
610
|
-
<location>global</location>
|
|
611
|
-
</skill>
|
|
612
|
-
|
|
613
|
-
<skill>
|
|
614
|
-
<name>conductor</name>
|
|
615
|
-
<description>|</description>
|
|
616
|
-
<location>global</location>
|
|
617
|
-
</skill>
|
|
618
|
-
|
|
619
|
-
<skill>
|
|
620
|
-
<name>librarian</name>
|
|
621
|
-
<description>|</description>
|
|
622
|
-
<location>global</location>
|
|
623
|
-
</skill>
|
|
624
|
-
|
|
625
|
-
<skill>
|
|
626
|
-
<name>reviewer</name>
|
|
627
|
-
<description>|</description>
|
|
628
|
-
<location>global</location>
|
|
629
|
-
</skill>
|
|
630
|
-
|
|
631
577
|
</available_skills>
|
|
632
578
|
<!-- SKILLS_TABLE_END -->
|
|
633
579
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,138 @@
|
|
|
1
|
+
## [1.5.0](https://github.com/sumulige/sumulige-claude/compare/v1.4.1...v1.5.0) (2026-01-23)
|
|
2
|
+
|
|
3
|
+
### 🚀 三层硬质量门控系统
|
|
4
|
+
|
|
5
|
+
**问题**:规则是文档,可以忽略。代码可以直接写,无需规划。质量检查仅在提交时触发。
|
|
6
|
+
|
|
7
|
+
**解决方案**:三层硬门控,从"事后检查"变为"事前预防"。
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
11
|
+
│ Layer 1: Plan Gate (PreToolUse) │
|
|
12
|
+
│ ──────────────────────────────── │
|
|
13
|
+
│ 无批准计划 → 阻止 Write/Edit │
|
|
14
|
+
│ 检查 ~/.claude/plans/ + 项目级 .claude/plans/ │
|
|
15
|
+
│ 24小时有效期 │
|
|
16
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
17
|
+
│ Layer 2: Live Quality (PostToolUse) │
|
|
18
|
+
│ ──────────────────────────────────── │
|
|
19
|
+
│ 文件行数 ≤ 800 | 函数长度 ≤ 50 行 │
|
|
20
|
+
│ 检测硬编码密钥 | 禁止 console.log │
|
|
21
|
+
│ 即时反馈 │
|
|
22
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
23
|
+
│ Layer 3: Strict Pre-commit │
|
|
24
|
+
│ ──────────────────────────────────── │
|
|
25
|
+
│ severity: warn (更严格) │
|
|
26
|
+
│ 启用 no-console-logs + function-length 规则 │
|
|
27
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### ✨ 新增
|
|
31
|
+
|
|
32
|
+
| 文件 | 用途 |
|
|
33
|
+
|------|------|
|
|
34
|
+
| `hooks/plan-gate.cjs` | PreToolUse 强制规划检查 |
|
|
35
|
+
| `hooks/live-quality.cjs` | PostToolUse 实时质量检查 |
|
|
36
|
+
| `rules/linus-style.md` | Linus 编程哲学规则 |
|
|
37
|
+
| `prompts/linus-architect.md` | 架构师 System Prompt |
|
|
38
|
+
|
|
39
|
+
### 🔧 修改
|
|
40
|
+
|
|
41
|
+
| 文件 | 变更 |
|
|
42
|
+
|------|------|
|
|
43
|
+
| `settings.json` | 添加 PreToolUse 事件 |
|
|
44
|
+
| `hook-registry.json` | 注册 plan-gate + live-quality |
|
|
45
|
+
| `quality-gate.json` | 添加 planGate/liveQuality 配置,severity: warn |
|
|
46
|
+
| `pre-commit.cjs` | 使用配置的 severity,美化阻止提示 |
|
|
47
|
+
|
|
48
|
+
### 🎯 效果
|
|
49
|
+
|
|
50
|
+
| 指标 | 之前 | 之后 |
|
|
51
|
+
|------|------|------|
|
|
52
|
+
| 未规划的代码 | 可以提交 | 被阻止 |
|
|
53
|
+
| 超大文件 | 提交时才发现 | 写入时立即警告 |
|
|
54
|
+
| 硬编码密钥 | 可能遗漏 | 立即检测 |
|
|
55
|
+
| 质量漂移 | 渐进恶化 | 持续监控 |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## [1.4.1](https://github.com/sumulige/sumulige-claude/compare/v1.4.0...v1.4.1) (2026-01-23)
|
|
60
|
+
|
|
61
|
+
### 💡 契机
|
|
62
|
+
|
|
63
|
+
在将 sumulige-claude 配置同步到多个项目时,发现每次更新后需要手动复制 hooks/skills/templates/commands 到各项目的 `.claude/` 目录,维护成本高且容易出现配置漂移。
|
|
64
|
+
|
|
65
|
+
**问题**:
|
|
66
|
+
- 14 个项目各自维护 `.claude/` 副本
|
|
67
|
+
- 更新 sumulige-claude 后需要逐个同步
|
|
68
|
+
- 项目间配置不一致
|
|
69
|
+
|
|
70
|
+
**解决方案**:利用 Claude Code 的全局配置继承机制,实现单一真相源。
|
|
71
|
+
|
|
72
|
+
### 🏗️ 架构优化:配置分层继承
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
76
|
+
│ sumulige-claude/.claude/ (Git 仓库 - 版本控制) │
|
|
77
|
+
│ hooks/ ─────────────────────────────────────────────────────── │
|
|
78
|
+
│ skills/ ────────────────────────────────────────────────────── │ 符号链接
|
|
79
|
+
│ templates/ ─────────────────────────────────────────────────── │ ↓
|
|
80
|
+
│ commands/ ──────────────────────────────────────────────────── │
|
|
81
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
82
|
+
↓
|
|
83
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
84
|
+
│ ~/.claude/ (运行时) │
|
|
85
|
+
│ hooks/ → symlink to sumulige-claude │
|
|
86
|
+
│ skills/ → symlink to sumulige-claude │
|
|
87
|
+
│ templates/ → symlink to sumulige-claude │
|
|
88
|
+
│ commands/ → symlink to sumulige-claude │
|
|
89
|
+
│ + 运行时数据 (cache, debug, history.jsonl...) │
|
|
90
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
91
|
+
↓ 自动继承
|
|
92
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
93
|
+
│ 项目/.claude/ (仅项目特定内容) │
|
|
94
|
+
│ MEMORY.md, PROJECT_LOG.md, ANCHORS.md, CLAUDE.md │
|
|
95
|
+
│ thinking-routes/, rag/ │
|
|
96
|
+
│ ❌ 不再需要: hooks/, skills/, templates/, commands/ │
|
|
97
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### ✨ 新增
|
|
101
|
+
|
|
102
|
+
- **`scripts/sync-to-home.sh`**: 符号链接同步脚本
|
|
103
|
+
```bash
|
|
104
|
+
./scripts/sync-to-home.sh # 完整同步(链接 + 复制模板)
|
|
105
|
+
./scripts/sync-to-home.sh --link # 仅建立符号链接
|
|
106
|
+
./scripts/sync-to-home.sh --copy # 仅复制模板文件
|
|
107
|
+
./scripts/sync-to-home.sh --status # 查看当前状态
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- **`.claude/skills/template/`**: Skill 创建模板目录
|
|
111
|
+
|
|
112
|
+
### 🧹 清理
|
|
113
|
+
|
|
114
|
+
| 删除 | 原因 |
|
|
115
|
+
|------|------|
|
|
116
|
+
| `.claude/backup/` | 空目录 |
|
|
117
|
+
| `.claude/verify/` | 空目录 |
|
|
118
|
+
| `.claude/sessions/*.json` | 运行时数据 |
|
|
119
|
+
| 测试 skills (api-tester, my-skill...) | 测试数据 |
|
|
120
|
+
|
|
121
|
+
### 📚 文档更新
|
|
122
|
+
|
|
123
|
+
- **CLAUDE.md**: 更新受保护目录说明,添加全局继承注意事项
|
|
124
|
+
- **MEMORY.md**: 重置为空模板
|
|
125
|
+
|
|
126
|
+
### 🎯 收益
|
|
127
|
+
|
|
128
|
+
| 指标 | 之前 | 之后 |
|
|
129
|
+
|------|------|------|
|
|
130
|
+
| 项目 `.claude/` 文件数 | ~300 个 | ~10 个 |
|
|
131
|
+
| 更新配置需同步项目数 | 14 个 | 0 个 (自动) |
|
|
132
|
+
| 配置漂移风险 | 高 | 零 |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
1
136
|
## [1.4.0](https://github.com/sumulige/sumulige-claude/compare/v1.3.3...v1.4.0) (2026-01-23)
|
|
2
137
|
|
|
3
138
|
### 🚀 架构优化 (Token 成本降低 62%)
|
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
6. [Layer 6: Advanced / 第六层:高级配置](#layer-6-advanced--第六层高级配置)
|
|
19
19
|
7. [Layer 7: Lifecycle Hooks / 第七层:生命周期钩子](#layer-7-lifecycle-hooks--第七层生命周期钩子)
|
|
20
20
|
8. [Layer 8: Data Flow Architecture / 第八层:数据流转架构](#layer-8-data-flow-architecture--第八层数据流转架构)
|
|
21
|
-
9. [
|
|
21
|
+
9. [Layer 9: Config Inheritance / 第九层:配置分层继承](#layer-9-config-inheritance--第九层配置分层继承)
|
|
22
|
+
10. [Documentation / 文档](#documentation--文档)
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
|
@@ -557,6 +558,69 @@ smc template
|
|
|
557
558
|
|
|
558
559
|
---
|
|
559
560
|
|
|
561
|
+
## Layer 9: Config Inheritance / 第九层:配置分层继承
|
|
562
|
+
|
|
563
|
+
> v1.4.1: 单一真相源架构,零维护成本的多项目配置管理
|
|
564
|
+
|
|
565
|
+
### 架构图
|
|
566
|
+
|
|
567
|
+
```
|
|
568
|
+
sumulige-claude/.claude/ ~/.claude/ 项目/.claude/
|
|
569
|
+
(Git 仓库 - 版本控制) (运行时 - 符号链接) (项目特定)
|
|
570
|
+
│ │ │
|
|
571
|
+
├── hooks/ ─────→ symlink ────→│ │
|
|
572
|
+
├── skills/ ────→ symlink ────→│ 自动继承 │
|
|
573
|
+
├── templates/ ─→ symlink ────→│ ─────────────────────→│
|
|
574
|
+
├── commands/ ──→ symlink ────→│ │
|
|
575
|
+
│ │ │
|
|
576
|
+
└── *.md ────────→ 复制 ──────→│ │
|
|
577
|
+
│ │
|
|
578
|
+
├── cache/ ├── MEMORY.md
|
|
579
|
+
├── debug/ ├── PROJECT_LOG.md
|
|
580
|
+
└── history.jsonl └── thinking-routes/
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### 使用方式
|
|
584
|
+
|
|
585
|
+
```bash
|
|
586
|
+
# 首次设置:建立符号链接
|
|
587
|
+
cd ~/Documents/Antigravity/sumulige-claude
|
|
588
|
+
./scripts/sync-to-home.sh
|
|
589
|
+
|
|
590
|
+
# 日常更新:修改 sumulige-claude 后自动生效
|
|
591
|
+
git pull # 所有项目自动获得最新配置!
|
|
592
|
+
|
|
593
|
+
# 更新模板文件(CLAUDE.md, MEMORY.md 等)
|
|
594
|
+
./scripts/sync-to-home.sh --copy
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
### 项目配置精简
|
|
598
|
+
|
|
599
|
+
**之前**:每个项目复制完整 `.claude/` (~300 个文件)
|
|
600
|
+
|
|
601
|
+
**之后**:项目只保留特定内容 (~10 个文件)
|
|
602
|
+
|
|
603
|
+
```
|
|
604
|
+
项目/.claude/
|
|
605
|
+
├── MEMORY.md # 项目记忆
|
|
606
|
+
├── PROJECT_LOG.md # 项目日志
|
|
607
|
+
├── ANCHORS.md # 项目锚点
|
|
608
|
+
├── CLAUDE.md # 项目配置 (继承+覆盖)
|
|
609
|
+
├── thinking-routes/ # 思维轨迹
|
|
610
|
+
└── rag/ # 项目 RAG 索引
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
### 收益
|
|
614
|
+
|
|
615
|
+
| 指标 | 传统方式 | 分层继承 |
|
|
616
|
+
|------|---------|---------|
|
|
617
|
+
| 配置同步 | 手动复制到每个项目 | 自动(符号链接) |
|
|
618
|
+
| 更新成本 | O(n) 项目数 | O(1) |
|
|
619
|
+
| 配置漂移 | 容易发生 | 不可能 |
|
|
620
|
+
| 存储空间 | 每项目 ~5MB | 每项目 ~50KB |
|
|
621
|
+
|
|
622
|
+
---
|
|
623
|
+
|
|
560
624
|
## Documentation / 文档
|
|
561
625
|
|
|
562
626
|
- **[Development Guide / 开发指南](docs/DEVELOPMENT.md)** - Architecture, adding skills / 架构、添加技能
|