@productbrain/mcp 0.0.1-beta.9539 → 0.0.1-beta.9562

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.
@@ -389,9 +389,9 @@ function extractPreview(data, maxLen) {
389
389
  }
390
390
  var TOOL_NAME_MIGRATIONS = /* @__PURE__ */ new Map([
391
391
  // ─── Pre-WP-484 atomic names (retargeted where the old RHS also retired) ──
392
- ["list-entries", 'entries action="list"'],
392
+ ["list-entries", 'context action="list"'],
393
393
  ["get-entry", 'context action="get"'],
394
- ["batch-get", 'entries action="batch"'],
394
+ ["batch-get", 'context action="batch"'],
395
395
  ["search", 'entries action="search"'],
396
396
  ["relate-entries", 'relations action="create"'],
397
397
  ["batch-relate", 'relations action="batch-create"'],
@@ -438,7 +438,7 @@ var TOOL_NAME_MIGRATIONS = /* @__PURE__ */ new Map([
438
438
  // would otherwise be annotated with the wrong action (e.g. → resume) and
439
439
  // send the agent down the wrong path (PR #362 review finding).
440
440
  ["update-entry", 'entries action="update"'],
441
- ["get-history", 'entries action="history"'],
441
+ ["get-history", 'context action="history"'],
442
442
  ["commit-entry", 'entries action="commit"'],
443
443
  ["move-entry", 'entries action="move"'],
444
444
  ["session-wrapup", 'session action="wrapup-review|wrapup-commit" (review \u2192 wrapup-review, commit-all \u2192 wrapup-commit)'],
@@ -3182,12 +3182,9 @@ function platformGlossarySearch(query, collection, status2) {
3182
3182
  // src/tools/entriesContract.ts
3183
3183
  import { z as z10 } from "zod/v3";
3184
3184
  var ENTRIES_ACTIONS = [
3185
- "list",
3186
- "batch",
3187
3185
  "search",
3188
3186
  "update",
3189
3187
  "commit",
3190
- "history",
3191
3188
  "move",
3192
3189
  "verify",
3193
3190
  "preflight",
@@ -3203,18 +3200,15 @@ var preflightLinks = z10.array(z10.object({ type: z10.string().max(200), entryId
3203
3200
  var entriesSchema = z10.object({
3204
3201
  links: preflightLinks.describe("For preflight: proposed context links; saves nothing."),
3205
3202
  action: z10.enum(ENTRIES_ACTIONS).describe(
3206
- "'preflight': inspect structural requirements before composing (requires collection). 'list': browse entries with filters. 'batch': fetch multiple entries. 'search': full-text search. 'update': change fields on an existing entry (draft by default). 'commit': accept a draft entry onto the Chain. 'history': audit trail for an entry. 'move': relocate an entry to a different collection (pass `canonicalKey` too for an atomic move+retype). 'verify': mark an entry as verified (lightweight \u2014 no codebase scan; see `quality action=verify-chain` for that). 'still-true': confirm accuracy (the holder of the owning role, else the nearest seated Team Lead) \u2014 distinct from 'verify'; no content, version, or updatedAt change."
3203
+ "'preflight': inspect structural requirements before composing (requires collection). 'search': full-text search. 'update': change fields on an existing entry (draft by default). 'commit': accept a draft entry onto the Chain. 'move': relocate an entry to a different collection (pass `canonicalKey` too for an atomic move+retype). 'verify': mark an entry as verified (lightweight \u2014 no codebase scan; see `quality action=verify-chain` for that). 'still-true': confirm accuracy (the holder of the owning role, else the nearest seated Team Lead) \u2014 distinct from 'verify'; no content, version, or updatedAt change."
3207
3204
  ),
3208
3205
  entryId: z10.string().max(200).optional().describe(
3209
- "Entry ID, e.g. '<PREFIX>-<n>'. Required for: update, commit, history, move, verify, still-true."
3206
+ "Entry ID, e.g. '<PREFIX>-<n>'. Required for: update, commit, move, verify, still-true."
3210
3207
  ),
3211
- entryIds: z10.array(z10.string().max(200)).min(1).max(20).optional().describe("Entry IDs for 'batch', e.g. ['TYPE-strategy', 'STR-jljeg7']"),
3212
- collection: z10.string().max(200).optional().describe("Collection slug \u2014 for 'list'/'search': scope filter, e.g. 'glossary', 'tracking-events'. For 'preflight': the collection the entry would be composed into (required)."),
3208
+ collection: z10.string().max(200).optional().describe("Collection slug \u2014 for 'search': scope filter, e.g. 'glossary', 'tracking-events'. For 'preflight': the collection the entry would be composed into (required)."),
3213
3209
  status: entriesStatusFilterSchema.optional().describe(
3214
- `For 'list': defaults to accepted entries (active/accepted/current); use status='draft' to discover drafts. One lifecycle or category value (${ENTRY_STATUS_READ_WORDS.join("|")}). For 'search': one value OR an array of up to 5 (e.g. ['active','accepted']). For 'update': draft|archived ONLY \u2014 'accepted' is set via 'commit', never 'update'; 'active'/'deprecated' are legacy read-only words, refused on write. Workflow values use \`workflowStatus\` instead.`
3210
+ `For 'search': one lifecycle or category value (${ENTRY_STATUS_READ_WORDS.join("|")}) OR an array of up to 5 (e.g. ['active','accepted']). For 'update': draft|archived ONLY \u2014 'accepted' is set via 'commit', never 'update'; 'active'/'deprecated' are legacy read-only words, refused on write. Workflow values use \`workflowStatus\` instead.`
3215
3211
  ),
3216
- tag: z10.string().max(200).optional().describe("For 'list': filter by internal tag."),
3217
- label: z10.string().max(200).optional().describe("For 'list': filter by label slug \u2014 matches entries across all collections."),
3218
3212
  query: z10.string().min(2).max(500).optional().describe("For 'search': search text (min 2 characters)."),
3219
3213
  name: z10.string().max(ENTRY_NAME_MAX_CHARS).optional().describe("For 'update': new display name."),
3220
3214
  workflowStatus: z10.string().max(200).optional().describe(
@@ -3252,17 +3246,6 @@ var entriesSchema = z10.object({
3252
3246
  ),
3253
3247
  toCollection: z10.string().max(200).optional().describe("For 'move': target collection slug, e.g. 'decisions', 'architecture'.")
3254
3248
  });
3255
- var entriesListVariant = z10.object({
3256
- action: z10.literal("list"),
3257
- collection: z10.string().max(200).optional(),
3258
- status: z10.string().max(200).optional(),
3259
- tag: z10.string().max(200).optional(),
3260
- label: z10.string().max(200).optional()
3261
- });
3262
- var entriesBatchVariant = z10.object({
3263
- action: z10.literal("batch"),
3264
- entryIds: z10.array(z10.string().max(200)).min(1).max(20)
3265
- });
3266
3249
  var entriesSearchVariant = z10.object({
3267
3250
  action: z10.literal("search"),
3268
3251
  query: z10.string().min(2).max(500),
@@ -3272,7 +3255,6 @@ var entriesSearchVariant = z10.object({
3272
3255
  });
3273
3256
  var entriesUpdateVariant = updateEntrySchema.extend({ action: z10.literal("update") });
3274
3257
  var entriesCommitVariant = commitEntrySchema.extend({ action: z10.literal("commit") });
3275
- var entriesHistoryVariant = getHistorySchema.extend({ action: z10.literal("history") });
3276
3258
  var entriesMoveVariant = z10.object({
3277
3259
  action: z10.literal("move"),
3278
3260
  entryId: z10.string().max(200),
@@ -3284,24 +3266,18 @@ var entriesVerifyVariant = verifyEntrySchema.extend({ action: z10.literal("verif
3284
3266
  var entriesStillTrueVariant = stillTrueEntrySchema.extend({ action: z10.literal("still-true") });
3285
3267
  var entriesActionUnion = z10.discriminatedUnion("action", [
3286
3268
  z10.object({ action: z10.literal("preflight"), collection: z10.string().max(200), canonicalKey: z10.string().max(200).optional(), links: preflightLinks }),
3287
- entriesListVariant,
3288
- entriesBatchVariant,
3289
3269
  entriesSearchVariant,
3290
3270
  entriesUpdateVariant,
3291
3271
  entriesCommitVariant,
3292
- entriesHistoryVariant,
3293
3272
  entriesMoveVariant,
3294
3273
  entriesVerifyVariant,
3295
3274
  entriesStillTrueVariant
3296
3275
  ]);
3297
3276
  var ENTRIES_ACTION_SPECS = {
3298
3277
  preflight: { params: ["collection", "canonicalKey", "links"], description: "Inspect structure before composition; no writes or permission grant." },
3299
- list: { params: ["collection", "status", "tag", "label"], description: "Browse accepted entries by default; status='draft' lists drafts. All params optional." },
3300
- batch: { params: ["entryIds"], description: "Fetch up to 20 entries by ID." },
3301
3278
  search: { params: ["query", "collection", "status"], description: "Full-text search; query is required (min 2 chars)." },
3302
3279
  update: { params: ["entryId", "name", "status", "workflowStatus", "data", "order", "canonicalKey", "autoPublish", "changeNote", "changeReason", "sourceRef", "sourceExcerpt", "steeringOverrideReason", "coherencyAcknowledgement"], description: "entryId is required; every other field is optional." },
3303
3280
  commit: { params: ["entryId", "preview", "steeringOverrideReason", "coherencyAcknowledgement"], description: "entryId is required." },
3304
- history: { params: ["entryId"], description: "entryId is required." },
3305
3281
  move: { params: ["entryId", "toCollection", "canonicalKey"], description: "entryId and toCollection are required; canonicalKey is optional (atomic move+retype)." },
3306
3282
  verify: { params: ["entryId"], description: "entryId is required." },
3307
3283
  "still-true": { params: ["entryId"], description: "entryId is required. Allowed for the holder of the owning role; if that role is empty, the nearest seated Team Lead up the team tree." }
@@ -3453,14 +3429,11 @@ function registerEntriesTools(server) {
3453
3429
  const result2 = await kernelQuery("chain.preflightEntry", { collectionSlug: data.collection, canonicalKey: data.canonicalKey, links: data.links });
3454
3430
  return { content: [{ type: "text", text: renderEntryPreflight(result2).join("\n") }], structuredContent: success("Structural requirements checked; nothing saved.", result2) };
3455
3431
  },
3456
- list: (data) => handleList(data.collection, data.status, data.tag, data.label),
3457
- batch: (data) => handleBatch(data.entryIds),
3458
3432
  search: (data) => handleSearch(server, data.query, data.collection, data.status),
3459
3433
  // update/commit reuse knowledge.ts's extracted handlers — "entries" routes
3460
3434
  // `next` at itself (toolName="entries") instead of the legacy tool names.
3461
3435
  update: (data) => handleUpdateEntry(data, "entries"),
3462
3436
  commit: (data) => handleCommitEntry(data, "entries"),
3463
- history: (data) => handleGetHistory(data),
3464
3437
  move: (data) => handleMoveEntry(data.entryId, data.toCollection, data.canonicalKey),
3465
3438
  verify: (data) => handleVerifyEntry(data),
3466
3439
  "still-true": (data) => handleStillTrueEntry(data)
@@ -3469,7 +3442,7 @@ function registerEntriesTools(server) {
3469
3442
  "entries",
3470
3443
  {
3471
3444
  title: "Entries",
3472
- description: 'Read and manage entries on the Chain. One tool for the entry lifecycle.\n\n- **preflight**: Inspect a type and selected context before composing. No writes, capacity reservation or authority grant.\n- **list**: Browse entries with optional filters (collection, status, tag, label). Use collections action=list first to discover slugs.\n- **batch**: Fetch multiple entries (max 20) in one call. Same shape as context action=get per entry.\n- **search**: Full-text search across entries. Scope by collection or filter by status.\n- **update**: Change fields on an existing entry (publishes whenever the entry is not draft \u2014 includes archived, not just accepted/active; autoPublish is accepted but ignored).\n- **commit**: Accept a draft entry onto the Chain (SSOT). Runs the contradiction preflight first.\n- **history**: Audit trail for an entry.\n- **move**: Relocate an entry to a different collection; pass canonicalKey too for an atomic move+retype.\n- **verify**: Mark verified (lightweight, no scan \u2014 see `quality action=verify-chain`).\n- **still-true**: confirm accuracy (the holder of the owning role; if that role is empty, the nearest seated Team Lead up the team tree).\n\nOpen one entry with the read-only `context` tool: `context action=get entryId="..."`. Use `entries action=search query="..."` to discover.',
3445
+ description: 'Read and manage entries on the Chain. One tool for the entry lifecycle.\n\n- **preflight**: Inspect a type and selected context before composing. No writes, capacity reservation or authority grant.\n- **search**: Full-text search across entries. Scope by collection or filter by status.\n- **update**: Change fields on an existing entry (publishes whenever the entry is not draft \u2014 includes archived, not just accepted/active; autoPublish is accepted but ignored).\n- **commit**: Accept a draft entry onto the Chain (SSOT). Runs the contradiction preflight first.\n- **move**: Relocate an entry to a different collection; pass canonicalKey too for an atomic move+retype.\n- **verify**: Mark verified (lightweight, no scan \u2014 see `quality action=verify-chain`).\n- **still-true**: confirm accuracy (the holder of the owning role; if that role is empty, the nearest seated Team Lead up the team tree).\n\nOpen, list and trace entries with the read-only `context` tool: `context action=get entryId="..."`. Use `entries action=search query="..."` to discover.',
3473
3446
  inputSchema: entriesSchema,
3474
3447
  // Mixed read/write noun (§3 R3): can't be marked read-only once update/commit/move
3475
3448
  // live here too — accepted for the 11-tool default (§9 R3).
@@ -4300,16 +4273,42 @@ This row pre-dates snapshot capture (legacy backfill), so no summary is availabl
4300
4273
 
4301
4274
  // src/tools/contextLookups.ts
4302
4275
  import { z as z15 } from "zod/v3";
4303
- var LOOKUP_ACTION_DESCRIBE = "'get': one entry in full by ID. ";
4304
- var LOOKUP_TOOL_LINES = "- **get**: Fetch a single entry by ID \u2014 full record with data, labels, relations, history.\n";
4276
+ var LOOKUP_ACTION_DESCRIBE = "'get': one entry in full by ID. 'batch': up to 20 entries by ID. 'history': audit trail for an entry. 'list': browse entries with filters (accepted by default). ";
4277
+ var LOOKUP_TOOL_LINES = "- **get**: Fetch a single entry by ID \u2014 full record with data, labels, relations, history.\n- **batch**: Fetch multiple entries (max 20) in one call. Same shape as get per entry.\n- **history**: Audit trail for an entry.\n- **list**: Browse entries with optional filters (collection, status, tag, label). Use collections action=list first to discover slugs.\n";
4278
+ var lookupParams = {
4279
+ entryIds: z15.array(z15.string().max(200)).min(1).max(20).optional().describe("For 'batch': entry IDs, e.g. ['TYPE-strategy', 'STR-jljeg7']"),
4280
+ collection: z15.string().max(200).optional().describe("For 'list': collection slug, e.g. 'glossary', 'tracking-events'."),
4281
+ // 'active'/'accepted'/'current' are the same trust level (DEC-1575/DEC-1788) — all enumerated, never one substituted.
4282
+ status: z15.string().max(200).optional().describe(
4283
+ `For 'list': defaults to accepted entries (active/accepted/current); use status='draft' to discover drafts. One lifecycle or category value (${ENTRY_STATUS_READ_WORDS.join("|")}).`
4284
+ ),
4285
+ tag: z15.string().max(200).optional().describe("For 'list': filter by internal tag."),
4286
+ label: z15.string().max(200).optional().describe("For 'list': filter by label slug \u2014 matches entries across all collections.")
4287
+ };
4305
4288
  var lookupVariants = [
4306
- z15.object({ action: z15.literal("get"), entryId: z15.string().max(200) })
4289
+ z15.object({ action: z15.literal("get"), entryId: z15.string().max(200) }),
4290
+ z15.object({ action: z15.literal("batch"), entryIds: z15.array(z15.string().max(200)).min(1).max(20) }),
4291
+ z15.object({ action: z15.literal("history"), entryId: z15.string().max(200) }),
4292
+ z15.object({
4293
+ action: z15.literal("list"),
4294
+ collection: z15.string().max(200).optional(),
4295
+ status: z15.string().max(200).optional(),
4296
+ // one status word: the flat schema advertises exactly this
4297
+ tag: z15.string().max(200).optional(),
4298
+ label: z15.string().max(200).optional()
4299
+ })
4307
4300
  ];
4308
4301
  var LOOKUP_ACTION_SPECS = {
4309
- get: { params: ["entryId"], description: "entryId is required." }
4302
+ get: { params: ["entryId"], description: "entryId is required." },
4303
+ batch: { params: ["entryIds"], description: "entryIds (1-20) is required." },
4304
+ history: { params: ["entryId"], description: "entryId is required." },
4305
+ list: { params: ["collection", "status", "tag", "label"], description: "Browse accepted entries by default; status='draft' lists drafts. All params optional." }
4310
4306
  };
4311
4307
  var lookupHandlers = {
4312
- get: (data) => handleGet(data.entryId)
4308
+ get: (data) => handleGet(data.entryId),
4309
+ batch: (data) => handleBatch(data.entryIds),
4310
+ history: (data) => handleGetHistory(data),
4311
+ list: (data) => handleList(data.collection, data.status, data.tag, data.label)
4313
4312
  };
4314
4313
 
4315
4314
  // src/tools/context.ts
@@ -4323,13 +4322,14 @@ function epistemicCollectionHint(collectionName) {
4323
4322
  if (lc === "assumptions") return " \u2014 _check evidence strength with `context action=get`_";
4324
4323
  return "";
4325
4324
  }
4326
- var CONTEXT_ACTIONS = ["get", "gather", "build", "neighborhood", "changes", "chain", "cross-cut", "incremental", "brief", "last-verified-brief"];
4325
+ var CONTEXT_ACTIONS = ["get", "batch", "history", "list", "gather", "build", "neighborhood", "changes", "chain", "cross-cut", "incremental", "brief", "last-verified-brief"];
4327
4326
  var contextSchema = z16.object({
4328
4327
  // provenance: neighborhood BET-142; changes/chain/cross-cut/incremental/brief BET-239 (E4, E6)
4329
4328
  action: z16.enum(CONTEXT_ACTIONS).describe(
4330
4329
  LOOKUP_ACTION_DESCRIBE + "'gather': assemble knowledge context (entry graph, task auto-load, journey mode, or graph mode). 'build': structured build spec for an entry. 'neighborhood': typed graph neighborhood for an entry \u2014 blocking chain, dependencies, parent context, tensions, staleness. 'changes': entries modified and relations created since a timestamp. Requires 'since' parameter. 'chain': directed traversal along one relation type to depth 4. Requires entryId. Optional: direction, relationType, maxHops (1-4). 'cross-cut': structural aggregation \u2014 all relations of a given type grouped by source collection. Requires 'relationType' parameter. 'incremental': delta since last brief run for a skill. Requires 'skill' parameter. Returns only entries changed since the skill's last brief. 'brief': compound intelligence query. Requires 'briefType' parameter: 'steering' (changes + structure + delta + readiness), 'confidence' (changes + active bets \u2014 use the pb CLI's `tensions list` for tensions), or 'delta' (changes + relations since timestamp). Optional 'since' for delta type. 'last-verified-brief': fetch the most recent verified brief snapshot for a (templateId, scopeKey) pair (absorbs documents action=get-last-verified-brief). Requires templateId and scopeKey."
4331
4330
  ),
4332
- entryId: z16.string().max(200).optional().describe("For 'get'/'build'/'neighborhood'/'chain': entry ID, e.g. '<PREFIX>-<n>'. For 'gather': optional entry ID for entry-graph mode."),
4331
+ entryId: z16.string().max(200).optional().describe("For 'get'/'history'/'build'/'neighborhood'/'chain': entry ID, e.g. '<PREFIX>-<n>'. For 'gather': optional entry ID for entry-graph mode."),
4332
+ ...lookupParams,
4333
4333
  mapEntryId: z16.string().max(200).optional().describe(
4334
4334
  "For 'gather': journey map entry ID for journey-aware context. Returns context organised by journey stage. Takes precedence over entryId when both are supplied. Example: '<PREFIX>-<n>'."
4335
4335
  ),
@@ -5941,7 +5941,7 @@ async function handleExport() {
5941
5941
  import { z as z20 } from "zod/v3";
5942
5942
 
5943
5943
  // src/tools/planned-work.ts
5944
- var MORE_DRAFTS_LINE = "_More drafts exist than shown. `entries action=list status=draft` lists more, but that list is capped as well; page with limit/cursor once entries list supports it._";
5944
+ var MORE_DRAFTS_LINE = "_More drafts exist than shown. `context action=list status=draft` lists more, but that list is capped as well; page with limit/cursor once context list supports it._";
5945
5945
  var NO_PLANNED_WORK = { uncommittedDrafts: [], inProgressEntries: [], openTensions: [] };
5946
5946
  function hasPlannedWork(work) {
5947
5947
  return work.uncommittedDrafts.length > 0 || work.inProgressEntries.length > 0 || work.openTensions.length > 0;
@@ -6789,6 +6789,13 @@ var GOVERNANCE_HERE_LINES = [
6789
6789
  "There is no voting, proposal or domain setup: write your roles and rules, and decide by owning."
6790
6790
  ].join(" ")
6791
6791
  ];
6792
+ var WORKING_WITH_PEOPLE_LINES = [
6793
+ "Working with people:",
6794
+ "For facts about this organisation (people, roles, decisions, work), Product Brain outranks your memory and project files; when they disagree, say so and go with Product Brain.",
6795
+ "A draft is work in progress everyone in the organisation can see; accepted means true for the whole organisation.",
6796
+ "When you talk to a person, name things first and put the id in brackets, and say a role's name, not its id."
6797
+ ];
6798
+ var TITLES_LINE = "These are titles: read an entry in full before you explain or judge it.";
6792
6799
  var BRIEFING_PULL_COMMANDS = {
6793
6800
  cli: 'pb orient --task "<what you are doing>" \xB7 pb get <ID> \xB7 pb search <query>',
6794
6801
  mcp: 'orient task="<what you are doing>" \xB7 context action=get entryId=<ID> \xB7 entries action=search query=<query>'
@@ -6815,8 +6822,8 @@ function formatBriefingLines(view) {
6815
6822
  const lines = [];
6816
6823
  const f = view.facts ?? {};
6817
6824
  if (view.workspaceName) lines.push(`Workspace: ${briefingLine(view.workspaceName)}`);
6818
- if (f.purpose) lines.push(`Purpose: ${briefingLine(f.purpose)}`);
6819
- if (f.vision) lines.push(`Vision: ${briefingLine(f.vision)}`);
6825
+ if (f.purpose) lines.push(`Purpose${idTag(f.purposeEntryId)}: ${briefingLine(f.purpose)}`);
6826
+ if (f.vision) lines.push(`Vision${idTag(f.visionEntryId)}: ${briefingLine(f.vision)}`);
6820
6827
  if (f.strategy) {
6821
6828
  lines.push(`Strategy${idTag(f.strategy.entryId)}: ${briefingLine(f.strategy.name)}`);
6822
6829
  if (f.strategy.notDo) lines.push(` Not doing: ${briefingLine(f.strategy.notDo)}`);
@@ -6830,11 +6837,12 @@ function formatBriefingLines(view) {
6830
6837
  }
6831
6838
  }
6832
6839
  if (f.currentWorkPackage) lines.push(`Current work package${idTag(f.currentWorkPackage.entryId)}: ${briefingLine(f.currentWorkPackage.name)}`);
6840
+ if (f.purpose || f.vision || f.strategy || f.objective || f.currentWorkPackage) lines.push(TITLES_LINE);
6833
6841
  if (f.briefingUnavailable) lines.push("Purpose, vision, strategy, objective and work package: unavailable \u2014 the briefing read failed; orient again to retry.");
6834
6842
  if (f.spineUnavailable) lines.push("Objective: unavailable \u2014 the objectives read failed; orient again to retry.");
6835
6843
  if (f.truncated) lines.push("(A bounded read hit its cap: a fact above may be missing or not the current one.)");
6836
6844
  if (f.role) lines.push("", ...formatActingRoleLines(f.role));
6837
- if (view.sessionStart) lines.push("", ...GOVERNANCE_HERE_LINES);
6845
+ if (view.sessionStart) lines.push("", ...GOVERNANCE_HERE_LINES, "", ...WORKING_WITH_PEOPLE_LINES);
6838
6846
  const ruleLines = formatRuleListsLines(view.ruleLists);
6839
6847
  const rl = view.ruleLists;
6840
6848
  const ruleRows = rl ? rl.everyone.rows.length + (rl.team?.rows.length ?? 0) + rl.role.rows.length : 0;
@@ -7308,7 +7316,7 @@ async function buildOrientResponse(wsCtx, agentSessionId, errors, task) {
7308
7316
  next.push({ tool: "capture", description: "Fill a gap", parameters: {} });
7309
7317
  }
7310
7318
  if (openTensions.length > 0) {
7311
- next.push({ tool: "entries", description: "View open tensions", parameters: { action: "list", collection: "tensions" } });
7319
+ next.push({ tool: "context", description: "View open tensions", parameters: { action: "list", collection: "tensions" } });
7312
7320
  }
7313
7321
  return {
7314
7322
  text: lines.join("\n"),
@@ -12761,9 +12769,9 @@ var AGENT_CHEATSHEET = `# Product Brain \u2014 Agent Cheatsheet
12761
12769
  |---|---|---|
12762
12770
  | \`orient\` | Workspace context, governance, active work packages, session start | \`action\`: start, task |
12763
12771
  | \`capture\` | Create entry | \`action\`: capture |
12764
- | \`entries\` | Find and write entries | \`action\`: list, batch, search, update, commit, history, move, verify, preflight, still-true |
12772
+ | \`entries\` | Find and write entries | \`action\`: search, update, commit, move, verify, preflight, still-true |
12765
12773
  | \`relations\` | Link entries, delete links, find connections | \`action\`: create, batch-create, delete, find |
12766
- | \`context\` | Look-ups; incremental also records a brief run | \`action\`: get, gather, build, neighborhood, changes, chain, cross-cut, incremental, brief, last-verified-brief |
12774
+ | \`context\` | Reads; only incremental writes | \`action\`: get, batch, history, list, gather, build, neighborhood, changes, chain, cross-cut, incremental, brief, last-verified-brief |
12767
12775
  | \`collections\` | Browse, describe, audit and export collections; manage labels | \`action\`: list, update, describe, audit, export, label-* |
12768
12776
  | \`quality\` | Score an entry, verify the Chain, spine check | \`action\`: check, re-evaluate, verify-chain, spine-check |
12769
12777
  | \`session\` | Start / close, wrapup, resume, constellation accept | \`action\`: start, close, status, wrapup-review, wrapup-commit, resume, commit-constellation |
@@ -12864,7 +12872,7 @@ Use \`quality action=check\` to score existing entries retroactively.
12864
12872
  Use \`entries action=update\` for post-creation adjustments (status changes, field updates, deprecation).`
12865
12873
  );
12866
12874
  sections.push(
12867
- "## Where to Go Next\n- **Create entry** \u2192 `capture` tool (entry, the links you pass, and a quality verdict in one call)\n- **Full context** \u2192 `context action=gather` (by entry ID or task description)\n- **Link entries** \u2192 `relations action=create`\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`"
12875
+ "## Where to Go Next\n- **Create entry** \u2192 `capture` tool (entry, the links you pass, and a quality verdict in one call)\n- **Full context** \u2192 `context action=gather` (by entry ID or task description)\n- **Link entries** \u2192 `relations action=create`\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 `context 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`"
12868
12876
  );
12869
12877
  return sections.join("\n\n---\n\n");
12870
12878
  }
@@ -12911,7 +12919,7 @@ ${teamTerms}`);
12911
12919
 
12912
12920
  ${platformTerms}
12913
12921
 
12914
- Could not load this team's terms \u2014 use \`entries action=list collection=glossary\` to browse manually.`);
12922
+ Could not load this team's terms \u2014 use \`context action=list collection=glossary\` to browse manually.`);
12915
12923
  }
12916
12924
  return lines.join("\n\n---\n\n");
12917
12925
  }
@@ -13252,7 +13260,7 @@ async function buildReviewAgainstRulesPrompt(domain) {
13252
13260
  role: "user",
13253
13261
  content: {
13254
13262
  type: "text",
13255
- text: `No rules found. Use \`entries action=list collection=rules\` to see available rules.`
13263
+ text: `No rules found. Use \`context action=list collection=rules\` to see available rules.`
13256
13264
  }
13257
13265
  }
13258
13266
  ]
@@ -13544,4 +13552,4 @@ export {
13544
13552
  createProductBrainServer,
13545
13553
  initFeatureFlags
13546
13554
  };
13547
- //# sourceMappingURL=chunk-J5MP5CNG.js.map
13555
+ //# sourceMappingURL=chunk-QJ6KOXG6.js.map