@productbrain/mcp 0.0.1-beta.49 → 0.0.1-beta.50
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.
|
@@ -2925,9 +2925,141 @@ If any facilitate call fails:
|
|
|
2925
2925
|
|
|
2926
2926
|
The shaping must never fail silently. Always communicate state.`
|
|
2927
2927
|
};
|
|
2928
|
+
var IMPLEMENTATION_REVIEW_WORKFLOW = {
|
|
2929
|
+
id: "implementation-review",
|
|
2930
|
+
name: "Implementation Review",
|
|
2931
|
+
shortDescription: "Review completed implementation against standards, Chain coherence, and test honesty. Spawns sub-agents, uses Context7 for library docs, validates chain is up to date. Ends with BET/chain IDs. Commits an insight to the Chain.",
|
|
2932
|
+
icon: "\u2713",
|
|
2933
|
+
facilitatorPreamble: `You are now in **Implementation Review Mode**. You orchestrate a structured review of work that was just built \u2014 not a conversation, but a tool-driven audit with sub-agent support.
|
|
2934
|
+
|
|
2935
|
+
## Your Behavior
|
|
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.
|
|
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
|
+
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
|
+
4. **One round at a time.** Complete each round before moving to the next. Checkpoint progress.
|
|
2941
|
+
5. **CRITICAL: End with BET/chain IDs.** The final output MUST include a single sentence: "BET/feature IDs reviewed: [IDs]. [One-line summary of findings]."
|
|
2942
|
+
6. **Never go silent.** If a tool fails, explain and continue. The conversation IS the backup.
|
|
2943
|
+
|
|
2944
|
+
## Tool Usage
|
|
2945
|
+
|
|
2946
|
+
- \`orient\` or \`start\` \u2014 governance, active bets, stale entries
|
|
2947
|
+
- \`quality action=check entryId="<BET-ID>"\` \u2014 score against collection criteria
|
|
2948
|
+
- \`chain-review action=gate chainEntryId="<id>"\` \u2014 coherence gate for chains
|
|
2949
|
+
- \`verify\` \u2014 glossary code mappings, cross-references vs codebase
|
|
2950
|
+
- \`review-against-rules\` (domain) \u2014 business rule compliance
|
|
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)
|
|
2953
|
+
- \`session-wrapup\` \u2014 before close
|
|
2954
|
+
|
|
2955
|
+
## Sub-Agent Classification (for test failures)
|
|
2956
|
+
|
|
2957
|
+
When reviewing test results: (a) test staleness \u2014 code changed, test not updated; (b) regression \u2014 code broke behavior; (c) flaky/bad test \u2014 harness or timing issue.`,
|
|
2958
|
+
rounds: [
|
|
2959
|
+
{
|
|
2960
|
+
id: "orient",
|
|
2961
|
+
num: "01",
|
|
2962
|
+
label: "Orient & Scope",
|
|
2963
|
+
type: "open",
|
|
2964
|
+
instruction: "Load governance and scope. What BET or work are we reviewing? Call orient or start. Use context action=gather with the BET/feature ID.",
|
|
2965
|
+
facilitatorGuidance: "Call orient or start to load workspace governance and active bets. Ask the participant which BET, feature, or work area to review. Use context action=gather task='implementation review for [BET-ID]' to load related entries. Present: scope, relevant BETs/DECs/BRs, and any stale entries orient surfaces.",
|
|
2966
|
+
outputSchema: {
|
|
2967
|
+
field: "scope",
|
|
2968
|
+
description: "BET/feature IDs and related Chain context",
|
|
2969
|
+
format: "structured"
|
|
2970
|
+
},
|
|
2971
|
+
maxDurationHint: "3 min"
|
|
2972
|
+
},
|
|
2973
|
+
{
|
|
2974
|
+
id: "standards-review",
|
|
2975
|
+
num: "02",
|
|
2976
|
+
label: "Standards & Chain Coherence",
|
|
2977
|
+
type: "open",
|
|
2978
|
+
instruction: "Run quality check, chain-review gate (if applicable), and review-against-rules. Is the implementation coherent with the Chain SSOT?",
|
|
2979
|
+
facilitatorGuidance: "For the BET/entry: quality action=check entryId='<ID>'. If the work produced a chain artifact: chain-review action=gate. Call review-against-rules with the relevant domain (e.g. 'Governance & Decision-Making'). Present: quality score, gate result, rule compliance. Flag any conflicts with Chain entries.",
|
|
2980
|
+
outputSchema: {
|
|
2981
|
+
field: "standards",
|
|
2982
|
+
description: "Quality score, gate result, rule compliance",
|
|
2983
|
+
format: "structured"
|
|
2984
|
+
},
|
|
2985
|
+
maxDurationHint: "5 min"
|
|
2986
|
+
},
|
|
2987
|
+
{
|
|
2988
|
+
id: "code-and-tests",
|
|
2989
|
+
num: "03",
|
|
2990
|
+
label: "Code & Test Honesty",
|
|
2991
|
+
type: "open",
|
|
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.",
|
|
2994
|
+
outputSchema: {
|
|
2995
|
+
field: "codeAndTests",
|
|
2996
|
+
description: "Implementation grade, test honesty, refactor suggestions",
|
|
2997
|
+
format: "structured"
|
|
2998
|
+
},
|
|
2999
|
+
maxDurationHint: "10 min"
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
id: "chain-validation",
|
|
3003
|
+
num: "04",
|
|
3004
|
+
label: "Validate Chain Up to Date",
|
|
3005
|
+
type: "synthesis",
|
|
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.",
|
|
3008
|
+
outputSchema: {
|
|
3009
|
+
field: "chainValidation",
|
|
3010
|
+
description: "Verify trust score, stale entries, drift recommendations",
|
|
3011
|
+
format: "structured"
|
|
3012
|
+
},
|
|
3013
|
+
maxDurationHint: "3 min"
|
|
3014
|
+
},
|
|
3015
|
+
{
|
|
3016
|
+
id: "synthesis",
|
|
3017
|
+
num: "05",
|
|
3018
|
+
label: "Synthesis & Sign-Off",
|
|
3019
|
+
type: "commit",
|
|
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.'",
|
|
3022
|
+
outputSchema: {
|
|
3023
|
+
field: "synthesis",
|
|
3024
|
+
description: "Full review synthesis with BET/chain IDs",
|
|
3025
|
+
format: "structured"
|
|
3026
|
+
},
|
|
3027
|
+
maxDurationHint: "5 min"
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
id: "capture",
|
|
3031
|
+
num: "06",
|
|
3032
|
+
label: "Capture & Close",
|
|
3033
|
+
type: "close",
|
|
3034
|
+
instruction: "Capture the review as an insight. Use session-wrapup. Thank the participant.",
|
|
3035
|
+
facilitatorGuidance: "Summarize the review for capture. Use capture with collection=insights. Include: BET/feature IDs, verdict, key findings. Run session-wrapup before closing. Thank the participant. Remind them to commit-entry when ready.",
|
|
3036
|
+
outputSchema: {
|
|
3037
|
+
field: "capture",
|
|
3038
|
+
description: "Insight entry created, BET IDs referenced",
|
|
3039
|
+
format: "structured"
|
|
3040
|
+
},
|
|
3041
|
+
kbCollection: "insights",
|
|
3042
|
+
maxDurationHint: "3 min"
|
|
3043
|
+
}
|
|
3044
|
+
],
|
|
3045
|
+
kbOutputCollection: "insights",
|
|
3046
|
+
kbOutputTemplate: {
|
|
3047
|
+
nameTemplate: "Implementation Review: {scope} \u2014 {date}",
|
|
3048
|
+
descriptionField: "evidence"
|
|
3049
|
+
},
|
|
3050
|
+
errorRecovery: `If anything goes wrong during implementation review:
|
|
3051
|
+
|
|
3052
|
+
1. **Tool failure**: Explain what failed. Continue with what you have. The conversation is the record.
|
|
3053
|
+
2. **Sub-agent timeout**: Proceed without that agent's output. Note what wasn't checked.
|
|
3054
|
+
3. **Context7 unavailable**: Skip library doc validation. Rely on Chain and codebase review.
|
|
3055
|
+
4. **MCP unreachable**: Run from conversation knowledge. Summarize findings. Offer to capture manually later.
|
|
3056
|
+
|
|
3057
|
+
The review must never fail silently. Always end with BET/chain IDs.`
|
|
3058
|
+
};
|
|
2928
3059
|
var WORKFLOWS = /* @__PURE__ */ new Map([
|
|
2929
3060
|
["retro", RETRO_WORKFLOW],
|
|
2930
|
-
["shape", SHAPE_WORKFLOW]
|
|
3061
|
+
["shape", SHAPE_WORKFLOW],
|
|
3062
|
+
["implementation-review", IMPLEMENTATION_REVIEW_WORKFLOW]
|
|
2931
3063
|
]);
|
|
2932
3064
|
function getWorkflow(id) {
|
|
2933
3065
|
return WORKFLOWS.get(id);
|
|
@@ -10807,4 +10939,4 @@ export {
|
|
|
10807
10939
|
SERVER_VERSION,
|
|
10808
10940
|
createProductBrainServer
|
|
10809
10941
|
};
|
|
10810
|
-
//# sourceMappingURL=chunk-
|
|
10942
|
+
//# sourceMappingURL=chunk-573DWO3I.js.map
|