ccjk 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/simple-config.mjs +87 -19
- package/dist/i18n/locales/en/workflow.json +28 -9
- package/dist/i18n/locales/zh-CN/workflow.json +28 -9
- package/package.json +1 -1
- package/templates/claude-code/en/workflow/essential/commands/feat.md +196 -51
- package/templates/claude-code/zh-CN/workflow/essential/commands/feat.md +194 -51
- package/templates/common/workflow/sixStep/en/workflow.md +137 -31
- package/templates/common/workflow/sixStep/zh-CN/workflow.md +152 -10
|
@@ -20,7 +20,7 @@ import trash from 'trash';
|
|
|
20
20
|
import i18next from 'i18next';
|
|
21
21
|
import Backend from 'i18next-fs-backend';
|
|
22
22
|
|
|
23
|
-
const version = "1.
|
|
23
|
+
const version = "1.5.0";
|
|
24
24
|
const homepage = "https://github.com/miounet11/ccjk";
|
|
25
25
|
|
|
26
26
|
const i18n = i18next.createInstance();
|
|
@@ -292,7 +292,14 @@ const WORKFLOW_CONFIG_BASE = [
|
|
|
292
292
|
agents: [],
|
|
293
293
|
autoInstallAgents: false,
|
|
294
294
|
category: "interview",
|
|
295
|
-
|
|
295
|
+
displayCategory: "planning",
|
|
296
|
+
outputDir: "interview",
|
|
297
|
+
metadata: {
|
|
298
|
+
version: "1.0.0",
|
|
299
|
+
addedDate: "2025-01",
|
|
300
|
+
tags: ["recommended", "popular"],
|
|
301
|
+
difficulty: "beginner"
|
|
302
|
+
}
|
|
296
303
|
},
|
|
297
304
|
{
|
|
298
305
|
id: "essentialTools",
|
|
@@ -307,7 +314,14 @@ const WORKFLOW_CONFIG_BASE = [
|
|
|
307
314
|
],
|
|
308
315
|
autoInstallAgents: true,
|
|
309
316
|
category: "essential",
|
|
310
|
-
|
|
317
|
+
displayCategory: "planning",
|
|
318
|
+
outputDir: "essential",
|
|
319
|
+
metadata: {
|
|
320
|
+
version: "1.0.0",
|
|
321
|
+
addedDate: "2025-01",
|
|
322
|
+
tags: ["essential"],
|
|
323
|
+
difficulty: "beginner"
|
|
324
|
+
}
|
|
311
325
|
},
|
|
312
326
|
{
|
|
313
327
|
id: "gitWorkflow",
|
|
@@ -317,7 +331,14 @@ const WORKFLOW_CONFIG_BASE = [
|
|
|
317
331
|
agents: [],
|
|
318
332
|
autoInstallAgents: false,
|
|
319
333
|
category: "git",
|
|
320
|
-
|
|
334
|
+
displayCategory: "versionControl",
|
|
335
|
+
outputDir: "git",
|
|
336
|
+
metadata: {
|
|
337
|
+
version: "1.0.0",
|
|
338
|
+
addedDate: "2025-01",
|
|
339
|
+
tags: ["popular"],
|
|
340
|
+
difficulty: "beginner"
|
|
341
|
+
}
|
|
321
342
|
},
|
|
322
343
|
{
|
|
323
344
|
id: "sixStepsWorkflow",
|
|
@@ -327,7 +348,14 @@ const WORKFLOW_CONFIG_BASE = [
|
|
|
327
348
|
agents: [],
|
|
328
349
|
autoInstallAgents: false,
|
|
329
350
|
category: "sixStep",
|
|
330
|
-
|
|
351
|
+
displayCategory: "development",
|
|
352
|
+
outputDir: "workflow",
|
|
353
|
+
metadata: {
|
|
354
|
+
version: "1.0.0",
|
|
355
|
+
addedDate: "2025-01",
|
|
356
|
+
tags: ["professional"],
|
|
357
|
+
difficulty: "intermediate"
|
|
358
|
+
}
|
|
331
359
|
}
|
|
332
360
|
];
|
|
333
361
|
function getWorkflowConfigs() {
|
|
@@ -336,22 +364,26 @@ function getWorkflowConfigs() {
|
|
|
336
364
|
{
|
|
337
365
|
id: "interviewWorkflow",
|
|
338
366
|
name: i18n.t("workflow:workflowOption.interviewWorkflow"),
|
|
339
|
-
description: i18n.t("workflow:workflowDescription.interviewWorkflow")
|
|
367
|
+
description: i18n.t("workflow:workflowDescription.interviewWorkflow"),
|
|
368
|
+
stats: i18n.t("workflow:workflowStats.interviewWorkflow")
|
|
340
369
|
},
|
|
341
370
|
{
|
|
342
371
|
id: "essentialTools",
|
|
343
372
|
name: i18n.t("workflow:workflowOption.essentialTools"),
|
|
344
|
-
description: i18n.t("workflow:workflowDescription.essentialTools")
|
|
373
|
+
description: i18n.t("workflow:workflowDescription.essentialTools"),
|
|
374
|
+
stats: i18n.t("workflow:workflowStats.essentialTools")
|
|
345
375
|
},
|
|
346
376
|
{
|
|
347
377
|
id: "gitWorkflow",
|
|
348
378
|
name: i18n.t("workflow:workflowOption.gitWorkflow"),
|
|
349
|
-
description: i18n.t("workflow:workflowDescription.gitWorkflow")
|
|
379
|
+
description: i18n.t("workflow:workflowDescription.gitWorkflow"),
|
|
380
|
+
stats: i18n.t("workflow:workflowStats.gitWorkflow")
|
|
350
381
|
},
|
|
351
382
|
{
|
|
352
383
|
id: "sixStepsWorkflow",
|
|
353
384
|
name: i18n.t("workflow:workflowOption.sixStepsWorkflow"),
|
|
354
|
-
description: i18n.t("workflow:workflowDescription.sixStepsWorkflow")
|
|
385
|
+
description: i18n.t("workflow:workflowDescription.sixStepsWorkflow"),
|
|
386
|
+
stats: i18n.t("workflow:workflowStats.sixStepsWorkflow")
|
|
355
387
|
}
|
|
356
388
|
];
|
|
357
389
|
return WORKFLOW_CONFIG_BASE.map((baseConfig) => {
|
|
@@ -359,7 +391,8 @@ function getWorkflowConfigs() {
|
|
|
359
391
|
return {
|
|
360
392
|
...baseConfig,
|
|
361
393
|
name: translation?.name || baseConfig.id,
|
|
362
|
-
description: translation?.description
|
|
394
|
+
description: translation?.description,
|
|
395
|
+
stats: translation?.stats
|
|
363
396
|
};
|
|
364
397
|
});
|
|
365
398
|
}
|
|
@@ -369,6 +402,17 @@ function getWorkflowConfig(workflowId) {
|
|
|
369
402
|
function getOrderedWorkflows() {
|
|
370
403
|
return getWorkflowConfigs().sort((a, b) => a.order - b.order);
|
|
371
404
|
}
|
|
405
|
+
function getTagLabel(tag) {
|
|
406
|
+
ensureI18nInitialized();
|
|
407
|
+
const tagKeys = {
|
|
408
|
+
recommended: "workflow:tags.recommended",
|
|
409
|
+
popular: "workflow:tags.popular",
|
|
410
|
+
new: "workflow:tags.new",
|
|
411
|
+
essential: "workflow:tags.essential",
|
|
412
|
+
professional: "workflow:tags.professional"
|
|
413
|
+
};
|
|
414
|
+
return i18n.t(tagKeys[tag]);
|
|
415
|
+
}
|
|
372
416
|
|
|
373
417
|
const CLAUDE_DIR$1 = join(homedir(), ".claude");
|
|
374
418
|
const SETTINGS_FILE$1 = join(CLAUDE_DIR$1, "settings.json");
|
|
@@ -6570,25 +6614,49 @@ function getRootDir() {
|
|
|
6570
6614
|
}
|
|
6571
6615
|
const DEFAULT_CODE_TOOL_TEMPLATE = "claude-code";
|
|
6572
6616
|
const COMMON_TEMPLATE_CATEGORIES = ["git", "sixStep"];
|
|
6617
|
+
function formatTags(tags) {
|
|
6618
|
+
const tagColors = {
|
|
6619
|
+
recommended: (text) => ansis.bgGreen.black(` ${text} `),
|
|
6620
|
+
popular: (text) => ansis.bgYellow.black(` ${text} `),
|
|
6621
|
+
new: (text) => ansis.bgCyan.black(` ${text} `),
|
|
6622
|
+
essential: (text) => ansis.bgBlue.white(` ${text} `),
|
|
6623
|
+
professional: (text) => ansis.bgMagenta.white(` ${text} `)
|
|
6624
|
+
};
|
|
6625
|
+
return tags.map((tag) => tagColors[tag](getTagLabel(tag))).join(" ");
|
|
6626
|
+
}
|
|
6627
|
+
function buildWorkflowChoice(workflow) {
|
|
6628
|
+
const tags = formatTags(workflow.metadata.tags);
|
|
6629
|
+
const stats = workflow.stats ? ansis.dim(workflow.stats) : "";
|
|
6630
|
+
const description = workflow.description ? ansis.gray(workflow.description) : "";
|
|
6631
|
+
const nameLine = `${workflow.name} ${tags}`;
|
|
6632
|
+
const detailLine = stats ? ` ${stats}` : "";
|
|
6633
|
+
const descLine = description ? ` ${description}` : "";
|
|
6634
|
+
const displayName = [nameLine, detailLine, descLine].filter(Boolean).join("\n");
|
|
6635
|
+
return {
|
|
6636
|
+
name: displayName,
|
|
6637
|
+
value: workflow.id,
|
|
6638
|
+
checked: workflow.defaultSelected
|
|
6639
|
+
};
|
|
6640
|
+
}
|
|
6573
6641
|
async function selectAndInstallWorkflows(configLang, preselectedWorkflows) {
|
|
6574
6642
|
ensureI18nInitialized();
|
|
6575
6643
|
const workflows = getOrderedWorkflows();
|
|
6576
|
-
const choices = workflows.map((workflow) =>
|
|
6577
|
-
return {
|
|
6578
|
-
name: workflow.name,
|
|
6579
|
-
value: workflow.id,
|
|
6580
|
-
checked: workflow.defaultSelected
|
|
6581
|
-
};
|
|
6582
|
-
});
|
|
6644
|
+
const choices = workflows.map((workflow) => buildWorkflowChoice(workflow));
|
|
6583
6645
|
let selectedWorkflows;
|
|
6584
6646
|
if (preselectedWorkflows) {
|
|
6585
6647
|
selectedWorkflows = preselectedWorkflows;
|
|
6586
6648
|
} else {
|
|
6649
|
+
console.log("");
|
|
6650
|
+
console.log(ansis.bold.cyan("\u2501".repeat(60)));
|
|
6651
|
+
console.log(ansis.bold.white(` \u{1F680} ${i18n.t("workflow:selectWorkflowType")}`));
|
|
6652
|
+
console.log(ansis.bold.cyan("\u2501".repeat(60)));
|
|
6653
|
+
console.log("");
|
|
6587
6654
|
const response = await inquirer.prompt({
|
|
6588
6655
|
type: "checkbox",
|
|
6589
6656
|
name: "selectedWorkflows",
|
|
6590
|
-
message:
|
|
6591
|
-
choices
|
|
6657
|
+
message: i18n.t("common:multiSelectHint"),
|
|
6658
|
+
choices,
|
|
6659
|
+
pageSize: 15
|
|
6592
6660
|
});
|
|
6593
6661
|
selectedWorkflows = response.selectedWorkflows;
|
|
6594
6662
|
}
|
|
@@ -6,15 +6,34 @@
|
|
|
6
6
|
"installedCommand": "Installed command",
|
|
7
7
|
"installingWorkflow": "Installing workflow",
|
|
8
8
|
"removedOldFile": "Removed old file",
|
|
9
|
-
"selectWorkflowType": "Select
|
|
10
|
-
"workflowDescription.essentialTools": "Complete toolchain for project initialization, architecture analysis, feature planning and UX design with multiple intelligent agents",
|
|
11
|
-
"workflowDescription.gitWorkflow": "Git version control commands collection supporting conventional commits, rollback, branch cleanup and worktree management",
|
|
12
|
-
"workflowDescription.interviewWorkflow": "Surface hidden assumptions before coding with 40+ deep questions, generate complete specifications to ensure project direction",
|
|
13
|
-
"workflowDescription.sixStepsWorkflow": "Professional development assistant structured six-step workflow, suitable for projects requiring strict process control",
|
|
9
|
+
"selectWorkflowType": "Select workflows to install",
|
|
14
10
|
"workflowInstallError": "workflow installation had errors",
|
|
15
11
|
"workflowInstallSuccess": "workflow installed successfully",
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
12
|
+
|
|
13
|
+
"category.planning": "📋 Planning & Design",
|
|
14
|
+
"category.development": "⚡ Development",
|
|
15
|
+
"category.versionControl": "🔧 Version Control",
|
|
16
|
+
"category.quality": "✅ Quality Assurance",
|
|
17
|
+
|
|
18
|
+
"tags.recommended": "Recommended",
|
|
19
|
+
"tags.popular": "Popular",
|
|
20
|
+
"tags.new": "New",
|
|
21
|
+
"tags.essential": "Essential",
|
|
22
|
+
"tags.professional": "Pro",
|
|
23
|
+
|
|
24
|
+
"workflowOption.interviewWorkflow": "🌟 Interview-Driven Dev",
|
|
25
|
+
"workflowStats.interviewWorkflow": "12.5K+ users | Requirements accuracy ↑85%",
|
|
26
|
+
"workflowDescription.interviewWorkflow": "40+ deep questions to surface hidden assumptions, generate complete specs",
|
|
27
|
+
|
|
28
|
+
"workflowOption.essentialTools": "🎯 Feature Planning Suite",
|
|
29
|
+
"workflowStats.essentialTools": "8.2K+ users | Dev efficiency ↑40%",
|
|
30
|
+
"workflowDescription.essentialTools": "Project init + Smart planning + UI/UX design all-in-one toolchain",
|
|
31
|
+
|
|
32
|
+
"workflowOption.gitWorkflow": "📦 Git Smart Workflow",
|
|
33
|
+
"workflowStats.gitWorkflow": "15.3K+ users | Commit compliance 100%",
|
|
34
|
+
"workflowDescription.gitWorkflow": "Smart commit + Safe rollback + Branch cleanup + Worktree management",
|
|
35
|
+
|
|
36
|
+
"workflowOption.sixStepsWorkflow": "📝 Six-Step Structured Dev",
|
|
37
|
+
"workflowStats.sixStepsWorkflow": "5.8K+ users | Code quality ↑35%",
|
|
38
|
+
"workflowDescription.sixStepsWorkflow": "Research→Ideate→Plan→Execute→Optimize→Review complete dev cycle"
|
|
20
39
|
}
|
|
@@ -6,15 +6,34 @@
|
|
|
6
6
|
"installedCommand": "已安装命令",
|
|
7
7
|
"installingWorkflow": "正在安装工作流",
|
|
8
8
|
"removedOldFile": "已删除旧文件",
|
|
9
|
-
"selectWorkflowType": "
|
|
10
|
-
"workflowDescription.essentialTools": "提供项目初始化、架构分析、功能规划和UX设计的完整工具链,包含多个智能代理",
|
|
11
|
-
"workflowDescription.gitWorkflow": "Git 版本控制命令集合,支持规范化提交、回滚、分支清理和工作树管理",
|
|
12
|
-
"workflowDescription.interviewWorkflow": "通过40+深度问题在编码前发现隐藏假设,生成完整规格说明书,确保项目方向正确",
|
|
13
|
-
"workflowDescription.sixStepsWorkflow": "专业开发助手的结构化六步工作流程,适合需要严格流程控制的项目",
|
|
9
|
+
"selectWorkflowType": "选择要安装的工作流",
|
|
14
10
|
"workflowInstallError": "工作流安装出错",
|
|
15
11
|
"workflowInstallSuccess": "工作流安装成功",
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
12
|
+
|
|
13
|
+
"category.planning": "📋 规划与设计",
|
|
14
|
+
"category.development": "⚡ 开发与编码",
|
|
15
|
+
"category.versionControl": "🔧 版本控制",
|
|
16
|
+
"category.quality": "✅ 质量保证",
|
|
17
|
+
|
|
18
|
+
"tags.recommended": "推荐",
|
|
19
|
+
"tags.popular": "热门",
|
|
20
|
+
"tags.new": "新",
|
|
21
|
+
"tags.essential": "必备",
|
|
22
|
+
"tags.professional": "专业",
|
|
23
|
+
|
|
24
|
+
"workflowOption.interviewWorkflow": "🌟 访谈驱动开发",
|
|
25
|
+
"workflowStats.interviewWorkflow": "12.5K+ 用户 | 需求准确率 ↑85%",
|
|
26
|
+
"workflowDescription.interviewWorkflow": "40+ 深度问题发现隐藏假设,生成完整规格说明书",
|
|
27
|
+
|
|
28
|
+
"workflowOption.essentialTools": "🎯 功能规划套件",
|
|
29
|
+
"workflowStats.essentialTools": "8.2K+ 用户 | 开发效率 ↑40%",
|
|
30
|
+
"workflowDescription.essentialTools": "项目初始化 + 智能规划 + UI/UX 设计一站式工具链",
|
|
31
|
+
|
|
32
|
+
"workflowOption.gitWorkflow": "📦 Git 智能工作流",
|
|
33
|
+
"workflowStats.gitWorkflow": "15.3K+ 用户 | 提交规范率 100%",
|
|
34
|
+
"workflowDescription.gitWorkflow": "智能提交 + 安全回滚 + 分支清理 + 工作树管理",
|
|
35
|
+
|
|
36
|
+
"workflowOption.sixStepsWorkflow": "📝 六步结构化开发",
|
|
37
|
+
"workflowStats.sixStepsWorkflow": "5.8K+ 用户 | 代码质量 ↑35%",
|
|
38
|
+
"workflowDescription.sixStepsWorkflow": "研究→构思→计划→执行→优化→评审 完整开发闭环"
|
|
20
39
|
}
|
package/package.json
CHANGED
|
@@ -1,105 +1,250 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 'Feature Development Command - Intelligent Planning, Design, and Implementation Workflow'
|
|
3
|
+
argument-hint: <feature description> [--plan] [--design] [--execute] [--quick]
|
|
4
|
+
# examples:
|
|
5
|
+
# - /feat user login feature # Full flow: Plan → Design → Implement
|
|
6
|
+
# - /feat add dark mode --plan # Generate planning doc only
|
|
7
|
+
# - /feat shopping cart --design # Skip planning, go to design
|
|
8
|
+
# - /feat fix form validation --quick # Quick mode, simplified flow
|
|
9
|
+
# - /feat --execute # Continue executing existing plan
|
|
3
10
|
---
|
|
4
11
|
|
|
12
|
+
# Feature Development Command
|
|
13
|
+
|
|
14
|
+
> **Core Philosophy**: Plan First, Design-Driven, Quality Priority
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
/feat <feature description> [options]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Options
|
|
23
|
+
|
|
24
|
+
| Option | Description |
|
|
25
|
+
|--------|-------------|
|
|
26
|
+
| `--plan` | Generate planning document only, don't execute |
|
|
27
|
+
| `--design` | Skip planning, go directly to UI design |
|
|
28
|
+
| `--execute` | Continue executing existing plan |
|
|
29
|
+
| `--quick` | Quick mode, simplified workflow |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Feature Description
|
|
34
|
+
|
|
5
35
|
$ARGUMENTS
|
|
6
36
|
|
|
7
|
-
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Intelligent Workflow
|
|
40
|
+
|
|
41
|
+
### Phase 0: Input Analysis
|
|
42
|
+
|
|
43
|
+
For each input, first perform **type identification** and clearly communicate:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
📋 Operation Type: [Requirement Planning | Discussion Iteration | Execution Implementation]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Identification Criteria**:
|
|
8
50
|
|
|
9
|
-
|
|
51
|
+
| Type | Trigger Condition | Example Input |
|
|
52
|
+
|------|-------------------|---------------|
|
|
53
|
+
| 🆕 Requirement Planning | New feature request, project idea | "Add user auth", "Implement cart" |
|
|
54
|
+
| 🔄 Discussion Iteration | Modify, refine existing plan | "Adjust the approach", "Continue discussion" |
|
|
55
|
+
| ⚡ Execution Implementation | Confirm to start implementation | "Start executing", "Implement as planned" |
|
|
10
56
|
|
|
11
|
-
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### Phase 1: Requirement Planning 🆕
|
|
12
60
|
|
|
13
|
-
**
|
|
61
|
+
**Trigger**: Identified as new feature requirement
|
|
14
62
|
|
|
15
|
-
|
|
63
|
+
**Execution Flow**:
|
|
16
64
|
|
|
17
|
-
|
|
65
|
+
1. **Enable Planner Agent** for deep analysis
|
|
66
|
+
2. **Generate planning document** stored in `.ccjk/plan/current/`
|
|
67
|
+
3. **Document naming**: `feature-name.md`
|
|
18
68
|
|
|
19
|
-
|
|
69
|
+
**Planning Document Structure**:
|
|
20
70
|
|
|
21
|
-
|
|
71
|
+
```markdown
|
|
72
|
+
# Feature Plan: [Feature Name]
|
|
22
73
|
|
|
23
|
-
|
|
74
|
+
## 📋 Overview
|
|
75
|
+
- Feature objective
|
|
76
|
+
- Expected value
|
|
77
|
+
- Impact scope
|
|
24
78
|
|
|
25
|
-
|
|
79
|
+
## 🎯 Feature Breakdown
|
|
80
|
+
- [ ] Sub-feature 1
|
|
81
|
+
- [ ] Sub-feature 2
|
|
82
|
+
- [ ] Sub-feature 3
|
|
26
83
|
|
|
27
|
-
|
|
84
|
+
## 📐 Technical Approach
|
|
85
|
+
- Architecture design
|
|
86
|
+
- Data model
|
|
87
|
+
- API design
|
|
28
88
|
|
|
29
|
-
|
|
89
|
+
## ✅ Acceptance Criteria
|
|
90
|
+
- Functional acceptance points
|
|
91
|
+
- Performance metrics
|
|
92
|
+
- Test coverage
|
|
30
93
|
|
|
31
|
-
|
|
94
|
+
## ⏱️ Implementation Plan
|
|
95
|
+
- Phase breakdown
|
|
96
|
+
- Time estimation
|
|
97
|
+
- Dependencies
|
|
98
|
+
```
|
|
32
99
|
|
|
33
|
-
|
|
100
|
+
---
|
|
34
101
|
|
|
35
|
-
|
|
102
|
+
### Phase 2: Discussion Iteration 🔄
|
|
36
103
|
|
|
37
|
-
|
|
104
|
+
**Trigger**: User requests to modify or refine plan
|
|
38
105
|
|
|
39
|
-
**
|
|
106
|
+
**Execution Flow**:
|
|
40
107
|
|
|
41
|
-
**
|
|
108
|
+
1. **Retrieve previous plan** from `.ccjk/plan/current/`
|
|
109
|
+
2. **Analyze user feedback** identify modification points
|
|
110
|
+
3. **Enable Planner Agent** for re-planning
|
|
111
|
+
4. **Version management**:
|
|
112
|
+
- Original file: `feature-name.md`
|
|
113
|
+
- Iteration versions: `feature-name-v2.md`, `feature-name-v3.md`
|
|
42
114
|
|
|
43
|
-
|
|
115
|
+
**Iteration Record**:
|
|
44
116
|
|
|
45
|
-
|
|
117
|
+
```markdown
|
|
118
|
+
## 📝 Iteration History
|
|
46
119
|
|
|
47
|
-
|
|
120
|
+
### v2 - [timestamp]
|
|
121
|
+
- Modification 1
|
|
122
|
+
- Modification 2
|
|
48
123
|
|
|
49
|
-
|
|
124
|
+
### v1 - [timestamp]
|
|
125
|
+
- Initial version
|
|
126
|
+
```
|
|
50
127
|
|
|
51
|
-
|
|
128
|
+
---
|
|
52
129
|
|
|
53
|
-
|
|
130
|
+
### Phase 3: Execution Implementation ⚡
|
|
131
|
+
|
|
132
|
+
**Trigger**: User confirms plan is complete
|
|
133
|
+
|
|
134
|
+
**Execution Flow**:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
┌─────────────────────────────────────────────────────────┐
|
|
138
|
+
│ 📋 Read Planning Document │
|
|
139
|
+
│ ↓ │
|
|
140
|
+
│ 🔍 Identify Subtask Types │
|
|
141
|
+
│ ↓ │
|
|
142
|
+
│ ┌─────────────┬─────────────┬─────────────┐ │
|
|
143
|
+
│ │ Frontend │ Backend │ Other │ │
|
|
144
|
+
│ │ Tasks │ Tasks │ Tasks │ │
|
|
145
|
+
│ │ ↓ │ ↓ │ ↓ │ │
|
|
146
|
+
│ │ UI Design │ Direct │ Direct │ │
|
|
147
|
+
│ │ Check │ Implement │ Implement │ │
|
|
148
|
+
│ │ ↓ │ │ │ │
|
|
149
|
+
│ │ No Design? │ │ │ │
|
|
150
|
+
│ │ ↓ │ │ │ │
|
|
151
|
+
│ │ UI-UX Agent │ │ │ │
|
|
152
|
+
│ └─────────────┴─────────────┴─────────────┘ │
|
|
153
|
+
│ ↓ │
|
|
154
|
+
│ ✅ Complete and Update Status │
|
|
155
|
+
└─────────────────────────────────────────────────────────┘
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Frontend Task Special Handling**:
|
|
159
|
+
|
|
160
|
+
1. **Check UI Design** - Does design exist?
|
|
161
|
+
2. **No Design** - Must invoke `UI-UX-Designer Agent`
|
|
162
|
+
3. **After Design** - Proceed with development
|
|
54
163
|
|
|
55
|
-
|
|
164
|
+
---
|
|
56
165
|
|
|
57
|
-
|
|
166
|
+
## Quick Commands
|
|
58
167
|
|
|
59
|
-
|
|
168
|
+
During feature development, use these shortcuts:
|
|
60
169
|
|
|
61
|
-
|
|
170
|
+
| Command | Description |
|
|
171
|
+
|---------|-------------|
|
|
172
|
+
| `!plan` | View current planning document |
|
|
173
|
+
| `!status` | View task completion status |
|
|
174
|
+
| `!next` | Execute next subtask |
|
|
175
|
+
| `!pause` | Pause execution, save progress |
|
|
176
|
+
| `!design` | Invoke UI-UX-Designer |
|
|
177
|
+
| `!test` | Generate tests for current feature |
|
|
62
178
|
|
|
63
|
-
|
|
179
|
+
---
|
|
64
180
|
|
|
65
|
-
|
|
181
|
+
## State Management
|
|
66
182
|
|
|
67
|
-
|
|
183
|
+
### Task Status Tracking
|
|
68
184
|
|
|
69
|
-
|
|
185
|
+
```markdown
|
|
186
|
+
## 📊 Execution Status
|
|
70
187
|
|
|
71
|
-
|
|
188
|
+
| Subtask | Status | Progress |
|
|
189
|
+
|---------|--------|----------|
|
|
190
|
+
| Data model design | ✅ Complete | 100% |
|
|
191
|
+
| API development | 🔄 In Progress | 60% |
|
|
192
|
+
| Frontend implementation | ⏳ Pending | 0% |
|
|
193
|
+
| Unit test writing | ⏳ Pending | 0% |
|
|
194
|
+
```
|
|
72
195
|
|
|
73
|
-
###
|
|
196
|
+
### Progress Visualization
|
|
74
197
|
|
|
75
|
-
|
|
198
|
+
```
|
|
199
|
+
Overall Progress: [████████░░░░░░░░] 50%
|
|
76
200
|
|
|
77
|
-
|
|
201
|
+
✅ Completed: 2/4 subtasks
|
|
202
|
+
🔄 In Progress: 1/4 subtasks
|
|
203
|
+
⏳ Pending: 1/4 subtasks
|
|
204
|
+
```
|
|
78
205
|
|
|
79
|
-
|
|
206
|
+
---
|
|
80
207
|
|
|
81
|
-
|
|
208
|
+
## Quality Assurance
|
|
82
209
|
|
|
83
|
-
|
|
210
|
+
### Mandatory Checkpoints
|
|
84
211
|
|
|
85
|
-
|
|
212
|
+
1. **Planning Phase** - Must include acceptance criteria
|
|
213
|
+
2. **Design Phase** - Frontend tasks must have UI design
|
|
214
|
+
3. **Implementation Phase** - Update status after each subtask
|
|
215
|
+
4. **Completion Phase** - Verify against acceptance criteria
|
|
86
216
|
|
|
87
|
-
|
|
217
|
+
### Code Quality Requirements
|
|
88
218
|
|
|
89
|
-
|
|
219
|
+
- Follow existing project code style
|
|
220
|
+
- Add necessary type definitions
|
|
221
|
+
- Write unit tests (coverage > 80%)
|
|
222
|
+
- Update relevant documentation
|
|
90
223
|
|
|
91
|
-
|
|
224
|
+
---
|
|
92
225
|
|
|
93
|
-
|
|
226
|
+
## Output Format
|
|
94
227
|
|
|
95
|
-
|
|
228
|
+
### Response Structure
|
|
96
229
|
|
|
97
|
-
|
|
230
|
+
```
|
|
231
|
+
📋 Operation Type: [Type]
|
|
232
|
+
📍 Current Phase: [Phase]
|
|
233
|
+
📊 Overall Progress: [Progress Bar]
|
|
98
234
|
|
|
99
|
-
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
[Specific Content]
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
💡 Next Step: [Suggested Action]
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
100
245
|
|
|
101
|
-
|
|
246
|
+
## Start Execution
|
|
102
247
|
|
|
103
|
-
|
|
248
|
+
**Feature Request**: $ARGUMENTS
|
|
104
249
|
|
|
105
|
-
|
|
250
|
+
Analyzing input type and initiating appropriate workflow...
|
|
@@ -1,105 +1,248 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: '
|
|
2
|
+
description: '功能开发命令 - 智能规划、设计、实施一体化工作流'
|
|
3
|
+
argument-hint: <功能描述> [--plan] [--design] [--execute] [--quick]
|
|
4
|
+
# examples:
|
|
5
|
+
# - /feat 用户登录功能 # 完整流程:规划 → 设计 → 实施
|
|
6
|
+
# - /feat 添加暗色模式 --plan # 仅生成规划文档
|
|
7
|
+
# - /feat 购物车功能 --design # 跳过规划,直接设计
|
|
8
|
+
# - /feat 修复表单验证 --quick # 快速模式,简化流程
|
|
9
|
+
# - /feat --execute # 继续执行已有规划
|
|
3
10
|
---
|
|
4
11
|
|
|
12
|
+
# 功能开发命令
|
|
13
|
+
|
|
14
|
+
> **核心理念**: 规划先行,设计驱动,质量优先
|
|
15
|
+
|
|
16
|
+
## 使用方法
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
/feat <功能描述> [选项]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 选项说明
|
|
23
|
+
|
|
24
|
+
| 选项 | 说明 |
|
|
25
|
+
|------|------|
|
|
26
|
+
| `--plan` | 仅生成规划文档,不执行 |
|
|
27
|
+
| `--design` | 跳过规划,直接进入 UI 设计 |
|
|
28
|
+
| `--execute` | 继续执行已有规划 |
|
|
29
|
+
| `--quick` | 快速模式,简化流程 |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 功能描述
|
|
34
|
+
|
|
5
35
|
$ARGUMENTS
|
|
6
36
|
|
|
7
|
-
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 智能工作流程
|
|
40
|
+
|
|
41
|
+
### 阶段 0:输入分析
|
|
42
|
+
|
|
43
|
+
每次收到输入时,首先进行**类型识别**并明确告知:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
📋 操作类型识别:[需求规划 | 讨论迭代 | 执行实施]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**识别标准**:
|
|
8
50
|
|
|
9
|
-
|
|
51
|
+
| 类型 | 触发条件 | 示例输入 |
|
|
52
|
+
|------|----------|----------|
|
|
53
|
+
| 🆕 需求规划 | 新功能需求、项目构想 | "添加用户认证"、"实现购物车" |
|
|
54
|
+
| 🔄 讨论迭代 | 修改、完善已有规划 | "调整一下方案"、"继续讨论" |
|
|
55
|
+
| ⚡ 执行实施 | 确认开始实施 | "开始执行"、"按计划实施" |
|
|
10
56
|
|
|
11
|
-
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### 阶段 1:需求规划 🆕
|
|
12
60
|
|
|
13
|
-
|
|
61
|
+
**触发**: 识别为新功能需求
|
|
14
62
|
|
|
15
|
-
|
|
63
|
+
**执行流程**:
|
|
16
64
|
|
|
17
|
-
|
|
65
|
+
1. **启用 Planner Agent** 进行深度分析
|
|
66
|
+
2. **生成规划文档** 存储至 `.ccjk/plan/current/`
|
|
67
|
+
3. **文档命名**: `功能名称.md`
|
|
18
68
|
|
|
19
|
-
|
|
69
|
+
**规划文档结构**:
|
|
20
70
|
|
|
21
|
-
|
|
71
|
+
```markdown
|
|
72
|
+
# 功能规划:[功能名称]
|
|
22
73
|
|
|
23
|
-
|
|
74
|
+
## 📋 概述
|
|
75
|
+
- 功能目标
|
|
76
|
+
- 预期价值
|
|
77
|
+
- 影响范围
|
|
24
78
|
|
|
25
|
-
|
|
79
|
+
## 🎯 功能分解
|
|
80
|
+
- [ ] 子功能 1
|
|
81
|
+
- [ ] 子功能 2
|
|
82
|
+
- [ ] 子功能 3
|
|
26
83
|
|
|
27
|
-
|
|
84
|
+
## 📐 技术方案
|
|
85
|
+
- 架构设计
|
|
86
|
+
- 数据模型
|
|
87
|
+
- API 设计
|
|
28
88
|
|
|
29
|
-
|
|
89
|
+
## ✅ 验收标准
|
|
90
|
+
- 功能验收点
|
|
91
|
+
- 性能指标
|
|
92
|
+
- 测试覆盖
|
|
30
93
|
|
|
31
|
-
|
|
94
|
+
## ⏱️ 实施计划
|
|
95
|
+
- 阶段划分
|
|
96
|
+
- 时间估算
|
|
97
|
+
- 依赖关系
|
|
98
|
+
```
|
|
32
99
|
|
|
33
|
-
|
|
100
|
+
---
|
|
34
101
|
|
|
35
|
-
|
|
102
|
+
### 阶段 2:讨论迭代 🔄
|
|
36
103
|
|
|
37
|
-
|
|
104
|
+
**触发**: 用户要求修改或完善规划
|
|
38
105
|
|
|
39
|
-
|
|
106
|
+
**执行流程**:
|
|
40
107
|
|
|
41
|
-
|
|
108
|
+
1. **检索上次规划** 从 `.ccjk/plan/current/` 读取
|
|
109
|
+
2. **分析用户反馈** 识别修改点
|
|
110
|
+
3. **启用 Planner Agent** 重新规划
|
|
111
|
+
4. **版本管理**:
|
|
112
|
+
- 原文件: `功能名称.md`
|
|
113
|
+
- 迭代版本: `功能名称-v2.md`, `功能名称-v3.md`
|
|
42
114
|
|
|
43
|
-
|
|
115
|
+
**迭代记录**:
|
|
44
116
|
|
|
45
|
-
|
|
117
|
+
```markdown
|
|
118
|
+
## 📝 迭代历史
|
|
46
119
|
|
|
47
|
-
|
|
120
|
+
### v2 - [时间戳]
|
|
121
|
+
- 修改点 1
|
|
122
|
+
- 修改点 2
|
|
48
123
|
|
|
49
|
-
|
|
124
|
+
### v1 - [时间戳]
|
|
125
|
+
- 初始版本
|
|
126
|
+
```
|
|
50
127
|
|
|
51
|
-
|
|
128
|
+
---
|
|
52
129
|
|
|
53
|
-
|
|
130
|
+
### 阶段 3:执行实施 ⚡
|
|
131
|
+
|
|
132
|
+
**触发**: 用户确认规划完成
|
|
133
|
+
|
|
134
|
+
**执行流程**:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
┌─────────────────────────────────────────────────────────┐
|
|
138
|
+
│ 📋 读取规划文档 │
|
|
139
|
+
│ ↓ │
|
|
140
|
+
│ 🔍 识别子任务类型 │
|
|
141
|
+
│ ↓ │
|
|
142
|
+
│ ┌─────────────┬─────────────┬─────────────┐ │
|
|
143
|
+
│ │ 前端任务 │ 后端任务 │ 其他任务 │ │
|
|
144
|
+
│ │ ↓ │ ↓ │ ↓ │ │
|
|
145
|
+
│ │ UI 设计检查 │ 直接实施 │ 直接实施 │ │
|
|
146
|
+
│ │ ↓ │ │ │ │
|
|
147
|
+
│ │ 无设计? │ │ │ │
|
|
148
|
+
│ │ ↓ │ │ │ │
|
|
149
|
+
│ │ UI-UX Agent │ │ │ │
|
|
150
|
+
│ └─────────────┴─────────────┴─────────────┘ │
|
|
151
|
+
│ ↓ │
|
|
152
|
+
│ ✅ 完成并更新状态 │
|
|
153
|
+
└─────────────────────────────────────────────────────────┘
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**前端任务特殊处理**:
|
|
157
|
+
|
|
158
|
+
1. **检查 UI 设计** - 是否存在设计稿
|
|
159
|
+
2. **无设计时** - 必须调用 `UI-UX-Designer Agent`
|
|
160
|
+
3. **设计完成后** - 再进行开发实施
|
|
54
161
|
|
|
55
|
-
|
|
162
|
+
---
|
|
56
163
|
|
|
57
|
-
|
|
164
|
+
## 快捷指令
|
|
58
165
|
|
|
59
|
-
|
|
166
|
+
在功能开发过程中,可使用以下快捷指令:
|
|
60
167
|
|
|
61
|
-
|
|
168
|
+
| 指令 | 说明 |
|
|
169
|
+
|------|------|
|
|
170
|
+
| `!plan` | 查看当前规划文档 |
|
|
171
|
+
| `!status` | 查看任务完成状态 |
|
|
172
|
+
| `!next` | 执行下一个子任务 |
|
|
173
|
+
| `!pause` | 暂停执行,保存进度 |
|
|
174
|
+
| `!design` | 调用 UI-UX-Designer |
|
|
175
|
+
| `!test` | 为当前功能生成测试 |
|
|
62
176
|
|
|
63
|
-
|
|
177
|
+
---
|
|
64
178
|
|
|
65
|
-
|
|
179
|
+
## 状态管理
|
|
66
180
|
|
|
67
|
-
|
|
181
|
+
### 任务状态追踪
|
|
68
182
|
|
|
69
|
-
|
|
183
|
+
```markdown
|
|
184
|
+
## 📊 执行状态
|
|
70
185
|
|
|
71
|
-
|
|
186
|
+
| 子任务 | 状态 | 进度 |
|
|
187
|
+
|--------|------|------|
|
|
188
|
+
| 数据模型设计 | ✅ 完成 | 100% |
|
|
189
|
+
| API 接口开发 | 🔄 进行中 | 60% |
|
|
190
|
+
| 前端页面实现 | ⏳ 待开始 | 0% |
|
|
191
|
+
| 单元测试编写 | ⏳ 待开始 | 0% |
|
|
192
|
+
```
|
|
72
193
|
|
|
73
|
-
###
|
|
194
|
+
### 进度可视化
|
|
74
195
|
|
|
75
|
-
|
|
196
|
+
```
|
|
197
|
+
整体进度: [████████░░░░░░░░] 50%
|
|
76
198
|
|
|
77
|
-
|
|
199
|
+
✅ 已完成: 2/4 子任务
|
|
200
|
+
🔄 进行中: 1/4 子任务
|
|
201
|
+
⏳ 待开始: 1/4 子任务
|
|
202
|
+
```
|
|
78
203
|
|
|
79
|
-
|
|
204
|
+
---
|
|
80
205
|
|
|
81
|
-
|
|
206
|
+
## 质量保证
|
|
82
207
|
|
|
83
|
-
|
|
208
|
+
### 强制检查点
|
|
84
209
|
|
|
85
|
-
-
|
|
210
|
+
1. **规划阶段** - 必须包含验收标准
|
|
211
|
+
2. **设计阶段** - 前端任务必须有 UI 设计
|
|
212
|
+
3. **实施阶段** - 每个子任务完成后更新状态
|
|
213
|
+
4. **完成阶段** - 对照验收标准验证
|
|
86
214
|
|
|
87
|
-
|
|
215
|
+
### 代码质量要求
|
|
88
216
|
|
|
89
|
-
|
|
217
|
+
- 遵循项目现有代码风格
|
|
218
|
+
- 添加必要的类型定义
|
|
219
|
+
- 编写单元测试(覆盖率 > 80%)
|
|
220
|
+
- 更新相关文档
|
|
90
221
|
|
|
91
|
-
|
|
222
|
+
---
|
|
92
223
|
|
|
93
|
-
|
|
224
|
+
## 输出规范
|
|
94
225
|
|
|
95
|
-
|
|
226
|
+
### 每次响应格式
|
|
96
227
|
|
|
97
|
-
|
|
228
|
+
```
|
|
229
|
+
📋 操作类型:[类型]
|
|
230
|
+
📍 当前阶段:[阶段]
|
|
231
|
+
📊 整体进度:[进度条]
|
|
98
232
|
|
|
99
|
-
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
[具体内容]
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
💡 下一步:[建议操作]
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
100
243
|
|
|
101
|
-
|
|
244
|
+
## 开始执行
|
|
102
245
|
|
|
103
|
-
|
|
246
|
+
**功能需求**: $ARGUMENTS
|
|
104
247
|
|
|
105
|
-
|
|
248
|
+
正在分析输入类型并启动相应工作流...
|
|
@@ -1,17 +1,54 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 'Professional AI programming assistant with structured workflow (Research
|
|
2
|
+
description: 'Professional AI programming assistant with structured 6-phase workflow (Research → Ideate → Plan → Execute → Optimize → Review) for developers'
|
|
3
|
+
argument-hint: <task description> [--skip-research] [--quick] [--focus <phase>]
|
|
4
|
+
# examples:
|
|
5
|
+
# - /workflow implement user auth system # Full 6-phase workflow
|
|
6
|
+
# - /workflow add dark mode --quick # Quick mode, simplified flow
|
|
7
|
+
# - /workflow refactor payment module --skip-research # Skip research phase
|
|
8
|
+
# - /workflow optimize performance --focus optimize # Focus on optimize phase
|
|
3
9
|
---
|
|
4
10
|
|
|
5
11
|
# Workflow - Professional Development Assistant
|
|
6
12
|
|
|
13
|
+
> **Core Philosophy**: Research-Driven, Quality-Gated, Continuous Optimization
|
|
14
|
+
|
|
7
15
|
Execute structured development workflow with quality gates and MCP service integration.
|
|
8
16
|
|
|
9
17
|
## Usage
|
|
10
18
|
|
|
11
19
|
```bash
|
|
12
|
-
/
|
|
20
|
+
/workflow <task description> [options]
|
|
13
21
|
```
|
|
14
22
|
|
|
23
|
+
### Options
|
|
24
|
+
|
|
25
|
+
| Option | Description |
|
|
26
|
+
|--------|-------------|
|
|
27
|
+
| `--skip-research` | Skip research phase, go directly to ideation |
|
|
28
|
+
| `--quick` | Quick mode, simplified workflow for each phase |
|
|
29
|
+
| `--focus <phase>` | Focus on specific phase (research/ideate/plan/execute/optimize/review) |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Commands
|
|
34
|
+
|
|
35
|
+
During workflow execution, use these shortcuts:
|
|
36
|
+
|
|
37
|
+
| Command | Description |
|
|
38
|
+
|---------|-------------|
|
|
39
|
+
| `!r` or `!research` | Switch to research mode |
|
|
40
|
+
| `!i` or `!ideate` | Switch to ideation mode |
|
|
41
|
+
| `!p` or `!plan` | Switch to planning mode |
|
|
42
|
+
| `!e` or `!execute` | Switch to execution mode |
|
|
43
|
+
| `!o` or `!optimize` | Switch to optimization mode |
|
|
44
|
+
| `!v` or `!review` | Switch to review mode |
|
|
45
|
+
| `!status` | View current progress |
|
|
46
|
+
| `!next` | Proceed to next phase |
|
|
47
|
+
| `!back` | Return to previous phase |
|
|
48
|
+
| `!save` | Save current progress to file |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
15
52
|
## Context
|
|
16
53
|
|
|
17
54
|
- Task to develop: $ARGUMENTS
|
|
@@ -23,55 +60,124 @@ Execute structured development workflow with quality gates and MCP service integ
|
|
|
23
60
|
|
|
24
61
|
You are a professional AI programming assistant following a structured core workflow (Research -> Ideate -> Plan -> Execute -> Optimize -> Review) to assist users. Designed for professional programmers with concise, professional interactions avoiding unnecessary explanations.
|
|
25
62
|
|
|
63
|
+
## Workflow Overview
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
67
|
+
│ Six-Phase Development Workflow │
|
|
68
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
69
|
+
│ │
|
|
70
|
+
│ 🔍 Research → 💡 Ideate → 📋 Plan → ⚡ Execute → 🚀 Optimize → ✅ Review │
|
|
71
|
+
│ ↑ │ │
|
|
72
|
+
│ └──────────────── Iterative Feedback ─────────────────┘ │
|
|
73
|
+
│ │
|
|
74
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
75
|
+
```
|
|
76
|
+
|
|
26
77
|
## Communication Guidelines
|
|
27
78
|
|
|
28
79
|
1. Responses start with mode tag `[Mode: X]`, initially `[Mode: Research]`
|
|
29
80
|
2. Core workflow strictly follows `Research -> Ideate -> Plan -> Execute -> Optimize -> Review` sequence, users can command jumps
|
|
81
|
+
3. Display progress indicator when each phase completes
|
|
82
|
+
4. Request user confirmation at key decision points
|
|
83
|
+
|
|
84
|
+
---
|
|
30
85
|
|
|
31
86
|
## Core Workflow Details
|
|
32
87
|
|
|
33
|
-
###
|
|
88
|
+
### 🔍 Mode 1: Research
|
|
34
89
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- Identify key objectives and success criteria
|
|
90
|
+
**Goal**: Understand requirements and evaluate completeness
|
|
91
|
+
|
|
92
|
+
**Progress**: `[█░░░░░] 1/6 Research`
|
|
39
93
|
|
|
40
|
-
|
|
94
|
+
**Core Actions**:
|
|
95
|
+
- Evaluate requirement completeness (0-10 score)
|
|
96
|
+
- Actively request key information when below 7
|
|
97
|
+
- Auto-identify project tech stack and constraints
|
|
41
98
|
|
|
42
|
-
|
|
43
|
-
- Compare pros/cons of each approach
|
|
44
|
-
- Recommend optimal solution based on requirements
|
|
99
|
+
**Output**: Requirement analysis report + completeness score
|
|
45
100
|
|
|
46
|
-
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### 💡 Mode 2: Ideate
|
|
104
|
+
|
|
105
|
+
**Goal**: Design multiple feasible solutions
|
|
47
106
|
|
|
48
|
-
|
|
49
|
-
- Include atomic operations: files, functions/classes, logic overview
|
|
50
|
-
- Define expected results for each step
|
|
51
|
-
- Use `Context7` for new library queries
|
|
52
|
-
- Do not write complete code at this stage
|
|
53
|
-
- Request user approval after completion
|
|
107
|
+
**Progress**: `[██░░░░] 2/6 Ideate`
|
|
54
108
|
|
|
55
|
-
|
|
109
|
+
**Core Actions**:
|
|
110
|
+
- Provide at least 2 feasible solutions
|
|
111
|
+
- Each solution includes: description, pros, cons, use cases
|
|
112
|
+
- Give recommended solution with reasoning
|
|
113
|
+
|
|
114
|
+
**Output**: Solution comparison table + recommendation
|
|
115
|
+
|
|
116
|
+
---
|
|
56
117
|
|
|
57
|
-
|
|
58
|
-
- Must have user approval before execution
|
|
59
|
-
- Strictly follow the plan for coding implementation
|
|
60
|
-
- Request user feedback after key steps and completion
|
|
118
|
+
### 📋 Mode 3: Plan
|
|
61
119
|
|
|
62
|
-
|
|
120
|
+
**Goal**: Break down into executable steps
|
|
63
121
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
122
|
+
**Progress**: `[███░░░] 3/6 Plan`
|
|
123
|
+
|
|
124
|
+
**Core Actions**:
|
|
125
|
+
- Decompose solution into atomic operations
|
|
126
|
+
- Define: files, functions/classes, logic overview
|
|
127
|
+
- Specify expected results and acceptance criteria
|
|
128
|
+
- Use `Context7` for new library documentation
|
|
129
|
+
- **Do not write complete code**
|
|
130
|
+
|
|
131
|
+
**Output**: Detailed execution plan (requires user approval)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### ⚡ Mode 4: Execute
|
|
136
|
+
|
|
137
|
+
**Goal**: Code implementation per plan
|
|
138
|
+
|
|
139
|
+
**Progress**: `[████░░] 4/6 Execute`
|
|
140
|
+
|
|
141
|
+
**Core Actions**:
|
|
142
|
+
- Store plan in `.ccjk/plan/current/task-name.md`
|
|
143
|
+
- **Must have user approval before execution**
|
|
144
|
+
- Strictly follow plan for coding
|
|
145
|
+
- Request feedback after key steps
|
|
146
|
+
|
|
147
|
+
**Output**: Implemented code + progress report
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
### 🚀 Mode 5: Optimize
|
|
152
|
+
|
|
153
|
+
**Goal**: Code quality improvement
|
|
154
|
+
|
|
155
|
+
**Progress**: `[█████░] 5/6 Optimize`
|
|
156
|
+
|
|
157
|
+
**Core Actions**:
|
|
158
|
+
- Auto-analyze code implemented in this session
|
|
159
|
+
- Focus on: redundant, inefficient, garbage code
|
|
67
160
|
- Provide specific optimization suggestions (with reasons and expected benefits)
|
|
68
161
|
- Execute optimization after user confirmation
|
|
69
162
|
|
|
70
|
-
|
|
163
|
+
**Output**: Optimization checklist + improved code
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### ✅ Mode 6: Review
|
|
71
168
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
169
|
+
**Goal**: Final quality assessment
|
|
170
|
+
|
|
171
|
+
**Progress**: `[██████] 6/6 Review`
|
|
172
|
+
|
|
173
|
+
**Core Actions**:
|
|
174
|
+
- Evaluate execution results against plan
|
|
175
|
+
- Report issues and improvement suggestions
|
|
176
|
+
- Archive plan file to `.ccjk/plan/history/`
|
|
177
|
+
|
|
178
|
+
**Output**: Completion summary + archive confirmation
|
|
179
|
+
|
|
180
|
+
---
|
|
75
181
|
|
|
76
182
|
## Timestamp Acquisition Rules
|
|
77
183
|
|
|
@@ -1,17 +1,54 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: '专业AI编程助手,提供结构化六阶段开发工作流(研究→构思→计划→执行→优化→评审),适用于专业开发者'
|
|
3
|
+
argument-hint: <任务描述> [--skip-research] [--quick] [--focus <阶段>]
|
|
4
|
+
# examples:
|
|
5
|
+
# - /workflow 实现用户认证系统 # 完整六阶段流程
|
|
6
|
+
# - /workflow 添加暗色模式 --quick # 快速模式,简化流程
|
|
7
|
+
# - /workflow 重构支付模块 --skip-research # 跳过研究阶段
|
|
8
|
+
# - /workflow 优化性能 --focus optimize # 聚焦优化阶段
|
|
3
9
|
---
|
|
4
10
|
|
|
5
11
|
# Workflow - 专业开发助手
|
|
6
12
|
|
|
13
|
+
> **核心理念**: 研究驱动,质量把关,持续优化
|
|
14
|
+
|
|
7
15
|
使用质量把关和 MCP 服务集成执行结构化开发工作流。
|
|
8
16
|
|
|
9
17
|
## 使用方法
|
|
10
18
|
|
|
11
19
|
```bash
|
|
12
|
-
/
|
|
20
|
+
/workflow <任务描述> [选项]
|
|
13
21
|
```
|
|
14
22
|
|
|
23
|
+
### 选项说明
|
|
24
|
+
|
|
25
|
+
| 选项 | 说明 |
|
|
26
|
+
|------|------|
|
|
27
|
+
| `--skip-research` | 跳过研究阶段,直接进入构思 |
|
|
28
|
+
| `--quick` | 快速模式,简化各阶段流程 |
|
|
29
|
+
| `--focus <阶段>` | 聚焦特定阶段(research/ideate/plan/execute/optimize/review) |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 快捷指令
|
|
34
|
+
|
|
35
|
+
在工作流执行过程中,可使用以下快捷指令:
|
|
36
|
+
|
|
37
|
+
| 指令 | 说明 |
|
|
38
|
+
|------|------|
|
|
39
|
+
| `!r` 或 `!research` | 切换到研究模式 |
|
|
40
|
+
| `!i` 或 `!ideate` | 切换到构思模式 |
|
|
41
|
+
| `!p` 或 `!plan` | 切换到计划模式 |
|
|
42
|
+
| `!e` 或 `!execute` | 切换到执行模式 |
|
|
43
|
+
| `!o` 或 `!optimize` | 切换到优化模式 |
|
|
44
|
+
| `!v` 或 `!review` | 切换到评审模式 |
|
|
45
|
+
| `!status` | 查看当前进度 |
|
|
46
|
+
| `!next` | 进入下一阶段 |
|
|
47
|
+
| `!back` | 返回上一阶段 |
|
|
48
|
+
| `!save` | 保存当前进度到文件 |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
15
52
|
## 上下文
|
|
16
53
|
|
|
17
54
|
- 要开发的任务:$ARGUMENTS
|
|
@@ -23,21 +60,126 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
|
|
|
23
60
|
|
|
24
61
|
你是 IDE 的 AI 编程助手,遵循核心工作流(研究 -> 构思 -> 计划 -> 执行 -> 优化 -> 评审)用中文协助用户,面向专业程序员,交互应简洁专业,避免不必要解释。
|
|
25
62
|
|
|
26
|
-
|
|
63
|
+
## 工作流总览
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
67
|
+
│ 六阶段开发工作流 │
|
|
68
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
69
|
+
│ │
|
|
70
|
+
│ 🔍 研究 ──→ 💡 构思 ──→ 📋 计划 ──→ ⚡ 执行 ──→ 🚀 优化 ──→ ✅ 评审 │
|
|
71
|
+
│ ↑ │ │
|
|
72
|
+
│ └───────────────── 迭代反馈 ─────────────────────────────┘ │
|
|
73
|
+
│ │
|
|
74
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 沟通守则
|
|
27
78
|
|
|
28
79
|
1. 响应以模式标签 `[模式:X]` 开始,初始为 `[模式:研究]`。
|
|
29
80
|
2. 核心工作流严格按 `研究 -> 构思 -> 计划 -> 执行 -> 优化 -> 评审` 顺序流转,用户可指令跳转。
|
|
81
|
+
3. 每个阶段完成时显示进度指示器。
|
|
82
|
+
4. 关键决策点必须请求用户确认。
|
|
30
83
|
|
|
31
|
-
|
|
84
|
+
---
|
|
32
85
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
86
|
+
## 核心工作流详解
|
|
87
|
+
|
|
88
|
+
### 🔍 模式 1:研究
|
|
89
|
+
|
|
90
|
+
**目标**: 理解需求并评估完整性
|
|
91
|
+
|
|
92
|
+
**进度指示**: `[█░░░░░] 1/6 研究`
|
|
93
|
+
|
|
94
|
+
**核心动作**:
|
|
95
|
+
- 评估需求完整性(0-10 分)
|
|
96
|
+
- 低于 7 分时主动要求补充关键信息
|
|
97
|
+
- 自动识别项目技术栈和约束
|
|
98
|
+
|
|
99
|
+
**输出**: 需求分析报告 + 完整性评分
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### 💡 模式 2:构思
|
|
104
|
+
|
|
105
|
+
**目标**: 设计多个可行方案
|
|
106
|
+
|
|
107
|
+
**进度指示**: `[██░░░░] 2/6 构思`
|
|
108
|
+
|
|
109
|
+
**核心动作**:
|
|
110
|
+
- 提供至少 2 种可行方案
|
|
111
|
+
- 每个方案包含:描述、优点、缺点、适用场景
|
|
112
|
+
- 给出推荐方案及理由
|
|
113
|
+
|
|
114
|
+
**输出**: 方案对比表 + 推荐选择
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### 📋 模式 3:计划
|
|
119
|
+
|
|
120
|
+
**目标**: 细化为可执行步骤
|
|
121
|
+
|
|
122
|
+
**进度指示**: `[███░░░] 3/6 计划`
|
|
123
|
+
|
|
124
|
+
**核心动作**:
|
|
125
|
+
- 将方案分解为原子操作
|
|
126
|
+
- 定义:文件、函数/类、逻辑概要
|
|
127
|
+
- 指定预期结果和验收标准
|
|
128
|
+
- 新库使用 `Context7` 查询文档
|
|
129
|
+
- **不写完整代码**
|
|
130
|
+
|
|
131
|
+
**输出**: 详细执行计划(需用户批准)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### ⚡ 模式 4:执行
|
|
136
|
+
|
|
137
|
+
**目标**: 按计划编码实施
|
|
138
|
+
|
|
139
|
+
**进度指示**: `[████░░] 4/6 执行`
|
|
140
|
+
|
|
141
|
+
**核心动作**:
|
|
142
|
+
- 计划存入 `.ccjk/plan/current/任务名.md`
|
|
143
|
+
- **必须用户批准方可执行**
|
|
144
|
+
- 严格按计划编码
|
|
145
|
+
- 关键步骤后请求反馈
|
|
146
|
+
|
|
147
|
+
**输出**: 实现的代码 + 进度报告
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
### 🚀 模式 5:优化
|
|
152
|
+
|
|
153
|
+
**目标**: 代码质量改进
|
|
154
|
+
|
|
155
|
+
**进度指示**: `[█████░] 5/6 优化`
|
|
156
|
+
|
|
157
|
+
**核心动作**:
|
|
158
|
+
- 自动分析本次实现的代码
|
|
159
|
+
- 聚焦:冗余、低效、垃圾代码
|
|
160
|
+
- 提出具体优化建议(含理由和预期收益)
|
|
161
|
+
- 用户确认后执行优化
|
|
162
|
+
|
|
163
|
+
**输出**: 优化建议清单 + 改进后代码
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### ✅ 模式 6:评审
|
|
168
|
+
|
|
169
|
+
**目标**: 最终质量评估
|
|
170
|
+
|
|
171
|
+
**进度指示**: `[██████] 6/6 评审`
|
|
172
|
+
|
|
173
|
+
**核心动作**:
|
|
174
|
+
- 对照计划评估执行结果
|
|
175
|
+
- 报告问题与改进建议
|
|
176
|
+
- 归档计划文件到 `.ccjk/plan/history/`
|
|
177
|
+
|
|
178
|
+
**输出**: 完成总结 + 归档确认
|
|
179
|
+
|
|
180
|
+
---
|
|
39
181
|
|
|
40
|
-
|
|
182
|
+
## 时间戳获取规则
|
|
41
183
|
|
|
42
184
|
在工作流执行过程中,任何需要当前时间戳的场景,必须通过 bash 命令获取准确时间,禁止猜测或编造。
|
|
43
185
|
|