@girardelli/architect-core 8.1.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/dist/src/core/analyzer.d.ts +42 -0
- package/dist/src/core/analyzer.js +431 -0
- package/dist/src/core/analyzer.js.map +1 -0
- package/dist/src/core/analyzers/forecast.d.ts +84 -0
- package/dist/src/core/analyzers/forecast.js +338 -0
- package/dist/src/core/analyzers/forecast.js.map +1 -0
- package/dist/src/core/analyzers/index.d.ts +9 -0
- package/dist/src/core/analyzers/index.js +7 -0
- package/dist/src/core/analyzers/index.js.map +1 -0
- package/dist/src/core/analyzers/temporal-scorer.d.ts +71 -0
- package/dist/src/core/analyzers/temporal-scorer.js +141 -0
- package/dist/src/core/analyzers/temporal-scorer.js.map +1 -0
- package/dist/src/core/anti-patterns.d.ts +28 -0
- package/dist/src/core/anti-patterns.js +264 -0
- package/dist/src/core/anti-patterns.js.map +1 -0
- package/dist/src/core/ast/ast-parser.interface.d.ts +20 -0
- package/dist/src/core/ast/ast-parser.interface.js +2 -0
- package/dist/src/core/ast/ast-parser.interface.js.map +1 -0
- package/dist/src/core/ast/path-resolver.d.ts +13 -0
- package/dist/src/core/ast/path-resolver.js +54 -0
- package/dist/src/core/ast/path-resolver.js.map +1 -0
- package/dist/src/core/ast/tree-sitter-parser.d.ts +10 -0
- package/dist/src/core/ast/tree-sitter-parser.js +142 -0
- package/dist/src/core/ast/tree-sitter-parser.js.map +1 -0
- package/dist/src/core/config.d.ts +11 -0
- package/dist/src/core/config.js +112 -0
- package/dist/src/core/config.js.map +1 -0
- package/dist/src/core/diagram.d.ts +9 -0
- package/dist/src/core/diagram.js +101 -0
- package/dist/src/core/diagram.js.map +1 -0
- package/dist/src/core/i18n.d.ts +14 -0
- package/dist/src/core/i18n.js +54 -0
- package/dist/src/core/i18n.js.map +1 -0
- package/dist/src/core/locales/en.d.ts +2 -0
- package/dist/src/core/locales/en.js +337 -0
- package/dist/src/core/locales/en.js.map +1 -0
- package/dist/src/core/locales/pt-BR.d.ts +172 -0
- package/dist/src/core/locales/pt-BR.js +337 -0
- package/dist/src/core/locales/pt-BR.js.map +1 -0
- package/dist/src/core/locales/types.d.ts +86 -0
- package/dist/src/core/locales/types.js +2 -0
- package/dist/src/core/locales/types.js.map +1 -0
- package/dist/src/core/plugin-loader.d.ts +11 -0
- package/dist/src/core/plugin-loader.js +67 -0
- package/dist/src/core/plugin-loader.js.map +1 -0
- package/dist/src/core/project-summarizer.d.ts +16 -0
- package/dist/src/core/project-summarizer.js +37 -0
- package/dist/src/core/project-summarizer.js.map +1 -0
- package/dist/src/core/refactor-engine.d.ts +18 -0
- package/dist/src/core/refactor-engine.js +87 -0
- package/dist/src/core/refactor-engine.js.map +1 -0
- package/dist/src/core/rules/barrel-optimizer.d.ts +13 -0
- package/dist/src/core/rules/barrel-optimizer.js +76 -0
- package/dist/src/core/rules/barrel-optimizer.js.map +1 -0
- package/dist/src/core/rules/dead-code-detector.d.ts +21 -0
- package/dist/src/core/rules/dead-code-detector.js +116 -0
- package/dist/src/core/rules/dead-code-detector.js.map +1 -0
- package/dist/src/core/rules/hub-splitter.d.ts +13 -0
- package/dist/src/core/rules/hub-splitter.js +117 -0
- package/dist/src/core/rules/hub-splitter.js.map +1 -0
- package/dist/src/core/rules/import-organizer.d.ts +13 -0
- package/dist/src/core/rules/import-organizer.js +84 -0
- package/dist/src/core/rules/import-organizer.js.map +1 -0
- package/dist/src/core/rules/module-grouper.d.ts +13 -0
- package/dist/src/core/rules/module-grouper.js +116 -0
- package/dist/src/core/rules/module-grouper.js.map +1 -0
- package/dist/src/core/rules-engine.d.ts +7 -0
- package/dist/src/core/rules-engine.js +89 -0
- package/dist/src/core/rules-engine.js.map +1 -0
- package/dist/src/core/scorer.d.ts +15 -0
- package/dist/src/core/scorer.js +165 -0
- package/dist/src/core/scorer.js.map +1 -0
- package/dist/src/core/summarizer/keyword-extractor.d.ts +6 -0
- package/dist/src/core/summarizer/keyword-extractor.js +38 -0
- package/dist/src/core/summarizer/keyword-extractor.js.map +1 -0
- package/dist/src/core/summarizer/module-inferrer.d.ts +11 -0
- package/dist/src/core/summarizer/module-inferrer.js +171 -0
- package/dist/src/core/summarizer/module-inferrer.js.map +1 -0
- package/dist/src/core/summarizer/package-reader.d.ts +3 -0
- package/dist/src/core/summarizer/package-reader.js +33 -0
- package/dist/src/core/summarizer/package-reader.js.map +1 -0
- package/dist/src/core/summarizer/purpose-inferrer.d.ts +8 -0
- package/dist/src/core/summarizer/purpose-inferrer.js +179 -0
- package/dist/src/core/summarizer/purpose-inferrer.js.map +1 -0
- package/dist/src/core/summarizer/readme-reader.d.ts +3 -0
- package/dist/src/core/summarizer/readme-reader.js +24 -0
- package/dist/src/core/summarizer/readme-reader.js.map +1 -0
- package/dist/src/core/types/architect-rules.d.ts +27 -0
- package/dist/src/core/types/architect-rules.js +2 -0
- package/dist/src/core/types/architect-rules.js.map +1 -0
- package/dist/src/core/types/core.d.ts +87 -0
- package/dist/src/core/types/core.js +2 -0
- package/dist/src/core/types/core.js.map +1 -0
- package/dist/src/core/types/infrastructure.d.ts +38 -0
- package/dist/src/core/types/infrastructure.js +2 -0
- package/dist/src/core/types/infrastructure.js.map +1 -0
- package/dist/src/core/types/plugin.d.ts +12 -0
- package/dist/src/core/types/plugin.js +2 -0
- package/dist/src/core/types/plugin.js.map +1 -0
- package/dist/src/core/types/rules.d.ts +53 -0
- package/dist/src/core/types/rules.js +2 -0
- package/dist/src/core/types/rules.js.map +1 -0
- package/dist/src/core/types/summarizer.d.ts +12 -0
- package/dist/src/core/types/summarizer.js +2 -0
- package/dist/src/core/types/summarizer.js.map +1 -0
- package/dist/src/infrastructure/git-cache.d.ts +6 -0
- package/dist/src/infrastructure/git-cache.js +41 -0
- package/dist/src/infrastructure/git-cache.js.map +1 -0
- package/dist/src/infrastructure/git-history.d.ts +112 -0
- package/dist/src/infrastructure/git-history.js +340 -0
- package/dist/src/infrastructure/git-history.js.map +1 -0
- package/dist/src/infrastructure/logger.d.ts +20 -0
- package/dist/src/infrastructure/logger.js +57 -0
- package/dist/src/infrastructure/logger.js.map +1 -0
- package/dist/src/infrastructure/scanner.d.ts +31 -0
- package/dist/src/infrastructure/scanner.js +334 -0
- package/dist/src/infrastructure/scanner.js.map +1 -0
- package/dist/tests/analyzers-integration.test.d.ts +7 -0
- package/dist/tests/analyzers-integration.test.js +140 -0
- package/dist/tests/analyzers-integration.test.js.map +1 -0
- package/dist/tests/anti-patterns.test.d.ts +1 -0
- package/dist/tests/anti-patterns.test.js +81 -0
- package/dist/tests/anti-patterns.test.js.map +1 -0
- package/dist/tests/ast-parser.test.d.ts +1 -0
- package/dist/tests/ast-parser.test.js +94 -0
- package/dist/tests/ast-parser.test.js.map +1 -0
- package/dist/tests/fixtures/monorepo/packages/app/src/index.d.ts +1 -0
- package/dist/tests/fixtures/monorepo/packages/app/src/index.js +9 -0
- package/dist/tests/fixtures/monorepo/packages/app/src/index.js.map +1 -0
- package/dist/tests/fixtures/monorepo/packages/core/src/index.d.ts +2 -0
- package/dist/tests/fixtures/monorepo/packages/core/src/index.js +11 -0
- package/dist/tests/fixtures/monorepo/packages/core/src/index.js.map +1 -0
- package/dist/tests/forecast.test.d.ts +7 -0
- package/dist/tests/forecast.test.js +380 -0
- package/dist/tests/forecast.test.js.map +1 -0
- package/dist/tests/git-history.test.d.ts +7 -0
- package/dist/tests/git-history.test.js +193 -0
- package/dist/tests/git-history.test.js.map +1 -0
- package/dist/tests/i18n.test.d.ts +1 -0
- package/dist/tests/i18n.test.js +39 -0
- package/dist/tests/i18n.test.js.map +1 -0
- package/dist/tests/monorepo-scan.test.d.ts +11 -0
- package/dist/tests/monorepo-scan.test.js +143 -0
- package/dist/tests/monorepo-scan.test.js.map +1 -0
- package/dist/tests/plugin-loader.test.d.ts +1 -0
- package/dist/tests/plugin-loader.test.js +31 -0
- package/dist/tests/plugin-loader.test.js.map +1 -0
- package/dist/tests/rules-engine.test.d.ts +1 -0
- package/dist/tests/rules-engine.test.js +112 -0
- package/dist/tests/rules-engine.test.js.map +1 -0
- package/dist/tests/scanner.test.d.ts +1 -0
- package/dist/tests/scanner.test.js +44 -0
- package/dist/tests/scanner.test.js.map +1 -0
- package/dist/tests/scorer.test.d.ts +1 -0
- package/dist/tests/scorer.test.js +610 -0
- package/dist/tests/scorer.test.js.map +1 -0
- package/dist/tests/temporal-scorer.test.d.ts +7 -0
- package/dist/tests/temporal-scorer.test.js +239 -0
- package/dist/tests/temporal-scorer.test.js.map +1 -0
- package/package.json +29 -0
- package/src/core/analyzer.ts +499 -0
- package/src/core/analyzers/forecast.ts +497 -0
- package/src/core/analyzers/index.ts +33 -0
- package/src/core/analyzers/temporal-scorer.ts +227 -0
- package/src/core/anti-patterns.ts +324 -0
- package/src/core/ast/ast-parser.interface.ts +21 -0
- package/src/core/ast/path-resolver.ts +61 -0
- package/src/core/ast/tree-sitter-parser.ts +158 -0
- package/src/core/config.ts +125 -0
- package/src/core/diagram.ts +129 -0
- package/src/core/i18n.ts +64 -0
- package/src/core/locales/en.ts +340 -0
- package/src/core/locales/pt-BR.ts +341 -0
- package/src/core/locales/types.ts +95 -0
- package/src/core/plugin-loader.ts +80 -0
- package/src/core/project-summarizer.ts +42 -0
- package/src/core/refactor-engine.ts +112 -0
- package/src/core/rules/barrel-optimizer.ts +99 -0
- package/src/core/rules/dead-code-detector.ts +134 -0
- package/src/core/rules/hub-splitter.ts +135 -0
- package/src/core/rules/import-organizer.ts +100 -0
- package/src/core/rules/module-grouper.ts +133 -0
- package/src/core/rules-engine.ts +100 -0
- package/src/core/scorer.ts +181 -0
- package/src/core/summarizer/keyword-extractor.ts +53 -0
- package/src/core/summarizer/module-inferrer.ts +194 -0
- package/src/core/summarizer/package-reader.ts +34 -0
- package/src/core/summarizer/purpose-inferrer.ts +197 -0
- package/src/core/summarizer/readme-reader.ts +24 -0
- package/src/core/types/architect-rules.ts +29 -0
- package/src/core/types/core.ts +94 -0
- package/src/core/types/infrastructure.ts +41 -0
- package/src/core/types/plugin.ts +19 -0
- package/src/core/types/rules.ts +51 -0
- package/src/core/types/summarizer.ts +8 -0
- package/src/infrastructure/git-cache.ts +52 -0
- package/src/infrastructure/git-history.ts +496 -0
- package/src/infrastructure/logger.ts +68 -0
- package/src/infrastructure/scanner.ts +349 -0
- package/tests/analyzers-integration.test.ts +174 -0
- package/tests/anti-patterns.test.ts +95 -0
- package/tests/ast-parser.test.ts +102 -0
- package/tests/fixtures/monorepo/package.json +6 -0
- package/tests/fixtures/monorepo/packages/app/package.json +12 -0
- package/tests/fixtures/monorepo/packages/app/src/index.ts +6 -0
- package/tests/fixtures/monorepo/packages/core/package.json +7 -0
- package/tests/fixtures/monorepo/packages/core/src/index.ts +7 -0
- package/tests/forecast.test.ts +504 -0
- package/tests/git-history.test.ts +254 -0
- package/tests/i18n.test.ts +47 -0
- package/tests/monorepo-scan.test.ts +170 -0
- package/tests/plugin-loader.test.ts +40 -0
- package/tests/rules-engine.test.ts +131 -0
- package/tests/scanner.test.ts +54 -0
- package/tests/scorer.test.ts +675 -0
- package/tests/temporal-scorer.test.ts +306 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
export declare const ptBR: {
|
|
2
|
+
cli: {
|
|
3
|
+
phases: {
|
|
4
|
+
scan: {
|
|
5
|
+
label: string;
|
|
6
|
+
verb: string;
|
|
7
|
+
};
|
|
8
|
+
dependencies: {
|
|
9
|
+
label: string;
|
|
10
|
+
verb: string;
|
|
11
|
+
};
|
|
12
|
+
layers: {
|
|
13
|
+
label: string;
|
|
14
|
+
verb: string;
|
|
15
|
+
};
|
|
16
|
+
antipatterns: {
|
|
17
|
+
label: string;
|
|
18
|
+
verb: string;
|
|
19
|
+
};
|
|
20
|
+
scoring: {
|
|
21
|
+
label: string;
|
|
22
|
+
verb: string;
|
|
23
|
+
};
|
|
24
|
+
normalize: {
|
|
25
|
+
label: string;
|
|
26
|
+
verb: string;
|
|
27
|
+
};
|
|
28
|
+
summarize: {
|
|
29
|
+
label: string;
|
|
30
|
+
verb: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
results: {
|
|
34
|
+
score: string;
|
|
35
|
+
completedIn: string;
|
|
36
|
+
files: string;
|
|
37
|
+
lines: string;
|
|
38
|
+
anitpatterns: string;
|
|
39
|
+
steps: string;
|
|
40
|
+
agents: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
agents: {
|
|
44
|
+
generatedBy: string;
|
|
45
|
+
backend: {
|
|
46
|
+
description: string;
|
|
47
|
+
title: string;
|
|
48
|
+
specialistIn: string;
|
|
49
|
+
stack: string;
|
|
50
|
+
language: string;
|
|
51
|
+
framework: string;
|
|
52
|
+
architecture: string;
|
|
53
|
+
test: string;
|
|
54
|
+
packageManager: string;
|
|
55
|
+
currentScore: string;
|
|
56
|
+
domainContext: string;
|
|
57
|
+
principles: string;
|
|
58
|
+
modules: string;
|
|
59
|
+
projectStructure: string;
|
|
60
|
+
implementationRules: string;
|
|
61
|
+
implementationRulesBody: string;
|
|
62
|
+
afterImplementation: string;
|
|
63
|
+
afterImplementationBody: string;
|
|
64
|
+
};
|
|
65
|
+
frontend: {
|
|
66
|
+
description: string;
|
|
67
|
+
title: string;
|
|
68
|
+
specialistIn: string;
|
|
69
|
+
prerequisites: string;
|
|
70
|
+
prerequisitesBody: string;
|
|
71
|
+
implementationRules: string;
|
|
72
|
+
implementationRulesBody: string;
|
|
73
|
+
};
|
|
74
|
+
security: {
|
|
75
|
+
description: string;
|
|
76
|
+
title: string;
|
|
77
|
+
analysisFor: string;
|
|
78
|
+
checklist: string;
|
|
79
|
+
checklistBody: string;
|
|
80
|
+
whenToActivate: string;
|
|
81
|
+
whenToActivateBody: string;
|
|
82
|
+
expectedOutput: string;
|
|
83
|
+
expectedOutputBody: string;
|
|
84
|
+
};
|
|
85
|
+
qa: {
|
|
86
|
+
description: string;
|
|
87
|
+
title: string;
|
|
88
|
+
qualityFor: string;
|
|
89
|
+
nonNegotiable: string;
|
|
90
|
+
nonNegotiableBody: string;
|
|
91
|
+
pyramid: string;
|
|
92
|
+
pyramidBody: string;
|
|
93
|
+
process: string;
|
|
94
|
+
processBody: string;
|
|
95
|
+
refactoringRoadmap: string;
|
|
96
|
+
};
|
|
97
|
+
techDebt: {
|
|
98
|
+
description: string;
|
|
99
|
+
title: string;
|
|
100
|
+
controlFor: string;
|
|
101
|
+
currentState: string;
|
|
102
|
+
stateTable: string;
|
|
103
|
+
refactoringRoadmap: string;
|
|
104
|
+
scoreTargets: string;
|
|
105
|
+
scoreTargetsBody: string;
|
|
106
|
+
rules: string;
|
|
107
|
+
rulesBody: string;
|
|
108
|
+
};
|
|
109
|
+
codeReview: {
|
|
110
|
+
description: string;
|
|
111
|
+
title: string;
|
|
112
|
+
mandatoryRule: string;
|
|
113
|
+
mandatory: string;
|
|
114
|
+
mandatoryBody: string;
|
|
115
|
+
functional: string;
|
|
116
|
+
functionalBody: string;
|
|
117
|
+
quality: string;
|
|
118
|
+
qualityBody: string;
|
|
119
|
+
domainReviewItems: string;
|
|
120
|
+
domainRules: {
|
|
121
|
+
fintech: string;
|
|
122
|
+
healthtech: string;
|
|
123
|
+
ecommerce: string;
|
|
124
|
+
default: string;
|
|
125
|
+
};
|
|
126
|
+
stackReviewItems: string;
|
|
127
|
+
stackRules: {
|
|
128
|
+
ts: string;
|
|
129
|
+
python: string;
|
|
130
|
+
go: string;
|
|
131
|
+
dart: string;
|
|
132
|
+
default: string;
|
|
133
|
+
};
|
|
134
|
+
integrationReviewItems: string;
|
|
135
|
+
integrationRulesBody: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
dynamic: {
|
|
139
|
+
compliance: {
|
|
140
|
+
title: string;
|
|
141
|
+
reason: string;
|
|
142
|
+
mandatoryChecks: string;
|
|
143
|
+
};
|
|
144
|
+
integrations: {
|
|
145
|
+
title: string;
|
|
146
|
+
threats: string;
|
|
147
|
+
types: {
|
|
148
|
+
payment: string;
|
|
149
|
+
auth: string;
|
|
150
|
+
api: string;
|
|
151
|
+
database: string;
|
|
152
|
+
government: string;
|
|
153
|
+
default: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
domainThreats: {
|
|
157
|
+
title: string;
|
|
158
|
+
fintech: string;
|
|
159
|
+
healthtech: string;
|
|
160
|
+
ecommerce: string;
|
|
161
|
+
default: string;
|
|
162
|
+
};
|
|
163
|
+
qaDomain: {
|
|
164
|
+
title: string;
|
|
165
|
+
fintech: string;
|
|
166
|
+
healthtech: string;
|
|
167
|
+
ecommerce: string;
|
|
168
|
+
default: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
export type AppTranslation = typeof ptBR;
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
export const ptBR = {
|
|
2
|
+
// === CLI ===
|
|
3
|
+
cli: {
|
|
4
|
+
phases: {
|
|
5
|
+
scan: { label: 'FILE SCANNER', verb: 'Escaneando sistema de arquivos' },
|
|
6
|
+
dependencies: { label: 'DEPENDENCY MAPPER', verb: 'Mapeando grafo de importações' },
|
|
7
|
+
layers: { label: 'LAYER DETECTOR', verb: 'Classificando arquitetura' },
|
|
8
|
+
antipatterns: { label: 'PATTERN ANALYZER', verb: 'Detectando anti-patterns' },
|
|
9
|
+
scoring: { label: 'QUALITY ENGINE', verb: 'Computando métricas de qualidade' },
|
|
10
|
+
normalize: { label: 'PATH NORMALIZER', verb: 'Normalizando paths' },
|
|
11
|
+
summarize: { label: 'AI SUMMARIZER', verb: 'Gerando sumário do projeto' }
|
|
12
|
+
},
|
|
13
|
+
results: {
|
|
14
|
+
score: 'ARCHITECTURE SCORE',
|
|
15
|
+
completedIn: 'Completado em',
|
|
16
|
+
files: 'arquivos',
|
|
17
|
+
lines: 'linhas',
|
|
18
|
+
anitpatterns: 'anti-patterns',
|
|
19
|
+
steps: 'passos',
|
|
20
|
+
agents: 'agentes'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
// === AGONTS OUTPUTS ===
|
|
24
|
+
agents: {
|
|
25
|
+
generatedBy: 'Gerado por Architect v8.1',
|
|
26
|
+
backend: {
|
|
27
|
+
description: '{lang} Backend Developer — APIs, serviços, lógica de negócio',
|
|
28
|
+
title: '🔧 {lang} BACKEND DEVELOPER',
|
|
29
|
+
specialistIn: 'Especialista em backend {fw} para {projectName}',
|
|
30
|
+
stack: 'Stack',
|
|
31
|
+
language: 'Linguagem',
|
|
32
|
+
framework: 'Framework',
|
|
33
|
+
architecture: 'Arquitetura',
|
|
34
|
+
test: 'Teste',
|
|
35
|
+
packageManager: 'Package Manager',
|
|
36
|
+
currentScore: 'Score Atual',
|
|
37
|
+
domainContext: 'Domínio & Contexto de Negócio',
|
|
38
|
+
principles: 'Princípios (SOLID + Clean Architecture)',
|
|
39
|
+
modules: 'Módulos do Projeto',
|
|
40
|
+
projectStructure: 'Estrutura do Projeto (Detectada)',
|
|
41
|
+
implementationRules: 'Regras de Implementação',
|
|
42
|
+
implementationRulesBody: `□ Controller NUNCA contém lógica de negócio (apenas routing)
|
|
43
|
+
□ Service NUNCA acessa Request/Response diretamente
|
|
44
|
+
□ Entity NUNCA é exposta diretamente na API (usar DTO)
|
|
45
|
+
□ Validação de input no DTO / Guard / Pipe
|
|
46
|
+
□ Erros com mensagens claras e códigos HTTP corretos
|
|
47
|
+
□ Logging estruturado (não console.log)
|
|
48
|
+
□ Testes unitários para cada service method
|
|
49
|
+
□ Testes de integração para cada endpoint
|
|
50
|
+
□ Cobertura ≥ {coverage}%`,
|
|
51
|
+
afterImplementation: 'Após Implementação Backend',
|
|
52
|
+
afterImplementationBody: `> **OBRIGATÓRIO: Gerar Documento de Integração antes de qualquer frontend/app.**
|
|
53
|
+
|
|
54
|
+
O documento deve conter:
|
|
55
|
+
- Todos os endpoints criados/modificados
|
|
56
|
+
- Payloads de request e response (com exemplos)
|
|
57
|
+
- Códigos de erro e mensagens
|
|
58
|
+
- Regras de negócio aplicadas
|
|
59
|
+
- Headers necessários (auth, pagination, etc.)`
|
|
60
|
+
},
|
|
61
|
+
frontend: {
|
|
62
|
+
description: '{fw} Frontend Developer — Componentes, UX, state management',
|
|
63
|
+
title: '🎨 {fw} FRONTEND DEVELOPER',
|
|
64
|
+
specialistIn: 'Especialista em frontend {fw} para {projectName}',
|
|
65
|
+
prerequisites: 'Pré-Requisitos para Implementar',
|
|
66
|
+
prerequisitesBody: `╔══════════════════════════════════════════════╗
|
|
67
|
+
║ ANTES de escrever qualquer componente: ║
|
|
68
|
+
║ ║
|
|
69
|
+
║ □ MOCKUP aprovado pelo humano ║
|
|
70
|
+
║ □ Documento de Integração disponível ║
|
|
71
|
+
║ □ User stories com critérios de aceite ║
|
|
72
|
+
║ □ BDD scenarios escritos ║
|
|
73
|
+
╚══════════════════════════════════════════════╝`,
|
|
74
|
+
implementationRules: 'Regras de Implementação',
|
|
75
|
+
implementationRulesBody: `□ Componente segue MOCKUP aprovado (não inventar UI)
|
|
76
|
+
□ TODOS os estados implementados:
|
|
77
|
+
- ✅ Com dados (estado normal)
|
|
78
|
+
- 📭 Vazio (empty state)
|
|
79
|
+
- ⏳ Carregando (loading state / skeleton)
|
|
80
|
+
- ❌ Erro (error state com mensagem clara)
|
|
81
|
+
□ Lógica de negócio em services (NUNCA no componente)
|
|
82
|
+
□ State management adequado (sem prop drilling)
|
|
83
|
+
□ Formulários com validação client-side
|
|
84
|
+
□ Responsivo (testar mobile + desktop)
|
|
85
|
+
□ Acessibilidade básica (labels, aria, contraste)
|
|
86
|
+
□ Lazy loading onde aplicável
|
|
87
|
+
□ Cobertura ≥ {coverage}%`
|
|
88
|
+
},
|
|
89
|
+
security: {
|
|
90
|
+
description: 'Security Auditor — Análise de ameaças, compliance, vulnerabilidades',
|
|
91
|
+
title: '🛡️ SECURITY AUDITOR',
|
|
92
|
+
analysisFor: 'Análise de segurança para {projectName}',
|
|
93
|
+
checklist: 'Checklist OWASP Top 10',
|
|
94
|
+
checklistBody: `□ A01: Broken Access Control — RBAC implementado?
|
|
95
|
+
□ A02: Cryptographic Failures — Dados sensíveis criptografados?
|
|
96
|
+
□ A03: Injection — Inputs sanitizados? Queries parametrizadas?
|
|
97
|
+
□ A04: Insecure Design — Threat model feito?
|
|
98
|
+
□ A05: Security Misconfiguration — Headers, CORS, defaults?
|
|
99
|
+
□ A06: Vulnerable Components — Deps atualizadas?
|
|
100
|
+
□ A07: Auth Failures — Brute force protegido? Session management?
|
|
101
|
+
□ A08: Software Integrity — Supply chain verificado?
|
|
102
|
+
□ A09: Logging Failures — Audit log para ações sensíveis?
|
|
103
|
+
□ A10: SSRF — Server-side requests validados?`,
|
|
104
|
+
whenToActivate: 'Quando Ativar',
|
|
105
|
+
whenToActivateBody: `- Qualquer feature que lida com: autenticação, autorização, dados pessoais, pagamentos
|
|
106
|
+
- Novas APIs públicas
|
|
107
|
+
- Integrações com sistemas externos
|
|
108
|
+
- Mudanças em infra/deploy`,
|
|
109
|
+
expectedOutput: 'Output Esperado',
|
|
110
|
+
expectedOutputBody: `1. Lista de findings com severidade (CRITICAL/HIGH/MEDIUM/LOW)
|
|
111
|
+
2. Recomendações de mitigação
|
|
112
|
+
3. Threat model (se aplicável)`
|
|
113
|
+
},
|
|
114
|
+
qa: {
|
|
115
|
+
description: 'QA Test Engineer — Planos de teste, BDD/TDD, cobertura',
|
|
116
|
+
title: '🧪 QA TEST ENGINEER',
|
|
117
|
+
qualityFor: 'Qualidade de testes para {projectName}',
|
|
118
|
+
nonNegotiable: 'Metas Inegociáveis',
|
|
119
|
+
nonNegotiableBody: `╔══════════════════════════════════════════╗
|
|
120
|
+
║ Cobertura mínima: {coverage}% ║
|
|
121
|
+
║ Sem testes, sem entrega, sem finalizar ║
|
|
122
|
+
║ INEGOCIÁVEL. ║
|
|
123
|
+
╚══════════════════════════════════════════╝`,
|
|
124
|
+
pyramid: 'Pirâmide de Testes',
|
|
125
|
+
pyramidBody: ` ╱╲
|
|
126
|
+
╱ E2E╲ → Poucos, lentos, alto valor
|
|
127
|
+
╱──────╲
|
|
128
|
+
╱Integration╲ → Médio, validam integração
|
|
129
|
+
╱──────────────╲
|
|
130
|
+
╱ Unit Tests ╲ → Muitos, rápidos, baratos
|
|
131
|
+
╱════════════════════╲`,
|
|
132
|
+
process: 'Processo',
|
|
133
|
+
processBody: `1. **BDD primeiro** — cenários Gherkin antes de código
|
|
134
|
+
2. **TDD** — RED → GREEN → REFACTOR
|
|
135
|
+
3. **Coverage** — verificar após cada implementação
|
|
136
|
+
4. **Regressão** — TODOS os testes antigos devem continuar passando
|
|
137
|
+
5. **Review** — testes são revisados junto com código`,
|
|
138
|
+
refactoringRoadmap: 'Refactoring Roadmap'
|
|
139
|
+
},
|
|
140
|
+
techDebt: {
|
|
141
|
+
description: 'Tech Debt Controller — Controle de débito técnico e metas de score',
|
|
142
|
+
title: '📊 TECH DEBT CONTROLLER',
|
|
143
|
+
controlFor: 'Controle de débito técnico para {projectName}',
|
|
144
|
+
currentState: 'Estado Atual',
|
|
145
|
+
stateTable: `| Métrica | Valor |
|
|
146
|
+
|---------|-------|
|
|
147
|
+
| Score | {score}/100 |
|
|
148
|
+
| Meta | {target}/100 |
|
|
149
|
+
| Anti-patterns | {antiPatterns} |
|
|
150
|
+
| Refatorações pendentes | {refactoringSteps} |
|
|
151
|
+
| Estimativa de Melhora | +{improvement} pontos |`,
|
|
152
|
+
refactoringRoadmap: 'Roadmap de Refatoração',
|
|
153
|
+
scoreTargets: 'Metas de Score',
|
|
154
|
+
scoreTargetsBody: `Score Atual: {score}/100
|
|
155
|
+
Meta Curto Prazo: {targetShort}/100
|
|
156
|
+
Meta Médio Prazo: {targetMedium}/100
|
|
157
|
+
Mínimo Aceitável: {threshold}/100`,
|
|
158
|
+
rules: 'Regras',
|
|
159
|
+
rulesBody: `□ Score NUNCA pode regredir após um PR
|
|
160
|
+
□ Mínimo: {threshold}/100
|
|
161
|
+
□ Críticos: resolver dentro de 1 sprint
|
|
162
|
+
□ Altos: resolver dentro de 2 sprints
|
|
163
|
+
□ Médios: adicionar ao backlog técnico
|
|
164
|
+
□ Verificar com: architect score ./src`
|
|
165
|
+
},
|
|
166
|
+
codeReview: {
|
|
167
|
+
description: 'Code Review Checklist — Pontos obrigatórios de revisão',
|
|
168
|
+
title: '🔍 CODE REVIEW CHECKLIST — {projectName}',
|
|
169
|
+
mandatoryRule: '**Todo PR deve ser verificado contra este checklist.**',
|
|
170
|
+
mandatory: 'Obrigatório',
|
|
171
|
+
mandatoryBody: `□ Código compila sem erros
|
|
172
|
+
□ Todos os testes passam
|
|
173
|
+
□ Cobertura ≥ {coverage}%
|
|
174
|
+
□ Lint sem errors
|
|
175
|
+
□ Nenhum secret hardcoded
|
|
176
|
+
□ Score não regrediu`,
|
|
177
|
+
functional: 'Funcional',
|
|
178
|
+
functionalBody: `□ Atende aos critérios de aceite
|
|
179
|
+
□ Edge cases tratados
|
|
180
|
+
□ Erros tratados adequadamente
|
|
181
|
+
□ Não quebra features existentes`,
|
|
182
|
+
quality: 'Qualidade',
|
|
183
|
+
qualityBody: `□ Código legível sem comentários explicativos
|
|
184
|
+
□ Naming descritivo e consistente
|
|
185
|
+
□ Funções pequenas e com responsabilidade única
|
|
186
|
+
□ Sem código duplicado (DRY)
|
|
187
|
+
□ Lógica complexa está isolada em funções testáveis
|
|
188
|
+
□ Sem grandes blocos de código comentado`,
|
|
189
|
+
domainReviewItems: 'Itens de Revisão Específicos do Domínio: {domain}',
|
|
190
|
+
domainRules: {
|
|
191
|
+
fintech: `□ Transações são idempotentes?
|
|
192
|
+
□ Auditoria completa de todas as operações?
|
|
193
|
+
□ Sem exposição de dados sensíveis em logs?
|
|
194
|
+
□ Valores monetários não usam float (usar Decimal)?
|
|
195
|
+
□ PCI-DSS compliance verificado?`,
|
|
196
|
+
healthtech: `□ LGPD compliance verificado (consentimento, retenção)?
|
|
197
|
+
□ Dados sensíveis criptografados em repouso?
|
|
198
|
+
□ Acesso auditado e logado?
|
|
199
|
+
□ Anonimização implementada corretamente?
|
|
200
|
+
□ 2FA em operações sensíveis?`,
|
|
201
|
+
ecommerce: `□ Carrinho é idempotente?
|
|
202
|
+
□ Inventário é atualizado corretamente (race conditions)?
|
|
203
|
+
□ Preços são validados (sem manipulação client-side)?
|
|
204
|
+
□ Cupons/descontos aplicados corretamente?
|
|
205
|
+
□ Fraude detection implementado?`,
|
|
206
|
+
default: `□ Fluxo crítico de negócio não quebrou?
|
|
207
|
+
□ Rollback é seguro?
|
|
208
|
+
□ Concorrência tratada?
|
|
209
|
+
□ State final é consistente?`
|
|
210
|
+
},
|
|
211
|
+
stackReviewItems: 'Checklist Específico para {stack}',
|
|
212
|
+
stackRules: {
|
|
213
|
+
ts: `□ \`strict: true\` em tsconfig (sem any sem justificativa)?
|
|
214
|
+
□ Imports circulares?
|
|
215
|
+
□ Async/await tratado (sem unhandled promises)?
|
|
216
|
+
□ Memory leaks (EventListeners desinscritos)?
|
|
217
|
+
□ Console.log/debugger removidos?`,
|
|
218
|
+
python: `□ Type hints em todas as funções públicas?
|
|
219
|
+
□ Docstrings formatadas (Google ou NumPy style)?
|
|
220
|
+
□ Sem mutable default arguments?
|
|
221
|
+
□ Context managers usados para resources?
|
|
222
|
+
□ F-strings em vez de % ou .format()?
|
|
223
|
+
□ Sem \`eval()\` ou \`exec()\`?`,
|
|
224
|
+
go: `□ Erros tratados (não ignorados com _)?
|
|
225
|
+
□ Defer para cleanup?
|
|
226
|
+
□ Goroutines com contexto?
|
|
227
|
+
□ Race conditions testadas?
|
|
228
|
+
□ Timeouts implementados?`,
|
|
229
|
+
dart: `□ Null-safety (! evitado)?
|
|
230
|
+
□ Widgets têm keys quando em listas?
|
|
231
|
+
□ BuildContext acessado apenas em build?
|
|
232
|
+
□ Listeners desinscritos?
|
|
233
|
+
□ Imagens/assets fazem lazy-load?`,
|
|
234
|
+
default: `□ Código segue padrões do projeto?
|
|
235
|
+
□ Dependencies atualizadas?
|
|
236
|
+
□ Sem warnings do compilador/linter?`
|
|
237
|
+
},
|
|
238
|
+
integrationReviewItems: 'Itens de Revisão de Integração',
|
|
239
|
+
integrationRulesBody: `□ Endpoint trata todos os status codes esperados?
|
|
240
|
+
□ Validação do payload de entrada?
|
|
241
|
+
{auth}
|
|
242
|
+
{validation}
|
|
243
|
+
□ Resposta segue o contrato documentado?
|
|
244
|
+
□ Erros retornam mensagens claras?
|
|
245
|
+
□ Rate limiting aplicado?
|
|
246
|
+
□ Logging estruturado?`
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
// === DYNAMIC BLOCKS ===
|
|
250
|
+
dynamic: {
|
|
251
|
+
compliance: {
|
|
252
|
+
title: 'Requisitos de Compliance Detectados',
|
|
253
|
+
reason: 'Motivo',
|
|
254
|
+
mandatoryChecks: 'Verificações Obrigatórias'
|
|
255
|
+
},
|
|
256
|
+
integrations: {
|
|
257
|
+
title: 'Segurança em Integrações',
|
|
258
|
+
threats: 'Ameaças',
|
|
259
|
+
types: {
|
|
260
|
+
payment: 'PCI-DSS, criptografia de dados sensíveis, tokenização',
|
|
261
|
+
auth: 'MFA, session hijacking, credential stuffing',
|
|
262
|
+
api: 'Rate limiting, API key rotation, HTTPS obrigatório',
|
|
263
|
+
database: 'SQL Injection, Encryption at rest, Backups',
|
|
264
|
+
government: 'Compliance regulatório, audit trails, data retention',
|
|
265
|
+
default: 'Validação de entrada/saída, rate limiting'
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
domainThreats: {
|
|
269
|
+
title: 'Ameaças Específicas do Domínio: {domain}',
|
|
270
|
+
fintech: `- **Manipulação de dados:** Auditoria de transações, checksums, criptografia
|
|
271
|
+
- **Acesso não autorizado:** MFA em contas privilégiadas, IP whitelist
|
|
272
|
+
- **Conformidade:** PCI-DSS, LGPD, SOX
|
|
273
|
+
- **Fraude:** Detecção de anomalias, rate limiting`,
|
|
274
|
+
healthtech: `- **Vazamento de dados:** Criptografia end-to-end, anonimização
|
|
275
|
+
- **HIPAA/LGPD:** Audit trails, consentimento explícito
|
|
276
|
+
- **Integridade:** Assinatura digital, blockchain se aplicável
|
|
277
|
+
- **Acesso:** RBAC granular, 2FA para dados sensíveis`,
|
|
278
|
+
ecommerce: `- **Fraude de pagamento:** CVV validation, 3D Secure
|
|
279
|
+
- **Roubo de dados:** SSL/TLS, PCI-DSS, criptografia em repouso
|
|
280
|
+
- **DoS:** Rate limiting, CAPTCHA, WAF
|
|
281
|
+
- **Autenticação:** MFA, session timeout`,
|
|
282
|
+
default: `- **Confidencialidade:** Dados em trânsito e repouso criptografados
|
|
283
|
+
- **Integridade:** Validação de entrada, checksums
|
|
284
|
+
- **Disponibilidade:** Backup, disaster recovery, monitoring
|
|
285
|
+
- **Auditoria:** Logging de ações sensíveis, retention policy`
|
|
286
|
+
},
|
|
287
|
+
qaDomain: {
|
|
288
|
+
title: 'Cenários de Teste Específicos do Domínio: {domain}',
|
|
289
|
+
fintech: `### Testes de Negócio
|
|
290
|
+
- Criar transação com valores válidos
|
|
291
|
+
- Rejeitar transação acima do limite
|
|
292
|
+
- Processar reembolso corretamente
|
|
293
|
+
- Auditoria de todas as transações
|
|
294
|
+
- Validar saldo após múltiplas operações
|
|
295
|
+
|
|
296
|
+
### Testes de Segurança
|
|
297
|
+
- Não expor dados de cartão em logs
|
|
298
|
+
- Validar PCI-DSS compliance
|
|
299
|
+
- Testar detecção de fraude`,
|
|
300
|
+
healthtech: `### Testes de Negócio
|
|
301
|
+
- Criar registro de paciente com LGPD compliance
|
|
302
|
+
- Validar consentimento antes de compartilhar dados
|
|
303
|
+
- Anonimizar dados corretamente
|
|
304
|
+
- Respeitar direito ao esquecimento
|
|
305
|
+
- Auditoria de acesso a dados sensíveis
|
|
306
|
+
|
|
307
|
+
### Testes de Segurança
|
|
308
|
+
- Criptografia end-to-end em repouso
|
|
309
|
+
- Validar 2FA para dados críticos
|
|
310
|
+
- Testar retenção de dados`,
|
|
311
|
+
ecommerce: `### Testes de Negócio
|
|
312
|
+
- Criar carrinho com múltiplos produtos
|
|
313
|
+
- Aplicar desconto/cupom corretamente
|
|
314
|
+
- Processar pagamento com validação 3DS
|
|
315
|
+
- Atualizar inventário após venda
|
|
316
|
+
- Gerar pedido com status correto
|
|
317
|
+
|
|
318
|
+
### Testes de Segurança
|
|
319
|
+
- Não expor dados de cartão
|
|
320
|
+
- Validar rate limiting em checkout
|
|
321
|
+
- Testar proteção contra fraud`,
|
|
322
|
+
default: `### Testes de Negócio
|
|
323
|
+
- Fluxo principal (happy path)
|
|
324
|
+
- Edge cases e limites
|
|
325
|
+
- Concorrência (race conditions)
|
|
326
|
+
- Rollback após erro
|
|
327
|
+
- Idempotência
|
|
328
|
+
|
|
329
|
+
### Testes de Segurança
|
|
330
|
+
- Inputs inválidos/maliciosos
|
|
331
|
+
- Acesso não autorizado
|
|
332
|
+
- Rate limiting
|
|
333
|
+
- Logging correto`
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
//# sourceMappingURL=pt-BR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt-BR.js","sourceRoot":"","sources":["../../../../src/core/locales/pt-BR.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export interface TranslationDictionary {
|
|
2
|
+
common: {
|
|
3
|
+
generatedBy: string;
|
|
4
|
+
mandatory: string;
|
|
5
|
+
yes: string;
|
|
6
|
+
no: string;
|
|
7
|
+
action: string;
|
|
8
|
+
};
|
|
9
|
+
progress: {
|
|
10
|
+
scan: string;
|
|
11
|
+
dependencies: string;
|
|
12
|
+
layers: string;
|
|
13
|
+
antipatterns: string;
|
|
14
|
+
scoring: string;
|
|
15
|
+
normalize: string;
|
|
16
|
+
summarize: string;
|
|
17
|
+
scanningSystem: string;
|
|
18
|
+
mappingGraph: string;
|
|
19
|
+
classifyingArch: string;
|
|
20
|
+
detectingAntiPatterns: string;
|
|
21
|
+
computingMetrics: string;
|
|
22
|
+
normalizingPaths: string;
|
|
23
|
+
generatingSummary: string;
|
|
24
|
+
};
|
|
25
|
+
agents: {
|
|
26
|
+
backend: {
|
|
27
|
+
description: string;
|
|
28
|
+
title: string;
|
|
29
|
+
specialistIn: string;
|
|
30
|
+
stack: string;
|
|
31
|
+
principles: string;
|
|
32
|
+
projectStructure: string;
|
|
33
|
+
implementationRules: string;
|
|
34
|
+
rulesBody: string;
|
|
35
|
+
afterImplementation: string;
|
|
36
|
+
afterBody: string;
|
|
37
|
+
};
|
|
38
|
+
frontend: {
|
|
39
|
+
description: string;
|
|
40
|
+
title: string;
|
|
41
|
+
specialistIn: string;
|
|
42
|
+
stack: string;
|
|
43
|
+
prerequisites: string;
|
|
44
|
+
prerequisitesBody: string;
|
|
45
|
+
implementationRules: string;
|
|
46
|
+
rulesBody: string;
|
|
47
|
+
};
|
|
48
|
+
security: {
|
|
49
|
+
description: string;
|
|
50
|
+
title: string;
|
|
51
|
+
analysisFor: string;
|
|
52
|
+
checklist: string;
|
|
53
|
+
checklistBody: string;
|
|
54
|
+
whenToActivate: string;
|
|
55
|
+
whenBody: string;
|
|
56
|
+
expectedOutput: string;
|
|
57
|
+
outputBody: string;
|
|
58
|
+
};
|
|
59
|
+
qa: {
|
|
60
|
+
description: string;
|
|
61
|
+
title: string;
|
|
62
|
+
qualityFor: string;
|
|
63
|
+
nonNegotiable: string;
|
|
64
|
+
nonNegotiableBody: (min: number) => string;
|
|
65
|
+
pyramid: string;
|
|
66
|
+
process: string;
|
|
67
|
+
processBody: string;
|
|
68
|
+
};
|
|
69
|
+
techDebt: {
|
|
70
|
+
description: string;
|
|
71
|
+
title: string;
|
|
72
|
+
controlFor: string;
|
|
73
|
+
currentState: string;
|
|
74
|
+
roadmap: string;
|
|
75
|
+
targets: string;
|
|
76
|
+
rules: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
enriched: {
|
|
80
|
+
modules: string;
|
|
81
|
+
endpoints: string;
|
|
82
|
+
domainContext: string;
|
|
83
|
+
untestedModules: string;
|
|
84
|
+
untestedModulesBody: (count: number) => string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/locales/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CustomAntiPatternDetector } from './types/plugin.js';
|
|
2
|
+
import { ArchitectConfig } from './types/core.js';
|
|
3
|
+
export declare class PluginLoader {
|
|
4
|
+
private projectPath;
|
|
5
|
+
private config;
|
|
6
|
+
private customDetectors;
|
|
7
|
+
constructor(projectPath: string, config: ArchitectConfig);
|
|
8
|
+
get customAntiPatternDetectors(): CustomAntiPatternDetector[];
|
|
9
|
+
loadPlugins(): Promise<void>;
|
|
10
|
+
private loadSinglePlugin;
|
|
11
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import { logger } from '../infrastructure/logger.js';
|
|
4
|
+
export class PluginLoader {
|
|
5
|
+
projectPath;
|
|
6
|
+
config;
|
|
7
|
+
customDetectors = [];
|
|
8
|
+
constructor(projectPath, config) {
|
|
9
|
+
this.projectPath = projectPath;
|
|
10
|
+
this.config = config;
|
|
11
|
+
}
|
|
12
|
+
get customAntiPatternDetectors() {
|
|
13
|
+
return this.customDetectors;
|
|
14
|
+
}
|
|
15
|
+
async loadPlugins() {
|
|
16
|
+
if (!this.config.plugins || this.config.plugins.length === 0) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const context = {
|
|
20
|
+
projectPath: this.projectPath,
|
|
21
|
+
config: this.config
|
|
22
|
+
};
|
|
23
|
+
for (const pluginSpec of this.config.plugins) {
|
|
24
|
+
try {
|
|
25
|
+
await this.loadSinglePlugin(pluginSpec, context);
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
logger.warn(`[Architect Plugin] Failed to load plugin '${pluginSpec}': ${err.message}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async loadSinglePlugin(pluginSpec, context) {
|
|
33
|
+
// 1. Resolve path (could be relative to project or node_modules)
|
|
34
|
+
let pluginPath = pluginSpec;
|
|
35
|
+
// If it starts with ./ or ../ we assume it's relative to the target project
|
|
36
|
+
if (pluginSpec.startsWith('./') || pluginSpec.startsWith('../')) {
|
|
37
|
+
pluginPath = path.resolve(this.projectPath, pluginSpec);
|
|
38
|
+
}
|
|
39
|
+
// Verify file exists if we are resolving a local JS file to avoid unhelpful stack traces
|
|
40
|
+
if (!pluginSpec.startsWith('@') && !pluginSpec.match(/^[a-z0-9_-]+$/i)) {
|
|
41
|
+
if (!fs.existsSync(pluginPath)) {
|
|
42
|
+
throw new Error(`File not found at ${pluginPath}`);
|
|
43
|
+
}
|
|
44
|
+
// Node 20+ ESM dynamic imports need absolute file:// URIs on Windows
|
|
45
|
+
if (process.platform === 'win32') {
|
|
46
|
+
pluginPath = `file://${pluginPath.replace(/\\/g, '/')}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// 2. Load the module using dynamic import
|
|
50
|
+
const pluginModule = await import(pluginPath);
|
|
51
|
+
// 3. Extract default export mapping
|
|
52
|
+
const plugin = pluginModule.default || pluginModule;
|
|
53
|
+
if (!plugin || typeof plugin !== 'object') {
|
|
54
|
+
throw new Error(`Plugin must export an 'ArchitectPlugin' object as default.`);
|
|
55
|
+
}
|
|
56
|
+
// 4. Register hooks
|
|
57
|
+
if (typeof plugin.detectAntiPatterns === 'function') {
|
|
58
|
+
// Wrap the detector so it automatically receives the PluginContext
|
|
59
|
+
const wrappedDetector = async (fileTree, deps) => {
|
|
60
|
+
return plugin.detectAntiPatterns(fileTree, deps, context);
|
|
61
|
+
};
|
|
62
|
+
this.customDetectors.push(wrappedDetector);
|
|
63
|
+
logger.info(`[Architect Plugin] Registered Custom Rules from: ${plugin.name || pluginSpec}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=plugin-loader.js.map
|