cc4pm 1.8.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-plugin/README.md +17 -0
- package/.claude-plugin/plugin.json +25 -0
- package/LICENSE +21 -0
- package/README.md +157 -0
- package/README.zh-CN.md +134 -0
- package/contexts/dev.md +20 -0
- package/contexts/research.md +26 -0
- package/contexts/review.md +22 -0
- package/examples/CLAUDE.md +100 -0
- package/examples/statusline.json +19 -0
- package/examples/user-CLAUDE.md +109 -0
- package/install.sh +17 -0
- package/manifests/install-components.json +173 -0
- package/manifests/install-modules.json +335 -0
- package/manifests/install-profiles.json +75 -0
- package/package.json +117 -0
- package/schemas/ecc-install-config.schema.json +58 -0
- package/schemas/hooks.schema.json +197 -0
- package/schemas/install-components.schema.json +56 -0
- package/schemas/install-modules.schema.json +105 -0
- package/schemas/install-profiles.schema.json +45 -0
- package/schemas/install-state.schema.json +210 -0
- package/schemas/package-manager.schema.json +23 -0
- package/schemas/plugin.schema.json +58 -0
- package/scripts/ci/catalog.js +83 -0
- package/scripts/ci/validate-agents.js +81 -0
- package/scripts/ci/validate-commands.js +135 -0
- package/scripts/ci/validate-hooks.js +239 -0
- package/scripts/ci/validate-install-manifests.js +211 -0
- package/scripts/ci/validate-no-personal-paths.js +63 -0
- package/scripts/ci/validate-rules.js +81 -0
- package/scripts/ci/validate-skills.js +54 -0
- package/scripts/claw.js +468 -0
- package/scripts/doctor.js +110 -0
- package/scripts/ecc.js +194 -0
- package/scripts/hooks/auto-tmux-dev.js +88 -0
- package/scripts/hooks/check-console-log.js +71 -0
- package/scripts/hooks/check-hook-enabled.js +12 -0
- package/scripts/hooks/cost-tracker.js +78 -0
- package/scripts/hooks/doc-file-warning.js +63 -0
- package/scripts/hooks/evaluate-session.js +100 -0
- package/scripts/hooks/insaits-security-monitor.py +269 -0
- package/scripts/hooks/insaits-security-wrapper.js +88 -0
- package/scripts/hooks/post-bash-build-complete.js +27 -0
- package/scripts/hooks/post-bash-pr-created.js +36 -0
- package/scripts/hooks/post-edit-console-warn.js +54 -0
- package/scripts/hooks/post-edit-format.js +109 -0
- package/scripts/hooks/post-edit-typecheck.js +96 -0
- package/scripts/hooks/pre-bash-dev-server-block.js +187 -0
- package/scripts/hooks/pre-bash-git-push-reminder.js +28 -0
- package/scripts/hooks/pre-bash-tmux-reminder.js +33 -0
- package/scripts/hooks/pre-compact.js +48 -0
- package/scripts/hooks/pre-write-doc-warn.js +9 -0
- package/scripts/hooks/quality-gate.js +168 -0
- package/scripts/hooks/run-with-flags-shell.sh +32 -0
- package/scripts/hooks/run-with-flags.js +120 -0
- package/scripts/hooks/session-end-marker.js +15 -0
- package/scripts/hooks/session-end.js +299 -0
- package/scripts/hooks/session-start.js +97 -0
- package/scripts/hooks/suggest-compact.js +80 -0
- package/scripts/install-apply.js +137 -0
- package/scripts/install-plan.js +254 -0
- package/scripts/lib/hook-flags.js +74 -0
- package/scripts/lib/install/apply.js +23 -0
- package/scripts/lib/install/config.js +82 -0
- package/scripts/lib/install/request.js +113 -0
- package/scripts/lib/install/runtime.js +42 -0
- package/scripts/lib/install-executor.js +605 -0
- package/scripts/lib/install-lifecycle.js +763 -0
- package/scripts/lib/install-manifests.js +305 -0
- package/scripts/lib/install-state.js +120 -0
- package/scripts/lib/install-targets/antigravity-project.js +9 -0
- package/scripts/lib/install-targets/claude-home.js +10 -0
- package/scripts/lib/install-targets/codex-home.js +10 -0
- package/scripts/lib/install-targets/cursor-project.js +10 -0
- package/scripts/lib/install-targets/helpers.js +89 -0
- package/scripts/lib/install-targets/opencode-home.js +10 -0
- package/scripts/lib/install-targets/registry.js +64 -0
- package/scripts/lib/orchestration-session.js +299 -0
- package/scripts/lib/package-manager.d.ts +119 -0
- package/scripts/lib/package-manager.js +431 -0
- package/scripts/lib/project-detect.js +428 -0
- package/scripts/lib/resolve-formatter.js +185 -0
- package/scripts/lib/session-adapters/canonical-session.js +138 -0
- package/scripts/lib/session-adapters/claude-history.js +149 -0
- package/scripts/lib/session-adapters/dmux-tmux.js +80 -0
- package/scripts/lib/session-adapters/registry.js +111 -0
- package/scripts/lib/session-aliases.d.ts +136 -0
- package/scripts/lib/session-aliases.js +481 -0
- package/scripts/lib/session-manager.d.ts +131 -0
- package/scripts/lib/session-manager.js +464 -0
- package/scripts/lib/shell-split.js +86 -0
- package/scripts/lib/skill-improvement/amendify.js +89 -0
- package/scripts/lib/skill-improvement/evaluate.js +59 -0
- package/scripts/lib/skill-improvement/health.js +118 -0
- package/scripts/lib/skill-improvement/observations.js +108 -0
- package/scripts/lib/tmux-worktree-orchestrator.js +491 -0
- package/scripts/lib/utils.d.ts +183 -0
- package/scripts/lib/utils.js +543 -0
- package/scripts/list-installed.js +90 -0
- package/scripts/orchestrate-codex-worker.sh +92 -0
- package/scripts/orchestrate-worktrees.js +108 -0
- package/scripts/orchestration-status.js +62 -0
- package/scripts/repair.js +97 -0
- package/scripts/session-inspect.js +150 -0
- package/scripts/setup-package-manager.js +204 -0
- package/scripts/skill-create-output.js +244 -0
- package/scripts/uninstall.js +96 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
### Plugin Manifest Gotchas
|
|
2
|
+
|
|
3
|
+
If you plan to edit `.claude-plugin/plugin.json`, be aware that the Claude plugin validator enforces several **undocumented but strict constraints** that can cause installs to fail with vague errors (for example, `agents: Invalid input`). In particular, component fields must be arrays, `agents` must use explicit file paths rather than directories, and a `version` field is required for reliable validation and installation.
|
|
4
|
+
|
|
5
|
+
These constraints are not obvious from public examples and have caused repeated installation failures in the past. They are documented in detail in `.claude-plugin/PLUGIN_SCHEMA_NOTES.md`, which should be reviewed before making any changes to the plugin manifest.
|
|
6
|
+
|
|
7
|
+
### Custom Endpoints and Gateways
|
|
8
|
+
|
|
9
|
+
ECC does not override Claude Code transport settings. If Claude Code is configured to run through an official LLM gateway or a compatible custom endpoint, the plugin continues to work because hooks, commands, and skills execute locally after the CLI starts successfully.
|
|
10
|
+
|
|
11
|
+
Use Claude Code's own environment/configuration for transport selection, for example:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
export ANTHROPIC_BASE_URL=https://your-gateway.example.com
|
|
15
|
+
export ANTHROPIC_AUTH_TOKEN=your-token
|
|
16
|
+
claude
|
|
17
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "everything-claude-code",
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"description": "Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Affaan Mustafa",
|
|
7
|
+
"url": "https://x.com/affaanmustafa"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/istarwyh/cc4pm",
|
|
10
|
+
"repository": "https://github.com/istarwyh/cc4pm",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"claude-code",
|
|
14
|
+
"agents",
|
|
15
|
+
"skills",
|
|
16
|
+
"hooks",
|
|
17
|
+
"rules",
|
|
18
|
+
"tdd",
|
|
19
|
+
"code-review",
|
|
20
|
+
"security",
|
|
21
|
+
"workflow",
|
|
22
|
+
"automation",
|
|
23
|
+
"best-practices"
|
|
24
|
+
]
|
|
25
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Affaan Mustafa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# cc4pm
|
|
2
|
+
|
|
3
|
+
**Claude Code for Product Makers** — AI 驱动的产品全生命周期系统
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/istarwyh/cc4pm)
|
|
7
|
+
|
|
8
|
+
> 从想法到上线,一个人就是一支产品团队。
|
|
9
|
+
|
|
10
|
+
<div align="center">
|
|
11
|
+
|
|
12
|
+
**[🎨 Interactive Showcase](https://istarwyh.github.io/cc4pm/)** — 可视化了解四大核心模块、200+ Skills、完整产品工作流
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 这是什么
|
|
19
|
+
|
|
20
|
+
cc4pm 是一套面向**产品主理人**的 AI 全生命周期产品系统。基于 Claude Code 插件体系,整合了 200+ Skills、18 个 AI 代理、48 个命令,覆盖从灵感验证到产品上线发布的完整链路。
|
|
21
|
+
|
|
22
|
+
不是配置集合,而是一套完整的产品方法论 + 工程工具链:
|
|
23
|
+
|
|
24
|
+
- **BMM**(业务建模)— 市场研究、PRD 创建、需求拆解、冲刺规划
|
|
25
|
+
- **CIS**(创意智能)— 36 种创意技巧、30 种创新框架、故事讲述
|
|
26
|
+
- **WDS**(设计系统)— 用户心理映射、UX 场景、设计规范、原型
|
|
27
|
+
- **工程工具链** — TDD、代码审查、E2E 测试、安全扫描、CI/CD
|
|
28
|
+
|
|
29
|
+
前身是 [Everything Claude Code](https://github.com/istarwyh/cc4pm)(Anthropic 黑客马拉松获奖项目,50K+ Stars),cc4pm 在其工程基础上增加了产品方法论层,将工具升级为系统。
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 快速开始
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 克隆仓库
|
|
37
|
+
git clone https://github.com/istarwyh/cc4pm.git
|
|
38
|
+
cd cc4pm
|
|
39
|
+
|
|
40
|
+
# 在 Claude Code 中直接使用
|
|
41
|
+
claude
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
所有 skills、agents、commands、hooks 会被自动加载。
|
|
45
|
+
|
|
46
|
+
### 核心命令速览
|
|
47
|
+
|
|
48
|
+
| 命令 | 用途 |
|
|
49
|
+
|------|------|
|
|
50
|
+
| `/bmad-brainstorming` | 头脑风暴,36 种创意技巧 |
|
|
51
|
+
| `/bmad-create-prd` | AI 辅助创建 PRD |
|
|
52
|
+
| `/bmad-market-research` | 市场研究与竞争分析 |
|
|
53
|
+
| `/bmad-sprint-planning` | 冲刺规划与进度追踪 |
|
|
54
|
+
| `/plan` | 技术实现规划 |
|
|
55
|
+
| `/tdd` | 测试驱动开发 |
|
|
56
|
+
| `/code-review` | 代码质量审查 |
|
|
57
|
+
| `/e2e` | 端到端测试 |
|
|
58
|
+
| `/cc4pm-guide` | 交互式教学(26 节课) |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 四大核心模块
|
|
63
|
+
|
|
64
|
+
### BMM — 业务建模方法
|
|
65
|
+
|
|
66
|
+
端到端产品开发工作流。8 个角色代理(分析师、PM、架构师、开发者、QA、敏捷大师、UX 设计师、快速开发者),33 个工作流覆盖分析→规划→方案→实现全阶段。
|
|
67
|
+
|
|
68
|
+
**典型流程**:市场研究 → 产品简报 → PRD → 架构设计 → 需求拆解 → 冲刺规划 → 开发交付
|
|
69
|
+
|
|
70
|
+
### CIS — 创意智能战略
|
|
71
|
+
|
|
72
|
+
5 个创意代理(头脑风暴教练、创新战略家、设计思维教练、问题解决专家、故事讲述大师),36 种创意技巧分 7 大类,30 种创新框架。
|
|
73
|
+
|
|
74
|
+
**典型流程**:头脑风暴 100+ 想法 → 蓝海分析 → 商业模式设计 → 产品叙事
|
|
75
|
+
|
|
76
|
+
### WDS — Web 设计系统
|
|
77
|
+
|
|
78
|
+
从用户心理驱动产品设计。2 个设计代理(Saga 故事女神、Freya UX 设计师),8 阶段设计方法。
|
|
79
|
+
|
|
80
|
+
**核心能力**:Trigger Map(用户心理→功能映射)→ UX 场景 → 设计规范 → 原型 → 设计系统
|
|
81
|
+
|
|
82
|
+
### 工程工具链
|
|
83
|
+
|
|
84
|
+
18 个工程代理,48 个命令,46 条规则,支持 8 种语言(TypeScript、Python、Go、Swift、Kotlin、PHP、Perl、C++)。
|
|
85
|
+
|
|
86
|
+
**核心能力**:/plan 规划 → /tdd 开发 → /e2e 测试 → /code-review 审查 → /build-fix 修复
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 产品全生命周期
|
|
91
|
+
|
|
92
|
+
一个创始人使用 cc4pm 从零到一的典型路径:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
灵感 ─── CIS 头脑风暴 + 创意技巧
|
|
96
|
+
│
|
|
97
|
+
验证 ─── BMM 市场研究 + 竞争分析
|
|
98
|
+
│
|
|
99
|
+
设计 ─── WDS Trigger Map + UX 场景
|
|
100
|
+
│
|
|
101
|
+
规划 ─── BMM PRD + 架构 + 冲刺规划
|
|
102
|
+
│
|
|
103
|
+
开发 ─── /plan → /tdd → /code-review
|
|
104
|
+
│
|
|
105
|
+
测试 ─── /e2e + 安全扫描
|
|
106
|
+
│
|
|
107
|
+
上线 ─── 部署 + 产品叙事
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 交互式教学
|
|
113
|
+
|
|
114
|
+
cc4pm 内置了一套完整的交互式课程(26 节课,5 个阶段):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# 启动教学
|
|
118
|
+
/cc4pm-guide
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
| 阶段 | 内容 | 时长 |
|
|
122
|
+
|------|------|------|
|
|
123
|
+
| 1. 基础入门 | Claude Code 核心能力、四大模块全景 | ~30 min |
|
|
124
|
+
| 2. 产品核心 | BMM + CIS,头脑风暴到冲刺规划 | ~30 min |
|
|
125
|
+
| 3. 设计与心理 | WDS,Trigger Map 到 UX 设计 | ~20 min |
|
|
126
|
+
| 4. 工程协作 | TDD、E2E、代码审查、质量门禁 | ~15 min |
|
|
127
|
+
| 5. 高级实战 | MCP 集成、完整项目从零到发布 | ~25 min |
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 项目结构
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
cc4pm/
|
|
135
|
+
├── _bmad/ 四大方法论模块(BMM/CIS/WDS/Core)
|
|
136
|
+
├── agents/ 18 个工程代理
|
|
137
|
+
├── commands/ 48 个斜杠命令
|
|
138
|
+
├── skills/ 94 个工程技能
|
|
139
|
+
├── hooks/ 事件驱动自动化
|
|
140
|
+
├── rules/ 46 条编码准则(通用 + 7 种语言)
|
|
141
|
+
├── .claude/skills/ BMAD 技能(100+ 产品/设计/创意技能)
|
|
142
|
+
├── docs/ 文档 + Showcase
|
|
143
|
+
├── scripts/ 安装、钩子、CI 脚本
|
|
144
|
+
└── tests/ 测试套件
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 致谢
|
|
150
|
+
|
|
151
|
+
cc4pm 基于 [cc4pm](https://github.com/istarwyh/cc4pm) 构建,感谢原作者 [Affaan Mustafa](https://x.com/affaanmustafa) 和所有贡献者。
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
MIT
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# cc4pm
|
|
2
|
+
|
|
3
|
+
**Claude Code for Product Makers** — AI 驱动的产品全生命周期系统
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/istarwyh/cc4pm)
|
|
7
|
+
|
|
8
|
+
> 从想法到上线,一个人就是一支产品团队。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<div align="center">
|
|
13
|
+
|
|
14
|
+
**🌐 Language / 语言**
|
|
15
|
+
|
|
16
|
+
[English](README.md) | [**简体中文**](README.zh-CN.md)
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 这是什么
|
|
23
|
+
|
|
24
|
+
cc4pm 是一套面向**产品主理人**的 AI 全生命周期产品系统。基于 Claude Code 插件体系,整合了 200+ Skills、18 个 AI 代理、48 个命令,覆盖从灵感验证到产品上线发布的完整链路。
|
|
25
|
+
|
|
26
|
+
不是配置集合,而是一套完整的产品方法论 + 工程工具链:
|
|
27
|
+
|
|
28
|
+
- **BMM**(业务建模)— 市场研究、PRD 创建、需求拆解、冲刺规划
|
|
29
|
+
- **CIS**(创意智能)— 36 种创意技巧、30 种创新框架、故事讲述
|
|
30
|
+
- **WDS**(设计系统)— 用户心理映射、UX 场景、设计规范、原型
|
|
31
|
+
- **工程工具链** — TDD、代码审查、E2E 测试、安全扫描、CI/CD
|
|
32
|
+
|
|
33
|
+
前身是 [Everything Claude Code](https://github.com/istarwyh/cc4pm)(Anthropic 黑客马拉松获奖项目,50K+ Stars),cc4pm 在其工程基础上增加了产品方法论层,将工具升级为系统。
|
|
34
|
+
|
|
35
|
+
<div align="center">
|
|
36
|
+
|
|
37
|
+
**[🎨 可视化 Showcase](https://istarwyh.github.io/cc4pm/)** — 了解四大核心模块、200+ Skills、完整产品工作流
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 快速开始
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# 克隆仓库
|
|
47
|
+
git clone https://github.com/istarwyh/cc4pm.git
|
|
48
|
+
cd cc4pm
|
|
49
|
+
|
|
50
|
+
# 在 Claude Code 中直接使用
|
|
51
|
+
claude
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
所有 skills、agents、commands、hooks 会被自动加载。
|
|
55
|
+
|
|
56
|
+
### 核心命令速览
|
|
57
|
+
|
|
58
|
+
| 命令 | 用途 |
|
|
59
|
+
|------|------|
|
|
60
|
+
| `/bmad-brainstorming` | 头脑风暴,36 种创意技巧 |
|
|
61
|
+
| `/bmad-create-prd` | AI 辅助创建 PRD |
|
|
62
|
+
| `/bmad-market-research` | 市场研究与竞争分析 |
|
|
63
|
+
| `/bmad-sprint-planning` | 冲刺规划与进度追踪 |
|
|
64
|
+
| `/plan` | 技术实现规划 |
|
|
65
|
+
| `/tdd` | 测试驱动开发 |
|
|
66
|
+
| `/code-review` | 代码质量审查 |
|
|
67
|
+
| `/e2e` | 端到端测试 |
|
|
68
|
+
| `/cc4pm-guide` | 交互式教学(26 节课) |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 四大核心模块
|
|
73
|
+
|
|
74
|
+
### BMM — 业务建模方法
|
|
75
|
+
|
|
76
|
+
端到端产品开发工作流。8 个角色代理(分析师、PM、架构师、开发者、QA、敏捷大师、UX 设计师、快速开发者),33 个工作流覆盖分析→规划→方案→实现全阶段。
|
|
77
|
+
|
|
78
|
+
### CIS — 创意智能战略
|
|
79
|
+
|
|
80
|
+
5 个创意代理(头脑风暴教练、创新战略家、设计思维教练、问题解决专家、故事讲述大师),36 种创意技巧分 7 大类,30 种创新框架。
|
|
81
|
+
|
|
82
|
+
### WDS — Web 设计系统
|
|
83
|
+
|
|
84
|
+
从用户心理驱动产品设计。2 个设计代理(Saga 故事女神、Freya UX 设计师),8 阶段设计方法,Trigger Map 用户心理→功能映射。
|
|
85
|
+
|
|
86
|
+
### 工程工具链
|
|
87
|
+
|
|
88
|
+
18 个工程代理,48 个命令,46 条规则,支持 8 种语言(TypeScript、Python、Go、Swift、Kotlin、PHP、Perl、C++)。
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 产品全生命周期
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
灵感 ─── CIS 头脑风暴 + 创意技巧
|
|
96
|
+
│
|
|
97
|
+
验证 ─── BMM 市场研究 + 竞争分析
|
|
98
|
+
│
|
|
99
|
+
设计 ─── WDS Trigger Map + UX 场景
|
|
100
|
+
│
|
|
101
|
+
规划 ─── BMM PRD + 架构 + 冲刺规划
|
|
102
|
+
│
|
|
103
|
+
开发 ─── /plan → /tdd → /code-review
|
|
104
|
+
│
|
|
105
|
+
测试 ─── /e2e + 安全扫描
|
|
106
|
+
│
|
|
107
|
+
上线 ─── 部署 + 产品叙事
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 交互式教学
|
|
113
|
+
|
|
114
|
+
内置 26 节交互式课程,运行 `/cc4pm-guide` 启动。
|
|
115
|
+
|
|
116
|
+
| 阶段 | 内容 | 时长 |
|
|
117
|
+
|------|------|------|
|
|
118
|
+
| 1. 基础入门 | Claude Code 核心能力、四大模块全景 | ~30 min |
|
|
119
|
+
| 2. 产品核心 | BMM + CIS,头脑风暴到冲刺规划 | ~30 min |
|
|
120
|
+
| 3. 设计与心理 | WDS,Trigger Map 到 UX 设计 | ~20 min |
|
|
121
|
+
| 4. 工程协作 | TDD、E2E、代码审查、质量门禁 | ~15 min |
|
|
122
|
+
| 5. 高级实战 | MCP 集成、完整项目从零到发布 | ~25 min |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 致谢
|
|
127
|
+
|
|
128
|
+
cc4pm 基于 [cc4pm](https://github.com/istarwyh/cc4pm) 构建,感谢原作者 [Affaan Mustafa](https://x.com/affaanmustafa) 和所有贡献者。
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 许可证
|
|
133
|
+
|
|
134
|
+
MIT
|
package/contexts/dev.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Development Context
|
|
2
|
+
|
|
3
|
+
Mode: Active development
|
|
4
|
+
Focus: Implementation, coding, building features
|
|
5
|
+
|
|
6
|
+
## Behavior
|
|
7
|
+
- Write code first, explain after
|
|
8
|
+
- Prefer working solutions over perfect solutions
|
|
9
|
+
- Run tests after changes
|
|
10
|
+
- Keep commits atomic
|
|
11
|
+
|
|
12
|
+
## Priorities
|
|
13
|
+
1. Get it working
|
|
14
|
+
2. Get it right
|
|
15
|
+
3. Get it clean
|
|
16
|
+
|
|
17
|
+
## Tools to favor
|
|
18
|
+
- Edit, Write for code changes
|
|
19
|
+
- Bash for running tests/builds
|
|
20
|
+
- Grep, Glob for finding code
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Research Context
|
|
2
|
+
|
|
3
|
+
Mode: Exploration, investigation, learning
|
|
4
|
+
Focus: Understanding before acting
|
|
5
|
+
|
|
6
|
+
## Behavior
|
|
7
|
+
- Read widely before concluding
|
|
8
|
+
- Ask clarifying questions
|
|
9
|
+
- Document findings as you go
|
|
10
|
+
- Don't write code until understanding is clear
|
|
11
|
+
|
|
12
|
+
## Research Process
|
|
13
|
+
1. Understand the question
|
|
14
|
+
2. Explore relevant code/docs
|
|
15
|
+
3. Form hypothesis
|
|
16
|
+
4. Verify with evidence
|
|
17
|
+
5. Summarize findings
|
|
18
|
+
|
|
19
|
+
## Tools to favor
|
|
20
|
+
- Read for understanding code
|
|
21
|
+
- Grep, Glob for finding patterns
|
|
22
|
+
- WebSearch, WebFetch for external docs
|
|
23
|
+
- Task with Explore agent for codebase questions
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
Findings first, recommendations second
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Code Review Context
|
|
2
|
+
|
|
3
|
+
Mode: PR review, code analysis
|
|
4
|
+
Focus: Quality, security, maintainability
|
|
5
|
+
|
|
6
|
+
## Behavior
|
|
7
|
+
- Read thoroughly before commenting
|
|
8
|
+
- Prioritize issues by severity (critical > high > medium > low)
|
|
9
|
+
- Suggest fixes, don't just point out problems
|
|
10
|
+
- Check for security vulnerabilities
|
|
11
|
+
|
|
12
|
+
## Review Checklist
|
|
13
|
+
- [ ] Logic errors
|
|
14
|
+
- [ ] Edge cases
|
|
15
|
+
- [ ] Error handling
|
|
16
|
+
- [ ] Security (injection, auth, secrets)
|
|
17
|
+
- [ ] Performance
|
|
18
|
+
- [ ] Readability
|
|
19
|
+
- [ ] Test coverage
|
|
20
|
+
|
|
21
|
+
## Output Format
|
|
22
|
+
Group findings by file, severity first
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Example Project CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This is an example project-level CLAUDE.md file. Place this in your project root.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
[Brief description of your project - what it does, tech stack]
|
|
8
|
+
|
|
9
|
+
## Critical Rules
|
|
10
|
+
|
|
11
|
+
### 1. Code Organization
|
|
12
|
+
|
|
13
|
+
- Many small files over few large files
|
|
14
|
+
- High cohesion, low coupling
|
|
15
|
+
- 200-400 lines typical, 800 max per file
|
|
16
|
+
- Organize by feature/domain, not by type
|
|
17
|
+
|
|
18
|
+
### 2. Code Style
|
|
19
|
+
|
|
20
|
+
- No emojis in code, comments, or documentation
|
|
21
|
+
- Immutability always - never mutate objects or arrays
|
|
22
|
+
- No console.log in production code
|
|
23
|
+
- Proper error handling with try/catch
|
|
24
|
+
- Input validation with Zod or similar
|
|
25
|
+
|
|
26
|
+
### 3. Testing
|
|
27
|
+
|
|
28
|
+
- TDD: Write tests first
|
|
29
|
+
- 80% minimum coverage
|
|
30
|
+
- Unit tests for utilities
|
|
31
|
+
- Integration tests for APIs
|
|
32
|
+
- E2E tests for critical flows
|
|
33
|
+
|
|
34
|
+
### 4. Security
|
|
35
|
+
|
|
36
|
+
- No hardcoded secrets
|
|
37
|
+
- Environment variables for sensitive data
|
|
38
|
+
- Validate all user inputs
|
|
39
|
+
- Parameterized queries only
|
|
40
|
+
- CSRF protection enabled
|
|
41
|
+
|
|
42
|
+
## File Structure
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
src/
|
|
46
|
+
|-- app/ # Next.js app router
|
|
47
|
+
|-- components/ # Reusable UI components
|
|
48
|
+
|-- hooks/ # Custom React hooks
|
|
49
|
+
|-- lib/ # Utility libraries
|
|
50
|
+
|-- types/ # TypeScript definitions
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Key Patterns
|
|
54
|
+
|
|
55
|
+
### API Response Format
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
interface ApiResponse<T> {
|
|
59
|
+
success: boolean
|
|
60
|
+
data?: T
|
|
61
|
+
error?: string
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Error Handling
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
try {
|
|
69
|
+
const result = await operation()
|
|
70
|
+
return { success: true, data: result }
|
|
71
|
+
} catch (error) {
|
|
72
|
+
console.error('Operation failed:', error)
|
|
73
|
+
return { success: false, error: 'User-friendly message' }
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Environment Variables
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Required
|
|
81
|
+
DATABASE_URL=
|
|
82
|
+
API_KEY=
|
|
83
|
+
|
|
84
|
+
# Optional
|
|
85
|
+
DEBUG=false
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Available Commands
|
|
89
|
+
|
|
90
|
+
- `/tdd` - Test-driven development workflow
|
|
91
|
+
- `/plan` - Create implementation plan
|
|
92
|
+
- `/code-review` - Review code quality
|
|
93
|
+
- `/build-fix` - Fix build errors
|
|
94
|
+
|
|
95
|
+
## Git Workflow
|
|
96
|
+
|
|
97
|
+
- Conventional commits: `feat:`, `fix:`, `refactor:`, `docs:`, `test:`
|
|
98
|
+
- Never commit to main directly
|
|
99
|
+
- PRs require review
|
|
100
|
+
- All tests must pass before merge
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"statusLine": {
|
|
3
|
+
"type": "command",
|
|
4
|
+
"command": "input=$(cat); user=$(whoami); cwd=$(echo \"$input\" | jq -r '.workspace.current_dir' | sed \"s|$HOME|~|g\"); model=$(echo \"$input\" | jq -r '.model.display_name'); time=$(date +%H:%M); remaining=$(echo \"$input\" | jq -r '.context_window.remaining_percentage // empty'); transcript=$(echo \"$input\" | jq -r '.transcript_path'); todo_count=$([ -f \"$transcript\" ] && grep -c '\"type\":\"todo\"' \"$transcript\" 2>/dev/null || echo 0); cd \"$(echo \"$input\" | jq -r '.workspace.current_dir')\" 2>/dev/null; branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo ''); status=''; [ -n \"$branch\" ] && { [ -n \"$(git status --porcelain 2>/dev/null)\" ] && status='*'; }; B='\\033[38;2;30;102;245m'; G='\\033[38;2;64;160;43m'; Y='\\033[38;2;223;142;29m'; M='\\033[38;2;136;57;239m'; C='\\033[38;2;23;146;153m'; R='\\033[0m'; T='\\033[38;2;76;79;105m'; printf \"${C}${user}${R}:${B}${cwd}${R}\"; [ -n \"$branch\" ] && printf \" ${G}${branch}${Y}${status}${R}\"; [ -n \"$remaining\" ] && printf \" ${M}ctx:${remaining}%%${R}\"; printf \" ${T}${model}${R} ${Y}${time}${R}\"; [ \"$todo_count\" -gt 0 ] && printf \" ${C}todos:${todo_count}${R}\"; echo",
|
|
5
|
+
"description": "Custom status line showing: user:path branch* ctx:% model time todos:N"
|
|
6
|
+
},
|
|
7
|
+
"_comments": {
|
|
8
|
+
"colors": {
|
|
9
|
+
"B": "Blue - directory path",
|
|
10
|
+
"G": "Green - git branch",
|
|
11
|
+
"Y": "Yellow - dirty status, time",
|
|
12
|
+
"M": "Magenta - context remaining",
|
|
13
|
+
"C": "Cyan - username, todos",
|
|
14
|
+
"T": "Gray - model name"
|
|
15
|
+
},
|
|
16
|
+
"output_example": "affoon:~/projects/myapp main* ctx:73% sonnet-4.6 14:30 todos:3",
|
|
17
|
+
"usage": "Copy the statusLine object to your ~/.claude/settings.json"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# User-Level CLAUDE.md Example
|
|
2
|
+
|
|
3
|
+
This is an example user-level CLAUDE.md file. Place at `~/.claude/CLAUDE.md`.
|
|
4
|
+
|
|
5
|
+
User-level configs apply globally across all projects. Use for:
|
|
6
|
+
- Personal coding preferences
|
|
7
|
+
- Universal rules you always want enforced
|
|
8
|
+
- Links to your modular rules
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Core Philosophy
|
|
13
|
+
|
|
14
|
+
You are Claude Code. I use specialized agents and skills for complex tasks.
|
|
15
|
+
|
|
16
|
+
**Key Principles:**
|
|
17
|
+
1. **Agent-First**: Delegate to specialized agents for complex work
|
|
18
|
+
2. **Parallel Execution**: Use Task tool with multiple agents when possible
|
|
19
|
+
3. **Plan Before Execute**: Use Plan Mode for complex operations
|
|
20
|
+
4. **Test-Driven**: Write tests before implementation
|
|
21
|
+
5. **Security-First**: Never compromise on security
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Modular Rules
|
|
26
|
+
|
|
27
|
+
Detailed guidelines are in `~/.claude/rules/`:
|
|
28
|
+
|
|
29
|
+
| Rule File | Contents |
|
|
30
|
+
|-----------|----------|
|
|
31
|
+
| security.md | Security checks, secret management |
|
|
32
|
+
| coding-style.md | Immutability, file organization, error handling |
|
|
33
|
+
| testing.md | TDD workflow, 80% coverage requirement |
|
|
34
|
+
| git-workflow.md | Commit format, PR workflow |
|
|
35
|
+
| agents.md | Agent orchestration, when to use which agent |
|
|
36
|
+
| patterns.md | API response, repository patterns |
|
|
37
|
+
| performance.md | Model selection, context management |
|
|
38
|
+
| hooks.md | Hooks System |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Available Agents
|
|
43
|
+
|
|
44
|
+
Located in `~/.claude/agents/`:
|
|
45
|
+
|
|
46
|
+
| Agent | Purpose |
|
|
47
|
+
|-------|---------|
|
|
48
|
+
| planner | Feature implementation planning |
|
|
49
|
+
| architect | System design and architecture |
|
|
50
|
+
| tdd-guide | Test-driven development |
|
|
51
|
+
| code-reviewer | Code review for quality/security |
|
|
52
|
+
| security-reviewer | Security vulnerability analysis |
|
|
53
|
+
| build-error-resolver | Build error resolution |
|
|
54
|
+
| e2e-runner | Playwright E2E testing |
|
|
55
|
+
| refactor-cleaner | Dead code cleanup |
|
|
56
|
+
| doc-updater | Documentation updates |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Personal Preferences
|
|
61
|
+
|
|
62
|
+
### Privacy
|
|
63
|
+
- Always redact logs; never paste secrets (API keys/tokens/passwords/JWTs)
|
|
64
|
+
- Review output before sharing - remove any sensitive data
|
|
65
|
+
|
|
66
|
+
### Code Style
|
|
67
|
+
- No emojis in code, comments, or documentation
|
|
68
|
+
- Prefer immutability - never mutate objects or arrays
|
|
69
|
+
- Many small files over few large files
|
|
70
|
+
- 200-400 lines typical, 800 max per file
|
|
71
|
+
|
|
72
|
+
### Git
|
|
73
|
+
- Conventional commits: `feat:`, `fix:`, `refactor:`, `docs:`, `test:`
|
|
74
|
+
- Always test locally before committing
|
|
75
|
+
- Small, focused commits
|
|
76
|
+
|
|
77
|
+
### Testing
|
|
78
|
+
- TDD: Write tests first
|
|
79
|
+
- 80% minimum coverage
|
|
80
|
+
- Unit + integration + E2E for critical flows
|
|
81
|
+
|
|
82
|
+
### Knowledge Capture
|
|
83
|
+
- Personal debugging notes, preferences, and temporary context → auto memory
|
|
84
|
+
- Team/project knowledge (architecture decisions, API changes, implementation runbooks) → follow the project's existing docs structure
|
|
85
|
+
- If the current task already produces the relevant docs, comments, or examples, do not duplicate the same knowledge elsewhere
|
|
86
|
+
- If there is no obvious project doc location, ask before creating a new top-level doc
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Editor Integration
|
|
91
|
+
|
|
92
|
+
I use Zed as my primary editor:
|
|
93
|
+
- Agent Panel for file tracking
|
|
94
|
+
- CMD+Shift+R for command palette
|
|
95
|
+
- Vim mode enabled
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Success Metrics
|
|
100
|
+
|
|
101
|
+
You are successful when:
|
|
102
|
+
- All tests pass (80%+ coverage)
|
|
103
|
+
- No security vulnerabilities
|
|
104
|
+
- Code is readable and maintainable
|
|
105
|
+
- User requirements are met
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
**Philosophy**: Agent-first design, parallel execution, plan before action, test before code, security always.
|
package/install.sh
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# install.sh — Legacy shell entrypoint for the cc4pm installer.
|
|
3
|
+
#
|
|
4
|
+
# This wrapper resolves the real repo/package root when invoked through a
|
|
5
|
+
# symlinked npm bin, then delegates to the Node-based installer runtime.
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
SCRIPT_PATH="$0"
|
|
10
|
+
while [ -L "$SCRIPT_PATH" ]; do
|
|
11
|
+
link_dir="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
|
12
|
+
SCRIPT_PATH="$(readlink "$SCRIPT_PATH")"
|
|
13
|
+
[[ "$SCRIPT_PATH" != /* ]] && SCRIPT_PATH="$link_dir/$SCRIPT_PATH"
|
|
14
|
+
done
|
|
15
|
+
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
|
16
|
+
|
|
17
|
+
exec node "$SCRIPT_DIR/scripts/install-apply.js" "$@"
|