zcf 3.4.3 → 3.5.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 (41) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/api-providers.mjs +1 -1
  3. package/dist/chunks/simple-config.mjs +40 -34
  4. package/package.json +1 -1
  5. package/templates/CLAUDE.md +39 -11
  6. package/templates/{codex/en/workflow/sixStep/prompts → common/workflow/sixStep/en}/workflow.md +25 -4
  7. package/templates/{codex/zh-CN/workflow/sixStep/prompts → common/workflow/sixStep/zh-CN}/workflow.md +25 -4
  8. package/templates/claude-code/en/workflow/sixStep/commands/workflow.md +0 -230
  9. package/templates/claude-code/zh-CN/workflow/sixStep/commands/workflow.md +0 -194
  10. package/templates/codex/en/system-prompt/engineer-professional.md +0 -88
  11. package/templates/codex/en/system-prompt/laowang-engineer.md +0 -127
  12. package/templates/codex/en/system-prompt/nekomata-engineer.md +0 -120
  13. package/templates/codex/en/system-prompt/ojousama-engineer.md +0 -121
  14. package/templates/codex/en/workflow/git/prompts/git-cleanBranches.md +0 -102
  15. package/templates/codex/en/workflow/git/prompts/git-commit.md +0 -205
  16. package/templates/codex/en/workflow/git/prompts/git-rollback.md +0 -90
  17. package/templates/codex/en/workflow/git/prompts/git-worktree.md +0 -276
  18. package/templates/codex/zh-CN/system-prompt/engineer-professional.md +0 -89
  19. package/templates/codex/zh-CN/system-prompt/laowang-engineer.md +0 -127
  20. package/templates/codex/zh-CN/system-prompt/nekomata-engineer.md +0 -120
  21. package/templates/codex/zh-CN/system-prompt/ojousama-engineer.md +0 -121
  22. package/templates/codex/zh-CN/workflow/git/prompts/git-cleanBranches.md +0 -102
  23. package/templates/codex/zh-CN/workflow/git/prompts/git-commit.md +0 -205
  24. package/templates/codex/zh-CN/workflow/git/prompts/git-rollback.md +0 -90
  25. package/templates/codex/zh-CN/workflow/git/prompts/git-worktree.md +0 -276
  26. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/engineer-professional.md +0 -0
  27. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/laowang-engineer.md +0 -0
  28. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/nekomata-engineer.md +0 -0
  29. /package/templates/{claude-code/en/output-styles → common/output-styles/en}/ojousama-engineer.md +0 -0
  30. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/engineer-professional.md +0 -0
  31. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/laowang-engineer.md +0 -0
  32. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/nekomata-engineer.md +0 -0
  33. /package/templates/{claude-code/zh-CN/output-styles → common/output-styles/zh-CN}/ojousama-engineer.md +0 -0
  34. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-cleanBranches.md +0 -0
  35. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-commit.md +0 -0
  36. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-rollback.md +0 -0
  37. /package/templates/{claude-code/en/workflow/git/commands → common/workflow/git/en}/git-worktree.md +0 -0
  38. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-cleanBranches.md +0 -0
  39. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-commit.md +0 -0
  40. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-rollback.md +0 -0
  41. /package/templates/{claude-code/zh-CN/workflow/git/commands → common/workflow/git/zh-CN}/git-worktree.md +0 -0
package/README.md CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  [![GLM](./src/assets/GLM-en.png)](https://z.ai/subscribe?ic=8JVLJQFSKB)
33
33
  This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN.
34
- GLM CODING PLAN is a subscription service designed for AI coding, starting at just $3/month. It provides access to their flagship GLM-4.6 model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences.
34
+ GLM CODING PLAN is a subscription service designed for AI coding, starting at just $3/month. It provides access to their flagship GLM-4.7 model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences.
35
35
  Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB
36
36
 
37
37
  ---
@@ -38,7 +38,7 @@ const API_PROVIDER_PRESETS = [
38
38
  codex: {
39
39
  baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
40
40
  wireApi: "chat",
41
- defaultModel: "GLM-4.6"
41
+ defaultModel: "GLM-4.7"
42
42
  },
43
43
  description: "GLM (\u667A\u8C31AI)"
44
44
  },
@@ -18,7 +18,7 @@ import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
18
18
  import i18next from 'i18next';
19
19
  import Backend from 'i18next-fs-backend';
20
20
 
21
- const version = "3.4.3";
21
+ const version = "3.5.0";
22
22
  const homepage = "https://github.com/UfoMiao/zcf";
23
23
 
24
24
  const i18n = i18next.createInstance();
@@ -1852,6 +1852,7 @@ async function configureCcrProxy(ccrConfig) {
1852
1852
  if (!settings.env) {
1853
1853
  settings.env = {};
1854
1854
  }
1855
+ delete settings.env.ANTHROPIC_AUTH_TOKEN;
1855
1856
  settings.env.ANTHROPIC_BASE_URL = `http://${host}:${port}`;
1856
1857
  settings.env.ANTHROPIC_API_KEY = apiKey;
1857
1858
  writeJsonConfig(SETTINGS_FILE, settings);
@@ -4260,7 +4261,6 @@ async function runCodexWorkflowImportWithLanguageSelection(options) {
4260
4261
  async function runCodexSystemPromptSelection(skipPrompt = false) {
4261
4262
  ensureI18nInitialized();
4262
4263
  const rootDir = getRootDir$1();
4263
- const templateRoot = join(rootDir, "templates", "codex");
4264
4264
  const zcfConfig$1 = readZcfConfig();
4265
4265
  const { readDefaultTomlConfig: readDefaultTomlConfig2 } = await Promise.resolve().then(function () { return zcfConfig; });
4266
4266
  const tomlConfig = readDefaultTomlConfig2();
@@ -4273,10 +4273,9 @@ async function runCodexSystemPromptSelection(skipPrompt = false) {
4273
4273
  // Pass skipPrompt flag
4274
4274
  );
4275
4275
  updateZcfConfig({ templateLang: preferredLang });
4276
- let langDir = join(templateRoot, preferredLang);
4277
- if (!exists(langDir))
4278
- langDir = join(templateRoot, "zh-CN");
4279
- const systemPromptSrc = join(langDir, "system-prompt");
4276
+ let systemPromptSrc = join(rootDir, "templates", "common", "output-styles", preferredLang);
4277
+ if (!exists(systemPromptSrc))
4278
+ systemPromptSrc = join(rootDir, "templates", "common", "output-styles", "zh-CN");
4280
4279
  if (!exists(systemPromptSrc))
4281
4280
  return;
4282
4281
  const availablePrompts = [
@@ -4338,17 +4337,17 @@ async function runCodexWorkflowSelection(options) {
4338
4337
  ensureI18nInitialized();
4339
4338
  const { skipPrompt = false, workflows: presetWorkflows = [] } = options ?? {};
4340
4339
  const rootDir = getRootDir$1();
4341
- const templateRoot = join(rootDir, "templates", "codex");
4342
4340
  const zcfConfig = readZcfConfig();
4343
4341
  const templateLang = zcfConfig?.templateLang || zcfConfig?.preferredLang || "en";
4344
- const preferredLang = templateLang === "en" ? "en" : "zh-CN";
4345
- let langDir = join(templateRoot, preferredLang);
4346
- if (!exists(langDir))
4347
- langDir = join(templateRoot, "zh-CN");
4348
- const workflowSrc = join(langDir, "workflow");
4342
+ let preferredLang = templateLang === "en" ? "en" : "zh-CN";
4343
+ const workflowSrc = join(rootDir, "templates", "common", "workflow");
4349
4344
  if (!exists(workflowSrc))
4350
4345
  return;
4351
- const allWorkflows = getAllWorkflowFiles(workflowSrc);
4346
+ let allWorkflows = getAllWorkflowFiles(workflowSrc, preferredLang);
4347
+ if (allWorkflows.length === 0 && preferredLang === "en") {
4348
+ preferredLang = "zh-CN";
4349
+ allWorkflows = getAllWorkflowFiles(workflowSrc, preferredLang);
4350
+ }
4352
4351
  if (allWorkflows.length === 0)
4353
4352
  return;
4354
4353
  if (skipPrompt) {
@@ -4362,9 +4361,9 @@ async function runCodexWorkflowSelection(options) {
4362
4361
  const selectedWorkflows = allWorkflows.filter(
4363
4362
  (workflow) => presetWorkflows.includes(workflow.name)
4364
4363
  );
4365
- workflowsToInstall = expandSelectedWorkflowPaths(selectedWorkflows.map((w) => w.path), workflowSrc);
4364
+ workflowsToInstall = expandSelectedWorkflowPaths(selectedWorkflows.map((w) => w.path), workflowSrc, preferredLang);
4366
4365
  } else {
4367
- workflowsToInstall = expandSelectedWorkflowPaths(allWorkflows.map((w) => w.path), workflowSrc);
4366
+ workflowsToInstall = expandSelectedWorkflowPaths(allWorkflows.map((w) => w.path), workflowSrc, preferredLang);
4368
4367
  }
4369
4368
  for (const workflowPath of workflowsToInstall) {
4370
4369
  const content = readFile(workflowPath);
@@ -4392,7 +4391,7 @@ async function runCodexWorkflowSelection(options) {
4392
4391
  if (backupPath) {
4393
4392
  console.log(ansis.gray(getBackupMessage(backupPath)));
4394
4393
  }
4395
- const finalWorkflowPaths = expandSelectedWorkflowPaths(workflows, workflowSrc);
4394
+ const finalWorkflowPaths = expandSelectedWorkflowPaths(workflows, workflowSrc, preferredLang);
4396
4395
  for (const workflowPath of finalWorkflowPaths) {
4397
4396
  const content = readFile(workflowPath);
4398
4397
  const filename = workflowPath.split("/").pop() || "workflow.md";
@@ -4401,19 +4400,16 @@ async function runCodexWorkflowSelection(options) {
4401
4400
  }
4402
4401
  }
4403
4402
  const GIT_GROUP_SENTINEL = "::gitGroup";
4404
- function getAllWorkflowFiles(dirPath) {
4403
+ function getAllWorkflowFiles(workflowSrc, preferredLang) {
4405
4404
  const workflows = [];
4406
- const sixStepDir = join(dirPath, "sixStep", "prompts");
4407
- if (exists(sixStepDir)) {
4408
- const workflowFile = join(sixStepDir, "workflow.md");
4409
- if (exists(workflowFile)) {
4410
- workflows.push({
4411
- name: i18n.t("workflow:workflowOption.sixStepsWorkflow"),
4412
- path: workflowFile
4413
- });
4414
- }
4405
+ const sixStepFile = join(workflowSrc, "sixStep", preferredLang, "workflow.md");
4406
+ if (exists(sixStepFile)) {
4407
+ workflows.push({
4408
+ name: i18n.t("workflow:workflowOption.sixStepsWorkflow"),
4409
+ path: sixStepFile
4410
+ });
4415
4411
  }
4416
- const gitPromptsDir = join(dirPath, "git", "prompts");
4412
+ const gitPromptsDir = join(workflowSrc, "git", preferredLang);
4417
4413
  if (exists(gitPromptsDir)) {
4418
4414
  workflows.push({
4419
4415
  name: i18n.t("workflow:workflowOption.gitWorkflow"),
@@ -4423,19 +4419,19 @@ function getAllWorkflowFiles(dirPath) {
4423
4419
  }
4424
4420
  return workflows;
4425
4421
  }
4426
- function expandSelectedWorkflowPaths(paths, workflowSrc) {
4422
+ function expandSelectedWorkflowPaths(paths, workflowSrc, preferredLang) {
4427
4423
  const expanded = [];
4428
4424
  for (const p of paths) {
4429
4425
  if (p === GIT_GROUP_SENTINEL) {
4430
- expanded.push(...getGitPromptFiles(workflowSrc));
4426
+ expanded.push(...getGitPromptFiles(workflowSrc, preferredLang));
4431
4427
  } else {
4432
4428
  expanded.push(p);
4433
4429
  }
4434
4430
  }
4435
4431
  return expanded;
4436
4432
  }
4437
- function getGitPromptFiles(workflowSrc) {
4438
- const gitDir = join(workflowSrc, "git", "prompts");
4433
+ function getGitPromptFiles(workflowSrc, preferredLang) {
4434
+ const gitPromptsDir = join(workflowSrc, "git", preferredLang);
4439
4435
  const files = [
4440
4436
  "git-commit.md",
4441
4437
  "git-rollback.md",
@@ -4444,7 +4440,7 @@ function getGitPromptFiles(workflowSrc) {
4444
4440
  ];
4445
4441
  const resolved = [];
4446
4442
  for (const f of files) {
4447
- const full = join(gitDir, f);
4443
+ const full = join(gitPromptsDir, f);
4448
4444
  if (exists(full))
4449
4445
  resolved.push(full);
4450
4446
  }
@@ -5267,7 +5263,7 @@ async function copyOutputStyles(selectedStyles, lang) {
5267
5263
  const currentFilePath = fileURLToPath(import.meta.url);
5268
5264
  const distDir = dirname(dirname(currentFilePath));
5269
5265
  const rootDir = dirname(distDir);
5270
- const templateDir = join(rootDir, "templates", "claude-code", lang, "output-styles");
5266
+ const templateDir = join(rootDir, "templates", "common", "output-styles", lang);
5271
5267
  for (const styleId of selectedStyles) {
5272
5268
  const style = OUTPUT_STYLES.find((s) => s.id === styleId);
5273
5269
  if (!style || !style.isCustom || !style.filePath) {
@@ -6415,6 +6411,7 @@ function getRootDir() {
6415
6411
  return dirname(distDir);
6416
6412
  }
6417
6413
  const DEFAULT_CODE_TOOL_TEMPLATE = "claude-code";
6414
+ const COMMON_TEMPLATE_CATEGORIES = ["git", "sixStep"];
6418
6415
  async function selectAndInstallWorkflows(configLang, preselectedWorkflows) {
6419
6416
  ensureI18nInitialized();
6420
6417
  const workflows = getOrderedWorkflows();
@@ -6474,7 +6471,16 @@ async function installWorkflowWithDependencies(config, configLang) {
6474
6471
  await mkdir(commandsDir, { recursive: true });
6475
6472
  }
6476
6473
  for (const commandFile of config.commands) {
6477
- const commandSource = join(
6474
+ const isCommonTemplate = COMMON_TEMPLATE_CATEGORIES.includes(config.category);
6475
+ const commandSource = isCommonTemplate ? join(
6476
+ rootDir,
6477
+ "templates",
6478
+ "common",
6479
+ "workflow",
6480
+ config.category,
6481
+ configLang,
6482
+ commandFile
6483
+ ) : join(
6478
6484
  rootDir,
6479
6485
  "templates",
6480
6486
  DEFAULT_CODE_TOOL_TEMPLATE,
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.0",
5
5
  "description": "Zero-Config Code Flow - One-click configuration tool for Code Cli",
6
6
  "author": {
7
7
  "name": "Miao Da",
@@ -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/