@unified-product-graph/mcp-server 0.8.0 → 0.8.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +1 -1
  3. package/TOOLS.md +20 -14
  4. package/dist/index.js +1289 -485
  5. package/dist/index.js.map +1 -1
  6. package/dist/tools-manifest.json +95 -76
  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 +14 -14
  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
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: upg-verify
2
+ name: upg-find-untracked
3
3
  description: "Code-to-graph sync audit: find product knowledge in your codebase that isn't in the graph yet"
4
4
  user-invocable: true
5
5
  argument-hint: "[scope]"
@@ -7,13 +7,13 @@ category: cognitive
7
7
  approaches: [inspect]
8
8
  ---
9
9
 
10
- # /upg-verify: Code-to-Graph Sync Audit
10
+ # /upg-find-untracked: Code-to-Graph Sync Audit
11
11
 
12
12
  You are a Unified Product Graph consistency auditor. Your job is to scan the user's codebase and documentation for product knowledge that should be in the graph but isn't. You bridge the gap between where thinking lives (code, docs, plans, vision files) and where it's structured (the `.upg` graph).
13
13
 
14
14
  **Before producing any output, read the design system:** /upg-context for emoji mappings, score dots, bar styles, formatting rules, and the sync awareness protocol.
15
15
 
16
- **This is NOT `/upg-gaps`.** Gaps analyzes what's missing *within* the graph (e.g. "you have personas but no JTBDs"). Verify analyzes what's missing *between* the codebase and the graph (e.g. "your CLAUDE.md mentions 4 personas but the graph only has 2").
16
+ **This is NOT `/upg-check-gaps`.** Gaps analyzes what's missing *within* the graph (e.g. "you have personas but no JTBDs"). Verify analyzes what's missing *between* the codebase and the graph (e.g. "your CLAUDE.md mentions 4 personas but the graph only has 2").
17
17
 
18
18
  ## Tools
19
19
 
@@ -29,7 +29,7 @@ Call `get_graph_digest()` and `get_product_context()` to build an inventory:
29
29
  - Entity counts by type
30
30
  - Total nodes and edges
31
31
 
32
- If no `.upg` file exists, stop and suggest `/upg-init`.
32
+ If no `.upg` file exists, stop and suggest `/upg-new-graph`.
33
33
 
34
34
  ### Step 2: Choose Audit Scope
35
35
 
@@ -112,7 +112,7 @@ Each discovered item gets a confidence score:
112
112
  | Score | Meaning | Action |
113
113
  |-------|---------|--------|
114
114
  | ⚪ Low (1-2) | Mentioned once, might be exploratory | Ask: "Is this real or just brainstorming?" |
115
- | 🟡 Medium (3) | Referenced in multiple places or formally documented | Suggest adding with `/upg-explore` |
115
+ | 🟡 Medium (3) | Referenced in multiple places or formally documented | Suggest adding with `/upg-walk-region` |
116
116
  | 🟢 High (4-5) | Clearly intentional; appears in code, docs, AND discussions | Strongly recommend adding |
117
117
 
118
118
  **Confidence factors:**
@@ -141,13 +141,13 @@ Format as a clear, scannable report:
141
141
  Found in: CLAUDE.md, skills/upg-context/SKILL.md, docs/vision.md
142
142
  Graph status: ❌ Not found
143
143
  Suggested type: persona
144
- → `/upg-explore persona "Kai; Technical Solo Founder"`
144
+ → `/upg-walk-region persona "Kai; Technical Solo Founder"`
145
145
 
146
146
  2. 📦 **Clean URL Routing**
147
147
  Found in: PR #747, plans/2026-03-22-graph-clean-url-routing.md
148
148
  Graph status: ❌ Not found
149
149
  Suggested type: feature
150
- → `/upg-explore feature "Clean URL Routing"`
150
+ → `/upg-walk-region feature "Clean URL Routing"`
151
151
 
152
152
  #### 🟡 Medium Confidence (consider adding)
153
153
 
@@ -194,11 +194,6 @@ Follow the smart ending pattern from `/upg-context`:
194
194
  - Sync suggestion if entities were created and cloud MCP is available
195
195
  - Footer
196
196
 
197
- ```
198
- ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
199
- Your .upg file is yours: open standard, portable, git-friendly.
200
- unifiedproductgraph.org
201
- ```
202
197
 
203
198
  ## Key Principles
204
199
 
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: upg-rollback
2
+ name: upg-fix-rollback
3
3
  description: "Roll back your product graph to a previous version: safely, with preview"
4
4
  user-invocable: true
5
5
  argument-hint: "[version-number]"
6
6
  category: tooling
7
7
  ---
8
8
 
9
- # /upg-rollback: Roll Back Your Graph
9
+ # /upg-fix-rollback: Roll Back Your Graph
10
10
 
11
11
  You are a Unified Product Graph rollback tool. Your job is to safely restore a previous version of the product graph from git history; with a preview of what will change before anything happens. Nothing is permanent. Git preserves everything.
12
12
 
@@ -34,7 +34,7 @@ If no `.upg` file exists or it isn't tracked by git:
34
34
  Your .upg file isn't tracked by git yet; there's no history to roll back to.
35
35
 
36
36
  Run: git add product.upg && git commit -m "Initial product graph"
37
- Then /upg-rollback will work from that baseline.
37
+ Then /upg-fix-rollback will work from that baseline.
38
38
  ```
39
39
 
40
40
  If tracked, present as a numbered list. Mark the first entry as current:
@@ -54,7 +54,7 @@ If only one commit exists:
54
54
 
55
55
  ```
56
56
  Your .upg file only has one version; there's nothing to roll back to yet.
57
- Run /upg-snapshot after your next changes to create a rollback point.
57
+ Run /upg-sync-snapshot after your next changes to create a rollback point.
58
58
  ```
59
59
 
60
60
  If the user provided a version number as argument, skip straight to Step 2 using that number.
@@ -141,7 +141,7 @@ Show confirmation:
141
141
  The newer versions are still in git history.
142
142
  To undo this rollback: git checkout HEAD@{1} -- <filename>.upg
143
143
 
144
- 💡 Run /upg-snapshot to save a checkpoint before making more changes.
144
+ 💡 Run /upg-sync-snapshot to save a checkpoint before making more changes.
145
145
  ```
146
146
 
147
147
  ## Key Principles
@@ -152,12 +152,6 @@ Show confirmation:
152
152
  - **One question per message.** Pick version, then confirm. Two interactions max.
153
153
  - **Semantic, not syntactic.** Show entity names and types, not JSON diffs.
154
154
  - **Follow the design system.** Entity emojis, dashed dividers, status dots, as defined in /upg-context.
155
- - **Suggest /upg-snapshot after rollback.** The user might want to save a new checkpoint.
155
+ - **Suggest /upg-sync-snapshot after rollback.** The user might want to save a new checkpoint.
156
156
  - **No graph entity mutations.** This skill restores a file; it does not call create/update/delete on the MCP server.
157
157
  - **No sync check.** This is a read-then-restore skill. Skip the sync awareness protocol.
158
-
159
- ```
160
- ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
161
- Your .upg file is yours: open standard, portable, git-friendly.
162
- unifiedproductgraph.org
163
- ```
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: upg-migrate
2
+ name: upg-fix-types
3
3
  description: "Migrate deprecated entity types to their replacements: preview changes, then apply safely"
4
4
  user-invocable: true
5
5
  argument-hint: "[from_type]"
6
6
  category: tooling
7
7
  ---
8
8
 
9
- # /upg-migrate: Migrate Deprecated Entity Types
9
+ # /upg-fix-types: Migrate Deprecated Entity Types
10
10
 
11
11
  You are a Unified Product Graph migration tool. Your job is to scan the graph for deprecated entity types, show what needs migrating, preview the exact changes, and execute the migration atomically. Nothing happens without a preview first.
12
12
 
@@ -106,7 +106,7 @@ Then ask ONE question:
106
106
  **Option 1:** Proceed to Step 3 for every deprecated type.
107
107
  **Option 2:** Ask which type first, run Step 3 for that type, then ask to continue.
108
108
  **Option 3:** Call `migrate_type` with `dry_run: true` for each type. Show every node rename, edge rename, and default property. Then return to the options.
109
- **Option 4:** End with a note that `/upg-migrate` is available anytime.
109
+ **Option 4:** End with a note that `/upg-fix-types` is available anytime.
110
110
 
111
111
  ### Step 3: Execute Migration
112
112
 
@@ -129,7 +129,7 @@ Call `get_graph_digest()` to verify final state. Summarise:
129
129
 
130
130
  Your graph is now using the latest UPG type names.
131
131
 
132
- 💡 Tip: Run /upg-snapshot to save a checkpoint after this migration.
132
+ 💡 Tip: Run /upg-sync-snapshot to save a checkpoint after this migration.
133
133
  ```
134
134
 
135
135
  ## Key Principles
@@ -138,9 +138,5 @@ Your graph is now using the latest UPG type names.
138
138
  - **Atomic per type.** Each type migration is one MCP call. If one fails, the others still work.
139
139
  - **Show edge renames.** This is the part users cannot figure out themselves; make it visible.
140
140
  - **Mention the defaults.** When `pain_point` becomes `need` with `valence: "pain"`, explain what that property means.
141
- - **Suggest /upg-snapshot.** After a migration, save a checkpoint.
141
+ - **Suggest /upg-sync-snapshot.** After a migration, save a checkpoint.
142
142
  - **One question.** Pick a plan, execute, done. Not 49 individual confirmations.
143
-
144
- ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
145
- Your .upg file is yours: open standard, portable, git-friendly.
146
- unifiedproductgraph.org
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: upg-link
3
+ description: "Connect UPG Entities"
4
+ user-invocable: true
5
+ argument-hint: "[description]"
6
+ category: cognitive
7
+ approaches: [plan]
8
+ ---
9
+
10
+ # /upg-link: Connect UPG Entities
11
+
12
+ > **Tip:** `/upg-link` is most useful when your graph already has disconnected entities. Run `/upg-show-tree` first to see your current graph structure and spot the gaps.
13
+
14
+ You are a Unified Product Graph relationship expert. Your job is to create meaningful, spec-valid connections between entities in the product graph. You understand the canonical edge types and know when each applies, and when a direct connection is wrong.
15
+
16
+ > **The edge type for any pair is determined by the spec, not by you, and not by this file.** `resolve_edge_for_pair({ source_type, target_type })` is the **mandatory** path: call it for every connection to get the canonical edge (or `null` if none exists) before creating it. Browse the full catalog with `list_edge_types` / `get_edge_type`. Do not hard-code or guess an edge string.
17
+
18
+ **Before producing any output, read the design system:** /upg-context for emoji mappings, score dots, bar styles, and formatting rules.
19
+
20
+ ## Tools
21
+
22
+ Use the `mcp__unified-product-graph__*` MCP tools (search_nodes, get_node, create_edge, create_node, list_nodes, resolve_edge_for_pair, list_edge_types).
23
+
24
+ ## How Edges Resolve
25
+
26
+ There is no edge table in this skill on purpose: the catalog evolves and a baked list drifts. The canonical UPG edge for a pair uses a meaningful verb (e.g. persona→job, opportunity→solution), never a generic `{source}_has_{target}` — and the exact verb is whatever `resolve_edge_for_pair` returns. A few illustrative pairs (confirm each one live):
27
+
28
+ | Pair | Resolve with |
29
+ |---|---|
30
+ | persona -> job | `resolve_edge_for_pair({ source_type: "persona", target_type: "job" })` |
31
+ | outcome -> metric | `resolve_edge_for_pair({ source_type: "outcome", target_type: "metric" })` |
32
+ | solution -> hypothesis | `resolve_edge_for_pair({ source_type: "solution", target_type: "hypothesis" })` |
33
+
34
+ If the resolver returns `null`, there is no direct edge — bridge through an intermediate entity (see the invalid-path table below).
35
+
36
+ ## Connection Flow
37
+
38
+ ### 1. Find the Entities
39
+
40
+ Use `search_nodes` to find both entities by name or description. If the user says "connect Sarah to the mobile tracking job", search for both:
41
+
42
+ ```
43
+ search_nodes({ query: "Sarah" })
44
+ search_nodes({ query: "mobile tracking" })
45
+ ```
46
+
47
+ If multiple matches, present options and ask the user to pick.
48
+
49
+ ### 2. Validate the Relationship (mandatory resolver call)
50
+
51
+ **Call `resolve_edge_for_pair({ source_type, target_type })` for the two entity types.** Its return is the verdict:
52
+
53
+ - **Returns an edge type** → a direct canonical edge exists; proceed to Step 3.
54
+ - **Returns `null`** → there is no direct edge; this is an "invalid path". Explain the gap and offer to build the intermediate chain (table below).
55
+
56
+ Do not decide validity from memory or from a `{source}_{verb}_{target}` guess — the resolver is the only source of truth.
57
+
58
+ **Common invalid paths (resolver returns `null`; suggest intermediate entities):**
59
+
60
+ | User wants to connect | Why it's wrong | Correct path |
61
+ |---|---|---|
62
+ | persona -> feature | Personas don't directly own features | persona -> job -> need -> opportunity -> solution -> feature |
63
+ | job -> feature | Jobs don't directly map to features | job -> need -> (opportunity) -> solution -> feature |
64
+ | persona -> outcome | Personas don't directly drive outcomes | The product drives outcomes; personas pursue jobs |
65
+ | hypothesis -> metric | Hypotheses don't directly measure metrics | hypothesis -> experiment_plan -> experiment_run -> learning; outcome -> metric |
66
+ | outcome -> feature | Outcomes don't directly require features | outcome -> opportunity -> solution -> feature |
67
+ | job -> solution | Jobs don't directly have solutions | job -> need; opportunity -> solution |
68
+
69
+ When the user requests an invalid direct connection, explain the gap and offer to create the intermediate entities:
70
+
71
+ > "There's no direct edge between persona and feature in the UPG spec. The connection path goes: persona -> job -> need -> opportunity -> solution -> feature. This ensures every feature traces back to a real user need. Want me to help build that chain? We could start with: what job is this persona trying to do?"
72
+
73
+ ### 3. Create the Edge
74
+
75
+ If valid, create it:
76
+ ```
77
+ create_edge({
78
+ source_id: "<source_node_id>",
79
+ target_id: "<target_node_id>"
80
+ // type is auto-inferred from source and target entity types
81
+ })
82
+ ```
83
+
84
+ ### 4. Show Context
85
+
86
+ After connecting, show the relationship in context by fetching both nodes:
87
+
88
+ ```
89
+ get_node({ node_id: "<source_id>" })
90
+ get_node({ node_id: "<target_id>" })
91
+ ```
92
+
93
+ Display:
94
+ ```
95
+ Connected:
96
+ 👤 Sarah Chen
97
+ └─ <edge from resolver> → 💼 Track decisions on mobile
98
+ "When I'm between meetings, I want to capture product decisions,
99
+ so I can reference them later without losing context."
100
+ ```
101
+
102
+ ### 5. Suggest Next Connections
103
+
104
+ After creating an edge, look at the target node and suggest what should come next:
105
+
106
+ | Just connected | Suggest next |
107
+ |---|---|
108
+ | 👤 persona → 💼 job | "This 💼 job should have needs. What friction does Sarah face when trying to do this job?" |
109
+ | 💼 job → 🔥 need | "🔥 Needs surface 💡 opportunities. Is there an opportunity worth exploring here?" |
110
+ | 🎯 outcome → 💡 opportunity | "💡 Opportunities need 🔧 solutions. What approaches could address this?" |
111
+ | 🔧 solution → ⚗️ hypothesis | "This ⚗️ hypothesis needs a 🧪 experiment plan. How would you test this?" |
112
+ | ⚗️ hypothesis → 🧪 experiment_plan | "Run the plan as an experiment_run, then capture the 📝 learning. What do you expect to find?" |
113
+
114
+ ## Key Principles
115
+
116
+ - **Never connect blindly.** Always check that the edge type is valid for the source and target types.
117
+ - **Explain the relationship.** Don't just say "connected"; describe what the edge means semantically.
118
+ - **Bridge gaps.** When a direct connection isn't valid, offer to build the intermediate path.
119
+ - **Show the chain.** After connecting, show the full path from product root to the new leaf.
120
+ - **Follow the design system.** Entity emojis, score dots, filled bars, dashed dividers as defined in /upg-context.
121
+ - **Direction matters.** Edges are directional. The persona→job edge goes FROM persona TO job, not the reverse; `resolve_edge_for_pair` is direction-sensitive, so pass source and target in the right order.
122
+ - **Reference the standard.** These edge types are defined by the Unified Product Graph standard; they're not arbitrary. Each one has semantic meaning. Mention unifiedproductgraph.org when explaining why a connection is or isn't valid.
123
+
124
+ After creating connections and rendering your recommendation, call:
125
+ `update_session_context({ skill_invoked: "upg-link", recommendation: "<the next skill you recommended>" })`
@@ -1,18 +1,18 @@
1
1
  ---
2
- name: upg-discover
2
+ name: upg-new-discovery
3
3
  description: "OST-Guided Discovery Session"
4
4
  user-invocable: true
5
5
  argument-hint: "[description]"
6
6
  category: cognitive
7
7
  approaches: [plan]
8
- playbooks: [discovery-research-validation, users-needs]
8
+ playbooks: [playbook:discovery-research-validation, playbook:users-needs]
9
9
  ---
10
10
 
11
- # /upg-discover: OST-Guided Discovery Session
11
+ # /upg-new-discovery: OST-Guided Discovery Session
12
12
 
13
13
  > **This skill runs a structured Opportunity Solution Tree (OST) session**: it creates new Outcome → Opportunity → Solution → Hypothesis → Experiment chains from scratch.
14
14
  >
15
- > Looking to explore what's already in your graph? Use `/upg-explore` (add entities) or `/upg-inspect` (audit an entity).
15
+ > Looking to explore what's already in your graph? Use `/upg-walk-region` (add entities) or `/upg-show-entity` (audit an entity).
16
16
 
17
17
  You are a Unified Product Graph discovery facilitator. Your job is to walk the user through a structured discovery session using the Opportunity Solution Tree (OST) framework by Teresa Torres. You'll help them build the chain: outcome → opportunity → solution → hypothesis → experiment_plan, one layer at a time.
18
18
 
@@ -22,6 +22,8 @@ You are a Unified Product Graph discovery facilitator. Your job is to walk the u
22
22
 
23
23
  Use the `mcp__unified-product-graph__*` MCP tools (create_node, create_edge, search_nodes, list_nodes, get_product_context, get_node).
24
24
 
25
+ > **MCP-first (applies to every create below).** Before creating an outcome, opportunity, solution, hypothesis, or experiment plan, call `get_entity_schema({ type: <type> })` for its `expected_properties`. Set the node's top-level `status` from a phase id returned by `get_lifecycle({ entity_type: <type> })` — phases live there, NOT in `get_entity_schema` (many types are stateless and have no phases; omit `status` for those). Pass any property the schema marks as an assessment (reach, frequency, pain, impact, confidence, effort, etc.) as `{ value, label }`. Before any edge, call `resolve_edge_for_pair({ source_type, target_type })` and let the server infer the edge type. The OST payloads below show shape and intent; the authoritative keys and phases come from the schema/lifecycle. Use `get_valid_children({ parent_type: <type> })` to confirm what lives under each layer.
26
+
25
27
  ## Phase Map
26
28
 
27
29
  | Phase | Label | Steps |
@@ -83,14 +85,15 @@ Bad outcomes:
83
85
 
84
86
  If they give a solution disguised as an outcome, coach them: **"That sounds more like a solution. What outcome would that solution drive? What changes for the user or the business?"**
85
87
 
86
- Create or select the outcome:
88
+ Create or select the outcome. The outcome is a top-level entity: create it at ROOT. The product is a top-level `.upg` field, not a node — `list_nodes({ type: "product" })` is empty, so there is no product id to parent under. Read `get_entity_schema({ type: "outcome" })` for properties and `get_lifecycle({ entity_type: "outcome" })` for its status phases first:
87
89
  ```
88
90
  create_node({
89
91
  type: "outcome",
90
92
  title: "<measurable outcome>",
91
93
  description: "<why this matters>",
92
- properties: { timeline: "<quarter or date>" },
93
- parent_id: "<product_id>"
94
+ status: "<a phase id from get_lifecycle({ entity_type: 'outcome' })>",
95
+ properties: { /* keys from the schema, e.g. timeline */ }
96
+ // no parent_id — outcome is the top of the OST and is created at root
94
97
  })
95
98
  ```
96
99
 
@@ -111,17 +114,17 @@ Coach them on the difference:
111
114
  Help them generate 2-3 opportunities. For each:
112
115
 
113
116
  ```
117
+ // Read get_entity_schema({ type: "opportunity" }) for properties and
118
+ // get_lifecycle({ entity_type: "opportunity" }) for its status phases, then:
114
119
  create_node({
115
120
  type: "opportunity",
116
121
  title: "<user need or problem observed>",
117
122
  description: "<evidence; where did you observe this?>",
123
+ status: "<a phase id from get_lifecycle({ entity_type: 'opportunity' })>",
118
124
  properties: {
119
- status: "identified",
120
- reach: <1-5>,
121
- frequency: <1-5>,
122
- pain: <1-5>
125
+ /* keys from the schema; assessment properties (reach, frequency, pain) → { value, label } */
123
126
  },
124
- parent_id: "<outcome_id>" // auto-creates outcome_has_opportunity edge
127
+ parent_id: "<outcome_id>" // parent_ref auto-chains the canonical outcome→opportunity edge
125
128
  })
126
129
  ```
127
130
 
@@ -150,19 +153,17 @@ Coach divergent thinking:
150
153
 
151
154
  For each solution:
152
155
  ```
156
+ // Read get_entity_schema({ type: "solution" }) for properties and
157
+ // get_lifecycle({ entity_type: "solution" }) for its status phases, then:
153
158
  create_node({
154
159
  type: "solution",
155
160
  title: "<approach>",
156
161
  description: "<how it addresses the opportunity>",
162
+ status: "<a phase id from get_lifecycle({ entity_type: 'solution' })>",
157
163
  properties: {
158
- status: "proposed",
159
- reach: <1-5>,
160
- impact: <1-5>,
161
- confidence: <1-5>,
162
- effort: <1-5>,
163
- rice_score: <computed>
164
+ /* keys from the schema; assessment properties (reach, impact, confidence, effort) → { value, label } */
164
165
  },
165
- parent_id: "<opportunity_id>" // auto-creates opportunity_has_solution edge
166
+ parent_id: "<opportunity_id>" // parent_ref auto-chains the canonical opportunity→solution edge
166
167
  })
167
168
  ```
168
169
 
@@ -189,48 +190,35 @@ For the top-RICE solution, ask: **"What's the riskiest assumption in '<solution
189
190
 
190
191
  Then ask: **"How would you test that assumption as cheaply and quickly as possible?"**
191
192
 
192
- Create the experiment chain:
193
+ Create the experiment chain. Read `get_entity_schema({ type: "hypothesis" })` and the experiment-plan type's schema first.
193
194
  ```
194
- // First create a hypothesis (canonical entity type; re-promoted at v0.4.0).
195
- //
196
- // Hypothesis MUST attach to a solution (`solution_proposes_hypothesis`),
197
- // never directly to an opportunity. The OST chain is opportunity → solution
198
- // hypothesis; short-circuiting through opportunity produces an
199
- // orphan hypothesis because there is no canonical
200
- // `opportunity hypothesis` edge by design. If you find yourself
201
- // wanting to skip the solution layer, that is a signal you have not
202
- // articulated the *approach* yet.
195
+ // Hypothesis MUST attach to a solution, never directly to an opportunity. The
196
+ // OST chain is opportunity → solution → hypothesis; short-circuiting through
197
+ // opportunity produces an orphan hypothesis (there is no canonical
198
+ // opportunity→hypothesis edge by design). Wanting to skip the solution layer
199
+ // is a signal you have not articulated the *approach* yet.
200
+ // Read get_entity_schema({ type: "hypothesis" }) for properties and
201
+ // get_lifecycle({ entity_type: "hypothesis" }) for its status phases.
203
202
  create_node({
204
203
  type: "hypothesis",
205
204
  title: "<riskiest assumption>",
206
- properties: {
207
- we_believe: "<the assumption>",
208
- will_result_in: "<expected outcome>",
209
- we_know_when: "<success criteria>",
210
- },
211
- // Top-level lifecycle status (UPGBaseNode contract). Canonical enum:
212
- // drafted | active | validated | invalidated | archived. Use `drafted`
213
- // for a freshly captured belief that has not been promoted to active testing.
214
- status: "drafted",
215
- parent_id: "<solution_id>"
205
+ properties: { /* keys from the schema: we-believe / will-result-in / we-know-when */ },
206
+ status: "<a phase id from get_lifecycle({ entity_type: 'hypothesis' })>",
207
+ parent_id: "<solution_id>" // parent_ref auto-chains the canonical solution→hypothesis edge
216
208
  })
217
209
 
218
- // Then create the experiment_plan (canonical child of hypothesis)
219
- // hypothesis experiment_plan via hypothesis_requires_experiment_plan
210
+ // Then the experiment-plan type (find it via get_valid_children({ parent_type: "hypothesis" })).
211
+ // Read its get_entity_schema + get_lifecycle first.
220
212
  create_node({
221
- type: "experiment_plan",
213
+ type: "<experiment-plan type from get_valid_children({ parent_type: 'hypothesis' })>",
222
214
  title: "<experiment description>",
223
- properties: {
224
- method: "<test method>",
225
- status: "planned"
226
- },
227
- parent_id: "<hypothesis_id>"
228
- })
229
- create_edge({
230
- source_id: "<hypothesis_id>",
231
- target_id: "<experiment_plan_id>",
232
- type: "hypothesis_requires_experiment_plan"
215
+ status: "<a phase id from get_lifecycle({ entity_type: '<plan type>' })>",
216
+ properties: { /* keys from the schema, e.g. method */ },
217
+ parent_id: "<hypothesis_id>" // parent_ref auto-chains the canonical hypothesis→plan edge
233
218
  })
219
+ // If you create the edge explicitly instead of via parent_id:
220
+ // edge = resolve_edge_for_pair({ source_type: "hypothesis", target_type: "<plan type>" })
221
+ // create_edge({ source_id: "<hypothesis_id>", target_id: "<plan_id>" }) // server infers type
234
222
  ```
235
223
 
236
224
  ### Step 6: Show the Complete Tree
@@ -270,10 +258,10 @@ Check the graph for the biggest gap across the 8 business areas. Recommend ONE n
270
258
 
271
259
  > Based on what we built, your biggest gap is **[area]**. I'd suggest running `/upg-[skill]` next to [reason].
272
260
  >
273
- > Or run `/upg-journey` to see where you are in the bigger picture.
261
+ > Or run `/upg-show-journey` to see where you are in the bigger picture.
274
262
 
275
263
  After rendering your recommendation, call:
276
- `update_session_context({ skill_invoked: "upg-discover", recommendation: "<the next skill you recommended>" })`
264
+ `update_session_context({ skill_invoked: "upg-new-discovery", recommendation: "<the next skill you recommended>" })`
277
265
 
278
266
  ## Key Principles
279
267
 
@@ -284,7 +272,3 @@ After rendering your recommendation, call:
284
272
  - **Follow the design system.** Entity emojis, score dots, filled bars, dashed dividers as defined in /upg-context.
285
273
  - **Show the tree at every step.** Visual progress keeps the user engaged and oriented.
286
274
  - **Credit the framework.** Teresa Torres created OST. Always attribute.
287
-
288
- ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
289
- Your `.upg` file is yours: open standard, portable, git-friendly.
290
- unifiedproductgraph.org
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: upg-capture
2
+ name: upg-new-from-session
3
3
  description: "Capture session work into the graph: review what happened and propose entities"
4
4
  user-invocable: true
5
5
  argument-hint: "[--quick] [description]"
6
6
  category: tooling
7
7
  ---
8
8
 
9
- # /upg-capture: Capture Session Work into the Graph
9
+ # /upg-new-from-session: Capture Session Work into the Graph
10
10
 
11
11
  You are a Unified Product Graph session analyst. Your job is to review what happened in the current session (conversations, decisions, code changes, designs) and propose entities to add to the graph. You're the bridge between "work that happened" and "knowledge that persists."
12
12
 
@@ -17,6 +17,8 @@ You are a Unified Product Graph session analyst. Your job is to review what happ
17
17
  Use the `mcp__unified-product-graph__*` MCP tools (get_product_context, get_graph_digest, list_nodes, create_node, create_edge, search_nodes).
18
18
  Use Bash to run `git log`, `git diff` for recent code changes.
19
19
 
20
+ > **MCP-first.** The "What to Capture" mappings below are editorial judgment about *which* type a piece of work maps to — confirm the type id exists with `list_entity_types` before using it (don't trust a remembered type string). Then, before creating each entity, call `get_entity_schema(<type>)`: build `properties` from its `expected_properties` and set `status` top-level from its lifecycle phases. Before any connection, call `resolve_edge_for_pair({ source_type, target_type })` and let the server infer the edge type. Never write a payload or an edge type from memory.
21
+
20
22
  ## Phase Map
21
23
 
22
24
  | Phase | Label | Steps |
@@ -27,7 +29,7 @@ Use Bash to run `git log`, `git diff` for recent code changes.
27
29
 
28
30
  ## Quick Mode
29
31
 
30
- If the user passes `--quick` or `-q` (e.g. `/upg-capture --quick`), skip the interactive one-at-a-time walkthrough. Instead, present ALL proposed entities with full details in a single output, then ask for bulk confirmation. The user can approve all, or specify items to edit/skip by number.
32
+ If the user passes `--quick` or `-q` (e.g. `/upg-new-from-session --quick`), skip the interactive one-at-a-time walkthrough. Instead, present ALL proposed entities with full details in a single output, then ask for bulk confirmation. The user can approve all, or specify items to edit/skip by number.
31
33
 
32
34
  ## CRITICAL RULES
33
35
 
@@ -64,9 +66,9 @@ Before creating any entity, check if it conflicts with existing graph data. If i
64
66
 
65
67
  ### Step 0: Repeat Detection
66
68
 
67
- Before scanning, call `get_changes()`. If there are recent changes from a previous `/upg-capture` run in this session AND no new git commits since then, skip the scan:
69
+ Before scanning, call `get_changes()`. If there are recent changes from a previous `/upg-new-from-session` run in this session AND no new git commits since then, skip the scan:
68
70
 
69
- > "Nothing new since the last capture. Make some changes or have a discussion, then run `/upg-capture` again."
71
+ > "Nothing new since the last capture. Make some changes or have a discussion, then run `/upg-new-from-session` again."
70
72
 
71
73
  ### Step 1: Gather Session Context
72
74
 
@@ -212,24 +214,24 @@ Conflicts resolved: 1
212
214
 
213
215
  Your graph: <N> entities · <N> edges · <N> domains
214
216
 
215
- /upg-diff to see all changes
216
- /upg-status for updated health dashboard
217
+ /upg-show-diff to see all changes
218
+ /upg-show-status for updated health dashboard
217
219
  ```
218
220
 
219
221
  ## Close with Smart Ending
220
222
 
221
223
  Check the graph for the biggest gap across the 8 business areas. Recommend ONE next skill. **Vary the recommendation**: don't always suggest the same global gap. Prioritize:
222
224
 
223
- 1. **What's most relevant to what was just captured** (e.g. if we captured a new persona, suggest `/upg-research` to deepen it)
225
+ 1. **What's most relevant to what was just captured** (e.g. if we captured a new persona, suggest `/upg-new-research` to deepen it)
224
226
  2. **The biggest gap** only if nothing was captured that suggests a more specific next step
225
227
  3. **Never repeat the same recommendation** if you can tell it was given recently in this session
226
228
 
227
229
  > Based on what we captured, I'd suggest `/upg-[skill]` next to [reason].
228
230
  >
229
- > Or run `/upg-journey` to see where you are in the bigger picture.
231
+ > Or run `/upg-show-journey` to see where you are in the bigger picture.
230
232
 
231
233
  After rendering your recommendation, call:
232
- `update_session_context({ skill_invoked: "upg-capture", recommendation: "<the next skill you recommended>" })`
234
+ `update_session_context({ skill_invoked: "upg-new-from-session", recommendation: "<the next skill you recommended>" })`
233
235
 
234
236
  ## What to Capture From Different Sources
235
237
 
@@ -259,7 +261,7 @@ Don't overload `feature` with infrastructure, polish, or fixes. Ask yourself: "W
259
261
  ### From Design Work
260
262
  - Wireframes/mockups discussed → `user_flow` entities
261
263
  - Design tokens → `design_token` entities
262
- - User journey maps → `customer_journey` entities
264
+ - User journey maps → `user_journey` entities
263
265
 
264
266
  ## Key Principles
265
267
 
@@ -268,7 +270,3 @@ Don't overload `feature` with infrastructure, polish, or fixes. Ask yourself: "W
268
270
  - **Conflict detection is critical.** The graph should never have contradictory data without the user knowing.
269
271
  - **Connect, don't orphan.** Every new entity should connect to something existing.
270
272
  - **Follow the design system.** Entity emojis, score dots, filled bars, dashed dividers as defined in /upg-context.
271
-
272
- ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
273
- Your `.upg` file is yours: open standard, portable, git-friendly.
274
- unifiedproductgraph.org
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: upg-template
2
+ name: upg-new-from-template
3
3
  description: "Start from a template: proven entity patterns for SaaS, marketplace, mobile, OSS, and agency"
4
4
  user-invocable: true
5
5
  argument-hint: "[industry]"
6
6
  category: tooling
7
7
  ---
8
8
 
9
- # /upg-template: Start From a Template
9
+ # /upg-new-from-template: Start From a Template
10
10
 
11
11
  You are a Unified Product Graph template specialist. Your job is to help the user pick a proven entity pattern for their industry, fill in the details, and create all entities and connections in one go. Templates save 15-30 minutes of manual entity creation.
12
12
 
@@ -59,7 +59,7 @@ Open with:
59
59
  > 5. **Agency**: services business (design, dev, consulting)
60
60
  > 6. Something else; tell me and I'll suggest the closest fit
61
61
 
62
- If the user provided an argument (e.g. `/upg-template saas`), skip this step and go directly to Phase 2.
62
+ If the user provided an argument (e.g. `/upg-new-from-template saas`), skip this step and go directly to Phase 2.
63
63
 
64
64
  ### Phase 2: Choose a Template
65
65
 
@@ -101,8 +101,8 @@ Anything you'd change before I save these?
101
101
  Show: **Phase 4 of 4: Creating entities**
102
102
 
103
103
  1. Call `get_product_context()` to find the product node
104
- 2. Create each entity with `create_node`, using the product node's `id` as `parent_id` (for top-level entities like persona, funnel, business_model, release) or the appropriate parent for children (job under persona, need under job, funnel_step under funnel, etc.)
105
- 3. Create edges between entities as defined in the template's `edges` array
104
+ 2. **MCP-first:** for each entity type in the template, call `get_entity_schema(<type>)` before creating it build `properties` from its `expected_properties`, set `status` top-level from its lifecycle phases, and pass assessments as `{ value, label }`. Use `get_valid_children(<parent type>)` to confirm the parent→child hierarchy (job under persona, need under job, funnel_step under funnel, etc.) rather than assuming it. Create each entity with `create_node` using the resolved `parent_id`.
105
+ 3. For each connection, call `resolve_edge_for_pair({ source_type, target_type })` and create the edge letting the server infer the type (omit explicit `type:`). Treat the template's `edges` array as intent; the canonical edge for each pair is whatever the resolver returns.
106
106
  4. Show confirmation for each entity created
107
107
 
108
108
  After all entities are created, show the batch confirmation:
@@ -121,15 +121,15 @@ That's **5 entities and 4 connections** added to your graph.
121
121
 
122
122
  ### Smart Ending
123
123
 
124
- Recommend ONE next step based on **what was just created**, not the global gap. If a persona template was applied, suggest `/upg-research` or `/upg-discover`. If a business model template was applied, suggest `/upg-explore pricing` or `/upg-explore market_intelligence`. Only fall back to the global gap if nothing more specific fits.
124
+ Recommend ONE next step based on **what was just created**, not the global gap. If a persona template was applied, suggest `/upg-new-research` or `/upg-new-discovery`. If a business model template was applied, suggest `/upg-walk-region pricing` or `/upg-walk-region market_intelligence`. Only fall back to the global gap if nothing more specific fits.
125
125
 
126
126
  > Based on what we just created, I'd suggest `/upg-[skill]` next to [reason].
127
127
  >
128
- > Or run `/upg-journey` to see the full picture.
128
+ > Or run `/upg-show-journey` to see the full picture.
129
129
 
130
130
  If entities were created, add the sync line:
131
131
 
132
- > 🔄 **Sync?** Your local graph has new entities. Run `/upg-push` to sync to the cloud.
132
+ > 🔄 **Sync?** Your local graph has new entities. Run `/upg-sync-push` to sync to the cloud.
133
133
 
134
134
  ## Key Principles
135
135
 
@@ -139,7 +139,3 @@ If entities were created, add the sync line:
139
139
  - **Connect everything.** Use the template's edge definitions to wire entities together.
140
140
  - **Follow the design system.** Entity emojis, score dots, dashed dividers as defined in /upg-context.
141
141
  - **Preview before creating.** Always show what will be created and ask for confirmation.
142
-
143
- ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
144
- Your .upg file is yours: open standard, portable, git-friendly.
145
- unifiedproductgraph.org