Mandu guard

From konamgil/mandu · View interactive version

Mandu guard is an AI agent skill from the GitHub repository konamgil/mandu. Architecture guard system for Mandu. Use when checking layer dependencies, enforcing architecture rules, or validating file locations. Triggers on tasks involving architecture, layers, dependencies, or guard commands.

How to use this skill

Skill file

Mandu Guard

Mandu Guard는 아키텍처 규칙을 강제하는 시스템입니다.

레이어 간 의존성을 검사하고 위반을 실시간으로 감지합니다.

Agent Workflow Contract

This skill is a Domain addendum. It must not replace mandu-agent-workflow.

Use it only after mandu.agent.verify reports guard diagnostics or mandu.agent.plan selects the guard domain.

Canonical workflow step: verify -> repair.

Preferred MCP tools:

| Step | Tools |

|------|-------|

| plan | mandu.agent.plan |

| verify | mandu.agent.verify, mandu.guard.check, mandu.guard.explain |

| repair | mandu.agent.repair, mandu.guard.heal |

Allowed file edits:

Verification command:

mandu agent verify --changed --json --write

Common failures:

Repair path:

mandu agent repair --from .mandu/agent-verify.json --json

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Layer Rules | CRITICAL | guard-layer- |

| 2 | Presets | HIGH | guard-preset- |

| 3 | Validation | HIGH | guard-validate- |

| 4 | Configuration | MEDIUM | guard-config- |

Quick Reference

1. Layer Rules (CRITICAL)

2. Presets (HIGH)

3. Validation (HIGH)

4. Configuration (MEDIUM)

Mandu Preset Layers

Frontend (FSD)

app          # Top: app entry point
  ↓
pages        # Page components
  ↓
widgets      # Complex UI blocks
  ↓
features     # Feature units
  ↓
entities     # Business entities
  ↓
shared       # Shared utilities

Backend (Clean)

api          # Top: API entry point
  ↓
application  # Use cases
  ↓
domain       # Business logic
  ↓
infra        # Infrastructure (DB, external APIs)
  ↓
core         # Core utilities
  ↓
shared       # Shared

Validation Rules

| Rule ID | Description |

|---------|-------------|

| LAYER_VIOLATION | Layer dependency violation |

| GENERATED_DIRECT_EDIT | Direct edit of generated files |

| WRONG_SLOT_LOCATION | Wrong slot file location |

| SLOT_NAMING | Slot file naming rule violation |

| FORBIDDEN_IMPORT | Forbidden import (fs, child_process, etc.) |

Low-Level CLI Commands

Use these only when agent verify or agent repair asks for guard-specific detail:

mandu agent verify --changed --json --write
mandu guard arch --ci
mandu guard arch --preset fsd

How to Use

Read individual rule files for detailed explanations:

rules/guard-layer-direction.md
rules/guard-preset-mandu.md
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.