secufusion-mcp 2.0.0 → 2.0.1
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 +148 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -838,12 +838,159 @@ Proceeding to plan presentation. No developer confirmation needed.
|
|
|
838
838
|
| **Guardrails** | Mixed soft/hard language | All `should` → `MUST`, all `avoid` → `FORBIDDEN`, linter errors explicitly blocking |
|
|
839
839
|
| **Cross-Task Intelligence** | Prose bullets | MANDATORY STEP 1-4 sequence + ❌ list |
|
|
840
840
|
|
|
841
|
+
|
|
842
|
+
---
|
|
843
|
+
|
|
844
|
+
## 🏗️ v2.0.0 — Native Claude Plugin Architecture
|
|
845
|
+
|
|
846
|
+
`secufusion-mcp@2.0.0` is a **complete architectural rebuild** of the MCP server into a native Claude Plugin. It unifies the MCP server, slash commands, personas, and hooks into a single self-contained, portable package following the enterprise-grade `ml-specs` plugin standard.
|
|
847
|
+
|
|
848
|
+
### What Changed
|
|
849
|
+
|
|
850
|
+
| Area | Before (≤ 1.2.8) | After (2.0.0) |
|
|
851
|
+
|---|---|---|
|
|
852
|
+
| **Plugin type** | Standalone MCP server only | Native Claude Plugin (`.claude-plugin/plugin.json` + `.mcp.json`) |
|
|
853
|
+
| **Slash commands** | Disconnected — no wiring to server | Natively registered — appear in Claude IDE `/` command menu |
|
|
854
|
+
| **Agent personas** | Scattered globally in `.agents/` | Self-contained inside `agents/` within the plugin package |
|
|
855
|
+
| **Path portability** | Hardcoded absolute paths | Fully portable via `${CLAUDE_PLUGIN_ROOT}` |
|
|
856
|
+
| **DNA plugin** | Separate `secufusion-dna-plugin` package | Fully merged into `secufusion-mcp` |
|
|
857
|
+
| **TypeScript build** | Root-level compile | Isolated in `mcp/src/` → compiles to `mcp/dist/` |
|
|
858
|
+
| **Repo validation** | Not present | Reads `.secufusion-project-spec.json` to verify all mandatory repos are cloned |
|
|
859
|
+
| **Frontend/ext validation** | Not present | Checks `frontend.repo` and `chrome_extension.repo` from project spec |
|
|
860
|
+
|
|
861
|
+
### New Package Structure
|
|
862
|
+
|
|
863
|
+
```
|
|
864
|
+
secufusion-mcp/
|
|
865
|
+
├── .claude-plugin/
|
|
866
|
+
│ └── plugin.json ← Claude registers this as a native plugin
|
|
867
|
+
├── .mcp.json ← MCP server wired into the plugin (${CLAUDE_PLUGIN_ROOT} relative)
|
|
868
|
+
├── agents/ ← All agent personas (planner, coder, reviewer, claude, AGENTS.md)
|
|
869
|
+
├── commands/ ← All slash command definitions (markdown)
|
|
870
|
+
├── hooks/ ← Lifecycle hooks (knowledge-drift.sh)
|
|
871
|
+
├── mcp/
|
|
872
|
+
│ ├── src/
|
|
873
|
+
│ │ ├── server.ts ← Main MCP server logic
|
|
874
|
+
│ │ └── parsers/ ← Polyglot AST parsers (Java, TS, React, Config, Infra...)
|
|
875
|
+
│ ├── dist/ ← Compiled output (what npm ships)
|
|
876
|
+
│ └── tsconfig.json ← Isolated TypeScript config
|
|
877
|
+
├── scripts/
|
|
878
|
+
│ ├── sfn-pr-check.js ← Pre-PR mechanical guardrail runner
|
|
879
|
+
│ └── utils.js
|
|
880
|
+
└── package.json
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
### Merged: SecuFusion DNA Plugin
|
|
884
|
+
|
|
885
|
+
The previously separate `secufusion-dna-plugin` is now fully merged into `secufusion-mcp`. There is no longer a need to install or configure it separately. All DNA discovery tools are available natively:
|
|
886
|
+
|
|
887
|
+
- `scan_repository_stack` — discovers framework/stack and validates repos vs project spec
|
|
888
|
+
- `extract_domain_models` — maps JPA entities and domain objects via AST
|
|
889
|
+
- `extract_api_endpoints` — maps REST/GraphQL endpoints across all services
|
|
890
|
+
- `extract_event_topics` — maps Kafka producers and consumers
|
|
891
|
+
- `start_dna_watcher` — starts continuous background file watcher
|
|
892
|
+
|
|
893
|
+
### Mandatory Repository Validation
|
|
894
|
+
|
|
895
|
+
During `scan_repository_stack`, the server reads `.secufusion-project-spec.json` and cross-references:
|
|
896
|
+
- All keys under `"microservices"` (e.g., `sfn-auth-api`, `sfn-events-api`)
|
|
897
|
+
- The `"frontend.repo"` value (e.g., `sfn-web-ui`)
|
|
898
|
+
- The `"chrome_extension.repo"` value (e.g., `snf-browser-extn`)
|
|
899
|
+
|
|
900
|
+
If any of these are physically missing from your local workspace folder, a `[WARNING]` is emitted listing exactly which repositories need to be cloned before a complete DNA map can be built.
|
|
901
|
+
|
|
902
|
+
---
|
|
903
|
+
|
|
904
|
+
## ⚡ End-to-End Slash Command Workflow
|
|
905
|
+
|
|
906
|
+
Once installed as a native Claude Plugin, all commands appear natively in the Claude IDE `/` command picker. Here is the complete daily workflow:
|
|
907
|
+
|
|
908
|
+
### 🔁 Day Start — Setup & Discovery
|
|
909
|
+
|
|
910
|
+
| Command | When to run | What it does |
|
|
911
|
+
|---|---|---|
|
|
912
|
+
| `/sfn-init` | First thing in the morning, or on a new machine | Scans your entire workspace, validates all mandatory repos are cloned against `.secufusion-project-spec.json`, parses AST across all services (Java, TypeScript, React), and builds `.secufusion/dna.json` — the living knowledge graph |
|
|
913
|
+
| `/watch-dna` | Right after `/sfn-init` | Starts the `chokidar` background file watcher. From this point, every file save automatically re-triggers the relevant AST parser and keeps `dna.json` fresh — no manual re-runs needed |
|
|
914
|
+
|
|
915
|
+
> **Mono-folder rule:** Keep all microservices, frontend, and extension repos inside one parent folder (e.g., `C:\Users\Yash\Desktop\secufi_full\`). The agent uses the parent folder as the ecosystem root and scans all siblings automatically.
|
|
916
|
+
|
|
917
|
+
---
|
|
918
|
+
|
|
919
|
+
### 📋 Phase 1 — Plan a Ticket
|
|
920
|
+
|
|
921
|
+
| Command | When to run | What it does |
|
|
922
|
+
|---|---|---|
|
|
923
|
+
| `/sfn-plan <ticket-id or description>` | When you receive a new Azure DevOps ticket | Agent enters the `planner.md` persona. Reads `.secufusion-project-spec.json` for golden rules and coding patterns. Reads `dna.json` to determine which microservice owns the change. Outputs a structured `plan.md` with exact files to touch, rollback strategy, and breaking change scan. **Stops and waits for your green light.** |
|
|
924
|
+
|
|
925
|
+
> **Why it stops:** This enforces the non-negotiable Rule 3 — `STRICT YIELD`. The agent must not start coding until you explicitly say "proceed".
|
|
926
|
+
|
|
927
|
+
**Example:**
|
|
928
|
+
```
|
|
929
|
+
/sfn-plan TASK-2847: Add MFA enforcement for admin users on login
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
---
|
|
933
|
+
|
|
934
|
+
### 🛠️ Phase 2 — Build the Feature
|
|
935
|
+
|
|
936
|
+
| Command | When to run | What it does |
|
|
937
|
+
|---|---|---|
|
|
938
|
+
| `/sfn-code` | After you approve the plan | Agent switches to the `coder.md` persona and begins implementing **strictly according to the approved plan**. Enforces all coding patterns (correct `@Transactional` style, Tenant ID scoping, DTO mapping, Lombok style, exception handling). Every architectural mistake is immediately logged to `.rejected-patterns.json`. |
|
|
939
|
+
|
|
940
|
+
---
|
|
941
|
+
|
|
942
|
+
### ✅ Phase 3 — Review & Gate
|
|
943
|
+
|
|
944
|
+
| Command | When to run | What it does |
|
|
945
|
+
|---|---|---|
|
|
946
|
+
| `/sfn-review` | After coding is done, before opening a PR | Agent enters the adversarial `reviewer.md` persona. Triggers `run_pre_pr_checks` — a 3-tier AST-level gate: (1) Mechanical guardrails (tenant isolation, N+1 queries, hardcoded URLs), (2) AI file-by-file code review, (3) Context-aware task evaluation against your spec. **Blocks the PR if Tier 1 violations are found.** |
|
|
947
|
+
|
|
948
|
+
---
|
|
949
|
+
|
|
950
|
+
### 🔍 Phase 4 — Architecture Discovery
|
|
951
|
+
|
|
952
|
+
These commands can be run at any time to explore your codebase, independent of any active task.
|
|
953
|
+
|
|
954
|
+
| Command | When to run | What it does |
|
|
955
|
+
|---|---|---|
|
|
956
|
+
| `/blast-radius <component>` | Before refactoring a shared entity, API, or Kafka topic | Reads `dna.json` and calculates exactly which services, endpoints, and consumers will break if the given component is changed. Prevents accidental breaking changes. |
|
|
957
|
+
| `/map-architecture` | When onboarding a new dev or auditing the ecosystem | Generates a comprehensive bird's-eye view of all your services, domains, inter-service call graph, and Kafka topics sourced directly from the DNA graph. |
|
|
958
|
+
| `/analyze` | When debugging a cross-service issue or doing a deep-dive on a subsystem | Performs a deep-dive AST analysis of a specific area, generating detailed dependency and data-flow maps. |
|
|
959
|
+
|
|
960
|
+
---
|
|
961
|
+
|
|
962
|
+
### 📊 The Full SDLC Flow at a Glance
|
|
963
|
+
|
|
964
|
+
```
|
|
965
|
+
Morning
|
|
966
|
+
↓
|
|
967
|
+
/sfn-init ← Validate all repos, build DNA knowledge graph
|
|
968
|
+
↓
|
|
969
|
+
/watch-dna ← Background watcher keeps DNA fresh all day
|
|
970
|
+
↓
|
|
971
|
+
New ticket arrives
|
|
972
|
+
↓
|
|
973
|
+
/sfn-plan TASK-XXX ← Plan is written + presented → you say "proceed"
|
|
974
|
+
↓
|
|
975
|
+
/sfn-code ← Feature is implemented per plan, zero-trust guardrails active
|
|
976
|
+
↓
|
|
977
|
+
/sfn-review ← 3-tier AST gate → PASS or BLOCK with specific violations
|
|
978
|
+
↓
|
|
979
|
+
PR opened ✅
|
|
980
|
+
|
|
981
|
+
Need to investigate?
|
|
982
|
+
↓
|
|
983
|
+
/blast-radius ← Impact analysis before any structural change
|
|
984
|
+
/map-architecture ← Full ecosystem overview
|
|
985
|
+
/analyze ← Deep subsystem inspection
|
|
986
|
+
```
|
|
987
|
+
|
|
841
988
|
---
|
|
842
989
|
|
|
843
990
|
## Requirements
|
|
844
991
|
|
|
845
992
|
- **Node.js** >= 18.0.0
|
|
846
|
-
- An MCP-compatible AI client (Antigravity, Claude Desktop, Cursor, Cline, etc.)
|
|
993
|
+
- An MCP-compatible AI client (Antigravity IDE, Claude Desktop, Cursor, Cline, etc.)
|
|
847
994
|
|
|
848
995
|
---
|
|
849
996
|
|