secufusion-mcp 2.1.4 → 2.1.5

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/README.md CHANGED
@@ -144,13 +144,13 @@ npx secufusion-mcp
144
144
  ### Option 2 — Global install
145
145
 
146
146
  ```bash
147
- npm install -g secufusion-mcp
147
+ npm install -g secufusion-mcp@2.1.4
148
148
  ```
149
149
 
150
150
  ### Option 3 — Local project install
151
151
 
152
152
  ```bash
153
- npm install --save-dev secufusion-mcp
153
+ npm install --save-dev secufusion-mcp@2.1.4
154
154
  ```
155
155
 
156
156
  ---
@@ -715,7 +715,7 @@ Phase 4: run_pre_pr_checks_with_reviewer_agent → APPROVED / DISCUSS
715
715
 
716
716
  As of version **1.0.13+**, `secufusion-mcp` globally bundles both `.secufusion-project-spec.json` and `AGENTS.md`. You **no longer need to copy these files** into every single repository!
717
717
 
718
- When you install globally (`npm install -g secufusion-mcp@latest`), the AI can automatically read your rules and project spec on the fly from the global installation.
718
+ When you install globally (`npm install -g secufusion-mcp@2.1.4`), the AI can automatically read your rules and project spec on the fly from the global installation.
719
719
 
720
720
  **How to load the Rules in a new project:**
721
721
  Depending on your AI client's capabilities, you can load the rules instantly by telling the AI:
@@ -0,0 +1,74 @@
1
+ ---
2
+ description: On-demand architecture exploration — map the full service graph as a Mermaid diagram, or run a blast-radius impact analysis for a specific component.
3
+ argument-hint: [map] or <component-name-or-file-path> e.g. "map" or "sfn-events-api" or "TenantEntity.java"
4
+ ---
5
+
6
+ You are executing the **sfn-explore** command for the SecuFusion ecosystem.
7
+
8
+ Argument: **$ARGUMENTS**
9
+
10
+ ---
11
+
12
+ ## Mode Detection
13
+
14
+ Read `$ARGUMENTS` and decide the mode:
15
+
16
+ - If `$ARGUMENTS` is empty or equals `map` → **Architecture Map Mode**
17
+ - Otherwise → **Blast Radius Mode** for the given component
18
+
19
+ ---
20
+
21
+ ## Mode A — Architecture Map
22
+
23
+ > Use this when: you want a bird's-eye view of the entire ecosystem (e.g. onboarding a new dev, auditing dependencies).
24
+
25
+ 1. Call `prime_session` or read `.secufusion/dna.json` to load the current knowledge graph.
26
+ 2. Generate a comprehensive **Mermaid diagram** (`graph TD`) that shows:
27
+ - All microservices grouped by bounded context
28
+ - REST API call graph (which service calls which)
29
+ - Kafka topic flow (producer → topic → consumer)
30
+ - Frontend (`sfn-web-ui`) and extension (`snf-browser-extn`) connections to backend services
31
+ 3. Render the Mermaid diagram in the response.
32
+ 4. Below the diagram, print a service inventory table:
33
+
34
+ | Service | Port | Stack | Owns Tables | Produces Topics | Consumes Topics |
35
+ |---|---|---|---|---|---|
36
+
37
+ ---
38
+
39
+ ## Mode B — Blast Radius
40
+
41
+ > Use this when: you are about to refactor a shared entity, change an API contract, or modify a Kafka topic and need to know the full downstream impact.
42
+
43
+ 1. Call `prime_session` or read `.secufusion/dna.json` to load the knowledge graph.
44
+ 2. Search for all references to `$ARGUMENTS` across:
45
+ - Microservice API consumers (who calls this endpoint?)
46
+ - Database entity consumers (which repos query this table/column?)
47
+ - Kafka consumers (which services consume this topic?)
48
+ - Frontend and `snf-browser-extn` (does the UI or extension directly consume this contract?)
49
+ 3. Present a **Cross-Repo Blast Radius Report**:
50
+
51
+ ```
52
+ 🎯 Component: $ARGUMENTS
53
+
54
+ Impacted Microservices:
55
+ - sfn-X-api → [why impacted]
56
+
57
+ Impacted APIs:
58
+ - GET /v1/... → [consumers]
59
+
60
+ Impacted Events / Consumers:
61
+ - topic-name → [consumer services]
62
+
63
+ Impacted Databases:
64
+ - table_name → [services querying this]
65
+
66
+ Impacted Frontend / Extension:
67
+ - sfn-web-ui → [pages / components]
68
+ - snf-browser-extn → [content scripts / background workers]
69
+
70
+ Risk Level: 🟢 LOW | 🟡 MEDIUM | 🔴 HIGH
71
+ ```
72
+
73
+ 4. If risk is 🔴 HIGH, add a warning:
74
+ > ⚠️ High blast radius detected. Consider running `/sfn-plan` with this context before making changes.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Prime the SecuFusion ecosystem — scan the entire codebase, map the architectural DNA, and write it to .secufusion/dna.json. Run this once when you first clone a repo.
2
+ description: Prime the SecuFusion ecosystem — scan the entire codebase, map the architectural DNA, generate the architecture diagram, and write it to .secufusion/dna.json. Run this once when you first clone a repo.
3
3
  argument-hint: (no args) — run from the root of the repo
4
4
  ---
5
5
 
@@ -9,14 +9,12 @@ You are executing the **sfn-init** bootstrap command for the SecuFusion ecosyste
9
9
 
10
10
  ## Phase 1 — SCAN the Repository
11
11
 
12
- Call the **secufusion-dna-plugin** MCP tools to scan the repository:
12
+ Call the following MCP tools to scan the repository. Run all 4 **concurrently in a single message**:
13
13
 
14
- 1. Call `scan_repository_stack` to identify: language, framework, package manager, microservices, database entities, and build/test commands. Flag if this is a monorepo.
15
- 2. Call `extract_domain_models` to map all domain entities, their fields, and relationships.
16
- 3. Call `extract_api_endpoints` to map all REST/GraphQL endpoints, their methods, and owning services.
17
- 4. Call `extract_event_topics` to map all Kafka/event-bus topics, producers, and consumers.
18
-
19
- Run all 4 tool calls in a **single message** so they execute concurrently.
14
+ 1. `scan_repository_stack` — identify language, framework, package manager, microservices, DB entities, build/test commands. Flag if monorepo.
15
+ 2. `extract_domain_models` — map all domain entities, their fields, and relationships.
16
+ 3. `extract_api_endpoints` — map all REST/GraphQL endpoints, their methods, and owning services.
17
+ 4. `extract_event_topics` — map all Kafka/event-bus topics, producers, and consumers.
20
18
 
21
19
  ## Phase 2 — WRITE the DNA
22
20
 
@@ -43,7 +41,17 @@ Once all scans complete:
43
41
  Summarize what was found:
44
42
  - Number of services, domain models, API endpoints, and event topics discovered
45
43
  - Any gaps or areas marked `(inferred)` that the human should verify
46
- - **CRITICAL CORE CHECK:** Explicitly verify that the DNA map contains mappings for **frontend**, **backend**, and **snf-browser-extn** (extension). If ANY of these 3 are missing, you MUST print a prominent warning notifying the user what is missing.
44
+ - **CRITICAL CORE CHECK:** Explicitly verify that the DNA map contains mappings for **frontend**, **backend**, and **snf-browser-extn** (extension). If ANY of these 3 are missing, print a prominent warning listing exactly what is missing and what needs to be cloned/added.
47
45
  - Confirm that `.secufusion/dna.json` was written successfully
48
46
 
47
+ ## Phase 4 — ARCHITECTURE DIAGRAM
48
+
49
+ Using the data now in `dna.json`, generate a comprehensive **Mermaid diagram** (`graph TD`) that visualizes:
50
+ - All microservices and their bounded contexts
51
+ - REST API call graph (which service calls which)
52
+ - Kafka topic flow (producer → topic → consumer)
53
+ - Frontend and `snf-browser-extn` connections to backend services
54
+
55
+ Render the diagram directly in your response so the user can see the full ecosystem at a glance.
56
+
49
57
  **Next step for the user:** Run `/sfn-plan <ticket-id>` to start your first task.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secufusion-mcp",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "type": "module",
5
5
  "description": "SecuFusion MCP server - developer workflow tooling with guardrails",
6
6
  "main": "mcp/dist/server.js",
@@ -1,15 +0,0 @@
1
- ---
2
- description: Analyzes the current project to build its DNA Knowledge Graph
3
- argument-hint: (no args)
4
- ---
5
-
6
- You are the SecuFusion DNA Discovery Agent. Your goal is to analyze this ecosystem and build the Poly-Repo DNA Knowledge Graph.
7
-
8
- The underlying MCP tools will automatically detect if you are inside a poly-repo structure. If they find sibling repositories, they will scan all of them simultaneously to build a cross-repo DNA file.
9
-
10
- 1. Call the `secufusion-dna_scan_repository_stack` tool to identify the framework and infrastructure across the ecosystem.
11
- 2. Call the `secufusion-dna_extract_domain_models` tool to find and parse entities and domain models across all repos.
12
- 3. Call the `secufusion-dna_extract_api_endpoints` tool to map out the API layer across all repos.
13
- 4. Call the `secufusion-dna_extract_event_topics` tool to map out event consumers and producers across all repos.
14
-
15
- Once you have gathered this information, summarize your findings for the user. Do not delete any existing data in the knowledge graph.
@@ -1,14 +0,0 @@
1
- ---
2
- description: Determines the impact of changing a specific component or file
3
- argument-hint: <component-name-or-file-path>
4
- ---
5
-
6
- You are the SecuFusion DNA Blast Radius Agent. Your goal is to determine the impact of changing the provided component or file across the entire Poly-Repo ecosystem.
7
-
8
- 1. Call the `secufusion-dna_query_knowledge_graph` tool with the query "Find all components, services, and APIs that depend on or consume {argument}".
9
- 2. Analyze the returned dependency chain, paying special attention to cross-repo dependencies (e.g., changing a DTO in `sfn-events-api` breaking a listener in `sfn-notification-api`).
10
- 3. Present a Cross-Repo Blast Radius Report to the user, categorizing the impact into:
11
- - Impacted Microservices
12
- - Impacted APIs
13
- - Impacted Events/Consumers
14
- - Impacted Databases
@@ -1,10 +0,0 @@
1
- ---
2
- description: Generates a Mermaid architecture diagram from the project DNA
3
- argument-hint: (no args)
4
- ---
5
-
6
- You are the SecuFusion DNA Architecture Agent. Your goal is to visualize the cross-service dependencies and architecture of this project.
7
-
8
- 1. Call the `secufusion-dna_query_knowledge_graph` tool with the query "Get all services, APIs, and event topics with their dependencies".
9
- 2. Based on the returned relationships, generate a comprehensive Mermaid diagram (`graph TD` or `graph LR`).
10
- 3. Render the diagram in your response, grouping components by bounded context or service if possible.
@@ -1,3 +0,0 @@
1
- # /map-services
2
-
3
- This command instructs the SecuFusion DNA Discovery MCP to analyze the project based on /map-services.
@@ -1,9 +0,0 @@
1
- ---
2
- description: Starts the background watcher to continuously update the Poly-Repo DNA.
3
- argument-hint: (no args)
4
- ---
5
-
6
- You are the SecuFusion DNA Watcher Agent. Your goal is to start the background file watcher.
7
-
8
- 1. Call the `start_dna_watcher` tool.
9
- 2. Inform the user that the DNA Knowledge Graph is now actively monitoring the codebase in the background and will dynamically update whenever a developer saves a Java file.