zcf 2.5.2 → 2.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.
Files changed (25) hide show
  1. package/README.md +47 -10
  2. package/dist/cli.mjs +13 -8
  3. package/dist/index.d.mts +222 -345
  4. package/dist/index.d.ts +222 -345
  5. package/dist/index.mjs +2 -1
  6. package/dist/shared/{zcf.CEsHvLRM.mjs → zcf.D0vK2hDT.mjs} +833 -401
  7. package/package.json +1 -1
  8. package/templates/en/workflow/bmad/commands/bmad-init.md +103 -0
  9. package/templates/en/{commands → workflow/sixStep/commands}/workflow.md +1 -1
  10. package/templates/zh-CN/workflow/bmad/commands/bmad-init.md +109 -0
  11. package/templates/zh-CN/{commands → workflow/sixStep/commands}/workflow.md +1 -1
  12. /package/templates/en/{mcp.md → memory/mcp.md} +0 -0
  13. /package/templates/en/{personality.md → memory/personality.md} +0 -0
  14. /package/templates/en/{rules.md → memory/rules.md} +0 -0
  15. /package/templates/en/{technical-guides.md → memory/technical-guides.md} +0 -0
  16. /package/templates/en/{agents → workflow/plan/agents}/planner.md +0 -0
  17. /package/templates/en/{agents → workflow/plan/agents}/ui-ux-designer.md +0 -0
  18. /package/templates/en/{commands → workflow/plan/commands}/feat.md +0 -0
  19. /package/templates/zh-CN/{mcp.md → memory/mcp.md} +0 -0
  20. /package/templates/zh-CN/{personality.md → memory/personality.md} +0 -0
  21. /package/templates/zh-CN/{rules.md → memory/rules.md} +0 -0
  22. /package/templates/zh-CN/{technical-guides.md → memory/technical-guides.md} +0 -0
  23. /package/templates/zh-CN/{agents → workflow/plan/agents}/planner.md +0 -0
  24. /package/templates/zh-CN/{agents → workflow/plan/agents}/ui-ux-designer.md +0 -0
  25. /package/templates/zh-CN/{commands → workflow/plan/commands}/feat.md +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "2.5.2",
4
+ "version": "2.6.0",
5
5
  "description": "Zero-Config Claude-Code Flow - One-click configuration tool for Claude Code",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/UfoMiao/zcf",
@@ -0,0 +1,103 @@
1
+ # /bmad-init Command
2
+
3
+ This command initializes BMad Method in your project.
4
+
5
+ ## When this command is invoked:
6
+
7
+ 1. Check if BMad is already installed by looking for `.bmad-core/install-manifest.yaml`
8
+ 2. If installed, check version in manifest against latest version
9
+ 3. If not installed or outdated, execute: `npx bmad-method@latest install -f -d . -i claude-code`
10
+ 4. Display success message and prompt user to restart Claude Code
11
+
12
+ ## Implementation
13
+
14
+ ```javascript
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+ const { execSync } = require('child_process');
18
+
19
+ async function initBmad() {
20
+ // Check if already installed and get version
21
+ const manifestPath = path.join(process.cwd(), '.bmad-core', 'install-manifest.yaml');
22
+ let needsInstall = true;
23
+ let currentVersion = null;
24
+
25
+ if (fs.existsSync(manifestPath)) {
26
+ try {
27
+ // Simple version check - just check if file exists
28
+ // Full YAML parsing would require js-yaml package
29
+ const manifestContent = fs.readFileSync(manifestPath, 'utf8');
30
+ const versionMatch = manifestContent.match(/version:\s*(.+)/);
31
+ if (versionMatch) {
32
+ currentVersion = versionMatch[1].trim();
33
+ }
34
+
35
+ // Get latest version from npm
36
+ const latestVersion = execSync('npm view bmad-method version', { encoding: 'utf8' }).trim();
37
+
38
+ if (currentVersion === latestVersion) {
39
+ console.log(`✅ BMad Method is up to date (v${currentVersion})`);
40
+ console.log('You can use BMad commands to begin your workflow');
41
+ needsInstall = false;
42
+ } else {
43
+ console.log(`🔄 BMad Method update available: v${currentVersion} → v${latestVersion}`);
44
+ }
45
+ } catch (error) {
46
+ console.log('⚠️ Could not verify BMad version, will reinstall');
47
+ }
48
+ }
49
+
50
+ if (needsInstall === false) {
51
+ return;
52
+ }
53
+
54
+ // Install BMad
55
+ console.log('🚀 Installing BMad Method...');
56
+ try {
57
+ execSync('echo -e "1\\n" | npx bmad-method@latest install -f -d . -i claude-code', {
58
+ stdio: 'inherit',
59
+ cwd: process.cwd(),
60
+ shell: true
61
+ });
62
+
63
+ console.log('✅ BMad Method installed successfully!');
64
+ console.log('');
65
+ console.log('═══════════════════════════════════════════════════════════════');
66
+ console.log('📌 IMPORTANT: Please restart Claude Code to load BMad agents');
67
+ console.log('═══════════════════════════════════════════════════════════════');
68
+ console.log('');
69
+ console.log('📂 Installation Details:');
70
+ console.log(' • All agents and task commands are installed in:');
71
+ console.log(' .claude/commands/BMad/');
72
+ console.log('');
73
+ console.log('🔧 Git Configuration (Optional):');
74
+ console.log(' If you prefer not to commit BMad workflow files, add these to .gitignore:');
75
+ console.log(' • .bmad-core');
76
+ console.log(' • .claude/commands/BMad');
77
+ console.log(' • docs/');
78
+ console.log('');
79
+ console.log('🚀 Getting Started:');
80
+ console.log(' 1. Restart Claude Code');
81
+ console.log(' 2. For first-time users, run:');
82
+ console.log(' /BMad:agents:bmad-orchestrator *help');
83
+ console.log(' This will start the BMad workflow guidance system');
84
+ console.log('');
85
+ console.log('💡 Tip: The BMad Orchestrator will help you choose the right workflow');
86
+ console.log(' and guide you through the entire development process.');
87
+
88
+ } catch (error) {
89
+ console.error('❌ Failed to install BMad:', error.message);
90
+ process.exit(1);
91
+ }
92
+ }
93
+
94
+ // Execute
95
+ initBmad();
96
+ ```
97
+
98
+ ## Notes
99
+
100
+ - This command requires npm/npx to be available
101
+ - The installation will download the latest BMad Method package
102
+ - User must restart Claude Code after installation for agents to load properly
103
+ - BMad Method includes its own built-in state tracking system
@@ -9,7 +9,7 @@ Execute structured development workflow with quality gates and MCP service integ
9
9
  ## Usage
10
10
 
11
11
  ```bash
12
- /workflow <TASK_DESCRIPTION>
12
+ /zcf:workflow <TASK_DESCRIPTION>
13
13
  ```
14
14
 
15
15
  ## Context
@@ -0,0 +1,109 @@
1
+ # /bmad-init 命令
2
+
3
+ 此命令在您的项目中初始化 BMad-Method。
4
+
5
+ ## 当调用此命令时:
6
+
7
+ 1. 检查 `.bmad-core/install-manifest.yaml` 文件是否存在,判断 BMad 是否已安装
8
+ 2. 如果已安装,检查 manifest 中的版本号与最新版本对比
9
+ 3. 如果未安装或版本过旧,执行:`npx bmad-method@latest install -f -d . -i claude-code`
10
+ 4. 显示成功消息并提示用户重启 Claude Code
11
+
12
+ ## 实现
13
+
14
+ ```javascript
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+ const { execSync } = require('child_process');
18
+
19
+ async function initBmad() {
20
+ // 检查是否已安装并获取版本
21
+ const manifestPath = path.join(process.cwd(), '.bmad-core', 'install-manifest.yaml');
22
+ let needsInstall = true;
23
+ let currentVersion = null;
24
+
25
+ if (fs.existsSync(manifestPath)) {
26
+ try {
27
+ // 简单版本检查 - 只检查文件是否存在
28
+ // 完整的 YAML 解析需要 js-yaml 包
29
+ const manifestContent = fs.readFileSync(manifestPath, 'utf8');
30
+ const versionMatch = manifestContent.match(/version:\s*(.+)/);
31
+ if (versionMatch) {
32
+ currentVersion = versionMatch[1].trim();
33
+ }
34
+
35
+ // 从 npm 获取最新版本
36
+ const latestVersion = execSync('npm view bmad-method version', { encoding: 'utf8' }).trim();
37
+
38
+ if (currentVersion === latestVersion) {
39
+ console.log(`✅ BMad-Method已是最新版本 (v${currentVersion})`);
40
+ console.log('您可以使用 BMad 命令开始工作流');
41
+ needsInstall = false;
42
+ } else {
43
+ console.log(`🔄 BMad-Method有更新可用:v${currentVersion} → v${latestVersion}`);
44
+ }
45
+ } catch (error) {
46
+ console.log('⚠️ 无法验证 BMad 版本,将重新安装');
47
+ }
48
+ }
49
+
50
+ if (needsInstall === false) {
51
+ return;
52
+ }
53
+
54
+ // 安装 BMad
55
+ console.log('🚀 正在安装 BMad-Method...');
56
+ try {
57
+ execSync('echo -e "1\\n" | npx bmad-method@latest install -f -d . -i claude-code', {
58
+ stdio: 'inherit',
59
+ cwd: process.cwd(),
60
+ shell: true
61
+ });
62
+
63
+ console.log('✅ BMad-Method已成功安装!');
64
+ console.log('');
65
+ console.log('═══════════════════════════════════════════════════════════════');
66
+ console.log('📌 重要提示:请重启 Claude Code 以加载 BMad 扩展');
67
+ console.log('═══════════════════════════════════════════════════════════════');
68
+ console.log('');
69
+ console.log('📂 安装详情:');
70
+ console.log(' • 所有代理和任务命令都已安装在:');
71
+ console.log(' .claude/commands/BMad/ 目录中');
72
+ console.log('');
73
+ console.log('🔧 Git 配置建议(可选):');
74
+ console.log(' 如果您不希望将 BMad 工作流文件提交到 Git,请将以下内容添加到 .gitignore:');
75
+ console.log(' • .bmad-core');
76
+ console.log(' • .claude/commands/BMad');
77
+ console.log(' • docs/');
78
+ console.log('');
79
+ console.log('🚀 快速开始:');
80
+ console.log(' 1. 重启 Claude Code');
81
+ console.log(' 2. 首次使用推荐运行:');
82
+ console.log(' /BMad:agents:bmad-orchestrator *help');
83
+ console.log(' 这将启动 BMad 工作流引导系统');
84
+ console.log('');
85
+ console.log('💡 提示:BMad Orchestrator 将帮助您选择合适的工作流程,');
86
+ console.log(' 并引导您完成整个开发过程。');
87
+ } catch (error) {
88
+ console.error('❌ 安装失败:', error.message);
89
+ console.log('请手动运行:npx bmad-method@latest install -f -d . -i claude-code');
90
+ }
91
+ }
92
+
93
+ // 执行初始化
94
+ initBmad();
95
+ ```
96
+
97
+ ## 用法
98
+
99
+ 只需在 Claude Code 中键入:
100
+
101
+ ```
102
+ /bmad-init
103
+ ```
104
+
105
+ 此命令将:
106
+
107
+ 1. 在您的项目中安装 BMad-Method 框架
108
+ 2. 设置所有必要的配置
109
+ 3. 提供如何开始使用 BMad 工作流的指导
@@ -9,7 +9,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
9
9
  ## 使用方法
10
10
 
11
11
  ```bash
12
- /workflow <任务描述>
12
+ /zcf:workflow <任务描述>
13
13
  ```
14
14
 
15
15
  ## 上下文
File without changes
File without changes
File without changes
File without changes