aios-core 4.2.5 → 4.2.7

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 (32) hide show
  1. package/.aios-core/core/code-intel/code-intel-client.js +280 -0
  2. package/.aios-core/core/code-intel/code-intel-enricher.js +159 -0
  3. package/.aios-core/core/code-intel/index.js +137 -0
  4. package/.aios-core/core/code-intel/providers/code-graph-provider.js +201 -0
  5. package/.aios-core/core/code-intel/providers/provider-interface.js +108 -0
  6. package/.aios-core/core/orchestration/context-manager.js +333 -5
  7. package/.aios-core/core/orchestration/dashboard-integration.js +17 -1
  8. package/.aios-core/core/orchestration/execution-profile-resolver.js +107 -0
  9. package/.aios-core/core/orchestration/index.js +3 -0
  10. package/.aios-core/core/orchestration/skill-dispatcher.js +2 -0
  11. package/.aios-core/core/orchestration/subagent-prompt-builder.js +2 -0
  12. package/.aios-core/core/orchestration/workflow-orchestrator.js +113 -5
  13. package/.aios-core/data/entity-registry.yaml +44 -22
  14. package/.aios-core/development/agents/ux-design-expert.md +1 -1
  15. package/.aios-core/development/checklists/brownfield-compatibility-checklist.md +114 -0
  16. package/.aios-core/development/scripts/workflow-state-manager.js +128 -1
  17. package/.aios-core/development/tasks/next.md +36 -5
  18. package/.aios-core/hooks/ids-post-commit.js +29 -1
  19. package/.aios-core/hooks/ids-pre-push.js +29 -1
  20. package/.aios-core/infrastructure/contracts/compatibility/aios-4.0.4.yaml +44 -0
  21. package/.aios-core/infrastructure/scripts/validate-parity.js +238 -2
  22. package/.aios-core/install-manifest.yaml +63 -27
  23. package/.aios-core/product/templates/brownfield-risk-report-tmpl.yaml +277 -0
  24. package/.aios-core/workflow-intelligence/engine/suggestion-engine.js +114 -5
  25. package/LICENSE +13 -1
  26. package/README.md +39 -9
  27. package/package.json +8 -6
  28. package/packages/installer/src/wizard/ide-config-generator.js +0 -117
  29. package/packages/installer/src/wizard/index.js +2 -118
  30. package/packages/installer/src/wizard/pro-setup.js +58 -12
  31. package/pro/license/license-api.js +9 -9
  32. package/scripts/semantic-lint.js +190 -0
@@ -0,0 +1,190 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+
7
+ const DEFAULT_TARGETS = [
8
+ 'README.md',
9
+ 'docs/getting-started.md',
10
+ 'docs/roadmap.md',
11
+ 'docs/strategy',
12
+ ];
13
+
14
+ const SEMANTIC_RULESET_VERSION = '1.0.0';
15
+
16
+ const RULES = [
17
+ {
18
+ id: 'deprecated-expansion-pack',
19
+ severity: 'error',
20
+ pattern: /\bexpansion pack(s)?\b/gi,
21
+ replacement: 'squad',
22
+ reason: 'Use AIOS-first taxonomy for domain agent sets.',
23
+ },
24
+ {
25
+ id: 'deprecated-permission-mode',
26
+ severity: 'error',
27
+ pattern: /\bpermission mode(s)?\b/gi,
28
+ replacement: 'execution profile',
29
+ reason: 'Use risk-oriented autonomy terminology.',
30
+ },
31
+ {
32
+ id: 'legacy-workflow-state-term',
33
+ severity: 'warn',
34
+ pattern: /\bworkflow state\b/gi,
35
+ replacement: 'flow-state',
36
+ reason: 'Prefer flow-state in product-facing differentiation messaging.',
37
+ },
38
+ ];
39
+
40
+ function parseArgs(argv = process.argv.slice(2)) {
41
+ const args = new Set(argv.filter((arg) => arg.startsWith('--')));
42
+ const files = argv.filter((arg) => !arg.startsWith('--'));
43
+ return {
44
+ staged: args.has('--staged'),
45
+ json: args.has('--json'),
46
+ files,
47
+ };
48
+ }
49
+
50
+ function collectFiles(inputPaths, projectRoot = process.cwd()) {
51
+ const selected = inputPaths && inputPaths.length > 0 ? inputPaths : DEFAULT_TARGETS;
52
+ const files = [];
53
+
54
+ for (const input of selected) {
55
+ const resolved = path.resolve(projectRoot, input);
56
+ if (!fs.existsSync(resolved)) {
57
+ continue;
58
+ }
59
+
60
+ const stat = fs.statSync(resolved);
61
+ if (stat.isFile()) {
62
+ files.push(resolved);
63
+ continue;
64
+ }
65
+
66
+ if (stat.isDirectory()) {
67
+ walkDirectory(resolved, files);
68
+ }
69
+ }
70
+
71
+ return files;
72
+ }
73
+
74
+ function walkDirectory(dir, files) {
75
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
76
+ for (const entry of entries) {
77
+ const full = path.join(dir, entry.name);
78
+ if (entry.isDirectory()) {
79
+ walkDirectory(full, files);
80
+ continue;
81
+ }
82
+ if (/\.(md|js|yaml|yml)$/i.test(entry.name)) {
83
+ files.push(full);
84
+ }
85
+ }
86
+ }
87
+
88
+ function lintContent(content, relativePath) {
89
+ const findings = [];
90
+
91
+ for (const rule of RULES) {
92
+ const regex = new RegExp(rule.pattern.source, rule.pattern.flags);
93
+ let match;
94
+ while ((match = regex.exec(content)) !== null) {
95
+ const line = 1 + content.slice(0, match.index).split('\n').length - 1;
96
+ findings.push({
97
+ ruleId: rule.id,
98
+ severity: rule.severity,
99
+ term: match[0],
100
+ replacement: rule.replacement,
101
+ file: relativePath,
102
+ line,
103
+ reason: rule.reason,
104
+ });
105
+ }
106
+ }
107
+
108
+ return findings;
109
+ }
110
+
111
+ function runSemanticLint(options = {}, deps = {}) {
112
+ const projectRoot = options.projectRoot || process.cwd();
113
+ const targets = options.targets || [];
114
+ const fileCollector = deps.collectFiles || collectFiles;
115
+ const fileReader = deps.readFile || ((filePath) => fs.readFileSync(filePath, 'utf8'));
116
+ const files = fileCollector(targets, projectRoot);
117
+
118
+ const findings = [];
119
+ for (const filePath of files) {
120
+ const content = fileReader(filePath);
121
+ const relativePath = path.relative(projectRoot, filePath);
122
+ findings.push(...lintContent(content, relativePath));
123
+ }
124
+
125
+ const errors = findings.filter((f) => f.severity === 'error');
126
+ const warnings = findings.filter((f) => f.severity === 'warn');
127
+ return {
128
+ ok: errors.length === 0,
129
+ version: SEMANTIC_RULESET_VERSION,
130
+ filesScanned: files.length,
131
+ findings,
132
+ errors,
133
+ warnings,
134
+ };
135
+ }
136
+
137
+ function formatHuman(result) {
138
+ const lines = [];
139
+ lines.push(`Semantic Lint v${result.version}`);
140
+ lines.push(`Files scanned: ${result.filesScanned}`);
141
+
142
+ if (result.findings.length === 0) {
143
+ lines.push('✅ No semantic term regressions found');
144
+ return lines.join('\n');
145
+ }
146
+
147
+ for (const finding of result.findings) {
148
+ lines.push(
149
+ `${finding.severity === 'error' ? '❌' : '⚠️'} ${finding.file}:${finding.line} ${finding.ruleId} -> "${finding.term}" (use "${finding.replacement}")`,
150
+ );
151
+ }
152
+
153
+ lines.push('');
154
+ lines.push(
155
+ result.ok
156
+ ? `✅ Completed with ${result.warnings.length} warning(s)`
157
+ : `❌ Failed with ${result.errors.length} error(s) and ${result.warnings.length} warning(s)`,
158
+ );
159
+ return lines.join('\n');
160
+ }
161
+
162
+ function main() {
163
+ const args = parseArgs();
164
+ const targets = args.files.length > 0
165
+ ? args.files
166
+ : (args.staged ? [] : DEFAULT_TARGETS);
167
+ const result = runSemanticLint({ targets });
168
+
169
+ if (args.json) {
170
+ console.log(JSON.stringify(result, null, 2));
171
+ } else {
172
+ console.log(formatHuman(result));
173
+ }
174
+
175
+ if (!result.ok) {
176
+ process.exitCode = 1;
177
+ }
178
+ }
179
+
180
+ if (require.main === module) {
181
+ main();
182
+ }
183
+
184
+ module.exports = {
185
+ parseArgs,
186
+ collectFiles,
187
+ lintContent,
188
+ runSemanticLint,
189
+ RULES,
190
+ };