aios-core 3.7.0 → 3.9.1
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/.aios-core/core/session/context-detector.js +3 -0
- package/.aios-core/core/session/context-loader.js +154 -0
- package/.aios-core/data/learned-patterns.yaml +3 -0
- package/.aios-core/data/workflow-patterns.yaml +347 -3
- package/.aios-core/development/agents/dev.md +6 -0
- package/.aios-core/development/agents/squad-creator.md +30 -0
- package/.aios-core/development/scripts/squad/squad-analyzer.js +638 -0
- package/.aios-core/development/scripts/squad/squad-extender.js +871 -0
- package/.aios-core/development/scripts/squad/squad-generator.js +107 -19
- package/.aios-core/development/scripts/squad/squad-migrator.js +3 -5
- package/.aios-core/development/scripts/squad/squad-validator.js +98 -0
- package/.aios-core/development/tasks/next.md +294 -0
- package/.aios-core/development/tasks/patterns.md +334 -0
- package/.aios-core/development/tasks/squad-creator-analyze.md +315 -0
- package/.aios-core/development/tasks/squad-creator-create.md +26 -3
- package/.aios-core/development/tasks/squad-creator-extend.md +411 -0
- package/.aios-core/development/tasks/squad-creator-validate.md +9 -1
- package/.aios-core/development/tasks/waves.md +205 -0
- package/.aios-core/development/templates/squad/agent-template.md +69 -0
- package/.aios-core/development/templates/squad/checklist-template.md +82 -0
- package/.aios-core/development/templates/squad/data-template.yaml +105 -0
- package/.aios-core/development/templates/squad/script-template.js +179 -0
- package/.aios-core/development/templates/squad/task-template.md +125 -0
- package/.aios-core/development/templates/squad/template-template.md +97 -0
- package/.aios-core/development/templates/squad/tool-template.js +103 -0
- package/.aios-core/development/templates/squad/workflow-template.yaml +108 -0
- package/.aios-core/infrastructure/scripts/test-generator.js +8 -8
- package/.aios-core/infrastructure/scripts/test-quality-assessment.js +5 -5
- package/.aios-core/infrastructure/scripts/test-utilities.js +3 -3
- package/.aios-core/install-manifest.yaml +97 -33
- package/.aios-core/quality/metrics-collector.js +27 -0
- package/.aios-core/scripts/session-context-loader.js +13 -254
- package/.aios-core/scripts/test-template-system.js +6 -6
- package/.aios-core/utils/aios-validator.js +25 -0
- package/.aios-core/workflow-intelligence/__tests__/confidence-scorer.test.js +334 -0
- package/.aios-core/workflow-intelligence/__tests__/integration.test.js +337 -0
- package/.aios-core/workflow-intelligence/__tests__/suggestion-engine.test.js +431 -0
- package/.aios-core/workflow-intelligence/__tests__/wave-analyzer.test.js +458 -0
- package/.aios-core/workflow-intelligence/__tests__/workflow-registry.test.js +302 -0
- package/.aios-core/workflow-intelligence/engine/confidence-scorer.js +305 -0
- package/.aios-core/workflow-intelligence/engine/output-formatter.js +285 -0
- package/.aios-core/workflow-intelligence/engine/suggestion-engine.js +603 -0
- package/.aios-core/workflow-intelligence/engine/wave-analyzer.js +676 -0
- package/.aios-core/workflow-intelligence/index.js +327 -0
- package/.aios-core/workflow-intelligence/learning/capture-hook.js +147 -0
- package/.aios-core/workflow-intelligence/learning/index.js +230 -0
- package/.aios-core/workflow-intelligence/learning/pattern-capture.js +340 -0
- package/.aios-core/workflow-intelligence/learning/pattern-store.js +498 -0
- package/.aios-core/workflow-intelligence/learning/pattern-validator.js +309 -0
- package/.aios-core/workflow-intelligence/registry/workflow-registry.js +358 -0
- package/package.json +1 -1
- package/src/installer/brownfield-upgrader.js +1 -1
- package/bin/aios-init.backup-v1.1.4.js +0 -352
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* AIOS-FullStack Modern Installation Wizard
|
|
5
|
-
* Uses @clack/prompts for beautiful CLI experience
|
|
6
|
-
* Version: 1.1.4
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const path = require('path');
|
|
10
|
-
const fs = require('fs');
|
|
11
|
-
const fse = require('fs-extra');
|
|
12
|
-
const yaml = require('yaml');
|
|
13
|
-
const { execSync } = require('child_process');
|
|
14
|
-
const p = require('@clack/prompts');
|
|
15
|
-
const pc = require('picocolors');
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Smart path resolution for AIOS Core modules
|
|
19
|
-
*/
|
|
20
|
-
function resolveAiosCoreModule(modulePath) {
|
|
21
|
-
const aiosCoreModule = path.join(__dirname, '..', '.aios-core', modulePath);
|
|
22
|
-
|
|
23
|
-
const moduleExists = fs.existsSync(aiosCoreModule + '.js') ||
|
|
24
|
-
fs.existsSync(aiosCoreModule + '/index.js') ||
|
|
25
|
-
fs.existsSync(aiosCoreModule);
|
|
26
|
-
|
|
27
|
-
if (!moduleExists) {
|
|
28
|
-
throw new Error(
|
|
29
|
-
`Cannot find AIOS Core module: ${modulePath}\n` +
|
|
30
|
-
`Searched: ${aiosCoreModule}\n` +
|
|
31
|
-
'Please ensure @synkra/aios-core is installed correctly.',
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return require(aiosCoreModule);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Load AIOS Core modules
|
|
39
|
-
const { detectRepositoryContext } = resolveAiosCoreModule('utils/repository-detector');
|
|
40
|
-
const { ClickUpAdapter } = resolveAiosCoreModule('utils/pm-adapters/clickup-adapter');
|
|
41
|
-
const { GitHubProjectsAdapter } = resolveAiosCoreModule('utils/pm-adapters/github-adapter');
|
|
42
|
-
const { JiraAdapter } = resolveAiosCoreModule('utils/pm-adapters/jira-adapter');
|
|
43
|
-
|
|
44
|
-
async function main() {
|
|
45
|
-
console.clear();
|
|
46
|
-
|
|
47
|
-
p.intro(pc.bgCyan(pc.black(' AIOS-FullStack Installation ')));
|
|
48
|
-
|
|
49
|
-
const projectRoot = process.cwd();
|
|
50
|
-
let context = detectRepositoryContext();
|
|
51
|
-
|
|
52
|
-
// Setup prerequisites if needed
|
|
53
|
-
if (!context) {
|
|
54
|
-
const s = p.spinner();
|
|
55
|
-
s.start('Setting up project prerequisites');
|
|
56
|
-
|
|
57
|
-
// Check for git repository
|
|
58
|
-
let hasGit = false;
|
|
59
|
-
try {
|
|
60
|
-
execSync('git rev-parse --git-dir', { cwd: projectRoot, stdio: 'ignore' });
|
|
61
|
-
hasGit = true;
|
|
62
|
-
} catch (err) {
|
|
63
|
-
// Not a git repo
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (!hasGit) {
|
|
67
|
-
try {
|
|
68
|
-
execSync('git init', { cwd: projectRoot, stdio: 'ignore' });
|
|
69
|
-
s.message('Git repository initialized');
|
|
70
|
-
} catch (err) {
|
|
71
|
-
s.stop('Failed to initialize git repository');
|
|
72
|
-
p.cancel('Installation cancelled');
|
|
73
|
-
process.exit(1);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Check for package.json
|
|
78
|
-
const packageJsonPath = path.join(projectRoot, 'package.json');
|
|
79
|
-
if (!fs.existsSync(packageJsonPath)) {
|
|
80
|
-
const dirName = path.basename(projectRoot);
|
|
81
|
-
const defaultPackage = {
|
|
82
|
-
name: dirName.toLowerCase().replace(/\s+/g, '-'),
|
|
83
|
-
version: '1.0.0',
|
|
84
|
-
description: 'AIOS-FullStack project',
|
|
85
|
-
main: 'index.js',
|
|
86
|
-
scripts: { test: 'echo "Error: no test specified" && exit 1' },
|
|
87
|
-
keywords: [],
|
|
88
|
-
author: '',
|
|
89
|
-
license: 'ISC',
|
|
90
|
-
};
|
|
91
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(defaultPackage, null, 2));
|
|
92
|
-
s.message('package.json created');
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
s.stop('Prerequisites ready');
|
|
96
|
-
|
|
97
|
-
// Try to detect context again
|
|
98
|
-
context = detectRepositoryContext();
|
|
99
|
-
|
|
100
|
-
// If still no context, create minimal one
|
|
101
|
-
if (!context) {
|
|
102
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
103
|
-
context = {
|
|
104
|
-
projectRoot,
|
|
105
|
-
packageName: packageJson.name,
|
|
106
|
-
packageVersion: packageJson.version,
|
|
107
|
-
repositoryUrl: 'local-repository',
|
|
108
|
-
frameworkLocation: path.join(__dirname, '..'),
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
p.note(`Package: ${context.packageName}`, 'Project Context');
|
|
114
|
-
|
|
115
|
-
// Step 1: Installation Mode
|
|
116
|
-
const installMode = await p.select({
|
|
117
|
-
message: 'How are you using AIOS-FullStack?',
|
|
118
|
-
options: [
|
|
119
|
-
{
|
|
120
|
-
value: 'project-development',
|
|
121
|
-
label: 'Using AIOS in a project',
|
|
122
|
-
hint: 'Framework files added to .gitignore',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
value: 'framework-development',
|
|
126
|
-
label: 'Developing AIOS framework itself',
|
|
127
|
-
hint: 'Framework files are source code',
|
|
128
|
-
},
|
|
129
|
-
],
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
if (p.isCancel(installMode)) {
|
|
133
|
-
p.cancel('Installation cancelled');
|
|
134
|
-
process.exit(0);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Save installation config
|
|
138
|
-
const config = {
|
|
139
|
-
installation: {
|
|
140
|
-
mode: installMode,
|
|
141
|
-
detected_at: new Date().toISOString(),
|
|
142
|
-
},
|
|
143
|
-
repository: {
|
|
144
|
-
url: context.repositoryUrl,
|
|
145
|
-
auto_detect: true,
|
|
146
|
-
},
|
|
147
|
-
framework: {
|
|
148
|
-
source: installMode === 'framework-development' ? 'local' : 'npm',
|
|
149
|
-
version: context.packageVersion,
|
|
150
|
-
location: context.frameworkLocation,
|
|
151
|
-
},
|
|
152
|
-
git_ignore_rules: {
|
|
153
|
-
mode: installMode,
|
|
154
|
-
ignore_framework_files: installMode === 'project-development',
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const configPath = path.join(context.projectRoot, '.aios-installation-config.yaml');
|
|
159
|
-
fs.writeFileSync(configPath, yaml.stringify(config));
|
|
160
|
-
|
|
161
|
-
// Update .gitignore
|
|
162
|
-
updateGitIgnore(installMode, context.projectRoot);
|
|
163
|
-
|
|
164
|
-
// Step 2: PM Tool
|
|
165
|
-
const pmTool = await p.select({
|
|
166
|
-
message: 'Do you use a project management tool?',
|
|
167
|
-
options: [
|
|
168
|
-
{ value: 'local', label: 'None (local YAML files only)', hint: 'Recommended' },
|
|
169
|
-
{ value: 'clickup', label: 'ClickUp', hint: 'Requires API token' },
|
|
170
|
-
{ value: 'github-projects', label: 'GitHub Projects', hint: 'Uses gh auth' },
|
|
171
|
-
{ value: 'jira', label: 'Jira', hint: 'Requires API token' },
|
|
172
|
-
],
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
if (p.isCancel(pmTool)) {
|
|
176
|
-
p.cancel('Installation cancelled');
|
|
177
|
-
process.exit(0);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Save PM config
|
|
181
|
-
savePMConfig(pmTool, {}, context.projectRoot);
|
|
182
|
-
|
|
183
|
-
// Step 3: IDE Selection
|
|
184
|
-
const ide = await p.select({
|
|
185
|
-
message: 'Which IDE will you use?',
|
|
186
|
-
options: [
|
|
187
|
-
{ value: 'claude', label: 'Claude Code', hint: 'Recommended' },
|
|
188
|
-
{ value: 'windsurf', label: 'Windsurf' },
|
|
189
|
-
{ value: 'cursor', label: 'Cursor' },
|
|
190
|
-
{ value: 'none', label: 'Skip IDE setup' },
|
|
191
|
-
],
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
if (p.isCancel(ide)) {
|
|
195
|
-
p.cancel('Installation cancelled');
|
|
196
|
-
process.exit(0);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Step 4: Copy AIOS Core files
|
|
200
|
-
const s = p.spinner();
|
|
201
|
-
s.start('Installing AIOS Core files');
|
|
202
|
-
|
|
203
|
-
const sourceCoreDir = path.join(context.frameworkLocation, '.aios-core');
|
|
204
|
-
const targetCoreDir = path.join(context.projectRoot, '.aios-core');
|
|
205
|
-
|
|
206
|
-
if (fs.existsSync(sourceCoreDir)) {
|
|
207
|
-
await fse.copy(sourceCoreDir, targetCoreDir);
|
|
208
|
-
s.message('AIOS Core files installed (11 agents, 68 tasks, 23 templates)');
|
|
209
|
-
} else {
|
|
210
|
-
s.stop('AIOS Core files not found');
|
|
211
|
-
p.cancel('Installation failed');
|
|
212
|
-
process.exit(1);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// Copy IDE rules if IDE was selected
|
|
216
|
-
if (ide !== 'none') {
|
|
217
|
-
const ideRulesMap = {
|
|
218
|
-
'claude': { source: 'claude-rules.md', target: '.claude/CLAUDE.md' },
|
|
219
|
-
'windsurf': { source: 'windsurf-rules.md', target: '.windsurf/rules.md' },
|
|
220
|
-
'cursor': { source: 'cursor-rules.md', target: '.cursor/rules.md' },
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
const ideConfig = ideRulesMap[ide];
|
|
224
|
-
if (ideConfig) {
|
|
225
|
-
const sourceRules = path.join(targetCoreDir, 'templates', 'ide-rules', ideConfig.source);
|
|
226
|
-
const targetRules = path.join(context.projectRoot, ideConfig.target);
|
|
227
|
-
|
|
228
|
-
if (fs.existsSync(sourceRules)) {
|
|
229
|
-
await fse.ensureDir(path.dirname(targetRules));
|
|
230
|
-
await fse.copy(sourceRules, targetRules);
|
|
231
|
-
s.message(`${ide.charAt(0).toUpperCase() + ide.slice(1)} rules installed`);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
s.stop('Core files installed');
|
|
237
|
-
|
|
238
|
-
// Step 5: Expansion Packs
|
|
239
|
-
const sourceExpansionDir = path.join(context.frameworkLocation, 'expansion-packs');
|
|
240
|
-
const availablePacks = [];
|
|
241
|
-
|
|
242
|
-
if (fs.existsSync(sourceExpansionDir)) {
|
|
243
|
-
const packs = fs.readdirSync(sourceExpansionDir).filter(f =>
|
|
244
|
-
fs.statSync(path.join(sourceExpansionDir, f)).isDirectory(),
|
|
245
|
-
);
|
|
246
|
-
availablePacks.push(...packs);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (availablePacks.length > 0) {
|
|
250
|
-
const expansionPacks = await p.multiselect({
|
|
251
|
-
message: 'Select expansion packs to install (optional)',
|
|
252
|
-
options: availablePacks.map(pack => ({
|
|
253
|
-
value: pack,
|
|
254
|
-
label: pack,
|
|
255
|
-
})),
|
|
256
|
-
required: false,
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
if (!p.isCancel(expansionPacks) && expansionPacks.length > 0) {
|
|
260
|
-
const s2 = p.spinner();
|
|
261
|
-
s2.start('Installing expansion packs');
|
|
262
|
-
|
|
263
|
-
const targetExpansionDir = path.join(context.projectRoot, 'expansion-packs');
|
|
264
|
-
|
|
265
|
-
for (const pack of expansionPacks) {
|
|
266
|
-
const sourcePack = path.join(sourceExpansionDir, pack);
|
|
267
|
-
const targetPack = path.join(targetExpansionDir, pack);
|
|
268
|
-
await fse.copy(sourcePack, targetPack);
|
|
269
|
-
s2.message(`Installed: ${pack}`);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
s2.stop(`${expansionPacks.length} expansion pack(s) installed`);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
p.outro(pc.green('✓ AIOS-FullStack installation complete!'));
|
|
277
|
-
|
|
278
|
-
console.log('');
|
|
279
|
-
p.note(
|
|
280
|
-
`Mode: ${installMode}\n` +
|
|
281
|
-
`Repository: ${context.repositoryUrl}\n` +
|
|
282
|
-
`IDE: ${ide !== 'none' ? ide : 'none'}\n` +
|
|
283
|
-
`PM Tool: ${pmTool}`,
|
|
284
|
-
'Configuration Summary',
|
|
285
|
-
);
|
|
286
|
-
|
|
287
|
-
console.log('');
|
|
288
|
-
console.log(pc.cyan('Next steps:'));
|
|
289
|
-
console.log(' • Activate agents using @agent-name (e.g., @dev, @github-devops)');
|
|
290
|
-
console.log(' • Run "aios --help" to see available commands');
|
|
291
|
-
console.log(' • Check documentation in docs/ directory');
|
|
292
|
-
console.log('');
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Updates .gitignore file based on installation mode
|
|
297
|
-
*/
|
|
298
|
-
function updateGitIgnore(mode, projectRoot) {
|
|
299
|
-
const gitignorePath = path.join(projectRoot, '.gitignore');
|
|
300
|
-
|
|
301
|
-
let gitignore = '';
|
|
302
|
-
if (fs.existsSync(gitignorePath)) {
|
|
303
|
-
gitignore = fs.readFileSync(gitignorePath, 'utf8');
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
if (mode === 'project-development') {
|
|
307
|
-
const frameworkRules = [
|
|
308
|
-
'',
|
|
309
|
-
'# AIOS-FullStack Framework Files (auto-managed - do not edit)',
|
|
310
|
-
'.aios-core/',
|
|
311
|
-
'node_modules/@aios/',
|
|
312
|
-
'outputs/minds/',
|
|
313
|
-
'.aios-installation-config.yaml',
|
|
314
|
-
'# End AIOS-FullStack auto-managed section',
|
|
315
|
-
'',
|
|
316
|
-
];
|
|
317
|
-
|
|
318
|
-
const hasFrameworkSection = gitignore.includes('# AIOS-FullStack Framework Files');
|
|
319
|
-
|
|
320
|
-
if (!hasFrameworkSection) {
|
|
321
|
-
gitignore += frameworkRules.join('\n');
|
|
322
|
-
fs.writeFileSync(gitignorePath, gitignore);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Save PM configuration
|
|
329
|
-
*/
|
|
330
|
-
function savePMConfig(pmTool, config, projectRoot) {
|
|
331
|
-
const pmConfigData = {
|
|
332
|
-
pm_tool: {
|
|
333
|
-
type: pmTool,
|
|
334
|
-
configured_at: new Date().toISOString(),
|
|
335
|
-
config: config,
|
|
336
|
-
},
|
|
337
|
-
sync_behavior: {
|
|
338
|
-
auto_sync_on_status_change: true,
|
|
339
|
-
create_tasks_on_story_creation: false,
|
|
340
|
-
bidirectional_sync: false,
|
|
341
|
-
},
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
const configPath = path.join(projectRoot, '.aios-pm-config.yaml');
|
|
345
|
-
fs.writeFileSync(configPath, yaml.stringify(pmConfigData));
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Run installer with error handling
|
|
349
|
-
main().catch((error) => {
|
|
350
|
-
p.log.error('Installation failed: ' + error.message);
|
|
351
|
-
process.exit(1);
|
|
352
|
-
});
|