antigravity-ide 3.5.64 → 3.5.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -7
- package/cli/logic/product-skills.js +37 -0
- package/cli/logic/scale-rules.js +37 -0
- package/cli/logic/skill-definitions.js +101 -0
- package/cli/logic/workflow-manager.js +58 -0
- package/cli/prompts.js +73 -155
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ npx antigravity-ide my_project
|
|
|
28
28
|
npx antigravity-ide
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
### ✨ Setup Wizard Features (v3.5.
|
|
31
|
+
### ✨ Setup Wizard Features (v3.5.71)
|
|
32
32
|
The new interactive CLI puts you in control with a **Premium Developer Experience**:
|
|
33
33
|
|
|
34
34
|
1. **Interactive & Visual**:
|
|
@@ -36,15 +36,18 @@ The new interactive CLI puts you in control with a **Premium Developer Experienc
|
|
|
36
36
|
- **Gradient Aesthetics**: Beautiful CLI visuals that inspire creativity.
|
|
37
37
|
- **Satisfaction Summary**: A clean "Success" checklist ensures you're ready to go.
|
|
38
38
|
|
|
39
|
-
2. **
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
39
|
+
2. **Smart Allocation Logic**:
|
|
40
|
+
- **Scale (Quy mô)**: Determines **Engine Mode** (Node vs Python) and **Operational Rules** (Flexible vs Strict).
|
|
41
|
+
- **Product Type**: Automatically loads the exact **Skills & Workflows** you need:
|
|
42
|
+
- 📱 **User Apps**: Web, PWA, Mobile, Desktop (Activates *WebDev/Mobile* Skills).
|
|
43
|
+
- 🛠️ **Dev Tools**: CLI, Library, API Services (Activates *DevOps/Testing* Skills).
|
|
44
|
+
- 🤖 **AI Agents**: Chatbots, Autonomous Agents (Activates *AI/Maker* Skills).
|
|
45
|
+
- 🎨 **Assets**: Games, Templates (Activates *GameDev/SEO* Skills).
|
|
43
46
|
|
|
44
47
|
3. **Context Injection**:
|
|
45
48
|
- **Name your Agent**: Personalize your AI (e.g., *Jarvis*, *Friday*).
|
|
46
|
-
- **
|
|
47
|
-
- *Auto-Injection*: These details are deeply embedded into `.agent/rules/GEMINI.md
|
|
49
|
+
- **All-Fields Access**: Industry restrictions are removed. You now get access to **ALL Workflows** (Finance, Health, etc.) by default.
|
|
50
|
+
- *Auto-Injection*: These details are deeply embedded into `.agent/rules/GEMINI.md`.
|
|
48
51
|
|
|
49
52
|
4. **Global vs. Workspace Strategy**:
|
|
50
53
|
- **Global (`~/.antigravity`)**: Holds the Master Rules (Enterprise Tier).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logic for Product Type (User Apps, Dev Tools, AI, Assets)
|
|
3
|
+
* Determines specific Skills needed for the product.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
function getProductSkills(productType) {
|
|
7
|
+
const skillsToAdd = new Set();
|
|
8
|
+
|
|
9
|
+
// 1. User Applications
|
|
10
|
+
if (['web_app', 'pwa', 'desktop', 'extension', 'template'].includes(productType)) {
|
|
11
|
+
skillsToAdd.add('webdev');
|
|
12
|
+
}
|
|
13
|
+
if (['web_app', 'pwa', 'desktop'].includes(productType)) {
|
|
14
|
+
skillsToAdd.add('testing'); // Apps need QA
|
|
15
|
+
}
|
|
16
|
+
if (productType === 'mobile_app' || productType === 'game') {
|
|
17
|
+
skillsToAdd.add('mobile');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 2. Dev Tools
|
|
21
|
+
if (['cli_tool', 'library', 'api_service'].includes(productType)) {
|
|
22
|
+
skillsToAdd.add('devops');
|
|
23
|
+
skillsToAdd.add('testing'); // Tools need robust testing
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// 3. AI Agents
|
|
27
|
+
if (['chatbot', 'ai_agent'].includes(productType)) {
|
|
28
|
+
skillsToAdd.add('ai');
|
|
29
|
+
}
|
|
30
|
+
if (productType === 'chatbot') {
|
|
31
|
+
skillsToAdd.add('maker'); // For Telegram bot builder etc.
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return Array.from(skillsToAdd);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
module.exports = { getProductSkills };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logic for Project Scale (Flexible vs Balanced vs Strict)
|
|
3
|
+
* Determines Engine Mode, Rules Mode, and Base Workflows.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
function getScaleConfig(scale) {
|
|
7
|
+
let engineMode = 'standard';
|
|
8
|
+
let rulesMode = scale;
|
|
9
|
+
let baseWorkflows = [];
|
|
10
|
+
let coreSkillCategories = []; // Skills enforced by Scale (e.g. Enterprise needs Security)
|
|
11
|
+
|
|
12
|
+
if (scale === 'flexible') {
|
|
13
|
+
// PERSONAL: JS only, Minimal
|
|
14
|
+
engineMode = 'standard';
|
|
15
|
+
baseWorkflows = ['plan', 'debug', 'enhance'];
|
|
16
|
+
coreSkillCategories = ['ai']; // Only minimal AI
|
|
17
|
+
} else if (scale === 'balanced') {
|
|
18
|
+
// TEAM: JS + Python, Hybrid
|
|
19
|
+
engineMode = 'advanced';
|
|
20
|
+
baseWorkflows = ['plan', 'status', 'debug', 'enhance', 'test', 'document', 'onboard'];
|
|
21
|
+
coreSkillCategories = ['ai', 'growth', 'devops', 'testing'];
|
|
22
|
+
} else {
|
|
23
|
+
// ENTERPRISE: Full Power
|
|
24
|
+
engineMode = 'advanced';
|
|
25
|
+
baseWorkflows = ['plan', 'status', 'debug', 'enhance', 'test', 'document', 'onboard', 'security', 'audit', 'monitor', 'orchestrate', 'deploy'];
|
|
26
|
+
coreSkillCategories = ['ai', 'security', 'growth', 'devops', 'testing'];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
engineMode,
|
|
31
|
+
rulesMode,
|
|
32
|
+
baseWorkflows,
|
|
33
|
+
coreSkillCategories
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
module.exports = { getScaleConfig };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized definition of all Agent Skills and their categories.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const skillCategories = {
|
|
6
|
+
webdev: {
|
|
7
|
+
name: 'Web High-Performance',
|
|
8
|
+
skills: [
|
|
9
|
+
'modern-web-architect',
|
|
10
|
+
'full-stack-scaffold',
|
|
11
|
+
'api-documenter',
|
|
12
|
+
'i18n-localization',
|
|
13
|
+
'react-best-practices',
|
|
14
|
+
'tailwind-patterns',
|
|
15
|
+
'frontend-design'
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
mobile: {
|
|
19
|
+
name: 'Mobile & Game',
|
|
20
|
+
skills: [
|
|
21
|
+
'mobile-design',
|
|
22
|
+
'game-development',
|
|
23
|
+
'i18n-localization',
|
|
24
|
+
'react-native-patterns'
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
devops: {
|
|
28
|
+
name: 'DevOps & Cloud',
|
|
29
|
+
skills: [
|
|
30
|
+
'cloud-architect-master',
|
|
31
|
+
'deployment-engineer',
|
|
32
|
+
'incident-responder',
|
|
33
|
+
'mcp-builder',
|
|
34
|
+
'docker-expert'
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
security: {
|
|
38
|
+
name: 'Security & Audit',
|
|
39
|
+
skills: [
|
|
40
|
+
'security-auditor',
|
|
41
|
+
'penetration-tester-master',
|
|
42
|
+
'production-code-audit',
|
|
43
|
+
'vulnerability-scanner',
|
|
44
|
+
'owasp-top-10'
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
ai: {
|
|
48
|
+
name: 'AI & ML',
|
|
49
|
+
skills: [
|
|
50
|
+
'ai-engineer',
|
|
51
|
+
'geo-fundamentals',
|
|
52
|
+
'prompt-engineer',
|
|
53
|
+
'voice-ai-engine',
|
|
54
|
+
'rag-architect'
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
growth: {
|
|
58
|
+
name: 'Growth & Data',
|
|
59
|
+
skills: [
|
|
60
|
+
'cro-expert-kit',
|
|
61
|
+
'seo-expert-kit',
|
|
62
|
+
'database-migration',
|
|
63
|
+
'performance-engineer',
|
|
64
|
+
'copywriting-master',
|
|
65
|
+
'paid-ads-specialist'
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
maker: {
|
|
69
|
+
name: 'Maker & Indie Hacking',
|
|
70
|
+
skills: [
|
|
71
|
+
'telegram-bot-builder',
|
|
72
|
+
'viral-generator',
|
|
73
|
+
'product-hunt-launch',
|
|
74
|
+
'nocode-automation'
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
testing: {
|
|
78
|
+
name: 'QA & Testing',
|
|
79
|
+
skills: [
|
|
80
|
+
'tdd-master-workflow',
|
|
81
|
+
'qa-automation',
|
|
82
|
+
'cypress-testing',
|
|
83
|
+
'jest-expert'
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
function getSkillsForCategories(categories) {
|
|
89
|
+
const skills = [];
|
|
90
|
+
categories.forEach(category => {
|
|
91
|
+
if (skillCategories[category]) {
|
|
92
|
+
skills.push(...skillCategories[category].skills);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return skills;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
module.exports = {
|
|
99
|
+
skillCategories,
|
|
100
|
+
getSkillsForCategories
|
|
101
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logic for assembling Workflows from various sources (Scale, Product, Industry).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const availableWorkflows = [
|
|
6
|
+
'audit', 'brainstorm', 'create', 'debug', 'deploy', 'document', 'enhance',
|
|
7
|
+
'monitor', 'onboard', 'orchestrate', 'plan', 'preview', 'security', 'seo',
|
|
8
|
+
'status', 'test', 'ui-ux-pro-max',
|
|
9
|
+
'explain', 'visually', 'mobile', 'performance', 'compliance', 'api', 'realtime', 'blog', 'portfolio'
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const industryWorkflows = {
|
|
13
|
+
finance: ['security', 'audit', 'test'],
|
|
14
|
+
education: ['explain', 'visually', 'test'],
|
|
15
|
+
fnb: ['performance', 'mobile', 'deploy'],
|
|
16
|
+
personal: ['blog', 'portfolio', 'seo'],
|
|
17
|
+
healthcare: ['compliance', 'security', 'audit'],
|
|
18
|
+
logistics: ['api', 'realtime', 'deploy'],
|
|
19
|
+
other: availableWorkflows // 'Other' now means EVERYTHING (General / All Fields)
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function getWorkflows(industryDomain, productType, scaleWorkflows) {
|
|
23
|
+
const finalWorkflows = new Set(scaleWorkflows);
|
|
24
|
+
const specificWorkflows = industryWorkflows[industryDomain] || ['create', 'debug', 'enhance'];
|
|
25
|
+
|
|
26
|
+
// Add Industry-specific workflows
|
|
27
|
+
if (specificWorkflows && Array.isArray(specificWorkflows)) {
|
|
28
|
+
specificWorkflows.forEach(w => {
|
|
29
|
+
if (availableWorkflows.includes(w)) {
|
|
30
|
+
finalWorkflows.add(w);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Implicit Product/Industry Workflows logic
|
|
36
|
+
if (industryDomain === 'personal' || industryDomain === 'fnb' || productType === 'web_app' || productType === 'pwa') {
|
|
37
|
+
finalWorkflows.add('ui-ux-pro-max');
|
|
38
|
+
}
|
|
39
|
+
if (industryDomain === 'finance' || industryDomain === 'healthcare' || productType === 'ai_agent' || productType === 'chatbot') {
|
|
40
|
+
finalWorkflows.add('orchestrate');
|
|
41
|
+
}
|
|
42
|
+
if (['logistics', 'other'].includes(industryDomain) || ['cli_tool', 'api_service'].includes(productType)) {
|
|
43
|
+
finalWorkflows.add('create');
|
|
44
|
+
}
|
|
45
|
+
if (productType === 'api_service') {
|
|
46
|
+
finalWorkflows.add('api');
|
|
47
|
+
}
|
|
48
|
+
if (productType === 'mobile_app' || productType === 'game') {
|
|
49
|
+
finalWorkflows.add('mobile');
|
|
50
|
+
}
|
|
51
|
+
if (productType === 'template') {
|
|
52
|
+
finalWorkflows.add('seo');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return Array.from(finalWorkflows);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
module.exports = { getWorkflows, availableWorkflows };
|
package/cli/prompts.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interactive prompts for project configuration
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
const prompts = require('prompts');
|
|
6
2
|
const chalk = require('chalk');
|
|
7
3
|
const gradient = require('gradient-string');
|
|
8
4
|
const packageJson = require('../package.json');
|
|
9
5
|
|
|
6
|
+
// Import Logic Modules
|
|
7
|
+
const { skillCategories, getSkillsForCategories } = require('./logic/skill-definitions');
|
|
8
|
+
const { getScaleConfig } = require('./logic/scale-rules');
|
|
9
|
+
const { getProductSkills } = require('./logic/product-skills');
|
|
10
|
+
const { getWorkflows } = require('./logic/workflow-manager');
|
|
11
|
+
|
|
10
12
|
// Display concise banner with gradient
|
|
11
13
|
function displayBanner() {
|
|
12
14
|
console.clear();
|
|
@@ -24,61 +26,6 @@ function displayBanner() {
|
|
|
24
26
|
console.log('');
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
const skillCategories = {
|
|
28
|
-
webdev: {
|
|
29
|
-
name: 'Web High-Performance',
|
|
30
|
-
skills: [
|
|
31
|
-
'modern-web-architect',
|
|
32
|
-
'full-stack-scaffold',
|
|
33
|
-
'api-documenter',
|
|
34
|
-
'i18n-localization'
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
mobile: {
|
|
38
|
-
name: 'Mobile & Game',
|
|
39
|
-
skills: [
|
|
40
|
-
'mobile-design',
|
|
41
|
-
'game-development',
|
|
42
|
-
'i18n-localization'
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
devops: {
|
|
46
|
-
name: 'DevOps & Cloud',
|
|
47
|
-
skills: [
|
|
48
|
-
'cloud-architect-master',
|
|
49
|
-
'deployment-engineer',
|
|
50
|
-
'incident-responder',
|
|
51
|
-
'mcp-builder'
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
security: {
|
|
55
|
-
name: 'Security & Audit',
|
|
56
|
-
skills: [
|
|
57
|
-
'security-auditor',
|
|
58
|
-
'penetration-tester-master',
|
|
59
|
-
'production-code-audit',
|
|
60
|
-
'vulnerability-scanner'
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
ai: {
|
|
64
|
-
name: 'AI & ML',
|
|
65
|
-
skills: [
|
|
66
|
-
'ai-engineer',
|
|
67
|
-
'geo-fundamentals',
|
|
68
|
-
'prompt-engineer'
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
growth: {
|
|
72
|
-
name: 'Growth & Data',
|
|
73
|
-
skills: [
|
|
74
|
-
'cro-expert-kit',
|
|
75
|
-
'seo-expert-kit',
|
|
76
|
-
'database-migration',
|
|
77
|
-
'performance-engineer'
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
29
|
async function getProjectConfig(skipPrompts = false, predefinedName = null) {
|
|
83
30
|
if (skipPrompts) {
|
|
84
31
|
return {
|
|
@@ -90,7 +37,9 @@ async function getProjectConfig(skipPrompts = false, predefinedName = null) {
|
|
|
90
37
|
includeDashboard: false,
|
|
91
38
|
language: 'en',
|
|
92
39
|
packageManager: 'npm',
|
|
93
|
-
engineMode: 'standard'
|
|
40
|
+
engineMode: 'standard',
|
|
41
|
+
productType: 'web_app', // Default
|
|
42
|
+
industryDomain: 'other' // Default
|
|
94
43
|
};
|
|
95
44
|
}
|
|
96
45
|
|
|
@@ -102,7 +51,7 @@ async function getProjectConfig(skipPrompts = false, predefinedName = null) {
|
|
|
102
51
|
|
|
103
52
|
/*
|
|
104
53
|
PHASE 1: BASIC INFORMATION
|
|
105
|
-
Order: Language -> Name -> Scale ->
|
|
54
|
+
Order: Language -> Name -> Scale -> ProductType -> Agent Name
|
|
106
55
|
*/
|
|
107
56
|
const responses = await prompts([
|
|
108
57
|
{
|
|
@@ -144,26 +93,50 @@ async function getProjectConfig(skipPrompts = false, predefinedName = null) {
|
|
|
144
93
|
},
|
|
145
94
|
{
|
|
146
95
|
type: 'select',
|
|
147
|
-
name: '
|
|
148
|
-
message: (prev, values) => values.language === 'vi' ? '
|
|
96
|
+
name: 'productType',
|
|
97
|
+
message: (prev, values) => values.language === 'vi' ? 'Loại sản phẩm (Product Type):' : 'Select Product Type:',
|
|
149
98
|
choices: (prev, values) => values.language === 'vi' ? [
|
|
150
|
-
{ title: '
|
|
151
|
-
{ title: '
|
|
152
|
-
{ title: '
|
|
153
|
-
{ title: '
|
|
154
|
-
{ title: '
|
|
155
|
-
{ title: '
|
|
156
|
-
|
|
99
|
+
{ title: '──────── USER APPS ────────', disabled: true },
|
|
100
|
+
{ title: '🌐 Web App (Dashboard, SaaS, SME)', value: 'web_app' },
|
|
101
|
+
{ title: '⚡ PWA (App giả lập trên Web)', value: 'pwa' },
|
|
102
|
+
{ title: '🖥️ Desktop App (Windows/MacOS)', value: 'desktop' },
|
|
103
|
+
{ title: '📱 Mobile App (iOS/Android)', value: 'mobile_app' },
|
|
104
|
+
{ title: '🧩 Browser Extension (Chrome/Edge)', value: 'extension' },
|
|
105
|
+
|
|
106
|
+
{ title: '──────── DEV TOOLS ────────', disabled: true },
|
|
107
|
+
{ title: '⌨️ CLI Tool (Terminal Command)', value: 'cli_tool' },
|
|
108
|
+
{ title: '📦 Library / Package (NPM)', value: 'library' },
|
|
109
|
+
{ title: '🔌 API Service (Backend Only)', value: 'api_service' },
|
|
110
|
+
|
|
111
|
+
{ title: '──────── AI AGENTS ────────', disabled: true },
|
|
112
|
+
{ title: '💬 Chatbot / Assistant (Telegram/Discord)', value: 'chatbot' },
|
|
113
|
+
{ title: '🤖 Autonomous Agent (Tự động hóa)', value: 'ai_agent' },
|
|
114
|
+
|
|
115
|
+
{ title: '──────── ASSETS ────────', disabled: true },
|
|
116
|
+
{ title: '🎮 Interactive Game (Web/Mobile)', value: 'game' },
|
|
117
|
+
{ title: '🎨 Template / Theme', value: 'template' }
|
|
157
118
|
] : [
|
|
158
|
-
{ title: '
|
|
159
|
-
{ title: '
|
|
160
|
-
{ title: '
|
|
161
|
-
{ title: '
|
|
162
|
-
{ title: '
|
|
163
|
-
{ title: '
|
|
164
|
-
|
|
119
|
+
{ title: '──────── USER APPS ────────', disabled: true },
|
|
120
|
+
{ title: '🌐 Web App (SaaS, Dashboard)', value: 'web_app' },
|
|
121
|
+
{ title: '⚡ PWA (Progressive Web App)', value: 'pwa' },
|
|
122
|
+
{ title: '🖥️ Desktop App (Electron/Tauri)', value: 'desktop' },
|
|
123
|
+
{ title: '📱 Mobile App (iOS/Android)', value: 'mobile_app' },
|
|
124
|
+
{ title: '🧩 Browser Extension', value: 'extension' },
|
|
125
|
+
|
|
126
|
+
{ title: '──────── DEV TOOLS ────────', disabled: true },
|
|
127
|
+
{ title: '⌨️ CLI Tool', value: 'cli_tool' },
|
|
128
|
+
{ title: '📦 Library / Package', value: 'library' },
|
|
129
|
+
{ title: '🔌 API Service (Backend)', value: 'api_service' },
|
|
130
|
+
|
|
131
|
+
{ title: '──────── AI AGENTS ────────', disabled: true },
|
|
132
|
+
{ title: '💬 Chatbot / Assistant', value: 'chatbot' },
|
|
133
|
+
{ title: '🤖 Autonomous Agent', value: 'ai_agent' },
|
|
134
|
+
|
|
135
|
+
{ title: '──────── ASSETS ────────', disabled: true },
|
|
136
|
+
{ title: '🎮 Interactive Game', value: 'game' },
|
|
137
|
+
{ title: '🎨 Template / Theme', value: 'template' }
|
|
165
138
|
],
|
|
166
|
-
initial:
|
|
139
|
+
initial: 1
|
|
167
140
|
},
|
|
168
141
|
{
|
|
169
142
|
type: 'text',
|
|
@@ -179,98 +152,43 @@ async function getProjectConfig(skipPrompts = false, predefinedName = null) {
|
|
|
179
152
|
});
|
|
180
153
|
|
|
181
154
|
// Inject predefined name if it exists (so logic downstream works)
|
|
155
|
+
console.log(`\n${chalk.green('✔')} Setup Complete! Generating Project Plan...`);
|
|
182
156
|
if (predefinedName) {
|
|
183
157
|
responses.projectName = predefinedName;
|
|
184
158
|
}
|
|
185
159
|
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
// Define available industry-specific workflows
|
|
190
|
-
// (Whitelist to ensure we only include real files)
|
|
191
|
-
const availableWorkflows = [
|
|
192
|
-
'audit', 'brainstorm', 'create', 'debug', 'deploy', 'document', 'enhance',
|
|
193
|
-
'monitor', 'onboard', 'orchestrate', 'plan', 'preview', 'security', 'seo',
|
|
194
|
-
'status', 'test', 'ui-ux-pro-max',
|
|
195
|
-
'explain', 'visually', 'mobile', 'performance', 'compliance', 'api', 'realtime', 'blog', 'portfolio'
|
|
196
|
-
];
|
|
160
|
+
// Default Industry to 'other' (General / All Fields)
|
|
161
|
+
responses.industryDomain = 'other';
|
|
197
162
|
|
|
198
|
-
|
|
199
|
-
finance: ['security', 'audit', 'test'],
|
|
200
|
-
education: ['explain', 'visually', 'test'],
|
|
201
|
-
fnb: ['performance', 'mobile', 'deploy'],
|
|
202
|
-
personal: ['blog', 'portfolio', 'seo'],
|
|
203
|
-
healthcare: ['compliance', 'security', 'audit'],
|
|
204
|
-
logistics: ['api', 'realtime', 'deploy'],
|
|
205
|
-
other: availableWorkflows // 'Other' now means EVERYTHING (General / All Fields)
|
|
206
|
-
};
|
|
163
|
+
// --- LOGIC INTEGRATION START ---
|
|
207
164
|
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
let selectedSkillCategories = [];
|
|
211
|
-
let scaleBasedWorkflows = [];
|
|
165
|
+
// 1. Get Scale Configuration (Engine, Rules, Core Skills)
|
|
166
|
+
const scaleConfig = getScaleConfig(responses.scale);
|
|
212
167
|
|
|
213
|
-
//
|
|
214
|
-
|
|
215
|
-
// PERSONAL: JS only, Minimal
|
|
216
|
-
engineMode = 'standard';
|
|
217
|
-
selectedSkillCategories = ['webdev', 'ai'];
|
|
218
|
-
scaleBasedWorkflows = ['plan', 'debug', 'enhance'];
|
|
219
|
-
} else if (responses.scale === 'balanced') {
|
|
220
|
-
// TEAM: JS + Python, Hybrid
|
|
221
|
-
engineMode = 'advanced';
|
|
222
|
-
selectedSkillCategories = ['webdev', 'mobile', 'ai', 'growth', 'devops'];
|
|
223
|
-
scaleBasedWorkflows = ['plan', 'status', 'debug', 'enhance', 'test', 'document', 'onboard'];
|
|
224
|
-
} else {
|
|
225
|
-
// ENTERPRISE: Full Power
|
|
226
|
-
engineMode = 'advanced';
|
|
227
|
-
selectedSkillCategories = Object.keys(skillCategories);
|
|
228
|
-
scaleBasedWorkflows = ['plan', 'status', 'debug', 'enhance', 'test', 'document', 'onboard', 'security', 'audit', 'monitor', 'orchestrate', 'deploy'];
|
|
229
|
-
}
|
|
168
|
+
// 2. Get Product Skills
|
|
169
|
+
const productSkills = getProductSkills(responses.productType);
|
|
230
170
|
|
|
231
|
-
|
|
232
|
-
const
|
|
171
|
+
// 3. Combine Skills (Core + Product)
|
|
172
|
+
const allSkills = new Set([...scaleConfig.coreSkillCategories, ...productSkills]);
|
|
233
173
|
|
|
234
|
-
//
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// Implicit industry workflows (Additional logic)
|
|
244
|
-
if (responses.industryDomain === 'personal' || responses.industryDomain === 'fnb') {
|
|
245
|
-
finalWorkflows.add('ui-ux-pro-max');
|
|
246
|
-
}
|
|
247
|
-
if (responses.industryDomain === 'finance' || responses.industryDomain === 'healthcare') {
|
|
248
|
-
finalWorkflows.add('orchestrate');
|
|
249
|
-
}
|
|
250
|
-
if (responses.industryDomain === 'logistics' || responses.industryDomain === 'other') {
|
|
251
|
-
finalWorkflows.add('create');
|
|
252
|
-
}
|
|
174
|
+
// 4. Get Workflows (combined from Scale and Product/Industry)
|
|
175
|
+
const finalWorkflows = getWorkflows(
|
|
176
|
+
responses.industryDomain,
|
|
177
|
+
responses.productType,
|
|
178
|
+
scaleConfig.baseWorkflows
|
|
179
|
+
);
|
|
253
180
|
|
|
254
181
|
const settings = {
|
|
255
182
|
template: 'standard',
|
|
256
|
-
rules:
|
|
257
|
-
workflows:
|
|
183
|
+
rules: scaleConfig.rulesMode,
|
|
184
|
+
workflows: finalWorkflows,
|
|
258
185
|
packageManager: 'npm',
|
|
259
|
-
engineMode: engineMode
|
|
186
|
+
engineMode: scaleConfig.engineMode,
|
|
187
|
+
productType: responses.productType
|
|
260
188
|
};
|
|
261
189
|
|
|
262
|
-
// Return configuration
|
|
263
|
-
return { ...responses, ...settings, skillCategories:
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
function getSkillsForCategories(categories) {
|
|
267
|
-
const skills = [];
|
|
268
|
-
categories.forEach(category => {
|
|
269
|
-
if (skillCategories[category]) {
|
|
270
|
-
skills.push(...skillCategories[category].skills);
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
return skills;
|
|
190
|
+
// Return configuration
|
|
191
|
+
return { ...responses, ...settings, skillCategories: Array.from(allSkills) };
|
|
274
192
|
}
|
|
275
193
|
|
|
276
194
|
module.exports = {
|