secufusion-mcp 1.0.53 → 1.0.56

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.
package/AGENTS.md CHANGED
@@ -237,23 +237,15 @@ Coordination required before proceeding.
237
237
  If zero breaking changes: → Note "No breaking changes detected" → proceed normally.
238
238
 
239
239
  ---
240
- ### Suggested title in comments
241
-
242
- When validation found title_accurate: false
243
- even if developer said YES to proceed
244
- in EVERY file created or modified for this task,
245
- add this comment at the top of the class:
246
-
247
- Java files:
248
- /**
249
- * {work_item_id} — {suggested_title}
250
- *
251
- * Note: Azure work item title may be misleading.
252
- * This file was created for: {suggested_title_reason}
253
- */
254
-
255
- This ensures codebase comments reflect reality
256
- even when Azure ticket title is wrong.
240
+ ### NO TICKET IDS IN CODE COMMENTS (STRICT RULE)
241
+
242
+ Work item IDs (e.g. "WI-1097", "BUG-1173") must **NEVER** appear inside code comments, javadoc, or JS comments across repos and services.
243
+ Comments should explain the durable WHY (what the code does and why it exists), not point back to a ticket that rots as the codebase evolves and the ticket gets closed/renumbered.
244
+ The ONLY acceptable places for a work item id are:
245
+ - File/folder naming (e.g. `.secufusion/tasks/1097-...`)
246
+ - Git branch names
247
+ - Commit references
248
+ Never inline in comments describing the code itself.
257
249
  ---
258
250
 
259
251
  ---
package/README.md CHANGED
@@ -697,6 +697,12 @@ As of version **1.0.50**, the MCP server strictly enforces **Rule 0** and adds i
697
697
  - **Frontend Service Resolution**: `get_service` now intelligently resolves frontend and extension repositories (like `sfn-web-ui`) even when they aren't explicitly keyed as backend microservices.
698
698
  - **Explicit AC Recognition**: `classify_task` now overrides `VAGUE` completeness warnings if it detects explicit Acceptance Criteria in the task description.
699
699
 
700
+ ### Strict Comment Guardrails & Slugification Fixes (v1.0.55+)
701
+
702
+ As of version **1.0.55**, the MCP server introduces two new quality-of-life and enforcement updates:
703
+ - **No Ticket IDs in Comments**: A strict rule has been added to `AGENTS.md` and the Tier 2 AI Reviewer now explicitly flags any inline ticket IDs (e.g., `// WI-1097`) inside code comments as a CRITICAL violation. Comments must explain the durable WHY, not point to decaying tracking tickets.
704
+ - **Clean Task Slugs**: `manage_task initialize` now automatically strips leading ticket prefixes (like `BUG-1173: `) from the title before generating the folder slug, preventing duplicated IDs in the folder path (e.g., no more `1173-bug-1173-`).
705
+
700
706
  ---
701
707
 
702
708
  ## Talking to the AI — What You'll Ever Say
package/index.js CHANGED
@@ -511,7 +511,9 @@ function resolveTaskFolder(workItemId, tasksRoot, registryData) {
511
511
  return null;
512
512
  }
513
513
  function generateNewTaskFolder(workItemId, title, tasksRoot) {
514
- const slug = title.toLowerCase()
514
+ // Strip potential leading ID prefix like "BUG-1173: " or "BUG-1173 " or "WI-1173: "
515
+ const strippedTitle = title.replace(/^[a-zA-Z]+-\d+[:\s]*/i, '');
516
+ const slug = strippedTitle.toLowerCase()
515
517
  .replace(/[:\s]+/g, '-')
516
518
  .replace(/[^a-z0-9-]+/g, '')
517
519
  .replace(/-+/g, '-')
@@ -2969,6 +2971,14 @@ server.tool("run_pre_pr_checks_with_reviewer_agent", "Unified, single-call PR re
2969
2971
  detail: "Comments explain WHY, not WHAT. Remove or replace with architectural rationale.",
2970
2972
  action: "Replace // Get the user with // Required because tenant context is not available in JWT claims" });
2971
2973
  }
2974
+ // Work Item IDs in comments
2975
+ const ticketIdComments = f.lines.map((l, i) => ({ l, i })).filter(({ l }) => /(\/\/|\/\*|\*)\s*.*(?:BUG|WI)-\d+/i.test(l));
2976
+ if (ticketIdComments.length > 0) {
2977
+ reviewComments.push({ tier: 2, file: f.file_path, line: ticketIdComments[0].i + 1, severity: "CRITICAL", area: "CODE_QUALITY",
2978
+ title: "Ticket ID in code comment",
2979
+ detail: `Line ${ticketIdComments[0].i + 1} contains a work item ID: \`${ticketIdComments[0].l.trim()}\``,
2980
+ action: "Remove the ticket ID. Explain the durable WHY instead." });
2981
+ }
2972
2982
  // Hardcoded URLs/IPs
2973
2983
  const hardcoded = f.lines.map((l, i) => ({ l, i })).filter(({ l }) => /https?:\/\/[0-9]{1,3}\.[0-9]{1,3}|localhost:[0-9]{4}|uat\.|staging\.|prod\./i.test(l) && !/\/\//.test(l));
2974
2984
  if (hardcoded.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secufusion-mcp",
3
- "version": "1.0.53",
3
+ "version": "1.0.56",
4
4
  "type": "module",
5
5
  "description": "SecuFusion MCP server - developer workflow tooling with guardrails",
6
6
  "main": "index.js",