mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-02 15:23:19 +08:00
feat(routing): add greenfield task type and narrow roadmap detection
- Add dedicated greenfield (0→1) task type with complexity-adaptive routing (low→brainstorm-to-plan, medium→greenfield-plan, high→greenfield-phased) - Narrow roadmap regex to only /roadmap|路线.*图/ to prevent false matches - Change brainstorm-to-plan chain from lite-plan to workflow-plan→execute - Sync all changes between ccw.md and ccw-coordinator.md
This commit is contained in:
@@ -30,7 +30,7 @@ Interactive orchestration tool: analyze task → discover commands → recommend
|
||||
| `workflow:roadmap-with-file` | strategic requirement roadmap → issue creation → execution-plan.json |
|
||||
| `workflow:integration-test-cycle` | explore → test dev → test-fix cycle → reflection |
|
||||
| `workflow:refactor-cycle` | tech debt discovery → prioritize → execute → validate |
|
||||
| `team-planex` | planner + executor wave pipeline(适合大量零散 issue 或 roadmap 产出的清晰 issue,实现 0→1 开发)|
|
||||
| `team-planex` | planner + executor wave pipeline(适合大量零散 issue 或 roadmap 产出的清晰 issue)|
|
||||
|
||||
## Core Concept: Minimum Execution Units (最小执行单元)
|
||||
|
||||
@@ -85,7 +85,7 @@ Interactive orchestration tool: analyze task → discover commands → recommend
|
||||
| Unit Name | Commands | Purpose | Output |
|
||||
|-----------|----------|---------|--------|
|
||||
| **Analyze to Plan** | analyze-with-file → lite-plan | Collaborative analysis → auto chain to lite-plan | discussion.md + code |
|
||||
| **Brainstorm to Plan** | brainstorm-with-file → lite-plan | Multi-perspective ideation → auto chain to lite-plan | brainstorm.md + code |
|
||||
| **Brainstorm to Plan** | brainstorm-with-file → plan → execute | Multi-perspective ideation → formal planning | brainstorm.md + code |
|
||||
| **Debug With File** | debug-with-file | Hypothesis-driven debugging with documentation | understanding.md |
|
||||
| **Collaborative Plan** | collaborative-plan-with-file → unified-execute-with-file | Multi-agent collaborative planning and execution | plan-note.md + code |
|
||||
| **Roadmap Plan** | roadmap-with-file → team-planex | Requirement decomposition and wave execution | execution-plan.json + code |
|
||||
@@ -118,7 +118,7 @@ Interactive orchestration tool: analyze task → discover commands → recommend
|
||||
| issue:queue | issue:execute | Issue Workflow, Rapid-to-Issue, Brainstorm-to-Issue |
|
||||
| issue:from-brainstorm | issue:queue | Brainstorm-to-Issue |
|
||||
| analyze-with-file | lite-plan (auto) | Analyze to Plan |
|
||||
| brainstorm-with-file | lite-plan (auto), issue:from-brainstorm | Brainstorm to Plan, Brainstorm-to-Issue |
|
||||
| brainstorm-with-file | plan (auto), issue:from-brainstorm | Brainstorm to Plan, Brainstorm-to-Issue |
|
||||
| collaborative-plan-with-file | unified-execute-with-file | Collaborative Plan |
|
||||
| roadmap-with-file | team-planex | Roadmap Plan |
|
||||
| unified-execute-with-file | (terminal) | Collaborative Plan |
|
||||
@@ -165,11 +165,13 @@ function detectTaskType(text) {
|
||||
if (/urgent|production|critical/.test(text) && /fix|bug/.test(text)) return 'bugfix-hotfix';
|
||||
// With-File workflow patterns (specific keywords - must come before generic bugfix)
|
||||
if (/brainstorm.*issue|头脑风暴.*issue|idea.*issue|想法.*issue|从.*头脑风暴|convert.*brainstorm/.test(text)) return 'brainstorm-to-issue';
|
||||
// 0→1 Greenfield detection (priority over brainstorm/roadmap)
|
||||
if (/从零开始|from scratch|0.*to.*1|greenfield|全新.*开发|新项目|new project|build.*from.*ground/.test(text)) return 'greenfield';
|
||||
if (/brainstorm|ideation|头脑风暴|创意|发散思维|creative thinking/.test(text)) return 'brainstorm-file';
|
||||
if (/debug.*document|hypothesis.*debug|深度调试|假设.*验证|systematic debug/.test(text)) return 'debug-file';
|
||||
if (/analyze.*document|collaborative analysis|协作分析|深度.*理解/.test(text)) return 'analyze-file';
|
||||
if (/collaborative.*plan|协作.*规划|多人.*规划|multi.*agent.*plan|Plan Note|分工.*规划/.test(text)) return 'collaborative-plan';
|
||||
if (/roadmap|需求.*规划|需求.*拆解|requirement.*plan|progressive.*plan|路线.*图/.test(text)) return 'roadmap';
|
||||
if (/roadmap|路线.*图/.test(text)) return 'roadmap'; // Narrowed: only explicit roadmap keywords
|
||||
if (/spec.*gen|specification|PRD|产品需求|产品文档|产品规格/.test(text)) return 'spec-driven';
|
||||
// Cycle workflow patterns
|
||||
if (/integration.*test|集成测试|端到端.*测试|e2e.*test|integration.*cycle/.test(text)) return 'integration-test';
|
||||
@@ -407,7 +409,7 @@ const commandPorts = {
|
||||
output: ['brainstorm-document'],
|
||||
tags: ['brainstorm', 'with-file'],
|
||||
atomic_group: 'brainstorm-to-plan',
|
||||
note: 'Auto chains to lite-plan with brainstorm artifacts'
|
||||
note: 'Auto chains to workflow-plan with brainstorm artifacts'
|
||||
},
|
||||
'issue:from-brainstorm': {
|
||||
name: 'issue:from-brainstorm',
|
||||
@@ -515,8 +517,10 @@ function determinePortFlow(taskType, constraints) {
|
||||
// Issue workflow types
|
||||
'issue-batch': { inputPort: 'codebase', outputPort: 'completed-issues' },
|
||||
'issue-transition': { inputPort: 'requirement', outputPort: 'completed-issues' },
|
||||
// With-File workflow types (auto chain to lite-plan)
|
||||
'brainstorm-file': { inputPort: 'exploration-topic', outputPort: 'code' },
|
||||
// 0→1 Greenfield (exploration → formal planning → execution)
|
||||
'greenfield': { inputPort: 'exploration-topic', outputPort: 'test-passed' },
|
||||
// With-File workflow types (auto chain to plan)
|
||||
'brainstorm-file': { inputPort: 'exploration-topic', outputPort: 'test-passed' },
|
||||
'brainstorm-to-issue': { inputPort: 'brainstorm-document', outputPort: 'completed-issues' },
|
||||
'debug-file': { inputPort: 'bug-report', outputPort: 'understanding-document' },
|
||||
'analyze-file': { inputPort: 'analysis-topic', outputPort: 'code' },
|
||||
@@ -957,7 +961,8 @@ Task: <description>
|
||||
| **issue-batch** | 代码库 →【discover → plan → queue → execute】→ 完成 issues | Issue Workflow |
|
||||
| **issue-transition** | 需求 →【lite-plan → convert-to-plan → queue → execute】→ 完成 issues | Rapid-to-Issue |
|
||||
| **analyze-file** | 分析主题 →【analyze-with-file → lite-plan → lite-execute】→ 代码 | Analyze to Plan |
|
||||
| **brainstorm-file** | 主题 →【brainstorm-with-file → lite-plan → lite-execute】→ 代码 | Brainstorm to Plan |
|
||||
| **greenfield** | 需求 →【brainstorm-with-file → plan → execute】→ 代码 → test | Greenfield (0→1) |
|
||||
| **brainstorm-file** | 主题 →【brainstorm-with-file → plan → execute】→ 代码 → test | Brainstorm to Plan |
|
||||
| **brainstorm-to-issue** | brainstorm.md →【from-brainstorm → queue → execute】→ 完成 issues | Brainstorm to Issue |
|
||||
| **debug-file** | Bug报告 → debug-with-file → understanding.md (自包含) | Debug With File |
|
||||
| **collaborative-plan** | 需求 →【collaborative-plan-with-file → unified-execute-with-file】→ 代码 | Collaborative Plan |
|
||||
|
||||
Reference in New Issue
Block a user