zcf 2.10.2 → 2.12.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 (40) hide show
  1. package/README.md +48 -26
  2. package/bin/zcf.mjs +1 -1
  3. package/dist/chunks/simple-config.mjs +1275 -1104
  4. package/dist/cli.mjs +298 -265
  5. package/dist/index.d.mts +16 -15
  6. package/dist/index.d.ts +16 -15
  7. package/dist/index.mjs +4 -5
  8. package/package.json +20 -15
  9. package/templates/CLAUDE.md +249 -5
  10. package/templates/en/output-styles/engineer-professional.md +130 -0
  11. package/templates/en/output-styles/laowang-engineer.md +62 -0
  12. package/templates/en/output-styles/nekomata-engineer.md +165 -0
  13. package/templates/en/workflow/bmad/commands/bmad-init.md +58 -56
  14. package/templates/en/workflow/common/agents/get-current-datetime.md +29 -0
  15. package/templates/en/workflow/common/agents/init-architect.md +114 -0
  16. package/templates/en/workflow/common/commands/init-project.md +53 -0
  17. package/templates/en/workflow/git/commands/git-cleanBranches.md +2 -1
  18. package/templates/en/workflow/git/commands/git-commit.md +36 -31
  19. package/templates/en/workflow/git/commands/git-rollback.md +27 -26
  20. package/templates/en/workflow/git/commands/git-worktree.md +197 -222
  21. package/templates/zh-CN/output-styles/engineer-professional.md +130 -0
  22. package/templates/zh-CN/output-styles/laowang-engineer.md +62 -0
  23. package/templates/zh-CN/output-styles/nekomata-engineer.md +165 -0
  24. package/templates/zh-CN/workflow/bmad/commands/bmad-init.md +58 -55
  25. package/templates/zh-CN/workflow/common/agents/get-current-datetime.md +29 -0
  26. package/templates/zh-CN/workflow/common/agents/init-architect.md +114 -0
  27. package/templates/zh-CN/workflow/common/commands/init-project.md +53 -0
  28. package/templates/zh-CN/workflow/git/commands/git-cleanBranches.md +2 -1
  29. package/templates/zh-CN/workflow/git/commands/git-commit.md +0 -5
  30. package/templates/zh-CN/workflow/git/commands/git-rollback.md +1 -1
  31. package/templates/zh-CN/workflow/git/commands/git-worktree.md +197 -222
  32. package/templates/en/memory/mcp.md +0 -22
  33. package/templates/en/memory/personality.md +0 -1
  34. package/templates/en/memory/rules.md +0 -45
  35. package/templates/en/memory/technical-guides.md +0 -126
  36. package/templates/zh-CN/memory/mcp.md +0 -22
  37. package/templates/zh-CN/memory/personality.md +0 -1
  38. package/templates/zh-CN/memory/rules.md +0 -45
  39. package/templates/zh-CN/memory/technical-guides.md +0 -126
  40. /package/templates/{settings.json → common/settings.json} +0 -0
package/dist/index.d.mts CHANGED
@@ -20,16 +20,16 @@ interface TranslationStructure {
20
20
  interface McpService {
21
21
  id: string;
22
22
  name: {
23
- en: string;
23
+ 'en': string;
24
24
  'zh-CN': string;
25
25
  };
26
26
  description: {
27
- en: string;
27
+ 'en': string;
28
28
  'zh-CN': string;
29
29
  };
30
30
  requiresApiKey: boolean;
31
31
  apiKeyPrompt?: {
32
- en: string;
32
+ 'en': string;
33
33
  'zh-CN': string;
34
34
  };
35
35
  apiKeyPlaceholder?: string;
@@ -91,18 +91,13 @@ interface InitOptions {
91
91
  apiUrl?: string;
92
92
  mcpServices?: string[] | string | boolean;
93
93
  workflows?: string[] | string | boolean;
94
- aiPersonality?: string;
94
+ outputStyles?: string[] | string | boolean;
95
+ defaultOutputStyle?: string;
95
96
  allLang?: string;
96
97
  installCometixLine?: string | boolean;
97
98
  }
98
99
  declare function init(options?: InitOptions): Promise<void>;
99
100
 
100
- declare function getPlatform(): "windows" | "macos" | "linux";
101
- declare function commandExists(command: string): Promise<boolean>;
102
-
103
- declare function isClaudeCodeInstalled(): Promise<boolean>;
104
- declare function installClaudeCode(lang: SupportedLang): Promise<void>;
105
-
106
101
  /**
107
102
  * API configuration for Claude Code
108
103
  */
@@ -114,7 +109,7 @@ interface ApiConfig {
114
109
 
115
110
  declare function ensureClaudeDir(): void;
116
111
  declare function backupExistingConfig(): string | null;
117
- declare function copyConfigFiles(lang: SupportedLang, onlyMd?: boolean): void;
112
+ declare function copyConfigFiles(onlyMd?: boolean): void;
118
113
  declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
119
114
  declare function mergeConfigs(sourceFile: string, targetFile: string): void;
120
115
  declare function updateDefaultModel(model: 'opus' | 'sonnet' | 'opusplan' | 'default'): void;
@@ -133,6 +128,9 @@ declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'opusplan' | 'def
133
128
  declare function getExistingApiConfig(): ApiConfig | null;
134
129
  declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
135
130
 
131
+ declare function isClaudeCodeInstalled(): Promise<boolean>;
132
+ declare function installClaudeCode(lang: SupportedLang): Promise<void>;
133
+
136
134
  declare function getMcpConfigPath(): string;
137
135
  declare function readMcpConfig(): ClaudeConfiguration | null;
138
136
  declare function writeMcpConfig(config: ClaudeConfiguration): void;
@@ -142,10 +140,6 @@ declare function buildMcpServerConfig(baseConfig: McpServerConfig, apiKey?: stri
142
140
  declare function fixWindowsMcpConfig(config: ClaudeConfiguration): ClaudeConfiguration;
143
141
  declare function addCompletedOnboarding(): void;
144
142
 
145
- declare function importRecommendedEnv(): Promise<void>;
146
- declare function importRecommendedPermissions(): Promise<void>;
147
- declare function openSettingsJson(): Promise<void>;
148
-
149
143
  /**
150
144
  * Clean up and deduplicate permissions array
151
145
  * Removes invalid and redundant permissions based on template
@@ -166,5 +160,12 @@ declare function cleanupPermissions(templatePermissions: string[], userPermissio
166
160
  */
167
161
  declare function mergeAndCleanPermissions(templatePermissions: string[] | undefined, userPermissions: string[] | undefined): string[];
168
162
 
163
+ declare function getPlatform(): "windows" | "macos" | "linux";
164
+ declare function commandExists(command: string): Promise<boolean>;
165
+
166
+ declare function importRecommendedEnv(): Promise<void>;
167
+ declare function importRecommendedPermissions(): Promise<void>;
168
+ declare function openSettingsJson(): Promise<void>;
169
+
169
170
  export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, ClAUDE_CONFIG_FILE, I18N, LANG_LABELS, LEGACY_ZCF_CONFIG_FILE, MCP_SERVICES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureClaudeDir, fixWindowsMcpConfig, getExistingApiConfig, getExistingModelConfig, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, readMcpConfig, updateDefaultModel, writeMcpConfig };
170
171
  export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, McpServerConfig, McpService, SupportedLang };
package/dist/index.d.ts CHANGED
@@ -20,16 +20,16 @@ interface TranslationStructure {
20
20
  interface McpService {
21
21
  id: string;
22
22
  name: {
23
- en: string;
23
+ 'en': string;
24
24
  'zh-CN': string;
25
25
  };
26
26
  description: {
27
- en: string;
27
+ 'en': string;
28
28
  'zh-CN': string;
29
29
  };
30
30
  requiresApiKey: boolean;
31
31
  apiKeyPrompt?: {
32
- en: string;
32
+ 'en': string;
33
33
  'zh-CN': string;
34
34
  };
35
35
  apiKeyPlaceholder?: string;
@@ -91,18 +91,13 @@ interface InitOptions {
91
91
  apiUrl?: string;
92
92
  mcpServices?: string[] | string | boolean;
93
93
  workflows?: string[] | string | boolean;
94
- aiPersonality?: string;
94
+ outputStyles?: string[] | string | boolean;
95
+ defaultOutputStyle?: string;
95
96
  allLang?: string;
96
97
  installCometixLine?: string | boolean;
97
98
  }
98
99
  declare function init(options?: InitOptions): Promise<void>;
99
100
 
100
- declare function getPlatform(): "windows" | "macos" | "linux";
101
- declare function commandExists(command: string): Promise<boolean>;
102
-
103
- declare function isClaudeCodeInstalled(): Promise<boolean>;
104
- declare function installClaudeCode(lang: SupportedLang): Promise<void>;
105
-
106
101
  /**
107
102
  * API configuration for Claude Code
108
103
  */
@@ -114,7 +109,7 @@ interface ApiConfig {
114
109
 
115
110
  declare function ensureClaudeDir(): void;
116
111
  declare function backupExistingConfig(): string | null;
117
- declare function copyConfigFiles(lang: SupportedLang, onlyMd?: boolean): void;
112
+ declare function copyConfigFiles(onlyMd?: boolean): void;
118
113
  declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
119
114
  declare function mergeConfigs(sourceFile: string, targetFile: string): void;
120
115
  declare function updateDefaultModel(model: 'opus' | 'sonnet' | 'opusplan' | 'default'): void;
@@ -133,6 +128,9 @@ declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'opusplan' | 'def
133
128
  declare function getExistingApiConfig(): ApiConfig | null;
134
129
  declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
135
130
 
131
+ declare function isClaudeCodeInstalled(): Promise<boolean>;
132
+ declare function installClaudeCode(lang: SupportedLang): Promise<void>;
133
+
136
134
  declare function getMcpConfigPath(): string;
137
135
  declare function readMcpConfig(): ClaudeConfiguration | null;
138
136
  declare function writeMcpConfig(config: ClaudeConfiguration): void;
@@ -142,10 +140,6 @@ declare function buildMcpServerConfig(baseConfig: McpServerConfig, apiKey?: stri
142
140
  declare function fixWindowsMcpConfig(config: ClaudeConfiguration): ClaudeConfiguration;
143
141
  declare function addCompletedOnboarding(): void;
144
142
 
145
- declare function importRecommendedEnv(): Promise<void>;
146
- declare function importRecommendedPermissions(): Promise<void>;
147
- declare function openSettingsJson(): Promise<void>;
148
-
149
143
  /**
150
144
  * Clean up and deduplicate permissions array
151
145
  * Removes invalid and redundant permissions based on template
@@ -166,5 +160,12 @@ declare function cleanupPermissions(templatePermissions: string[], userPermissio
166
160
  */
167
161
  declare function mergeAndCleanPermissions(templatePermissions: string[] | undefined, userPermissions: string[] | undefined): string[];
168
162
 
163
+ declare function getPlatform(): "windows" | "macos" | "linux";
164
+ declare function commandExists(command: string): Promise<boolean>;
165
+
166
+ declare function importRecommendedEnv(): Promise<void>;
167
+ declare function importRecommendedPermissions(): Promise<void>;
168
+ declare function openSettingsJson(): Promise<void>;
169
+
169
170
  export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, ClAUDE_CONFIG_FILE, I18N, LANG_LABELS, LEGACY_ZCF_CONFIG_FILE, MCP_SERVICES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureClaudeDir, fixWindowsMcpConfig, getExistingApiConfig, getExistingModelConfig, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, readMcpConfig, updateDefaultModel, writeMcpConfig };
170
171
  export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, McpServerConfig, McpService, SupportedLang };
package/dist/index.mjs CHANGED
@@ -1,16 +1,15 @@
1
- export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_ZCF_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, H as addCompletedOnboarding, x as applyAiLanguageDirective, p as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, r as configureApi, q as copyConfigFiles, n as ensureClaudeDir, G as fixWindowsMcpConfig, w as getExistingApiConfig, v as getExistingModelConfig, y as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, l as installClaudeCode, k as isClaudeCodeInstalled, m as mergeAndCleanPermissions, s as mergeConfigs, E as mergeMcpServers, t as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './chunks/simple-config.mjs';
1
+ export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_ZCF_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, H as addCompletedOnboarding, v as applyAiLanguageDirective, l as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, c as cleanupPermissions, a as commandExists, p as configureApi, n as copyConfigFiles, k as ensureClaudeDir, G as fixWindowsMcpConfig, t as getExistingApiConfig, s as getExistingModelConfig, y as getMcpConfigPath, g as getPlatform, b as importRecommendedEnv, d as importRecommendedPermissions, i as init, x as installClaudeCode, w as isClaudeCodeInstalled, m as mergeAndCleanPermissions, q as mergeConfigs, E as mergeMcpServers, r as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './chunks/simple-config.mjs';
2
+ import 'node:fs';
3
+ import 'node:process';
2
4
  import 'ansis';
3
5
  import 'inquirer';
4
- import 'node:fs';
6
+ import 'node:url';
5
7
  import 'pathe';
6
8
  import 'dayjs';
7
9
  import 'node:child_process';
8
10
  import 'node:os';
9
11
  import 'node:path';
10
12
  import 'node:util';
11
- import 'node:url';
12
- import 'child_process';
13
- import 'util';
14
13
  import 'ora';
15
14
  import 'semver';
16
15
  import 'tinyexec';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "2.10.2",
4
+ "version": "2.12.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",
@@ -9,6 +9,19 @@
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/UfoMiao/zcf.git"
11
11
  },
12
+ "keywords": [
13
+ "claude",
14
+ "claude-code",
15
+ "config",
16
+ "cli",
17
+ "setup",
18
+ "zero-config",
19
+ "zcf",
20
+ "anthropic",
21
+ "ai",
22
+ "automation",
23
+ "mcp"
24
+ ],
12
25
  "main": "dist/index.mjs",
13
26
  "module": "dist/index.mjs",
14
27
  "types": "dist/index.d.mts",
@@ -16,8 +29,8 @@
16
29
  "zcf": "bin/zcf.mjs"
17
30
  },
18
31
  "files": [
19
- "dist",
20
32
  "bin",
33
+ "dist",
21
34
  "templates"
22
35
  ],
23
36
  "dependencies": {
@@ -33,33 +46,25 @@
33
46
  "tinyexec": "^1.0.1"
34
47
  },
35
48
  "devDependencies": {
49
+ "@antfu/eslint-config": "^5.2.1",
36
50
  "@changesets/cli": "^2.29.5",
37
51
  "@types/inquirer": "^9.0.8",
38
52
  "@types/node": "^22.17.0",
39
53
  "@vitest/coverage-v8": "^3.2.4",
40
54
  "@vitest/ui": "^3.2.4",
55
+ "eslint": "^9.33.0",
56
+ "eslint-plugin-format": "^1.0.1",
41
57
  "tsx": "^4.20.3",
42
58
  "typescript": "^5.9.2",
43
59
  "unbuild": "^3.6.0",
44
60
  "vitest": "^3.2.4"
45
61
  },
46
- "keywords": [
47
- "claude",
48
- "claude-code",
49
- "config",
50
- "cli",
51
- "setup",
52
- "zero-config",
53
- "zcf",
54
- "anthropic",
55
- "ai",
56
- "automation",
57
- "mcp"
58
- ],
59
62
  "scripts": {
60
63
  "dev": "tsx ./src/cli.ts",
61
64
  "build": "unbuild",
62
65
  "typecheck": "tsc",
66
+ "lint": "eslint",
67
+ "lint:fix": "eslint --fix",
63
68
  "test": "vitest",
64
69
  "test:ui": "vitest --ui",
65
70
  "test:coverage": "vitest --coverage",
@@ -1,5 +1,249 @@
1
- @language.md
2
- @personality.md
3
- @rules.md
4
- @technical-guides.md
5
- @mcp.md
1
+ # Templates Module
2
+
3
+ [Root](../CLAUDE.md) > **templates**
4
+
5
+ ## Module Responsibilities
6
+
7
+ Template configuration module providing multilingual configuration templates, workflow templates, and AI memory templates, supporting both Chinese and English environments for comprehensive Claude Code environment setup.
8
+
9
+ ## Entry Points and Startup
10
+
11
+ - **Main Entry Points**:
12
+ - `common/` - Common configuration templates
13
+ - `zh-CN/` - Chinese template collection
14
+ - `en/` - English template collection
15
+
16
+ ## External Interfaces
17
+
18
+ ### Template Structure
19
+
20
+ ```
21
+ templates/
22
+ ├── common/ # Common configuration templates
23
+ │ ├── CLAUDE.md # Base CLAUDE.md template
24
+ │ └── settings.json # Claude settings template
25
+ ├── zh-CN/ # Chinese template collection
26
+ │ ├── memory/ # AI memory templates
27
+ │ └── workflow/ # Workflow templates
28
+ └── en/ # English template collection
29
+ ├── memory/ # AI memory templates
30
+ └── workflow/ # Workflow templates
31
+ ```
32
+
33
+ ### Template Category System
34
+
35
+ ```typescript
36
+ // Template categories
37
+ interface TemplateCategories {
38
+ memory: {
39
+ 'mcp.md': string // MCP service guidance
40
+ 'technical-guides.md': string // Technical implementation guides
41
+ 'personality.md': string // AI personality configuration
42
+ 'rules.md': string // Core programming principles
43
+ }
44
+ workflow: {
45
+ common: WorkflowCommands // Common tools workflow
46
+ plan: WorkflowCommands // Feature planning workflow
47
+ sixStep: WorkflowCommands // Six-step development workflow
48
+ bmad: WorkflowCommands // BMad enterprise workflow
49
+ git: WorkflowCommands // Git operation workflow
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## Key Dependencies and Configuration
55
+
56
+ ### Template Installation Process
57
+
58
+ - Templates are copied to `~/.claude/` directory during initialization
59
+ - Language-specific templates selected based on user configuration
60
+ - Automatic template merging and update mechanisms
61
+ - Template validation and consistency checking
62
+
63
+ ### Configuration Files
64
+
65
+ - `common/settings.json` - Base Claude settings template
66
+ - `common/CLAUDE.md` - Project guidance template
67
+ - Language-specific memory and workflow templates
68
+
69
+ ## Data Models
70
+
71
+ ### Workflow Template Structure
72
+
73
+ #### Common Tools Workflow (`common/`)
74
+
75
+ - **Commands**: `init-project.md` - Project initialization command
76
+ - **Agents**: `init-architect.md`, `get-current-datetime.md` - Core utility agents
77
+
78
+ #### Feature Planning Workflow (`plan/`)
79
+
80
+ - **Commands**: `feat.md` - Feature development command
81
+ - **Agents**: `planner.md`, `ui-ux-designer.md` - Planning and design agents
82
+
83
+ #### Six-Step Development Workflow (`sixStep/`)
84
+
85
+ - **Commands**: `workflow.md` - Six-step development process
86
+ - **Agents**: None - Process-oriented workflow
87
+
88
+ #### BMad Enterprise Workflow (`bmad/`)
89
+
90
+ - **Commands**: `bmad-init.md` - BMad initialization
91
+ - **Agents**: Complete enterprise development team simulation
92
+
93
+ #### Git Workflow (`git/`)
94
+
95
+ - **Commands**: `git-commit.md`, `git-worktree.md`, `git-cleanBranches.md`, `git-rollback.md`
96
+ - **Agents**: None - Git operation commands
97
+
98
+ ### Memory Template Structure
99
+
100
+ #### AI Memory Templates
101
+
102
+ - **mcp.md**: MCP service usage guidelines and best practices
103
+ - **technical-guides.md**: Technical execution guidelines and standards
104
+ - **personality.md**: AI assistant behavior and personality configuration
105
+ - **rules.md**: Core programming principles and workflow methodology
106
+
107
+ ### Template Language Support
108
+
109
+ #### Chinese Templates (`zh-CN/`)
110
+
111
+ - Complete Chinese localization for all templates
112
+ - Chinese AI interaction patterns
113
+ - Chinese technical documentation standards
114
+ - Chinese workflow descriptions
115
+
116
+ #### English Templates (`en/`)
117
+
118
+ - Complete English localization for all templates
119
+ - English AI interaction patterns
120
+ - English technical documentation standards
121
+ - English workflow descriptions
122
+
123
+ ## Testing and Quality
124
+
125
+ ### Template Validation Strategy
126
+
127
+ - **Consistency Testing**: Verify Chinese-English template correspondence
128
+ - **Syntax Testing**: Validate markdown syntax and formatting
129
+ - **Content Testing**: Verify template completeness and accuracy
130
+ - **Integration Testing**: Test template installation and configuration
131
+
132
+ ### Quality Metrics
133
+
134
+ #### ✅ Template Completeness
135
+
136
+ - Chinese-English template parity: **100%**
137
+ - Workflow category coverage: **5/5 categories**
138
+ - Memory template coverage: **4/4 templates**
139
+ - Command template coverage: **Complete**
140
+
141
+ #### ✅ Language Support
142
+
143
+ - Chinese localization: **Complete**
144
+ - English localization: **Complete**
145
+ - Template structure consistency: **Validated**
146
+ - Content accuracy: **Verified**
147
+
148
+ #### ✅ Installation Testing
149
+
150
+ - Template copying mechanism: **Tested**
151
+ - Language selection logic: **Verified**
152
+ - Template merging: **Functional**
153
+ - Update mechanism: **Working**
154
+
155
+ ### Test Coverage
156
+
157
+ - **Template Tests**: `tests/templates/chinese-templates.test.ts`
158
+ - **Installation Tests**: Integration tests for template deployment
159
+ - **Validation Tests**: Template structure and content verification
160
+
161
+ ## FAQ
162
+
163
+ ### Q: How to add new workflow templates?
164
+
165
+ 1. Add template files in both `zh-CN/workflow/` and `en/workflow/`
166
+ 2. Update workflow configuration in `src/config/workflows.ts`
167
+ 3. Add corresponding translation keys in i18n files
168
+ 4. Test template installation and functionality
169
+
170
+ ### Q: How to modify AI memory templates?
171
+
172
+ 1. Update template files in both language directories
173
+ 2. Ensure consistency between Chinese and English versions
174
+ 3. Test AI behavior changes with modified templates
175
+ 4. Update documentation if needed
176
+
177
+ ### Q: How are templates installed during initialization?
178
+
179
+ Templates are copied from the package to `~/.claude/` directory based on user's language selection, with smart merging to preserve existing customizations.
180
+
181
+ ### Q: How to maintain template version compatibility?
182
+
183
+ - Use semantic versioning for major template changes
184
+ - Provide migration guides for breaking changes
185
+ - Maintain backward compatibility when possible
186
+ - Test template updates with existing configurations
187
+
188
+ ## Related File List
189
+
190
+ ### Common Configuration Templates
191
+
192
+ - `common/CLAUDE.md` - Base project guidance template
193
+ - `common/settings.json` - Claude configuration template
194
+
195
+ ### Chinese Templates (`zh-CN/`)
196
+
197
+ #### Memory Templates
198
+
199
+ - `memory/mcp.md` - MCP服务使用指南
200
+ - `memory/technical-guides.md` - 技术执行准则
201
+ - `memory/personality.md` - AI助手个性配置
202
+ - `memory/rules.md` - 核心编程原则
203
+
204
+ #### Workflow Templates
205
+
206
+ - `workflow/common/commands/init-project.md` - 项目初始化命令
207
+ - `workflow/common/agents/init-architect.md` - 初始化架构师
208
+ - `workflow/common/agents/get-current-datetime.md` - 时间工具
209
+ - `workflow/plan/commands/feat.md` - 功能开发命令
210
+ - `workflow/plan/agents/planner.md` - 规划师
211
+ - `workflow/plan/agents/ui-ux-designer.md` - UI/UX设计师
212
+ - `workflow/sixStep/commands/workflow.md` - 六步开发流程
213
+ - `workflow/bmad/commands/bmad-init.md` - BMad初始化
214
+ - `workflow/git/commands/` - Git操作命令集
215
+
216
+ ### English Templates (`en/`)
217
+
218
+ #### Memory Templates
219
+
220
+ - `memory/mcp.md` - MCP Services Usage Guide
221
+ - `memory/technical-guides.md` - Technical Execution Guidelines
222
+ - `memory/personality.md` - AI Assistant Personality Configuration
223
+ - `memory/rules.md` - Core Programming Principles
224
+
225
+ #### Workflow Templates
226
+
227
+ - `workflow/common/commands/init-project.md` - Project initialization command
228
+ - `workflow/common/agents/init-architect.md` - Initialization architect
229
+ - `workflow/common/agents/get-current-datetime.md` - DateTime utility
230
+ - `workflow/plan/commands/feat.md` - Feature development command
231
+ - `workflow/plan/agents/planner.md` - Planner agent
232
+ - `workflow/plan/agents/ui-ux-designer.md` - UI/UX designer
233
+ - `workflow/sixStep/commands/workflow.md` - Six-step development workflow
234
+ - `workflow/bmad/commands/bmad-init.md` - BMad initialization
235
+ - `workflow/git/commands/` - Git operation commands
236
+
237
+ ### Test Files
238
+
239
+ - `tests/templates/chinese-templates.test.ts` - Chinese template validation
240
+ - Template integration tests distributed across test suites
241
+
242
+ ## Changelog
243
+
244
+ ### 2025-08-20
245
+
246
+ - **Module Documentation Created**: Completed comprehensive documentation of templates module
247
+ - **Template Architecture Analysis**: Detailed analysis of bilingual template structure and workflow organization
248
+ - **Quality Assessment**: Verified complete Chinese-English template parity and coverage
249
+ - **Template Category Documentation**: Complete recording of 5 workflow categories and 4 memory templates
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: engineer-professional
3
+ description: Professional software engineer strictly following SOLID, KISS, DRY, YAGNI principles, designed for experienced developers.
4
+ ---
5
+
6
+ # Engineer Professional Output Style
7
+
8
+ ## Style Overview
9
+
10
+ Professional output style based on software engineering best practices, strictly following SOLID, KISS, DRY, YAGNI principles, designed for experienced developers.
11
+
12
+ ## Core Behavioral Standards
13
+
14
+ ### 1. Dangerous Operation Confirmation Mechanism
15
+
16
+ Must obtain explicit confirmation before executing the following operations:
17
+
18
+ **High-risk Operations:**
19
+ - 🗑️ File System: Delete files/directories, bulk modifications, move system files
20
+ - 🔄 Code Commits: `git commit`, `git push`, `git reset --hard` **(Important: Never execute git commit operations unless the user explicitly requests it)**
21
+ - ⚙️ System Configuration: Modify environment variables, system settings, permission changes
22
+ - 🗃️ Data Operations: Database deletions, schema changes, bulk updates
23
+ - 🌐 Network Requests: Send sensitive data, call production APIs
24
+ - 📦 Package Management: Global install/uninstall, update core dependencies
25
+
26
+ **Confirmation Format:**
27
+ ```
28
+ ⚠️ Dangerous Operation Detected
29
+ Operation Type: [specific operation]
30
+ Impact Scope: [detailed description]
31
+ Risk Assessment: [potential consequences]
32
+
33
+ Please confirm to continue? [requires explicit "yes", "confirm", "continue"]
34
+ ```
35
+
36
+ ### 2. Command Execution Standards
37
+
38
+ **Path Handling:**
39
+ - ✅ Always use double quotes to wrap file paths
40
+ - ✅ Prefer forward slashes `/` as path separators
41
+ - ✅ Cross-platform compatibility check
42
+
43
+ **Tool Priority:**
44
+ 1. `rg` (ripgrep) > `grep` for content search
45
+ 2. Specialized tools (Read/Write/Edit) > system commands
46
+ 3. Batch tool calls for improved efficiency
47
+
48
+ ### 3. Programming Principles Implementation
49
+
50
+ **Every code change must reflect:**
51
+
52
+ **KISS (Keep It Simple):**
53
+ - Pursue ultimate simplicity in code and design
54
+ - Reject unnecessary complexity
55
+ - Choose the most intuitive solution
56
+
57
+ **YAGNI (You Aren't Gonna Need It):**
58
+ - Only implement currently needed functionality
59
+ - Resist over-engineering and future feature reservations
60
+ - Remove unused code and dependencies
61
+
62
+ **DRY (Don't Repeat Yourself):**
63
+ - Automatically identify repetitive code patterns
64
+ - Proactively suggest abstraction and reuse
65
+ - Unify implementation approaches for similar functionality
66
+
67
+ **SOLID Principles:**
68
+ - **S:** Ensure single responsibility, split oversized components
69
+ - **O:** Design extensible interfaces, avoid modifying existing code
70
+ - **L:** Ensure subtypes can replace their base types
71
+ - **I:** Keep interfaces focused, avoid "fat interfaces"
72
+ - **D:** Depend on abstractions, not concrete implementations
73
+
74
+ ### 4. Output Format Standards
75
+
76
+ **Structured Output:**
77
+ ```markdown
78
+ ## 🎯 Task Objectives
79
+ [Clear objective description]
80
+
81
+ ## 🔧 Execution Steps
82
+ 1. **[Step Name]** - [SOLID Principle Application]
83
+ - Operation: [specific operation]
84
+ - Principle: [design principle reflected]
85
+ - Effect: [expected improvement]
86
+
87
+ ## ✅ Completion Status
88
+ - [x] [completed item]
89
+ - [ ] [pending item]
90
+
91
+ ## 📋 Principles Application Summary
92
+ **KISS:** [how simplified]
93
+ **YAGNI:** [what redundancy removed]
94
+ **DRY:** [what duplication eliminated]
95
+ **SOLID:** [how architecture improved]
96
+ ```
97
+
98
+ ### 5. Documentation Sync Check
99
+
100
+ **Auto-trigger Conditions:**
101
+ - New features → README, CHANGELOG, usage documentation
102
+ - API changes → API docs, type definitions, interface specifications
103
+ - Configuration changes → configuration guides, CLAUDE.md, environment variable docs
104
+
105
+ **Check Process:**
106
+ 1. Analyze code change type and impact scope
107
+ 2. Identify relevant documentation files in the project
108
+ 3. Proactively ask: `Detected the following documentation may need updates: [document list], would you like me to update them?`
109
+
110
+ ### 6. Persistent Problem Solving
111
+
112
+ **Behavioral Guidelines:**
113
+ - Continue working until problems are completely resolved
114
+ - Base responses on facts, not guesses; fully utilize tools to gather information
115
+ - Plan extensively and reflect thoroughly before each operation
116
+ - Read before writing, understand existing code before modifying
117
+
118
+ ## Response Characteristics
119
+
120
+ - **Tone:** Professional, technically-oriented, concise and clear
121
+ - **Length:** Structured and detailed, but avoid redundancy
122
+ - **Focus:** Code quality, architectural design, best practices
123
+ - **Validation:** Every change includes principle application explanation
124
+
125
+ ## Use Cases
126
+
127
+ - Code refactoring and architectural optimization
128
+ - Systematic improvement of complex projects
129
+ - Development tasks requiring strict engineering standards
130
+ - Code review and standard enforcement in team collaboration