Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Deep Kumar Singh Kushwah

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion TRACKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Status

- **Current phase:** 7 — Backend parsers & federation (v2 horizon). Phase 6 complete (Gate 6, M6). **0.5.0 published to npm.**
- **Next step:** publish 0.6.0 to npm (needs the user's creds — `npm publish`), then the tester validates the wider data-source coverage. After that, the backend-parser steps (7.4 Python, 7.5 Go, 7.6 federation) — larger, new-package work, still sketch-level; best held until that feedback confirms priority. 6F.6 detection half still blocked on a real failing test file from the tester.
- **Next step:** publish **0.6.1** to npm (needs the user's creds — `npm publish`). 0.6.0 is already published; 0.6.1 is a metadata-only patch that carries the npm/GitHub SEO work (description, 20 keywords incl. the MCP/AI-agent cluster, `repository`/`homepage`/`bugs`, LICENSE, README rewrite) — registry metadata is immutable per version, so it only takes effect on publish. Then the tester validates the wider data-source coverage. After that, the backend-parser steps (7.4 Python, 7.5 Go, 7.6 federation) — larger, new-package work, still sketch-level; best held until that feedback confirms priority. 6F.6 detection half still blocked on a real failing test file from the tester.
- **Done:** 0.1–0.4, 1.1–1.6, 2.1–2.5, 3.1–3.6, 4.1–4.6, 5.1–5.7, 6F.1–6F.5, 6F.7–6F.10 + 6F.6 (defensive half), **6.1–6.5 (Phase 6 complete)**, **7.1 (GraphQL adapter), 7.2 (Next.js server data), 7.3 (push channels)** · **0.5.0 released & published to npm** (tag v0.5.0); **0.6.0 prepared** (7.1–7.3; all packages + generator/CLI/MCP version strings bumped, README changelog; `npm pack` verified; publish pending user's npm creds). **Self-validated on Grafana frontend** (6,461 files, 15,334 nodes / 18,367 edges in 72 s): 55 RTK-query data sources, 32 routes, 1,009 coverage edges, gibberish declines — all previously 0/1 in the field run.
- **Gates passed:** Gate 0 (CI + red-path, #5/#6) · Gate 1 (precision 1.000, recall 0.895, zero poison) · Gate 2 (C1 instance attribution 1.000 · B1 4-level handler chains · C6 store writers↔readers · A9 portals — scorecard 137/0/0, precision & recall 1.000) · Gate 3 (B3 action effects · B4 routers · B6 cyclic journeys terminate · B7/B8 form & non-JSX events · G5 flag/role conditions — precision & recall 1.000) · Gate 4 (A4 rarity · A10 fuzzy/OCR · A1 structural · A6 subtree · E3 vision annotations · E2 aliases · G4 corrections — high-conf correct 1.000, ambiguity honesty 1.000, poison rate 0.000) · Gate 5 (F1 context bundle · F2 blast radius · F3 test coverage · F4 response schema · F5 git history · MCP server over stdio — scorecard 265/0/0, all honesty metrics 1.000; **M5 reached** — ticket in → budgeted context bundle out, over MCP)

Expand Down
2 changes: 1 addition & 1 deletion eval/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderadar/eval",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"description": "CodeRadar eval harness — scans failure-mode fixtures, diffs against golden outputs, emits the scorecard that gates every phase.",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "coderadar",
"private": true,
"version": "0.6.0",
"version": "0.6.1",
"description": "Static analysis toolkit that maps UI components to their data sources (APIs, state, events) — enabling AI agents to trace any screenshot back to the code and data behind it.",
"license": "MIT",
"packageManager": "pnpm@11.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderadar/agent-sdk",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"description": "resolveContext orchestrator — classifies a ticket and runs the matching engine. Deterministic, no LLM in the node. Bundled into the published ui-lineage package.",
"license": "MIT",
Expand Down
21 changes: 21 additions & 0 deletions packages/cli/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Deep Kumar Singh Kushwah

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 17 additions & 2 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
# ui-lineage
# ui-lineage — React data lineage & codebase context for AI coding agents

**Map UI components to their data, journeys, and behavior** — trace any screenshot or ticket back to the code, APIs, state, events, and navigation behind it. Deterministic static analysis for React/TSX. No LLM in the core, no network calls.
[![npm version](https://img.shields.io/npm/v/ui-lineage.svg)](https://www.npmjs.com/package/ui-lineage)
[![npm downloads](https://img.shields.io/npm/dm/ui-lineage.svg)](https://www.npmjs.com/package/ui-lineage)
[![license](https://img.shields.io/npm/l/ui-lineage.svg)](https://github.com/officialCodeWork/CodeRadar/blob/main/LICENSE)
[![node](https://img.shields.io/node/v/ui-lineage.svg)](https://nodejs.org)

**Map every UI component to the APIs, state, and events behind it** — trace any screenshot or Jira ticket back to the exact React component, its data lineage, user journeys, and blast radius. Deterministic **TypeScript static analysis**: no LLM in the core, no network calls, byte-identical output on every run.

Ships an **[MCP server](#mcp-server)** (`ui-lineage-mcp`), so Claude Code, Cursor, Windsurf, or any Model Context Protocol client can query your codebase's data flow as structured context instead of re-reading files.

`ui-lineage` scans a React codebase into a **lineage graph** and answers three questions:

1. **match** — text or structure seen on screen → the component(s) that render it (rarity-weighted, fuzzy/OCR-tolerant, structure-aware, with business-vocab aliases and human corrections, and *calibrated* confidence).
2. **trace** — a component → every API, state slice, and event that feeds it, *attributed per instance* (a shared `<DataTable>` reports `/api/users` on the Users page and `/api/invoices` on Invoices).
3. **journeys** — a page → the user-action paths out of it (click → navigate → click…), lazily expanded and cycle-safe, with flag/role conditions.

## Use it to

- **Give an AI coding agent real context** — over MCP, so it edits the right component instead of guessing from file names.
- **Answer "where does this number come from?"** — screenshot or UI text → component → the exact endpoint feeding it.
- **Scope a change before making it** — blast radius of an API, component, or route across the whole app.
- **Onboard onto an unfamiliar React codebase** — see which APIs feed which screens, and how users navigate between them.
- **Triage a bug ticket** — text in, ranked components out, with confidence and evidence (or an honest "ambiguous").

## Install

```bash
Expand Down
28 changes: 24 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
"name": "ui-lineage",
"version": "0.6.0",
"description": "Map UI components to their data sources and user journeys — trace any screenshot back to the code, APIs, state, and navigation behind it. Deterministic static analysis for React/TSX.",
"version": "0.6.1",
"description": "React & TypeScript static analysis that maps every UI component to the APIs, state, and events behind it — and serves that context to AI coding agents over MCP. Screenshot or ticket in; component, data lineage, user journeys, and blast radius out. Deterministic, no LLM in the core.",
"license": "MIT",
"homepage": "https://github.com/officialCodeWork/CodeRadar#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/officialCodeWork/CodeRadar.git",
"directory": "packages/cli"
},
"bugs": {
"url": "https://github.com/officialCodeWork/CodeRadar/issues"
},
"type": "module",
"bin": {
"ui-lineage": "dist/index.js",
Expand All @@ -28,13 +37,24 @@
],
"keywords": [
"react",
"typescript",
"static-analysis",
"code-analysis",
"data-lineage",
"data-flow",
"dependency-graph",
"component-graph",
"impact-analysis",
"mcp",
"mcp-server",
"model-context-protocol",
"ai-agents",
"codebase-context",
"llm",
"claude",
"user-journeys",
"ast",
"ts-morph",
"user-journeys",
"component-graph",
"cli"
],
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ program
.description(
"Map UI components to their data sources and user journeys — trace any screenshot back to the code, APIs, state, and navigation behind it.",
)
.version("0.6.0");
.version("0.6.1");

program
.command("scan")
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderadar/core",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"description": "CodeRadar lineage graph schema — the language-agnostic contract every parser emits and every agent consumes. Bundled into the published `ui-lineage` package.",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderadar/mcp",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"description": "Model Context Protocol server exposing CodeRadar as a context-provider node: resolve_context, find_component, trace_lineage, journeys, blast_radius over a pre-built graph.",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function envelope(value: unknown): ToolResult {

/** Build a configured MCP server bound to one pre-built graph. */
export function createServer(graph: LineageGraph): McpServer {
const server = new McpServer({ name: "coderadar", version: "0.6.0" });
const server = new McpServer({ name: "coderadar", version: "0.6.1" });

server.registerTool(
"resolve_context",
Expand Down
2 changes: 1 addition & 1 deletion packages/parser-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderadar/parser-react",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"description": "React/TSX parser for CodeRadar — extracts components, hooks, data sources, state, and events into a lineage graph. Bundled into the published `ui-lineage` package.",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/parser-react/src/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export function scanProject(project: Project, root: string, options: ScanOptions
version: 2,
root,
generatedAt: new Date().toISOString(),
generator: "ui-lineage@0.6.0",
generator: "ui-lineage@0.6.1",
// Canonical output order (6.3, G8): sort nodes and edges by stable keys so
// the serialized graph is byte-identical across runs and machines. Node ids
// are unique; edges are keyed by every identifying field. The query side
Expand Down
2 changes: 1 addition & 1 deletion packages/vision/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderadar/vision",
"version": "0.6.0",
"version": "0.6.1",
"private": true,
"description": "Screenshot → { terms, structure, annotations } vision adapter for ui-lineage. Images are processed in memory and never persisted (G7). Bundled into the published ui-lineage package.",
"license": "MIT",
Expand Down
Loading