zcf 2.10.2 → 2.11.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.
- package/README.md +29 -24
- package/bin/zcf.mjs +1 -1
- package/dist/chunks/simple-config.mjs +938 -897
- package/dist/cli.mjs +286 -256
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.mjs +3 -4
- package/package.json +20 -15
- package/templates/CLAUDE.md +249 -5
- package/templates/common/CLAUDE.md +5 -0
- package/templates/en/memory/mcp.md +4 -1
- package/templates/en/memory/personality.md +1 -1
- package/templates/en/memory/rules.md +1 -4
- package/templates/en/workflow/bmad/commands/bmad-init.md +58 -56
- package/templates/en/workflow/common/agents/get-current-datetime.md +29 -0
- package/templates/en/workflow/common/agents/init-architect.md +114 -0
- package/templates/en/workflow/common/commands/init-project.md +53 -0
- package/templates/en/workflow/git/commands/git-cleanBranches.md +2 -1
- package/templates/en/workflow/git/commands/git-commit.md +36 -31
- package/templates/en/workflow/git/commands/git-rollback.md +27 -26
- package/templates/en/workflow/git/commands/git-worktree.md +145 -221
- package/templates/zh-CN/memory/mcp.md +4 -1
- package/templates/zh-CN/memory/personality.md +1 -1
- package/templates/zh-CN/memory/rules.md +1 -4
- package/templates/zh-CN/workflow/bmad/commands/bmad-init.md +58 -55
- package/templates/zh-CN/workflow/common/agents/get-current-datetime.md +29 -0
- package/templates/zh-CN/workflow/common/agents/init-architect.md +114 -0
- package/templates/zh-CN/workflow/common/commands/init-project.md +53 -0
- package/templates/zh-CN/workflow/git/commands/git-cleanBranches.md +2 -1
- package/templates/zh-CN/workflow/git/commands/git-commit.md +0 -5
- package/templates/zh-CN/workflow/git/commands/git-rollback.md +1 -1
- package/templates/zh-CN/workflow/git/commands/git-worktree.md +145 -221
- /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;
|
|
@@ -97,12 +97,6 @@ interface InitOptions {
|
|
|
97
97
|
}
|
|
98
98
|
declare function init(options?: InitOptions): Promise<void>;
|
|
99
99
|
|
|
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
100
|
/**
|
|
107
101
|
* API configuration for Claude Code
|
|
108
102
|
*/
|
|
@@ -133,6 +127,9 @@ declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'opusplan' | 'def
|
|
|
133
127
|
declare function getExistingApiConfig(): ApiConfig | null;
|
|
134
128
|
declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
|
|
135
129
|
|
|
130
|
+
declare function isClaudeCodeInstalled(): Promise<boolean>;
|
|
131
|
+
declare function installClaudeCode(lang: SupportedLang): Promise<void>;
|
|
132
|
+
|
|
136
133
|
declare function getMcpConfigPath(): string;
|
|
137
134
|
declare function readMcpConfig(): ClaudeConfiguration | null;
|
|
138
135
|
declare function writeMcpConfig(config: ClaudeConfiguration): void;
|
|
@@ -142,10 +139,6 @@ declare function buildMcpServerConfig(baseConfig: McpServerConfig, apiKey?: stri
|
|
|
142
139
|
declare function fixWindowsMcpConfig(config: ClaudeConfiguration): ClaudeConfiguration;
|
|
143
140
|
declare function addCompletedOnboarding(): void;
|
|
144
141
|
|
|
145
|
-
declare function importRecommendedEnv(): Promise<void>;
|
|
146
|
-
declare function importRecommendedPermissions(): Promise<void>;
|
|
147
|
-
declare function openSettingsJson(): Promise<void>;
|
|
148
|
-
|
|
149
142
|
/**
|
|
150
143
|
* Clean up and deduplicate permissions array
|
|
151
144
|
* Removes invalid and redundant permissions based on template
|
|
@@ -166,5 +159,12 @@ declare function cleanupPermissions(templatePermissions: string[], userPermissio
|
|
|
166
159
|
*/
|
|
167
160
|
declare function mergeAndCleanPermissions(templatePermissions: string[] | undefined, userPermissions: string[] | undefined): string[];
|
|
168
161
|
|
|
162
|
+
declare function getPlatform(): "windows" | "macos" | "linux";
|
|
163
|
+
declare function commandExists(command: string): Promise<boolean>;
|
|
164
|
+
|
|
165
|
+
declare function importRecommendedEnv(): Promise<void>;
|
|
166
|
+
declare function importRecommendedPermissions(): Promise<void>;
|
|
167
|
+
declare function openSettingsJson(): Promise<void>;
|
|
168
|
+
|
|
169
169
|
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
170
|
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;
|
|
@@ -97,12 +97,6 @@ interface InitOptions {
|
|
|
97
97
|
}
|
|
98
98
|
declare function init(options?: InitOptions): Promise<void>;
|
|
99
99
|
|
|
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
100
|
/**
|
|
107
101
|
* API configuration for Claude Code
|
|
108
102
|
*/
|
|
@@ -133,6 +127,9 @@ declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'opusplan' | 'def
|
|
|
133
127
|
declare function getExistingApiConfig(): ApiConfig | null;
|
|
134
128
|
declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
|
|
135
129
|
|
|
130
|
+
declare function isClaudeCodeInstalled(): Promise<boolean>;
|
|
131
|
+
declare function installClaudeCode(lang: SupportedLang): Promise<void>;
|
|
132
|
+
|
|
136
133
|
declare function getMcpConfigPath(): string;
|
|
137
134
|
declare function readMcpConfig(): ClaudeConfiguration | null;
|
|
138
135
|
declare function writeMcpConfig(config: ClaudeConfiguration): void;
|
|
@@ -142,10 +139,6 @@ declare function buildMcpServerConfig(baseConfig: McpServerConfig, apiKey?: stri
|
|
|
142
139
|
declare function fixWindowsMcpConfig(config: ClaudeConfiguration): ClaudeConfiguration;
|
|
143
140
|
declare function addCompletedOnboarding(): void;
|
|
144
141
|
|
|
145
|
-
declare function importRecommendedEnv(): Promise<void>;
|
|
146
|
-
declare function importRecommendedPermissions(): Promise<void>;
|
|
147
|
-
declare function openSettingsJson(): Promise<void>;
|
|
148
|
-
|
|
149
142
|
/**
|
|
150
143
|
* Clean up and deduplicate permissions array
|
|
151
144
|
* Removes invalid and redundant permissions based on template
|
|
@@ -166,5 +159,12 @@ declare function cleanupPermissions(templatePermissions: string[], userPermissio
|
|
|
166
159
|
*/
|
|
167
160
|
declare function mergeAndCleanPermissions(templatePermissions: string[] | undefined, userPermissions: string[] | undefined): string[];
|
|
168
161
|
|
|
162
|
+
declare function getPlatform(): "windows" | "macos" | "linux";
|
|
163
|
+
declare function commandExists(command: string): Promise<boolean>;
|
|
164
|
+
|
|
165
|
+
declare function importRecommendedEnv(): Promise<void>;
|
|
166
|
+
declare function importRecommendedPermissions(): Promise<void>;
|
|
167
|
+
declare function openSettingsJson(): Promise<void>;
|
|
168
|
+
|
|
169
169
|
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
170
|
export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, McpServerConfig, McpService, SupportedLang };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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,
|
|
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';
|
|
5
6
|
import 'pathe';
|
|
6
7
|
import 'dayjs';
|
|
7
8
|
import 'node:child_process';
|
|
@@ -9,8 +10,6 @@ import 'node:os';
|
|
|
9
10
|
import 'node:path';
|
|
10
11
|
import 'node:util';
|
|
11
12
|
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.
|
|
4
|
+
"version": "2.11.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",
|
package/templates/CLAUDE.md
CHANGED
|
@@ -1,5 +1,249 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
## MCP Services Usage Guide
|
|
2
2
|
|
|
3
3
|
### Documentation & Code Queries
|
|
4
|
+
|
|
4
5
|
- **Context7**: Query latest library docs and code examples
|
|
5
6
|
- Use case: When learning new framework or library usage
|
|
6
7
|
- Examples: React Hooks, Vue Composition API queries
|
|
@@ -10,13 +11,15 @@
|
|
|
10
11
|
- Examples: Project architecture, contribution guides
|
|
11
12
|
|
|
12
13
|
### Information Search
|
|
14
|
+
|
|
13
15
|
- **Exa**: AI-powered web search
|
|
14
16
|
- Real-time search for latest tech news
|
|
15
17
|
- Extract complete content from specific URLs
|
|
16
18
|
- Return most relevant search results
|
|
17
19
|
|
|
18
20
|
### Browser Automation
|
|
21
|
+
|
|
19
22
|
- **Playwright**: Browser control
|
|
20
23
|
- Automate web operations and testing
|
|
21
24
|
- Screenshots and page analysis
|
|
22
|
-
- Form filling and interaction testing
|
|
25
|
+
- Form filling and interaction testing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
You are an experienced [professional domain, e.g., Software Development Engineer / System Designer / Code Architect], specializing in building [core strengths, e.g., high-performance / maintainable / robust / domain-driven] solutions.
|
|
1
|
+
You are an experienced [professional domain, e.g., Software Development Engineer / System Designer / Code Architect], specializing in building [core strengths, e.g., high-performance / maintainable / robust / domain-driven] solutions.
|
|
@@ -16,17 +16,14 @@ Throughout the entire workflow, you must internalize and strictly adhere to the
|
|
|
16
16
|
**Please strictly follow the workflow and output requirements below:**
|
|
17
17
|
|
|
18
18
|
1. **Deep Understanding and Initial Analysis (Understanding Phase):**
|
|
19
|
-
|
|
20
19
|
- Thoroughly review the provided [materials/code/project description], comprehensively understanding its current architecture, core components, business logic, and pain points.
|
|
21
20
|
- Based on this understanding, preliminarily identify potential applications or violations of **KISS, YAGNI, DRY, SOLID** principles within the project.
|
|
22
21
|
|
|
23
22
|
2. **Clear Objectives and Iterative Planning (Planning Phase):**
|
|
24
|
-
|
|
25
23
|
- Based on user requirements and understanding of the existing project, clearly define the specific task scope and measurable expected outcomes for this iteration.
|
|
26
24
|
- When planning solutions, prioritize how to achieve simpler, more efficient, and more scalable improvements through applying the above principles, rather than blindly adding features.
|
|
27
25
|
|
|
28
26
|
3. **Step-by-Step Implementation and Specific Improvements (Execution Phase):**
|
|
29
|
-
|
|
30
27
|
- Provide detailed explanations of your improvement proposals and break them down into logically clear, actionable steps.
|
|
31
28
|
- For each step, specifically explain how you will operate and how these operations embody **KISS, YAGNI, DRY, SOLID** principles. For example:
|
|
32
29
|
- "Split this module into smaller services to follow SRP and OCP."
|
|
@@ -42,4 +39,4 @@ Throughout the entire workflow, you must internalize and strictly adhere to the
|
|
|
42
39
|
- **Core tasks completed in this iteration** and their specific outcomes.
|
|
43
40
|
- **How you specifically applied** **KISS, YAGNI, DRY, SOLID** **principles in this iteration**, with brief explanations of the benefits they brought (e.g., reduced code volume, improved readability, enhanced extensibility).
|
|
44
41
|
- **Challenges encountered** and how they were overcome.
|
|
45
|
-
- **Clear plans and recommendations for next steps.**
|
|
42
|
+
- **Clear plans and recommendations for next steps.**
|