@productbrain/mcp 0.0.1-beta.5173 → 0.0.1-beta.5214

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.
@@ -2131,7 +2131,7 @@ function registerSmartCaptureTools(server) {
2131
2131
  "capture",
2132
2132
  {
2133
2133
  title: "Capture",
2134
- description: "The tool for creating knowledge entries \u2014 single or batch. Two actions:\n\n- **capture**: Create a single entry. Creates an entry, auto-links related entries, and returns a quality scorecard \u2014 all in one call. Provide a name and description; `collection` is optional \u2014 the classifier auto-routes when omitted.\n- **batch**: Create multiple entries in one call via `items[]` (absorbs batch-capture). Each item may carry inline `relations` created right after that entry is captured.\n\n**action=capture details:**\nSupported collections with smart profiles: tensions, business-rules, glossary, decisions, features, audiences, strategy, standards, chains, insights, principles, tracking-events.\nAll other collections get an ENT-{random} ID and sensible defaults.\n\n**Explicit data:** When you know the schema, pass `data: { field: value }` to set fields directly. Top-level `name` and `description` always win for those fields. `data` wins over inference for all other fields.\n\n**Compound capture:** Pass `links` to create relations in the same call (skips auto-link discovery). In Open mode, entries commit by default when `autoCommit` is omitted. Pass `autoCommit: true` to promote the entry from draft to SSOT immediately after linking when you want to be explicit. Governed collections (glossary, business-rules, principles, standards, strategy, features, architecture) will warn but still commit \u2014 use only when you're certain.\n\nEntries are created as `draft` first, then may publish immediately depending on governance and `autoCommit`. Use `entries action=update` for post-creation adjustments.",
2134
+ description: "The tool for creating knowledge entries \u2014 single or batch. Two actions:\n\n- **capture**: Create a single entry. Creates an entry, auto-links related entries, and returns a quality scorecard \u2014 all in one call. Provide a name and description; `collection` is optional \u2014 the classifier auto-routes when omitted.\n- **batch**: Create multiple entries in one call via `items[]` (absorbs batch-capture). Each item may carry inline `relations` created right after that entry is captured.\n\n**action=capture details:**\nSupported collections with smart profiles: tensions, business-rules, glossary, decisions, features, audiences, strategy, standards, chains, insights, principles.\nAll other collections get an ENT-{random} ID and sensible defaults.\n\n**Explicit data:** When you know the schema, pass `data: { field: value }` to set fields directly. Top-level `name` and `description` always win for those fields. `data` wins over inference for all other fields.\n\n**Compound capture:** Pass `links` to create relations in the same call (skips auto-link discovery). In Open mode, entries commit by default when `autoCommit` is omitted. Pass `autoCommit: true` to promote the entry from draft to SSOT immediately after linking when you want to be explicit. Governed collections (glossary, business-rules, principles, standards, strategy, features, architecture) will warn but still commit \u2014 use only when you're certain.\n\nEntries are created as `draft` first, then may publish immediately depending on governance and `autoCommit`. Use `entries action=update` for post-creation adjustments.",
2135
2135
  inputSchema: captureCompoundSchema,
2136
2136
  annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false }
2137
2137
  },
@@ -15652,7 +15652,7 @@ function formatEntryMarkdown(entry) {
15652
15652
  }
15653
15653
  return lines.join("\n");
15654
15654
  }
15655
- function buildOrientationMarkdown(collections, trackingEvents, standards, businessRules, principles) {
15655
+ function buildOrientationMarkdown(collections, standards, businessRules, principles) {
15656
15656
  const sections = ["# Product Brain \u2014 Orientation"];
15657
15657
  sections.push(
15658
15658
  "## About Product Brain (PB)\nPB is a knowledge management system used by many product teams. This section describes how PB works \u2014 not your product.\n\n### How PB Organizes Its Tools\n- **Tools** = actions with side-effects or dynamic computation (capture, accept, search).\n- **Resources** = stable, read-only data (orientation, terminology, collection schemas).\n- **Prompts** = multi-step choreography (workflows, guided capture, deep dives).\n- Every tool, resource, and prompt works for ANY workspace \u2014 no bespoke logic.\n- Resource templates (URI params) serve workspace-specific data through generic patterns.\n- Compound tools with `action` enums keep the tool count minimal.\n\n### How PB Handles Your Data\n- **Draft-first**: all writes create drafts. SSOT requires explicit user confirmation.\n- **Empty-workspace safe**: every operation handles zero entries and fresh workspaces.\n- **Advisory, not blocking**: quality scores, contradiction checks, and coaching never prevent operations.\n- **Workspace-agnostic**: PB is a product for many teams \u2014 no workspace-specific logic.\n- **Self-documenting**: orient and server instructions teach agents how PB works."
@@ -15714,21 +15714,12 @@ Collection: \`business-rules\` (${rulesCount}).
15714
15714
  Find rules: \`entries action=search\` for text search, \`entries action=list collection=business-rules\` to browse.
15715
15715
  Check compliance: use the \`review-against-rules\` prompt (pass a domain).
15716
15716
  Draft a new rule: use the \`draft-rule-from-context\` prompt.`
15717
- );
15718
- const eventsCount = trackingEvents ? `${trackingEvents.length} events` : "not loaded \u2014 collection may not exist yet";
15719
- const conventionNote = standards ? "Naming convention: `object_action` in snake_case with past-tense verbs (from standards collection)." : "Naming convention: `object_action` in snake_case with past-tense verbs.";
15720
- sections.push(
15721
- `## Analytics & Tracking
15722
- Event catalog: \`tracking-events\` collection (${eventsCount}).
15723
- ${conventionNote}
15724
- Implementation: \`src/lib/analytics.ts\`. Workspace-scoped events MUST use \`withWorkspaceGroup()\`.
15725
- Browse: \`entries action=list collection=tracking-events\`.`
15726
15717
  );
15727
15718
  sections.push(
15728
15719
  "## Knowledge Graph\nEntries are connected via typed relations (`entryRelations` table). Relations are bidirectional and collection-agnostic \u2014 any entry can link to any other entry.\n\n**Recommended relation types** (extensible \u2014 any string accepted):\n- `governs` \u2014 a rule constrains behavior of a feature\n- `defines_term_for` \u2014 a glossary term is canonical vocabulary for a feature/area\n- `belongs_to` \u2014 a feature belongs to a product area or parent concept (WP-641 typed successors: `anchored_to`, `authority_domain`)\n- `informs` \u2014 a decision or insight informs a feature\n- `surfaces_tension_in` \u2014 a tension exists within a feature area\n- `related_to`, `depends_on`, `replaces`, `conflicts_with`, `references`, `confused_with`\n\nEach relation type is defined as a glossary entry (prefix `GT-REL-*`) to prevent terminology drift. **Workflow-owned, NOT generic:** `domain_routed_to` (a question routed to a domain) \u2014 use the `question` tool (`action=create`/`adopt`, `domain=<slug>`), never `relations action=create`; the generic door has no replace/re-judge logic, so a raw write can leave duplicate routing edges and a stale suggested owner.\n\n**Tools:**\n- `context action=gather` \u2014 get the full context around any entry (multi-hop graph traversal)\n- `relations action=suggest` \u2014 discover potential connections for an entry\n- `relations action=create` \u2014 create a typed link between two entries\n- `relations action=find` \u2014 list direct relations for an entry\n\n**Convention:** When creating or updating entries in governed collections, always use `relations action=suggest` to discover and create relevant relations."
15729
15720
  );
15730
15721
  sections.push(
15731
- "## Creating Knowledge\n**Entries:** Use `capture` as the primary tool for creating new entries. It handles the full workflow in one call:\n1. Creates the entry with collection-aware defaults (auto-fills dates, infers domains, sets priority)\n2. Auto-links related entries from across the chain (up to 5 confident matches)\n3. Returns a quality scorecard (X/10) with actionable improvement suggestions\n\n**Smart profiles** exist for: `tensions`, `business-rules`, `glossary`, `decisions`, `features`, `audiences`, `strategy`, `standards`, `chains`, `tracking-events`.\nAll other collections use the `ENT-{random}` fallback profile.\n\n**Processes:** Use `chain action=create` with a template (e.g., `strategy-coherence`, `idm-proposal`). Fill links with `chain action=edit`.\n\n**Prompts** (invoke via MCP prompt protocol):\n- `name-check` \u2014 verify a name against glossary conventions\n- `draft-decision-record` \u2014 scaffold a decision entry\n- `review-against-rules` \u2014 check work against business rules for a domain\n- `draft-rule-from-context` \u2014 create a new business rule from context\n\nUse `quality action=check` to score existing entries retroactively.\nUse `entries action=update` for post-creation adjustments (status changes, field updates, deprecation)."
15722
+ "## Creating Knowledge\n**Entries:** Use `capture` as the primary tool for creating new entries. It handles the full workflow in one call:\n1. Creates the entry with collection-aware defaults (auto-fills dates, infers domains, sets priority)\n2. Auto-links related entries from across the chain (up to 5 confident matches)\n3. Returns a quality scorecard (X/10) with actionable improvement suggestions\n\n**Smart profiles** exist for: `tensions`, `business-rules`, `glossary`, `decisions`, `features`, `audiences`, `strategy`, `standards`, `chains`.\nAll other collections use the `ENT-{random}` fallback profile.\n\n**Processes:** Use `chain action=create` with a template (e.g., `strategy-coherence`, `idm-proposal`). Fill links with `chain action=edit`.\n\n**Prompts** (invoke via MCP prompt protocol):\n- `name-check` \u2014 verify a name against glossary conventions\n- `draft-decision-record` \u2014 scaffold a decision entry\n- `review-against-rules` \u2014 check work against business rules for a domain\n- `draft-rule-from-context` \u2014 create a new business rule from context\n\nUse `quality action=check` to score existing entries retroactively.\nUse `entries action=update` for post-creation adjustments (status changes, field updates, deprecation)."
15732
15723
  );
15733
15724
  sections.push(
15734
15725
  "## Where to Go Next\n- **Create entry** \u2192 `capture` tool (auto-links + quality score in one call)\n- **Full context** \u2192 `context action=gather` (by entry ID or task description)\n- **Discover links** \u2192 `relations action=suggest`\n- **Quality audit** \u2192 `quality action=check`\n- **Terminology** \u2192 `name-check` prompt or `productbrain://terminology` resource\n- **Schema details** \u2192 `productbrain://collections` resource or `collections action=list`\n- **Labels** \u2192 `productbrain://labels` resource or `collections action=label-list`\n- **Any collection** \u2192 `productbrain://{slug}/entries` resource\n- **Log a decision** \u2192 `draft-decision-record` prompt\n- **Growth funnel** \u2192 `productbrain://growth-funnel` resource or `entries action=list collection=strategy status=draft`\n- **Audiences** \u2192 `productbrain://audiences/entries` resource or `entries action=list collection=audiences`\n- **Session identity** \u2192 `workspace action=whoami`\n- **Health check** \u2192 `workspace action=check`\n- **Debug MCP calls** \u2192 `workspace action=audit`"
@@ -15751,15 +15742,13 @@ function registerResources(server) {
15751
15742
  "chain-orientation",
15752
15743
  "productbrain://orientation",
15753
15744
  async (uri) => {
15754
- const [collectionsResult, eventsResult, standardsResult, rulesResult, principlesResult] = await Promise.allSettled([
15745
+ const [collectionsResult, standardsResult, rulesResult, principlesResult] = await Promise.allSettled([
15755
15746
  kernelQuery("chain.listCollections"),
15756
- kernelQuery("chain.listEntries", { collectionSlug: "tracking-events" }),
15757
15747
  kernelQuery("chain.listEntries", { collectionSlug: "standards" }),
15758
15748
  kernelQuery("chain.listEntries", { collectionSlug: "business-rules" }),
15759
15749
  kernelQuery("chain.listEntries", { collectionSlug: "principles" })
15760
15750
  ]);
15761
15751
  const collections = collectionsResult.status === "fulfilled" ? collectionsResult.value : null;
15762
- const trackingEvents = eventsResult.status === "fulfilled" ? eventsResult.value : null;
15763
15752
  const standards = standardsResult.status === "fulfilled" ? standardsResult.value : null;
15764
15753
  const businessRules = rulesResult.status === "fulfilled" ? rulesResult.value : null;
15765
15754
  const principles = principlesResult.status === "fulfilled" ? principlesResult.value : null;
@@ -15773,7 +15762,6 @@ function registerResources(server) {
15773
15762
  // signature to the full server union (PR #395, Lane C S3b annotation pass).
15774
15763
  text: buildOrientationMarkdown(
15775
15764
  collections,
15776
- trackingEvents,
15777
15765
  standards,
15778
15766
  businessRules,
15779
15767
  principles
@@ -16511,4 +16499,4 @@ export {
16511
16499
  createProductBrainServer,
16512
16500
  initFeatureFlags
16513
16501
  };
16514
- //# sourceMappingURL=chunk-PNLVYNP3.js.map
16502
+ //# sourceMappingURL=chunk-YNQTQKJI.js.map