---
name: step-01-navigation
description: Generate navigation entity seeds using MCP scaffold_navigation
prev_step: steps/step-00-init.md
next_step: steps/step-02-permissions.md
---

# Step 1: Navigation Generation

## MANDATORY EXECUTION RULES

- ALWAYS use MCP `scaffold_navigation` tool - NEVER use templates
- NEVER generate code manually - let MCP handle it
- ALWAYS verify the output includes translations for 4 languages
- YOU ARE AN ORCHESTRATOR calling MCP, not a generator

## YOUR TASK

Call the SmartStack MCP `scaffold_navigation` tool to generate:
1. Navigation entity HasData() code
2. NavigationTranslation entries (4 languages)

---

## AVAILABLE STATE

From step-00-init:

| Variable | Description |
|----------|-------------|
| `{level}` | context, application, module, or section |
| `{code}` | kebab-case identifier |
| `{full_path}` | Complete navigation path |
| `{parent_path}` | Parent path (null for context) |
| `{labels}` | Object with fr, en, it, de |
| `{descriptions}` | Object with fr, en, it, de |
| `{icon}` | Lucide icon name |
| `{display_order}` | Numeric display order |

---

## EXECUTION SEQUENCE

### 1. Call MCP scaffold_navigation

```
Tool: mcp__smartstack__scaffold_navigation
Args:
  level: "{level}"
  code: "{code}"
  parentPath: "{parent_path}"  # Omit if level is "context"
  labels:
    fr: "{labels.fr}"
    en: "{labels.en}"
    it: "{labels.it}"
    de: "{labels.de}"
  descriptions:
    fr: "{descriptions.fr}"
    en: "{descriptions.en}"
    it: "{descriptions.it}"
    de: "{descriptions.de}"
  icon: "{icon}"
  displayOrder: {display_order}
```

### 2. Parse MCP Response

The tool returns:
- Navigation entity GUID (deterministic)
- HasData() code for NavigationXxxConfiguration.cs
- HasData() code for NavigationTranslationConfiguration.cs
- SeedData class template (optional)

### 3. Present Output to User

```markdown
## Navigation Seeds Generated

**Entity:** {level} - {code}
**GUID:** {generated_guid}
**Path:** {full_path}

### Files to Update

1. **{NavigationLevelConfiguration}.cs**
   [Show HasData code from MCP response]

2. **NavigationTranslationConfiguration.cs**
   [Show translation HasData code from MCP response]

### Recommended: Create SeedData Class

[Show SeedData class from MCP response]
```

### 4. Store Generated GUID

**CRITICAL:** Store the navigation entity GUID for use in step-02-permissions:

```
{navigation_guid} = [GUID from MCP response]
```

This GUID will be referenced when creating permissions.

---

## MCP RESPONSE HANDLING

### Success Case

If MCP returns successfully:
- Extract and display all HasData code
- Store `{navigation_guid}` for next step
- Proceed to step-02-permissions.md

### Error Case

If MCP call fails:
- Display error message
- Suggest manual alternatives
- Do NOT proceed automatically

---

## SUCCESS METRICS

- MCP scaffold_navigation called successfully
- Navigation entity GUID obtained
- HasData code displayed to user
- Translation code displayed (4 languages)
- Proceeded to step-02-permissions.md

## FAILURE MODES

- MCP call failed (display error, stop)
- Missing parent path for non-context level (return to step-00)
- Invalid level (return to step-00)

---

## NEXT STEP

After displaying navigation seeds, proceed to `./step-02-permissions.md`
