@productbrain/mcp 0.0.1-beta.50 → 0.0.1-beta.52

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.
@@ -2934,7 +2934,7 @@ var IMPLEMENTATION_REVIEW_WORKFLOW = {
2934
2934
 
2935
2935
  ## Your Behavior
2936
2936
 
2937
- 1. **Tool-heavy, not chat-heavy.** Each round calls specific tools: orient, quality, verify, chain-review, context action=gather, review-against-rules. Use Context7 (query-docs) for library docs (Vitest, Convex, Node.js) \u2014 not for Chain truth.
2937
+ 1. **Tool-heavy, not chat-heavy.** Each round calls specific tools: orient, quality, verify, chain-review, context action=gather, review-against-rules. Use Context7 (query-docs) for relevant testing and framework docs \u2014 not for Chain truth.
2938
2938
  2. **Spawn sub-agents** for parallel review: (a) code/architecture review, (b) test honesty (did we edit tests to pass or do they validate real behavior?), (c) Chain/standards coherence. Max 2 agents in parallel, 30s budget each.
2939
2939
  3. **Chain is SSOT.** Call orient or start first. Use entries action=search and context action=gather to load relevant BETs, DECs, BRs. If findings conflict with Chain entries, report the conflict and cite the entry ID.
2940
2940
  4. **One round at a time.** Complete each round before moving to the next. Checkpoint progress.
@@ -2949,7 +2949,7 @@ var IMPLEMENTATION_REVIEW_WORKFLOW = {
2949
2949
  - \`verify\` \u2014 glossary code mappings, cross-references vs codebase
2950
2950
  - \`review-against-rules\` (domain) \u2014 business rule compliance
2951
2951
  - \`context action=gather task="implementation review for [BET-ID]"\` \u2014 related knowledge
2952
- - Context7 \`query-docs\` \u2014 Vitest, Convex, Node.js best practices (resolve-library-id first)
2952
+ - Context7 \`query-docs\` \u2014 relevant testing and framework best practices (resolve-library-id first)
2953
2953
  - \`session-wrapup\` \u2014 before close
2954
2954
 
2955
2955
  ## Sub-Agent Classification (for test failures)
@@ -2990,7 +2990,7 @@ When reviewing test results: (a) test staleness \u2014 code changed, test not up
2990
2990
  label: "Code & Test Honesty",
2991
2991
  type: "open",
2992
2992
  instruction: "Spawn sub-agents to review implementation and tests. Did we meet high standards? Are tests validating real behavior or did we edit them just to pass?",
2993
- facilitatorGuidance: "Spawn 1\u20132 sub-agents in parallel: (1) explore agent \u2014 code review, architecture boundaries, type-safety. (2) generalPurpose agent \u2014 test review: are tests asserting real behavior or were they edited to pass? Use Context7 (query-docs) for Vitest/Convex best practices if needed. Classify any test failures: staleness, regression, or flaky. Synthesize: implementation grade, test honesty verdict, refactoring suggestions.",
2993
+ facilitatorGuidance: "Spawn 1\u20132 sub-agents in parallel: (1) explore agent \u2014 code review, architecture boundaries, type-safety. (2) generalPurpose agent \u2014 test review: are tests asserting real behavior or were they edited to pass? Use Context7 (query-docs) for relevant testing and framework best practices if needed. Classify any test failures: staleness, regression, or flaky. Synthesize: implementation grade, test honesty verdict, refactoring suggestions.",
2994
2994
  outputSchema: {
2995
2995
  field: "codeAndTests",
2996
2996
  description: "Implementation grade, test honesty, refactor suggestions",
@@ -3004,7 +3004,7 @@ When reviewing test results: (a) test staleness \u2014 code changed, test not up
3004
3004
  label: "Validate Chain Up to Date",
3005
3005
  type: "synthesis",
3006
3006
  instruction: "Run verify. Check orient for stale entries. Is the Chain current with the codebase?",
3007
- facilitatorGuidance: "Call verify (report mode) \u2014 checks glossary code mappings and cross-references. Orient surfaces stale entries (BR-4). Present trust score and any drift. If drift found: recommend update-entry or capture to reconcile.",
3007
+ facilitatorGuidance: "Call verify (report mode) \u2014 checks glossary code mappings and cross-references. Orient surfaces stale entries (per workspace governance). Present trust score and any drift. If drift found: recommend update-entry or capture to reconcile.",
3008
3008
  outputSchema: {
3009
3009
  field: "chainValidation",
3010
3010
  description: "Verify trust score, stale entries, drift recommendations",
@@ -3018,7 +3018,7 @@ When reviewing test results: (a) test staleness \u2014 code changed, test not up
3018
3018
  label: "Synthesis & Sign-Off",
3019
3019
  type: "commit",
3020
3020
  instruction: "Summarize the review. Refactoring needed? Ship or conditional? End with BET/chain IDs.",
3021
- facilitatorGuidance: "Present the full synthesis: standards pass/fail, code grade, test honesty, chain validation. Recommend: ship, ship with conditions, or do not ship. CRITICAL: The output MUST end with one sentence: 'BET/feature IDs reviewed: [IDs]. [One-line summary].' Example: 'BET-68, STD-4 reviewed. Conditional ship \u2014 fix type casts and add guardWorkflowStatus tests.'",
3021
+ facilitatorGuidance: "Present the full synthesis: standards pass/fail, code grade, test honesty, chain validation. Recommend: ship, ship with conditions, or do not ship. CRITICAL: The output MUST end with one sentence: 'BET/feature IDs reviewed: [IDs]. [One-line summary].' Example: 'BET-xxx, STD-xxx reviewed. Conditional ship \u2014 fix [specific issues] and add [missing tests].'",
3022
3022
  outputSchema: {
3023
3023
  field: "synthesis",
3024
3024
  description: "Full review synthesis with BET/chain IDs",
@@ -3045,7 +3045,7 @@ When reviewing test results: (a) test staleness \u2014 code changed, test not up
3045
3045
  kbOutputCollection: "insights",
3046
3046
  kbOutputTemplate: {
3047
3047
  nameTemplate: "Implementation Review: {scope} \u2014 {date}",
3048
- descriptionField: "evidence"
3048
+ descriptionField: "description"
3049
3049
  },
3050
3050
  errorRecovery: `If anything goes wrong during implementation review:
3051
3051
 
@@ -3056,10 +3056,116 @@ When reviewing test results: (a) test staleness \u2014 code changed, test not up
3056
3056
 
3057
3057
  The review must never fail silently. Always end with BET/chain IDs.`
3058
3058
  };
3059
+ var PROCESS_CHANGE_WORKFLOW = {
3060
+ id: "process-change",
3061
+ name: "Process a Change",
3062
+ shortDescription: "Lightweight workflow for everyday changes \u2014 bug fixes, improvements, change requests. Captures what changed, why, and what's affected without a full shaping ceremony. Routes output to the right collection via the classifier.",
3063
+ icon: "\u21BB",
3064
+ facilitatorPreamble: `You are now in **Change Processing Mode**. You are a lightweight facilitator helping the user capture the context around a change they're making or just made \u2014 a bug fix, improvement, change request, or prerequisite task.
3065
+
3066
+ ## Your Behavior
3067
+
3068
+ 1. **Be fast.** This is a 5-minute workflow, not a 45-minute ceremony. Respect the user's flow state.
3069
+ 2. **Orient first.** Call orient to load workspace context \u2014 but present only what's relevant to the change, not the full briefing.
3070
+ 3. **Capture the why.** The single most important thing: why is this change happening? The what is usually obvious from the code. The why is what evaporates.
3071
+ 4. **Link to what exists.** Search the Chain for related entries. If this change was triggered by a tension, bet, or decision \u2014 link it. If it creates a new decision or surfaces a new tension \u2014 capture that too.
3072
+ 5. **Route via classifier.** Use capture without specifying a collection. The classifier knows where it belongs: tensions for bugs, decisions for choices made, features for new capabilities, insights for lessons learned.
3073
+ 6. **Don't over-process.** If the user gives you everything in one message, skip to capture. Not every round needs a conversation.
3074
+ 7. **End with the link.** Always finish by connecting the new entry to related Chain knowledge via graph suggest.
3075
+
3076
+ ## Tool Usage
3077
+
3078
+ - \`orient\` \u2014 load workspace context (governance, active bets, stale entries)
3079
+ - \`entries action=search\` \u2014 find related entries
3080
+ - \`capture\` \u2014 create the entry (let classifier route)
3081
+ - \`graph action=suggest\` \u2014 discover connections
3082
+ - \`relations action=create\` or \`relations action=batch-create\` \u2014 link to related entries
3083
+ - \`commit-entry\` \u2014 promote to SSOT (only on user confirmation)
3084
+ - \`workflows action=checkpoint\` \u2014 save progress if needed
3085
+
3086
+ ## Communication Style
3087
+
3088
+ - **Conversational, not ceremonial.** No round headers needed unless the user wants structure.
3089
+ - **One question at a time.** Ask what you need, capture, move on.
3090
+ - **If the user gives rich context upfront**, skip straight to capture and linking. Don't ask questions they already answered.
3091
+ - **Show what you captured.** Always confirm what went to the Chain before closing.`,
3092
+ rounds: [
3093
+ {
3094
+ id: "orient",
3095
+ num: "01",
3096
+ label: "Quick Context",
3097
+ type: "open",
3098
+ instruction: "What are you working on? Orient to load relevant Chain context.",
3099
+ facilitatorGuidance: "Call orient to get workspace context. Ask what the user is changing \u2014 or infer from their initial message. Search the Chain for related entries: entries action=search with keywords from their description. Present only the 2-3 most relevant entries, not a full briefing. If the user already described the change, skip the question and confirm what you understood.",
3100
+ outputSchema: {
3101
+ field: "context",
3102
+ description: "What's being changed and relevant Chain context",
3103
+ format: "structured"
3104
+ },
3105
+ maxDurationHint: "1 min"
3106
+ },
3107
+ {
3108
+ id: "what-and-why",
3109
+ num: "02",
3110
+ label: "What & Why",
3111
+ type: "open",
3112
+ instruction: "What's changing and why? What triggered this \u2014 a bug, a request, an observation?",
3113
+ facilitatorGuidance: "This is the core capture moment. Get two things: (1) what changed or will change, (2) why \u2014 the trigger, the reasoning, the context that will evaporate. If the user's initial message already contains both, reflect it back for confirmation rather than re-asking. Classify the change type mentally: bug fix \u2192 tension, decision made \u2192 decision, new capability \u2192 feature, lesson learned \u2192 insight. The classifier will handle routing, but understanding the type helps you ask the right follow-up.",
3114
+ outputSchema: {
3115
+ field: "whatAndWhy",
3116
+ description: "The change and its rationale",
3117
+ format: "freetext"
3118
+ },
3119
+ maxDurationHint: "2 min"
3120
+ },
3121
+ {
3122
+ id: "impact-and-links",
3123
+ num: "03",
3124
+ label: "Impact & Links",
3125
+ type: "synthesis",
3126
+ instruction: "What's affected? Are there existing Chain entries that relate to this change?",
3127
+ facilitatorGuidance: "Search the Chain for entries that should be linked: entries action=search with keywords from the change. Check: does this change affect an active bet? Does it resolve a known tension? Does it supersede an existing decision? If the change is small and self-contained, this round can be brief \u2014 just confirm there's nothing obvious to link. If there are stale entries that this change invalidates, flag them for reconfirmation.",
3128
+ outputSchema: {
3129
+ field: "impact",
3130
+ description: "Affected entries and proposed links",
3131
+ format: "structured"
3132
+ },
3133
+ maxDurationHint: "1 min"
3134
+ },
3135
+ {
3136
+ id: "capture-and-close",
3137
+ num: "04",
3138
+ label: "Capture & Close",
3139
+ type: "close",
3140
+ instruction: "Capture to the Chain. Link to related entries. Confirm with the user.",
3141
+ facilitatorGuidance: "Use capture with name and description \u2014 omit collection to let the classifier route. After capture, call graph action=suggest to find connections. Create the top 2-3 relevant relations. Show the user what was captured: entry ID, collection it landed in, relations created. Ask if they want to commit now or leave as draft. If they confirm, commit-entry. If there are stale entries to reconfirm, mention them. Thank the user briefly and exit \u2014 don't linger.",
3142
+ outputSchema: {
3143
+ field: "capture",
3144
+ description: "Entry captured, relations created, commit status",
3145
+ format: "structured"
3146
+ },
3147
+ maxDurationHint: "1 min"
3148
+ }
3149
+ ],
3150
+ kbOutputCollection: "decisions",
3151
+ kbOutputTemplate: {
3152
+ nameTemplate: "{changeName} \u2014 {date}",
3153
+ descriptionField: "rationale"
3154
+ },
3155
+ errorRecovery: `If anything goes wrong during change processing:
3156
+
3157
+ 1. **Tool failure**: Explain briefly. Capture in the conversation. Offer to retry or commit manually later.
3158
+ 2. **Classifier misroutes**: Use update-entry to move the entry to the correct collection. Mention this to the user.
3159
+ 3. **No related entries found**: That's fine \u2014 not every change connects to existing knowledge. Capture it standalone.
3160
+ 4. **MCP unreachable**: Note the change in conversation. Offer to capture when PB is back.
3161
+
3162
+ Never block the user's real work. This workflow serves the work \u2014 it doesn't replace it.`
3163
+ };
3059
3164
  var WORKFLOWS = /* @__PURE__ */ new Map([
3060
3165
  ["retro", RETRO_WORKFLOW],
3061
3166
  ["shape", SHAPE_WORKFLOW],
3062
- ["implementation-review", IMPLEMENTATION_REVIEW_WORKFLOW]
3167
+ ["implementation-review", IMPLEMENTATION_REVIEW_WORKFLOW],
3168
+ ["process-change", PROCESS_CHANGE_WORKFLOW]
3063
3169
  ]);
3064
3170
  function getWorkflow(id) {
3065
3171
  return WORKFLOWS.get(id);
@@ -10939,4 +11045,4 @@ export {
10939
11045
  SERVER_VERSION,
10940
11046
  createProductBrainServer
10941
11047
  };
10942
- //# sourceMappingURL=chunk-573DWO3I.js.map
11048
+ //# sourceMappingURL=chunk-SCSEEERT.js.map