secufusion-mcp 1.0.33 → 1.0.35
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 -9
- package/index.js +36 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -49,7 +49,7 @@ STEP 1 — if allowed_next_action == "PROCEED":
|
|
|
49
49
|
STEP 2 — if allowed_next_action == "CONFIRM":
|
|
50
50
|
→ Present the developer_message to the developer
|
|
51
51
|
→ STOP. Wait for explicit "YES" or correction
|
|
52
|
-
→ Do NOT call manage_task, do NOT write a plan
|
|
52
|
+
→ Do NOT call manage_task, do NOT write a plan
|
|
53
53
|
→ Resume only after developer responds
|
|
54
54
|
|
|
55
55
|
STEP 3 — if allowed_next_action == "STOP":
|
|
@@ -57,7 +57,6 @@ STEP 3 — if allowed_next_action == "STOP":
|
|
|
57
57
|
→ Present the developer_message to the developer
|
|
58
58
|
→ DO NOT write any code
|
|
59
59
|
→ DO NOT call manage_task
|
|
60
|
-
→ DO NOT read any files
|
|
61
60
|
→ HARD STOP — wait for developer to explicitly override
|
|
62
61
|
```
|
|
63
62
|
|
|
@@ -112,16 +111,9 @@ tool output is the authoritative classification record — your mental model is
|
|
|
112
111
|
|
|
113
112
|
### Hard enforcement — what you are NOT allowed to do before classify_task returns
|
|
114
113
|
|
|
115
|
-
❌ Read any source file
|
|
116
|
-
❌ Call `manage_project_spec`
|
|
117
|
-
❌ Call `manage_task`
|
|
118
|
-
❌ Call `search_tasks`
|
|
119
114
|
❌ Write a plan
|
|
120
115
|
❌ Write any code
|
|
121
116
|
❌ Ask "what service does this belong to?"
|
|
122
|
-
❌ Say "let me analyze the codebase first"
|
|
123
|
-
|
|
124
|
-
The ONLY tool call permitted before `classify_task` is complete is `classify_task` itself.
|
|
125
117
|
|
|
126
118
|
---
|
|
127
119
|
|
|
@@ -371,6 +363,10 @@ After making any architectural decision:
|
|
|
371
363
|
rationale: "<why>")
|
|
372
364
|
— call this for every non-obvious decision, not just big ones
|
|
373
365
|
|
|
366
|
+
After finding an optimal/efficient solution for a problem:
|
|
367
|
+
— You must dynamically seek the most optimized, core solution for a given problem statement, even if similar problems have been solved before.
|
|
368
|
+
— 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.
|
|
369
|
+
|
|
374
370
|
After writing any test scenario:
|
|
375
371
|
→ call manage_task(action: "add_scenario",
|
|
376
372
|
scenario: "<description>",
|
|
@@ -444,6 +440,11 @@ STEP 3: if run_pre_pr_checks returns ANY error:
|
|
|
444
440
|
→ repeat until ZERO errors — no exceptions
|
|
445
441
|
|
|
446
442
|
STEP 4: raise PR only when run_pre_pr_checks reports zero errors
|
|
443
|
+
|
|
444
|
+
STEP 5: call generate_ado_comments(work_item_id, layman_summary, technical_deep_dive)
|
|
445
|
+
— Use this tool to output two distinct comments for the developer to paste into the Azure DevOps (ADO) board:
|
|
446
|
+
1. **Layman Summary**: A short, fundamental, non-technical explanation of the business value and what was resolved.
|
|
447
|
+
2. **Technical Deep-Dive**: A comprehensive, highly technical breakdown of the architectural changes, core optimizations, and exact implementation details.
|
|
447
448
|
```
|
|
448
449
|
|
|
449
450
|
### 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
|
|
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);
|