secufusion-mcp 1.0.32 → 1.0.34

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.
Files changed (3) hide show
  1. package/AGENTS.md +9 -0
  2. package/index.js +36 -1
  3. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -371,6 +371,10 @@ After making any architectural decision:
371
371
  rationale: "<why>")
372
372
  — call this for every non-obvious decision, not just big ones
373
373
 
374
+ After finding an optimal/efficient solution for a problem:
375
+ — You must dynamically seek the most optimized, core solution for a given problem statement, even if similar problems have been solved before.
376
+ — Once identified (through reasoning, `get_task_history`, or `get_pattern_from_task`), you MUST add a comment block directly into the source code where the solution is implemented. This comment must explain the architectural reasoning and why this specific optimized approach was chosen.
377
+
374
378
  After writing any test scenario:
375
379
  → call manage_task(action: "add_scenario",
376
380
  scenario: "<description>",
@@ -444,6 +448,11 @@ STEP 3: if run_pre_pr_checks returns ANY error:
444
448
  → repeat until ZERO errors — no exceptions
445
449
 
446
450
  STEP 4: raise PR only when run_pre_pr_checks reports zero errors
451
+
452
+ STEP 5: call generate_ado_comments(work_item_id, layman_summary, technical_deep_dive)
453
+ — Use this tool to output two distinct comments for the developer to paste into the Azure DevOps (ADO) board:
454
+ 1. **Layman Summary**: A short, fundamental, non-technical explanation of the business value and what was resolved.
455
+ 2. **Technical Deep-Dive**: A comprehensive, highly technical breakdown of the architectural changes, core optimizations, and exact implementation details.
447
456
  ```
448
457
 
449
458
  ### Hard enforcement
package/index.js CHANGED
@@ -1866,7 +1866,16 @@ server.tool("classify_task", "MANDATORY FIRST STEP for every task without except
1866
1866
  .replace(/_/g, " ")
1867
1867
  .split(" ")
1868
1868
  .filter(w => w.length > 3);
1869
- const ruleApplies = ruleWords.some(w => taskText.includes(w)) || Object.keys(spec.coding_patterns).some(k => taskText.includes(k.toLowerCase().replace(/_/g, " ")));
1869
+ const stopWords = new Set(["the", "and", "must", "should", "only", "all", "backend", "frontend", "handled", "produces", "this", "that", "with", "from", "have", "when", "even", "though", "be", "by", "are", "is", "in", "to", "for", "of"]);
1870
+ const textWords = ruleStr.replace(/[^a-z0-9\s]/g, "").split(/\s+/).filter(w => w.length >= 3 && !stopWords.has(w));
1871
+ const taskWords = new Set(taskText.replace(/[^a-z0-9\s]/g, "").split(/\s+/));
1872
+ let overlapCount = 0;
1873
+ const uniqueTextWords = new Set(textWords);
1874
+ for (const w of uniqueTextWords) {
1875
+ if (taskWords.has(w))
1876
+ overlapCount++;
1877
+ }
1878
+ const ruleApplies = ruleWords.some(w => taskText.includes(w)) || Object.keys(spec.coding_patterns).some(k => taskText.includes(k.toLowerCase().replace(/_/g, " "))) || overlapCount >= 2;
1870
1879
  if (!ruleApplies)
1871
1880
  continue;
1872
1881
  const isFrontendOwnership = FRONTEND_OWNERSHIP_PHRASES.some(phrase => ruleStr.includes(phrase));
@@ -2983,5 +2992,31 @@ server.tool("get_secufusion_rules", "Fetches the mandatory AGENTS.md workflow ru
2983
2992
  content: [{ type: "text", text: content }]
2984
2993
  }, 0);
2985
2994
  });
2995
+ server.tool("generate_ado_comments", "Generates and formats the final Azure DevOps board comments for a completed task. Call this in Phase 4 after PR checks pass.", {
2996
+ work_item_id: z.string().describe("Azure DevOps work item ID, e.g. 'BUG-1140'."),
2997
+ layman_summary: z.string().describe("A short, fundamental, non-technical explanation of the business value and what was resolved."),
2998
+ technical_deep_dive: z.string().describe("A comprehensive, highly technical breakdown of the architectural changes, core optimizations, and exact implementation details.")
2999
+ }, async ({ work_item_id, layman_summary, technical_deep_dive }) => {
3000
+ const inputChars = JSON.stringify({ work_item_id, layman_summary, technical_deep_dive }).length;
3001
+ let out = `## ADO Board Comments for ${work_item_id}\n\n`;
3002
+ out += `Please paste the following two comments into the Azure DevOps board:\n\n`;
3003
+ out += `### 1. Layman Summary\n`;
3004
+ out += `\`\`\`text\n${layman_summary}\n\`\`\`\n\n`;
3005
+ out += `### 2. Technical Deep-Dive\n`;
3006
+ out += `\`\`\`text\n${technical_deep_dive}\n\`\`\`\n\n`;
3007
+ try {
3008
+ const classifDir = resolve(".secufusion/classifications");
3009
+ if (!fs.existsSync(classifDir)) {
3010
+ fs.mkdirSync(classifDir, { recursive: true });
3011
+ }
3012
+ const commentsFile = path.join(classifDir, `${work_item_id}-comments.json`);
3013
+ writeFile(commentsFile, JSON.stringify({ layman_summary, technical_deep_dive, generated_at: new Date().toISOString() }, null, 2));
3014
+ out += `✅ Comments persisted to \`.secufusion/classifications/${work_item_id}-comments.json\`\n`;
3015
+ }
3016
+ catch (e) {
3017
+ // ignore
3018
+ }
3019
+ return appendTelemetry({ content: [{ type: "text", text: out }] }, inputChars);
3020
+ });
2986
3021
  const transport = new StdioServerTransport();
2987
3022
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secufusion-mcp",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "type": "module",
5
5
  "description": "SecuFusion MCP server - developer workflow tooling with guardrails",
6
6
  "main": "index.js",