umtri-mcp 1.5.0 → 1.5.2

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.
package/core/policy.js CHANGED
@@ -44,6 +44,18 @@ const LAYER_LIMB_LABELS = [
44
44
  '모델', '서비스', '컨트롤러', '컴포넌트', '핸들러',
45
45
  ];
46
46
 
47
+ // front trunk의 공통 limb에 들어가야 할 것들 — 따로 limb로 서면 공통이 여러 갈래로 흩어진다
48
+ // (Coolus '공용 요소', TennisRepublic store-app '디자인 시스템'). 라벨에 포함되면 잡는다.
49
+ const FRONT_COMMON_CONTENT = [
50
+ '디자인 시스템', '디자인 토큰', '공용 컴포넌트', '공통 컴포넌트', '공용 요소', '공통 요소',
51
+ '공용 ui', '공통 ui',
52
+ 'design system', 'design tokens', 'shared components', 'common components', 'ui system', 'ui kit',
53
+ ];
54
+ // 셸·레이아웃은 기능 이름에도 흔히 들어가서("매장 레이아웃 편집") 라벨 전체가 그 말일 때만 잡는다.
55
+ const FRONT_COMMON_EXACT = ['앱 셸', '앱 틀', '레이아웃', '셸', 'app shell', 'shell', 'layout'];
56
+ // 공통 limb다운 이름 — common 표시만 빠진 경우를 알린다.
57
+ const COMMON_NAMES = ['공통', '공용', 'common', 'shared'];
58
+
47
59
  // Promotion signals — when a twig's description contains these, it might belong at limb level.
48
60
  // Derived from sidebar/auth/ui-system limb promotions on 2026-05-21.
49
61
  const PROMOTION_KEYWORDS = [
@@ -175,6 +187,23 @@ export function limbUnderTrunkChecks({ type, label, parentType, parentKind, meta
175
187
  });
176
188
  }
177
189
 
190
+ if (metadata?.common !== true) {
191
+ const lower = trimmed.toLowerCase();
192
+ if (COMMON_NAMES.includes(lower)) {
193
+ out.push({
194
+ rule: 'common-content-outside-common',
195
+ severity: 'info',
196
+ message: `Limb "${label}" reads like the trunk's common limb but is not marked. Set metadata.common=true on it (one per trunk) so the rules can find it. See umtri://rules/trunk-kinds.`,
197
+ });
198
+ } else if (parentKind === 'front' && (FRONT_COMMON_EXACT.includes(lower) || FRONT_COMMON_CONTENT.some(k => lower.includes(k)))) {
199
+ out.push({
200
+ rule: 'common-content-outside-common',
201
+ severity: 'info',
202
+ message: `Limb "${label}" holds what a front trunk keeps in its one common limb (app shell, design system, shared components). Make it a twig under the common limb (metadata.common=true) instead of a separate limb. See umtri://rules/trunk-kinds.`,
203
+ });
204
+ }
205
+ }
206
+
178
207
  if (metadata?.common === true && siblingCommonCount > 0) {
179
208
  out.push({
180
209
  rule: 'common-limb-duplicate',
@@ -451,7 +480,9 @@ export function validateNode({ type, label, parentType, parentKind = null, sibli
451
480
  else warnings.push(h);
452
481
  }
453
482
 
454
- let r = reservedDomainCheck(label);
483
+ // 테이블 leaf(metadata.table)의 라벨은 테이블의 논리명이다 — "버그" 테이블은 bugs 레코드가 아니라
484
+ // 그 레코드를 담는 테이블이라 예약어와 이름이 같아도 정당하다(umtri://rules/trunk-kinds).
485
+ let r = type === 'leaf' && metadata?.table ? null : reservedDomainCheck(label);
455
486
  // 유형이 정해진 trunk 바로 아래 limb는 도메인 이름이다 — Umtri 자신의 server·db에는 "버그" 도메인이
456
487
  // 있다. 그 코드 영역을 가리키는 거라면 정당하니 info로 낮추고 그 뜻을 말해 준다.
457
488
  if (r?.rule === 'reserved-domain' && type === 'limb' && parentType === 'trunk' && TRUNK_KINDS.includes(parentKind)) {
@@ -14,7 +14,7 @@ label: the kind is what the MCP reads to check the limbs under it.
14
14
  | --- | --- | --- | --- | --- |
15
15
  | `front` | Something people use on a screen — app, web app, admin, static site | User-facing feature or flow (Reservations, My page). A public site splits by page | App shell (layout, routing, boot), design system, shared components | Screens, components |
16
16
  | `server` | A service that takes requests — API, webhooks, jobs | Domain / resource. Non-domain consumers (external integrations, inbound webhooks) get their own limb | Request handling — authentication, authorization, errors, boot | Endpoint groups (`metadata.endpoints`) |
17
- | `database` | A data store — relational DB, document DB, cache | Domain, **with the same names as the server** | Tables shared by many domains (sessions, audit log) | Tables (`metadata.columns`), labelled by their logical name |
17
+ | `database` | A data store — relational DB, document DB, cache | Domain, **with the same names as the server** | Tables shared by many domains (sessions, audit log) | Tables, labelled by their logical name, with `metadata.table` (the real name) and `metadata.columns` |
18
18
  | `library` | Shared code or a package that other trunks import | Capability or concept (Money, Signal pipeline) | Shared types and constants | Modules |
19
19
  | `device` | Physical hardware, an embedded screen, an enclosure | Physical part or screen region | Device-wide parts (power, communication) | Parts, screen elements |
20
20
 
@@ -82,6 +82,9 @@ exists there, reuse its exact label.
82
82
  | `limb-domain-suffix` | A limb directly under a trunk ends in a kind suffix (`API`, `응답`, `테이블`, `관리`, `Table(s)`, `Admin`, `Management`). Drop it and reuse the domain name. |
83
83
  | `limb-layer-axis` | A limb is named after a technical layer. Split by the trunk kind's axis instead. |
84
84
  | `common-limb-duplicate` | The trunk already has a limb with `metadata.common: true`. |
85
+ | `common-content-outside-common` | A front limb is named like common content (design system, shared components, app shell, layout), or a limb is named `공통`/`Common`/`Shared` without `metadata.common: true`. Make it a twig of the common limb, or mark it. |
86
+
87
+ A table leaf (`metadata.table` set) may share its name with a first-class record — a `Bugs` table is not a bug — so `reserved-domain` does not fire on it.
85
88
 
86
89
  ## Reshaping an existing tree
87
90
 
@@ -176,6 +176,7 @@ If you see one of these in the response, read it before proceeding:
176
176
  | `limb-domain-suffix` | Limb under a trunk ends in `API`/`응답`/`테이블`/`관리`… — name the domain alone. |
177
177
  | `limb-layer-axis` | Limb is a technical layer (State, Utils, Routes, Middleware…). |
178
178
  | `common-limb-duplicate` | The trunk already has its one common limb (`metadata.common`). |
179
+ | `common-content-outside-common` | Front limb holds common content (design system, shell…) outside the common limb, or a `공통` limb isn't marked. |
179
180
 
180
181
  ## Further reading (read only when relevant)
181
182
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umtri-mcp",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "MCP server for Umtri — give your AI coding agent a persistent map of your project's structure, dependencies, and bugs.",
5
5
  "mcpName": "io.umtri/umtri",
6
6
  "keywords": [