sumulige-claude 1.5.1 → 1.6.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/hooks/hook-registry.json +0 -15
- package/.claude/rules/coding-style.md +18 -7
- package/.claude/rules/hooks.md +15 -4
- package/.claude/rules/performance.md +15 -5
- package/.claude/rules/security.md +140 -4
- package/.claude/rules/testing.md +138 -9
- package/.claude/rules/web-design-standard.md +16 -5
- package/.claude/skills/algorithmic-art/metadata.yaml +28 -0
- package/.claude/skills/api-tester/SKILL.md +61 -0
- package/.claude/skills/api-tester/examples/basic.md +3 -0
- package/.claude/skills/api-tester/metadata.yaml +30 -0
- package/.claude/skills/api-tester/templates/default.md +3 -0
- package/.claude/skills/brand-guidelines/metadata.yaml +26 -0
- package/.claude/skills/canvas-design/metadata.yaml +27 -0
- package/.claude/skills/code-reviewer-123/SKILL.md +61 -0
- package/.claude/skills/code-reviewer-123/examples/basic.md +3 -0
- package/.claude/skills/code-reviewer-123/metadata.yaml +30 -0
- package/.claude/skills/code-reviewer-123/templates/default.md +3 -0
- package/.claude/skills/doc-coauthoring/metadata.yaml +27 -0
- package/.claude/skills/docx/metadata.yaml +30 -0
- package/.claude/skills/frontend-design/metadata.yaml +28 -0
- package/.claude/skills/internal-comms/metadata.yaml +28 -0
- package/.claude/skills/mcp-builder/metadata.yaml +26 -0
- package/.claude/skills/my-skill/SKILL.md +61 -0
- package/.claude/skills/my-skill/examples/basic.md +3 -0
- package/.claude/skills/my-skill/metadata.yaml +30 -0
- package/.claude/skills/my-skill/templates/default.md +3 -0
- package/.claude/skills/pdf/metadata.yaml +29 -0
- package/.claude/skills/pptx/metadata.yaml +29 -0
- package/.claude/skills/react-best-practices/metadata.yaml +26 -0
- package/.claude/skills/react-node-practices/SKILL.md +409 -0
- package/.claude/skills/react-node-practices/metadata.yaml +56 -0
- package/.claude/skills/skill-creator/metadata.yaml +25 -0
- package/.claude/skills/slack-gif-creator/metadata.yaml +28 -0
- package/.claude/skills/test-skill-name/SKILL.md +61 -0
- package/.claude/skills/test-skill-name/examples/basic.md +3 -0
- package/.claude/skills/test-skill-name/metadata.yaml +30 -0
- package/.claude/skills/test-skill-name/templates/default.md +3 -0
- package/.claude/skills/test-workflow/metadata.yaml +32 -0
- package/.claude/skills/theme-factory/metadata.yaml +26 -0
- package/.claude/skills/threejs-fundamentals/metadata.yaml +27 -0
- package/.claude/skills/web-artifacts-builder/metadata.yaml +30 -0
- package/.claude/skills/web-design-guidelines/metadata.yaml +26 -0
- package/.claude/skills/webapp-testing/metadata.yaml +26 -0
- package/.claude/skills/xlsx/metadata.yaml +29 -0
- package/LICENSE +21 -0
- package/README.md +280 -529
- package/cli.js +19 -3
- package/package.json +29 -3
- package/template/.codex/README.md +69 -0
- package/template/.codex/config.toml +56 -0
- package/template/AGENTS.md +94 -0
- package/.claude/.kickoff-hint.txt +0 -52
- package/.claude/.sumulige-claude-version +0 -1
- package/.claude/.version +0 -1
- package/.claude/AGENTS.md +0 -42
- package/.claude/ANCHORS.md +0 -40
- package/.claude/CLAUDE.md +0 -138
- package/.claude/MEMORY.md +0 -69
- package/.claude/PROJECT_LOG.md +0 -101
- package/.claude/THINKING_CHAIN_GUIDE.md +0 -287
- package/.claude/USAGE.md +0 -175
- package/.claude/boris-optimizations.md +0 -167
- package/.claude/handoffs/INDEX.md +0 -21
- package/.claude/handoffs/LATEST.md +0 -76
- package/.claude/handoffs/handoff_2026-01-22T13-07-04-757Z.md +0 -76
- package/.claude/quality-gate.json +0 -82
- package/.claude/rag/skill-index.json +0 -135
- package/.claude/settings.json +0 -99
- package/.claude/settings.local.json +0 -175
- package/.claude/templates/PROJECT_KICKOFF.md +0 -89
- package/.claude/templates/PROJECT_PROPOSAL.md +0 -227
- package/.claude/templates/TASK_PLAN.md +0 -121
- package/.claude/templates/hooks/README.md +0 -302
- package/.claude/templates/hooks/hook.sh.template +0 -94
- package/.claude/templates/hooks/user-prompt-submit.cjs.template +0 -116
- package/.claude/templates/hooks/user-response-submit.cjs.template +0 -94
- package/.claude/templates/hooks/validate.js +0 -173
- package/.claude/templates/tasks/develop.md +0 -69
- package/.claude/templates/tasks/research.md +0 -64
- package/.claude/templates/tasks/test.md +0 -96
- package/.claude/thinking-routes/.last-sync +0 -1
- package/.claude/thinking-routes/QUICKREF.md +0 -98
- package/.claude/workflow/document-scanner.js +0 -426
- package/.claude/workflow/knowledge-engine.js +0 -941
- package/.claude/workflow/notebooklm/browser.js +0 -1028
- package/.claude/workflow/phases/phase1-research.js +0 -578
- package/.claude/workflow/phases/phase1-research.ts +0 -465
- package/.claude/workflow/phases/phase2-approve.js +0 -722
- package/.claude/workflow/phases/phase3-plan.js +0 -1200
- package/.claude/workflow/phases/phase4-develop.js +0 -894
- package/.claude/workflow/search-cache.js +0 -230
- package/.claude/workflow/templates/approval.md +0 -315
- package/.claude/workflow/templates/development.md +0 -377
- package/.claude/workflow/templates/planning.md +0 -328
- package/.claude/workflow/templates/research.md +0 -250
- package/.claude/workflow/types.js +0 -37
- package/.claude/workflow/web-search.js +0 -278
- package/.claude-plugin/marketplace.json +0 -71
- package/.github/workflows/sync-skills.yml +0 -74
- package/.versionrc +0 -25
- package/AGENTS.md +0 -580
- package/CHANGELOG.md +0 -481
- package/CLAUDE-template.md +0 -114
- package/DEV_TOOLS_GUIDE.md +0 -190
- package/PROJECT_STRUCTURE.md +0 -266
- package/Q&A.md +0 -325
- package/config/defaults.json +0 -34
- package/config/official-skills.json +0 -183
- package/config/quality-gate.json +0 -67
- package/config/skill-categories.json +0 -40
- package/config/version-manifest.json +0 -85
- package/demos/power-3d-scatter.html +0 -683
- package/development/cache/web-search/search_1193d605f8eb364651fc2f2041b58a31.json +0 -36
- package/development/cache/web-search/search_3798bf06960edc125f744a1abb5b72c5.json +0 -36
- package/development/cache/web-search/search_37c7d4843a53f0d83f1122a6f908a2a3.json +0 -36
- package/development/cache/web-search/search_44166fa0153709ee168485a22aa0ab40.json +0 -36
- package/development/cache/web-search/search_4deaebb1f77e86a8ca066dc5a49c59fd.json +0 -36
- package/development/cache/web-search/search_94da91789466070a7f545612e73c7372.json +0 -36
- package/development/cache/web-search/search_dd5de8491b8b803a3cb01339cd210fb0.json +0 -36
- package/development/knowledge-base/.index.clean.json +0 -1
- package/development/knowledge-base/.index.json +0 -486
- package/development/knowledge-base/test-best-practices.md +0 -29
- package/development/projects/proj_mkh1pazz_ixmt1/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4jvnb_z7rwf/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4jxkd_ewz5a/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4k84n_ni73k/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4wfyd_u9w88/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4wsbo_iahvf/development/projects/proj_mkh4xbpg_4na5w/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4wsbo_iahvf/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4xulg_1ka8x/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4xwhj_gch8j/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4y2qk_9lm8z/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh4y2qk_9lm8z/phase2/requirements.md +0 -226
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/PRD.md +0 -345
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/TASK_PLAN.md +0 -284
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/prototype/README.md +0 -14
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/DEVELOPMENT_LOG.md +0 -35
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/TASKS.md +0 -34
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/.env.example +0 -5
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/README.md +0 -60
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/package.json +0 -25
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/index.js +0 -70
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/routes/index.js +0 -48
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/health.test.js +0 -20
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/jest.config.js +0 -21
- package/development/projects/proj_mkh7veqg_3lypc/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh7veqg_3lypc/phase2/requirements.md +0 -226
- package/development/projects/proj_mkh7veqg_3lypc/phase3/PRD.md +0 -345
- package/development/projects/proj_mkh7veqg_3lypc/phase3/TASK_PLAN.md +0 -284
- package/development/projects/proj_mkh7veqg_3lypc/phase3/prototype/README.md +0 -14
- package/development/projects/proj_mkh8k8fo_rmqn5/phase1/feasibility-report.md +0 -160
- package/development/projects/proj_mkh8xyhy_1vshq/phase1/feasibility-report.md +0 -178
- package/development/projects/proj_mkh8zddd_dhamf/phase1/feasibility-report.md +0 -377
- package/development/projects/proj_mkh8zddd_dhamf/phase2/requirements.md +0 -442
- package/development/projects/proj_mkh8zddd_dhamf/phase3/api-design.md +0 -800
- package/development/projects/proj_mkh8zddd_dhamf/phase3/architecture.md +0 -625
- package/development/projects/proj_mkh8zddd_dhamf/phase3/data-model.md +0 -830
- package/development/projects/proj_mkh8zddd_dhamf/phase3/risks.md +0 -957
- package/development/projects/proj_mkh8zddd_dhamf/phase3/wbs.md +0 -381
- package/development/todos/.state.json +0 -19
- package/development/todos/INDEX.md +0 -63
- package/development/todos/active/_README.md +0 -49
- package/development/todos/archived/_README.md +0 -11
- package/development/todos/backlog/_README.md +0 -11
- package/development/todos/backlog/mcp-integration.md +0 -35
- package/development/todos/completed/_README.md +0 -11
- package/development/todos/completed/boris-optimizations.md +0 -39
- package/development/todos/completed/develop/local-knowledge-index.md +0 -85
- package/development/todos/completed/develop/todo-system.md +0 -47
- package/development/todos/completed/develop/web-search-integration.md +0 -83
- package/development/todos/completed/test/phase1-e2e-test.md +0 -103
- package/docs/DEVELOPMENT.md +0 -461
- package/docs/MARKETPLACE.md +0 -352
- package/docs/RELEASE.md +0 -93
- package/jest.config.js +0 -63
- package/lib/commands.js +0 -3588
- package/lib/config-manager.js +0 -441
- package/lib/config-schema.js +0 -408
- package/lib/config-validator.js +0 -330
- package/lib/config.js +0 -122
- package/lib/errors.js +0 -305
- package/lib/incremental-sync.js +0 -274
- package/lib/marketplace.js +0 -487
- package/lib/migrations.js +0 -154
- package/lib/permission-audit.js +0 -255
- package/lib/quality-gate.js +0 -431
- package/lib/quality-rules.js +0 -373
- package/lib/utils.js +0 -150
- package/lib/version-check.js +0 -169
- package/lib/version-manifest.js +0 -171
- package/project-paradigm.md +0 -313
- package/prompts/how-to-find.md +0 -163
- package/prompts/linus-architect.md +0 -71
- package/prompts/software-architect.md +0 -173
- package/prompts/web-designer.md +0 -249
- package/scripts/fix-hooks.mjs +0 -97
- package/scripts/sync-external.mjs +0 -298
- package/scripts/sync-to-home.sh +0 -108
- package/scripts/update-registry.mjs +0 -325
- package/sources.yaml +0 -83
- package/tests/README.md +0 -263
- package/tests/commands.test.js +0 -1086
- package/tests/config-manager.test.js +0 -677
- package/tests/config-schema.test.js +0 -425
- package/tests/config-validator.test.js +0 -436
- package/tests/config.test.js +0 -100
- package/tests/errors.test.js +0 -477
- package/tests/manual/phase1-e2e.sh +0 -389
- package/tests/manual/phase2-test-cases.md +0 -311
- package/tests/manual/phase3-test-cases.md +0 -309
- package/tests/manual/phase4-test-cases.md +0 -414
- package/tests/manual/test-cases.md +0 -417
- package/tests/marketplace.test.js +0 -420
- package/tests/migrations.test.js +0 -187
- package/tests/quality-gate.test.js +0 -679
- package/tests/quality-rules.test.js +0 -619
- package/tests/sync-external.test.js +0 -214
- package/tests/update-registry.test.js +0 -251
- package/tests/utils.test.js +0 -171
- package/tests/version-check.test.js +0 -75
- package/tests/web-search.test.js +0 -392
- package/thinkinglens-silent.md +0 -138
package/README.md
CHANGED
|
@@ -1,682 +1,433 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">Sumulige Claude</h1>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>The Universal Agent Harness for AI Coding Assistants</strong>
|
|
5
|
+
</p>
|
|
6
|
+
<p align="center">
|
|
7
|
+
Transform Claude Code and OpenAI Codex into intelligent, memory-aware development teams
|
|
8
|
+
</p>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/sumulige-claude"><img src="https://badge.fury.io/js/sumulige-claude.svg" alt="npm version"></a>
|
|
13
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
14
|
+
<a href="#"><img src="https://img.shields.io/badge/platforms-Claude%20%7C%20Codex-blue.svg" alt="Platforms"></a>
|
|
15
|
+
</p>
|
|
2
16
|
|
|
3
|
-
|
|
4
|
-
**Claude Code 的终极 Agent 编排框架**
|
|
17
|
+
---
|
|
5
18
|
|
|
6
|
-
|
|
7
|
-
[](https://opensource.org/licenses/MIT)
|
|
19
|
+
## Quick Start
|
|
8
20
|
|
|
9
|
-
|
|
21
|
+
```bash
|
|
22
|
+
# Install
|
|
23
|
+
npm install -g sumulige-claude
|
|
10
24
|
|
|
11
|
-
|
|
25
|
+
# Initialize in your project
|
|
26
|
+
smc template
|
|
27
|
+
|
|
28
|
+
# Start Claude Code
|
|
29
|
+
claude
|
|
30
|
+
```
|
|
12
31
|
|
|
13
|
-
|
|
14
|
-
2. [Layer 2: Why use it? / 第二层:为什么使用它?](#layer-2-why-use-it--第二层为什么使用它)
|
|
15
|
-
3. [Layer 3: Core Concepts / 第三层:核心概念](#layer-3-core-concepts--第三层核心概念)
|
|
16
|
-
4. [Layer 4: Quick Start / 第四层:快速开始](#layer-4-quick-start--第四层快速开始)
|
|
17
|
-
5. [Layer 5: Commands / 第五层:命令参考](#layer-5-commands--第五层命令参考)
|
|
18
|
-
6. [Layer 6: Advanced / 第六层:高级配置](#layer-6-advanced--第六层高级配置)
|
|
19
|
-
7. [Layer 7: Lifecycle Hooks / 第七层:生命周期钩子](#layer-7-lifecycle-hooks--第七层生命周期钩子)
|
|
20
|
-
8. [Layer 8: Data Flow Architecture / 第八层:数据流转架构](#layer-8-data-flow-architecture--第八层数据流转架构)
|
|
21
|
-
9. [Layer 9: Config Inheritance / 第九层:配置分层继承](#layer-9-config-inheritance--第九层配置分层继承)
|
|
22
|
-
10. [Documentation / 文档](#documentation--文档)
|
|
32
|
+
**That's it.** Your project now has AI memory, slash commands, and quality gates.
|
|
23
33
|
|
|
24
34
|
---
|
|
25
35
|
|
|
26
|
-
##
|
|
36
|
+
## Why Sumulige Claude?
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
| Problem | Before | After |
|
|
39
|
+
|---------|--------|-------|
|
|
40
|
+
| AI forgets context every session | Repeat project structure constantly | Automatic memory via ThinkingLens |
|
|
41
|
+
| Inconsistent code quality | Manual reviews, missed issues | Quality Gate auto-checks |
|
|
42
|
+
| Works with Claude, need Codex too | Maintain two config systems | One config, both platforms |
|
|
29
43
|
|
|
30
|
-
|
|
31
|
-
- Adding specialized AI agents (like a team of experts)
|
|
32
|
-
- Providing ready-to-use project templates
|
|
33
|
-
- Managing reusable "skills" for common tasks
|
|
44
|
+
---
|
|
34
45
|
|
|
35
|
-
|
|
36
|
-
- 添加专业的 AI Agent(像专家团队)
|
|
37
|
-
- 提供开箱即用的项目模板
|
|
38
|
-
- 管理可复用的"技能"
|
|
46
|
+
## Features
|
|
39
47
|
|
|
40
|
-
###
|
|
48
|
+
### Multi-Platform Support
|
|
41
49
|
|
|
42
50
|
```
|
|
43
51
|
┌─────────────────────────────────────────────────────────────┐
|
|
44
|
-
│
|
|
52
|
+
│ smc CLI │
|
|
45
53
|
├─────────────────────────────────────────────────────────────┤
|
|
46
|
-
│
|
|
47
|
-
│ │
|
|
48
|
-
│
|
|
49
|
-
│
|
|
50
|
-
│
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
│ With Sumulige Claude │
|
|
54
|
+
│ ┌─────────────────┐ ┌─────────────────┐ │
|
|
55
|
+
│ │ Claude Code │ │ Codex CLI │ │
|
|
56
|
+
│ │ (Anthropic) │ │ (OpenAI) │ │
|
|
57
|
+
│ │ │ │ │ │
|
|
58
|
+
│ │ .claude/ │ ◄────► │ .codex/ │ │
|
|
59
|
+
│ │ CLAUDE.md │ sync │ AGENTS.md │ │
|
|
60
|
+
│ │ JSON config │ │ TOML config │ │
|
|
61
|
+
│ └─────────────────┘ └─────────────────┘ │
|
|
55
62
|
├─────────────────────────────────────────────────────────────┤
|
|
56
|
-
│
|
|
57
|
-
│ (协调) (架构) (实现) │
|
|
58
|
-
│ │
|
|
59
|
-
│ ✓ 自动理解项目结构 │
|
|
60
|
-
│ ✓ 知道团队代码风格 │
|
|
61
|
-
│ ✓ 记住所有历史决策 │
|
|
63
|
+
│ Shared: Skills, Rules, Memory │
|
|
62
64
|
└─────────────────────────────────────────────────────────────┘
|
|
63
65
|
```
|
|
64
66
|
|
|
67
|
+
### Core Capabilities
|
|
68
|
+
|
|
69
|
+
- **Memory System** - AI remembers decisions across sessions
|
|
70
|
+
- **Multi-Agent** - Specialized AI agents (Architect, Builder, Reviewer)
|
|
71
|
+
- **Skills Marketplace** - Install and share reusable AI capabilities
|
|
72
|
+
- **Quality Gate** - Automatic code quality enforcement
|
|
73
|
+
- **Slash Commands** - `/commit`, `/test`, `/review`, `/fix`
|
|
74
|
+
|
|
65
75
|
---
|
|
66
76
|
|
|
67
|
-
##
|
|
77
|
+
## Installation
|
|
68
78
|
|
|
69
|
-
###
|
|
79
|
+
### Requirements
|
|
70
80
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| **每次都要解释项目结构** | 复制粘贴 README 内容 | `.claude/rag/` 自动存储项目知识 |
|
|
74
|
-
| **代码风格不一致** | 手动告诉 Claude 规则 | Quality Gate 自动检查 |
|
|
75
|
-
| **AI 不记得之前的决策** | 翻聊天记录找答案 | ThinkingLens 记忆所有对话 |
|
|
76
|
-
| **团队成员配置不同** | 各自配置 Claude | `smc sync` 统一环境 |
|
|
77
|
-
| **重复性任务** | 每次重新写 Prompt | Skills 系统,一键调用 |
|
|
81
|
+
- Node.js 16+
|
|
82
|
+
- Claude Code or Codex CLI installed
|
|
78
83
|
|
|
79
|
-
###
|
|
84
|
+
### Install
|
|
80
85
|
|
|
86
|
+
```bash
|
|
87
|
+
npm install -g sumulige-claude
|
|
81
88
|
```
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
│ └─ 记住代码风格约定 │
|
|
88
|
-
└─────────────────────────────────────────────┘
|
|
89
|
-
|
|
90
|
-
2. 分工 (Specialization)
|
|
91
|
-
┌─────────────────────────────────────────────┐
|
|
92
|
-
│ Multi-Agent System │
|
|
93
|
-
│ ├─ Conductor → 任务分解 │
|
|
94
|
-
│ ├─ Architect → 架构设计 │
|
|
95
|
-
│ ├─ Builder → 代码实现 │
|
|
96
|
-
│ ├─ Reviewer → 质量检查 │
|
|
97
|
-
│ └─ Librarian → 文档整理 │
|
|
98
|
-
└─────────────────────────────────────────────┘
|
|
99
|
-
|
|
100
|
-
3. 复用 (Reuse)
|
|
101
|
-
┌─────────────────────────────────────────────┐
|
|
102
|
-
│ Skills System │
|
|
103
|
-
│ ├─ 安装社区技能 │
|
|
104
|
-
│ ├─ 创建自己的技能 │
|
|
105
|
-
│ └─ 团队共享技能库 │
|
|
106
|
-
└─────────────────────────────────────────────┘
|
|
89
|
+
|
|
90
|
+
### Verify
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
smc --version
|
|
107
94
|
```
|
|
108
95
|
|
|
109
96
|
---
|
|
110
97
|
|
|
111
|
-
##
|
|
98
|
+
## Usage
|
|
112
99
|
|
|
113
|
-
###
|
|
100
|
+
### New Project Setup
|
|
114
101
|
|
|
115
|
-
|
|
102
|
+
```bash
|
|
103
|
+
# Deploy Claude Code template
|
|
104
|
+
smc template
|
|
116
105
|
|
|
117
|
-
|
|
106
|
+
# Or deploy for both platforms
|
|
107
|
+
smc template --all
|
|
118
108
|
|
|
109
|
+
# Or Codex only
|
|
110
|
+
smc template --codex
|
|
119
111
|
```
|
|
120
|
-
传统方式:
|
|
121
|
-
┌─────────────────────────────────────┐
|
|
122
|
-
│ Claude (通用 AI) │
|
|
123
|
-
│ 写代码 + 审查 + 架构 + 文档 │
|
|
124
|
-
└─────────────────────────────────────┘
|
|
125
|
-
|
|
126
|
-
Agent 方式:
|
|
127
|
-
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
128
|
-
│Conductor│─▶│Architect│─▶│ Builder │
|
|
129
|
-
│ 分解任务 │ │ 设计架构 │ │ 实现代码 │
|
|
130
|
-
└─────────┘ └─────────┘ └─────────┘
|
|
131
|
-
│
|
|
132
|
-
▼
|
|
133
|
-
┌─────────┐
|
|
134
|
-
│Reviewer │
|
|
135
|
-
│ 审查代码 │
|
|
136
|
-
└─────────┘
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Concept 2: What is a "Skill"? / 什么是 "Skill"?
|
|
140
112
|
|
|
141
|
-
|
|
113
|
+
### Existing Project
|
|
142
114
|
|
|
143
|
-
|
|
115
|
+
```bash
|
|
116
|
+
# Add to existing project (safe mode - won't overwrite)
|
|
117
|
+
smc template --safe
|
|
144
118
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
┌─────────────────────────────────────┐
|
|
149
|
-
│ Skill: api-tester │
|
|
150
|
-
├─────────────────────────────────────┤
|
|
151
|
-
│ 上下文: REST/GraphQL API 测试知识 │
|
|
152
|
-
│ 指令: 如何验证 API 响应 │
|
|
153
|
-
│ 资源: 测试脚本模板 │
|
|
154
|
-
└─────────────────────────────────────┘
|
|
119
|
+
# Or sync incrementally
|
|
120
|
+
smc sync
|
|
155
121
|
```
|
|
156
122
|
|
|
157
|
-
###
|
|
123
|
+
### Platform Commands
|
|
158
124
|
|
|
159
|
-
|
|
125
|
+
```bash
|
|
126
|
+
# Detect configured platforms
|
|
127
|
+
smc platform:detect
|
|
160
128
|
|
|
161
|
-
|
|
129
|
+
# Convert Claude config to Codex
|
|
130
|
+
smc platform:convert claude codex
|
|
162
131
|
|
|
163
|
-
|
|
164
|
-
smc
|
|
165
|
-
|
|
166
|
-
your-project/
|
|
167
|
-
├── .claude/
|
|
168
|
-
│ ├── commands/ # 斜杠命令定义
|
|
169
|
-
│ ├── skills/ # 技能库
|
|
170
|
-
│ ├── hooks/ # 自动化钩子
|
|
171
|
-
│ ├── rag/ # 项目知识库
|
|
172
|
-
│ └── sessions/ # 对话历史
|
|
173
|
-
├── CLAUDE.md # AI 配置文件
|
|
174
|
-
└── development/
|
|
175
|
-
└── todos/ # 任务管理系统
|
|
132
|
+
# Sync to all platforms
|
|
133
|
+
smc platform:sync
|
|
176
134
|
```
|
|
177
135
|
|
|
178
136
|
---
|
|
179
137
|
|
|
180
|
-
##
|
|
138
|
+
## Project Structure
|
|
181
139
|
|
|
182
|
-
|
|
140
|
+
After `smc template`, your project looks like:
|
|
183
141
|
|
|
184
|
-
```
|
|
185
|
-
|
|
142
|
+
```
|
|
143
|
+
your-project/
|
|
144
|
+
├── .claude/ # Claude Code configuration
|
|
145
|
+
│ ├── settings.json # Hooks and settings
|
|
146
|
+
│ ├── CLAUDE.md # Project instructions
|
|
147
|
+
│ ├── commands/ # Slash commands
|
|
148
|
+
│ ├── skills/ # Installed skills
|
|
149
|
+
│ ├── hooks/ # Automation hooks
|
|
150
|
+
│ ├── rag/ # Knowledge index
|
|
151
|
+
│ └── MEMORY.md # AI memory
|
|
152
|
+
│
|
|
153
|
+
├── .codex/ # Codex CLI configuration (if --all)
|
|
154
|
+
│ └── config.toml # Codex settings
|
|
155
|
+
│
|
|
156
|
+
├── AGENTS.md # Codex instructions (if --all)
|
|
157
|
+
└── CLAUDE.md # Project-level AI config
|
|
186
158
|
```
|
|
187
159
|
|
|
188
|
-
|
|
160
|
+
---
|
|
189
161
|
|
|
190
|
-
|
|
191
|
-
# Step 1: Initialize global config / 初始化全局配置
|
|
192
|
-
smc init
|
|
162
|
+
## Commands Reference
|
|
193
163
|
|
|
194
|
-
|
|
195
|
-
mkdir my-project && cd my-project
|
|
196
|
-
smc template
|
|
164
|
+
### Core Commands
|
|
197
165
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
166
|
+
| Command | Description |
|
|
167
|
+
|---------|-------------|
|
|
168
|
+
| `smc init` | Initialize global configuration |
|
|
169
|
+
| `smc template` | Deploy project template |
|
|
170
|
+
| `smc sync` | Sync configuration (incremental) |
|
|
171
|
+
| `smc status` | Show current status |
|
|
201
172
|
|
|
202
|
-
###
|
|
173
|
+
### Platform Commands
|
|
203
174
|
|
|
204
|
-
|
|
|
205
|
-
|
|
206
|
-
| `smc
|
|
207
|
-
| `smc
|
|
208
|
-
| `smc
|
|
175
|
+
| Command | Description |
|
|
176
|
+
|---------|-------------|
|
|
177
|
+
| `smc platform:detect` | Detect AI platforms in project |
|
|
178
|
+
| `smc platform:list` | List supported platforms |
|
|
179
|
+
| `smc platform:convert <from> <to>` | Convert between platforms |
|
|
180
|
+
| `smc platform:sync` | Sync config to all platforms |
|
|
209
181
|
|
|
210
|
-
|
|
182
|
+
### Skill Commands
|
|
211
183
|
|
|
212
|
-
|
|
184
|
+
| Command | Description |
|
|
185
|
+
|---------|-------------|
|
|
186
|
+
| `smc skill:list` | List installed skills |
|
|
187
|
+
| `smc skill:create <name>` | Create new skill |
|
|
188
|
+
| `smc marketplace:list` | Browse skill marketplace |
|
|
189
|
+
| `smc marketplace:install <name>` | Install a skill |
|
|
213
190
|
|
|
214
|
-
###
|
|
191
|
+
### Quality Commands
|
|
215
192
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
│ smc status 查看当前状态 │
|
|
222
|
-
│ smc sync 同步到当前项目(增量) │
|
|
223
|
-
└─────────────────────────────────────────────────────────────┘
|
|
193
|
+
| Command | Description |
|
|
194
|
+
|---------|-------------|
|
|
195
|
+
| `smc qg:check` | Run quality gate checks |
|
|
196
|
+
| `smc qg:rules` | List quality rules |
|
|
197
|
+
| `smc config:validate` | Validate configuration |
|
|
224
198
|
|
|
225
|
-
|
|
226
|
-
│ 项目命令 (新项目启动时使用) │
|
|
227
|
-
├─────────────────────────────────────────────────────────────┤
|
|
228
|
-
│ smc template 部署项目模板 │
|
|
229
|
-
│ smc kickoff 启动项目规划 │
|
|
230
|
-
└─────────────────────────────────────────────────────────────┘
|
|
231
|
-
|
|
232
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
233
|
-
│ 技能命令 (管理 Claude 能力) │
|
|
234
|
-
├─────────────────────────────────────────────────────────────┤
|
|
235
|
-
│ smc skill:list 列出已安装技能 │
|
|
236
|
-
│ smc marketplace:list 浏览技能市场 │
|
|
237
|
-
│ smc marketplace:install <name> 安装技能 │
|
|
238
|
-
└─────────────────────────────────────────────────────────────┘
|
|
199
|
+
---
|
|
239
200
|
|
|
240
|
-
|
|
241
|
-
│ 配置命令 (高级配置) │
|
|
242
|
-
├─────────────────────────────────────────────────────────────┤
|
|
243
|
-
│ smc config:validate 验证配置文件 │
|
|
244
|
-
│ smc config:backup 创建配置备份 │
|
|
245
|
-
│ smc qg:check 运行质量检查 │
|
|
246
|
-
└─────────────────────────────────────────────────────────────┘
|
|
247
|
-
```
|
|
201
|
+
## Slash Commands
|
|
248
202
|
|
|
249
|
-
|
|
203
|
+
Available in Claude Code after template deployment:
|
|
250
204
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
已有项目:
|
|
259
|
-
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
260
|
-
│ 进入 │──▶ │ smc │──▶ │ 开发 │
|
|
261
|
-
│ 项目 │ │ sync │ │ │
|
|
262
|
-
└─────────┘ └─────────┘ └─────────┘
|
|
263
|
-
```
|
|
205
|
+
| Command | Model | Description |
|
|
206
|
+
|---------|-------|-------------|
|
|
207
|
+
| `/review` | Sonnet | Code review + security scan |
|
|
208
|
+
| `/test` | Sonnet | Run tests with TDD support |
|
|
209
|
+
| `/fix` | Haiku | Quick fix for build/lint errors |
|
|
210
|
+
| `/plan` | Opus | Architecture and planning |
|
|
211
|
+
| `/commit` | - | Git commit with message |
|
|
264
212
|
|
|
265
213
|
---
|
|
266
214
|
|
|
267
|
-
##
|
|
215
|
+
## Multi-Platform Workflow
|
|
268
216
|
|
|
269
|
-
###
|
|
217
|
+
### Converting Existing Project
|
|
270
218
|
|
|
271
|
-
|
|
219
|
+
```bash
|
|
220
|
+
# You have a Claude Code project, want to add Codex support
|
|
272
221
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
| `test-master` | `/test` | sonnet | TDD + E2E + 覆盖率分析 |
|
|
277
|
-
| `design-brain` | `/plan` | opus | 规划 + 架构设计 |
|
|
278
|
-
| `quick-fix` | `/fix` | haiku | 快速修复构建/类型/lint 错误 |
|
|
222
|
+
# 1. See what's configured
|
|
223
|
+
smc platform:detect
|
|
224
|
+
# Output: Detected 1 platform(s): claude
|
|
279
225
|
|
|
280
|
-
|
|
226
|
+
# 2. Convert to Codex
|
|
227
|
+
smc platform:convert claude codex
|
|
281
228
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
/review --security # 安全深扫 (OWASP Top 10)
|
|
286
|
-
/review --clean # 死代码清理
|
|
287
|
-
|
|
288
|
-
# 测试
|
|
289
|
-
/test # 运行测试
|
|
290
|
-
/test --tdd # TDD 模式
|
|
291
|
-
/test --e2e # E2E 测试
|
|
292
|
-
/test --coverage # 覆盖率
|
|
293
|
-
|
|
294
|
-
# 规划
|
|
295
|
-
/plan # 快速规划
|
|
296
|
-
/plan --deep # 深度设计
|
|
297
|
-
|
|
298
|
-
# 快速修复
|
|
299
|
-
/fix # 自动检测修复
|
|
300
|
-
/fix --build # 构建错误
|
|
301
|
-
/fix --type # 类型错误
|
|
302
|
-
|
|
303
|
-
# 重构
|
|
304
|
-
/refactor # 分析建议
|
|
305
|
-
/refactor --execute # 执行清理
|
|
306
|
-
```
|
|
229
|
+
# 3. Verify
|
|
230
|
+
smc platform:detect
|
|
231
|
+
# Output: Detected 2 platform(s): claude, codex
|
|
307
232
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
┌─────────┬─────────────────────┬──────────┬────────┐
|
|
312
|
-
│ 模型 │ 使用场景 │ 相对成本 │ 速度 │
|
|
313
|
-
├─────────┼─────────────────────┼──────────┼────────┤
|
|
314
|
-
│ haiku │ /fix 快速修复 │ 1x │ 最快 │
|
|
315
|
-
│ sonnet │ /review, /test │ 5x │ 中等 │
|
|
316
|
-
│ opus │ /plan --deep │ 15x │ 较慢 │
|
|
317
|
-
└─────────┴─────────────────────┴──────────┴────────┘
|
|
233
|
+
# 4. Use either CLI
|
|
234
|
+
claude "Fix the login bug"
|
|
235
|
+
codex "Fix the login bug"
|
|
318
236
|
```
|
|
319
237
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
---
|
|
238
|
+
### Platform Config Mapping
|
|
323
239
|
|
|
324
|
-
|
|
240
|
+
| Claude Code | Codex CLI |
|
|
241
|
+
|-------------|-----------|
|
|
242
|
+
| `.claude/settings.json` | `.codex/config.toml` |
|
|
243
|
+
| `CLAUDE.md` | `AGENTS.md` |
|
|
244
|
+
| JSON format | TOML format |
|
|
245
|
+
| Hooks in settings.json | Notifications in config.toml |
|
|
325
246
|
|
|
326
|
-
|
|
247
|
+
---
|
|
327
248
|
|
|
328
|
-
|
|
249
|
+
## Configuration
|
|
329
250
|
|
|
330
|
-
|
|
251
|
+
### Claude Code (`~/.claude/config.json`)
|
|
331
252
|
|
|
332
253
|
```json
|
|
333
254
|
{
|
|
334
|
-
"version": "1.
|
|
335
|
-
"model": "claude-
|
|
255
|
+
"version": "1.6.0",
|
|
256
|
+
"model": "claude-sonnet-4",
|
|
336
257
|
"agents": {
|
|
337
|
-
"
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
},
|
|
341
|
-
"architect": {
|
|
342
|
-
"role": "架构设计 - 设计系统架构和技术选型",
|
|
343
|
-
"model": "claude-sonnet-4.5"
|
|
344
|
-
},
|
|
345
|
-
"builder": {
|
|
346
|
-
"role": "代码实现 - 编写高质量代码和测试",
|
|
347
|
-
"model": "claude-sonnet-4.5"
|
|
348
|
-
},
|
|
349
|
-
"reviewer": {
|
|
350
|
-
"role": "代码审查 - 检查代码质量和安全问题",
|
|
351
|
-
"model": "claude-opus-4.5"
|
|
352
|
-
},
|
|
353
|
-
"librarian": {
|
|
354
|
-
"role": "文档管理 - 整理文档和知识库",
|
|
355
|
-
"model": "claude-haiku-4.5"
|
|
356
|
-
}
|
|
258
|
+
"architect": { "model": "claude-opus-4" },
|
|
259
|
+
"builder": { "model": "claude-sonnet-4" },
|
|
260
|
+
"reviewer": { "model": "claude-opus-4" }
|
|
357
261
|
},
|
|
358
|
-
"skills": [
|
|
359
|
-
"anthropics/skills",
|
|
360
|
-
"numman-ali/n-skills"
|
|
361
|
-
],
|
|
362
262
|
"thinkingLens": {
|
|
363
263
|
"enabled": true,
|
|
364
|
-
"autoSync": true
|
|
365
|
-
"syncInterval": 20
|
|
264
|
+
"autoSync": true
|
|
366
265
|
}
|
|
367
266
|
}
|
|
368
267
|
```
|
|
369
268
|
|
|
370
|
-
###
|
|
371
|
-
|
|
372
|
-
**English** | Automatically check code quality before commits.
|
|
269
|
+
### Codex CLI (`.codex/config.toml`)
|
|
373
270
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
"severity": "warn",
|
|
380
|
-
"rules": [
|
|
381
|
-
{ "id": "line-count-limit", "enabled": true },
|
|
382
|
-
{ "id": "no-console-logs", "enabled": true }
|
|
383
|
-
],
|
|
384
|
-
"gates": {
|
|
385
|
-
"preCommit": true,
|
|
386
|
-
"prePush": true
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
### Skills Marketplace / 技能市场
|
|
392
|
-
|
|
393
|
-
```bash
|
|
394
|
-
# Browse available skills / 浏览可用技能
|
|
395
|
-
smc marketplace:list
|
|
271
|
+
```toml
|
|
272
|
+
model = "o3"
|
|
273
|
+
model_provider = "openai"
|
|
274
|
+
sandbox_mode = "workspace-write"
|
|
275
|
+
approval_policy = "on-failure"
|
|
396
276
|
|
|
397
|
-
|
|
398
|
-
|
|
277
|
+
[project]
|
|
278
|
+
project_doc_fallback_filenames = ["AGENTS.md", "CLAUDE.md"]
|
|
399
279
|
|
|
400
|
-
|
|
401
|
-
|
|
280
|
+
[features]
|
|
281
|
+
shell_tool = true
|
|
282
|
+
web_search_request = true
|
|
402
283
|
```
|
|
403
284
|
|
|
404
285
|
---
|
|
405
286
|
|
|
406
|
-
##
|
|
287
|
+
## Architecture
|
|
407
288
|
|
|
408
|
-
###
|
|
409
|
-
|
|
410
|
-
> v1.3.2: 利用 Claude Code 官方 Hook 事件实现记忆自动同步
|
|
289
|
+
### Memory System
|
|
411
290
|
|
|
412
291
|
```
|
|
413
|
-
|
|
414
|
-
│
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
│
|
|
418
|
-
|
|
419
|
-
│
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
292
|
+
Session Start
|
|
293
|
+
│
|
|
294
|
+
▼
|
|
295
|
+
┌─────────────────┐
|
|
296
|
+
│ memory-loader │ ◄── Load MEMORY.md, ANCHORS.md
|
|
297
|
+
└─────────────────┘
|
|
298
|
+
│
|
|
299
|
+
▼
|
|
300
|
+
Work with AI
|
|
301
|
+
│
|
|
302
|
+
▼
|
|
303
|
+
┌─────────────────┐
|
|
304
|
+
│ memory-saver │ ──► Save to MEMORY.md
|
|
305
|
+
└─────────────────┘
|
|
306
|
+
│
|
|
307
|
+
▼
|
|
308
|
+
Session End
|
|
423
309
|
```
|
|
424
310
|
|
|
425
|
-
### Hook
|
|
426
|
-
|
|
427
|
-
| Hook | 文件 | 触发时机 | 功能 |
|
|
428
|
-
|------|------|----------|------|
|
|
429
|
-
| `SessionStart` | `memory-loader.cjs` | 会话开始 | 加载记忆、锚点、TODO |
|
|
430
|
-
| `SessionEnd` | `memory-saver.cjs` | 会话结束 | 保存摘要、归档会话 |
|
|
431
|
-
| `PreCompact` | `auto-handoff.cjs` | 上下文压缩前 | 生成 handoff 保护上下文 |
|
|
432
|
-
|
|
433
|
-
### Handoff Documents / 交接文档
|
|
434
|
-
|
|
435
|
-
当上下文即将被压缩时,自动生成交接文档:
|
|
311
|
+
### Hook System
|
|
436
312
|
|
|
437
313
|
```
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
314
|
+
Claude Code Event
|
|
315
|
+
│
|
|
316
|
+
▼
|
|
317
|
+
┌─────────────────────────────────────────┐
|
|
318
|
+
│ settings.json │
|
|
319
|
+
├─────────────────────────────────────────┤
|
|
320
|
+
│ SessionStart → memory-loader.cjs │
|
|
321
|
+
│ SessionEnd → memory-saver.cjs │
|
|
322
|
+
│ PreCompact → auto-handoff.cjs │
|
|
323
|
+
│ PostToolUse → code-formatter.cjs │
|
|
324
|
+
└─────────────────────────────────────────┘
|
|
442
325
|
```
|
|
443
326
|
|
|
444
|
-
|
|
445
|
-
- 会话信息(项目、版本、开始时间)
|
|
446
|
-
- 活跃 TODOs 列表
|
|
447
|
-
- 最近修改的文件
|
|
448
|
-
- 恢复命令
|
|
327
|
+
---
|
|
449
328
|
|
|
450
|
-
|
|
329
|
+
## Upgrading
|
|
451
330
|
|
|
452
|
-
|
|
331
|
+
### From v1.x
|
|
453
332
|
|
|
454
333
|
```bash
|
|
455
|
-
#
|
|
456
|
-
smc template --force
|
|
457
|
-
|
|
458
|
-
# 方式 2: 增量同步(仅更新 hooks)
|
|
459
|
-
smc sync --hooks
|
|
460
|
-
|
|
461
|
-
# 方式 3: 手动安装
|
|
334
|
+
# Update global package
|
|
462
335
|
npm update -g sumulige-claude
|
|
463
|
-
smc template
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
---
|
|
467
336
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
> v1.4.0: Hook 统一调度 + 智能过滤,Token 成本降低 62%
|
|
471
|
-
|
|
472
|
-
### Hook 调度流程
|
|
473
|
-
|
|
474
|
-
```
|
|
475
|
-
┌─────────────────────────────────────────────────────────────────────────┐
|
|
476
|
-
│ Claude Code 事件触发 │
|
|
477
|
-
└─────────────────────────────────────────────────────────────────────────┘
|
|
478
|
-
│
|
|
479
|
-
▼
|
|
480
|
-
┌─────────────────────────────────────────────────────────────────────────┐
|
|
481
|
-
│ settings.json 路由 │
|
|
482
|
-
├─────────────────────────────────────────────────────────────────────────┤
|
|
483
|
-
│ SessionStart ──────→ memory-loader.cjs (直接执行) │
|
|
484
|
-
│ SessionEnd ──────→ memory-saver.cjs (直接执行) │
|
|
485
|
-
│ PreCompact ──────→ auto-handoff.cjs (直接执行) │
|
|
486
|
-
│ UserPromptSubmit ───→ hook-dispatcher.cjs │
|
|
487
|
-
│ PreToolUse ──────→ (空,不执行任何 hook) │
|
|
488
|
-
│ PostToolUse ──────→ code-formatter.cjs (仅 Write/Edit 时) │
|
|
489
|
-
│ AgentStop ──────→ hook-dispatcher.cjs │
|
|
490
|
-
└─────────────────────────────────────────────────────────────────────────┘
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
### Hook Dispatcher 内部流程
|
|
494
|
-
|
|
495
|
-
```
|
|
496
|
-
┌─────────────────────────────────────────────────────────────────────────┐
|
|
497
|
-
│ hook-dispatcher.cjs │
|
|
498
|
-
└─────────────────────────────────────────────────────────────────────────┘
|
|
499
|
-
│
|
|
500
|
-
┌───────────────┼───────────────┐
|
|
501
|
-
▼ ▼ ▼
|
|
502
|
-
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
503
|
-
│ 加载 Registry│ │ 加载 State │ │ 获取事件类型 │
|
|
504
|
-
│ hook-registry│ │ .dispatcher │ │CLAUDE_EVENT │
|
|
505
|
-
│ .json │ │ -state.json │ │ _TYPE │
|
|
506
|
-
└─────────────┘ └─────────────┘ └─────────────┘
|
|
507
|
-
│ │ │
|
|
508
|
-
└───────────────┼───────────────┘
|
|
509
|
-
▼
|
|
510
|
-
┌───────────────────────────────┐
|
|
511
|
-
│ 筛选当前事件的 Hooks │
|
|
512
|
-
└───────────────────────────────┘
|
|
513
|
-
│
|
|
514
|
-
▼
|
|
515
|
-
┌───────────────────────────────────────────────┐
|
|
516
|
-
│ 对每个 Hook 检查 │
|
|
517
|
-
├───────────────────────────────────────────────┤
|
|
518
|
-
│ 1. shouldRunDebounce() - 5秒内执行过? → 跳过 │
|
|
519
|
-
│ 2. shouldRunOnce() - 已执行过? → 跳过 │
|
|
520
|
-
│ 3. shouldRunCondition() - 条件不满足? → 跳过 │
|
|
521
|
-
└───────────────────────────────────────────────┘
|
|
522
|
-
│
|
|
523
|
-
▼
|
|
524
|
-
┌───────────────────────────────┐
|
|
525
|
-
│ 执行通过检查的 Hook + 更新状态 │
|
|
526
|
-
└───────────────────────────────┘
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
### 增量同步流程
|
|
530
|
-
|
|
531
|
-
```
|
|
532
|
-
┌─────────────────────────────────────────────────────────────────────────┐
|
|
533
|
-
│ smc sync --incremental │
|
|
534
|
-
└─────────────────────────────────────────────────────────────────────────┘
|
|
535
|
-
│
|
|
536
|
-
┌───────────────────────────┼───────────────────────────┐
|
|
537
|
-
▼ ▼ ▼
|
|
538
|
-
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
|
539
|
-
│ 读取项目版本 │ │ 读取版本清单 │ │ 计算差异变更 │
|
|
540
|
-
│ .sumulige- │ │ version- │ │ getChangesSince│
|
|
541
|
-
│ claude-version│ │ manifest.json │ │ (1.3.3) │
|
|
542
|
-
└───────────────┘ └───────────────┘ └───────────────┘
|
|
543
|
-
│
|
|
544
|
-
▼
|
|
545
|
-
┌───────────────────────────────────────────────┐
|
|
546
|
-
│ 应用变更: hook/config/lib/command │
|
|
547
|
-
│ 更新项目版本标记 │
|
|
548
|
-
└───────────────────────────────────────────────┘
|
|
337
|
+
# Update project template
|
|
338
|
+
smc template --force
|
|
549
339
|
```
|
|
550
340
|
|
|
551
|
-
###
|
|
341
|
+
### Migration
|
|
552
342
|
|
|
553
|
-
|
|
554
|
-
|------|------|----------|
|
|
555
|
-
| `.dispatcher-state.json` | Hook 执行状态 | 会话级 |
|
|
556
|
-
| `.match-cache.json` | RAG 匹配缓存 | 5 分钟 TTL |
|
|
557
|
-
| `.sumulige-claude-version` | 项目版本标记 | 永久 |
|
|
343
|
+
Old hooks are automatically migrated. Your custom configurations are backed up to `.claude/backup/`.
|
|
558
344
|
|
|
559
345
|
---
|
|
560
346
|
|
|
561
|
-
##
|
|
562
|
-
|
|
563
|
-
> v1.4.1: 单一真相源架构,零维护成本的多项目配置管理
|
|
347
|
+
## Troubleshooting
|
|
564
348
|
|
|
565
|
-
###
|
|
349
|
+
### Common Issues
|
|
566
350
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
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/
|
|
351
|
+
**Q: Commands not found after install**
|
|
352
|
+
```bash
|
|
353
|
+
# Ensure npm global bin is in PATH
|
|
354
|
+
export PATH="$PATH:$(npm bin -g)"
|
|
581
355
|
```
|
|
582
356
|
|
|
583
|
-
|
|
584
|
-
|
|
357
|
+
**Q: Platform not detected**
|
|
585
358
|
```bash
|
|
586
|
-
#
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
# 日常更新:修改 sumulige-claude 后自动生效
|
|
591
|
-
git pull # 所有项目自动获得最新配置!
|
|
592
|
-
|
|
593
|
-
# 更新模板文件(CLAUDE.md, MEMORY.md 等)
|
|
594
|
-
./scripts/sync-to-home.sh --copy
|
|
359
|
+
# Ensure project has config files
|
|
360
|
+
ls -la .claude/settings.json
|
|
361
|
+
ls -la .codex/config.toml
|
|
595
362
|
```
|
|
596
363
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
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 索引
|
|
364
|
+
**Q: Codex can't read AGENTS.md**
|
|
365
|
+
```bash
|
|
366
|
+
# Regenerate from Claude config
|
|
367
|
+
smc platform:convert claude codex
|
|
611
368
|
```
|
|
612
369
|
|
|
613
|
-
### 收益
|
|
614
|
-
|
|
615
|
-
| 指标 | 传统方式 | 分层继承 |
|
|
616
|
-
|------|---------|---------|
|
|
617
|
-
| 配置同步 | 手动复制到每个项目 | 自动(符号链接) |
|
|
618
|
-
| 更新成本 | O(n) 项目数 | O(1) |
|
|
619
|
-
| 配置漂移 | 容易发生 | 不可能 |
|
|
620
|
-
| 存储空间 | 每项目 ~5MB | 每项目 ~50KB |
|
|
621
|
-
|
|
622
370
|
---
|
|
623
371
|
|
|
624
|
-
##
|
|
372
|
+
## Contributing
|
|
625
373
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
374
|
+
1. Fork the repository
|
|
375
|
+
2. Create your feature branch (`git checkout -b feature/amazing`)
|
|
376
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
377
|
+
4. Push to the branch (`git push origin feature/amazing`)
|
|
378
|
+
5. Open a Pull Request
|
|
629
379
|
|
|
630
380
|
---
|
|
631
381
|
|
|
632
|
-
##
|
|
633
|
-
|
|
634
|
-
### v1.2.0 (2026-01-17)
|
|
382
|
+
## Documentation
|
|
635
383
|
|
|
636
|
-
|
|
384
|
+
| Document | Description |
|
|
385
|
+
|----------|-------------|
|
|
386
|
+
| [Development Guide](docs/DEVELOPMENT.md) | Architecture and adding skills |
|
|
387
|
+
| [Marketplace Guide](docs/MARKETPLACE.md) | Skill marketplace user guide |
|
|
388
|
+
| [Q&A](Q&A.md) | Frequently asked questions |
|
|
637
389
|
|
|
638
|
-
|
|
390
|
+
---
|
|
639
391
|
|
|
640
|
-
|
|
641
|
-
- 219 new tests across 6 modules / 6 个模块新增 219 个测试
|
|
642
|
-
- errors.js: 100% statement coverage / 100% 语句覆盖率
|
|
643
|
-
- quality-gate.js: 95.59% statement coverage / 95.59% 语句覆盖率
|
|
644
|
-
- quality-rules.js: 86.17% statement coverage / 86.17% 语句覆盖率
|
|
645
|
-
- config-manager.js: 91.66% statement coverage / 91.66% 语句覆盖率
|
|
646
|
-
- config-validator.js: 77.41% statement coverage / 77.41% 语句覆盖率
|
|
647
|
-
- version-check.js: 55.07% statement coverage / 55.07% 语句覆盖率
|
|
392
|
+
## Changelog
|
|
648
393
|
|
|
649
|
-
### v1.
|
|
394
|
+
### v1.6.0 (2026-01-24)
|
|
650
395
|
|
|
651
|
-
**
|
|
396
|
+
**Multi-Platform Support** - OpenAI Codex CLI compatibility
|
|
652
397
|
|
|
653
|
-
|
|
398
|
+
- **Platform Adapters** - Abstract layer for multi-CLI support
|
|
399
|
+
- **Config Converter** - JSON ↔ TOML conversion
|
|
400
|
+
- **Instruction Converter** - CLAUDE.md ↔ AGENTS.md
|
|
401
|
+
- **New Commands**:
|
|
402
|
+
- `platform:detect` - Detect configured platforms
|
|
403
|
+
- `platform:list` - List supported platforms
|
|
404
|
+
- `platform:convert` - Convert between platforms
|
|
405
|
+
- `platform:sync` - Sync to all platforms
|
|
406
|
+
- **Template Extensions**:
|
|
407
|
+
- `--codex` flag for Codex-only deployment
|
|
408
|
+
- `--all` flag for both platforms
|
|
654
409
|
|
|
655
|
-
|
|
656
|
-
- JSON Schema validation for all configs / 所有配置的 JSON Schema 验证
|
|
657
|
-
- Backup/rollback functionality / 备份回滚功能
|
|
658
|
-
- Environment variable expansion / 环境变量展开
|
|
659
|
-
- **Quality Gate / 质量门禁**
|
|
660
|
-
- 8 built-in quality rules / 8 条内置质量规则
|
|
661
|
-
- Pre-commit/pre-push Git hooks / Git 钩子
|
|
662
|
-
- Configurable severity levels / 可配置严重级别
|
|
410
|
+
### v1.5.2 (2026-01-23)
|
|
663
411
|
|
|
664
|
-
|
|
412
|
+
- Architecture refactoring and code cleanup
|
|
413
|
+
- Design standards system + 3 new skills
|
|
665
414
|
|
|
666
|
-
|
|
415
|
+
### v1.5.0 (2026-01-22)
|
|
667
416
|
|
|
668
|
-
|
|
417
|
+
- Three-tier quality gate system
|
|
669
418
|
|
|
670
|
-
|
|
671
|
-
- Auto-sync via GitHub Actions / GitHub Actions 自动同步
|
|
672
|
-
- 20+ built-in skills / 20+ 内置技能
|
|
419
|
+
[Full Changelog](CHANGELOG.md)
|
|
673
420
|
|
|
674
421
|
---
|
|
675
422
|
|
|
676
|
-
## License
|
|
423
|
+
## License
|
|
677
424
|
|
|
678
425
|
MIT © [sumulige](https://github.com/sumulige)
|
|
679
426
|
|
|
680
427
|
---
|
|
681
428
|
|
|
682
|
-
|
|
429
|
+
<p align="center">
|
|
430
|
+
<strong>Works with</strong><br>
|
|
431
|
+
<a href="https://claude.ai">Claude Code</a> •
|
|
432
|
+
<a href="https://openai.com/codex">Codex CLI</a>
|
|
433
|
+
</p>
|