feature-map
GitHub维护 LangWatch 产品的功能地图文件,确保 feature-map.json 与 FEATURE_MAP.md 同步。用于添加或重命名功能、API、UI 路由等时,验证代码与服务的一致性,保持产品架构文档的准确性。
Trigger Scenarios
Install
npx skills add langwatch/langwatch --skill feature-map -g -y
SKILL.md
Frontmatter
{
"name": "feature-map",
"description": "Maintain the canonical LangWatch feature map (feature-map.json at the repo root) and its human-readable companion FEATURE_MAP.md. Use when adding or renaming a feature, a REST namespace, a UI route, an MCP tool, a CLI command or a user-facing skill, so the central registry keeps naming what the code actually serves. Every entry is validated against the code that provides it.",
"argument-hint": "[what changed, e.g. 'added dataset MCP tools']",
"user-invocable": true
}
Maintain the feature map
feature-map.json at the repo root is the product's public information architecture:
the top-level categories (the features array; count them in the file, not here), each with children, each child a feature with its surfaces.
FEATURE_MAP.md is the coverage table derived from it — edit both in one change. Use the
underscore form; never create FEATURE-MAP.md.
A feature here is a customer-facing capability, a row in this map, named the way a
user would name it. It is not the same thing as a module (modules/<name>,
the contract, process, browser and client packages); one feature can be served by several modules, and
one module can serve several features.
The entry shape
{
"id": "observability.tracing",
"name": "Tracing",
"description": "Capture LLM calls, spans, inputs/outputs, costs, and latency",
"surfaces": {
"code": {
"sdk": { "python": "…", "typescript": "…", "go": "…" },
"cli": ["trace search"],
"hints": {},
"skill": "tracing",
"docs": "https://…"
},
"platform": { "ui": "/traces", "mcp": ["search_traces"], "skill": null, "docs": null },
"api": "/api/collector",
"docs": "https://…"
},
"sync": "code-to-platform",
"produces": ["traces"],
"consumes": []
}
codeis what a developer writes in their own project;platformis the UI and MCP.apianddocsare cross-cutting.- Values are namespaces, not methods:
"langwatch.experiment"means the module. sync:null(one mode only),"bidirectional","code-to-platform","platform-to-code". Future intent goes inplannedSync, never insync.hintscarries a copy-pasteable example per CLI command.- No aspirational entries. If the code does not serve it, it is not in the map.
Where each surface actually comes from
| Field | Verify against |
|---|---|
surfaces.api |
modules/<f>/process/src/transport/*.rest.ts (defineRestRouter), mounted by the module's installation in apps/api (record §8) |
| tRPC namespaces | modules/<f>/process/src/transport/*.trpc.ts |
platform.ui |
apps/ui/src/shell/ui-route-table.ts (the path of a route descriptor) |
| sidebar placement | modules/navigation/browser/src/model/ (project-nav-items.ts, section-nav-items.ts) |
platform.mcp |
mcp/typescript/src/create-mcp-server.ts (registerTools) over mcp/typescript/src/tools/ |
code.cli |
sdks/typescript/src/cli/commands/ — one directory per command group, sdks/typescript/src/cli/index.ts is the entry |
code.skill |
skills/<name>/SKILL.md (the user-facing skills, not .claude/skills) |
code.sdk |
sdks/python/src/langwatch/__init__.py, sdks/typescript/src/index.ts, sdks/go/ |
Updating
- Read
feature-map.json, find the feature byid(dotted:category.feature). - Add the value to the right surface array or field. A brand-new feature gets a whole entry under the category whose mental model it belongs to — the hierarchy is the product's, not the code's.
- Mirror the change in
FEATURE_MAP.md. - Validate every field you touched against the table above with
ls/grep -rn(ripgrep is unreliable in this repo). An entry that names something the code does not serve is worse than a missing one. - A route rename must update this file: it is a live surface, not documentation.
Report
The entries added or changed, the code path each was validated against, and anything you found in the map that the code no longer serves.
Version History
- c0c14dc Current 2026-10-19 19:32
- 12615f1 2026-08-20 10:00


