@unified-product-graph/mcp-server 0.8.1 → 0.8.4

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/TOOLS.md +79 -16
  4. package/dist/index.js +1440 -290
  5. package/dist/index.js.map +1 -1
  6. package/dist/tools-manifest.json +197 -82
  7. package/package.json +1 -1
  8. package/scripts/claudemd-snippet.md +7 -7
  9. package/scripts/install-skills.sh +2 -2
  10. package/skills/upg/SKILL.md +41 -41
  11. package/skills/{upg-gaps → upg-check-gaps}/SKILL.md +40 -43
  12. package/skills/{upg-schema-health → upg-check-schema}/SKILL.md +7 -7
  13. package/skills/{upg-schema-evolve → upg-check-schema-coverage}/SKILL.md +12 -12
  14. package/skills/{upg-schema-edges → upg-check-schema-edges}/SKILL.md +3 -3
  15. package/skills/{upg-schema-consolidate → upg-check-schema-merge}/SKILL.md +5 -5
  16. package/skills/upg-context/SKILL.md +96 -72
  17. package/skills/upg-context-intelligence/SKILL.md +23 -27
  18. package/skills/upg-design-system/SKILL.md +21 -26
  19. package/skills/{upg-verify → upg-find-untracked}/SKILL.md +7 -12
  20. package/skills/{upg-rollback → upg-fix-rollback}/SKILL.md +6 -12
  21. package/skills/{upg-migrate → upg-fix-types}/SKILL.md +5 -9
  22. package/skills/upg-link/SKILL.md +125 -0
  23. package/skills/{upg-discover → upg-new-discovery}/SKILL.md +42 -58
  24. package/skills/{upg-capture → upg-new-from-session}/SKILL.md +13 -15
  25. package/skills/{upg-template → upg-new-from-template}/SKILL.md +8 -12
  26. package/skills/{upg-init → upg-new-graph}/SKILL.md +50 -82
  27. package/skills/{upg-hypothesis → upg-new-hypothesis}/SKILL.md +27 -36
  28. package/skills/{upg-launch → upg-new-launch}/SKILL-DETAIL.md +36 -92
  29. package/skills/{upg-launch → upg-new-launch}/SKILL.md +8 -18
  30. package/skills/{upg-okr → upg-new-okr}/SKILL-DETAIL.md +28 -46
  31. package/skills/{upg-okr → upg-new-okr}/SKILL.md +3 -3
  32. package/skills/{upg-persona → upg-new-persona}/SKILL.md +35 -67
  33. package/skills/{upg-research → upg-new-research}/SKILL.md +25 -33
  34. package/skills/{upg-schema-update → upg-new-schema-type}/SKILL.md +2 -2
  35. package/skills/{upg-strategy → upg-new-strategy}/SKILL.md +21 -27
  36. package/skills/upg-prioritise/SKILL.md +4 -4
  37. package/skills/upg-reflect/SKILL.md +7 -7
  38. package/skills/{upg-feedback → upg-send-feedback}/SKILL.md +30 -51
  39. package/skills/{upg-diff → upg-show-diff}/SKILL.md +6 -12
  40. package/skills/{upg-inspect → upg-show-entity}/SKILL.md +7 -9
  41. package/skills/{upg-impact → upg-show-impact}/SKILL.md +11 -15
  42. package/skills/{upg-journey → upg-show-journey}/SKILL.md +31 -32
  43. package/skills/{upg-analytics → upg-show-metrics}/SKILL.md +9 -12
  44. package/skills/{upg-schema-changelog → upg-show-schema-changelog}/SKILL.md +5 -5
  45. package/skills/{upg-status → upg-show-status}/SKILL.md +39 -40
  46. package/skills/{upg-tree → upg-show-tree}/SKILL.md +15 -15
  47. package/skills/{upg-export → upg-sync-export}/SKILL.md +10 -13
  48. package/skills/{upg-import → upg-sync-import}/SKILL.md +7 -13
  49. package/skills/{upg-pull → upg-sync-pull}/SKILL-DETAIL.md +13 -17
  50. package/skills/{upg-pull → upg-sync-pull}/SKILL.md +3 -3
  51. package/skills/{upg-push → upg-sync-push}/SKILL-DETAIL.md +4 -10
  52. package/skills/{upg-push → upg-sync-push}/SKILL.md +4 -4
  53. package/skills/{upg-snapshot → upg-sync-snapshot}/SKILL.md +2 -6
  54. package/skills/upg-trace/SKILL.md +7 -7
  55. package/skills/{upg-workspace → upg-use-workspace}/SKILL.md +8 -14
  56. package/skills/{upg-run → upg-walk-playbook}/SKILL.md +10 -10
  57. package/skills/upg-walk-region/SKILL-DETAIL.md +320 -0
  58. package/skills/upg-walk-region/SKILL.md +89 -0
  59. package/skills/upg-connect/SKILL.md +0 -167
  60. package/skills/upg-explore/SKILL-DETAIL.md +0 -481
  61. package/skills/upg-explore/SKILL.md +0 -297
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  All notable changes to `@unified-product-graph/mcp-server` are documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4
4
 
5
+ ## [0.8.4] - 2026-06-02
6
+
7
+ Framework exercises, with the 0.8.3 launch fix folded in.
8
+
9
+ ### Added
10
+ - `apply_framework` and `score_entity` tools: create a `framework_exercise` and record per-entity results on the includes edge (94 to 96 tools).
11
+ - `create_edge` accepts gated `properties` (only edge types that opt in). `prioritise` accepts an optional `exercise_id` that sources scoring inputs from the includes edges and scores across any entity type.
12
+
13
+ ### Fixed
14
+ - The server no longer crashes with `ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL` when launched via `upg mcp run` — `parseArgs` now tolerates stray positionals. The standalone `upg-mcp-server` bin is unaffected.
15
+
16
+ ## [0.8.2] - 2026-06-02
17
+
18
+ Co-version with the @unified-product-graph/* 0.8.2 release train.
19
+
20
+ ### Changed
21
+ - Tool handlers now enforce the shared write-validation policy directly: `batch_create_edges` rejects invalid edge types, `update_node` honours property unset and rejects invalid status, and session-context updates reject invalid lenses.
22
+ - Bundled skills renamed to a consistent verb-based grammar and reworked to be MCP-first: schemas, lifecycles, and edges are fetched from the server before writes rather than hard-coded.
23
+
24
+ ### Added
25
+ - `skill_audit` all-mode for full-surface review.
26
+
5
27
  ## [0.7.6] - 2026-05-30
6
28
 
7
29
  ### Added
package/README.md CHANGED
@@ -134,7 +134,7 @@ All spec-introspection handlers are read-only and snapshot from the spec package
134
134
 
135
135
  ## Installing Skills (Claude Code)
136
136
 
137
- The server provides the raw MCP tools. For a guided experience with slash commands (`/upg`, `/upg-init`, `/upg-journey`), install the skill files:
137
+ The server provides the raw MCP tools. For a guided experience with slash commands (`/upg`, `/upg-new-graph`, `/upg-show-journey`), install the skill files:
138
138
 
139
139
  ```bash
140
140
  bash scripts/install-skills.sh
package/TOOLS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # UPG MCP Server: Tool Reference
2
2
 
3
- Reference for the 94 tools exposed by `@unified-product-graph/mcp-server`. Generated from JSDoc on `src/tools/*.ts` (do not edit by hand).
3
+ Reference for the 96 tools exposed by `@unified-product-graph/mcp-server`. Generated from JSDoc on `src/tools/*.ts` (do not edit by hand).
4
4
 
5
5
  ## Contents
6
6
 
@@ -10,7 +10,7 @@ Reference for the 94 tools exposed by `@unified-product-graph/mcp-server`. Gener
10
10
  - [Areas & Change Log](#areas-change-log): 5 tools
11
11
  - [Workspace & Portfolios](#workspace-portfolios): 10 tools
12
12
  - [Schema](#schema): 1 tool
13
- - [Spec Introspection](#spec-introspection): 43 tools
13
+ - [Spec Introspection](#spec-introspection): 45 tools
14
14
  - [Cloud Sync](#cloud-sync): 3 tools
15
15
  - [Validation](#validation): 3 tools
16
16
 
@@ -160,10 +160,10 @@ succeed or fail independently of the session update.`
160
160
  | ---- | ---- | -------- | ----------- |
161
161
  | `custom` | object | | Arbitrary key-value pairs for cross-skill state |
162
162
  | `focus_area` | string | | Set the current focus area (e.g. "strategy", "validation", "user_research") |
163
- | `lens` | `product` \| `engineering` \| `design` \| `growth` | | Switch the active lens. Changes what context, skills, and gaps are surfaced first. |
163
+ | `lens` | `product` \| `ux_design` \| `engineering` \| `growth` \| `business` \| `research` \| `marketing` \| `full` | | Switch the active lens. Changes what context, skills, and gaps are surfaced first. Canonical lens ids (derived from core): product, ux_design, engineering, growth, business, research, marketing, full. |
164
164
  | `persist_lens` | boolean | | If true, also save the lens to the .upg file so it persists across sessions |
165
- | `recommendation` | string | | Record a recommendation given to the user (e.g. "Run /upg-strategy to fill strategy gap") |
166
- | `skill_invoked` | string | | Register that this skill was just invoked (e.g. "upg-status") |
165
+ | `recommendation` | string | | Record a recommendation given to the user (e.g. "Run /upg-new-strategy to fill strategy gap") |
166
+ | `skill_invoked` | string | | Register that this skill was just invoked (e.g. "upg-show-status") |
167
167
 
168
168
  **Returns:**
169
169
 
@@ -648,20 +648,22 @@ shallow-merge patches.`
648
648
  | `tags` | array | | |
649
649
  | `title` | string | | |
650
650
  | `type` | string | | Change the entity type. Atomic single-node migration: validates against UPG_TYPES, rewrites incident edges to canonical types. |
651
+ | `unset_properties` | array | | Property keys to DELETE. Applied after the `properties` merge, so one call can set some keys and drop others. Writing `{ key: null }` only stores a literal null; use this to actually remove a key. Unknown keys are ignored. |
651
652
 
652
653
  **Returns:**
653
654
 
654
- JSON: `{ node, warning?, unknown_properties? }`. `warning`
655
- aggregates lifecycle-status hints, migration warnings, and any
656
- unknown-property notice. `unknown_properties` lists property
657
- keys not in the entity's schema. Pass `strict: true` to reject unknown
658
- properties instead of warning.
655
+ JSON: `{ node, warning?, unknown_properties?, unset? }`. `warning`
656
+ aggregates migration warnings and any unknown-property notice.
657
+ `unknown_properties` lists property keys not in the entity's schema.
658
+ `unset` lists the keys actually removed. Pass `strict: true` to reject
659
+ unknown properties instead of warning.
659
660
 
660
661
  **Throws:**
661
662
 
662
663
  - Returns a textError when `node_id` is missing, the type migration
663
- fails, when `strict: true` and unknown properties are present, or when
664
- the underlying store rejects the patch.
664
+ fails, the `status` is not a valid lifecycle phase for the type, when
665
+ `strict: true` and unknown properties are present, or when the underlying
666
+ store rejects the patch.
665
667
 
666
668
  **See also:** `migrate_type`, `batch_update_nodes`
667
669
 
@@ -765,6 +767,7 @@ Create one edge between two nodes. Edge type auto-infers when omitted. Target ac
765
767
 
766
768
  | Name | Type | Required | Description |
767
769
  | ---- | ---- | -------- | ----------- |
770
+ | `properties` | object | | Edge-scoped properties. Only permitted on edge types that opt in (currently framework_exercise_includes_node); rejected on plain semantic edges. |
768
771
  | `source_id` | string | ✓ | Source node ID |
769
772
  | `target_id` | string | | Target node ID |
770
773
  | `target_title` | string | | Target node title (alternative to target_id; requires target_type). |
@@ -1212,6 +1215,9 @@ _No arguments._
1212
1215
  **Returns:**
1213
1216
 
1214
1217
  JSON: `{ products: Array<{ file, title, stage, nodes, edges }> }`.
1218
+ `stage` is the CANONICAL UPGProductStage (legacy values like `idea` are
1219
+ coerced to `concept`), or `null` when unset — matching what
1220
+ `get_product_context` reports for the same product (UPG-611 / DT-MCP-3).
1215
1221
 
1216
1222
  **See also:** `switch_product`, `get_workspace_info`
1217
1223
 
@@ -1344,6 +1350,7 @@ edges_in, phases?, initial_phase?, terminal_phases?, domain_guide? }`.
1344
1350
 
1345
1351
  _Canonical playbooks, approaches, domain guides, frameworks, edge catalogue, regions, lenses, type labels, hierarchy, version, cross-edges, entity meta, anti-patterns, benchmarks, bare-verb approach handlers, migrations, lifecycles, scales, framework categories/patterns, and domain rings. All from `@unified-product-graph/core`._
1346
1352
 
1353
+ - [`apply_framework`](#apply-framework)
1347
1354
  - [`get_anti_pattern`](#get-anti-pattern)
1348
1355
  - [`get_approach`](#get-approach)
1349
1356
  - [`get_domain_guide`](#get-domain-guide)
@@ -1386,8 +1393,35 @@ _Canonical playbooks, approaches, domain guides, frameworks, edge catalogue, reg
1386
1393
  - [`prioritise`](#prioritise)
1387
1394
  - [`reflect`](#reflect)
1388
1395
  - [`resolve_edge_for_pair`](#resolve-edge-for-pair)
1396
+ - [`score_entity`](#score-entity)
1389
1397
  - [`trace`](#trace)
1390
1398
 
1399
+ ### `apply_framework`
1400
+
1401
+ Apply a framework (MoSCoW, RICE, Kano, ...) to a set of entities: creates a framework_exercise node and an `includes` edge to each entity. The per-entity result is recorded on the edge via score_entity, never on the entity node, so the same entity can sit in many exercises and any entity type can be scored. Returns { exercise_id, exercise, included, warnings }.
1402
+
1403
+ **Atomicity:** `atomic.`
1404
+
1405
+ **Arguments:**
1406
+
1407
+ | Name | Type | Required | Description |
1408
+ | ---- | ---- | -------- | ----------- |
1409
+ | `entity_ids` | array | | Entities to pull into the exercise (any type). |
1410
+ | `framework_id` | string | ✓ | Required. UPGFramework.id (e.g. "moscow", "rice-scoring"). |
1411
+ | `status` | string | | Lifecycle phase: draft \| active \| archived (default draft). |
1412
+ | `title` | string | | Human label for the exercise (default "<Framework> exercise"). |
1413
+
1414
+ **Returns:**
1415
+
1416
+ JSON: `{ exercise_id, exercise, included: [{ edge_id, entity_id }], warnings }`.
1417
+
1418
+ **Throws:**
1419
+
1420
+ - textError on a missing/unknown framework_id.
1421
+
1422
+ **See also:** `score_entity`
1423
+
1424
+
1391
1425
  ### `get_anti_pattern`
1392
1426
 
1393
1427
  Return one curated anti-pattern by id (kebab-case slug, e.g. "features-without-hypotheses", "personas-without-jobs"). Includes structured condition, why-it-matters, remediation, applicable stages, severity, optional source citation. IDs are stable URL fragments.
@@ -1759,7 +1793,7 @@ JSON: `{ parent_type, valid_children: string[] }`
1759
1793
 
1760
1794
  ### `inspect`
1761
1795
 
1762
- [LLM-mediated] This tool returns a routing envelope, not computed results. For user-facing inspection, invoke the /upg-inspect skill instead of calling this tool directly. Inspect approach: path of arrival to "what's broken?". Returns the Inspect record + invocation params in the family-resemblance envelope. The LLM consumes `signature_hint` and emits `{ violations: [{ severity, kind, entity_id, description, fix_hint }] }` against `UPG_ANTI_PATTERNS` + the live graph. Optional `region` or `entities[]` scope the audit.
1796
+ [LLM-mediated] This tool returns a routing envelope, not computed results. For user-facing inspection, invoke the /upg-show-entity skill instead of calling this tool directly. Inspect approach: path of arrival to "what's broken?". Returns the Inspect record + invocation params in the family-resemblance envelope. The LLM consumes `signature_hint` and emits `{ violations: [{ severity, kind, entity_id, description, fix_hint }] }` against `UPG_ANTI_PATTERNS` + the live graph. Optional `region` or `entities[]` scope the audit.
1763
1797
 
1764
1798
  **Atomicity:** `atomic (read-only)`
1765
1799
 
@@ -2184,7 +2218,7 @@ JSON: `{ migrations: [{ from, to, since }], total: number }`
2184
2218
 
2185
2219
  ### `plan`
2186
2220
 
2187
- Plan approach: path of arrival to "what should I build next?". Returns the Plan record + invocation params wrapped in `{ approach_id, scope, generated_at, approach, params }`. The LLM consumes `signature_hint` and synthesises `{ missing_entities, coverage_score }` against the live graph. Optional `region` narrows scope.
2221
+ Plan approach: path of arrival to "what should I build next?". Returns the Plan record + invocation params wrapped in `{ approach_id, scope, generated_at, approach, params }`. The LLM consumes `signature_hint` and synthesises `{ missing_entities, coverage_score }` against the live graph. Optional `region` narrows scope; omit `region` to scope to the product's ACTIVE regions; pass `exhaustive:true` to score the full type universe (UPG-601).
2188
2222
 
2189
2223
  **Atomicity:** `atomic (read-only)`
2190
2224
 
@@ -2192,7 +2226,8 @@ Plan approach: path of arrival to "what should I build next?". Returns the Plan
2192
2226
 
2193
2227
  | Name | Type | Required | Description |
2194
2228
  | ---- | ---- | -------- | ----------- |
2195
- | `region` | string | | Optional UPGRegionId. Narrows planning scope to a single region (e.g. "users_needs", "business_gtm_growth"). Omit for whole-graph planning. |
2229
+ | `exhaustive` | boolean | | If true, score against the entire 312-type universe (every domain creation sequence). Off by default; whole-universe gap scoring is noisy for a focused product. Only applies when `region` is omitted. |
2230
+ | `region` | string | | Optional UPGRegionId or atomic-domain id. Narrows planning scope to a single region (e.g. "users_needs", "business_gtm_growth"). Omit to scope to the product's active regions. |
2196
2231
 
2197
2232
  **Returns:**
2198
2233
 
@@ -2229,7 +2264,8 @@ execution_mode: "execution_v0_4_0" }`.
2229
2264
 
2230
2265
  | Name | Type | Required | Description |
2231
2266
  | ---- | ---- | -------- | ----------- |
2232
- | `candidates` | array || Required. entity_id[] to rank. |
2267
+ | `candidates` | array | | entity_id[] to rank. Optional when exercise_id is given (the exercise supplies them). |
2268
+ | `exercise_id` | string | | Optional (0.8.4). A framework_exercise id: reads each candidate's scoring inputs from its includes-edge properties instead of node.properties, and bypasses the target-type guard so any entity type can be scored. |
2233
2269
  | `framework_id` | string | ✓ | Required. UPGFramework.id of the scoring lens (e.g. "rice-scoring", "ice-scoring", "kano-model", "cost-of-delay", "wsjf"). |
2234
2270
 
2235
2271
  **Returns:**
@@ -2304,6 +2340,33 @@ not synthesise a non-canonical key.
2304
2340
  **See also:** `list_edge_types`, `get_edge_type`, `create_edge`, `trace`
2305
2341
 
2306
2342
 
2343
+ ### `score_entity`
2344
+
2345
+ Record a framework's result for one entity on the exercise's includes edge (a MoSCoW bucket, a RICE score, a canvas slot). Auto-includes the entity if not already in scope. Merges into existing edge properties unless replace is set. Returns { edge, warnings }.
2346
+
2347
+ **Atomicity:** `atomic.`
2348
+
2349
+ **Arguments:**
2350
+
2351
+ | Name | Type | Required | Description |
2352
+ | ---- | ---- | -------- | ----------- |
2353
+ | `entity_id` | string | ✓ | Required. The entity being scored. |
2354
+ | `exercise_id` | string | ✓ | Required. The framework_exercise id. |
2355
+ | `replace` | boolean | | Replace the edge properties instead of merging (default false). |
2356
+ | `values` | object | ✓ | Required. The result as { input: value }, e.g. { "moscow": "must" } or { "reach": 800, "impact": 3 }. |
2357
+
2358
+ **Returns:**
2359
+
2360
+ JSON: `{ edge, warnings }`.
2361
+
2362
+ **Throws:**
2363
+
2364
+ - textError when the exercise/entity is missing or the node is not a
2365
+ framework_exercise.
2366
+
2367
+ **See also:** `apply_framework`
2368
+
2369
+
2307
2370
  ### `trace`
2308
2371
 
2309
2372
  [LLM-mediated] This tool returns a routing envelope, not computed results. For user-facing tracing, invoke the /upg-trace skill instead of calling this tool directly. Trace approach: path of arrival to "walk a meaningful path through existing graph". Returns the Trace record + invocation params in the family-resemblance envelope. The LLM uses `anchor` + `path` to compose `query()` calls and emits `{ trail: [{ depth, entity_id, edge_type_in }], reached: entity_id[] }`. `path` is type-shorthand: `["persona","job","feature"]` walks persona→job→feature using the canonical edge per pair (via `resolve_edge_for_pair`). Optional `edges_override` selects non-canonical edges per hop; `null` per element means "use canonical".