@benbenwu/zcf 3.6.4

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 (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +193 -0
  3. package/bin/zcf.mjs +2 -0
  4. package/dist/chunks/api-providers.mjs +137 -0
  5. package/dist/chunks/claude-code-config-manager.mjs +731 -0
  6. package/dist/chunks/claude-code-incremental-manager.mjs +601 -0
  7. package/dist/chunks/codex-config-switch.mjs +394 -0
  8. package/dist/chunks/codex-provider-manager.mjs +197 -0
  9. package/dist/chunks/codex-uninstaller.mjs +422 -0
  10. package/dist/chunks/commands.mjs +118 -0
  11. package/dist/chunks/features.mjs +632 -0
  12. package/dist/chunks/simple-config.mjs +7904 -0
  13. package/dist/cli.d.mts +1 -0
  14. package/dist/cli.d.ts +1 -0
  15. package/dist/cli.mjs +2013 -0
  16. package/dist/i18n/locales/en/api.json +53 -0
  17. package/dist/i18n/locales/en/ccr.json +65 -0
  18. package/dist/i18n/locales/en/cli.json +55 -0
  19. package/dist/i18n/locales/en/codex.json +123 -0
  20. package/dist/i18n/locales/en/cometix.json +29 -0
  21. package/dist/i18n/locales/en/common.json +20 -0
  22. package/dist/i18n/locales/en/configuration.json +85 -0
  23. package/dist/i18n/locales/en/errors.json +26 -0
  24. package/dist/i18n/locales/en/installation.json +80 -0
  25. package/dist/i18n/locales/en/language.json +19 -0
  26. package/dist/i18n/locales/en/mcp.json +24 -0
  27. package/dist/i18n/locales/en/menu.json +51 -0
  28. package/dist/i18n/locales/en/multi-config.json +79 -0
  29. package/dist/i18n/locales/en/tools.json +15 -0
  30. package/dist/i18n/locales/en/uninstall.json +56 -0
  31. package/dist/i18n/locales/en/updater.json +25 -0
  32. package/dist/i18n/locales/en/workflow.json +23 -0
  33. package/dist/i18n/locales/zh-CN/api.json +53 -0
  34. package/dist/i18n/locales/zh-CN/ccr.json +65 -0
  35. package/dist/i18n/locales/zh-CN/cli.json +55 -0
  36. package/dist/i18n/locales/zh-CN/codex.json +123 -0
  37. package/dist/i18n/locales/zh-CN/cometix.json +29 -0
  38. package/dist/i18n/locales/zh-CN/common.json +20 -0
  39. package/dist/i18n/locales/zh-CN/configuration.json +85 -0
  40. package/dist/i18n/locales/zh-CN/errors.json +26 -0
  41. package/dist/i18n/locales/zh-CN/installation.json +80 -0
  42. package/dist/i18n/locales/zh-CN/language.json +19 -0
  43. package/dist/i18n/locales/zh-CN/mcp.json +24 -0
  44. package/dist/i18n/locales/zh-CN/menu.json +51 -0
  45. package/dist/i18n/locales/zh-CN/multi-config.json +79 -0
  46. package/dist/i18n/locales/zh-CN/tools.json +15 -0
  47. package/dist/i18n/locales/zh-CN/uninstall.json +56 -0
  48. package/dist/i18n/locales/zh-CN/updater.json +25 -0
  49. package/dist/i18n/locales/zh-CN/workflow.json +23 -0
  50. package/dist/index.d.mts +324 -0
  51. package/dist/index.d.ts +324 -0
  52. package/dist/index.mjs +19 -0
  53. package/dist/shared/zcf.DGjQxTq_.mjs +34 -0
  54. package/package.json +117 -0
  55. package/templates/CLAUDE.md +221 -0
  56. package/templates/claude-code/CLAUDE.md +250 -0
  57. package/templates/claude-code/common/settings.json +48 -0
  58. package/templates/claude-code/en/workflow/bmad/commands/bmad-init.md +275 -0
  59. package/templates/claude-code/en/workflow/common/agents/get-current-datetime.md +29 -0
  60. package/templates/claude-code/en/workflow/common/agents/init-architect.md +114 -0
  61. package/templates/claude-code/en/workflow/common/commands/init-project.md +53 -0
  62. package/templates/claude-code/en/workflow/plan/agents/planner.md +116 -0
  63. package/templates/claude-code/en/workflow/plan/agents/ui-ux-designer.md +91 -0
  64. package/templates/claude-code/en/workflow/plan/commands/feat.md +105 -0
  65. package/templates/claude-code/zh-CN/workflow/bmad/commands/bmad-init.md +275 -0
  66. package/templates/claude-code/zh-CN/workflow/common/agents/get-current-datetime.md +29 -0
  67. package/templates/claude-code/zh-CN/workflow/common/agents/init-architect.md +114 -0
  68. package/templates/claude-code/zh-CN/workflow/common/commands/init-project.md +53 -0
  69. package/templates/claude-code/zh-CN/workflow/plan/agents/planner.md +116 -0
  70. package/templates/claude-code/zh-CN/workflow/plan/agents/ui-ux-designer.md +91 -0
  71. package/templates/claude-code/zh-CN/workflow/plan/commands/feat.md +105 -0
  72. package/templates/codex/common/config.toml +0 -0
  73. package/templates/common/output-styles/en/engineer-professional.md +88 -0
  74. package/templates/common/output-styles/en/laowang-engineer.md +127 -0
  75. package/templates/common/output-styles/en/leibus-engineer.md +251 -0
  76. package/templates/common/output-styles/en/nekomata-engineer.md +120 -0
  77. package/templates/common/output-styles/en/ojousama-engineer.md +121 -0
  78. package/templates/common/output-styles/en/rem-engineer.md +173 -0
  79. package/templates/common/output-styles/zh-CN/engineer-professional.md +89 -0
  80. package/templates/common/output-styles/zh-CN/laowang-engineer.md +127 -0
  81. package/templates/common/output-styles/zh-CN/leibus-engineer.md +251 -0
  82. package/templates/common/output-styles/zh-CN/nekomata-engineer.md +120 -0
  83. package/templates/common/output-styles/zh-CN/ojousama-engineer.md +121 -0
  84. package/templates/common/output-styles/zh-CN/rem-engineer.md +179 -0
  85. package/templates/common/workflow/git/en/git-cleanBranches.md +102 -0
  86. package/templates/common/workflow/git/en/git-commit.md +205 -0
  87. package/templates/common/workflow/git/en/git-rollback.md +90 -0
  88. package/templates/common/workflow/git/en/git-worktree.md +276 -0
  89. package/templates/common/workflow/git/zh-CN/git-cleanBranches.md +102 -0
  90. package/templates/common/workflow/git/zh-CN/git-commit.md +205 -0
  91. package/templates/common/workflow/git/zh-CN/git-rollback.md +90 -0
  92. package/templates/common/workflow/git/zh-CN/git-worktree.md +276 -0
  93. package/templates/common/workflow/sixStep/en/workflow.md +251 -0
  94. package/templates/common/workflow/sixStep/zh-CN/workflow.md +215 -0
@@ -0,0 +1,34 @@
1
+ import { pathExists } from 'fs-extra';
2
+ import trash from 'trash';
3
+
4
+ async function moveToTrash(paths) {
5
+ const pathArray = Array.isArray(paths) ? paths : [paths];
6
+ const results = [];
7
+ for (const path of pathArray) {
8
+ try {
9
+ const exists = await pathExists(path);
10
+ if (!exists) {
11
+ results.push({
12
+ success: false,
13
+ path,
14
+ error: "Path does not exist"
15
+ });
16
+ continue;
17
+ }
18
+ await trash(path);
19
+ results.push({
20
+ success: true,
21
+ path
22
+ });
23
+ } catch (error) {
24
+ results.push({
25
+ success: false,
26
+ path,
27
+ error: error.message || "Unknown error occurred"
28
+ });
29
+ }
30
+ }
31
+ return results;
32
+ }
33
+
34
+ export { moveToTrash as m };
package/package.json ADDED
@@ -0,0 +1,117 @@
1
+ {
2
+ "name": "@benbenwu/zcf",
3
+ "type": "module",
4
+ "version": "3.6.4",
5
+ "packageManager": "pnpm@10.17.1",
6
+ "description": "Zero-Config Code Flow - One-click configuration tool for Code Cli",
7
+ "author": {
8
+ "name": "Miao Da",
9
+ "email": "ufo025174@gmail.com",
10
+ "url": "https://github.com/WitMiao"
11
+ },
12
+ "license": "MIT",
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "homepage": "https://github.com/UfoMiao/zcf",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/UfoMiao/zcf.git"
20
+ },
21
+ "bugs": "https://github.com/UfoMiao/zcf/issues",
22
+ "keywords": [
23
+ "claude",
24
+ "claude-code",
25
+ "codex",
26
+ "config",
27
+ "cli",
28
+ "setup",
29
+ "zero-config",
30
+ "zcf",
31
+ "anthropic",
32
+ "openai",
33
+ "ChatGPT",
34
+ "ai",
35
+ "automation",
36
+ "mcp"
37
+ ],
38
+ "main": "dist/index.mjs",
39
+ "module": "dist/index.mjs",
40
+ "types": "dist/index.d.mts",
41
+ "bin": {
42
+ "zcf": "bin/zcf.mjs"
43
+ },
44
+ "files": [
45
+ "bin",
46
+ "dist",
47
+ "templates"
48
+ ],
49
+ "scripts": {
50
+ "dev": "tsx ./src/cli.ts",
51
+ "build": "unbuild",
52
+ "start": "node bin/zcf.mjs",
53
+ "typecheck": "tsc --noEmit",
54
+ "prepublishOnly": "pnpm build",
55
+ "lint": "eslint",
56
+ "lint:fix": "eslint --fix",
57
+ "test": "vitest",
58
+ "test:ui": "vitest --ui",
59
+ "test:coverage": "vitest run --coverage",
60
+ "test:run": "vitest run",
61
+ "test:watch": "vitest watch",
62
+ "changeset": "changeset",
63
+ "version": "changeset version",
64
+ "update:deps": "pnpx taze major -r -w",
65
+ "release": "pnpm build && changeset publish",
66
+ "prepare": "husky",
67
+ "commitlint": "commitlint",
68
+ "commitlint:check": "commitlint --from HEAD~1 --to HEAD --verbose",
69
+ "docs:dev": "pnpm -F @zcf/docs dev",
70
+ "docs:build": "pnpm -F @zcf/docs build",
71
+ "docs:preview": "pnpm -F @zcf/docs preview"
72
+ },
73
+ "dependencies": {
74
+ "@rainbowatcher/toml-edit-js": "catalog:runtime",
75
+ "@types/semver": "catalog:types",
76
+ "ansis": "catalog:cli",
77
+ "cac": "catalog:cli",
78
+ "dayjs": "catalog:runtime",
79
+ "find-up-simple": "catalog:runtime",
80
+ "fs-extra": "catalog:runtime",
81
+ "i18next": "catalog:runtime",
82
+ "i18next-fs-backend": "catalog:runtime",
83
+ "inquirer": "catalog:cli",
84
+ "inquirer-toggle": "catalog:cli",
85
+ "ora": "catalog:cli",
86
+ "pathe": "catalog:runtime",
87
+ "semver": "catalog:runtime",
88
+ "tinyexec": "catalog:runtime",
89
+ "trash": "catalog:runtime"
90
+ },
91
+ "devDependencies": {
92
+ "@antfu/eslint-config": "catalog:build",
93
+ "@changesets/cli": "catalog:tooling",
94
+ "@commitlint/cli": "catalog:tooling",
95
+ "@commitlint/config-conventional": "catalog:tooling",
96
+ "@commitlint/types": "catalog:tooling",
97
+ "@types/fs-extra": "catalog:types",
98
+ "@types/inquirer": "catalog:types",
99
+ "@types/node": "catalog:types",
100
+ "@vitest/coverage-v8": "catalog:testing",
101
+ "@vitest/ui": "catalog:testing",
102
+ "eslint": "catalog:build",
103
+ "eslint-plugin-format": "catalog:build",
104
+ "glob": "catalog:testing",
105
+ "husky": "catalog:tooling",
106
+ "lint-staged": "catalog:tooling",
107
+ "tsx": "catalog:build",
108
+ "typescript": "catalog:build",
109
+ "unbuild": "catalog:build",
110
+ "vitest": "catalog:testing"
111
+ },
112
+ "lint-staged": {
113
+ "*": [
114
+ "pnpm lint"
115
+ ]
116
+ }
117
+ }
@@ -0,0 +1,221 @@
1
+ # Templates Module
2
+
3
+ **Last Updated**: Sun Dec 15 09:15:34 CST 2025
4
+ [Root](../CLAUDE.md) > **templates**
5
+
6
+ ## Module Responsibilities
7
+
8
+ Template system module providing multilingual configuration templates, AI personality styles, and workflow definitions for both Claude Code and Codex environments. Supports Chinese (zh-CN) and English (en) locales with comprehensive workflow coverage.
9
+
10
+ ## Entry Points and Startup
11
+
12
+ - **Main Template Directories**:
13
+ - `claude-code/` - Claude Code specific templates
14
+ - `codex/` - Codex specific templates
15
+ - `common/` - Shared configuration templates
16
+
17
+ ## External Interfaces
18
+
19
+ ### Template Structure
20
+
21
+ ```
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
52
+ ├── claude-code/ # Claude Code templates
53
+ │ ├── common/ # Common configurations
54
+ │ ├── zh-CN/ # Chinese templates
55
+ │ │ └── workflow/ # Workflow templates
56
+ │ │ ├── common/ # Common tools workflow
57
+ │ │ ├── plan/ # Planning workflow
58
+ │ │ └── bmad/ # BMAD workflow
59
+ │ └── en/ # English templates
60
+ │ └── workflow/ # Workflow templates
61
+ └── codex/ # Codex templates
62
+ ├── common/ # Common configurations
63
+ ├── zh-CN/ # Chinese templates
64
+ │ └── workflow/ # Workflow templates
65
+ └── en/ # English templates
66
+ └── workflow/ # Workflow templates
67
+ ```
68
+
69
+ ### Template Categories
70
+
71
+ #### 1. Output Styles (AI Personalities)
72
+
73
+ - **engineer-professional** - Professional engineering style
74
+ - **nekomata-engineer** - Nekomata engineer personality
75
+ - **laowang-engineer** - Laowang engineer personality
76
+ - **ojousama-engineer** - Ojou-sama engineer personality
77
+ - **rem-engineer** - Rem maid engineer personality
78
+ - **default** - Default output style
79
+ - **explanatory** - Explanatory style
80
+ - **learning** - Learning-focused style
81
+
82
+ #### 2. Workflow Templates
83
+
84
+ ##### Common Tools Workflow
85
+ - **Commands**: `init-project`
86
+ - **Agents**: `init-architect`, `get-current-datetime`
87
+ - **Purpose**: Essential development tools and project initialization
88
+
89
+ ##### Planning Workflow (Plan)
90
+ - **Commands**: `feat`, `workflow`
91
+ - **Agents**: `planner`, `ui-ux-designer`
92
+ - **Purpose**: Feature planning and UX design
93
+
94
+ ##### Six-Step Workflow
95
+ - **Commands**: `zcf-update-docs`, `zcf-pr`, `zcf-release`
96
+ - **Purpose**: Structured development process
97
+
98
+ ##### BMAD Workflow
99
+ - **Commands**: Enterprise-level workflow commands
100
+ - **Purpose**: Business model and architecture design
101
+
102
+ ##### Git Workflow
103
+ - **Commands**: `git-commit`, `git-worktree`, `git-cleanBranches`, `git-rollback`
104
+ - **Purpose**: Version control management with conventional commits, worktree management, branch cleanup, and rollback operations
105
+
106
+ ## Key Dependencies and Configuration
107
+
108
+ ### Template Processing
109
+
110
+ - **Language Support**: zh-CN and en locales
111
+ - **Code Tool Support**: Claude Code and Codex
112
+ - **Template Format**: Markdown-based configuration files
113
+ - **Variable Substitution**: Dynamic content replacement
114
+
115
+ ### Configuration Integration
116
+
117
+ - **Workflow Installer**: Integration with `src/utils/workflow-installer.ts`
118
+ - **Language Detection**: Integration with `src/i18n/` system
119
+ - **Platform Support**: Cross-platform path handling
120
+
121
+ ## Data Models
122
+
123
+ ### Template Organization
124
+
125
+ ```typescript
126
+ interface TemplateStructure {
127
+ codeTool: 'claude-code' | 'codex'
128
+ locale: 'zh-CN' | 'en'
129
+ category: 'common' | 'output-styles' | 'workflow'
130
+ workflow?: {
131
+ type: 'common' | 'plan' | 'sixStep' | 'bmad' | 'git'
132
+ commands: string[]
133
+ agents: string[]
134
+ }
135
+ }
136
+ ```
137
+
138
+ ### Output Style Configuration
139
+
140
+ ```typescript
141
+ interface OutputStyle {
142
+ id: string
143
+ name: { 'zh-CN': string, 'en': string }
144
+ description: { 'zh-CN': string, 'en': string }
145
+ template: string
146
+ personality: string
147
+ }
148
+ ```
149
+
150
+ ## Testing and Quality
151
+
152
+ ### Template Validation
153
+
154
+ - **File**: `tests/templates/chinese-templates.test.ts`
155
+ - **Coverage**: Template completeness and format validation
156
+ - **Validation**: Markdown syntax and variable substitution
157
+
158
+ ### Quality Metrics
159
+
160
+ - **Template Coverage**: 100% for both locales
161
+ - **Code Tool Support**: Claude Code and Codex fully supported
162
+ - **Workflow Coverage**: 5 major workflow categories
163
+ - **Output Styles**: 7 AI personality styles
164
+
165
+ ## Common Issues
166
+
167
+ - **Path Handling**: Cross-platform path compatibility
168
+ - **Encoding**: UTF-8 encoding for multilingual content
169
+ - **Template Variables**: Proper variable substitution
170
+ - **File Permissions**: Executable permissions for command files
171
+
172
+ ## Related Files
173
+
174
+ - `src/utils/workflow-installer.ts` - Template installation logic
175
+ - `src/config/workflows.ts` - Workflow configuration definitions
176
+ - `src/i18n/` - Internationalization support
177
+ - `tests/templates/` - Template validation tests
178
+
179
+ ## Change Log (Module-Specific)
180
+
181
+ ### Recent Updates
182
+
183
+ - Consolidated sixStep workflow templates to `templates/common/workflow/sixStep/` with unified `.zcf` plan directory for both Claude Code and Codex
184
+ - Consolidated output-styles/system-prompt templates to `templates/common/output-styles/`
185
+ - Consolidated git workflow templates to `templates/common/workflow/git/`
186
+ - Added Codex template support for dual code tool architecture
187
+ - Enhanced workflow templates with comprehensive command coverage
188
+ - Improved AI personality styles with professional variations
189
+ - Added cross-platform template compatibility
190
+ - Enhanced template validation and testing coverage
191
+
192
+ ## FAQ
193
+
194
+ ### Q: How to add a new workflow template?
195
+
196
+ 1. Create workflow directory under `templates/{code-tool}/{locale}/workflow/`
197
+ 2. Add command files in `commands/` subdirectory
198
+ 3. Add agent files in `agents/` subdirectory (if needed)
199
+ 4. Update `src/config/workflows.ts` with new workflow definition
200
+ 5. Add translations in `src/i18n/locales/{locale}/workflow.ts`
201
+
202
+ ### Q: How to add a new output style?
203
+
204
+ 1. Create style file in `templates/common/output-styles/{locale}/`
205
+ 2. Define style configuration with name and description
206
+ 3. Add style to available options in configuration
207
+ 4. Test style rendering with sample content
208
+
209
+ ### Q: How to support a new language?
210
+
211
+ 1. Create new locale directory under `templates/{code-tool}/{new-locale}/`
212
+ 2. Copy existing templates and translate content
213
+ 3. Update i18n system to support new locale
214
+ 4. Add locale to supported languages list
215
+
216
+ ### Q: How to maintain template consistency?
217
+
218
+ - Use template validation tests
219
+ - Follow naming conventions
220
+ - Maintain parallel structure across locales
221
+ - Document template variables and usage
@@ -0,0 +1,250 @@
1
+ # Templates Module
2
+
3
+ **Last Updated**: Mon Oct 27 19:39:26 CST 2025
4
+ [Root](../CLAUDE.md) > **templates**
5
+
6
+ ## Module Responsibilities
7
+
8
+ 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.
9
+
10
+ ## Entry Points and Startup
11
+
12
+ - **Main Entry Points**:
13
+ - `common/` - Common configuration templates
14
+ - `zh-CN/` - Chinese template collection
15
+ - `en/` - English template collection
16
+
17
+ ## External Interfaces
18
+
19
+ ### Template Structure
20
+
21
+ ```
22
+ templates/
23
+ ├── common/ # Common configuration templates
24
+ │ ├── CLAUDE.md # Base CLAUDE.md template
25
+ │ └── settings.json # Claude settings template
26
+ ├── zh-CN/ # Chinese template collection
27
+ │ ├── memory/ # AI memory templates
28
+ │ └── workflow/ # Workflow templates
29
+ └── en/ # English template collection
30
+ ├── memory/ # AI memory templates
31
+ └── workflow/ # Workflow templates
32
+ ```
33
+
34
+ ### Template Category System
35
+
36
+ ```typescript
37
+ // Template categories
38
+ interface TemplateCategories {
39
+ memory: {
40
+ 'mcp.md': string // MCP service guidance
41
+ 'technical-guides.md': string // Technical implementation guides
42
+ 'personality.md': string // AI personality configuration
43
+ 'rules.md': string // Core programming principles
44
+ }
45
+ workflow: {
46
+ common: WorkflowCommands // Common tools workflow
47
+ plan: WorkflowCommands // Feature planning workflow
48
+ sixStep: WorkflowCommands // Six-step development workflow
49
+ bmad: WorkflowCommands // BMad enterprise workflow
50
+ git: WorkflowCommands // Git operation workflow
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## Key Dependencies and Configuration
56
+
57
+ ### Template Installation Process
58
+
59
+ - Templates are copied to `~/.claude/` directory during initialization
60
+ - Language-specific templates selected based on user configuration
61
+ - Automatic template merging and update mechanisms
62
+ - Template validation and consistency checking
63
+
64
+ ### Configuration Files
65
+
66
+ - `common/settings.json` - Base Claude settings template
67
+ - `common/CLAUDE.md` - Project guidance template
68
+ - Language-specific memory and workflow templates
69
+
70
+ ## Data Models
71
+
72
+ ### Workflow Template Structure
73
+
74
+ #### Common Tools Workflow (`common/`)
75
+
76
+ - **Commands**: `init-project.md` - Project initialization command
77
+ - **Agents**: `init-architect.md`, `get-current-datetime.md` - Core utility agents
78
+
79
+ #### Feature Planning Workflow (`plan/`)
80
+
81
+ - **Commands**: `feat.md` - Feature development command
82
+ - **Agents**: `planner.md`, `ui-ux-designer.md` - Planning and design agents
83
+
84
+ #### Six-Step Development Workflow (`sixStep/`)
85
+
86
+ - **Commands**: `workflow.md` - Six-step development process
87
+ - **Agents**: None - Process-oriented workflow
88
+
89
+ #### BMad Enterprise Workflow (`bmad/`)
90
+
91
+ - **Commands**: `bmad-init.md` - BMad initialization
92
+ - **Agents**: Complete enterprise development team simulation
93
+
94
+ #### Git Workflow (`git/`)
95
+
96
+ - **Commands**: `git-commit.md`, `git-worktree.md`, `git-cleanBranches.md`, `git-rollback.md`
97
+ - **Agents**: None - Git operation commands
98
+
99
+ ### Memory Template Structure
100
+
101
+ #### AI Memory Templates
102
+
103
+ - **mcp.md**: MCP service usage guidelines and best practices
104
+ - **technical-guides.md**: Technical execution guidelines and standards
105
+ - **personality.md**: AI assistant behavior and personality configuration
106
+ - **rules.md**: Core programming principles and workflow methodology
107
+
108
+ ### Template Language Support
109
+
110
+ #### Chinese Templates (`zh-CN/`)
111
+
112
+ - Complete Chinese localization for all templates
113
+ - Chinese AI interaction patterns
114
+ - Chinese technical documentation standards
115
+ - Chinese workflow descriptions
116
+
117
+ #### English Templates (`en/`)
118
+
119
+ - Complete English localization for all templates
120
+ - English AI interaction patterns
121
+ - English technical documentation standards
122
+ - English workflow descriptions
123
+
124
+ ## Testing and Quality
125
+
126
+ ### Template Validation Strategy
127
+
128
+ - **Consistency Testing**: Verify Chinese-English template correspondence
129
+ - **Syntax Testing**: Validate markdown syntax and formatting
130
+ - **Content Testing**: Verify template completeness and accuracy
131
+ - **Integration Testing**: Test template installation and configuration
132
+
133
+ ### Quality Metrics
134
+
135
+ #### ✅ Template Completeness
136
+
137
+ - Chinese-English template parity: **100%**
138
+ - Workflow category coverage: **5/5 categories**
139
+ - Memory template coverage: **4/4 templates**
140
+ - Command template coverage: **Complete**
141
+
142
+ #### ✅ Language Support
143
+
144
+ - Chinese localization: **Complete**
145
+ - English localization: **Complete**
146
+ - Template structure consistency: **Validated**
147
+ - Content accuracy: **Verified**
148
+
149
+ #### ✅ Installation Testing
150
+
151
+ - Template copying mechanism: **Tested**
152
+ - Language selection logic: **Verified**
153
+ - Template merging: **Functional**
154
+ - Update mechanism: **Working**
155
+
156
+ ### Test Coverage
157
+
158
+ - **Template Tests**: `tests/templates/chinese-templates.test.ts`
159
+ - **Installation Tests**: Integration tests for template deployment
160
+ - **Validation Tests**: Template structure and content verification
161
+
162
+ ## FAQ
163
+
164
+ ### Q: How to add new workflow templates?
165
+
166
+ 1. Add template files in both `zh-CN/workflow/` and `en/workflow/`
167
+ 2. Update workflow configuration in `src/config/workflows.ts`
168
+ 3. Add corresponding translation keys in i18n files
169
+ 4. Test template installation and functionality
170
+
171
+ ### Q: How to modify AI memory templates?
172
+
173
+ 1. Update template files in both language directories
174
+ 2. Ensure consistency between Chinese and English versions
175
+ 3. Test AI behavior changes with modified templates
176
+ 4. Update documentation if needed
177
+
178
+ ### Q: How are templates installed during initialization?
179
+
180
+ Templates are copied from the package to `~/.claude/` directory based on user's language selection, with smart merging to preserve existing customizations.
181
+
182
+ ### Q: How to maintain template version compatibility?
183
+
184
+ - Use semantic versioning for major template changes
185
+ - Provide migration guides for breaking changes
186
+ - Maintain backward compatibility when possible
187
+ - Test template updates with existing configurations
188
+
189
+ ## Related File List
190
+
191
+ ### Common Configuration Templates
192
+
193
+ - `common/CLAUDE.md` - Base project guidance template
194
+ - `common/settings.json` - Claude configuration template
195
+
196
+ ### Chinese Templates (`zh-CN/`)
197
+
198
+ #### Memory Templates
199
+
200
+ - `memory/mcp.md` - MCP服务使用指南
201
+ - `memory/technical-guides.md` - 技术执行准则
202
+ - `memory/personality.md` - AI助手个性配置
203
+ - `memory/rules.md` - 核心编程原则
204
+
205
+ #### Workflow Templates
206
+
207
+ - `workflow/common/commands/init-project.md` - 项目初始化命令
208
+ - `workflow/common/agents/init-architect.md` - 初始化架构师
209
+ - `workflow/common/agents/get-current-datetime.md` - 时间工具
210
+ - `workflow/plan/commands/feat.md` - 功能开发命令
211
+ - `workflow/plan/agents/planner.md` - 规划师
212
+ - `workflow/plan/agents/ui-ux-designer.md` - UI/UX设计师
213
+ - `workflow/sixStep/commands/workflow.md` - 六步开发流程
214
+ - `workflow/bmad/commands/bmad-init.md` - BMad初始化
215
+ - `workflow/git/commands/` - Git操作命令集
216
+
217
+ ### English Templates (`en/`)
218
+
219
+ #### Memory Templates
220
+
221
+ - `memory/mcp.md` - MCP Services Usage Guide
222
+ - `memory/technical-guides.md` - Technical Execution Guidelines
223
+ - `memory/personality.md` - AI Assistant Personality Configuration
224
+ - `memory/rules.md` - Core Programming Principles
225
+
226
+ #### Workflow Templates
227
+
228
+ - `workflow/common/commands/init-project.md` - Project initialization command
229
+ - `workflow/common/agents/init-architect.md` - Initialization architect
230
+ - `workflow/common/agents/get-current-datetime.md` - DateTime utility
231
+ - `workflow/plan/commands/feat.md` - Feature development command
232
+ - `workflow/plan/agents/planner.md` - Planner agent
233
+ - `workflow/plan/agents/ui-ux-designer.md` - UI/UX designer
234
+ - `workflow/sixStep/commands/workflow.md` - Six-step development workflow
235
+ - `workflow/bmad/commands/bmad-init.md` - BMad initialization
236
+ - `workflow/git/commands/` - Git operation commands
237
+
238
+ ### Test Files
239
+
240
+ - `tests/templates/chinese-templates.test.ts` - Chinese template validation
241
+ - Template integration tests distributed across test suites
242
+
243
+ ## Changelog
244
+
245
+ ### 2025-08-20
246
+
247
+ - **Module Documentation Created**: Completed comprehensive documentation of templates module
248
+ - **Template Architecture Analysis**: Detailed analysis of bilingual template structure and workflow organization
249
+ - **Quality Assessment**: Verified complete Chinese-English template parity and coverage
250
+ - **Template Category Documentation**: Complete recording of 5 workflow categories and 4 memory templates
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
+ "env": {
4
+ "DISABLE_TELEMETRY": "1",
5
+ "DISABLE_ERROR_REPORTING": "1",
6
+ "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
7
+ "MCP_TIMEOUT": "60000"
8
+ },
9
+ "includeCoAuthoredBy": false,
10
+ "permissions": {
11
+ "allow": [
12
+ "Bash",
13
+ "Edit",
14
+ "Glob",
15
+ "Grep",
16
+ "KillShell",
17
+ "LS",
18
+ "LSP",
19
+ "MultiEdit",
20
+ "NotebookEdit",
21
+ "NotebookRead",
22
+ "Read",
23
+ "Skill",
24
+ "Task",
25
+ "TaskCreate",
26
+ "TaskGet",
27
+ "TaskList",
28
+ "TaskOutput",
29
+ "TaskStop",
30
+ "TaskUpdate",
31
+ "TodoWrite",
32
+ "ToolSearch",
33
+ "WebFetch",
34
+ "WebSearch",
35
+ "Write",
36
+ "mcp__ide",
37
+ "mcp__exa",
38
+ "mcp__context7",
39
+ "mcp__mcp-deepwiki",
40
+ "mcp__Playwright",
41
+ "mcp__spec-workflow",
42
+ "mcp__open-websearch",
43
+ "mcp__serena"
44
+ ],
45
+ "deny": []
46
+ },
47
+ "hooks": {}
48
+ }