aios-core 4.2.13 → 4.2.14

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 (97) hide show
  1. package/.aios-core/core/code-intel/helpers/dev-helper.js +206 -0
  2. package/.aios-core/core/registry/registry-schema.json +166 -166
  3. package/.aios-core/core/synapse/diagnostics/collectors/hook-collector.js +3 -3
  4. package/.aios-core/data/entity-registry.yaml +27 -0
  5. package/.aios-core/development/scripts/approval-workflow.js +642 -642
  6. package/.aios-core/development/scripts/backup-manager.js +606 -606
  7. package/.aios-core/development/scripts/branch-manager.js +389 -389
  8. package/.aios-core/development/scripts/code-quality-improver.js +1311 -1311
  9. package/.aios-core/development/scripts/commit-message-generator.js +849 -849
  10. package/.aios-core/development/scripts/conflict-resolver.js +674 -674
  11. package/.aios-core/development/scripts/dependency-analyzer.js +637 -637
  12. package/.aios-core/development/scripts/diff-generator.js +351 -351
  13. package/.aios-core/development/scripts/elicitation-engine.js +384 -384
  14. package/.aios-core/development/scripts/elicitation-session-manager.js +299 -299
  15. package/.aios-core/development/scripts/git-wrapper.js +461 -461
  16. package/.aios-core/development/scripts/manifest-preview.js +244 -244
  17. package/.aios-core/development/scripts/metrics-tracker.js +775 -775
  18. package/.aios-core/development/scripts/modification-validator.js +554 -554
  19. package/.aios-core/development/scripts/pattern-learner.js +1224 -1224
  20. package/.aios-core/development/scripts/performance-analyzer.js +757 -757
  21. package/.aios-core/development/scripts/refactoring-suggester.js +1138 -1138
  22. package/.aios-core/development/scripts/rollback-handler.js +530 -530
  23. package/.aios-core/development/scripts/security-checker.js +358 -358
  24. package/.aios-core/development/scripts/template-engine.js +239 -239
  25. package/.aios-core/development/scripts/template-validator.js +278 -278
  26. package/.aios-core/development/scripts/test-generator.js +843 -843
  27. package/.aios-core/development/scripts/transaction-manager.js +589 -589
  28. package/.aios-core/development/scripts/usage-tracker.js +673 -673
  29. package/.aios-core/development/scripts/validate-filenames.js +226 -226
  30. package/.aios-core/development/scripts/version-tracker.js +526 -526
  31. package/.aios-core/development/scripts/yaml-validator.js +396 -396
  32. package/.aios-core/development/tasks/build-autonomous.md +10 -4
  33. package/.aios-core/development/tasks/create-service.md +23 -0
  34. package/.aios-core/development/tasks/dev-develop-story.md +12 -6
  35. package/.aios-core/development/tasks/dev-suggest-refactoring.md +7 -1
  36. package/.aios-core/development/tasks/publish-npm.md +3 -3
  37. package/.aios-core/hooks/unified/README.md +1 -1
  38. package/.aios-core/install-manifest.yaml +65 -61
  39. package/.aios-core/manifests/schema/manifest-schema.json +190 -190
  40. package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
  41. package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
  42. package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
  43. package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
  44. package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
  45. package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
  46. package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
  47. package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
  48. package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
  49. package/.aios-core/product/templates/eslintrc-security.json +32 -32
  50. package/.aios-core/product/templates/github-actions-cd.yml +212 -212
  51. package/.aios-core/product/templates/github-actions-ci.yml +172 -172
  52. package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
  53. package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
  54. package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
  55. package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
  56. package/README.en.md +747 -0
  57. package/README.md +4 -2
  58. package/bin/aios.js +7 -4
  59. package/package.json +1 -1
  60. package/packages/aios-pro-cli/src/recover.js +1 -1
  61. package/packages/installer/src/wizard/ide-config-generator.js +6 -6
  62. package/packages/installer/src/wizard/pro-setup.js +3 -3
  63. package/scripts/package-synapse.js +5 -5
  64. package/scripts/validate-package-completeness.js +3 -3
  65. package/.aios-core/.session/current-session.json +0 -14
  66. package/.aios-core/data/registry-update-log.jsonl +0 -191
  67. package/.aios-core/docs/SHARD-TRANSLATION-GUIDE.md +0 -335
  68. package/.aios-core/docs/component-creation-guide.md +0 -458
  69. package/.aios-core/docs/session-update-pattern.md +0 -307
  70. package/.aios-core/docs/standards/AIOS-FRAMEWORK-MASTER.md +0 -1963
  71. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-SUMMARY.md +0 -1190
  72. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1.md +0 -439
  73. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO.md +0 -5398
  74. package/.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md +0 -523
  75. package/.aios-core/docs/template-syntax.md +0 -267
  76. package/.aios-core/docs/troubleshooting-guide.md +0 -625
  77. package/.aios-core/infrastructure/tests/utilities-audit-results.json +0 -501
  78. package/.aios-core/manifests/agents.csv +0 -29
  79. package/.aios-core/manifests/tasks.csv +0 -198
  80. package/.aios-core/manifests/workers.csv +0 -204
  81. package/.claude/rules/agent-authority.md +0 -105
  82. package/.claude/rules/coderabbit-integration.md +0 -93
  83. package/.claude/rules/ids-principles.md +0 -112
  84. package/.claude/rules/story-lifecycle.md +0 -139
  85. package/.claude/rules/workflow-execution.md +0 -150
  86. package/pro/README.md +0 -66
  87. package/pro/license/degradation.js +0 -220
  88. package/pro/license/errors.js +0 -450
  89. package/pro/license/feature-gate.js +0 -354
  90. package/pro/license/index.js +0 -181
  91. package/pro/license/license-api.js +0 -651
  92. package/pro/license/license-cache.js +0 -523
  93. package/pro/license/license-crypto.js +0 -303
  94. package/scripts/glue/README.md +0 -355
  95. package/scripts/glue/compose-agent-prompt.cjs +0 -362
  96. /package/.claude/hooks/{precompact-session-digest.js → precompact-session-digest.cjs} +0 -0
  97. /package/.claude/hooks/{synapse-engine.js → synapse-engine.cjs} +0 -0
@@ -1,226 +1,226 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Validate Architecture and PRD Filenames
4
- *
5
- * Ensures all sharded documentation files follow English naming conventions
6
- * and don't contain Portuguese characters or untranslated terms.
7
- *
8
- * Usage:
9
- * node .aios-core/utils/validate-filenames.js
10
- * node .aios-core/utils/validate-filenames.js --fix
11
- */
12
-
13
- const fs = require('fs');
14
- const path = require('path');
15
-
16
- // Portuguese characters that should not appear in filenames
17
- const PORTUGUESE_CHARS = /[ÔàâãéêíóÓõúüç]/i;
18
-
19
- // Common Portuguese terms that should be translated
20
- const PORTUGUESE_TERMS = {
21
- 'visao': 'vision',
22
- 'viso': 'vision',
23
- 'produto': 'product',
24
- 'problema': 'problem',
25
- 'objetivos': 'objectives',
26
- 'glossario': 'glossary',
27
- 'glossrio': 'glossary',
28
- 'terminologia': 'terminology',
29
- 'premissas': 'assumptions',
30
- 'restricoes': 'constraints',
31
- 'restries': 'constraints',
32
- 'stakeholders': 'stakeholders', // OK
33
- 'requisitos': 'requirements',
34
- 'arquitetura': 'architecture',
35
- 'tecnologia': 'technology',
36
- 'pilha': 'stack',
37
- 'padroes': 'standards',
38
- 'padres': 'standards',
39
- 'estrutura': 'structure',
40
- 'arvore': 'tree',
41
- 'seguranca': 'security',
42
- 'desempenho': 'performance',
43
- 'escalabilidade': 'scalability',
44
- 'confiabilidade': 'reliability',
45
- 'conformidade': 'compliance',
46
- 'riscos': 'risks',
47
- 'tecnicos': 'technical',
48
- 'tecnico': 'technical',
49
- 'negocio': 'business',
50
- 'negcios': 'business',
51
- 'infraestrutura': 'infrastructure',
52
- 'dados': 'data',
53
- 'banco': 'database',
54
- 'esquema': 'schema',
55
- 'testes': 'tests',
56
- 'estrategia': 'strategy',
57
- 'estratgia': 'strategy',
58
- 'metadados': 'metadata',
59
- 'indice': 'index',
60
- 'ndice': 'index',
61
- 'decisoes': 'decisions',
62
- 'decises': 'decisions',
63
- 'decisao': 'decision',
64
- 'deciso': 'decision'
65
- };
66
-
67
- // Expected standard filenames (architecture)
68
- const STANDARD_FILES = [
69
- 'tech-stack.md',
70
- 'coding-standards.md',
71
- 'source-tree.md',
72
- 'project-structure.md',
73
- 'unified-project-structure.md',
74
- 'testing-strategy.md',
75
- 'database-schema.md',
76
- 'data-models.md',
77
- 'api-design.md',
78
- 'architecture-diagram.md'
79
- ];
80
-
81
- class FilenameValidator {
82
- constructor(projectRoot) {
83
- this.projectRoot = projectRoot;
84
- this.errors = [];
85
- this.warnings = [];
86
- }
87
-
88
- validateDirectory(dir) {
89
- if (!fs.existsSync(dir)) {
90
- this.warnings.push(`Directory not found: ${dir}`);
91
- return;
92
- }
93
-
94
- const files = fs.readdirSync(dir);
95
-
96
- for (const file of files) {
97
- if (!file.endsWith('.md')) continue;
98
- if (file === 'index.md') continue; // index.md is always OK
99
-
100
- this.validateFilename(file, dir);
101
- }
102
- }
103
-
104
- validateFilename(filename, directory) {
105
- const basename = path.basename(filename, '.md');
106
-
107
- // Check for Portuguese characters
108
- if (PORTUGUESE_CHARS.test(basename)) {
109
- this.errors.push({
110
- file: path.join(directory, filename),
111
- issue: 'Contains Portuguese characters (accents)',
112
- suggestion: this.removeAccents(basename) + '.md'
113
- });
114
- return;
115
- }
116
-
117
- // Check for Portuguese terms
118
- const lowerBasename = basename.toLowerCase();
119
- for (const [ptTerm, enTerm] of Object.entries(PORTUGUESE_TERMS)) {
120
- if (lowerBasename.includes(ptTerm) && !STANDARD_FILES.includes(filename)) {
121
- const suggested = lowerBasename.replace(new RegExp(ptTerm, 'g'), enTerm);
122
- this.errors.push({
123
- file: path.join(directory, filename),
124
- issue: `Contains Portuguese term: "${ptTerm}"`,
125
- suggestion: suggested + '.md'
126
- });
127
- }
128
- }
129
- }
130
-
131
- removeAccents(str) {
132
- return str
133
- .normalize('NFD')
134
- .replace(/[\u0300-\u036f]/g, '')
135
- .toLowerCase();
136
- }
137
-
138
- report() {
139
- console.log('\nšŸ“‹ AIOS Filename Validation Report\n');
140
- console.log('=' .repeat(60));
141
-
142
- if (this.errors.length === 0 && this.warnings.length === 0) {
143
- console.log('āœ… All filenames are valid!\n');
144
- return true;
145
- }
146
-
147
- if (this.warnings.length > 0) {
148
- console.log('\nāš ļø Warnings:\n');
149
- this.warnings.forEach(warning => {
150
- console.log(` ${warning}`);
151
- });
152
- }
153
-
154
- if (this.errors.length > 0) {
155
- console.log('\nāŒ Errors found:\n');
156
- this.errors.forEach((error, index) => {
157
- console.log(` ${index + 1}. ${error.file}`);
158
- console.log(` Issue: ${error.issue}`);
159
- console.log(` Suggest: ${error.suggestion}\n`);
160
- });
161
-
162
- console.log(`\n${this.errors.length} filename(s) need correction.\n`);
163
- console.log('To fix these issues:');
164
- console.log('1. Re-run the shard task with updated translation rules');
165
- console.log('2. Or manually rename the files using the suggestions above');
166
- console.log('3. Or run: node .aios-core/utils/validate-filenames.js --fix\n');
167
-
168
- return false;
169
- }
170
-
171
- return true;
172
- }
173
-
174
- fix() {
175
- console.log('\nšŸ”§ Fixing filename issues...\n');
176
-
177
- let fixed = 0;
178
- for (const error of this.errors) {
179
- const oldPath = error.file;
180
- const dir = path.dirname(oldPath);
181
- const newPath = path.join(dir, error.suggestion);
182
-
183
- try {
184
- fs.renameSync(oldPath, newPath);
185
- console.log(`āœ… Renamed: ${path.basename(oldPath)} → ${path.basename(newPath)}`);
186
- fixed++;
187
- } catch (err) {
188
- console.error(`āŒ Failed to rename ${oldPath}: ${err.message}`);
189
- }
190
- }
191
-
192
- console.log(`\n✨ Fixed ${fixed} of ${this.errors.length} files.\n`);
193
- }
194
-
195
- validate() {
196
- console.log('šŸ” Validating documentation filenames...\n');
197
-
198
- // Check docs/architecture/
199
- const archDir = path.join(this.projectRoot, 'docs', 'architecture');
200
- console.log(`Checking: ${archDir}`);
201
- this.validateDirectory(archDir);
202
-
203
- // Check docs/prd/
204
- const prdDir = path.join(this.projectRoot, 'docs', 'prd');
205
- console.log(`Checking: ${prdDir}`);
206
- this.validateDirectory(prdDir);
207
-
208
- return this.report();
209
- }
210
- }
211
-
212
- // Main execution
213
- const projectRoot = process.cwd();
214
- const shouldFix = process.argv.includes('--fix');
215
-
216
- const validator = new FilenameValidator(projectRoot);
217
- const isValid = validator.validate();
218
-
219
- if (shouldFix && !isValid) {
220
- validator.fix();
221
- // Re-validate
222
- const validator2 = new FilenameValidator(projectRoot);
223
- validator2.validate();
224
- }
225
-
226
- process.exit(isValid ? 0 : 1);
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Validate Architecture and PRD Filenames
4
+ *
5
+ * Ensures all sharded documentation files follow English naming conventions
6
+ * and don't contain Portuguese characters or untranslated terms.
7
+ *
8
+ * Usage:
9
+ * node .aios-core/utils/validate-filenames.js
10
+ * node .aios-core/utils/validate-filenames.js --fix
11
+ */
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ // Portuguese characters that should not appear in filenames
17
+ const PORTUGUESE_CHARS = /[ÔàâãéêíóÓõúüç]/i;
18
+
19
+ // Common Portuguese terms that should be translated
20
+ const PORTUGUESE_TERMS = {
21
+ 'visao': 'vision',
22
+ 'viso': 'vision',
23
+ 'produto': 'product',
24
+ 'problema': 'problem',
25
+ 'objetivos': 'objectives',
26
+ 'glossario': 'glossary',
27
+ 'glossrio': 'glossary',
28
+ 'terminologia': 'terminology',
29
+ 'premissas': 'assumptions',
30
+ 'restricoes': 'constraints',
31
+ 'restries': 'constraints',
32
+ 'stakeholders': 'stakeholders', // OK
33
+ 'requisitos': 'requirements',
34
+ 'arquitetura': 'architecture',
35
+ 'tecnologia': 'technology',
36
+ 'pilha': 'stack',
37
+ 'padroes': 'standards',
38
+ 'padres': 'standards',
39
+ 'estrutura': 'structure',
40
+ 'arvore': 'tree',
41
+ 'seguranca': 'security',
42
+ 'desempenho': 'performance',
43
+ 'escalabilidade': 'scalability',
44
+ 'confiabilidade': 'reliability',
45
+ 'conformidade': 'compliance',
46
+ 'riscos': 'risks',
47
+ 'tecnicos': 'technical',
48
+ 'tecnico': 'technical',
49
+ 'negocio': 'business',
50
+ 'negcios': 'business',
51
+ 'infraestrutura': 'infrastructure',
52
+ 'dados': 'data',
53
+ 'banco': 'database',
54
+ 'esquema': 'schema',
55
+ 'testes': 'tests',
56
+ 'estrategia': 'strategy',
57
+ 'estratgia': 'strategy',
58
+ 'metadados': 'metadata',
59
+ 'indice': 'index',
60
+ 'ndice': 'index',
61
+ 'decisoes': 'decisions',
62
+ 'decises': 'decisions',
63
+ 'decisao': 'decision',
64
+ 'deciso': 'decision'
65
+ };
66
+
67
+ // Expected standard filenames (architecture)
68
+ const STANDARD_FILES = [
69
+ 'tech-stack.md',
70
+ 'coding-standards.md',
71
+ 'source-tree.md',
72
+ 'project-structure.md',
73
+ 'unified-project-structure.md',
74
+ 'testing-strategy.md',
75
+ 'database-schema.md',
76
+ 'data-models.md',
77
+ 'api-design.md',
78
+ 'architecture-diagram.md'
79
+ ];
80
+
81
+ class FilenameValidator {
82
+ constructor(projectRoot) {
83
+ this.projectRoot = projectRoot;
84
+ this.errors = [];
85
+ this.warnings = [];
86
+ }
87
+
88
+ validateDirectory(dir) {
89
+ if (!fs.existsSync(dir)) {
90
+ this.warnings.push(`Directory not found: ${dir}`);
91
+ return;
92
+ }
93
+
94
+ const files = fs.readdirSync(dir);
95
+
96
+ for (const file of files) {
97
+ if (!file.endsWith('.md')) continue;
98
+ if (file === 'index.md') continue; // index.md is always OK
99
+
100
+ this.validateFilename(file, dir);
101
+ }
102
+ }
103
+
104
+ validateFilename(filename, directory) {
105
+ const basename = path.basename(filename, '.md');
106
+
107
+ // Check for Portuguese characters
108
+ if (PORTUGUESE_CHARS.test(basename)) {
109
+ this.errors.push({
110
+ file: path.join(directory, filename),
111
+ issue: 'Contains Portuguese characters (accents)',
112
+ suggestion: this.removeAccents(basename) + '.md'
113
+ });
114
+ return;
115
+ }
116
+
117
+ // Check for Portuguese terms
118
+ const lowerBasename = basename.toLowerCase();
119
+ for (const [ptTerm, enTerm] of Object.entries(PORTUGUESE_TERMS)) {
120
+ if (lowerBasename.includes(ptTerm) && !STANDARD_FILES.includes(filename)) {
121
+ const suggested = lowerBasename.replace(new RegExp(ptTerm, 'g'), enTerm);
122
+ this.errors.push({
123
+ file: path.join(directory, filename),
124
+ issue: `Contains Portuguese term: "${ptTerm}"`,
125
+ suggestion: suggested + '.md'
126
+ });
127
+ }
128
+ }
129
+ }
130
+
131
+ removeAccents(str) {
132
+ return str
133
+ .normalize('NFD')
134
+ .replace(/[\u0300-\u036f]/g, '')
135
+ .toLowerCase();
136
+ }
137
+
138
+ report() {
139
+ console.log('\nšŸ“‹ AIOS Filename Validation Report\n');
140
+ console.log('=' .repeat(60));
141
+
142
+ if (this.errors.length === 0 && this.warnings.length === 0) {
143
+ console.log('āœ… All filenames are valid!\n');
144
+ return true;
145
+ }
146
+
147
+ if (this.warnings.length > 0) {
148
+ console.log('\nāš ļø Warnings:\n');
149
+ this.warnings.forEach(warning => {
150
+ console.log(` ${warning}`);
151
+ });
152
+ }
153
+
154
+ if (this.errors.length > 0) {
155
+ console.log('\nāŒ Errors found:\n');
156
+ this.errors.forEach((error, index) => {
157
+ console.log(` ${index + 1}. ${error.file}`);
158
+ console.log(` Issue: ${error.issue}`);
159
+ console.log(` Suggest: ${error.suggestion}\n`);
160
+ });
161
+
162
+ console.log(`\n${this.errors.length} filename(s) need correction.\n`);
163
+ console.log('To fix these issues:');
164
+ console.log('1. Re-run the shard task with updated translation rules');
165
+ console.log('2. Or manually rename the files using the suggestions above');
166
+ console.log('3. Or run: node .aios-core/utils/validate-filenames.js --fix\n');
167
+
168
+ return false;
169
+ }
170
+
171
+ return true;
172
+ }
173
+
174
+ fix() {
175
+ console.log('\nšŸ”§ Fixing filename issues...\n');
176
+
177
+ let fixed = 0;
178
+ for (const error of this.errors) {
179
+ const oldPath = error.file;
180
+ const dir = path.dirname(oldPath);
181
+ const newPath = path.join(dir, error.suggestion);
182
+
183
+ try {
184
+ fs.renameSync(oldPath, newPath);
185
+ console.log(`āœ… Renamed: ${path.basename(oldPath)} → ${path.basename(newPath)}`);
186
+ fixed++;
187
+ } catch (err) {
188
+ console.error(`āŒ Failed to rename ${oldPath}: ${err.message}`);
189
+ }
190
+ }
191
+
192
+ console.log(`\n✨ Fixed ${fixed} of ${this.errors.length} files.\n`);
193
+ }
194
+
195
+ validate() {
196
+ console.log('šŸ” Validating documentation filenames...\n');
197
+
198
+ // Check docs/architecture/
199
+ const archDir = path.join(this.projectRoot, 'docs', 'architecture');
200
+ console.log(`Checking: ${archDir}`);
201
+ this.validateDirectory(archDir);
202
+
203
+ // Check docs/prd/
204
+ const prdDir = path.join(this.projectRoot, 'docs', 'prd');
205
+ console.log(`Checking: ${prdDir}`);
206
+ this.validateDirectory(prdDir);
207
+
208
+ return this.report();
209
+ }
210
+ }
211
+
212
+ // Main execution
213
+ const projectRoot = process.cwd();
214
+ const shouldFix = process.argv.includes('--fix');
215
+
216
+ const validator = new FilenameValidator(projectRoot);
217
+ const isValid = validator.validate();
218
+
219
+ if (shouldFix && !isValid) {
220
+ validator.fix();
221
+ // Re-validate
222
+ const validator2 = new FilenameValidator(projectRoot);
223
+ validator2.validate();
224
+ }
225
+
226
+ process.exit(isValid ? 0 : 1);