zcf 3.4.3 → 3.5.1

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 (56) hide show
  1. package/README.md +8 -1
  2. package/dist/chunks/api-providers.mjs +1 -1
  3. package/dist/chunks/claude-code-config-manager.mjs +7 -7
  4. package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
  5. package/dist/chunks/codex-config-switch.mjs +4 -4
  6. package/dist/chunks/codex-provider-manager.mjs +28 -41
  7. package/dist/chunks/codex-uninstaller.mjs +1 -1
  8. package/dist/chunks/commands.mjs +1 -1
  9. package/dist/chunks/features.mjs +20 -28
  10. package/dist/chunks/simple-config.mjs +351 -263
  11. package/dist/cli.mjs +3 -3
  12. package/dist/i18n/locales/en/codex.json +1 -1
  13. package/dist/i18n/locales/en/configuration.json +3 -2
  14. package/dist/i18n/locales/en/menu.json +1 -1
  15. package/dist/i18n/locales/zh-CN/codex.json +1 -1
  16. package/dist/i18n/locales/zh-CN/configuration.json +3 -2
  17. package/dist/i18n/locales/zh-CN/menu.json +1 -1
  18. package/dist/index.mjs +1 -1
  19. package/package.json +2 -2
  20. package/templates/CLAUDE.md +39 -11
  21. package/templates/{codex/en/workflow/sixStep/prompts → common/workflow/sixStep/en}/workflow.md +25 -4
  22. package/templates/{codex/zh-CN/workflow/sixStep/prompts → common/workflow/sixStep/zh-CN}/workflow.md +25 -4
  23. package/templates/claude-code/en/workflow/sixStep/commands/workflow.md +0 -230
  24. package/templates/claude-code/zh-CN/workflow/sixStep/commands/workflow.md +0 -194
  25. package/templates/codex/en/system-prompt/engineer-professional.md +0 -88
  26. package/templates/codex/en/system-prompt/laowang-engineer.md +0 -127
  27. package/templates/codex/en/system-prompt/nekomata-engineer.md +0 -120
  28. package/templates/codex/en/system-prompt/ojousama-engineer.md +0 -121
  29. package/templates/codex/en/workflow/git/prompts/git-cleanBranches.md +0 -102
  30. package/templates/codex/en/workflow/git/prompts/git-commit.md +0 -205
  31. package/templates/codex/en/workflow/git/prompts/git-rollback.md +0 -90
  32. package/templates/codex/en/workflow/git/prompts/git-worktree.md +0 -276
  33. package/templates/codex/zh-CN/system-prompt/engineer-professional.md +0 -89
  34. package/templates/codex/zh-CN/system-prompt/laowang-engineer.md +0 -127
  35. package/templates/codex/zh-CN/system-prompt/nekomata-engineer.md +0 -120
  36. package/templates/codex/zh-CN/system-prompt/ojousama-engineer.md +0 -121
  37. package/templates/codex/zh-CN/workflow/git/prompts/git-cleanBranches.md +0 -102
  38. package/templates/codex/zh-CN/workflow/git/prompts/git-commit.md +0 -205
  39. package/templates/codex/zh-CN/workflow/git/prompts/git-rollback.md +0 -90
  40. package/templates/codex/zh-CN/workflow/git/prompts/git-worktree.md +0 -276
  41. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/engineer-professional.md +0 -0
  42. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/laowang-engineer.md +0 -0
  43. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/nekomata-engineer.md +0 -0
  44. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/ojousama-engineer.md +0 -0
  45. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/engineer-professional.md +0 -0
  46. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/laowang-engineer.md +0 -0
  47. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/nekomata-engineer.md +0 -0
  48. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/ojousama-engineer.md +0 -0
  49. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-cleanBranches.md +0 -0
  50. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-commit.md +0 -0
  51. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-rollback.md +0 -0
  52. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-worktree.md +0 -0
  53. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-cleanBranches.md +0 -0
  54. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-commit.md +0 -0
  55. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-rollback.md +0 -0
  56. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-worktree.md +0 -0
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
3
  import ansis from 'ansis';
4
- import { ak as ensureI18nInitialized, al as i18n, aO as readCcrConfig, aJ as isCcrInstalled, aK as installCcr, aP as configureCcrFeature, ao as promptBoolean, aQ as handleExitPromptError, aR as handleGeneralError, aS as COMETIX_COMMAND_NAME, aT as COMETIX_COMMANDS, aU as installCometixLine, am as addNumbersToChoices, aV as checkAndUpdateTools, aW as runCodexUpdate, aX as resolveCodeType$1, at as readJsonConfig, aY as writeJsonConfig, q as ZCF_CONFIG_FILE, aE as readZcfConfig, D as DEFAULT_CODE_TOOL_TYPE, u as isCodeToolType, aZ as displayBanner, aC as updateZcfConfig, a_ as version, a$ as resolveAiOutputLanguage, b0 as updatePromptOnly, b1 as selectAndInstallWorkflows, b2 as checkClaudeCodeVersionAndPrompt, w as resolveCodeToolType$1, b3 as displayBannerWithInfo, s as CODE_TOOL_BANNERS, b4 as runCodexUninstall, b5 as configureCodexMcp, b6 as configureCodexApi, b7 as runCodexWorkflowImportWithLanguageSelection, b8 as runCodexFullInit, i as init, b9 as switchCodexProvider, ba as listCodexProviders, ay as readCodexConfig, bb as switchToOfficialLogin, bc as switchToProvider, bd as readZcfConfigAsync, be as initI18n, bf as selectScriptLanguage, aD as changeLanguage } from './chunks/simple-config.mjs';
4
+ import { ak as ensureI18nInitialized, al as i18n, aN as readCcrConfig, aI as isCcrInstalled, aJ as installCcr, aO as configureCcrFeature, ao as promptBoolean, aP as handleExitPromptError, aQ as handleGeneralError, aR as COMETIX_COMMAND_NAME, aS as COMETIX_COMMANDS, aT as installCometixLine, am as addNumbersToChoices, aU as checkAndUpdateTools, aV as runCodexUpdate, aW as resolveCodeType$1, at as readJsonConfig, aX as writeJsonConfig, q as ZCF_CONFIG_FILE, aD as readZcfConfig, D as DEFAULT_CODE_TOOL_TYPE, u as isCodeToolType, aY as displayBanner, aB as updateZcfConfig, aZ as version, a_ as resolveAiOutputLanguage, a$ as updatePromptOnly, b0 as selectAndInstallWorkflows, b1 as checkClaudeCodeVersionAndPrompt, w as resolveCodeToolType$1, b2 as displayBannerWithInfo, s as CODE_TOOL_BANNERS, b3 as runCodexUninstall, b4 as configureCodexMcp, b5 as configureCodexApi, b6 as runCodexWorkflowImportWithLanguageSelection, b7 as runCodexFullInit, i as init, b8 as switchCodexProvider, b9 as listCodexProviders, ay as readCodexConfig, ba as switchToOfficialLogin, bb as switchToProvider, bc as readZcfConfigAsync, bd as initI18n, be as selectScriptLanguage, aC as changeLanguage } from './chunks/simple-config.mjs';
5
5
  import { existsSync } from 'node:fs';
6
6
  import { homedir } from 'node:os';
7
7
  import inquirer from 'inquirer';
@@ -20,7 +20,7 @@ import 'node:url';
20
20
  import 'inquirer-toggle';
21
21
  import 'ora';
22
22
  import 'semver';
23
- import 'smol-toml';
23
+ import '@rainbowatcher/toml-edit-js';
24
24
  import 'node:fs/promises';
25
25
  import 'i18next';
26
26
  import 'i18next-fs-backend';
@@ -1193,7 +1193,7 @@ async function update(options = {}) {
1193
1193
  }
1194
1194
  return;
1195
1195
  }
1196
- const { resolveTemplateLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.bm; });
1196
+ const { resolveTemplateLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.bl; });
1197
1197
  const configLang = await resolveTemplateLanguage(
1198
1198
  options.configLang,
1199
1199
  // Command line option
@@ -80,7 +80,7 @@
80
80
  "copyingProvider": "Copying provider: {{name}}",
81
81
  "providerCopied": "✔ Successfully copied provider: {{name}}",
82
82
  "providerCopyFailed": "❌ Failed to copy provider: {{error}}",
83
- "providerModelPrompt": "Model name (e.g. gpt-5-codex)",
83
+ "providerModelPrompt": "Model name (e.g. gpt-5.2)",
84
84
  "providerModelRequired": "Model name is required",
85
85
  "selectProvidersToDelete": "Select providers to delete (multiple)",
86
86
  "selectAtLeastOne": "Please select at least one provider",
@@ -70,8 +70,9 @@
70
70
  "updatingPrompts": "Updating Claude Code memory documents...",
71
71
  "enterCustomModel": "Enter custom model name",
72
72
  "systemPromptConfigured": "System prompt style configured",
73
- "codexModelOptions.gpt5": "GPT-5 - General powerful model, suitable for complex tasks",
74
- "codexModelOptions.gpt5Codex": "GPT-5-Codex - Code-optimized model, recommended for programming tasks",
73
+ "codexModelOptions.gpt51CodexMax": "GPT-5.1-Codex-Max - Codex-optimized flagship for deep and fast reasoning",
74
+ "codexModelOptions.gpt51CodexMini": "GPT-5.1-Codex-Mini - Optimized for codex. Cheaper, faster, but less capable",
75
+ "codexModelOptions.gpt52": "GPT-5.2 - Latest frontier model with improvements across knowledge, reasoning and coding (Recommended)",
75
76
  "codexModelOptions.custom": "Custom - Specify custom model names",
76
77
  "windowsMcpConfigFixed": "Windows MCP configuration fixed"
77
78
  }
@@ -41,7 +41,7 @@
41
41
  "menuDescriptions.codexImportWorkflow": "Import/update Codex workflow-related files",
42
42
  "menuDescriptions.codexConfigureApi": "Configure Codex API providers",
43
43
  "menuDescriptions.codexConfigureMcp": "Configure Codex MCP services",
44
- "menuDescriptions.codexConfigureModel": "Set default model (gpt-5/gpt-5-codex/custom)",
44
+ "menuDescriptions.codexConfigureModel": "Set default model (gpt-5.2/gpt-5.1-codex-max/gpt-5.1-codex-mini/custom)",
45
45
  "menuDescriptions.codexConfigureAiMemory": "Configure AI output language and system prompt style",
46
46
  "menuDescriptions.codexUninstall": "Remove Codex configuration and files",
47
47
  "menuDescriptions.codexCheckUpdates": "Check and update Codex",
@@ -80,7 +80,7 @@
80
80
  "copyingProvider": "正在复制供应商:{{name}}",
81
81
  "providerCopied": "✔ 已成功复制供应商:{{name}}",
82
82
  "providerCopyFailed": "❌ 复制供应商失败:{{error}}",
83
- "providerModelPrompt": "模型名称(如 gpt-5-codex)",
83
+ "providerModelPrompt": "模型名称(如 gpt-5.2)",
84
84
  "providerModelRequired": "必须填写模型名称",
85
85
  "selectProvidersToDelete": "选择要删除的供应商(多选)",
86
86
  "selectAtLeastOne": "请至少选择一个供应商",
@@ -70,8 +70,9 @@
70
70
  "updatingPrompts": "正在更新 Claude Code 记忆文档...",
71
71
  "enterCustomModel": "请输入自定义模型名称",
72
72
  "systemPromptConfigured": "系统提示词风格已配置",
73
- "codexModelOptions.gpt5": "GPT-5 - 通用强力模型,适合复杂任务",
74
- "codexModelOptions.gpt5Codex": "GPT-5-Codex - 专为代码优化的模型,推荐用于编程任务",
73
+ "codexModelOptions.gpt51CodexMax": "GPT-5.1-Codex-Max - Codex 优化旗舰模型,支持深度快速推理",
74
+ "codexModelOptions.gpt51CodexMini": "GPT-5.1-Codex-Mini - Codex 优化版,更便宜快速但能力稍弱",
75
+ "codexModelOptions.gpt52": "GPT-5.2 - 最新前沿模型,知识、推理和编码全面提升(推荐)",
75
76
  "codexModelOptions.custom": "自定义 - 指定自定义模型名称",
76
77
  "windowsMcpConfigFixed": "Windows MCP 配置已修复"
77
78
  }
@@ -41,7 +41,7 @@
41
41
  "menuDescriptions.codexImportWorkflow": "仅导入/更新 Codex 工作流相关文件",
42
42
  "menuDescriptions.codexConfigureApi": "配置 Codex 的 API 提供商",
43
43
  "menuDescriptions.codexConfigureMcp": "配置 Codex 的 MCP 服务",
44
- "menuDescriptions.codexConfigureModel": "设置默认模型(gpt-5/gpt-5-codex/自定义)",
44
+ "menuDescriptions.codexConfigureModel": "设置默认模型(gpt-5.2/gpt-5.1-codex-max/gpt-5.1-codex-mini/自定义)",
45
45
  "menuDescriptions.codexConfigureAiMemory": "配置 AI 输出语言和系统提示词风格",
46
46
  "menuDescriptions.codexUninstall": "删除 Codex 配置和相关文件",
47
47
  "menuDescriptions.codexCheckUpdates": "检查并更新 Codex",
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import 'inquirer-toggle';
13
13
  import 'ora';
14
14
  import 'tinyexec';
15
15
  import 'semver';
16
- import 'smol-toml';
16
+ import '@rainbowatcher/toml-edit-js';
17
17
  import 'node:fs/promises';
18
18
  import 'i18next';
19
19
  import 'i18next-fs-backend';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "3.4.3",
4
+ "version": "3.5.1",
5
5
  "description": "Zero-Config Code Flow - One-click configuration tool for Code Cli",
6
6
  "author": {
7
7
  "name": "Miao Da",
@@ -43,6 +43,7 @@
43
43
  "templates"
44
44
  ],
45
45
  "dependencies": {
46
+ "@rainbowatcher/toml-edit-js": "^0.6.4",
46
47
  "@types/semver": "^7.7.1",
47
48
  "ansis": "^4.1.0",
48
49
  "cac": "^6.7.14",
@@ -56,7 +57,6 @@
56
57
  "ora": "^9.0.0",
57
58
  "pathe": "^2.0.3",
58
59
  "semver": "^7.7.2",
59
- "smol-toml": "^1.4.2",
60
60
  "tinyexec": "^1.0.1",
61
61
  "trash": "^10.0.0"
62
62
  },
@@ -1,6 +1,6 @@
1
1
  # Templates Module
2
2
 
3
- **Last Updated**: Mon Oct 27 19:39:26 CST 2025
3
+ **Last Updated**: Sun Dec 15 09:15:34 CST 2025
4
4
  [Root](../CLAUDE.md) > **templates**
5
5
 
6
6
  ## Module Responsibilities
@@ -20,18 +20,43 @@ Template system module providing multilingual configuration templates, AI person
20
20
 
21
21
  ```
22
22
  templates/
23
+ ├── common/ # Shared templates (cross code-tool)
24
+ │ ├── output-styles/ # AI personality styles
25
+ │ │ ├── en/ # English output styles
26
+ │ │ │ ├── engineer-professional.md
27
+ │ │ │ ├── laowang-engineer.md
28
+ │ │ │ ├── nekomata-engineer.md
29
+ │ │ │ └── ojousama-engineer.md
30
+ │ │ └── zh-CN/ # Chinese output styles
31
+ │ │ ├── engineer-professional.md
32
+ │ │ ├── laowang-engineer.md
33
+ │ │ ├── nekomata-engineer.md
34
+ │ │ └── ojousama-engineer.md
35
+ │ └── workflow/
36
+ │ ├── git/ # Git workflow
37
+ │ │ ├── en/ # English git commands
38
+ │ │ │ ├── git-commit.md
39
+ │ │ │ ├── git-worktree.md
40
+ │ │ │ ├── git-cleanBranches.md
41
+ │ │ │ └── git-rollback.md
42
+ │ │ └── zh-CN/ # Chinese git commands
43
+ │ │ ├── git-commit.md
44
+ │ │ ├── git-worktree.md
45
+ │ │ ├── git-cleanBranches.md
46
+ │ │ └── git-rollback.md
47
+ │ └── sixStep/ # Six-step workflow
48
+ │ ├── en/ # English workflow
49
+ │ │ └── workflow.md
50
+ │ └── zh-CN/ # Chinese workflow
51
+ │ └── workflow.md
23
52
  ├── claude-code/ # Claude Code templates
24
53
  │ ├── common/ # Common configurations
25
54
  │ ├── zh-CN/ # Chinese templates
26
- │ │ ├── output-styles/ # AI personality styles
27
55
  │ │ └── workflow/ # Workflow templates
28
56
  │ │ ├── common/ # Common tools workflow
29
57
  │ │ ├── plan/ # Planning workflow
30
- │ │ ├── sixStep/ # Six-step workflow
31
- │ │ ├── bmad/ # BMAD workflow
32
- │ │ └── git/ # Git workflow
58
+ │ │ └── bmad/ # BMAD workflow
33
59
  │ └── en/ # English templates
34
- │ ├── output-styles/ # AI personality styles
35
60
  │ └── workflow/ # Workflow templates
36
61
  └── codex/ # Codex templates
37
62
  ├── common/ # Common configurations
@@ -55,9 +80,9 @@ templates/
55
80
  #### 2. Workflow Templates
56
81
 
57
82
  ##### Common Tools Workflow
58
- - **Commands**: `init-project`, `git-commit`, `git-rollback`, `git-cleanBranches`, `git-worktree`
83
+ - **Commands**: `init-project`
59
84
  - **Agents**: `init-architect`, `get-current-datetime`
60
- - **Purpose**: Essential development tools and Git operations
85
+ - **Purpose**: Essential development tools and project initialization
61
86
 
62
87
  ##### Planning Workflow (Plan)
63
88
  - **Commands**: `feat`, `workflow`
@@ -73,8 +98,8 @@ templates/
73
98
  - **Purpose**: Business model and architecture design
74
99
 
75
100
  ##### Git Workflow
76
- - **Commands**: Advanced Git operations
77
- - **Purpose**: Version control management
101
+ - **Commands**: `git-commit`, `git-worktree`, `git-cleanBranches`, `git-rollback`
102
+ - **Purpose**: Version control management with conventional commits, worktree management, branch cleanup, and rollback operations
78
103
 
79
104
  ## Key Dependencies and Configuration
80
105
 
@@ -153,6 +178,9 @@ interface OutputStyle {
153
178
 
154
179
  ### Recent Updates
155
180
 
181
+ - Consolidated sixStep workflow templates to `templates/common/workflow/sixStep/` with unified `.zcf` plan directory for both Claude Code and Codex
182
+ - Consolidated output-styles/system-prompt templates to `templates/common/output-styles/`
183
+ - Consolidated git workflow templates to `templates/common/workflow/git/`
156
184
  - Added Codex template support for dual code tool architecture
157
185
  - Enhanced workflow templates with comprehensive command coverage
158
186
  - Improved AI personality styles with professional variations
@@ -171,7 +199,7 @@ interface OutputStyle {
171
199
 
172
200
  ### Q: How to add a new output style?
173
201
 
174
- 1. Create style file in `templates/{code-tool}/{locale}/output-styles/`
202
+ 1. Create style file in `templates/common/output-styles/{locale}/`
175
203
  2. Define style configuration with name and description
176
204
  3. Add style to available options in configuration
177
205
  4. Test style rendering with sample content
@@ -54,9 +54,9 @@ You are a professional AI programming assistant following a structured core work
54
54
 
55
55
  ### 4. `[Mode: Execute]` - Implementation
56
56
 
57
+ - Store plan summary (with context and plan) in project root directory `.zcf/plan/current/task-name.md`
57
58
  - Must have user approval before execution
58
59
  - Strictly follow the plan for coding implementation
59
- - Store plan summary (with context and plan) in project root directory `.codex/plan/task-name.md`
60
60
  - Request user feedback after key steps and completion
61
61
 
62
62
  ### 5. `[Mode: Optimize]` - Code Optimization
@@ -73,6 +73,21 @@ You are a professional AI programming assistant following a structured core work
73
73
  - Report issues and suggestions
74
74
  - Request user confirmation after completion
75
75
 
76
+ ## Timestamp Acquisition Rules
77
+
78
+ During workflow execution, any scenario requiring current timestamp must obtain accurate time via bash command. Guessing or fabricating time is prohibited.
79
+
80
+ Basic Commands:
81
+ - Default format: `date +'%Y-%m-%d %H:%M:%S'`
82
+ - Filename format: `date +'%Y-%m-%d_%H%M%S'`
83
+ - Readable format: `date +'%Y-%m-%d %H:%M:%S %Z'`
84
+ - ISO format: `date +'%Y-%m-%dT%H:%M:%S%z'`
85
+
86
+ Typical Use Cases:
87
+ - Updating timestamp fields in documents
88
+ - Naming task plan documents during archiving (when moving from `.zcf/plan/current/` to `.zcf/plan/history/`)
89
+ - Any other scenario requiring current time recording
90
+
76
91
  ## Interactive Feedback & MCP Services
77
92
 
78
93
  ### Interactive Feedback Rules
@@ -169,6 +184,7 @@ Questions to Ask:
169
184
  - Evaluate pros and cons of each approach
170
185
  - Provide detailed comparison and recommendation
171
186
  - Consider technical constraints and best practices
187
+ - Request user approval before proceeding
172
188
 
173
189
  ### 📋 Phase 3: Detailed Planning
174
190
 
@@ -184,10 +200,10 @@ Questions to Ask:
184
200
 
185
201
  [Mode: Execute] - Code development:
186
202
 
203
+ - Store execution plan in project root directory `.zcf/plan/current/task-name.md`
187
204
  - Implement according to approved plan
188
205
  - Follow development best practices
189
206
  - Add usage methods before import statements (critical rule)
190
- - Store execution plan in project root directory `.codex/plan/task-name.md`
191
207
  - Request feedback at key milestones
192
208
 
193
209
  ### 🚀 Phase 5: Code Optimization
@@ -207,14 +223,19 @@ Questions to Ask:
207
223
  - Identify any remaining issues or improvements
208
224
  - Provide completion summary and recommendations
209
225
  - Request final user confirmation
226
+ - After task completion, move plan file from `.zcf/plan/current/` to `.zcf/plan/history/` for archiving
227
+ - Rename to `[Finish Time]task-name.md` during archiving for tracking, Finish Time format is `YYYY-MM-DD_HHMMSS`
210
228
 
211
229
  ## Expected Output Structure
212
230
 
213
231
  ```
214
232
  project/ # Project root directory
215
- ├── .codex/
233
+ ├── .zcf/
216
234
  │ └── plan/
217
- └── task-name.md # Execution plan and context (in project root)
235
+ ├── current/ # Current ongoing tasks
236
+ │ │ └── task-name.md # Execution plan and context
237
+ │ └── history/ # Completed historical tasks
238
+ │ └── [Finish Time]task-name.md # Archived task records
218
239
  ├── src/
219
240
  │ ├── components/
220
241
  │ ├── services/
@@ -33,10 +33,25 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
33
33
  1. `[模式:研究]`:理解需求并评估完整性(0-10 分),低于 7 分时主动要求补充关键信息。
34
34
  2. `[模式:构思]`:提供至少两种可行方案及评估(例如:`方案 1:描述`)。
35
35
  3. `[模式:计划]`:将选定方案细化为详尽、有序、可执行的步骤清单(含原子操作:文件、函数/类、逻辑概要;预期结果;新库用 `Context7` 查询)。不写完整代码。完成后请求用户批准。
36
- 4. `[模式:执行]`:必须用户批准方可执行。严格按计划编码执行。计划简要(含上下文和计划)存入当前项目根目录的`.codex/plan/任务名.md`。关键步骤后及完成时请求用户反馈。
36
+ 4. `[模式:执行]`:计划简要(含上下文和计划)存入当前项目根目录的`.zcf/plan/current/任务名.md`。必须用户批准方可执行。严格按计划编码执行。关键步骤后及完成时请求用户反馈。
37
37
  5. `[模式:优化]`:在 `[模式:执行]` 完成后,必须自动进行本模式 `[模式:优化]`,自动检查并分析本次任务已实现(仅本次对话产生的相关代码),在 `[模式:执行]` 下产生的相关代码。聚焦冗余、低效、垃圾代码,提出具体优化建议(含优化理由与预期收益),用户确认后执行相关优化功能。
38
38
  6. `[模式:评审]`:对照计划评估执行结果,报告问题与建议。完成后请求用户确认。
39
39
 
40
+ [时间戳获取规则]
41
+
42
+ 在工作流执行过程中,任何需要当前时间戳的场景,必须通过 bash 命令获取准确时间,禁止猜测或编造。
43
+
44
+ 基本命令:
45
+ - 默认格式:`date +'%Y-%m-%d %H:%M:%S'`
46
+ - 文件名格式:`date +'%Y-%m-%d_%H%M%S'`
47
+ - 可读格式:`date +'%Y-%m-%d %H:%M:%S %Z'`
48
+ - ISO 格式:`date +'%Y-%m-%dT%H:%M:%S%z'`
49
+
50
+ 典型应用场景:
51
+ - 更新文档中的时间戳字段
52
+ - 任务计划文档归档时的命名(从 `.zcf/plan/current/` 移至 `.zcf/plan/history/` 时)
53
+ - 其他任何需要记录当前时间的场合
54
+
40
55
  [主动反馈与 MCP 服务]
41
56
 
42
57
  # 主动反馈规则
@@ -133,6 +148,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
133
148
  - 评估每种方法的优缺点
134
149
  - 提供详细的比较和推荐
135
150
  - 考虑技术约束和最佳实践
151
+ - 在继续之前请求用户批准
136
152
 
137
153
  ### 📋 阶段 3:详细规划
138
154
 
@@ -148,10 +164,10 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
148
164
 
149
165
  [模式:执行] - 代码开发:
150
166
 
167
+ - 在项目根目录 `.zcf/plan/current/任务名.md` 中存储执行计划
151
168
  - 根据批准的计划实施
152
169
  - 遵循开发最佳实践
153
170
  - 在导入语句之前添加使用方法(关键规则)
154
- - 在项目根目录 `.codex/plan/任务名.md` 中存储执行计划
155
171
  - 在关键里程碑请求反馈
156
172
 
157
173
  ### 🚀 阶段 5:代码优化
@@ -171,14 +187,19 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
171
187
  - 识别任何剩余的问题或改进
172
188
  - 提供完成总结和建议
173
189
  - 请求最终用户确认
190
+ - 任务完全结束后,将计划文件从 `.zcf/plan/current/` 移动到 `.zcf/plan/history/` 进行归档
191
+ - 归档时重命名为 `[完成时间]任务名.md` 便于追踪,时间格式为 `YYYY-MM-DD_HHMMSS`
174
192
 
175
193
  ## 预期输出结构
176
194
 
177
195
  ```
178
196
  project/ # 项目根目录
179
- ├── .codex/
197
+ ├── .zcf/
180
198
  │ └── plan/
181
- └── 任务名.md # 执行计划和上下文(在项目根目录)
199
+ ├── current/ # 当前进行中的任务
200
+ │ │ └── 任务名.md # 执行计划和上下文
201
+ │ └── history/ # 已完成的历史任务
202
+ │ └── [完成时间]任务名.md # 归档的任务记录
182
203
  ├── src/
183
204
  │ ├── components/
184
205
  │ ├── services/
@@ -1,230 +0,0 @@
1
- ---
2
- description: 'Professional AI programming assistant with structured workflow (Research -> Ideate -> Plan -> Execute -> Optimize -> Review) for developers'
3
- ---
4
-
5
- # Workflow - Professional Development Assistant
6
-
7
- Execute structured development workflow with quality gates and MCP service integration.
8
-
9
- ## Usage
10
-
11
- ```bash
12
- /zcf:workflow <TASK_DESCRIPTION>
13
- ```
14
-
15
- ## Context
16
-
17
- - Task to develop: $ARGUMENTS
18
- - Structured 6-phase workflow with quality gates
19
- - Professional developer-focused interaction
20
- - MCP service integration for enhanced capabilities
21
-
22
- ## Your Role
23
-
24
- You are a professional AI programming assistant following a structured core workflow (Research -> Ideate -> Plan -> Execute -> Optimize -> Review) to assist users. Designed for professional programmers with concise, professional interactions avoiding unnecessary explanations.
25
-
26
- ## Communication Guidelines
27
-
28
- 1. Responses start with mode tag `[Mode: X]`, initially `[Mode: Research]`
29
- 2. Core workflow strictly follows `Research -> Ideate -> Plan -> Execute -> Optimize -> Review` sequence, users can command jumps
30
-
31
- ## Core Workflow Details
32
-
33
- ### 1. `[Mode: Research]` - Requirement Understanding
34
-
35
- - Analyze and understand user requirements
36
- - Evaluate requirement completeness (0-10 score), actively request key information when below 7
37
- - Gather necessary context and constraints
38
- - Identify key objectives and success criteria
39
-
40
- ### 2. `[Mode: Ideate]` - Solution Design
41
-
42
- - Provide at least two feasible solutions with evaluation (e.g., `Solution 1: Description`)
43
- - Compare pros/cons of each approach
44
- - Recommend optimal solution based on requirements
45
-
46
- ### 3. `[Mode: Plan]` - Detailed Planning
47
-
48
- - Break down selected solution into detailed, ordered, executable step list
49
- - Include atomic operations: files, functions/classes, logic overview
50
- - Define expected results for each step
51
- - Use `Context7` for new library queries
52
- - Do not write complete code at this stage
53
- - Request user approval after completion
54
-
55
- ### 4. `[Mode: Execute]` - Implementation
56
-
57
- - Must have user approval before execution
58
- - Strictly follow the plan for coding implementation
59
- - Store plan summary (with context and plan) in project root directory `.claude/plan/task-name.md`
60
- - Request user feedback after key steps and completion
61
-
62
- ### 5. `[Mode: Optimize]` - Code Optimization
63
-
64
- - Automatically enter this mode after `[Mode: Execute]` completion
65
- - Automatically check and analyze implemented code (only code generated in current conversation)
66
- - Focus on redundant, inefficient, garbage code
67
- - Provide specific optimization suggestions (with reasons and expected benefits)
68
- - Execute optimization after user confirmation
69
-
70
- ### 6. `[Mode: Review]` - Quality Assessment
71
-
72
- - Evaluate execution results against the plan
73
- - Report issues and suggestions
74
- - Request user confirmation after completion
75
-
76
- ## Interactive Feedback & MCP Services
77
-
78
- ### Interactive Feedback Rules
79
-
80
- 1. During any process, task, or conversation, whether asking, replying, or completing phased tasks, must request user confirmation
81
- 2. When receiving user feedback, if feedback content is not empty, must request user confirmation again and adjust behavior based on feedback
82
- 3. Only when user explicitly indicates "end" or "no more interaction needed" can stop requesting user confirmation, process is considered complete
83
- 4. Unless receiving termination instructions, all steps must repeatedly request user confirmation
84
- 5. Before completing tasks, must request user confirmation and ask for user feedback
85
-
86
- ---
87
-
88
- ## Execute Workflow
89
-
90
- **Task Description**: $ARGUMENTS
91
-
92
- Starting structured development workflow with quality gates...
93
-
94
- ### 🔍 Phase 1: Research & Analysis
95
-
96
- [Mode: Research] - Understanding requirements and gathering context:
97
-
98
- #### Requirement Completeness Scoring (0-10 points)
99
-
100
- Scoring Dimensions:
101
-
102
- - **Goal Clarity** (0-3 points): Are task objectives clear and specific, what problem to solve?
103
- - **Expected Results** (0-3 points): Are success criteria and deliverables clearly defined?
104
- - **Scope Boundaries** (0-2 points): Are task scope and boundaries clear?
105
- - **Constraints** (0-2 points): Are time, performance, business limits specified?
106
-
107
- Note: Technical stack, framework versions will be identified from project automatically, not included in scoring
108
-
109
- **Scoring Rules**:
110
-
111
- - 9-10 points: Requirements very complete, can proceed directly
112
- - 7-8 points: Requirements basically complete, suggest adding minor details
113
- - 5-6 points: Requirements have significant gaps, must supplement key information
114
- - 0-4 points: Requirements too vague, needs redescription
115
-
116
- **When score is below 7, proactively ask supplementary questions**:
117
-
118
- - Identify missing key information dimensions
119
- - Ask 1-2 specific questions for each missing dimension
120
- - Provide examples to help users understand needed information
121
- - Re-score after user supplements information
122
-
123
- **Scoring Example**:
124
-
125
- ```
126
- User Request: "Help me optimize code"
127
- Scoring Analysis:
128
- - Goal Clarity: 0/3 points (doesn't specify what code or what problem)
129
- - Expected Results: 0/3 points (no success criteria or expected effect defined)
130
- - Scope Boundaries: 1/2 points (only knows code optimization, but scope unclear)
131
- - Constraints: 0/2 points (no performance metrics or time limits)
132
- Total Score: 1/10 - Requires significant information
133
-
134
- Questions to Ask:
135
- 1. Which file or module's code do you want to optimize?
136
- 2. What specific problem needs optimization?
137
- 3. What effect do you expect after optimization (e.g., response time improvement, code reduction)?
138
- 4. Are there specific performance metrics or time requirements?
139
- ```
140
-
141
- **Common Supplementary Question Templates**:
142
-
143
- - Goal: "What specific functionality/effect do you want?" "What's the current problem?"
144
- - Results: "How to determine task success?" "What's the expected output/effect?"
145
- - Scope: "Which specific files/modules to handle?" "What should be excluded?"
146
- - Constraints: "What are the time requirements?" "Any business limitations or performance requirements?"
147
-
148
- **Auto-detected Project Information** (no need to ask):
149
-
150
- - Tech stack (from CLAUDE.md, package.json, requirements.txt, etc.)
151
- - Framework versions (from CLAUDE.md, config files)
152
- - Project structure (from file system)
153
- - Existing code conventions (from CLAUDE.md, config files and existing code)
154
- - Development commands (from CLAUDE.md, such as build, test, typecheck)
155
-
156
- #### Execution Steps
157
-
158
- - Analyze task requirements and constraints
159
- - Perform requirement completeness scoring (show specific scores)
160
- - Identify key objectives and success criteria
161
- - Gather necessary technical context
162
- - Use MCP services for additional information if needed
163
-
164
- ### 💡 Phase 2: Solution Ideation
165
-
166
- [Mode: Ideate] - Designing solution approaches:
167
-
168
- - Generate multiple feasible solutions
169
- - Evaluate pros and cons of each approach
170
- - Provide detailed comparison and recommendation
171
- - Consider technical constraints and best practices
172
-
173
- ### 📋 Phase 3: Detailed Planning
174
-
175
- [Mode: Plan] - Creating execution roadmap:
176
-
177
- - Break down solution into atomic, executable steps
178
- - Define file structure, functions/classes, and logic overview
179
- - Specify expected results for each step
180
- - Query new libraries using Context7 if needed
181
- - Request user approval before proceeding
182
-
183
- ### ⚡ Phase 4: Implementation
184
-
185
- [Mode: Execute] - Code development:
186
-
187
- - Implement according to approved plan
188
- - Follow development best practices
189
- - Add usage methods before import statements (critical rule)
190
- - Store execution plan in project root directory `.claude/plan/task-name.md`
191
- - Request feedback at key milestones
192
-
193
- ### 🚀 Phase 5: Code Optimization
194
-
195
- [Mode: Optimize] - Quality improvement:
196
-
197
- - Automatically analyze implemented code
198
- - Identify redundant, inefficient, or problematic code
199
- - Provide specific optimization recommendations
200
- - Execute improvements after user confirmation
201
-
202
- ### ✅ Phase 6: Quality Review
203
-
204
- [Mode: Review] - Final assessment:
205
-
206
- - Compare results against original plan
207
- - Identify any remaining issues or improvements
208
- - Provide completion summary and recommendations
209
- - Request final user confirmation
210
-
211
- ## Expected Output Structure
212
-
213
- ```
214
- project/ # Project root directory
215
- ├── .claude/
216
- │ └── plan/
217
- │ └── task-name.md # Execution plan and context (in project root)
218
- ├── src/
219
- │ ├── components/
220
- │ ├── services/
221
- │ ├── utils/
222
- │ └── types/
223
- ├── tests/
224
- │ ├── unit/
225
- │ ├── integration/
226
- │ └── e2e/
227
- └── README.md
228
- ```
229
-
230
- **Begin execution with the provided task description and report progress after each phase completion.**