aios-core 2.1.4 → 2.1.5

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.
Files changed (23) hide show
  1. package/.aios-core/infrastructure/scripts/llm-routing/install-llm-routing.js +6 -6
  2. package/package.json +1 -1
  3. package/packages/installer/src/config/templates/env-template.js +2 -2
  4. package/packages/installer/src/wizard/wizard.js +34 -185
  5. package/src/wizard/index.js +2 -2
  6. package/.aios-core/development/tasks/analyze-brownfield.md +0 -456
  7. package/.aios-core/development/tasks/setup-project-docs.md +0 -444
  8. package/.aios-core/infrastructure/scripts/documentation-integrity/brownfield-analyzer.js +0 -501
  9. package/.aios-core/infrastructure/scripts/documentation-integrity/config-generator.js +0 -329
  10. package/.aios-core/infrastructure/scripts/documentation-integrity/deployment-config-loader.js +0 -282
  11. package/.aios-core/infrastructure/scripts/documentation-integrity/doc-generator.js +0 -331
  12. package/.aios-core/infrastructure/scripts/documentation-integrity/gitignore-generator.js +0 -312
  13. package/.aios-core/infrastructure/scripts/documentation-integrity/index.js +0 -74
  14. package/.aios-core/infrastructure/scripts/documentation-integrity/mode-detector.js +0 -358
  15. package/.aios-core/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +0 -182
  16. package/.aios-core/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +0 -127
  17. package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +0 -63
  18. package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +0 -18
  19. package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +0 -85
  20. package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +0 -145
  21. package/.aios-core/infrastructure/templates/project-docs/coding-standards-tmpl.md +0 -346
  22. package/.aios-core/infrastructure/templates/project-docs/source-tree-tmpl.md +0 -177
  23. package/.aios-core/infrastructure/templates/project-docs/tech-stack-tmpl.md +0 -267
@@ -70,7 +70,7 @@ function installLLMRouting(options = {}) {
70
70
  projectRoot = process.cwd(),
71
71
  templatesDir = path.join(__dirname, 'templates'),
72
72
  onProgress = console.log,
73
- onError = console.error,
73
+ onError = console.error
74
74
  } = options;
75
75
 
76
76
  const result = {
@@ -78,7 +78,7 @@ function installLLMRouting(options = {}) {
78
78
  installDir: null,
79
79
  filesInstalled: [],
80
80
  envCreated: false,
81
- errors: [],
81
+ errors: []
82
82
  };
83
83
 
84
84
  // Check templates exist
@@ -143,7 +143,7 @@ function installLLMRouting(options = {}) {
143
143
  try {
144
144
  fs.copyFileSync(envExample, envFile);
145
145
  result.envCreated = true;
146
- onProgress('✅ Created .env from .env.example');
146
+ onProgress(`✅ Created .env from .env.example`);
147
147
  } catch (error) {
148
148
  result.success = false;
149
149
  result.errors.push(`Failed to create .env: ${error.message}`);
@@ -180,7 +180,7 @@ function updateClaudeConfig() {
180
180
  config.aiosLLMRouting = {
181
181
  version: LLM_ROUTING_VERSION,
182
182
  installedAt: new Date().toISOString(),
183
- commands: ['claude-max', 'claude-free'],
183
+ commands: ['claude-max', 'claude-free']
184
184
  };
185
185
 
186
186
  fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2));
@@ -250,7 +250,7 @@ module.exports = {
250
250
  isLLMRoutingInstalled,
251
251
  getInstallDir,
252
252
  getInstallationSummary,
253
- LLM_ROUTING_VERSION,
253
+ LLM_ROUTING_VERSION
254
254
  };
255
255
 
256
256
  // Run if executed directly
@@ -259,7 +259,7 @@ if (require.main === module) {
259
259
 
260
260
  const result = installLLMRouting({
261
261
  projectRoot: process.cwd(),
262
- templatesDir: path.join(__dirname, 'templates'),
262
+ templatesDir: path.join(__dirname, 'templates')
263
263
  });
264
264
 
265
265
  const summary = getInstallationSummary(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aios-core",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "description": "AIOS: AI-Orchestrated System for Full Stack Development - Core Framework",
5
5
  "main": "index.js",
6
6
  "module": "index.esm.js",
@@ -118,7 +118,7 @@ VERCEL_TOKEN=
118
118
  # AIOS Core Configuration
119
119
  # --------------------------------------------
120
120
  NODE_ENV=development
121
- AIOS_VERSION=2.1.4
121
+ AIOS_VERSION=2.1.5
122
122
 
123
123
  # --------------------------------------------
124
124
  # Custom Configuration
@@ -230,7 +230,7 @@ VERCEL_TOKEN=
230
230
  # AIOS Core Configuration
231
231
  # --------------------------------------------
232
232
  NODE_ENV=development
233
- AIOS_VERSION=2.1.4
233
+ AIOS_VERSION=2.1.5
234
234
 
235
235
  # --------------------------------------------
236
236
  # Custom Configuration
@@ -1,70 +1,46 @@
1
1
  const { detectProjectType } = require('../detection/detect-project-type');
2
- const {
3
- detectInstallationMode,
4
- getModeOptions,
5
- validateModeSelection,
6
- InstallationMode,
7
- } = require('../../../../.aios-core/infrastructure/scripts/documentation-integrity/mode-detector');
8
2
 
9
3
  /**
10
4
  * Interactive Wizard for AIOS Installation
11
- *
12
- * Supports three installation modes:
13
- * - GREENFIELD: New project - generates all docs and config
14
- * - BROWNFIELD: Existing project - analyzes and adapts
15
- * - FRAMEWORK_DEV: Contributing to aios-core itself
16
- *
5
+ *
6
+ * This is a stub implementation that demonstrates the integration
7
+ * with the project type detection module (Story 1.3).
8
+ * Full wizard implementation is part of Story 1.2.
9
+ *
17
10
  * @module wizard
18
- * @version 2.0.0
19
- * @story 6.9
20
11
  */
21
12
 
22
13
  /**
23
14
  * Run the interactive installer wizard
24
- *
15
+ *
25
16
  * @param {Object} options - Wizard options
26
17
  * @param {string} options.targetDir - Target directory for installation
27
- * @param {string} options.mode - Pre-selected mode (skip detection)
28
18
  * @returns {Promise<Object>} Installation configuration
29
19
  */
30
20
  async function runWizard(options = {}) {
31
21
  const targetDir = options.targetDir || process.cwd();
32
-
22
+
33
23
  try {
34
- // Step 1: Welcome screen
24
+ // Step 1: Welcome screen (Story 1.2)
35
25
  console.log('🚀 Welcome to AIOS Installer\n');
36
-
37
- // Step 2: Detect installation mode (Story 6.9)
38
- console.log('📊 Analyzing project directory...');
39
- const detected = detectInstallationMode(targetDir);
40
- console.log(`✅ Detected: ${detected.mode} (${detected.reason})\n`);
41
-
42
- // Step 3: Select installation mode (with user override)
43
- const selectedMode = options.mode || (await selectInstallationMode(detected));
44
-
45
- // Step 4: Validate selection
46
- const validation = validateModeSelection(selectedMode, detected);
47
- if (validation.warnings.length > 0) {
48
- console.log('\n⚠️ Warnings:');
49
- validation.warnings.forEach((w) => console.log(` - ${w}`));
50
- console.log('');
51
- }
52
-
53
- // Step 5: Mode-specific configuration
54
- const modeConfig = await configureModeSpecific(selectedMode, targetDir, detected);
55
-
56
- // Step 6: Continue with installation (Stories 1.4-1.8)
26
+
27
+ // Step 2: Detect project type (THIS STORY - Story 1.3)
28
+ console.log('📊 Detecting project type...');
29
+ const detectedType = detectProjectType(targetDir);
30
+ console.log(`✅ Detected: ${detectedType}\n`);
31
+
32
+ // Step 3: Confirm with user (Story 1.2)
33
+ const confirmedType = await confirmProjectType(detectedType);
34
+
35
+ // Step 4: Continue with installation (Stories 1.4-1.8)
57
36
  // - IDE Selection (Story 1.4)
58
37
  // - MCP Installation (Story 1.5)
59
38
  // - Environment Config (Story 1.6)
60
39
  // - Validation (Story 1.8)
61
-
40
+
62
41
  return {
63
- projectType: detected.legacyType, // Backward compatibility
64
- installationMode: selectedMode,
42
+ projectType: confirmedType,
65
43
  targetDir,
66
- detected,
67
- modeConfig,
68
44
  // Other configuration will be added by downstream stories
69
45
  };
70
46
  } catch (error) {
@@ -73,152 +49,29 @@ async function runWizard(options = {}) {
73
49
  }
74
50
  }
75
51
 
76
- /**
77
- * Select installation mode with user input
78
- *
79
- * @param {Object} detected - Detection result from mode detector
80
- * @returns {Promise<string>} Selected installation mode
81
- */
82
- async function selectInstallationMode(detected) {
83
- const options = getModeOptions(detected);
84
-
85
- console.log('Select installation type:\n');
86
- options.forEach((opt, index) => {
87
- const marker = opt.value === detected.mode ? '→' : ' ';
88
- console.log(`${marker} ${index + 1}. ${opt.label}`);
89
- console.log(` ${opt.hint}\n`);
90
- });
91
-
92
- // Stub: In real implementation, use @clack/prompts select()
93
- // For now, return detected mode or first option
94
- console.log(`(Using detected mode: ${detected.mode})`);
95
- console.log('(Interactive selection via @clack/prompts in Story 1.2)\n');
96
-
97
- return detected.mode !== InstallationMode.UNKNOWN ? detected.mode : InstallationMode.GREENFIELD;
98
- }
99
-
100
- /**
101
- * Configure mode-specific settings
102
- *
103
- * @param {string} mode - Selected installation mode
104
- * @param {string} targetDir - Target directory
105
- * @param {Object} detected - Detection result
106
- * @returns {Promise<Object>} Mode-specific configuration
107
- */
108
- async function configureModeSpecific(mode, targetDir, detected) {
109
- const config = {
110
- mode,
111
- generateDocs: true,
112
- generateConfig: true,
113
- generateGitignore: true,
114
- runSetupGithub: false,
115
- deployment: null,
116
- };
117
-
118
- switch (mode) {
119
- case InstallationMode.FRAMEWORK_DEV:
120
- // Framework development - skip project setup
121
- console.log('🔧 Framework Development Mode');
122
- console.log(' → Using existing framework standards');
123
- console.log(' → Skipping project documentation generation');
124
- console.log(' → Skipping infrastructure setup\n');
125
- config.generateDocs = false;
126
- config.generateConfig = false;
127
- config.generateGitignore = false;
128
- break;
129
-
130
- case InstallationMode.GREENFIELD:
131
- // New project - full scaffolding
132
- console.log('🆕 Greenfield Mode');
133
- console.log(' → Will generate project documentation');
134
- console.log(' → Will create project-specific core-config');
135
- console.log(' → Will generate .gitignore based on tech stack');
136
- console.log(' → Will offer *setup-github for infrastructure\n');
137
- config.runSetupGithub = true;
138
- // Deployment config will be elicited in Phase 3
139
- config.deployment = await elicitDeploymentConfig();
140
- break;
141
-
142
- case InstallationMode.BROWNFIELD:
143
- // Existing project - analyze and adapt
144
- console.log('📂 Brownfield Mode');
145
- console.log(' → Will analyze existing source tree');
146
- console.log(' → Will detect existing coding standards');
147
- console.log(' → Will merge with existing .gitignore');
148
- console.log(' → Will analyze existing GitHub workflows\n');
149
- // Deployment config will be elicited based on analysis in Phase 3
150
- config.deployment = await elicitDeploymentConfig();
151
- break;
152
-
153
- default:
154
- console.log('❓ Unknown mode - using greenfield defaults\n');
155
- }
156
-
157
- return config;
158
- }
159
-
160
- /**
161
- * Elicit deployment configuration from user
162
- * Implements Task 3.3 from Story 6.9
163
- *
164
- * @returns {Promise<Object>} Deployment configuration
165
- */
166
- async function elicitDeploymentConfig() {
167
- // Stub implementation - will be fully implemented in Phase 3
168
- console.log('📦 Deployment Configuration');
169
- console.log(' (Full elicitation will be implemented in Phase 3)\n');
170
-
171
- // Return default staging-first workflow
172
- return {
173
- workflow: 'staging-first',
174
- branches: {
175
- staging_targets: ['feature/*', 'fix/*', 'docs/*', 'chore/*', 'refactor/*', 'test/*'],
176
- production_targets: ['hotfix/*'],
177
- staging_branch: 'staging',
178
- production_branch: 'main',
179
- default_target: 'staging',
180
- },
181
- environments: {
182
- staging: {
183
- name: 'Staging',
184
- auto_deploy: true,
185
- platform: null, // To be detected/elicited
186
- },
187
- production: {
188
- name: 'Production',
189
- auto_deploy: true,
190
- platform: null,
191
- },
192
- },
193
- quality_gates: {
194
- lint: true,
195
- typecheck: true,
196
- tests: true,
197
- security_scan: false,
198
- },
199
- };
200
- }
201
-
202
52
  /**
203
53
  * Confirm project type with user or allow override
204
- * @deprecated Use selectInstallationMode instead
205
- *
54
+ *
206
55
  * @param {string} detectedType - Detected project type
207
56
  * @returns {Promise<string>} Confirmed project type
208
57
  */
209
58
  async function confirmProjectType(detectedType) {
210
- // Kept for backward compatibility
59
+ // Stub implementation - full implementation in Story 1.2
60
+ // In real implementation, this would use @clack/prompts to ask user
61
+
211
62
  const typeDescriptions = {
212
- GREENFIELD: 'New project - AIOS will create complete structure',
213
- BROWNFIELD: 'Existing project - AIOS will integrate with current setup',
214
- EXISTING_AIOS: 'AIOS already installed - Would you like to update or reinstall?',
215
- UNKNOWN: 'Unknown project type - Manual selection required',
63
+ 'GREENFIELD': 'New project - AIOS will create complete structure',
64
+ 'BROWNFIELD': 'Existing project - AIOS will integrate with current setup',
65
+ 'EXISTING_AIOS': 'AIOS already installed - Would you like to update or reinstall?',
66
+ 'UNKNOWN': 'Unknown project type - Manual selection required',
216
67
  };
217
-
68
+
218
69
  console.log(`Project Type: ${detectedType}`);
219
70
  console.log(`Description: ${typeDescriptions[detectedType]}`);
220
- console.log('(Use selectInstallationMode for new three-mode selection)\n');
221
-
71
+ console.log('(Interactive confirmation will be added in Story 1.2)\n');
72
+
73
+ // For now, return the detected type
74
+ // Real implementation would prompt user to confirm or override
222
75
  return detectedType;
223
76
  }
224
77
 
@@ -234,11 +87,7 @@ function getProjectType(targetDir) {
234
87
 
235
88
  module.exports = {
236
89
  runWizard,
237
- selectInstallationMode,
238
- configureModeSpecific,
239
- elicitDeploymentConfig,
240
- confirmProjectType, // Deprecated - kept for backward compatibility
90
+ confirmProjectType,
241
91
  getProjectType,
242
- InstallationMode,
243
92
  };
244
93
 
@@ -30,7 +30,7 @@ const {
30
30
  const {
31
31
  installLLMRouting,
32
32
  isLLMRoutingInstalled,
33
- getInstallationSummary,
33
+ getInstallationSummary
34
34
  } = require('../../.aios-core/infrastructure/scripts/llm-routing/install-llm-routing');
35
35
 
36
36
  /**
@@ -484,7 +484,7 @@ async function runWizard() {
484
484
  const llmResult = installLLMRouting({
485
485
  projectRoot: process.cwd(),
486
486
  onProgress: (msg) => console.log(` ${msg}`),
487
- onError: (msg) => console.error(` ${msg}`),
487
+ onError: (msg) => console.error(` ${msg}`)
488
488
  });
489
489
 
490
490
  if (llmResult.success) {