diff --git a/README.md b/README.md index b06aabe..c53c91e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ **Zero dependencies. AST precision. 30+ framework detectors. 13 ORM parsers. 13 MCP tools. One `npx` call.** -**Works with TypeScript, JavaScript, Python, Go, Ruby, Elixir, Java, Kotlin, Rust, PHP, Dart, Swift, and C#.** TypeScript projects get full AST precision. Everything else uses battle-tested regex detection across the same 30+ frameworks. +**Works with TypeScript, JavaScript, Python, Go, Ruby, Elixir, Java, Kotlin, Rust, PHP, Dart, Swift, C#, and BrightScript/BrighterScript (Roku).** TypeScript projects get full AST precision. Everything else uses battle-tested regex detection across the same 30+ frameworks. [![npm version](https://img.shields.io/npm/v/codesight?style=for-the-badge&logo=npm&color=CB3837)](https://www.npmjs.com/package/codesight) [![npm downloads](https://img.shields.io/npm/dm/codesight?style=for-the-badge&logo=npm&color=blue&label=Monthly%20Downloads)](https://www.npmjs.com/package/codesight) @@ -487,20 +487,89 @@ Each detector type maps to a measured token cost that an AI would spend to disco The 1.3x multiplier accounts for AI revisiting files during multi-turn conversations. These estimates are conservative. A developer manually verified that Claude Code spends 40-70K tokens exploring the same projects that codesight summarizes in 3-5K tokens. +## Roku / BrightScript / SceneGraph + +codesight treats Roku channels as first-class projects. The `manifest` file at the channel root anchors detection — the same file Roku itself uses to identify a channel, so zero configuration is needed for the common case. + +**Standard single-channel layout** (about 90% of Roku repos, matches the Roku docs' getting-started template and projects like `rokucommunity/brighterscript-template`): + +``` +/ + manifest + source/ # Main.brs + shared .brs libraries + components/ # *.xml + paired *.brs component handlers + images/ +``` + +codesight also recognizes the `rokucommunity/brighterscript-template` layout where the channel lives under `src/` and the root carries a `bsconfig.json` for BrighterScript tooling. + +**Multi-channel monorepo layout** (less common — used by larger codebases that ship several branded channels from one repo with `roku-deploy` + `gulp` to merge a shared `common/` layer with per-channel assets at build time): + +``` +/ + package.json # depends on roku-deploy, gulp + gulpfile.js + src/apps/ + common/ # shared layer, merged into every channel at build + creatorA/ + manifest + creatorB/ + manifest +``` + +This is detected via a strict structural signal: no manifest at root, `roku-deploy` in deps, and a `common/` directory with at least 2 sibling directories that each have their own `manifest`. When the signal matches, each channel (plus `common/`) is registered as a workspace. + +### Mappings to codesight's data model + +| codesight concept | Roku equivalent | +|---|---| +| Routes | Screens — every child element with an `id` declared in the Scene XML's ``. `method = VIEW` by default, upgraded to `MODAL` if a navigation call-site passes a literal `true` as the second argument. | +| Schema | Every SceneGraph component XML whose `` has at least one `` — the typed contract is the model. | +| Components | Every `` XML (views, tasks, scenes, modals). Props = interface fields. | +| Libraries | `.brs` / `.bs` files outside `components/` — top-level `function`/`sub` plus BrighterScript `class` / `namespace` / `enum` / `interface`. | +| Middleware | `observeField` subscriptions, `m.global.AddField` registrations. BugsnagTask / RudderstackTask recognized when present. | +| Dependencies | `