@productbrain/mcp 0.0.1-beta.8633 → 0.0.1-beta.8637

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.
@@ -13731,7 +13731,7 @@ var ALLOWED_RELATION_TYPES_LIST = [
13731
13731
  var ALLOWED_RELATION_TYPES = new Set(ALLOWED_RELATION_TYPES_LIST);
13732
13732
 
13733
13733
  // src/resources/agentCheatsheet.ts
13734
- var DATA_HANDLING_SECTION = "### How PB Handles Your Data\n- **The reply is the source of truth**: every reply carries `ok`; on failure it carries `code` and guidance. Read the reply, never an expectation.\n- **Empty-workspace safe**: the orientation resource and this cheatsheet render on a workspace with no entries and no collections.\n- **Workspace-agnostic**: PB is one product used by many teams. Nothing in these instructions is specific to your workspace; your own principles, standards and rules arrive through `productbrain://orientation`.\n- **Served, not installed**: these instructions, `productbrain://orientation` and `productbrain://agent-cheatsheet` are served over MCP.";
13734
+ var DATA_HANDLING_SECTION = "### How PB Handles Your Data\n- **The reply is the source of truth**: every reply carries `ok`; on failure it carries `code` and guidance. Read the reply, never an expectation.\n- **Empty-workspace safe**: the orientation resource and this cheatsheet render on a workspace with no entries and no collections.\n- **Workspace-agnostic**: PB is one product used by many teams. Nothing in these instructions is specific to your workspace; your own rules arrive as the rule lists that session start and orient serve you.\n- **Served, not installed**: these instructions, `productbrain://orientation` and `productbrain://agent-cheatsheet` are served over MCP.";
13735
13735
  var AGENT_CHEATSHEET = `# Product Brain \u2014 Agent Cheatsheet
13736
13736
 
13737
13737
  ## Core Tools (Serves 15 compound tools, always)
@@ -13756,8 +13756,7 @@ var AGENT_CHEATSHEET = `# Product Brain \u2014 Agent Cheatsheet
13756
13756
  This table lists actions only. See \`tools/list\` for each tool's input schema; a missing or invalid parameter is named in the call's own reply.
13757
13757
 
13758
13758
  ## Collection Prefixes
13759
- GLO (glossary), BR (business-rules), PRI (principles), STD (standards),
13760
- DEC (decisions), STR (strategy), TEN (tensions), FEAT (features),
13759
+ GLO (glossary), RULE (rules), DEC (decisions), STR (strategy), TEN (tensions), FEAT (features),
13761
13760
  BET (bets), INS (insights), ARCH (architecture), TEAM (teams),
13762
13761
  ROL (roles), MTRC (tracking-events), ST (semantic-types)
13763
13762
 
@@ -13771,7 +13770,11 @@ Write via \`update\`: \`draft\` | \`archived\` (\`accepted\` via \`commit\`, nev
13771
13770
  - **tensions:** open \u2192 processing \u2192 decided \u2192 closed
13772
13771
  - **decisions:** pending \u2192 decided
13773
13772
  - **bets:** shaped \u2192 bet \u2192 building \u2192 shipped
13774
- - **business-rules:** active | conflict | review
13773
+
13774
+ ## Rule Lists
13775
+ - Session start and \`orient action=task\` serve the rules that bind you, each as one sentence with its why.
13776
+ - A rule's \`applies\` and its one owner role place it on one list: everyone (cap 15), team (cap 5 per team) or role (cap 5 per role).
13777
+ - A rule on no list binds nobody; a full list refuses a new rule until one retires, and a list over its cap is served whole.
13775
13778
 
13776
13779
  ## Key Patterns
13777
13780
  - **Capture flow:** \`capture\` \u2192 \`relations action=suggest\` \u2192 \`relations action=batch-create\` \u2192 \`entries action=commit\`
@@ -14444,67 +14447,43 @@ Make sure the rule is consistent with existing rules and doesn't contradict them
14444
14447
  // src/server.ts
14445
14448
  var SERVER_VERSION = "0.7.2";
14446
14449
  var INSTRUCTIONS = [
14447
- "Product Brain \u2014 the single source of truth for product knowledge.",
14448
- "Terminology, standards, and core data all live here \u2014 no need to check external docs.",
14449
- "",
14450
- "## About Product Brain (PB)",
14450
+ "Product Brain (PB) is the single source of truth for your team's product knowledge: decisions, tensions, rules, work and the links between them.",
14451
14451
  "",
14452
- "PB is a knowledge management system used by many product teams.",
14453
- "These describe how PB works \u2014 not your product.",
14452
+ "## What session start hands you",
14454
14453
  "",
14455
- "### How PB Organizes Its Tools",
14456
- "- **Tools** are for actions with side-effects or dynamic computation (capture, accept, search).",
14457
- "- **Resources** are for stable, read-only data (orientation, terminology, collection schemas).",
14458
- "- **Prompts** are for multi-step choreography (workflows, guided capture, deep dives).",
14459
- "- Every tool, resource, and prompt works for ANY workspace \u2014 no bespoke logic.",
14460
- "- Resource templates (URI params) provide workspace-specific data through generic patterns.",
14461
- "- Tool count stays minimal: compound tools with `action` enums over many single-purpose tools.",
14454
+ "Call `session action=start` first. The reply names:",
14455
+ "- the workspace and the role you act as;",
14456
+ "- notices, including open questions routed to you;",
14457
+ "- the rule lists that bind you, each rule as one sentence with its why, its owner role and, when it has one, its date.",
14462
14458
  "",
14463
- DATA_HANDLING_SECTION,
14459
+ "Read those rules before you propose or build. If the work conflicts with one, stop, name the rule and ask the user before going on. Never design around a rule.",
14464
14460
  "",
14465
- "## Your Workspace Principles",
14461
+ "## What applies means",
14466
14462
  "",
14467
- "When you orient or start, PB surfaces active entries from your `principles`, `standards`,",
14468
- "and `business-rules` collections. These are YOUR team's guardrails \u2014 respect them during implementation.",
14469
- "If no principles exist yet, PB will tell you and suggest how to add them.",
14463
+ "Every rule (collection `rules`) declares whom it applies to, and its one owner role places it:",
14464
+ "- **everyone**: the whole workspace, owned by the root team's lead; capped at 15 rules;",
14465
+ "- **team**: its owner role's team; capped at 5 per team;",
14466
+ "- **role**: its owner role; capped at 5 per role.",
14470
14467
  "",
14471
- "The three governance collections:",
14472
- "- **Principles** (`principles`) \u2014 beliefs that guide decisions. 'We believe X.' You reason from a principle.",
14473
- "- **Standards** (`standards`) \u2014 conventions about how work is done. 'We do X this way.' You lint for a standard.",
14474
- "- **Business Rules** (`business-rules`) \u2014 system constraints. 'The system must do X.' You test for a rule.",
14468
+ "A rule on no list binds nobody. A full list refuses a new rule until one retires; a list already over its cap is served whole.",
14475
14469
  "",
14476
- "## Workflow",
14470
+ "## Pull the rest",
14477
14471
  "",
14478
- " 1. Start: call `session action=start` to open a tracked write session, then `orient action=start` \u2014 it returns a standup briefing for every workspace state, fresh or active. (`orient` orients the session; only `session action=start` creates one.)",
14479
- " 2. Re-orient: call `orient action=task` mid-session for task-scoped context or a compact status refresh.",
14480
- " 3. Discover: use `entries action=search` to find entries, or `entries action=list` to browse.",
14481
- ' 4. Drill in: use `entries action=get entryId="..."` for full details \u2014 data, labels, relations, history.',
14482
- " 5. Context: use `context action=gather` with an entryId or a task description.",
14483
- " 6. Capture: use `capture` to create entries \u2014 auto-links and scores in one call.",
14484
- " 7. Accept: use `entries action=commit` to send a draft for acceptance \u2014 read the reply's outcome/status field for what happened; read the capture reply first, since an entry that came back accepted needs no commit.",
14485
- " 8. Connect: use `relations action=suggest` then `relations action=create` to build the graph.",
14486
- " 9. Wrapup: call `session action=wrapup-review` before closing \u2014 reviews drafts, coaches quality, suggests links.",
14487
- " 10. Close: call `session action=close` when done \u2014 records session activity. Auto-nudges if wrapup was skipped.",
14472
+ '- `orient action=task task="<what you are doing>"`: context shaped to the task, with the rules for your team and role.',
14473
+ '- `entries action=get entryId="<ID>"`: one entry in full, with data, relations and history.',
14474
+ '- `entries action=search query="<noun>"`: find entries by what they are about.',
14488
14475
  "",
14489
- "Write tools (capture, entries action=update, relations, entries action=commit) require:",
14490
- " - An active agent session \u2014 call `session action=start` first, then `orient action=start` for context. Call `orient action=task` mid-session for a refresh.",
14491
- " - A readwrite API key scope",
14476
+ "## Writing",
14492
14477
  "",
14493
- "Alignment-first: before proposing or building anything, check orient's Workspace Governance",
14494
- "and Active work packages sections. These are constraints, not reference material.",
14495
- "If the proposal conflicts with a principle, standard, or business rule \u2014 stop, flag the conflict,",
14496
- "and get explicit user confirmation before proceeding. Do not design around governance.",
14497
- "If the work is outside the scope of active work packages \u2014 stop, name the gap, and ask the user",
14498
- "to confirm before designing. Do not propose implementation for out-of-scope work without a go-ahead.",
14478
+ "Write actions (capture, entries update and commit, relations create, batch-create, dismiss and delete) need an active session and a readwrite key.",
14479
+ "Use `capture` to create an entry and read its reply: an entry that came back accepted needs no `entries action=commit`.",
14480
+ "Link with `relations action=suggest`, then `relations action=create`.",
14481
+ "Finish with `session action=wrapup-review`, then `session action=close`.",
14482
+ "If the work falls outside the active work packages, name the gap and ask the user before designing it.",
14499
14483
  "",
14500
- "Workspace setup: use `collections action=update` to shape existing collections with the user.",
14501
- "Creating a brand-new collection is not self-serve \u2014 ask a platform admin to provision it, or",
14502
- "enable the module ontology pack that owns the drawer.",
14484
+ DATA_HANDLING_SECTION,
14503
14485
  "",
14504
- "Personalization: if you have context about the user from memory (prior work, recent",
14505
- "conversations, team context), use it to personalize recommendations. For example,",
14506
- "'Based on your recent pitch reviews, the gap most likely to matter is X.'",
14507
- "The orient/start output gives you the workspace state; your memory fills in the human context."
14486
+ "Every tool and action: `productbrain://agent-cheatsheet`."
14508
14487
  ].join("\n");
14509
14488
  function createProductBrainServer() {
14510
14489
  const server = new McpServer2(
@@ -14561,4 +14540,4 @@ export {
14561
14540
  createProductBrainServer,
14562
14541
  initFeatureFlags
14563
14542
  };
14564
- //# sourceMappingURL=chunk-LDWP3UNV.js.map
14543
+ //# sourceMappingURL=chunk-OZXZLLHS.js.map