chati-dev 1.0.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/assets/logo.txt +6 -0
- package/bin/chati.js +175 -0
- package/framework/agents/build/dev.md +342 -0
- package/framework/agents/clarity/architect.md +263 -0
- package/framework/agents/clarity/brief.md +277 -0
- package/framework/agents/clarity/brownfield-wu.md +288 -0
- package/framework/agents/clarity/detail.md +274 -0
- package/framework/agents/clarity/greenfield-wu.md +231 -0
- package/framework/agents/clarity/phases.md +272 -0
- package/framework/agents/clarity/tasks.md +279 -0
- package/framework/agents/clarity/ux.md +293 -0
- package/framework/agents/deploy/devops.md +321 -0
- package/framework/agents/quality/qa-implementation.md +310 -0
- package/framework/agents/quality/qa-planning.md +289 -0
- package/framework/config.yaml +8 -0
- package/framework/constitution.md +238 -0
- package/framework/frameworks/decision-heuristics.yaml +64 -0
- package/framework/frameworks/quality-dimensions.yaml +59 -0
- package/framework/i18n/en.yaml +78 -0
- package/framework/i18n/es.yaml +78 -0
- package/framework/i18n/fr.yaml +78 -0
- package/framework/i18n/pt.yaml +78 -0
- package/framework/intelligence/confidence.yaml +42 -0
- package/framework/intelligence/gotchas.yaml +51 -0
- package/framework/intelligence/patterns.yaml +32 -0
- package/framework/migrations/v1.0-to-v1.1.yaml +48 -0
- package/framework/orchestrator/chati.md +333 -0
- package/framework/patterns/elicitation.md +137 -0
- package/framework/quality-gates/implementation-gate.md +64 -0
- package/framework/quality-gates/planning-gate.md +52 -0
- package/framework/schemas/config.schema.json +42 -0
- package/framework/schemas/session.schema.json +103 -0
- package/framework/schemas/task.schema.json +71 -0
- package/framework/templates/brownfield-prd-tmpl.yaml +103 -0
- package/framework/templates/fullstack-architecture-tmpl.yaml +101 -0
- package/framework/templates/prd-tmpl.yaml +94 -0
- package/framework/templates/qa-gate-tmpl.yaml +96 -0
- package/framework/templates/task-tmpl.yaml +85 -0
- package/framework/workflows/brownfield-discovery.yaml +75 -0
- package/framework/workflows/brownfield-fullstack.yaml +104 -0
- package/framework/workflows/brownfield-service.yaml +81 -0
- package/framework/workflows/brownfield-ui.yaml +87 -0
- package/framework/workflows/greenfield-fullstack.yaml +108 -0
- package/package.json +60 -0
- package/scripts/bundle-framework.js +58 -0
- package/src/config/ide-configs.js +80 -0
- package/src/config/mcp-configs.js +136 -0
- package/src/dashboard/data-reader.js +99 -0
- package/src/dashboard/layout.js +161 -0
- package/src/dashboard/renderer.js +104 -0
- package/src/installer/core.js +221 -0
- package/src/installer/templates.js +97 -0
- package/src/installer/validator.js +114 -0
- package/src/upgrade/backup.js +107 -0
- package/src/upgrade/checker.js +105 -0
- package/src/upgrade/migrator.js +171 -0
- package/src/utils/colors.js +18 -0
- package/src/utils/detector.js +51 -0
- package/src/utils/logger.js +41 -0
- package/src/wizard/feedback.js +76 -0
- package/src/wizard/i18n.js +168 -0
- package/src/wizard/index.js +107 -0
- package/src/wizard/questions.js +169 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
2
|
+
import { t, SUPPORTED_LANGUAGES, loadLanguage } from './i18n.js';
|
|
3
|
+
import { getIDEChoices } from '../config/ide-configs.js';
|
|
4
|
+
import { getMCPChoices, getMCPWarnings } from '../config/mcp-configs.js';
|
|
5
|
+
import { detectProjectType } from '../utils/detector.js';
|
|
6
|
+
import { showSummary, showChecklist } from './feedback.js';
|
|
7
|
+
import { brand, dim, success, yellow } from '../utils/colors.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Step 1: Language Selection (always in English)
|
|
11
|
+
*/
|
|
12
|
+
export async function stepLanguage() {
|
|
13
|
+
const language = await p.select({
|
|
14
|
+
message: 'Select your language:',
|
|
15
|
+
options: SUPPORTED_LANGUAGES.map(lang => ({
|
|
16
|
+
value: lang.value,
|
|
17
|
+
label: lang.label,
|
|
18
|
+
})),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (p.isCancel(language)) {
|
|
22
|
+
p.cancel('Installation cancelled.');
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Load i18n strings from this point forward
|
|
27
|
+
loadLanguage(language);
|
|
28
|
+
|
|
29
|
+
return language;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Step 2: Project Type
|
|
34
|
+
*/
|
|
35
|
+
export async function stepProjectType(targetDir) {
|
|
36
|
+
const detection = detectProjectType(targetDir);
|
|
37
|
+
|
|
38
|
+
if (detection.suggestion === 'brownfield' && detection.confidence !== 'low') {
|
|
39
|
+
p.note(
|
|
40
|
+
`${success('✓')} ${t('installer.detected_brownfield')}\n${t('installer.suggestion_brownfield')}`,
|
|
41
|
+
dim('Auto-detection')
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const projectType = await p.select({
|
|
46
|
+
message: t('installer.project_type'),
|
|
47
|
+
options: [
|
|
48
|
+
{ value: 'greenfield', label: t('installer.greenfield') },
|
|
49
|
+
{ value: 'brownfield', label: t('installer.brownfield') },
|
|
50
|
+
],
|
|
51
|
+
initialValue: detection.suggestion,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
if (p.isCancel(projectType)) {
|
|
55
|
+
p.cancel('Installation cancelled.');
|
|
56
|
+
process.exit(0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return projectType;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Step 3: IDE Selection (Multi-select)
|
|
64
|
+
*/
|
|
65
|
+
export async function stepIDEs() {
|
|
66
|
+
const ideChoices = getIDEChoices();
|
|
67
|
+
|
|
68
|
+
const selectedIDEs = await p.multiselect({
|
|
69
|
+
message: t('installer.select_ides'),
|
|
70
|
+
options: ideChoices.map(ide => ({
|
|
71
|
+
value: ide.value,
|
|
72
|
+
label: `${ide.label} ${dim('--')} ${dim(ide.hint)}`,
|
|
73
|
+
})),
|
|
74
|
+
initialValues: ['claude-code'],
|
|
75
|
+
required: true,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (p.isCancel(selectedIDEs)) {
|
|
79
|
+
p.cancel('Installation cancelled.');
|
|
80
|
+
process.exit(0);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return selectedIDEs;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Step 4: MCP Selection (Multi-select)
|
|
88
|
+
*/
|
|
89
|
+
export async function stepMCPs(projectType) {
|
|
90
|
+
const mcpChoices = getMCPChoices();
|
|
91
|
+
|
|
92
|
+
const selectedMCPs = await p.multiselect({
|
|
93
|
+
message: t('installer.select_mcps'),
|
|
94
|
+
options: mcpChoices.map(mcp => ({
|
|
95
|
+
value: mcp.value,
|
|
96
|
+
label: `${mcp.label} ${dim('--')} ${dim(mcp.hint)}`,
|
|
97
|
+
})),
|
|
98
|
+
initialValues: mcpChoices.filter(m => m.initialValue).map(m => m.value),
|
|
99
|
+
required: false,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
if (p.isCancel(selectedMCPs)) {
|
|
103
|
+
p.cancel('Installation cancelled.');
|
|
104
|
+
process.exit(0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Check for MCP warnings
|
|
108
|
+
const warnings = getMCPWarnings(projectType, selectedMCPs);
|
|
109
|
+
for (const warn of warnings) {
|
|
110
|
+
if (warn.level === 'critical') {
|
|
111
|
+
const continueAnyway = await p.confirm({
|
|
112
|
+
message: `${yellow('Warning:')} ${warn.message}\nContinue anyway?`,
|
|
113
|
+
initialValue: false,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
if (p.isCancel(continueAnyway) || !continueAnyway) {
|
|
117
|
+
return stepMCPs(projectType); // Re-prompt
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return selectedMCPs;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Step 5: Confirmation
|
|
127
|
+
*/
|
|
128
|
+
export async function stepConfirmation(config) {
|
|
129
|
+
const { projectName, projectType, language, selectedIDEs, selectedMCPs } = config;
|
|
130
|
+
|
|
131
|
+
const langName = SUPPORTED_LANGUAGES.find(l => l.value === language)?.label || language;
|
|
132
|
+
const ideNames = selectedIDEs.join(', ');
|
|
133
|
+
const mcpNames = selectedMCPs.length > 0 ? selectedMCPs.join(', ') : 'None';
|
|
134
|
+
|
|
135
|
+
console.log();
|
|
136
|
+
console.log(brand(t('installer.confirmation_title') + ':'));
|
|
137
|
+
showSummary({
|
|
138
|
+
[t('installer.project_label')]: `${projectName} (${projectType === 'greenfield' ? 'Greenfield' : 'Brownfield'})`,
|
|
139
|
+
[t('installer.language_label')]: langName,
|
|
140
|
+
[t('installer.ides_label')]: ideNames,
|
|
141
|
+
[t('installer.mcps_label')]: mcpNames,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
console.log();
|
|
145
|
+
console.log(` ${t('installer.will_install')}:`);
|
|
146
|
+
showChecklist([
|
|
147
|
+
t('installer.agents_count'),
|
|
148
|
+
t('installer.workflows_count'),
|
|
149
|
+
t('installer.templates_count'),
|
|
150
|
+
t('installer.constitution'),
|
|
151
|
+
t('installer.session_mgmt'),
|
|
152
|
+
t('installer.quality_gates'),
|
|
153
|
+
]);
|
|
154
|
+
|
|
155
|
+
console.log();
|
|
156
|
+
console.log(` ${dim('Target:')} ${config.targetDir}`);
|
|
157
|
+
|
|
158
|
+
const proceed = await p.confirm({
|
|
159
|
+
message: t('installer.proceed'),
|
|
160
|
+
initialValue: true,
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
if (p.isCancel(proceed) || !proceed) {
|
|
164
|
+
p.cancel('Installation cancelled.');
|
|
165
|
+
process.exit(0);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return true;
|
|
169
|
+
}
|