# Evaluate Mmi

> |

- **Type:** Skill
- **Install:** `agentstack add skill-wfukatsu-nexus-architect-evaluate-mmi`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [wfukatsu](https://agentstack.voostack.com/s/wfukatsu)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [wfukatsu](https://github.com/wfukatsu)
- **Source:** https://github.com/wfukatsu/nexus-architect/tree/main/skills/evaluate-mmi

## Install

```sh
agentstack add skill-wfukatsu-nexus-architect-evaluate-mmi
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MMI Evaluation

## Desired Outcome

Evaluate each module of the target system across the 4 MMI axes and determine microservice readiness.

## Decision Criteria

For detailed scoring criteria and algorithms, refer to:
@rules/evaluation-frameworks.md

- 4 axes: Cohesion (30%), Coupling (30%), Independence (20%), Reusability (20%)
- Each axis scored 1-5
- MMI = (0.3 × C + 0.3 × K + 0.2 × I + 0.2 × R) / 5 × 100
- Maturity: 80-100 (Ready), 60-80 (Moderate), 40-60 (Needs Improvement), 0-40 (Immature)

## Prerequisites

| File | Required/Recommended | Source |
|------|---------------------|--------|
| reports/01_analysis/ | Required | /architect:analyze |

## Execution

### Step 1: Identify Modules

Glob for `reports/before/**/codebase-structure.md` to find the investigate-phase output, then read the found file. Also read `reports/01_analysis/domain-code-mapping.md`. Extract the list of modules to evaluate and record module names — these will be passed to sub-agents.

### Step 2: Collect Input File Paths

Glob for all analysis documents: `reports/01_analysis/**/*.md`

Record the full list of found file paths — these will be passed to all sub-agents.

### Step 3: Spawn Four Parallel Axis Evaluators

In a **single message**, issue all four Task() calls simultaneously so they run in parallel.
Each evaluator scores ALL identified modules on its specific axis.

**Task A — Cohesion Axis**
```
Task(
  subagent_type: "general-purpose",
  description: "MMI cohesion axis evaluation for all modules",
  prompt: """
You are evaluating COHESION (functional coherence within a module) for each module in a software system.

Modules to evaluate:

[Insert the module names identified in Step 1, one per line]

Read all analysis documents using the Read tool:

[Insert the full list of file paths found in Step 2, one per line]

For each module, score its Cohesion on a scale of 1-5:
- 5 (Exemplary): Single clear responsibility, all components tightly related, no leakage
- 4 (Good): Minor mixed concerns but mostly cohesive
- 3 (Acceptable): Some mixed responsibilities, identifiable but imperfect boundaries
- 2 (Concerning): Multiple unrelated responsibilities coexist
- 1 (Critical): No clear responsibility, god-class or utility-dumping-ground pattern

Return ONLY this JSON (no markdown fences, no explanation):
{
  "axis": "Cohesion",
  "weight": 0.30,
  "modules": [
    {
      "name": "",
      "score": ,
      "rationale": ""
    }
  ]
}
"""
)
```

**Task B — Coupling Axis**
```
Task(
  subagent_type: "general-purpose",
  description: "MMI coupling axis evaluation for all modules",
  prompt: """
You are evaluating COUPLING (degree of inter-module dependencies) for each module in a software system.

Modules to evaluate:

[Insert the module names identified in Step 1, one per line]

Read all analysis documents using the Read tool:

[Insert the full list of file paths found in Step 2, one per line]

For each module, score its Coupling (lower coupling = higher score) on a scale of 1-5:
- 5 (Exemplary): Minimal dependencies, well-defined interfaces, no circular dependencies
- 4 (Good): Few dependencies, mostly unidirectional
- 3 (Acceptable): Moderate dependencies, some bidirectional coupling
- 2 (Concerning): High fan-out or fan-in, implicit dependencies
- 1 (Critical): Circular dependencies, tight coupling, impossible to change in isolation

Return ONLY this JSON (no markdown fences, no explanation):
{
  "axis": "Coupling",
  "weight": 0.30,
  "modules": [
    {
      "name": "",
      "score": ,
      "rationale": ""
    }
  ]
}
"""
)
```

**Task C — Independence Axis**
```
Task(
  subagent_type: "general-purpose",
  description: "MMI independence axis evaluation for all modules",
  prompt: """
You are evaluating INDEPENDENCE (ability to deploy and test in isolation) for each module in a software system.

Modules to evaluate:

[Insert the module names identified in Step 1, one per line]

Read all analysis documents using the Read tool:

[Insert the full list of file paths found in Step 2, one per line]

For each module, score its Independence on a scale of 1-5:
- 5 (Exemplary): Can be deployed, tested, and versioned completely independently
- 4 (Good): Mostly independent with minor coordination needed
- 3 (Acceptable): Requires some coordination but deployable separately
- 2 (Concerning): Frequent coordination required; shared DB or shared runtime
- 1 (Critical): Cannot be deployed or tested independently; monolithic entanglement

Return ONLY this JSON (no markdown fences, no explanation):
{
  "axis": "Independence",
  "weight": 0.20,
  "modules": [
    {
      "name": "",
      "score": ,
      "rationale": ""
    }
  ]
}
"""
)
```

**Task D — Reusability Axis**
```
Task(
  subagent_type: "general-purpose",
  description: "MMI reusability axis evaluation for all modules",
  prompt: """
You are evaluating REUSABILITY (component reusability across contexts) for each module in a software system.

Modules to evaluate:

[Insert the module names identified in Step 1, one per line]

Read all analysis documents using the Read tool:

[Insert the full list of file paths found in Step 2, one per line]

For each module, score its Reusability on a scale of 1-5:
- 5 (Exemplary): Generic interfaces, well-documented contracts, reused in multiple contexts
- 4 (Good): Reusable with minor adaptation, clear interfaces
- 3 (Acceptable): Partially reusable but context-specific assumptions present
- 2 (Concerning): Highly context-specific, hard to reuse without modification
- 1 (Critical): Single-use implementation, no abstraction, not reusable

Return ONLY this JSON (no markdown fences, no explanation):
{
  "axis": "Reusability",
  "weight": 0.20,
  "modules": [
    {
      "name": "",
      "score": ,
      "rationale": ""
    }
  ]
}
"""
)
```

### Step 4: Compute MMI Per Module and Write Outputs

After all four Tasks complete, for each module compute:

```
MMI = (0.3 × cohesion + 0.3 × coupling + 0.2 × independence + 0.2 × reusability) / 5 × 100
```

Maturity classification:
- 80-100 → Mature (Ready for microservices migration)
- 60-80  → Moderate (Migration possible after partial refactoring)
- 40-60  → Needs Improvement (Major refactoring required)
- 0-40   → Immature (Fundamental redesign required)

Write all reports in the language configured in `work/pipeline-progress.json` (`options.output_language`).

**`reports/02_evaluation/mmi-by-module.md`** — Per-module 4-axis score table:

```markdown
---
title: "MMI Evaluation: Per-Module Details"
schema_version: 1
phase: "Phase 2: Evaluation"
skill: evaluate-mmi
generated_at: ""
input_files:
  - reports/01_analysis/
---

# MMI Per-Module Evaluation

| Module | Cohesion | Coupling | Independence | Reusability | MMI | Maturity |
|--------|----------|----------|--------------|-------------|-----|----------|
|  | /5 | /5 | /5 | /5 | % |  |
...

## Module Details

### 
- **Cohesion (x/5)**: 
- **Coupling (x/5)**: 
- **Independence (x/5)**: 
- **Reusability (x/5)**: 
- **MMI**: % ()
```

**`reports/02_evaluation/mmi-overview.md`** — Overall MMI scores, maturity assessment, improvement priorities:

```markdown
---
title: "MMI Evaluation: Overview"
schema_version: 1
phase: "Phase 2: Evaluation"
skill: evaluate-mmi
generated_at: ""
input_files:
  - reports/01_analysis/
---

# MMI Evaluation Overview

## Summary

| Metric | Value |
|--------|-------|
| System Average MMI | % |
| Maturity Level |  |
| Modules Evaluated |  |
| Ready for Migration |  |

## Per-Module MMI Scores

[bar chart using ASCII or Mermaid pie/gantt]

## Improvement Priorities

[Top 3-5 modules or axes requiring most improvement, with specific recommendations]

## Migration Readiness Verdict

[Overall assessment of readiness for microservices migration]
```

## Output

| File | Content |
|------|---------|
| `reports/02_evaluation/mmi-overview.md` | Overall MMI score, maturity assessment, improvement priorities |
| `reports/02_evaluation/mmi-by-module.md` | Per-module 4-axis score details |

## Related Skills

| Skill | Relationship |
|-------|-------------|
| /architect:analyze | Input source |
| /architect:evaluate-ddd | Parallel execution |
| /architect:integrate-evaluations | Output destination |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [wfukatsu](https://github.com/wfukatsu)
- **Source:** [wfukatsu/nexus-architect](https://github.com/wfukatsu/nexus-architect)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-wfukatsu-nexus-architect-evaluate-mmi
- Seller: https://agentstack.voostack.com/s/wfukatsu
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
