ccjk 13.6.4 → 13.6.7
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/dist/chunks/agents.mjs +1 -1
- package/dist/chunks/api-config-selector.mjs +6 -4
- package/dist/chunks/auto-updater.mjs +100 -2
- package/dist/chunks/banner.mjs +0 -16
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccr.mjs +6 -4
- package/dist/chunks/check-updates.mjs +28 -17
- package/dist/chunks/claude-code-config-manager.mjs +3 -1
- package/dist/chunks/claude-code-incremental-manager.mjs +46 -20
- package/dist/chunks/claude-config.mjs +52 -2
- package/dist/chunks/claude-wrapper.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +25 -83
- package/dist/chunks/codex-config-switch.mjs +3 -2
- package/dist/chunks/codex-provider-manager.mjs +1 -0
- package/dist/chunks/codex.mjs +3 -359
- package/dist/chunks/config-switch.mjs +23 -10
- package/dist/chunks/config.mjs +1 -1
- package/dist/chunks/config2.mjs +3 -3
- package/dist/chunks/constants.mjs +179 -3
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/features.mjs +76 -11
- package/dist/chunks/index10.mjs +55 -36
- package/dist/chunks/init.mjs +120 -61
- package/dist/chunks/installer.mjs +80 -19
- package/dist/chunks/mcp-cli.mjs +17 -16
- package/dist/chunks/mcp.mjs +8 -7
- package/dist/chunks/memory-check.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +5 -1
- package/dist/chunks/quick-setup.mjs +13 -11
- package/dist/chunks/research.mjs +1177 -0
- package/dist/chunks/sessions.mjs +1 -1
- package/dist/chunks/smart-defaults.mjs +42 -14
- package/dist/chunks/uninstall.mjs +2 -2
- package/dist/chunks/update.mjs +14 -13
- package/dist/chunks/version-checker.mjs +11 -1
- package/dist/cli.mjs +32 -0
- package/dist/i18n/locales/en/cli.json +0 -4
- package/dist/i18n/locales/en/menu.json +3 -3
- package/dist/i18n/locales/en/notification.json +2 -2
- package/dist/i18n/locales/zh-CN/cli.json +0 -4
- package/dist/i18n/locales/zh-CN/menu.json +3 -3
- package/dist/i18n/locales/zh-CN/notification.json +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -174
- package/dist/shared/{ccjk.DvAP4XfP.mjs → ccjk.B4aXNclK.mjs} +2 -2
- package/dist/shared/ccjk.BI-hdI7P.mjs +30 -0
- package/dist/shared/{ccjk.DwSebGy0.mjs → ccjk.BOO14f66.mjs} +1 -1
- package/dist/shared/ccjk.BnsY5WxD.mjs +171 -0
- package/dist/shared/{ccjk.C4m4ypdk.mjs → ccjk.DHaUdzX3.mjs} +4 -3
- package/dist/shared/ccjk.DKXs7Fbm.mjs +361 -0
- package/dist/shared/{ccjk.BP5hsTZQ.mjs → ccjk.Dz0ssUQx.mjs} +1 -1
- package/dist/shared/ccjk.yYQMbHH3.mjs +115 -0
- package/package.json +70 -65
- package/templates/common/workflow/essential/en/feat.md +68 -291
- package/templates/common/workflow/sixStep/en/workflow.md +56 -330
- package/dist/shared/ccjk.CiKtBUW_.mjs +0 -54
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { i as inquirer } from '../chunks/index6.mjs';
|
|
2
|
+
import { a as detectCodeToolType } from '../chunks/smart-defaults.mjs';
|
|
3
|
+
import { CODE_TOOL_ALIASES, DEFAULT_CODE_TOOL_TYPE, isCodeToolType } from '../chunks/constants.mjs';
|
|
4
|
+
import { i18n } from '../chunks/index2.mjs';
|
|
5
|
+
import { readZcfConfigAsync, updateZcfConfig } from '../chunks/ccjk-config.mjs';
|
|
6
|
+
|
|
7
|
+
const CODE_TYPE_ABBREVIATIONS = {
|
|
8
|
+
cc: "claude-code",
|
|
9
|
+
mc: "myclaude",
|
|
10
|
+
mycode: "myclaude",
|
|
11
|
+
cx: "codex"
|
|
12
|
+
};
|
|
13
|
+
const STARTUP_CODE_TOOL_CHOICES = ["myclaude", "claude-code", "codex"];
|
|
14
|
+
async function resolveCodeType(codeTypeParam) {
|
|
15
|
+
if (codeTypeParam) {
|
|
16
|
+
const normalizedParam = codeTypeParam.toLowerCase().trim();
|
|
17
|
+
if (normalizedParam in CODE_TYPE_ABBREVIATIONS) {
|
|
18
|
+
return CODE_TYPE_ABBREVIATIONS[normalizedParam];
|
|
19
|
+
}
|
|
20
|
+
if (normalizedParam in CODE_TOOL_ALIASES) {
|
|
21
|
+
return CODE_TOOL_ALIASES[normalizedParam];
|
|
22
|
+
}
|
|
23
|
+
if (isValidCodeType(normalizedParam)) {
|
|
24
|
+
return normalizedParam;
|
|
25
|
+
}
|
|
26
|
+
const validAbbreviations = Object.keys(CODE_TYPE_ABBREVIATIONS);
|
|
27
|
+
const validFullTypes = Object.values(CODE_TYPE_ABBREVIATIONS);
|
|
28
|
+
const validOptions = [...validAbbreviations, ...validFullTypes].join(", ");
|
|
29
|
+
let defaultValue = DEFAULT_CODE_TOOL_TYPE;
|
|
30
|
+
try {
|
|
31
|
+
const config = await readZcfConfigAsync();
|
|
32
|
+
if (config?.codeToolType && isValidCodeType(config.codeToolType)) {
|
|
33
|
+
defaultValue = config.codeToolType;
|
|
34
|
+
}
|
|
35
|
+
} catch {
|
|
36
|
+
}
|
|
37
|
+
throw new Error(
|
|
38
|
+
i18n.t("errors:invalidCodeType", { value: codeTypeParam, validOptions, defaultValue })
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
const storedType = await getStoredCodeType();
|
|
42
|
+
if (storedType) {
|
|
43
|
+
return storedType;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const freshDetected = detectCodeToolType();
|
|
47
|
+
if (isValidCodeType(freshDetected)) {
|
|
48
|
+
return freshDetected;
|
|
49
|
+
}
|
|
50
|
+
} catch {
|
|
51
|
+
}
|
|
52
|
+
return DEFAULT_CODE_TOOL_TYPE;
|
|
53
|
+
}
|
|
54
|
+
function isValidCodeType(value) {
|
|
55
|
+
return isCodeToolType(value);
|
|
56
|
+
}
|
|
57
|
+
async function getStoredCodeType() {
|
|
58
|
+
try {
|
|
59
|
+
const config = await readZcfConfigAsync();
|
|
60
|
+
if (config?.codeToolType && isValidCodeType(config.codeToolType)) {
|
|
61
|
+
return config.codeToolType;
|
|
62
|
+
}
|
|
63
|
+
} catch {
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function persistCodeType(codeToolType) {
|
|
68
|
+
updateZcfConfig({ codeToolType });
|
|
69
|
+
}
|
|
70
|
+
async function promptStartupCodeType() {
|
|
71
|
+
const isZh = i18n.language === "zh-CN";
|
|
72
|
+
const { codeToolType } = await inquirer.prompt({
|
|
73
|
+
type: "list",
|
|
74
|
+
name: "codeToolType",
|
|
75
|
+
message: isZh ? "\u9009\u62E9\u4EE3\u7801\u5DE5\u5177" : "Choose your code tool",
|
|
76
|
+
choices: STARTUP_CODE_TOOL_CHOICES.map((tool) => {
|
|
77
|
+
if (tool === "myclaude") {
|
|
78
|
+
return {
|
|
79
|
+
name: isZh ? `${tool} - Provider-first \u63A7\u5236\u4E2D\u5FC3\uFF08\u9ED8\u8BA4\u63A8\u8350\uFF09` : `${tool} - Provider-first control center (recommended default)`,
|
|
80
|
+
value: tool
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (tool === "claude-code") {
|
|
84
|
+
return {
|
|
85
|
+
name: isZh ? "Claude Code - Claude \u5BB6\u65CF\u7ECF\u5178\u63A7\u5236\u4E2D\u5FC3" : "Claude Code - Classic Claude-family control center",
|
|
86
|
+
value: tool
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
name: isZh ? "Codex - Codex \u4E13\u5C5E\u63A7\u5236\u4E2D\u5FC3\u3001Provider / MCP / Memory \u914D\u7F6E" : "Codex - Codex-specific control center for provider, MCP, and memory setup",
|
|
91
|
+
value: tool
|
|
92
|
+
};
|
|
93
|
+
}),
|
|
94
|
+
default: 0
|
|
95
|
+
});
|
|
96
|
+
persistCodeType(codeToolType);
|
|
97
|
+
return codeToolType;
|
|
98
|
+
}
|
|
99
|
+
async function resolveStartupCodeType(options = {}) {
|
|
100
|
+
if (options.codeTypeParam) {
|
|
101
|
+
const resolvedType = await resolveCodeType(options.codeTypeParam);
|
|
102
|
+
persistCodeType(resolvedType);
|
|
103
|
+
return resolvedType;
|
|
104
|
+
}
|
|
105
|
+
const storedType = await getStoredCodeType();
|
|
106
|
+
if (storedType) {
|
|
107
|
+
return storedType;
|
|
108
|
+
}
|
|
109
|
+
if (options.interactive) {
|
|
110
|
+
return await promptStartupCodeType();
|
|
111
|
+
}
|
|
112
|
+
return await resolveCodeType();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { STARTUP_CODE_TOOL_CHOICES as S, resolveStartupCodeType as a, resolveCodeType as r };
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "13.6.
|
|
4
|
+
"version": "13.6.7",
|
|
5
|
+
"packageManager": "pnpm@10.17.1",
|
|
5
6
|
"description": "Production-ready AI dev environment for Claude Code, Codex, and modern coding workflows with 30-second onboarding, persistent memory, Agent Teams, remote control, and capability discovery.",
|
|
6
7
|
"author": {
|
|
7
8
|
"name": "CCJK Team",
|
|
@@ -80,82 +81,22 @@
|
|
|
80
81
|
"engines": {
|
|
81
82
|
"node": ">=20"
|
|
82
83
|
},
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"better-sqlite3": "^12.6.2",
|
|
85
|
-
"fdir": "^6.5.0",
|
|
86
|
-
"globby": "^14.1.0",
|
|
87
|
-
"ioredis": "^5.9.3",
|
|
88
|
-
"node-cron": "^4.2.1",
|
|
89
|
-
"sql.js": "^1.14.0",
|
|
90
|
-
"tar": "^7.5.9",
|
|
91
|
-
"tinyglobby": "^0.2.15",
|
|
92
|
-
"web-tree-sitter": "^0.26.5"
|
|
93
|
-
},
|
|
94
|
-
"devDependencies": {
|
|
95
|
-
"@antfu/eslint-config": "^5.4.1",
|
|
96
|
-
"@anthropic-ai/sdk": "^0.52.0",
|
|
97
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
98
|
-
"@types/fs-extra": "^11.0.4",
|
|
99
|
-
"@types/inquirer": "^9.0.9",
|
|
100
|
-
"@types/node": "^22.18.6",
|
|
101
|
-
"@types/node-cron": "^3.0.11",
|
|
102
|
-
"@types/semver": "^7.7.1",
|
|
103
|
-
"@types/uuid": "^11.0.0",
|
|
104
|
-
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
105
|
-
"@typescript-eslint/parser": "^6.0.0",
|
|
106
|
-
"@vitest/coverage-v8": "^3.2.4",
|
|
107
|
-
"@vitest/ui": "^3.2.4",
|
|
108
|
-
"ansis": "^4.2.0",
|
|
109
|
-
"cac": "^6.7.14",
|
|
110
|
-
"chokidar": "^4.0.3",
|
|
111
|
-
"concurrently": "^9.2.1",
|
|
112
|
-
"consola": "^3.4.2",
|
|
113
|
-
"dayjs": "^1.11.19",
|
|
114
|
-
"eslint": "^9.36.0",
|
|
115
|
-
"eslint-plugin-format": "^1.4.0",
|
|
116
|
-
"find-up-simple": "^1.0.1",
|
|
117
|
-
"fs-extra": "^11.3.3",
|
|
118
|
-
"gray-matter": "^4.0.3",
|
|
119
|
-
"handlebars": "^4.7.8",
|
|
120
|
-
"husky": "^9.1.7",
|
|
121
|
-
"i18next": "^25.8.13",
|
|
122
|
-
"i18next-fs-backend": "^2.6.1",
|
|
123
|
-
"inquirer": "^12.9.6",
|
|
124
|
-
"inquirer-toggle": "^1.0.1",
|
|
125
|
-
"lint-staged": "^16.2.7",
|
|
126
|
-
"lowdb": "^7.0.1",
|
|
127
|
-
"nanoid": "^5.1.6",
|
|
128
|
-
"ofetch": "^1.5.1",
|
|
129
|
-
"ohash": "^1.1.4",
|
|
130
|
-
"ora": "^8.2.0",
|
|
131
|
-
"pathe": "^2.0.3",
|
|
132
|
-
"pkgroll": "^2.26.3",
|
|
133
|
-
"prettier": "^3.8.1",
|
|
134
|
-
"semver": "^7.7.4",
|
|
135
|
-
"shx": "^0.4.0",
|
|
136
|
-
"smol-toml": "^1.6.0",
|
|
137
|
-
"tinyexec": "^1.0.2",
|
|
138
|
-
"trash": "^10.1.0",
|
|
139
|
-
"tsx": "^4.21.0",
|
|
140
|
-
"tweetnacl": "^1.0.3",
|
|
141
|
-
"typescript": "^5.9.3",
|
|
142
|
-
"unbuild": "^3.6.1",
|
|
143
|
-
"uuid": "^11.1.0",
|
|
144
|
-
"vitest": "^3.2.4"
|
|
145
|
-
},
|
|
146
84
|
"scripts": {
|
|
147
85
|
"dev": "tsx ./src/cli.ts",
|
|
148
86
|
"build": "unbuild",
|
|
87
|
+
"build:release:deps": "pnpm --filter @ccjk/wire build && pnpm --filter @ccjk/evolution build",
|
|
149
88
|
"start": "node bin/ccjk.mjs",
|
|
150
89
|
"typecheck": "tsc --noEmit",
|
|
151
90
|
"release:verify": "node scripts/release-verify.mjs",
|
|
152
91
|
"release:verify:full": "node scripts/release-verify.mjs --with-tests",
|
|
92
|
+
"prepublishOnly": "node scripts/validate-prepublish.mjs && pnpm contract:check && pnpm build",
|
|
153
93
|
"lint": "eslint",
|
|
154
94
|
"lint:fix": "eslint --fix",
|
|
155
95
|
"test": "vitest",
|
|
156
96
|
"test:ui": "vitest --ui",
|
|
157
97
|
"test:coverage": "vitest run --coverage",
|
|
158
98
|
"test:run": "vitest run",
|
|
99
|
+
"test:release": "vitest run src/commands/menu/index.test.ts src/commands/menu/main-menu.test.ts src/utils/tool-update-scheduler.test.ts tests/commands/api-config-selector.test.ts tests/commands/init.silent.test.ts tests/commands/onboarding-wizard.test.ts tests/commands/research.test.ts tests/utils/banner.test.ts tests/utils/code-type-resolver.test.ts tests/utils/memory-feature.test.ts",
|
|
159
100
|
"test:watch": "vitest watch",
|
|
160
101
|
"test:e2e": "NODE_ENV=test vitest --config vitest.e2e.config.ts",
|
|
161
102
|
"test:e2e:run": "NODE_ENV=test vitest run --config vitest.e2e.config.ts",
|
|
@@ -171,6 +112,7 @@
|
|
|
171
112
|
"test:integration:run": "NODE_ENV=test vitest run --config vitest.integration.config.ts",
|
|
172
113
|
"test:integration:ui": "NODE_ENV=test vitest --config vitest.integration.config.ts --ui",
|
|
173
114
|
"test:integration:coverage": "NODE_ENV=test vitest run --config vitest.integration.config.ts --coverage",
|
|
115
|
+
"prepare": "husky",
|
|
174
116
|
"format": "prettier --write src/**/*.ts",
|
|
175
117
|
"prepublish:fix": "node scripts/fix-package-catalog.mjs",
|
|
176
118
|
"cleanup": "node scripts/cleanup.js",
|
|
@@ -205,5 +147,68 @@
|
|
|
205
147
|
"i18n:check": "tsx scripts/check-i18n.ts",
|
|
206
148
|
"i18n:report": "tsx scripts/check-i18n.ts --report",
|
|
207
149
|
"contract:check": "node scripts/check-remote-contract.mjs"
|
|
150
|
+
},
|
|
151
|
+
"dependencies": {
|
|
152
|
+
"better-sqlite3": "^12.6.2",
|
|
153
|
+
"fdir": "^6.5.0",
|
|
154
|
+
"globby": "^14.1.0",
|
|
155
|
+
"ioredis": "^5.9.3",
|
|
156
|
+
"node-cron": "^4.2.1",
|
|
157
|
+
"sql.js": "^1.14.0",
|
|
158
|
+
"tar": "^7.5.9",
|
|
159
|
+
"tinyglobby": "^0.2.15",
|
|
160
|
+
"web-tree-sitter": "^0.26.5"
|
|
161
|
+
},
|
|
162
|
+
"devDependencies": {
|
|
163
|
+
"@antfu/eslint-config": "^5.4.1",
|
|
164
|
+
"@anthropic-ai/sdk": "^0.52.0",
|
|
165
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
166
|
+
"@types/fs-extra": "^11.0.4",
|
|
167
|
+
"@types/inquirer": "^9.0.9",
|
|
168
|
+
"@types/node": "^22.18.6",
|
|
169
|
+
"@types/node-cron": "^3.0.11",
|
|
170
|
+
"@types/semver": "^7.7.1",
|
|
171
|
+
"@types/uuid": "^11.0.0",
|
|
172
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
173
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
174
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
175
|
+
"@vitest/ui": "^3.2.4",
|
|
176
|
+
"ansis": "^4.2.0",
|
|
177
|
+
"cac": "^6.7.14",
|
|
178
|
+
"chokidar": "^4.0.3",
|
|
179
|
+
"concurrently": "^9.2.1",
|
|
180
|
+
"consola": "^3.4.2",
|
|
181
|
+
"dayjs": "^1.11.19",
|
|
182
|
+
"eslint": "^9.36.0",
|
|
183
|
+
"eslint-plugin-format": "^1.4.0",
|
|
184
|
+
"find-up-simple": "^1.0.1",
|
|
185
|
+
"fs-extra": "^11.3.3",
|
|
186
|
+
"gray-matter": "^4.0.3",
|
|
187
|
+
"handlebars": "^4.7.8",
|
|
188
|
+
"husky": "^9.1.7",
|
|
189
|
+
"i18next": "^25.8.13",
|
|
190
|
+
"i18next-fs-backend": "^2.6.1",
|
|
191
|
+
"inquirer": "^12.9.6",
|
|
192
|
+
"inquirer-toggle": "^1.0.1",
|
|
193
|
+
"lint-staged": "^16.2.7",
|
|
194
|
+
"lowdb": "^7.0.1",
|
|
195
|
+
"nanoid": "^5.1.6",
|
|
196
|
+
"ofetch": "^1.5.1",
|
|
197
|
+
"ohash": "^1.1.4",
|
|
198
|
+
"ora": "^8.2.0",
|
|
199
|
+
"pathe": "^2.0.3",
|
|
200
|
+
"pkgroll": "^2.26.3",
|
|
201
|
+
"prettier": "^3.8.1",
|
|
202
|
+
"semver": "^7.7.4",
|
|
203
|
+
"shx": "^0.4.0",
|
|
204
|
+
"smol-toml": "^1.6.0",
|
|
205
|
+
"tinyexec": "^1.0.2",
|
|
206
|
+
"trash": "^10.1.0",
|
|
207
|
+
"tsx": "^4.21.0",
|
|
208
|
+
"tweetnacl": "^1.0.3",
|
|
209
|
+
"typescript": "^5.9.3",
|
|
210
|
+
"unbuild": "^3.6.1",
|
|
211
|
+
"uuid": "^11.1.0",
|
|
212
|
+
"vitest": "^3.2.4"
|
|
208
213
|
}
|
|
209
|
-
}
|
|
214
|
+
}
|
|
@@ -1,315 +1,92 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: '
|
|
3
|
-
argument-hint:
|
|
4
|
-
# examples:
|
|
5
|
-
# - /feat 用户登录功能 # 完整流程:规划 → 设计 → 实施
|
|
6
|
-
# - /feat 添加暗色模式 --plan # 仅生成规划文档
|
|
7
|
-
# - /feat 购物车功能 --design # 跳过规划,直接设计
|
|
8
|
-
# - /feat 修复表单验证 --quick # 快速模式,简化流程
|
|
9
|
-
# - /feat --execute # 继续执行已有规划
|
|
2
|
+
description: 'Feature planning workflow for clarifying scope, comparing solutions, and preparing implementation handoff'
|
|
3
|
+
argument-hint: <feature description>
|
|
10
4
|
---
|
|
11
5
|
|
|
12
|
-
#
|
|
6
|
+
# Feature Planning Workflow
|
|
13
7
|
|
|
14
|
-
|
|
8
|
+
Use this command when the user wants a structured planning pass before implementation.
|
|
15
9
|
|
|
16
|
-
##
|
|
10
|
+
## Scope
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
This workflow is for:
|
|
13
|
+
- clarifying the feature goal and boundaries
|
|
14
|
+
- identifying constraints and acceptance criteria
|
|
15
|
+
- comparing realistic implementation options
|
|
16
|
+
- capturing UI/UX considerations when they matter
|
|
17
|
+
- producing an implementation-ready breakdown
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
This workflow is not the broader implementation loop. If the user already knows what to build and wants staged execution, use the full workflow command instead.
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|------|------|
|
|
26
|
-
| `--plan` | 仅生成规划文档,不执行 |
|
|
27
|
-
| `--design` | 跳过规划,直接进入 UI 设计 |
|
|
28
|
-
| `--execute` | 继续执行已有规划 |
|
|
29
|
-
| `--quick` | 快速模式,简化流程 |
|
|
21
|
+
## Command context
|
|
30
22
|
|
|
31
|
-
|
|
23
|
+
- Workflow bundle: `essentialTools`
|
|
24
|
+
- Installed command file: `feat.md`
|
|
25
|
+
- Claude Code command: `/ccjk:feat <feature description>`
|
|
26
|
+
- Codex command: `/prompts:feat <feature description>`
|
|
27
|
+
- Supporting agents: `planner`, `ui-ux-designer`, `init-architect`, `get-current-datetime`
|
|
32
28
|
|
|
33
|
-
##
|
|
29
|
+
## User request
|
|
34
30
|
|
|
35
31
|
$ARGUMENTS
|
|
36
32
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## 智能工作流程
|
|
40
|
-
|
|
41
|
-
### 阶段 0:输入分析
|
|
42
|
-
|
|
43
|
-
每次收到输入时,首先进行**类型识别**并明确告知:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
📋 操作类型识别:[需求规划 | 讨论迭代 | 执行实施]
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**识别标准**:
|
|
50
|
-
|
|
51
|
-
| 类型 | 触发条件 | 示例输入 |
|
|
52
|
-
|------|----------|----------|
|
|
53
|
-
| 🆕 需求规划 | 新功能需求、项目构想 | "添加用户认证"、"实现购物车" |
|
|
54
|
-
| 🔄 讨论迭代 | 修改、完善已有规划 | "调整一下方案"、"继续讨论" |
|
|
55
|
-
| ⚡ 执行实施 | 确认开始实施 | "开始执行"、"按计划实施" |
|
|
56
|
-
|
|
57
|
-
---
|
|
33
|
+
## How to respond
|
|
58
34
|
|
|
59
|
-
|
|
35
|
+
1. Frame the request.
|
|
36
|
+
- Restate the core feature in one sentence.
|
|
37
|
+
- Identify the main user value.
|
|
38
|
+
- Note important constraints, assumptions, or unknowns.
|
|
60
39
|
|
|
61
|
-
|
|
40
|
+
2. Shape the solution space.
|
|
41
|
+
- Provide one or more viable implementation approaches.
|
|
42
|
+
- Highlight trade-offs clearly.
|
|
43
|
+
- Recommend one approach when there is a best default.
|
|
62
44
|
|
|
63
|
-
|
|
45
|
+
3. Add UI/UX considerations when relevant.
|
|
46
|
+
- Cover entry points, states, edge cases, and approval/review flows if applicable.
|
|
47
|
+
- Do not invent design detail that is not needed.
|
|
64
48
|
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
- 如果权限不足,提示用户修复并提供具体命令
|
|
49
|
+
4. Produce an implementation-ready plan.
|
|
50
|
+
- Break the work into concrete tasks.
|
|
51
|
+
- Include affected areas, validation needs, and sequencing.
|
|
52
|
+
- Keep the plan practical rather than aspirational.
|
|
70
53
|
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
Task tool 参数:
|
|
74
|
-
- subagent_type: "general-purpose"
|
|
75
|
-
- description: "功能规划分析"
|
|
76
|
-
- prompt: 读取 ~/.claude/agents/planner.md 的内容作为 system prompt,
|
|
77
|
-
然后分析用户的功能需求: $ARGUMENTS
|
|
78
|
-
```
|
|
54
|
+
## Output shape
|
|
79
55
|
|
|
80
|
-
|
|
81
|
-
3. **文档命名**: `功能名称.md`
|
|
82
|
-
|
|
83
|
-
**规划文档结构**:
|
|
56
|
+
Structure the response in this form:
|
|
84
57
|
|
|
85
58
|
```markdown
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
59
|
+
# Feature framing
|
|
60
|
+
- Goal
|
|
61
|
+
- User value
|
|
62
|
+
- Constraints / open questions
|
|
63
|
+
|
|
64
|
+
# Options
|
|
65
|
+
## Option A
|
|
66
|
+
- Summary
|
|
67
|
+
- Pros
|
|
68
|
+
- Cons
|
|
69
|
+
|
|
70
|
+
## Option B
|
|
71
|
+
- Summary
|
|
72
|
+
- Pros
|
|
73
|
+
- Cons
|
|
74
|
+
|
|
75
|
+
# Recommended approach
|
|
76
|
+
- Why this is the best fit
|
|
77
|
+
|
|
78
|
+
# UI/UX considerations
|
|
79
|
+
- Only include when relevant
|
|
80
|
+
|
|
81
|
+
# Implementation plan
|
|
82
|
+
1. Step one
|
|
83
|
+
2. Step two
|
|
84
|
+
3. Step three
|
|
112
85
|
```
|
|
113
86
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### 阶段 2:讨论迭代 🔄
|
|
117
|
-
|
|
118
|
-
**触发**: 用户要求修改或完善规划
|
|
119
|
-
|
|
120
|
-
**执行流程**:
|
|
121
|
-
|
|
122
|
-
1. **检索上次规划** 从 `.ccjk/plan/current/` 读取
|
|
123
|
-
2. **分析用户反馈** 识别修改点
|
|
124
|
-
3. **启动规划 Agent** - 使用 Task tool 重新规划:
|
|
125
|
-
```
|
|
126
|
-
Task tool 参数:
|
|
127
|
-
- subagent_type: "general-purpose"
|
|
128
|
-
- description: "规划迭代更新"
|
|
129
|
-
- prompt: 读取 ~/.claude/agents/planner.md 的内容作为 system prompt,
|
|
130
|
-
结合已有规划文档和用户反馈进行迭代优化
|
|
131
|
-
```
|
|
132
|
-
4. **版本管理**:
|
|
133
|
-
- 原文件: `功能名称.md`
|
|
134
|
-
- 迭代版本: `功能名称-v2.md`, `功能名称-v3.md`
|
|
135
|
-
|
|
136
|
-
**迭代记录**:
|
|
137
|
-
|
|
138
|
-
```markdown
|
|
139
|
-
## 📝 迭代历史
|
|
140
|
-
|
|
141
|
-
### v2 - [时间戳]
|
|
142
|
-
- 修改点 1
|
|
143
|
-
- 修改点 2
|
|
144
|
-
|
|
145
|
-
### v1 - [时间戳]
|
|
146
|
-
- 初始版本
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
### 阶段 3:执行实施 ⚡
|
|
152
|
-
|
|
153
|
-
**触发**: 用户确认规划完成
|
|
154
|
-
|
|
155
|
-
**执行流程**:
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
┌─────────────────────────────────────────────────────────┐
|
|
159
|
-
│ 📋 读取规划文档 │
|
|
160
|
-
│ ↓ │
|
|
161
|
-
│ 🔍 识别子任务类型 │
|
|
162
|
-
│ ↓ │
|
|
163
|
-
│ ┌─────────────┬─────────────┬─────────────┐ │
|
|
164
|
-
│ │ 前端任务 │ 后端任务 │ 其他任务 │ │
|
|
165
|
-
│ │ ↓ │ ↓ │ ↓ │ │
|
|
166
|
-
│ │ UI 设计检查 │ 直接实施 │ 直接实施 │ │
|
|
167
|
-
│ │ ↓ │ │ │ │
|
|
168
|
-
│ │ 无设计? │ │ │ │
|
|
169
|
-
│ │ ↓ │ │ │ │
|
|
170
|
-
│ │ UI-UX Agent │ │ │ │
|
|
171
|
-
│ └─────────────┴─────────────┴─────────────┘ │
|
|
172
|
-
│ ↓ │
|
|
173
|
-
│ ✅ 完成并更新状态 │
|
|
174
|
-
└─────────────────────────────────────────────────────────┘
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**前端任务特殊处理**:
|
|
178
|
-
|
|
179
|
-
1. **检查 UI 设计** - 是否存在设计稿
|
|
180
|
-
2. **无设计时** - 使用 Task tool 调用 UI-UX-Designer Agent:
|
|
181
|
-
```
|
|
182
|
-
Task tool 参数:
|
|
183
|
-
- subagent_type: "general-purpose"
|
|
184
|
-
- description: "UI/UX 设计"
|
|
185
|
-
- prompt: 读取 ~/.claude/agents/ui-ux-designer.md 的内容作为 system prompt,
|
|
186
|
-
为当前前端任务提供 UI/UX 设计规范
|
|
187
|
-
```
|
|
188
|
-
3. **设计完成后** - 再进行开发实施
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## 快捷指令
|
|
193
|
-
|
|
194
|
-
在功能开发过程中,可使用以下快捷指令:
|
|
195
|
-
|
|
196
|
-
| 指令 | 说明 |
|
|
197
|
-
|------|------|
|
|
198
|
-
| `!plan` | 查看当前规划文档 |
|
|
199
|
-
| `!status` | 查看任务完成状态 |
|
|
200
|
-
| `!next` | 执行下一个子任务 |
|
|
201
|
-
| `!pause` | 暂停执行,保存进度 |
|
|
202
|
-
| `!design` | 调用 UI-UX-Designer Agent (使用 Task tool) |
|
|
203
|
-
| `!test` | 为当前功能生成测试 |
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## 状态管理
|
|
208
|
-
|
|
209
|
-
### 任务状态追踪
|
|
210
|
-
|
|
211
|
-
```markdown
|
|
212
|
-
## 📊 执行状态
|
|
213
|
-
|
|
214
|
-
| 子任务 | 状态 | 进度 |
|
|
215
|
-
|--------|------|------|
|
|
216
|
-
| 数据模型设计 | ✅ 完成 | 100% |
|
|
217
|
-
| API 接口开发 | 🔄 进行中 | 60% |
|
|
218
|
-
| 前端页面实现 | ⏳ 待开始 | 0% |
|
|
219
|
-
| 单元测试编写 | ⏳ 待开始 | 0% |
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### 进度可视化
|
|
223
|
-
|
|
224
|
-
```
|
|
225
|
-
整体进度: [████████░░░░░░░░] 50%
|
|
226
|
-
|
|
227
|
-
✅ 已完成: 2/4 子任务
|
|
228
|
-
🔄 进行中: 1/4 子任务
|
|
229
|
-
⏳ 待开始: 1/4 子任务
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
## 质量保证
|
|
235
|
-
|
|
236
|
-
### 强制检查点
|
|
237
|
-
|
|
238
|
-
1. **规划阶段** - 必须包含验收标准
|
|
239
|
-
2. **设计阶段** - 前端任务必须有 UI 设计
|
|
240
|
-
3. **实施阶段** - 每个子任务完成后更新状态
|
|
241
|
-
4. **完成阶段** - 对照验收标准验证
|
|
242
|
-
|
|
243
|
-
### 代码质量要求
|
|
244
|
-
|
|
245
|
-
- 遵循项目现有代码风格
|
|
246
|
-
- 添加必要的类型定义
|
|
247
|
-
- 编写单元测试(覆盖率 > 80%)
|
|
248
|
-
- 更新相关文档
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## 输出规范
|
|
253
|
-
|
|
254
|
-
### 每次响应格式
|
|
255
|
-
|
|
256
|
-
```
|
|
257
|
-
📋 操作类型:[类型]
|
|
258
|
-
📍 当前阶段:[阶段]
|
|
259
|
-
📊 整体进度:[进度条]
|
|
260
|
-
|
|
261
|
-
---
|
|
262
|
-
|
|
263
|
-
[具体内容]
|
|
264
|
-
|
|
265
|
-
---
|
|
266
|
-
|
|
267
|
-
💡 下一步:[建议操作]
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
## Plan Mode 上下文同步 🧠
|
|
273
|
-
|
|
274
|
-
> **重要**: 当规划阶段完成时,自动触发上下文同步
|
|
275
|
-
|
|
276
|
-
### 规划完成时的操作
|
|
277
|
-
|
|
278
|
-
当用户确认规划完成(进入执行阶段)时,**必须执行以下步骤**:
|
|
279
|
-
|
|
280
|
-
1. **保存 Plan 文档**
|
|
281
|
-
- 将完整规划保存到 `.ccjk/plan/current/[功能名称].md`
|
|
282
|
-
- 同时备份到全局目录 `~/.ccjk/plans/`
|
|
283
|
-
|
|
284
|
-
2. **提取关键信息**
|
|
285
|
-
- 任务列表(用于后续追踪)
|
|
286
|
-
- 关键决策点(用于上下文恢复)
|
|
287
|
-
- 涉及文件列表(用于快速定位)
|
|
288
|
-
|
|
289
|
-
3. **上下文清理建议**
|
|
290
|
-
- 如果对话已超过 50 条消息,建议用户执行 `/compact`
|
|
291
|
-
- 提示:「规划已保存,建议清理上下文以获得更好的执行体验」
|
|
292
|
-
|
|
293
|
-
### 上下文恢复
|
|
294
|
-
|
|
295
|
-
当用户使用 `--execute` 或 `!plan` 时:
|
|
296
|
-
- 自动从 `.ccjk/plan/current/` 加载最新规划
|
|
297
|
-
- 恢复任务状态和进度
|
|
298
|
-
- 无需用户重复描述需求
|
|
299
|
-
|
|
300
|
-
### 智能提醒
|
|
301
|
-
|
|
302
|
-
```
|
|
303
|
-
💡 上下文管理提示:
|
|
304
|
-
- 规划阶段完成后,Plan 文档已自动保存
|
|
305
|
-
- 可随时使用 /compact 清理上下文
|
|
306
|
-
- 使用 /feat --execute 可恢复执行
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
---
|
|
310
|
-
|
|
311
|
-
## 开始执行
|
|
312
|
-
|
|
313
|
-
**功能需求**: $ARGUMENTS
|
|
87
|
+
## Behavioral guardrails
|
|
314
88
|
|
|
315
|
-
|
|
89
|
+
- Do not pretend this workflow is a hidden autonomous platform.
|
|
90
|
+
- Do not claim unsupported runtime capabilities.
|
|
91
|
+
- Prefer honest planning output over theatrical process.
|
|
92
|
+
- Keep the response focused on planning, not full implementation.
|