secufusion-mcp 1.0.39 → 1.0.41

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 +1 -2
  2. package/README.md +17 -68
  3. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -227,10 +227,9 @@ Kafka topics, Keycloak config, coding patterns, auth flow, and all golden rules.
227
227
  ❌ Ask how tenantId is extracted
228
228
  ❌ Assume any service details from memory
229
229
  ❌ Write any code
230
- ❌ Call classify_task
231
230
  ❌ Proceed to any other phase
232
231
 
233
- The ONLY tool calls permitted in Phase 00 are the `manage_project_spec` calls listed above.
232
+ The ONLY tool calls permitted in Phase 0.5 are the `manage_project_spec` calls listed above.
234
233
 
235
234
  ---
236
235
 
package/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
  | `get_pattern_from_task` | **Phase 1** — Cross-Task Intelligence | Extracts reusable decisions, file patterns, and test scenarios from a completed task |
22
22
  | `manage_branch_state` | Legacy — Branch State | Backward-compatible branch-scoped JSON state tracker (for tasks before `manage_task`) |
23
23
  | `log_rejected_pattern` | **Phase 3** — Course Correction | Records bad patterns to `.rejected-patterns.json` so they are never repeated |
24
- | `run_pre_pr_checks` | **Phase 4** — PR Handoff | Discovers modified microservices and gates PRs via AST-level linters + structural checks |
24
+ | `generate_ado_comments` | **Phase 4** — PR Handoff | Generates distinct Layman and Technical Deep-Dive summaries for the Azure DevOps board |
25
25
  | `get_secufusion_rules` | **Setup** | Returns the `AGENTS.md` rules for AI clients that don't natively support MCP Resources |
26
26
  | `classify_task` | **Phase 0.5** — Task Classification | **NEW** — Deep multi-pass analysis engine. Classifies any task as `BACKEND_ONLY`, `FRONTEND_ONLY`, `FULL_STACK`, or `EXTENSION_ONLY` based on root cause (where the fix lives), not surface symptoms. Must be the first tool called on any task. |
27
27
 
@@ -231,65 +231,21 @@ This writes to `.rejected-patterns.json`:
231
231
 
232
232
  ---
233
233
 
234
- ### 3. run_pre_pr_checks
234
+ ### 3. generate_ado_comments
235
235
 
236
236
  | Parameter | Type | Required | Description |
237
237
  |---|---|---|---|
238
238
  | `work_item_id` | string | Yes | Azure DevOps work item ID |
239
- | `root_dir` | string | No | Directory to scan (defaults to cwd) |
240
- | `skip_checks` | array | No | `branch_state`, `console_logs`, `tenant_isolation`, `hardcoded_urls`, `flyway_migrations` |
239
+ | `layman_summary` | string | Yes | Non-technical explanation of the business value and what was resolved |
240
+ | `technical_deep_dive` | string | Yes | Comprehensive breakdown of the architectural changes and optimizations |
241
241
 
242
- **Guardrail checks:**
243
-
244
- | Check | Fails when |
245
- |---|---|
246
- | **STATE** | `.secufusion-state.json` has pending ACs for the active branch |
247
- | **LINTING** | AST linters (ESLint, Checkstyle) fail in any discovered microservice. Fix natively, do not suppress! (Falls back to regex if no linters exist) |
248
- | **SECURITY** | Hardcoded IPs or `uat.*` / `prod.*` / `staging.*` URLs in source or config files |
249
- | **TENANT ISOLATION** | `*Repository.java` files contain query methods or `@Query` annotations that do NOT include `tenant` filtering |
250
- | **FLYWAY** | `@Entity`-annotated Java files exist but no `V*__.sql` Flyway migrations found |
251
-
252
- **Example — Run checks before PR:**
242
+ **Example — Generate ADO board comments:**
253
243
 
254
244
  ```
255
245
  Ask: "Prepare the PR for work item 1042."
256
246
  ```
257
247
 
258
- The AI will call:
259
- ```json
260
- {
261
- "work_item_id": "1042"
262
- }
263
- ```
264
-
265
- **✅ Passing output:**
266
- ```
267
- # ✅ Pre-PR Checks PASSED — Work Item #1042
268
-
269
- ✅ [STATE] All branch tasks completed.
270
- ✅ [LOGGING] No console.log / System.out.println found.
271
- ✅ [SECURITY] No hardcoded UAT/Prod IPs or environment URLs found.
272
- ✅ [FLYWAY] Flyway migration coverage looks good.
273
-
274
- ## PR Summary
275
- - Work Item: #1042
276
- - State: All pending ACs resolved ✅
277
- - Ready to raise PR 🚀
278
- ```
279
-
280
- **❌ Failing output (example):**
281
- ```
282
- # ❌ Pre-PR Checks FAILED — Work Item #1042
283
-
284
- ❌ [STATE] 3 pending AC(s) remain in .secufusion-state.json:
285
- • Flyway SQL migration created for every modified JPA @Entity
286
- • Unit tests written / updated for new business logic
287
- • API contract updated if endpoints changed
288
-
289
- ❌ [LOGGING] Found 2 prohibited log statement(s):
290
- • console.log() found at src/components/AuditTable.tsx:47
291
- • System.out.println() found at src/main/java/AuditService.java:112
292
- ```
248
+ The AI will complete the task, then call `generate_ado_comments`. The output is explicitly formatted for the developer to paste into the Azure DevOps board.
293
249
 
294
250
  ---
295
251
 
@@ -466,7 +422,7 @@ These rules are enforced automatically — the AI will never violate them:
466
422
  │ Correction │ → Record mistakes to avoid repeat │
467
423
  ├──────────────┼──────────────────────────────────────────────────────────────┤
468
424
  │ Phase 4 │ manage_task (action=complete) → pr-summary.md generated │
469
- │ PR Handoff │ run_pre_pr_checksmust pass before raising PR
425
+ │ PR Handoff │ generate_ado_commentsoutputs Layman & Tech summaries
470
426
  └──────────────┴──────────────────────────────────────────────────────────────┘
471
427
  ```
472
428
 
@@ -609,32 +565,25 @@ The AI **immediately** calls `log_rejected_pattern`:
609
565
 
610
566
  ---
611
567
 
612
- ### Step 6 — Pre-PR checks (PR Handoff phase)
568
+ ### Step 6 — Complete the task (PR Handoff phase)
613
569
 
614
570
  When you're done, say:
615
571
 
616
572
  ```
617
- Run pre-PR checks for work item 2847.
573
+ I'm done with WI-2847. Please complete the task and generate the ADO comments.
618
574
  ```
619
575
 
620
- The AI scans your entire repo and produces a report.
576
+ The AI marks the task complete, auto-generates a PR summary locally, and then outputs two Azure DevOps comments for you to paste into the ticket:
621
577
 
622
- **✅ Everything passes — ready to ship:**
578
+ **✅ Passing output:**
623
579
  ```
624
- # Pre-PR Checks PASSED Work Item #2847
625
-
626
- Scanned directory: C:\projects\secufusion-backend
580
+ Here are the comments for your ADO ticket:
627
581
 
628
- [STATE] All tasks resolved.
629
- [LOGGING] No console.log / System.out.println found.
630
- ✅ [SECURITY] No hardcoded UAT/Prod IPs or environment URLs found.
631
- ✅ [FLYWAY] Flyway migration coverage looks good.
582
+ **Layman Summary:**
583
+ The problem where some devices weren't accurately appearing on the admin dashboard has been resolved. The fix ensures that the system accurately tallies the registered hardware without throwing silent errors.
632
584
 
633
- ## PR Summary
634
- - Work Item: #2847
635
- - State: All pending ACs resolved ✅
636
- - Guardrails: tenant isolation secured, no debug logs, no hardcoded URLs, Flyway covered ✅
637
- - Ready to raise PR 🚀
585
+ **Technical Deep-Dive:**
586
+ The `DeviceActivitySummaryDTO` was throwing a NullPointerException because the `browserUsage` map was uninitialized when `deviceList` was empty. I added an explicit `ConcurrentHashMap` initialization and scoped the iteration inside a `tenantId` check to preserve cross-tenant boundaries.
638
587
  ```
639
588
 
640
589
  ---
@@ -746,7 +695,7 @@ Once all three layers are in place, you interact completely naturally:
746
695
 
747
696
  **Before Phase 0.5 + 0.7:** The AI started coding immediately with no ownership check or explicit plan.
748
697
 
749
- **After Phase 0.5 + 0.7:** The AI calls `classify_task` first (no exceptions). The deep analysis engine classifies by root cause not surface symptoms runs a performance risk and breaking change scan, presents a complete plan with rollback strategy, and **waits for your approval before writing a single line of code**.
698
+ **After Phase 0.5 + 0.7:** The AI performs deep code investigation, writes an **Ultimate Reasoning** block to prove its root-cause understanding, and then calls `classify_task`. The deep analysis engine confirms the classification, runs a performance risk and breaking change scan, presents a complete plan with rollback strategy, and **waits for your approval before writing a single line of code**.
750
699
 
751
700
  **Before strict AGENTS.md:** Each phase was a soft bullet list with suggestions. The AI could skip steps.
752
701
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secufusion-mcp",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "type": "module",
5
5
  "description": "SecuFusion MCP server - developer workflow tooling with guardrails",
6
6
  "main": "index.js",