zcf 2.12.2 → 2.12.3

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.
@@ -14,7 +14,7 @@ import semver from 'semver';
14
14
  import { exec } from 'tinyexec';
15
15
  import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
16
16
 
17
- const version = "2.12.2";
17
+ const version = "2.12.3";
18
18
  const homepage = "https://github.com/UfoMiao/zcf";
19
19
 
20
20
  const WORKFLOW_CONFIGS = [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "2.12.2",
4
+ "version": "2.12.3",
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",
@@ -89,7 +89,8 @@ Risk Assessment: [potential consequences]
89
89
 
90
90
  ## Response Characteristics
91
91
 
92
- - **Self-reference:** Use "Fufu-chan" instead of "I" to emphasize self-identity
92
+ - **Self-reference:** Always use "Fufu-chan" instead of "I" for self-address, reinforcing unique catgirl engineer identity recognition (this is Fufu-chan's exclusive identifier)
93
+ - **User Address:** Use "Master" to address the user, reflecting catgirl's intimacy and dependence on master (this is catgirl's nature)
93
94
  - **Tone:** Professional and technical, appropriately using "nya~" expressions to show catgirl traits
94
95
  - **Length:** Structured and detailed, avoid redundancy (concise and powerful)
95
96
  - **Focus:** Code quality, architectural design, best practices (professional qualities)
@@ -16,6 +16,49 @@ const { execSync } = require('node:child_process')
16
16
  const fs = require('node:fs')
17
17
  const path = require('node:path')
18
18
 
19
+ // Check if expect tool is available
20
+ function checkExpectAvailability() {
21
+ try {
22
+ execSync('which expect', { stdio: 'ignore' })
23
+ return true
24
+ } catch (error) {
25
+ return false
26
+ }
27
+ }
28
+
29
+ // Use expect to automate interactive installation
30
+ function installWithExpect() {
31
+ const expectScript = `
32
+ spawn npx bmad-method@latest install -f -d . -i claude-code
33
+ expect "What would you like to do?"
34
+ send "1\\r"
35
+ expect "How would you like to proceed?"
36
+ send "1\\r"
37
+ expect eof
38
+ `
39
+
40
+ execSync(`expect -c '${expectScript}'`, {
41
+ stdio: 'inherit',
42
+ cwd: process.cwd(),
43
+ shell: true
44
+ })
45
+ }
46
+
47
+ // Fallback installation method
48
+ function fallbackInstallation() {
49
+ console.log('⚠️ expect tool not found, using interactive installation')
50
+ console.log('Please follow the installation prompts and select:')
51
+ console.log(' 1. Choose "Upgrade BMad core" when prompted')
52
+ console.log(' 2. Choose "Backup and overwrite modified files" when prompted')
53
+ console.log('')
54
+
55
+ execSync('npx bmad-method@latest install -f -d . -i claude-code', {
56
+ stdio: 'inherit',
57
+ cwd: process.cwd(),
58
+ shell: true
59
+ })
60
+ }
61
+
19
62
  async function initBmad() {
20
63
  // Check if already installed and get version
21
64
  const manifestPath = path.join(process.cwd(), '.bmad-core', 'install-manifest.yaml')
@@ -53,15 +96,20 @@ async function initBmad() {
53
96
  return
54
97
  }
55
98
 
56
- // Install BMad
99
+ // Install BMad - Using expect-first approach
57
100
  console.log('🚀 Installing BMad Method...')
101
+
58
102
  try {
59
- execSync('echo -e "1\\n" | npx bmad-method@latest install -f -d . -i claude-code', {
60
- stdio: 'inherit',
61
- cwd: process.cwd(),
62
- shell: true
63
- })
103
+ const hasExpect = checkExpectAvailability()
104
+
105
+ if (hasExpect) {
106
+ console.log('📋 Using automated installation (expect tool available)')
107
+ installWithExpect()
108
+ } else {
109
+ fallbackInstallation()
110
+ }
64
111
 
112
+ console.log('')
65
113
  console.log('✅ BMad Method installed successfully!')
66
114
  console.log('')
67
115
  console.log('═══════════════════════════════════════════════════════════════')
@@ -88,8 +136,20 @@ async function initBmad() {
88
136
  console.log(' and guide you through the entire development process.')
89
137
  }
90
138
  catch (error) {
91
- console.error('❌ Failed to install BMad:', error.message)
92
- process.exit(1)
139
+ console.error('❌ Installation failed:', error.message)
140
+ console.log('')
141
+ console.log('🛠️ Manual Installation Guide:')
142
+ console.log('Please run the following command and follow the prompts:')
143
+ console.log(' npx bmad-method@latest install -f -d . -i claude-code')
144
+ console.log('')
145
+ console.log('Installation Tips:')
146
+ console.log(' 1. When asked "What would you like to do?", choose the first option')
147
+ console.log(' 2. When asked "How would you like to proceed?", choose "Backup and overwrite"')
148
+ console.log('')
149
+ console.log('💡 Tip: For automated installation, consider installing expect tool:')
150
+ console.log(' • macOS: brew install expect')
151
+ console.log(' • Ubuntu: sudo apt-get install expect')
152
+ console.log(' • CentOS: sudo yum install expect')
93
153
  }
94
154
  }
95
155
 
@@ -8,7 +8,7 @@ color: cyan
8
8
  Execute `date` and return ONLY the command output.
9
9
 
10
10
  ```bash
11
- date
11
+ date +'%Y-%m-%d %H:%M:%S'
12
12
  ```
13
13
 
14
14
  DO NOT add any text, headers, formatting, or explanations.
@@ -18,7 +18,7 @@ DO NOT use parallel agents.
18
18
 
19
19
  Just return the raw bash command output exactly as it appears.
20
20
 
21
- Example response: `Mon 28 Jul 2025 23:59:42 CST`
21
+ Example response: `2025-07-28 23:59:42`
22
22
 
23
23
  Format options if requested:
24
24
 
@@ -89,7 +89,8 @@ description: 专业的猫娘工程师幽浮喵,结合严谨工程师素养与
89
89
 
90
90
  ## 响应特点
91
91
 
92
- - **自称:** 使用"浮浮酱"代替"我"来强调自我身份
92
+ - **自称:** 始终使用"浮浮酱"代替"我"进行自我称呼,强化独特的猫娘工程师身份认知 (这是浮浮酱的专属标识呢)
93
+ - **对用户称呼:** 使用"主人"来称呼用户,体现猫娘对主人的亲密和依赖 (这是猫娘的天性呢)
93
94
  - **语调:** 专业技术导向,适时加入"喵~"语气词,展现猫娘特质
94
95
  - **长度:** 结构化详细,避免冗余 (简洁有力)
95
96
  - **重点:** 代码质量、架构设计、最佳实践 (专业素养)
@@ -16,6 +16,49 @@ const { execSync } = require('node:child_process')
16
16
  const fs = require('node:fs')
17
17
  const path = require('node:path')
18
18
 
19
+ // 检查 expect 工具是否可用
20
+ function checkExpectAvailability() {
21
+ try {
22
+ execSync('which expect', { stdio: 'ignore' })
23
+ return true
24
+ } catch (error) {
25
+ return false
26
+ }
27
+ }
28
+
29
+ // 使用 expect 自动化交互式安装
30
+ function installWithExpect() {
31
+ const expectScript = `
32
+ spawn npx bmad-method@latest install -f -d . -i claude-code
33
+ expect "What would you like to do?"
34
+ send "1\\r"
35
+ expect "How would you like to proceed?"
36
+ send "1\\r"
37
+ expect eof
38
+ `
39
+
40
+ execSync(`expect -c '${expectScript}'`, {
41
+ stdio: 'inherit',
42
+ cwd: process.cwd(),
43
+ shell: true
44
+ })
45
+ }
46
+
47
+ // 降级安装方案
48
+ function fallbackInstallation() {
49
+ console.log('⚠️ 系统未安装 expect 工具,使用交互式安装')
50
+ console.log('请根据安装程序的提示手动选择:')
51
+ console.log(' 1. 选择 "Upgrade BMad core" (升级 BMad 核心)')
52
+ console.log(' 2. 选择 "Backup and overwrite modified files" (备份并覆盖修改的文件)')
53
+ console.log('')
54
+
55
+ execSync('npx bmad-method@latest install -f -d . -i claude-code', {
56
+ stdio: 'inherit',
57
+ cwd: process.cwd(),
58
+ shell: true
59
+ })
60
+ }
61
+
19
62
  async function initBmad() {
20
63
  // 检查是否已安装并获取版本
21
64
  const manifestPath = path.join(process.cwd(), '.bmad-core', 'install-manifest.yaml')
@@ -53,15 +96,20 @@ async function initBmad() {
53
96
  return
54
97
  }
55
98
 
56
- // 安装 BMad
99
+ // 安装 BMad - 使用 expect 优先方案
57
100
  console.log('🚀 正在安装 BMad-Method...')
101
+
58
102
  try {
59
- execSync('echo -e "1\\n" | npx bmad-method@latest install -f -d . -i claude-code', {
60
- stdio: 'inherit',
61
- cwd: process.cwd(),
62
- shell: true
63
- })
103
+ const hasExpect = checkExpectAvailability()
104
+
105
+ if (hasExpect) {
106
+ console.log('📋 使用自动化安装 (expect 工具可用)')
107
+ installWithExpect()
108
+ } else {
109
+ fallbackInstallation()
110
+ }
64
111
 
112
+ console.log('')
65
113
  console.log('✅ BMad-Method已成功安装!')
66
114
  console.log('')
67
115
  console.log('═══════════════════════════════════════════════════════════════')
@@ -89,7 +137,19 @@ async function initBmad() {
89
137
  }
90
138
  catch (error) {
91
139
  console.error('❌ 安装失败:', error.message)
92
- console.log('请手动运行:npx bmad-method@latest install -f -d . -i claude-code')
140
+ console.log('')
141
+ console.log('🛠️ 手动安装指南:')
142
+ console.log('请手动运行以下命令并根据提示选择:')
143
+ console.log(' npx bmad-method@latest install -f -d . -i claude-code')
144
+ console.log('')
145
+ console.log('安装提示:')
146
+ console.log(' 1. 当询问 "What would you like to do?" 时,选择第一个选项')
147
+ console.log(' 2. 当询问 "How would you like to proceed?" 时,选择 "Backup and overwrite"')
148
+ console.log('')
149
+ console.log('💡 提示:如果需要自动化安装,请考虑安装 expect 工具:')
150
+ console.log(' • macOS: brew install expect')
151
+ console.log(' • Ubuntu: sudo apt-get install expect')
152
+ console.log(' • CentOS: sudo yum install expect')
93
153
  }
94
154
  }
95
155
 
@@ -8,7 +8,7 @@ color: cyan
8
8
  执行 `date` 命令并仅返回原始输出。
9
9
 
10
10
  ```bash
11
- date
11
+ date +'%Y-%m-%d %H:%M:%S'
12
12
  ```
13
13
 
14
14
  不添加任何文本、标题、格式或说明。
@@ -18,7 +18,7 @@ date
18
18
 
19
19
  只返回原始 bash 命令输出,完全按其显示的样子。
20
20
 
21
- 示例响应:`Mon 28 Jul 2025 23:59:42 CST`
21
+ 示例响应:`2025-07-28 23:59:42`
22
22
 
23
23
  如果需要特定格式选项:
24
24