@ekkos/cli 1.3.7 → 1.3.8

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.
@@ -0,0 +1,729 @@
1
+ "use strict";
2
+ /**
3
+ * Language Configuration — data-driven config for each language ecosystem
4
+ *
5
+ * Pure functions with zero dependencies. Provides key files, excluded dirs,
6
+ * source extensions, system boundary markers, and Gemini prompt hints
7
+ * for each supported language.
8
+ *
9
+ * Living Docs V4 — Phase 4: Language-Adapted Discovery
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LANGUAGE_CONFIGS = exports.BASE_EXCLUDED_DIRS = exports.BASE_KEY_FILES = void 0;
13
+ exports.getKeyFilesForStack = getKeyFilesForStack;
14
+ exports.getExcludedDirsForStack = getExcludedDirsForStack;
15
+ exports.getPromptHintsForStack = getPromptHintsForStack;
16
+ exports.getSourceExtensionsForStack = getSourceExtensionsForStack;
17
+ exports.getSystemBoundaryMarkersForStack = getSystemBoundaryMarkersForStack;
18
+ // ── Shared base constants ──────────────────────────────────────────────────
19
+ exports.BASE_KEY_FILES = [
20
+ 'README.md', 'README.rst', 'README',
21
+ 'Dockerfile', 'docker-compose.yml', 'docker-compose.yaml',
22
+ '.env.example', 'Makefile', 'justfile',
23
+ ];
24
+ exports.BASE_EXCLUDED_DIRS = [
25
+ '.git', '.svn', 'node_modules', '.DS_Store',
26
+ ];
27
+ // ── Per-language configurations ────────────────────────────────────────────
28
+ exports.LANGUAGE_CONFIGS = {
29
+ typescript: {
30
+ keyFiles: [
31
+ 'package.json', 'index.ts', 'index.tsx', 'index.js', 'main.ts', 'server.ts',
32
+ 'app.ts', 'mod.ts', 'cli.ts', 'worker.ts', 'handler.ts', 'route.ts',
33
+ 'routes.ts', 'middleware.ts', 'config.ts', 'constants.ts', 'types.ts',
34
+ 'schema.ts', 'utils.ts', 'lib.ts', 'tsconfig.json', 'next.config.mjs',
35
+ 'next.config.js', 'next.config.ts', 'vite.config.ts', 'turbo.json',
36
+ 'vercel.json', 'wrangler.toml',
37
+ ],
38
+ excludedDirs: [
39
+ 'dist', 'build', '.next', '.turbo', '.vercel', 'coverage', '.cache',
40
+ ],
41
+ sourceExtensions: [
42
+ '.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs', '.json', '.yml', '.yaml',
43
+ ],
44
+ systemBoundaryMarkers: [
45
+ 'package.json', 'tsconfig.json',
46
+ ],
47
+ promptHints: {
48
+ architecture: [
49
+ 'Module structure and barrel exports',
50
+ 'API route organization',
51
+ 'State management approach',
52
+ 'Data fetching patterns (SSR, SSG, ISR, client)',
53
+ 'Middleware pipeline',
54
+ ],
55
+ buildSystem: [
56
+ 'TypeScript compilation (tsc, tsup, esbuild)',
57
+ 'Bundler configuration (Vite, webpack, turbopack)',
58
+ 'Monorepo tooling (turborepo, nx, pnpm workspaces)',
59
+ ],
60
+ deployTarget: [
61
+ 'Vercel, Netlify, Cloudflare Workers',
62
+ 'Docker containerization',
63
+ 'Edge runtime vs Node.js runtime',
64
+ ],
65
+ testFramework: [
66
+ 'Vitest, Jest, or Mocha',
67
+ 'Testing Library for component tests',
68
+ 'Playwright or Cypress for E2E',
69
+ ],
70
+ conventions: [
71
+ 'ESLint and Prettier configuration',
72
+ 'Import path aliases (e.g., @/ prefix)',
73
+ 'Naming conventions for files and exports',
74
+ 'Error handling patterns',
75
+ ],
76
+ },
77
+ },
78
+ javascript: {
79
+ keyFiles: [
80
+ 'package.json', 'index.js', 'index.mjs', 'main.js', 'server.js',
81
+ 'app.js', 'cli.js', 'worker.js', 'handler.js', 'routes.js',
82
+ 'middleware.js', 'config.js', 'constants.js', 'utils.js',
83
+ 'next.config.mjs', 'next.config.js', 'vite.config.js',
84
+ 'turbo.json', 'vercel.json', '.babelrc', 'babel.config.js',
85
+ ],
86
+ excludedDirs: [
87
+ 'dist', 'build', '.next', '.turbo', '.vercel', 'coverage', '.cache',
88
+ ],
89
+ sourceExtensions: [
90
+ '.js', '.jsx', '.mjs', '.cjs', '.json', '.yml', '.yaml',
91
+ ],
92
+ systemBoundaryMarkers: [
93
+ 'package.json',
94
+ ],
95
+ promptHints: {
96
+ architecture: [
97
+ 'Module pattern (CommonJS vs ESM)',
98
+ 'API route organization',
99
+ 'State management approach',
100
+ 'Data fetching patterns',
101
+ ],
102
+ buildSystem: [
103
+ 'Bundler configuration (Vite, webpack, Rollup)',
104
+ 'Babel transpilation',
105
+ 'Monorepo tooling',
106
+ ],
107
+ deployTarget: [
108
+ 'Vercel, Netlify, Cloudflare Workers',
109
+ 'Docker containerization',
110
+ 'PM2 or similar process managers',
111
+ ],
112
+ testFramework: [
113
+ 'Jest or Mocha',
114
+ 'Testing Library for components',
115
+ 'Playwright or Cypress for E2E',
116
+ ],
117
+ conventions: [
118
+ 'ESLint and Prettier configuration',
119
+ 'Import conventions (CommonJS require vs ESM import)',
120
+ 'Error handling patterns',
121
+ ],
122
+ },
123
+ },
124
+ python: {
125
+ keyFiles: [
126
+ 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', 'Pipfile',
127
+ 'main.py', 'app.py', '__main__.py', 'manage.py', 'wsgi.py', 'asgi.py',
128
+ 'settings.py', 'urls.py', 'models.py', 'views.py', 'serializers.py',
129
+ 'admin.py', 'conftest.py', 'tasks.py', 'celery.py',
130
+ ],
131
+ excludedDirs: [
132
+ '__pycache__', '.venv', 'venv', 'env', '.tox', '.eggs',
133
+ '.mypy_cache', '.pytest_cache', '.ruff_cache', 'dist', 'build',
134
+ '*.egg-info',
135
+ ],
136
+ sourceExtensions: [
137
+ '.py', '.pyi', '.pyx', '.toml', '.cfg', '.ini', '.yml', '.yaml',
138
+ ],
139
+ systemBoundaryMarkers: [
140
+ 'pyproject.toml', 'setup.py', 'requirements.txt', '__init__.py',
141
+ ],
142
+ promptHints: {
143
+ architecture: [
144
+ 'Django settings modules and URL routing patterns',
145
+ 'FastAPI dependency injection and router organization',
146
+ 'Flask blueprint structure',
147
+ 'Package structure (__init__.py, relative imports)',
148
+ 'Async patterns (asyncio, ASGI)',
149
+ ],
150
+ buildSystem: [
151
+ 'pip, poetry, or uv for dependency management',
152
+ 'virtualenv or conda environments',
153
+ 'pyproject.toml build system (setuptools, hatch, flit)',
154
+ ],
155
+ deployTarget: [
156
+ 'gunicorn, uvicorn, or Daphne',
157
+ 'Docker containerization',
158
+ 'AWS Lambda, Google Cloud Functions',
159
+ 'systemd service configuration',
160
+ ],
161
+ testFramework: [
162
+ 'pytest with fixtures and conftest.py',
163
+ 'unittest or Django TestCase',
164
+ 'hypothesis for property-based testing',
165
+ 'tox for multi-version testing',
166
+ ],
167
+ conventions: [
168
+ 'PEP 8 style and black/ruff formatting',
169
+ 'Type hints and mypy/pyright',
170
+ 'Django conventions (models, views, serializers)',
171
+ 'Docstring format (Google, NumPy, or reStructuredText)',
172
+ ],
173
+ },
174
+ },
175
+ rust: {
176
+ keyFiles: [
177
+ 'Cargo.toml', 'main.rs', 'lib.rs', 'mod.rs', 'build.rs',
178
+ ],
179
+ excludedDirs: [
180
+ 'target',
181
+ ],
182
+ sourceExtensions: [
183
+ '.rs', '.toml',
184
+ ],
185
+ systemBoundaryMarkers: [
186
+ 'Cargo.toml',
187
+ ],
188
+ promptHints: {
189
+ architecture: [
190
+ 'Module tree (mod.rs vs inline mod declarations)',
191
+ 'Crate structure (lib.rs vs bin/main.rs)',
192
+ 'Trait-based abstractions and generics',
193
+ 'Error handling (Result, thiserror, anyhow)',
194
+ 'Async runtime (tokio, async-std)',
195
+ ],
196
+ buildSystem: [
197
+ 'Cargo workspace layout',
198
+ 'Feature flags and conditional compilation',
199
+ 'Build scripts (build.rs)',
200
+ 'Cargo.toml dependency management',
201
+ ],
202
+ deployTarget: [
203
+ 'Static binary compilation',
204
+ 'Docker multi-stage builds',
205
+ 'Cross-compilation targets',
206
+ 'WASM compilation (wasm-pack)',
207
+ ],
208
+ testFramework: [
209
+ 'Built-in #[test] and #[cfg(test)]',
210
+ 'Integration tests in tests/ directory',
211
+ 'Criterion for benchmarks',
212
+ 'proptest for property-based testing',
213
+ ],
214
+ conventions: [
215
+ 'Rust naming conventions (snake_case, CamelCase)',
216
+ 'clippy lints and rustfmt formatting',
217
+ 'Ownership, borrowing, and lifetime patterns',
218
+ 'Documentation comments (/// and //!)',
219
+ ],
220
+ },
221
+ },
222
+ go: {
223
+ keyFiles: [
224
+ 'go.mod', 'go.sum', 'main.go', 'cmd/main.go', 'handler.go',
225
+ 'server.go', 'router.go',
226
+ ],
227
+ excludedDirs: [
228
+ 'vendor',
229
+ ],
230
+ sourceExtensions: [
231
+ '.go', '.mod', '.sum',
232
+ ],
233
+ systemBoundaryMarkers: [
234
+ 'go.mod',
235
+ ],
236
+ promptHints: {
237
+ architecture: [
238
+ 'Package layout (cmd/, internal/, pkg/)',
239
+ 'Interface-driven design',
240
+ 'HTTP handler patterns (stdlib, chi, gin)',
241
+ 'Goroutine and channel patterns',
242
+ 'Context propagation',
243
+ ],
244
+ buildSystem: [
245
+ 'Go modules (go.mod, go.sum)',
246
+ 'Build tags and constraints',
247
+ 'Makefile or task runner targets',
248
+ 'CGO dependencies (if any)',
249
+ ],
250
+ deployTarget: [
251
+ 'Static binary deployment',
252
+ 'Docker scratch/distroless images',
253
+ 'Kubernetes, systemd, or cloud functions',
254
+ ],
255
+ testFramework: [
256
+ 'Built-in testing package',
257
+ 'Table-driven tests',
258
+ 'testify for assertions',
259
+ 'httptest for HTTP handler testing',
260
+ 'go test -race for race detection',
261
+ ],
262
+ conventions: [
263
+ 'Effective Go guidelines',
264
+ 'gofmt and golangci-lint',
265
+ 'Error wrapping with fmt.Errorf or errors.Is/As',
266
+ 'godoc comment conventions',
267
+ 'Short variable names in small scopes',
268
+ ],
269
+ },
270
+ },
271
+ ruby: {
272
+ keyFiles: [
273
+ 'Gemfile', 'config.ru', 'Rakefile', 'app.rb', 'config/routes.rb',
274
+ 'config/application.rb', 'config/database.yml', 'db/schema.rb',
275
+ ],
276
+ excludedDirs: [
277
+ 'tmp', 'log', 'vendor/bundle',
278
+ ],
279
+ sourceExtensions: [
280
+ '.rb', '.erb', '.haml', '.slim', '.rake', '.gemspec', '.yml', '.yaml',
281
+ ],
282
+ systemBoundaryMarkers: [
283
+ 'Gemfile', 'config.ru',
284
+ ],
285
+ promptHints: {
286
+ architecture: [
287
+ 'Rails MVC structure (app/models, app/controllers, app/views)',
288
+ 'Routing configuration (config/routes.rb)',
289
+ 'Middleware stack (config/application.rb)',
290
+ 'Service objects and interactors',
291
+ 'ActiveRecord associations and scopes',
292
+ ],
293
+ buildSystem: [
294
+ 'Bundler for gem management',
295
+ 'Rake tasks',
296
+ 'Asset pipeline (Sprockets or Propshaft)',
297
+ 'Rails generators and scaffolding',
298
+ ],
299
+ deployTarget: [
300
+ 'Puma or Unicorn application server',
301
+ 'Heroku, Render, or Railway',
302
+ 'Docker containerization',
303
+ 'Capistrano deployment',
304
+ ],
305
+ testFramework: [
306
+ 'RSpec with factories (FactoryBot)',
307
+ 'Minitest (Rails default)',
308
+ 'Capybara for integration tests',
309
+ 'SimpleCov for coverage',
310
+ ],
311
+ conventions: [
312
+ 'Ruby style guide and RuboCop',
313
+ 'Rails conventions (CoC, DRY)',
314
+ 'Database migrations and schema management',
315
+ 'Environment-based configuration (Rails.env)',
316
+ ],
317
+ },
318
+ },
319
+ java: {
320
+ keyFiles: [
321
+ 'pom.xml', 'build.gradle', 'build.gradle.kts', 'settings.gradle',
322
+ 'Application.java', 'Main.java', 'application.properties', 'application.yml',
323
+ ],
324
+ excludedDirs: [
325
+ 'target', 'build', '.gradle', '.mvn', 'out',
326
+ ],
327
+ sourceExtensions: [
328
+ '.java', '.kt', '.kts', '.xml', '.properties', '.yml', '.yaml', '.gradle',
329
+ ],
330
+ systemBoundaryMarkers: [
331
+ 'pom.xml', 'build.gradle', 'build.gradle.kts',
332
+ ],
333
+ promptHints: {
334
+ architecture: [
335
+ 'Spring Boot auto-configuration and dependency injection',
336
+ 'Package structure (controller, service, repository layers)',
337
+ 'JPA/Hibernate entity relationships',
338
+ 'REST API endpoint organization',
339
+ 'Configuration profiles (application-{env}.yml)',
340
+ ],
341
+ buildSystem: [
342
+ 'Maven or Gradle build lifecycle',
343
+ 'Multi-module project structure',
344
+ 'Dependency management and BOMs',
345
+ 'Plugin configuration',
346
+ ],
347
+ deployTarget: [
348
+ 'Embedded Tomcat/Netty (Spring Boot)',
349
+ 'Docker containerization',
350
+ 'Kubernetes with Helm charts',
351
+ 'WAR deployment to application server',
352
+ ],
353
+ testFramework: [
354
+ 'JUnit 5 with Spring Boot Test',
355
+ 'Mockito for mocking',
356
+ 'TestContainers for integration tests',
357
+ 'JaCoCo for coverage',
358
+ ],
359
+ conventions: [
360
+ 'Java naming conventions and package structure',
361
+ 'Spring annotations and stereotypes',
362
+ 'Checkstyle or SpotBugs configuration',
363
+ 'Lombok usage (if present)',
364
+ 'Javadoc documentation',
365
+ ],
366
+ },
367
+ },
368
+ kotlin: {
369
+ keyFiles: [
370
+ 'build.gradle.kts', 'build.gradle', 'settings.gradle.kts', 'settings.gradle',
371
+ 'Application.kt', 'Main.kt', 'application.properties', 'application.yml',
372
+ ],
373
+ excludedDirs: [
374
+ 'target', 'build', '.gradle', 'out',
375
+ ],
376
+ sourceExtensions: [
377
+ '.kt', '.kts', '.java', '.xml', '.properties', '.yml', '.yaml',
378
+ ],
379
+ systemBoundaryMarkers: [
380
+ 'build.gradle.kts', 'build.gradle',
381
+ ],
382
+ promptHints: {
383
+ architecture: [
384
+ 'Kotlin coroutines and Flow',
385
+ 'Ktor routing and plugins',
386
+ 'Spring Boot Kotlin idioms',
387
+ 'Data classes and sealed classes',
388
+ 'Multiplatform project structure',
389
+ ],
390
+ buildSystem: [
391
+ 'Gradle Kotlin DSL',
392
+ 'Kotlin compiler plugins',
393
+ 'Multiplatform expect/actual declarations',
394
+ ],
395
+ deployTarget: [
396
+ 'JVM deployment (same as Java)',
397
+ 'Kotlin/Native compilation',
398
+ 'Kotlin/JS or Kotlin/WASM',
399
+ ],
400
+ testFramework: [
401
+ 'JUnit 5 or kotest',
402
+ 'MockK for mocking',
403
+ 'kotlinx-coroutines-test for async tests',
404
+ ],
405
+ conventions: [
406
+ 'Kotlin coding conventions (kotlin.style)',
407
+ 'Null safety and smart casts',
408
+ 'Extension functions and DSL builders',
409
+ 'KDoc documentation',
410
+ ],
411
+ },
412
+ },
413
+ csharp: {
414
+ keyFiles: [
415
+ '*.csproj', '*.sln', 'Program.cs', 'Startup.cs',
416
+ 'appsettings.json', 'appsettings.Development.json',
417
+ 'global.json', 'Directory.Build.props',
418
+ ],
419
+ excludedDirs: [
420
+ 'bin', 'obj', '.vs', 'packages', 'TestResults',
421
+ ],
422
+ sourceExtensions: [
423
+ '.cs', '.csx', '.csproj', '.sln', '.json', '.xml', '.razor', '.cshtml',
424
+ ],
425
+ systemBoundaryMarkers: [
426
+ '*.csproj', '*.sln',
427
+ ],
428
+ promptHints: {
429
+ architecture: [
430
+ 'ASP.NET Core middleware pipeline',
431
+ 'Dependency injection (IServiceCollection)',
432
+ 'Controller and Minimal API endpoints',
433
+ 'Entity Framework Core and DbContext',
434
+ 'Configuration and Options pattern',
435
+ ],
436
+ buildSystem: [
437
+ 'dotnet CLI (build, publish, pack)',
438
+ 'NuGet package management',
439
+ 'MSBuild project files (.csproj)',
440
+ 'Solution structure (.sln)',
441
+ ],
442
+ deployTarget: [
443
+ 'Kestrel web server',
444
+ 'Docker containerization',
445
+ 'Azure App Service or AWS ECS',
446
+ 'IIS deployment',
447
+ ],
448
+ testFramework: [
449
+ 'xUnit, NUnit, or MSTest',
450
+ 'Moq for mocking',
451
+ 'FluentAssertions',
452
+ 'WebApplicationFactory for integration tests',
453
+ ],
454
+ conventions: [
455
+ 'C# naming conventions (PascalCase for public)',
456
+ '.editorconfig and StyleCop/Roslyn analyzers',
457
+ 'Nullable reference types',
458
+ 'XML documentation comments',
459
+ 'SOLID principles and clean architecture',
460
+ ],
461
+ },
462
+ },
463
+ elixir: {
464
+ keyFiles: [
465
+ 'mix.exs', 'config/config.exs', 'config/runtime.exs',
466
+ 'lib/application.ex', 'lib/endpoint.ex', 'lib/router.ex',
467
+ 'lib/repo.ex',
468
+ ],
469
+ excludedDirs: [
470
+ '_build', 'deps', '.elixir_ls',
471
+ ],
472
+ sourceExtensions: [
473
+ '.ex', '.exs', '.eex', '.heex', '.leex',
474
+ ],
475
+ systemBoundaryMarkers: [
476
+ 'mix.exs',
477
+ ],
478
+ promptHints: {
479
+ architecture: [
480
+ 'OTP application and supervision trees',
481
+ 'Phoenix endpoint, router, and controller pipeline',
482
+ 'Ecto schemas, changesets, and repo',
483
+ 'LiveView and HEEx templates',
484
+ 'GenServer and Agent patterns',
485
+ ],
486
+ buildSystem: [
487
+ 'Mix build tool and tasks',
488
+ 'Hex package management',
489
+ 'Umbrella project structure',
490
+ 'Release configuration (mix release)',
491
+ ],
492
+ deployTarget: [
493
+ 'Erlang/OTP release (mix release)',
494
+ 'Docker containerization',
495
+ 'Fly.io or Gigalixir',
496
+ 'Hot code upgrades',
497
+ ],
498
+ testFramework: [
499
+ 'ExUnit with describe/test blocks',
500
+ 'Mox for mocking',
501
+ 'Wallaby for browser testing',
502
+ 'StreamData for property-based testing',
503
+ ],
504
+ conventions: [
505
+ 'Elixir style guide and Credo',
506
+ 'Pattern matching and pipeline operator (|>)',
507
+ 'Module documentation (@moduledoc, @doc)',
508
+ 'Naming conventions (snake_case modules, CamelCase aliases)',
509
+ ],
510
+ },
511
+ },
512
+ php: {
513
+ keyFiles: [
514
+ 'composer.json', 'index.php', 'artisan', '.env.example',
515
+ 'config/app.php', 'routes/web.php', 'routes/api.php',
516
+ 'app/Http/Kernel.php', 'webpack.mix.js', 'vite.config.js',
517
+ ],
518
+ excludedDirs: [
519
+ 'vendor', 'storage', 'bootstrap/cache', '.phpunit.cache',
520
+ ],
521
+ sourceExtensions: [
522
+ '.php', '.blade.php', '.twig', '.json', '.yml', '.yaml', '.xml',
523
+ ],
524
+ systemBoundaryMarkers: [
525
+ 'composer.json',
526
+ ],
527
+ promptHints: {
528
+ architecture: [
529
+ 'Laravel service container and providers',
530
+ 'Route organization (web.php, api.php)',
531
+ 'Eloquent ORM models and relationships',
532
+ 'Middleware pipeline and guards',
533
+ 'Blade or Twig templating',
534
+ ],
535
+ buildSystem: [
536
+ 'Composer for dependency management',
537
+ 'Laravel Mix or Vite for frontend assets',
538
+ 'Artisan CLI commands',
539
+ 'PSR-4 autoloading',
540
+ ],
541
+ deployTarget: [
542
+ 'PHP-FPM with Nginx or Apache',
543
+ 'Docker containerization',
544
+ 'Laravel Forge or Vapor',
545
+ 'Shared hosting deployment',
546
+ ],
547
+ testFramework: [
548
+ 'PHPUnit with Laravel TestCase',
549
+ 'Pest PHP for expressive tests',
550
+ 'Dusk for browser testing',
551
+ 'Mockery for mocking',
552
+ ],
553
+ conventions: [
554
+ 'PSR-12 coding standard',
555
+ 'Laravel conventions (naming, directory structure)',
556
+ 'PHP-CS-Fixer or PHP_CodeSniffer',
557
+ 'PHPDoc annotations',
558
+ 'Strict types declaration',
559
+ ],
560
+ },
561
+ },
562
+ dart: {
563
+ keyFiles: [
564
+ 'pubspec.yaml', 'lib/main.dart', 'lib/app.dart',
565
+ 'analysis_options.yaml', 'build.yaml',
566
+ ],
567
+ excludedDirs: [
568
+ '.dart_tool', 'build', '.pub-cache', '.pub',
569
+ ],
570
+ sourceExtensions: [
571
+ '.dart', '.yaml', '.arb',
572
+ ],
573
+ systemBoundaryMarkers: [
574
+ 'pubspec.yaml',
575
+ ],
576
+ promptHints: {
577
+ architecture: [
578
+ 'Flutter widget tree and composition',
579
+ 'State management (Riverpod, Bloc, Provider)',
580
+ 'Navigation and routing',
581
+ 'Platform channels for native code',
582
+ 'Package structure (lib/src, lib/widgets)',
583
+ ],
584
+ buildSystem: [
585
+ 'pub package manager',
586
+ 'Flutter build modes (debug, profile, release)',
587
+ 'Build runner for code generation',
588
+ 'Dart analysis options',
589
+ ],
590
+ deployTarget: [
591
+ 'Android (APK/AAB) and iOS (IPA)',
592
+ 'Web deployment (Flutter web)',
593
+ 'Desktop (macOS, Windows, Linux)',
594
+ 'Firebase App Distribution',
595
+ ],
596
+ testFramework: [
597
+ 'flutter_test and widget testing',
598
+ 'integration_test package',
599
+ 'mockito for Dart',
600
+ 'golden tests for visual regression',
601
+ ],
602
+ conventions: [
603
+ 'Effective Dart guidelines',
604
+ 'dart format and dart analyze',
605
+ 'Null safety',
606
+ 'dartdoc documentation',
607
+ 'Widget naming conventions',
608
+ ],
609
+ },
610
+ },
611
+ cpp: {
612
+ keyFiles: [
613
+ 'CMakeLists.txt', 'Makefile', 'meson.build', 'conanfile.txt',
614
+ 'conanfile.py', 'vcpkg.json', 'main.cpp', 'main.c',
615
+ 'src/main.cpp', 'include/',
616
+ ],
617
+ excludedDirs: [
618
+ 'build', 'cmake-build-debug', 'cmake-build-release',
619
+ '.cache', 'out', 'Debug', 'Release', 'x64',
620
+ ],
621
+ sourceExtensions: [
622
+ '.c', '.cpp', '.cc', '.cxx', '.h', '.hpp', '.hxx',
623
+ '.cmake', '.in',
624
+ ],
625
+ systemBoundaryMarkers: [
626
+ 'CMakeLists.txt', 'Makefile', 'meson.build',
627
+ ],
628
+ promptHints: {
629
+ architecture: [
630
+ 'Header/source file organization (include/, src/)',
631
+ 'Namespace structure',
632
+ 'Template metaprogramming patterns',
633
+ 'Memory management (smart pointers, RAII)',
634
+ 'Build system target organization',
635
+ ],
636
+ buildSystem: [
637
+ 'CMake, Make, or Meson',
638
+ 'Conan or vcpkg for package management',
639
+ 'Compiler flags and configurations',
640
+ 'Cross-compilation setup',
641
+ ],
642
+ deployTarget: [
643
+ 'Native binary compilation',
644
+ 'Static vs dynamic linking',
645
+ 'Docker for reproducible builds',
646
+ 'Platform-specific packaging (deb, rpm, MSI)',
647
+ ],
648
+ testFramework: [
649
+ 'Google Test (gtest) or Catch2',
650
+ 'CTest for test orchestration',
651
+ 'Valgrind or AddressSanitizer for memory checks',
652
+ 'Benchmark frameworks (Google Benchmark)',
653
+ ],
654
+ conventions: [
655
+ 'C++ Core Guidelines',
656
+ 'clang-format and clang-tidy',
657
+ 'Header include guards or #pragma once',
658
+ 'Doxygen documentation',
659
+ 'Modern C++ idioms (C++17/20/23)',
660
+ ],
661
+ },
662
+ },
663
+ };
664
+ // ── Helper functions ───────────────────────────────────────────────────────
665
+ /**
666
+ * Get the merged key files list for a detected stack.
667
+ * Returns BASE_KEY_FILES + language-specific files (deduplicated).
668
+ */
669
+ function getKeyFilesForStack(stack) {
670
+ const config = exports.LANGUAGE_CONFIGS[stack.language];
671
+ if (!config)
672
+ return [...exports.BASE_KEY_FILES];
673
+ const seen = new Set();
674
+ const result = [];
675
+ for (const file of [...exports.BASE_KEY_FILES, ...config.keyFiles]) {
676
+ if (!seen.has(file)) {
677
+ seen.add(file);
678
+ result.push(file);
679
+ }
680
+ }
681
+ return result;
682
+ }
683
+ /**
684
+ * Get the merged excluded dirs for a detected stack.
685
+ * Returns BASE_EXCLUDED_DIRS + language-specific dirs.
686
+ */
687
+ function getExcludedDirsForStack(stack) {
688
+ const config = exports.LANGUAGE_CONFIGS[stack.language];
689
+ const dirs = new Set(exports.BASE_EXCLUDED_DIRS);
690
+ if (config) {
691
+ for (const dir of config.excludedDirs) {
692
+ dirs.add(dir);
693
+ }
694
+ }
695
+ return dirs;
696
+ }
697
+ /**
698
+ * Get prompt hints for the Gemini compiler.
699
+ * Falls back to TypeScript hints for unknown languages.
700
+ */
701
+ function getPromptHintsForStack(stack) {
702
+ const config = exports.LANGUAGE_CONFIGS[stack.language] ?? exports.LANGUAGE_CONFIGS['typescript'];
703
+ return config.promptHints;
704
+ }
705
+ /**
706
+ * Get the source extensions for a detected stack.
707
+ */
708
+ function getSourceExtensionsForStack(stack) {
709
+ const config = exports.LANGUAGE_CONFIGS[stack.language];
710
+ if (!config) {
711
+ // Fallback: broad set of common extensions
712
+ return new Set([
713
+ '.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs',
714
+ '.py', '.rs', '.go', '.java', '.kt', '.rb',
715
+ '.json', '.yml', '.yaml', '.toml', '.md',
716
+ ]);
717
+ }
718
+ return new Set(config.sourceExtensions);
719
+ }
720
+ /**
721
+ * Get system boundary markers for a detected stack.
722
+ * These are files that indicate a "system root" directory.
723
+ */
724
+ function getSystemBoundaryMarkersForStack(stack) {
725
+ const config = exports.LANGUAGE_CONFIGS[stack.language];
726
+ if (!config)
727
+ return ['package.json', 'Cargo.toml', 'go.mod', 'pyproject.toml'];
728
+ return config.systemBoundaryMarkers;
729
+ }