secufusion-mcp 1.0.52 → 1.0.55
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 +10 -18
- package/index.js +11 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -53,7 +53,7 @@ You are NOW allowed to reason about the task. Not before.
|
|
|
53
53
|
|
|
54
54
|
### Why this is non-negotiable
|
|
55
55
|
|
|
56
|
-
`classify_task`
|
|
56
|
+
`classify_task`, `run_pre_pr_checks_with_reviewer_agent`, and every other analytical tool performs a background scan of the project spec JSON file, but the **AI agent itself** must independently load the spec into its own active context. The background scan is not a substitute. Without this step, the agent:
|
|
57
57
|
- Cannot accurately reason about service boundaries
|
|
58
58
|
- Cannot validate task scope against architecture
|
|
59
59
|
- Cannot enforce golden rules during classification
|
|
@@ -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
|
-
###
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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/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
|
-
|
|
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) {
|