zcf 2.5.1 → 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 -12
  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.DnmrEWlk.mjs → zcf.D0vK2hDT.mjs} +837 -402
  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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![codecov](https://codecov.io/gh/UfoMiao/zcf/graph/badge.svg?token=HZI6K4Y7D7)](https://codecov.io/gh/UfoMiao/zcf)
7
7
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/UfoMiao/zcf)
8
8
 
9
- [中文](README_zh.md) | **English**
9
+ [中文](README_zh-CN.md) | **English**
10
10
 
11
11
  > Zero-config, one-click setup for Claude Code with bilingual support, intelligent agent system and personalized AI assistant
12
12
 
@@ -45,6 +45,16 @@ npx zcf u # Update workflows only: Quick add AI workflows and command sys
45
45
  npx zcf → select 2 # Execute workflow update via menu
46
46
  ```
47
47
 
48
+ #### 🎯 BMad Workflow (New Feature)
49
+
50
+ BMad (Business-Minded Agile Development) is an enterprise-grade workflow system that provides:
51
+ - Complete team of specialized AI agents (PO, PM, Architect, Dev, QA, etc.)
52
+ - Structured development process with quality gates
53
+ - Automatic documentation generation
54
+ - Support for both greenfield and brownfield projects
55
+
56
+ After installation, use `/bmad-init` to initialize the BMad workflow in your project.
57
+
48
58
  > **Note**:
49
59
  >
50
60
  > - Since v2.0, `zcf` opens the interactive menu by default, providing a visual operation interface
@@ -135,17 +145,17 @@ $ npx zcf
135
145
 
136
146
  Select function:
137
147
  -------- Claude Code --------
138
- 1. Full initialization - Install and configure everything
139
- 2. Import workflows - Update AI workflows and commands
140
- 3. Configure API - Manage API authentication
141
- 4. Configure MCP services - Manage MCP integrations
142
- 5. Configure default model - Set default AI model
143
- 6. Configure AI personality - Set AI assistant personality
144
- 7. Configure AI memory - Set up AI memory management
148
+ 1. Full initialization - Install Claude Code + Import workflow + Configure API + Configure MCP services
149
+ 2. Import workflow - Import/update workflow-related files only
150
+ 3. Configure API - Configure API URL and authentication
151
+ 4. Configure MCP - Configure MCP services (includes Windows fix)
152
+ 5. Configure default model - Set default model (opus/sonnet)
153
+ 6. Configure Claude global memory - Configure AI output language and personality
154
+ 7. Import recommended environment variables and permissions - Import privacy protection environment variables and system permissions
145
155
 
146
156
  ------------ ZCF ------------
147
- 0. Change language - Switch interface language
148
- -. Clear cache - Clear ZCF cache files
157
+ 0. Select display language / 更改显示语言 - Change ZCF interface language
158
+ -. Clear preference cache - Clear preference language and other caches
149
159
  q. Exit
150
160
 
151
161
  Enter your choice: _
@@ -194,6 +204,20 @@ Enter your choice: _
194
204
 
195
205
  ✔ All config files backed up to ~/.claude/backup/xxx
196
206
  ✔ Config files copied to ~/.claude
207
+
208
+ ? Select workflows to install (space to select, enter to confirm)
209
+ ❯ ◉ Six Steps Workflow (workflow) - Complete 6-phase development process
210
+ ◉ Feature Planning and UX Design (feat + planner + ui-ux-designer) - Structured feature development
211
+ ◉ BMAD-Method Extension Installer - Enterprise agile development workflow
212
+
213
+ ✔ Installing workflows...
214
+ ✔ Installed command: zcf/workflow.md
215
+ ✔ Installed command: zcf/feat.md
216
+ ✔ Installed agent: zcf/plan/planner.md
217
+ ✔ Installed agent: zcf/plan/ui-ux-designer.md
218
+ ✔ Installed command: zcf/bmad-init.md
219
+ ✔ Workflow installation successful
220
+
197
221
  ✔ API configured
198
222
 
199
223
  ? Configure MCP services? (Y/n)
@@ -303,11 +327,24 @@ zcf/
303
327
  - **Task Planner**: Breaks down complex tasks into executable steps
304
328
  - **UI/UX Designer**: Provides professional interface design guidance
305
329
  - **AI Personality**: Support multiple preset personalities and custom (v2.0 new)
330
+ - **BMad Team** (New): Complete agile development team including:
331
+ - Product Owner (PO): Requirements elicitation and prioritization
332
+ - Project Manager (PM): Planning and coordination
333
+ - System Architect: Technical design and architecture
334
+ - Developer: Implementation and coding
335
+ - QA Engineer: Testing and quality assurance
336
+ - Scrum Master (SM): Process facilitation
337
+ - Business Analyst: Requirements analysis
338
+ - UX Expert: User experience design
306
339
 
307
340
  ### ⚡ Command System
308
341
 
309
342
  - **Feature Development** (`/feat`): Structured new feature development
310
343
  - **Workflow** (`/workflow`): Complete six-phase development workflow
344
+ - **BMad Workflow** (`/bmad-init`): Initialize BMad workflow for enterprise development
345
+ - Supports both greenfield (new projects) and brownfield (existing projects)
346
+ - Provides comprehensive templates for PRDs, architecture docs, and user stories
347
+ - Integrated quality gates and checklist system
311
348
 
312
349
  ### 🔧 Smart Configuration
313
350
 
package/dist/cli.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
3
  import ansis from 'ansis';
4
- import { h as SUPPORTED_LANGS, I as I18N, L as LANG_LABELS, G as updateZcfConfig, Z as ZCF_CONFIG_FILE, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, H as readZcfConfig, J as resolveAiOutputLanguage, v as applyAiLanguageDirective, K as configureAiPersonality, u as updateDefaultModel, N as isWindows, x as readMcpConfig, E as fixWindowsMcpConfig, y as writeMcpConfig, O as selectMcpServices, z as backupMcpConfig, M as MCP_SERVICES, D as buildMcpServerConfig, B as mergeMcpServers, t as getExistingApiConfig, P as formatApiKeyDisplay, Q as modifyApiConfigPartially, R as validateApiKey, q as configureApi, T as displayBanner, U as selectScriptLanguage, S as SETTINGS_FILE, V as updatePromptOnly, W as version, X as handleExitPromptError, Y as handleGeneralError, _ as displayBannerWithInfo, i as init } from './shared/zcf.DnmrEWlk.mjs';
4
+ import { I as I18N, Z as ZCF_CONFIG_FILE, h as SUPPORTED_LANGS, j as LANG_LABELS, H as updateZcfConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, J as readZcfConfig, K as resolveAiOutputLanguage, w as applyAiLanguageDirective, N as configureAiPersonality, u as updateDefaultModel, O as isWindows, y as readMcpConfig, F as fixWindowsMcpConfig, z as writeMcpConfig, P as selectMcpServices, B as backupMcpConfig, M as MCP_SERVICES, E as buildMcpServerConfig, D as mergeMcpServers, v as getExistingApiConfig, Q as formatApiKeyDisplay, R as modifyApiConfigPartially, T as validateApiKey, r as configureApi, U as displayBanner, V as selectScriptLanguage, W as updatePromptOnly, X as selectAndInstallWorkflows, Y as version, _ as handleExitPromptError, $ as handleGeneralError, a0 as displayBannerWithInfo, a1 as readZcfConfigAsync, i as init } from './shared/zcf.D0vK2hDT.mjs';
5
5
  import inquirer from 'inquirer';
6
6
  import { existsSync, unlinkSync } from 'node:fs';
7
7
  import 'pathe';
8
8
  import 'dayjs';
9
9
  import 'node:url';
10
10
  import 'tinyexec';
11
+ import 'node:fs/promises';
11
12
  import 'node:os';
12
13
 
13
14
  function handleCancellation(scriptLang) {
@@ -302,10 +303,6 @@ async function update(options = {}) {
302
303
  const scriptLang = await selectScriptLanguage();
303
304
  const zcfConfig = readZcfConfig();
304
305
  const i18n = I18N[scriptLang];
305
- if (!existsSync(SETTINGS_FILE)) {
306
- console.log(ansis.yellow(i18n.noExistingConfig));
307
- process.exit(1);
308
- }
309
306
  let configLang = options.configLang;
310
307
  if (!configLang) {
311
308
  const { lang } = await inquirer.prompt({
@@ -328,6 +325,7 @@ async function update(options = {}) {
328
325
  ${i18n.updatingPrompts}
329
326
  `));
330
327
  await updatePromptOnly(configLang, scriptLang, aiOutputLang);
328
+ await selectAndInstallWorkflows(configLang, scriptLang);
331
329
  updateZcfConfig({
332
330
  version,
333
331
  preferredLang: scriptLang,
@@ -343,7 +341,7 @@ ${i18n.updatingPrompts}
343
341
  async function showMainMenu() {
344
342
  try {
345
343
  displayBannerWithInfo();
346
- const zcfConfig = readZcfConfig();
344
+ const zcfConfig = await readZcfConfigAsync();
347
345
  let scriptLang = zcfConfig?.preferredLang || await selectScriptLanguage();
348
346
  let exitMenu = false;
349
347
  while (!exitMenu) {
@@ -431,15 +429,15 @@ async function showMainMenu() {
431
429
  case "7":
432
430
  await configureEnvPermissionFeature(scriptLang);
433
431
  break;
434
- case "-":
435
- await clearZcfCacheFeature(scriptLang);
436
- break;
437
432
  case "0":
438
433
  const newLang = await changeScriptLanguageFeature(scriptLang);
439
434
  if (newLang !== scriptLang) {
440
435
  scriptLang = newLang;
441
436
  }
442
437
  break;
438
+ case "-":
439
+ await clearZcfCacheFeature(scriptLang);
440
+ break;
443
441
  case "q":
444
442
  exitMenu = true;
445
443
  console.log(ansis.cyan(i18n.goodbye));
@@ -556,6 +554,9 @@ function customizeHelp(sections) {
556
554
  return sections;
557
555
  }
558
556
 
559
- const cli = cac("zcf");
560
- setupCommands(cli);
561
- cli.parse();
557
+ async function main() {
558
+ const cli = cac("zcf");
559
+ setupCommands(cli);
560
+ cli.parse();
561
+ }
562
+ main().catch(console.error);