@productbrain/mcp 0.0.1-beta.7273 → 0.0.1-beta.7286
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.
|
@@ -823,6 +823,15 @@ var ScopedCache = class {
|
|
|
823
823
|
};
|
|
824
824
|
var COLLECTION_CACHE_TTL_MS = 6e4;
|
|
825
825
|
|
|
826
|
+
// src/lib/smartProfileCollections.ts
|
|
827
|
+
var SMART_PROFILE_COLLECTIONS = [
|
|
828
|
+
"tensions",
|
|
829
|
+
"glossary",
|
|
830
|
+
"decisions",
|
|
831
|
+
"strategy",
|
|
832
|
+
"insights"
|
|
833
|
+
];
|
|
834
|
+
|
|
826
835
|
// src/lib/resolveCollection.ts
|
|
827
836
|
async function resolveCollection(params) {
|
|
828
837
|
const { name, description, typeHint, allowReviewRouting } = params;
|
|
@@ -1832,7 +1841,14 @@ function registerSmartCaptureTools(server) {
|
|
|
1832
1841
|
"capture",
|
|
1833
1842
|
{
|
|
1834
1843
|
title: "Capture",
|
|
1835
|
-
description:
|
|
1844
|
+
description: `The tool for creating a single knowledge 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. An agent capturing several atoms from one text calls this once per atom.
|
|
1845
|
+
|
|
1846
|
+
Supported collections with smart profiles: ${SMART_PROFILE_COLLECTIONS.join(", ")}.
|
|
1847
|
+
All other collections get an ENT-{random} ID and sensible defaults.
|
|
1848
|
+
|
|
1849
|
+
**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.
|
|
1850
|
+
|
|
1851
|
+
**Compound capture:** Pass \`links\` to create relations in the same call (skips auto-link discovery). Entries are always created as \`draft\` \u2014 use \`entries action=commit\` to promote when ready.`,
|
|
1836
1852
|
inputSchema: captureCompoundSchema,
|
|
1837
1853
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false }
|
|
1838
1854
|
},
|
|
@@ -14295,10 +14311,28 @@ Draft a new rule: use the \`draft-rule-from-context\` prompt.`
|
|
|
14295
14311
|
"## 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 (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."
|
|
14296
14312
|
);
|
|
14297
14313
|
sections.push(
|
|
14298
|
-
|
|
14314
|
+
`## Creating Knowledge
|
|
14315
|
+
**Entries:** Use \`capture\` as the primary tool for creating new entries. It handles the full workflow in one call:
|
|
14316
|
+
1. Creates the entry with collection-aware defaults (auto-fills dates, infers domains, sets priority)
|
|
14317
|
+
2. Auto-links related entries from across the chain (up to 5 confident matches)
|
|
14318
|
+
3. Returns a quality scorecard (X/10) with actionable improvement suggestions
|
|
14319
|
+
|
|
14320
|
+
**Smart profiles** exist for: ${SMART_PROFILE_COLLECTIONS.map((c) => `\`${c}\``).join(", ")}.
|
|
14321
|
+
All other collections use the \`ENT-{random}\` fallback profile.
|
|
14322
|
+
|
|
14323
|
+
**Processes:** Use \`chain action=create\` with a template (e.g., \`strategy-coherence\`, \`idm-proposal\`). Fill links with \`chain action=edit\`.
|
|
14324
|
+
|
|
14325
|
+
**Prompts** (invoke via MCP prompt protocol):
|
|
14326
|
+
- \`name-check\` \u2014 verify a name against glossary conventions
|
|
14327
|
+
- \`draft-decision-record\` \u2014 scaffold a decision entry
|
|
14328
|
+
- \`review-against-rules\` \u2014 check work against business rules for a domain
|
|
14329
|
+
- \`draft-rule-from-context\` \u2014 create a new business rule from context
|
|
14330
|
+
|
|
14331
|
+
Use \`quality action=check\` to score existing entries retroactively.
|
|
14332
|
+
Use \`entries action=update\` for post-creation adjustments (status changes, field updates, deprecation).`
|
|
14299
14333
|
);
|
|
14300
14334
|
sections.push(
|
|
14301
|
-
"## 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- **
|
|
14335
|
+
"## 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- **Session identity** \u2192 `workspace action=whoami`\n- **Health check** \u2192 `workspace action=check`\n- **Debug MCP calls** \u2192 `workspace action=audit`"
|
|
14302
14336
|
);
|
|
14303
14337
|
return sections.join("\n\n---\n\n");
|
|
14304
14338
|
}
|
|
@@ -14957,4 +14991,4 @@ export {
|
|
|
14957
14991
|
createProductBrainServer,
|
|
14958
14992
|
initFeatureFlags
|
|
14959
14993
|
};
|
|
14960
|
-
//# sourceMappingURL=chunk-
|
|
14994
|
+
//# sourceMappingURL=chunk-GMV452CF.js.map
|