@theglitchking/babel-fish 2.0.0 → 2.0.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.
@@ -456,7 +456,6 @@ CLAUDEMD
456
456
  # ║ MAIN FLOW ║
457
457
  # ╚══════════════════════════════════════════════════════════════════════════╝
458
458
 
459
- clear
460
459
  printf '%b\n' "
461
460
  ${CYAN}${BOLD}
462
461
  ╔══════════════════════════════════════════╗
@@ -603,19 +603,32 @@ class FrontendScanner:
603
603
  FEATURE_DIRS = {'features', 'pages', 'views', 'screens', 'modules', 'app'}
604
604
  COMPONENT_EXTS = {'.tsx', '.jsx'}
605
605
  HOOK_PATTERN = re.compile(r'^use[A-Z]')
606
+ # Candidate bases to search for the FEATURE_DIRS, relative to PROJECT_ROOT.
607
+ # Covers repo-root and src/ layouts plus monorepos where the frontend is a
608
+ # subpackage (e.g. frontend/src/features), not just at the repo root.
609
+ SEARCH_PREFIXES = ('', 'src', 'frontend', 'frontend/src',
610
+ 'web', 'web/src', 'client', 'client/src', 'ui', 'ui/src')
606
611
 
607
612
  def scan(self) -> list[dict]:
608
- features = []
609
- for feat_dir_name in self.FEATURE_DIRS:
610
- feat_dir = PROJECT_ROOT / feat_dir_name
611
- if not feat_dir.exists():
612
- # try nested src/
613
- feat_dir = PROJECT_ROOT / 'src' / feat_dir_name
614
- if not feat_dir.is_dir():
615
- continue
616
- for entry in sorted(feat_dir.iterdir()):
617
- if entry.is_dir() and not entry.name.startswith('.'):
613
+ features, seen = [], set()
614
+ for prefix in self.SEARCH_PREFIXES:
615
+ base = PROJECT_ROOT / prefix if prefix else PROJECT_ROOT
616
+ for feat_dir_name in self.FEATURE_DIRS:
617
+ feat_dir = base / feat_dir_name
618
+ if not feat_dir.is_dir():
619
+ continue
620
+ for entry in sorted(feat_dir.iterdir()):
621
+ if not (entry.is_dir() and not entry.name.startswith('.')):
622
+ continue
623
+ rp = entry.resolve()
624
+ if rp in seen:
625
+ continue # already counted via another prefix
618
626
  stats = self._scan_feature_dir(entry)
627
+ # Only emit dirs that actually contain frontend components, so a
628
+ # backend package named e.g. 'app/' is not misread as a feature.
629
+ if stats['component_count'] + stats['hook_count'] == 0:
630
+ continue
631
+ seen.add(rp)
619
632
  stats['name'] = entry.name
620
633
  stats['path'] = str(entry.relative_to(PROJECT_ROOT))
621
634
  features.append(stats)
@@ -0,0 +1,6 @@
1
+ {
2
+ "enabledMcpjsonServers": [
3
+ "semantic-vault"
4
+ ],
5
+ "enableAllProjectMcpServers": true
6
+ }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.0.1] - 2026-06-08
6
+
7
+ ### Fixed
8
+
9
+ - **Frontend feature scanner now detects monorepo layouts.** `FrontendScanner`
10
+ previously looked for `features/`, `pages/`, `views/`, etc. only at the repo
11
+ root or under a top-level `src/`. Projects that keep the frontend in a
12
+ subpackage (e.g. `frontend/src/features/`, the common React/Vite plus Python
13
+ backend split) were reported as "No frontend feature directories detected,"
14
+ leaving project-map sections 09 (Frontend Features) and 13 (Frontend to
15
+ Backend Map) empty. The scanner now searches `frontend/`, `web/`, `client/`,
16
+ and `ui/` (each with an optional `src/`) in addition to the repo root and
17
+ `src/`, dedupes by resolved path, and only emits directories that actually
18
+ contain `.jsx`/`.tsx` files so a backend package named `app/` is not
19
+ misclassified as a frontend feature.
20
+
5
21
  ## [2.0.0] — 2026-04-19
6
22
 
7
23
  ### Breaking changes
package/README.md CHANGED
@@ -8,6 +8,9 @@
8
8
  [![Status: Production Ready](https://img.shields.io/badge/Status-Production%20Ready-green.svg)]()
9
9
  [![GitHub: TheGlitchKing/babel-fish](https://img.shields.io/badge/GitHub-TheGlitchKing%2Fbabel--fish-blue)](https://github.com/TheGlitchKing/babel-fish)
10
10
 
11
+ > [!NOTE]
12
+ > **Pairs with [`semantic-memory`](https://github.com/TheGlitchKing/semantic-sidekick) (formerly `semantic-sidekick`).** When both are installed, semantic-memory consumes babel-fish's auto-generated `.babel-fish/` output as a `project-map` corpus AND extracts `01-vocabulary.md` into a structured `glossary.json` side-channel. That gives your AI a deterministic `translate("deals page") → "features/deal-pipeline/DealPipeline.tsx"` MCP verb instead of relying on semantic-search-luck. See [`docs/glossary-contract.md`](./docs/glossary-contract.md) for the producer/consumer data contract and [`docs/integration-with-semantic-memory.md`](./docs/integration-with-semantic-memory.md) for the setup walkthrough. babel-fish standalone behavior is unchanged — semantic-memory is purely additive.
13
+
11
14
  ---
12
15
 
13
16
  ## What Does This Do?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theglitchking/babel-fish",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Gives your AI coding assistant instant, accurate knowledge of every route, model, service, feature, and infrastructure element in your codebase.",
5
5
  "type": "module",
6
6
  "bin": {