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.
@@ -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.4.0";
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
- outputDir: "interview"
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
- outputDir: "essential"
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
- outputDir: "git"
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
- outputDir: "workflow"
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: `${i18n.t("workflow:selectWorkflowType")}${i18n.t("common:multiSelectHint")}`,
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 workflow type to install",
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
- "workflowOption.essentialTools": "Essential Tools (Project Init + Feature Planning + UX Design)",
17
- "workflowOption.gitWorkflow": "Git Workflow (commit + rollback + cleanBranches + worktree)",
18
- "workflowOption.interviewWorkflow": "🌟 Interview-Driven Development (Recommended - Based on Anthropic Thariq's Workflow)",
19
- "workflowOption.sixStepsWorkflow": "Six-Step Workflow (Structured Development Process)"
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
- "workflowOption.essentialTools": "必备工具集 (项目初始化 + 功能规划 + UX设计)",
17
- "workflowOption.gitWorkflow": "Git 工作流 (commit + rollback + cleanBranches + worktree)",
18
- "workflowOption.interviewWorkflow": "🌟 访谈驱动开发 (推荐 - 基于 Anthropic Thariq 的创新工作流)",
19
- "workflowOption.sixStepsWorkflow": "六步工作流 (结构化开发流程)"
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,7 +1,7 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "1.4.0",
4
+ "version": "1.5.0",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "description": "Claude Code JinKu - Advanced AI-powered development assistant with skills, agents, and LLM-driven audit",
7
7
  "author": {
@@ -1,105 +1,250 @@
1
1
  ---
2
- description: Add New Feature
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
- ## Core Workflow
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
- ### 1. Input Analysis and Type Determination
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
- When receiving user input, first perform type determination and clearly inform the user:
57
+ ---
58
+
59
+ ### Phase 1: Requirement Planning 🆕
12
60
 
13
- **Determination Criteria:**
61
+ **Trigger**: Identified as new feature requirement
14
62
 
15
- - **Requirement Planning Type**: User proposes new feature requirements, project ideas, or needs to formulate plans
63
+ **Execution Flow**:
16
64
 
17
- - **Discussion Iteration Type**: User requests to continue discussion, modify, or refine existing planning
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
- - **Execution Implementation Type**: User confirms planning is complete and requests to start specific implementation work
69
+ **Planning Document Structure**:
20
70
 
21
- ### 2. Classification Processing Mechanism
71
+ ```markdown
72
+ # Feature Plan: [Feature Name]
22
73
 
23
- #### A. Requirement Planning Processing
74
+ ## 📋 Overview
75
+ - Feature objective
76
+ - Expected value
77
+ - Impact scope
24
78
 
25
- **Trigger Condition**: Identified as functional requirement input
79
+ ## 🎯 Feature Breakdown
80
+ - [ ] Sub-feature 1
81
+ - [ ] Sub-feature 2
82
+ - [ ] Sub-feature 3
26
83
 
27
- **Execution Actions**:
84
+ ## 📐 Technical Approach
85
+ - Architecture design
86
+ - Data model
87
+ - API design
28
88
 
29
- - Enable Planner Agent
89
+ ## Acceptance Criteria
90
+ - Functional acceptance points
91
+ - Performance metrics
92
+ - Test coverage
30
93
 
31
- - Generate detailed markdown planning document
94
+ ## ⏱️ Implementation Plan
95
+ - Phase breakdown
96
+ - Time estimation
97
+ - Dependencies
98
+ ```
32
99
 
33
- - Store document in `./.claude/plan` directory, named in plan/xxx.md format
100
+ ---
34
101
 
35
- - Include: objective definition, feature breakdown, implementation steps, acceptance criteria
102
+ ### Phase 2: Discussion Iteration 🔄
36
103
 
37
- #### B. Discussion Iteration Processing
104
+ **Trigger**: User requests to modify or refine plan
38
105
 
39
- **Trigger Condition**: User requests to continue discussion or modify planning
106
+ **Execution Flow**:
40
107
 
41
- **Execution Actions**:
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
- - Retrieve and analyze previously generated planning files
115
+ **Iteration Record**:
44
116
 
45
- - Identify user feedback and confirmation content
117
+ ```markdown
118
+ ## 📝 Iteration History
46
119
 
47
- - Enable Planner Agent
120
+ ### v2 - [timestamp]
121
+ - Modification 1
122
+ - Modification 2
48
123
 
49
- - Generate detailed markdown planning document
124
+ ### v1 - [timestamp]
125
+ - Initial version
126
+ ```
50
127
 
51
- - Create a new document, for example, if the last one was plan/xxx.md, then this time it's plan/xxx-1.md, if the last one was plan/xxx-1.md, then this time it's plan/xxx-2.md, and so on
128
+ ---
52
129
 
53
- - Reorganize pending implementation task priorities
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
- #### C. Execution Implementation Processing
164
+ ---
56
165
 
57
- **Trigger Condition**: User confirms planning is complete and requests to start execution
166
+ ## Quick Commands
58
167
 
59
- **Execution Actions**:
168
+ During feature development, use these shortcuts:
60
169
 
61
- - Start task execution in the order of planning documents
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
- - Perform task type identification before each subtask begins
179
+ ---
64
180
 
65
- - **Frontend Task Special Processing**:
181
+ ## State Management
66
182
 
67
- - Check if available UI design exists
183
+ ### Task Status Tracking
68
184
 
69
- - If no design solution exists, must use UI-UX-Designer Agent
185
+ ```markdown
186
+ ## 📊 Execution Status
70
187
 
71
- - Complete UI design before proceeding with development implementation
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
- ### 3. Key Execution Principles
196
+ ### Progress Visualization
74
197
 
75
- #### Mandatory Response Requirements
198
+ ```
199
+ Overall Progress: [████████░░░░░░░░] 50%
76
200
 
77
- - **Must first state in every interaction**: "I determine this operation type as: [specific type]"
201
+ Completed: 2/4 subtasks
202
+ 🔄 In Progress: 1/4 subtasks
203
+ ⏳ Pending: 1/4 subtasks
204
+ ```
78
205
 
79
- - Type determination must be accurate and clearly communicated to users
206
+ ---
80
207
 
81
- #### Task Execution Standards
208
+ ## Quality Assurance
82
209
 
83
- - Strictly execute according to documented planning
210
+ ### Mandatory Checkpoints
84
211
 
85
- - Must clarify task nature and dependencies before subtask startup
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
- - Frontend tasks must ensure UI design completeness
217
+ ### Code Quality Requirements
88
218
 
89
- #### State Management Mechanism
219
+ - Follow existing project code style
220
+ - Add necessary type definitions
221
+ - Write unit tests (coverage > 80%)
222
+ - Update relevant documentation
90
223
 
91
- - Maintain task completion status tracking
224
+ ---
92
225
 
93
- - Timely update planning document status
226
+ ## Output Format
94
227
 
95
- - Ensure user visibility of progress
228
+ ### Response Structure
96
229
 
97
- ## Quality Assurance Points
230
+ ```
231
+ 📋 Operation Type: [Type]
232
+ 📍 Current Phase: [Phase]
233
+ 📊 Overall Progress: [Progress Bar]
98
234
 
99
- 1. **Type Determination Accuracy**: Type identification at the beginning of each interaction must be accurate
235
+ ---
236
+
237
+ [Specific Content]
238
+
239
+ ---
240
+
241
+ 💡 Next Step: [Suggested Action]
242
+ ```
243
+
244
+ ---
100
245
 
101
- 2. **Document Consistency**: Planning documents and actual execution remain synchronized
246
+ ## Start Execution
102
247
 
103
- 3. **Dependency Management**: Pay special attention to UI design dependencies of frontend tasks
248
+ **Feature Request**: $ARGUMENTS
104
249
 
105
- 4. **Transparent User Communication**: All judgments and actions must be clearly communicated to users
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
- ### 1. 输入分析与类型判断
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
- ### 2. 分类处理机制
71
+ ```markdown
72
+ # 功能规划:[功能名称]
22
73
 
23
- #### A. 需求规划处理
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
- - 启用 Planner Agent
89
+ ## 验收标准
90
+ - 功能验收点
91
+ - 性能指标
92
+ - 测试覆盖
30
93
 
31
- - 生成详细的 markdown 规划文档
94
+ ## ⏱️ 实施计划
95
+ - 阶段划分
96
+ - 时间估算
97
+ - 依赖关系
98
+ ```
32
99
 
33
- - 将文档存储至 `./.claude/plan` 目录,并以 plan/xxx.md 的格式命名
100
+ ---
34
101
 
35
- - 包含:目标定义、功能分解、实施步骤、验收标准
102
+ ### 阶段 2:讨论迭代 🔄
36
103
 
37
- #### B. 讨论迭代处理
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
- - 启用 Planner Agent
120
+ ### v2 - [时间戳]
121
+ - 修改点 1
122
+ - 修改点 2
48
123
 
49
- - 生成详细的 markdown 规划文档
124
+ ### v1 - [时间戳]
125
+ - 初始版本
126
+ ```
50
127
 
51
- - 建立一个新的文档,比如上一次是 plan/xxx.md,那么这次就是 plan/xxx-1.md,如果上一次是 plan/xxx-1.md,那么这次就是 plan/xxx-2.md,以此类推
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
- #### C. 执行实施处理
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
- - 检查是否存在可用 UI 设计
181
+ ### 任务状态追踪
68
182
 
69
- - 如无设计方案,must use UI-UX-Designer Agent
183
+ ```markdown
184
+ ## 📊 执行状态
70
185
 
71
- - 完成 UI 设计后再进行开发实施
186
+ | 子任务 | 状态 | 进度 |
187
+ |--------|------|------|
188
+ | 数据模型设计 | ✅ 完成 | 100% |
189
+ | API 接口开发 | 🔄 进行中 | 60% |
190
+ | 前端页面实现 | ⏳ 待开始 | 0% |
191
+ | 单元测试编写 | ⏳ 待开始 | 0% |
192
+ ```
72
193
 
73
- ### 3. 关键执行原则
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
- - 前端任务必须确保 UI 设计完整性
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
- 1. **类型判断准确性**: 每次交互开始的类型识别必须准确
233
+ ---
234
+
235
+ [具体内容]
236
+
237
+ ---
238
+
239
+ 💡 下一步:[建议操作]
240
+ ```
241
+
242
+ ---
100
243
 
101
- 2. **文档一致性**: 规划文档与实际执行保持同步
244
+ ## 开始执行
102
245
 
103
- 3. **依赖关系管理**: 特别关注前端任务的 UI 设计依赖
246
+ **功能需求**: $ARGUMENTS
104
247
 
105
- 4. **用户沟通透明**: 所有判断和动作都要明确告知用户
248
+ 正在分析输入类型并启动相应工作流...
@@ -1,17 +1,54 @@
1
1
  ---
2
- description: 'Professional AI programming assistant with structured workflow (Research -> Ideate -> Plan -> Execute -> Optimize -> Review) for developers'
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
- /ccjk:workflow <TASK_DESCRIPTION>
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
- ### 1. `[Mode: Research]` - Requirement Understanding
88
+ ### 🔍 Mode 1: Research
34
89
 
35
- - Analyze and understand user requirements
36
- - Evaluate requirement completeness (0-10 score), actively request key information when below 7
37
- - Gather necessary context and constraints
38
- - Identify key objectives and success criteria
90
+ **Goal**: Understand requirements and evaluate completeness
91
+
92
+ **Progress**: `[█░░░░░] 1/6 Research`
39
93
 
40
- ### 2. `[Mode: Ideate]` - Solution Design
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
- - Provide at least two feasible solutions with evaluation (e.g., `Solution 1: Description`)
43
- - Compare pros/cons of each approach
44
- - Recommend optimal solution based on requirements
99
+ **Output**: Requirement analysis report + completeness score
45
100
 
46
- ### 3. `[Mode: Plan]` - Detailed Planning
101
+ ---
102
+
103
+ ### 💡 Mode 2: Ideate
104
+
105
+ **Goal**: Design multiple feasible solutions
47
106
 
48
- - Break down selected solution into detailed, ordered, executable step list
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
- ### 4. `[Mode: Execute]` - Implementation
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
- - Store plan summary (with context and plan) in project root directory `.ccjk/plan/current/task-name.md`
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
- ### 5. `[Mode: Optimize]` - Code Optimization
120
+ **Goal**: Break down into executable steps
63
121
 
64
- - Automatically enter this mode after `[Mode: Execute]` completion
65
- - Automatically check and analyze implemented code (only code generated in current conversation)
66
- - Focus on redundant, inefficient, garbage code
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
- ### 6. `[Mode: Review]` - Quality Assessment
163
+ **Output**: Optimization checklist + improved code
164
+
165
+ ---
166
+
167
+ ### ✅ Mode 6: Review
71
168
 
72
- - Evaluate execution results against the plan
73
- - Report issues and suggestions
74
- - Request user confirmation after completion
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
- /ccjk:workflow <任务描述>
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
- 1. `[模式:研究]`:理解需求并评估完整性(0-10 分),低于 7 分时主动要求补充关键信息。
34
- 2. `[模式:构思]`:提供至少两种可行方案及评估(例如:`方案 1:描述`)。
35
- 3. `[模式:计划]`:将选定方案细化为详尽、有序、可执行的步骤清单(含原子操作:文件、函数/类、逻辑概要;预期结果;新库用 `Context7` 查询)。不写完整代码。完成后请求用户批准。
36
- 4. `[模式:执行]`:计划简要(含上下文和计划)存入当前项目根目录的`.ccjk/plan/current/任务名.md`。必须用户批准方可执行。严格按计划编码执行。关键步骤后及完成时请求用户反馈。
37
- 5. `[模式:优化]`:在 `[模式:执行]` 完成后,必须自动进行本模式 `[模式:优化]`,自动检查并分析本次任务已实现(仅本次对话产生的相关代码),在 `[模式:执行]` 下产生的相关代码。聚焦冗余、低效、垃圾代码,提出具体优化建议(含优化理由与预期收益),用户确认后执行相关优化功能。
38
- 6. `[模式:评审]`:对照计划评估执行结果,报告问题与建议。完成后请求用户确认。
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