@productbrain/mcp 0.0.1-beta.9835 → 0.0.1-beta.9844

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.
@@ -6911,15 +6911,17 @@ function formatRuleListsLines(ruleLists) {
6911
6911
  return [...lines, ...formatRuleListTrailers(ruleLists)];
6912
6912
  }
6913
6913
  var ROLE_BODY_HEADINGS = "Purpose, Decides, Routes elsewhere, Does not";
6914
- function emptyRoleBodyHint(roleRef) {
6915
- return `This role has no description yet. Its holder writes one with pb update ${roleRef} -f body="\u2026" (${ROLE_BODY_HEADINGS}).`;
6916
- }
6917
- function formatActingRoleLines(role) {
6914
+ var EMPTY_ROLE_BODY_HINT = `This role has no description yet. Its holder writes one under ${ROLE_BODY_HEADINGS}.`;
6915
+ var ROLE_BODY_WRITE_DOORS = {
6916
+ cli: (roleRef) => `Write it with pb update ${roleRef} -f body="\u2026".`,
6917
+ mcp: (_roleRef) => "Open the role in the Rail and write its body there."
6918
+ };
6919
+ function formatActingRoleLines(role, surface) {
6918
6920
  const lines = [`Acting as role: ${briefingLine(role.name)}${idTag(role.entryId)}`];
6919
6921
  if (role.team) lines.push(`Team: ${briefingLine(role.team)}`);
6920
6922
  const body = role.body ?? "";
6921
6923
  if (body.trim()) lines.push(ROLE_BODY_FRAMING, ...quoteDataLines(body.split("\n"), ROLE_BODY_TAG));
6922
- else lines.push(emptyRoleBodyHint(role.entryId ? sanitizeRuleListField(role.entryId) : "<ROL-id>"));
6924
+ else lines.push(`${EMPTY_ROLE_BODY_HINT} ${ROLE_BODY_WRITE_DOORS[surface](role.entryId ? sanitizeRuleListField(role.entryId) : "<ROL-id>")}`);
6923
6925
  return lines;
6924
6926
  }
6925
6927
  var GOVERNANCE_HERE_LINES = [
@@ -6984,7 +6986,7 @@ function formatBriefingLines(view) {
6984
6986
  if (f.briefingUnavailable) lines.push("Purpose, vision, strategy, objective and work package: unavailable \u2014 the briefing read failed; orient again to retry.");
6985
6987
  if (f.spineUnavailable) lines.push("Objective: unavailable \u2014 the objectives read failed; orient again to retry.");
6986
6988
  if (f.truncated) lines.push("(A bounded read hit its cap: a fact above may be missing or not the current one.)");
6987
- if (f.role) lines.push("", ...formatActingRoleLines(f.role));
6989
+ if (f.role) lines.push("", ...formatActingRoleLines(f.role, view.surface));
6988
6990
  if (view.sessionStart) lines.push("", ...GOVERNANCE_HERE_LINES, "", ...WORKING_WITH_PEOPLE_LINES);
6989
6991
  const ruleLines = formatRuleListsLines(view.ruleLists);
6990
6992
  const rl = view.ruleLists;
@@ -8021,7 +8023,7 @@ var RETRO_WORKFLOW_DESCRIPTOR = {
8021
8023
  6. **Never go silent.** If something fails, say what happened and what to do next.
8022
8024
  7. **Finalize through the workflow substrate.** Complete the terminal round with \`workflows action=checkpoint ... isFinal=true\` so the durable run creates the retro draft record.
8023
8025
  8. **Session before checkpoint (default).** Before the **first** \`workflows action=checkpoint\` in this run, ensure an **active** agent write session: MCP \`session action=start\` or \`pb session start\` (DEC-9, STD-135). Inactive or superseded sessions commonly return **400** on checkpoint \u2014 durable progress is lost unless the chat record or a **handoff block** preserves it (see handoff skill: Facilitated workflow handoff).
8024
- 9. **Hand off mid-flight.** If the user switches agents or checkpoint keeps failing, emit the **Facilitated workflow handoff** package from \`.productbrain/skills/handoff.md\` (copy-paste block). Another agent resumes from that block + \`workflows get-run\` or \`start\` with \`restart=true\` \u2014 see workflow \`errorRecovery\`.
8026
+ 9. **Hand off mid-flight.** If the user switches agents or checkpoint keeps failing, emit the **Facilitated workflow handoff** package from \`.productbrain/skills/handoff.md\` (copy-paste block). Another agent resumes from that block + \`workflows get-run\` or a first-round \`workflows action=checkpoint\` with \`restart=true\` \u2014 see workflow \`errorRecovery\`.
8025
8027
  10. **Match the energy.** Be warm but structured. This is a ceremony, not a checklist.
8026
8028
 
8027
8029
  ## Communication Style
@@ -8178,7 +8180,7 @@ Create a Cursor Plan with these rounds as tasks. Mark each in_progress as you en
8178
8180
  3. **Plan creation fails**: Continue without the Plan. The conversation IS the record.
8179
8181
  4. **Participant goes off-topic**: Gently redirect: "That's valuable \u2014 let's capture it. For now, let's stay with [current round]."
8180
8182
  5. **Participant wants to stop**: Respect it. Summarize what you have so far. Offer to accept partial results onto the Chain.
8181
- 6. **Checkpoint failed (e.g. 400, superseded session)**: Say so in one line. **Start or refresh session** (\`session action=start\` / \`pb session start\`), then \`workflows action=get-run\` with the \`runId\` you were given. If the run is **incomplete**, retry \`checkpoint\` with that \`runId\`. If the run is **complete** or **missing**, treat server state as unreliable: run \`workflows action=start workflowId=retro restart=true\` and **paste the Facilitated workflow handoff block** from the prior chat into round 1 so scope and completed rounds are explicit \u2014 do not assume partial server progress exists.
8183
+ 6. **Checkpoint failed (e.g. 400, superseded session)**: Say so in one line. **Start or refresh session** (\`session action=start\` / \`pb session start\`), then \`workflows action=get-run\` with the \`runId\` you were given. If the run is **incomplete**, retry \`checkpoint\` with that \`runId\`. If the run is **complete** or **missing**, treat server state as unreliable: run \`workflows action=checkpoint workflowId=retro roundId=set-stage output="<your round-1 output>" restart=true\` and **paste the Facilitated workflow handoff block** from the prior chat into round 1 so scope and completed rounds are explicit \u2014 do not assume partial server progress exists.
8182
8184
  7. **Cross-agent resume (default expectation)**: Receiving agent reads the handoff block first. Prefer \`get-run\` to verify status; otherwise **restart** and continue from the **next round** named in the handoff. The conversation + handoff block are valid SSOT when ChainWork did not persist checkpoints (TEN-917).
8183
8185
 
8184
8186
  The retro must never fail silently. Always communicate state.`
@@ -13070,4 +13072,4 @@ export {
13070
13072
  createProductBrainServer,
13071
13073
  initFeatureFlags
13072
13074
  };
13073
- //# sourceMappingURL=chunk-KLKLBPJD.js.map
13075
+ //# sourceMappingURL=chunk-EL3KRIDU.js.map