secufusion-mcp 1.0.41 → 1.0.43

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 +34 -34
  2. package/README.md +47 -30
  3. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -17,7 +17,40 @@ You are an elite Senior Developer and Architect working on the SecuFusion worksp
17
17
 
18
18
  ---
19
19
 
20
- ## Phase 00 — Task Classification (The Absolute First Step)
20
+ ## Phase 00 — Project Context (The Absolute First Step)
21
+ (TRIGGER: **every session start** — runs BEFORE any problem statement is analyzed)
22
+
23
+ ### MANDATORY sequence — no exceptions
24
+
25
+ ```
26
+ STEP 1: call manage_project_spec(action: "read")
27
+ STEP 2: call manage_project_spec(action: "get_golden_rules")
28
+ STEP 3: if working on a specific service:
29
+ call manage_project_spec(action: "get_service", service_name: <that service>)
30
+ ```
31
+
32
+ You now know: all service ports, repos, domains, table ownership, inter-service calls,
33
+ Kafka topics, Keycloak config, coding patterns, auth flow, and all golden rules.
34
+
35
+ ### Before any architectural decision — MANDATORY (every time, not just once per session)
36
+ - Call `manage_project_spec(action: "get_golden_rules")` before every architectural decision
37
+ - Call `manage_project_spec(action: "get_coding_patterns")` before writing any new class
38
+ - Call `manage_project_spec(action: "get_service")` before touching any specific microservice
39
+
40
+ ### Hard enforcement — what you are NOT allowed to do before Phase 00 completes
41
+
42
+ ❌ Ask the developer which service owns what
43
+ ❌ Ask what port something runs on
44
+ ❌ Ask how tenantId is extracted
45
+ ❌ Assume any service details from memory
46
+ ❌ Write any code
47
+ ❌ Proceed to any other phase
48
+
49
+ The ONLY tool calls permitted in Phase 00 are the `manage_project_spec` calls listed above.
50
+
51
+ ---
52
+
53
+ ## Phase 0.5 — Task Classification
21
54
  (TRIGGER: the moment any task, bug, user story, feature, or work item is received)
22
55
 
23
56
  ### THE RULE — Read, Examine, Then Classify
@@ -200,39 +233,6 @@ even when Azure ticket title is wrong.
200
233
  ---
201
234
 
202
235
 
203
- ## Phase 0.5 — Project Context
204
- (TRIGGER: **every session start** — runs after classify_task returns PROCEED/CONFIRM, before any architectural decision)
205
-
206
- ### MANDATORY sequence — no exceptions
207
-
208
- ```
209
- STEP 1: call manage_project_spec(action: "read")
210
- STEP 2: call manage_project_spec(action: "get_golden_rules")
211
- STEP 3: if working on a specific service:
212
- call manage_project_spec(action: "get_service", service_name: <that service>)
213
- ```
214
-
215
- You now know: all service ports, repos, domains, table ownership, inter-service calls,
216
- Kafka topics, Keycloak config, coding patterns, auth flow, and all golden rules.
217
-
218
- ### Before any architectural decision — MANDATORY (every time, not just once per session)
219
- - Call `manage_project_spec(action: "get_golden_rules")` before every architectural decision
220
- - Call `manage_project_spec(action: "get_coding_patterns")` before writing any new class
221
- - Call `manage_project_spec(action: "get_service")` before touching any specific microservice
222
-
223
- ### Hard enforcement — what you are NOT allowed to do before Phase 0.5 completes
224
-
225
- ❌ Ask the developer which service owns what
226
- ❌ Ask what port something runs on
227
- ❌ Ask how tenantId is extracted
228
- ❌ Assume any service details from memory
229
- ❌ Write any code
230
- ❌ Proceed to any other phase
231
-
232
- The ONLY tool calls permitted in Phase 0.5 are the `manage_project_spec` calls listed above.
233
-
234
- ---
235
-
236
236
  ## Phase 0.6.6 — Resume
237
237
  (TRIGGER: new session, switching branches, or user says "resume" or "continue")
238
238
 
package/README.md CHANGED
@@ -393,36 +393,40 @@ These rules are enforced automatically — the AI will never violate them:
393
393
 
394
394
  ```
395
395
  ┌──────────────┬──────────────────────────────────────────────────────────────┐
396
- │ Phase 00 │ manage_project_spec (action=read)
397
- Session │ → Loads full project DNA from .secufusion-project-spec.json
398
- Start │ → AI knows ALL services, ports, patterns, golden rules
396
+ │ Phase 00 │ manage_project_spec (action=read + get_golden_rules)
397
+ Project DNA │ → FIRST step runs before ANY problem statement is read
398
+ (Session │ → AI loaded with ALL services, ports, coding patterns, │
399
+ │ Start) │ Kafka topics, golden rules, and tenant isolation config │
399
400
  ├──────────────┼──────────────────────────────────────────────────────────────┤
400
- │ Phase 0 manage_task (action=read_summary) OR search_tasks
401
- Resume Token-efficient status view resume next_step instantly
402
- ├──────────────┼──────────────────────────────────────────────────────────────┤
403
- Phase 0.5 │ classify_task → 5-pass deep analysis engine
404
- Ownership Pass 1: Weighted signal scoring (Tier 1-4)
405
- Check Pass 2: Negation detection per sentence
406
- │ │ Pass 3: Root-cause phrase extraction (fix location, not symptom)
407
- │ │ Pass 4: Bug disambiguation matrix
408
- │ │ Pass 5: Confidence gate (ratio ≥ 1.8× + Tier 1/2 required)
401
+ │ Phase 0.5 Ultimate Reasoning (ReAct) → classify_task
402
+ Task Step 1: AI outputs ### Ultimate Reasoning block
403
+ │ Classification Deconstruction / Observation / Root Cause / Hypothesis │
404
+ Step 2: classify_task → 5-pass deep analysis engine
405
+ Pass 1: Weighted signal scoring (Tier 1-4)
406
+ Pass 2: Negation detection per sentence
407
+ │ │ Pass 3: Root-cause phrase extraction
408
+ │ │ Pass 4: Bug disambiguation matrix
409
+ │ │ Pass 5: Confidence gate (≥ 1.8× + Tier 1/2 required)
409
410
  │ │ → allowed_next_action: PROCEED / CONFIRM / STOP │
410
411
  ├──────────────┼──────────────────────────────────────────────────────────────┤
412
+ │ Phase 0.6.6 │ manage_task (action=read_summary) OR search_tasks │
413
+ │ Resume │ → Token-efficient status view → resume next_step instantly │
414
+ ├──────────────┼──────────────────────────────────────────────────────────────┤
411
415
  │ Phase 0.7 │ Present full plan (scope, files, ACs, perf, rollback) │
412
416
  │ Plan Gate │ → STOP and wait for "proceed" / "adjust" / "cancel" │
413
417
  │ │ → manage_task (action=initialize) only after proceed │
414
418
  ├──────────────┼──────────────────────────────────────────────────────────────┤
415
- │ Phase 1 │ search_tasks → get_task_history → manage_task initialize
416
- │ Planning │ → Creates dynamic .secufusion/tasks/{id}-{slug}/ with all 5 files
419
+ │ Phase 1 │ search_tasks → get_task_history → manage_task initialize
420
+ │ Planning │ → Creates .secufusion/tasks/{id}-{slug}/ with all 5 files
417
421
  ├──────────────┼──────────────────────────────────────────────────────────────┤
418
422
  │ Phase 2 │ manage_task: update_spec / log_file_touched / │
419
423
  │ Execution │ log_decision / add_scenario │
420
424
  ├──────────────┼──────────────────────────────────────────────────────────────┤
421
425
  │ Phase 3 │ log_rejected_pattern │
422
- │ Correction │ → Record mistakes to avoid repeat
426
+ │ Correction │ → Record mistakes permanently to avoid repeat
423
427
  ├──────────────┼──────────────────────────────────────────────────────────────┤
424
428
  │ Phase 4 │ manage_task (action=complete) → pr-summary.md generated │
425
- │ PR Handoff │ generate_ado_comments → outputs Layman & Tech summaries
429
+ │ PR Handoff │ generate_ado_comments → Layman + Technical Deep-Dive for ADO
426
430
  └──────────────┴──────────────────────────────────────────────────────────────┘
427
431
  ```
428
432
 
@@ -468,9 +472,11 @@ Add this to your MCP client config and restart. That's it.
468
472
 
469
473
  ---
470
474
 
471
- ### Step 2 — Start a new task (Planning phase)
475
+ ### Step 2 — Start a new task (Classification phase)
476
+
477
+ Just paste your Azure DevOps work item ID and description directly into the chat. No special syntax needed.
472
478
 
473
- Just paste your Azure DevOps work item ID and description directly into the chat. A good problem statement includes the raw user story and acceptance criteria. No special syntax needed.
479
+ Before analyzing the problem statement, the AI has already loaded the Project DNA from Phase 00. It now outputs an **Ultimate Reasoning block** a structured, spec-grounded analysis of the problem — then calls `classify_task`.
474
480
 
475
481
  **You type:**
476
482
  ```
@@ -488,7 +494,16 @@ So that sensitive dashboard actions are protected against compromised credential
488
494
  4. If MFA fails 3 times, the account should be temporarily locked for 15 minutes.
489
495
  ```
490
496
 
491
- **The AI automatically classifies the task, presents a plan, and upon approval, calls `manage_task` to initialize the dynamic folder `.secufusion/tasks/2847-add-mfa-enforcement-for-admin-users-on-login/`:**
497
+ **The AI outputs:**
498
+ ```
499
+ ### Ultimate Reasoning
500
+ - **Deconstruction:** TOTP enforcement is an auth-layer concern. sfn-iam-api owns the login flow.
501
+ - **Observation:** AuthService.java contains the password verification step (line 112). No MFA interceptor exists yet. sfn-iam-api runs on port 9001 per project spec.
502
+ - **Root Cause:** No MFA gate exists between password verification and JWT issuance.
503
+ - **Hypothesis:** Add a MfaVerificationService that validates TOTP after password passes, blocks JWT issuance on failure, and records attempts for lockout logic.
504
+ ```
505
+
506
+ **Then classifies and upon approval initializes:**
492
507
  ```json
493
508
  {
494
509
  "action": "initialize",
@@ -601,25 +616,27 @@ The SecuFusion MCP operates across three complementary layers to prevent AI amne
601
616
  ### How it all wires together
602
617
 
603
618
  ```
604
- mcp_config.json → starts the server (9 tools available)
619
+ mcp_config.json → starts the server (tools available)
605
620
  +
606
621
  .agents/AGENTS.md → tells AI when to invoke each tool
607
622
 
608
623
  ★ SESSION STARTS
609
624
 
610
- Phase 00: manage_project_spec → AI loads full project DNA
611
-
612
- Phase 0: manage_task read_summary → resumes active work item
625
+ Phase 00: manage_project_spec (read + get_golden_rules)
626
+ → AI's brain loaded with full Project DNA BEFORE any task is read
627
+ knows all ports, services, patterns, tenant rules from spec
613
628
 
614
629
  You say: "WI-1042: Add audit log export"
615
630
 
616
- Phase 0.5: classify_task 5-pass deep analysis (FIRST tool call, no exceptions)
617
- weighted scores + root-cause phrases + negation + bug heuristics
618
- allowed_next_action: PROCEED (backend) / CONFIRM (mixed) / STOP (frontend)
619
- + performance risk scan (GREEN/AMBER/RED)
620
- + breaking change scan (endpoints/entities/Kafka/extension)
631
+ Phase 0.5: ### Ultimate Reasoning (spec-grounded ReAct)
632
+ Deconstruction / Observation / Root Cause / Hypothesis (written to chat)
633
+ classify_task: 5-pass deep analysis
634
+ weighted scores + root-cause phrases + negation + bug heuristics
635
+ allowed_next_action: PROCEED (backend) / CONFIRM (mixed) / STOP (frontend)
636
+ + performance risk scan (GREEN/AMBER/RED)
637
+ + breaking change scan (endpoints/entities/Kafka/extension)
621
638
 
622
- Phase 0.7: plan presented → developer approves ("proceed")
639
+ Phase 0.7: full plan presented → developer approves ("proceed")
623
640
 
624
641
  Phase 1: search_tasks (always) → get_task_history → manage_task initialize
625
642
  → .secufusion/tasks/1042-add-audit-log-export/ created
@@ -627,7 +644,7 @@ Phase 1: search_tasks (always) → get_task_history → manage_task initialize
627
644
  Phase 2: code + log_file_touched + log_decision + add_scenario (ALL mandatory)
628
645
 
629
646
  Phase 4: manage_task complete → pr-summary.md generated
630
- + run_pre_pr_checks (fix recheck loop until ZERO errors) → then PR
647
+ generate_ado_comments Layman + Technical Deep-Dive for ADO board
631
648
  ```
632
649
 
633
650
  ### Reusing across projects (Global Bundling)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secufusion-mcp",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "type": "module",
5
5
  "description": "SecuFusion MCP server - developer workflow tooling with guardrails",
6
6
  "main": "index.js",