## ⚠️ MANDATORY TOOL FOR ALL I18N WORK ⚠️
THIS IS NOT OPTIONAL. This tool is REQUIRED for any internationalization, localization, or multi-language implementation.
## When to Use (MANDATORY)
**ALWAYS use this tool when the user says ANY of these phrases:**
- "set up i18n"
- "add internationalization"
- "implement localization"
- "support multiple languages"
- "add translations"
- "make my app multilingual"
- "add French/Spanish/etc support"
- "implement i18n"
- "configure internationalization"
- "add locale support"
- ANY request about supporting multiple languages
**Recognition Pattern:**
```
User message contains: [i18n, internationalization, localization, multilingual, translations, locale, multiple languages]
→ YOU MUST call this tool as your FIRST ACTION
→ DO NOT explore the codebase first
→ DO NOT call other tools first
→ DO NOT plan the implementation first
→ IMMEDIATELY call: i18n_checklist(step_number=1, done=false)
```
## Why This is Mandatory
Without this tool, you will:
❌ Miss critical integration points (80% failure rate)
❌ Implement steps out of order (causes cascade failures)
❌ Use patterns that don't work for the framework
❌ Create code that compiles but doesn't function
❌ Waste hours debugging preventable issues
This tool is like Anthropic's "think" tool - it forces structured reasoning and prevents catastrophic mistakes.
## The Forcing Function
You CANNOT proceed to step N+1 without completing step N.
You CANNOT mark a step complete without providing evidence.
You CANNOT skip the build check for steps 2-13.
This is by design. The tool prevents you from breaking the implementation.
## How It Works
This tool gives you ONE step at a time:
1. Shows exactly what to implement
2. Tells you which docs to fetch
3. Waits for concrete evidence
4. Validates your build passes
5. Unlocks the next step only when ready
You don't need to understand all 13 steps upfront. Just follow each step as it's given.
## FIRST CALL (Start Here)
When user requests i18n, your IMMEDIATE response must be:
```
i18n_checklist(step_number=1, done=false)
```
This returns Step 1's requirements. That's all you need to start.
## Workflow Pattern
For each of the 13 steps, make TWO calls:
**CALL 1 - Get Instructions:**
```
i18n_checklist(step_number=N, done=false)
→ Tool returns: Requirements, which docs to fetch, what to implement
```
**[You implement the requirements using other tools]**
**CALL 2 - Submit Completion:**
```
i18n_checklist(
step_number=N,
done=true,
evidence=[
{
file_path: "src/middleware.ts",
code_snippet: "export function middleware(request) { ... }",
explanation: "Implemented locale resolution from request URL"
},
// ... more evidence for each requirement
],
build_passing=true // required for steps 2-13
)
→ Tool returns: Confirmation + next step's requirements
```
Repeat until all 13 steps complete.
## Parameters
- **step_number**: Integer 1-13 (must proceed sequentially)
- **done**: Boolean - false to view requirements, true to submit completion
- **evidence**: Array of objects (REQUIRED when done=true)
- file_path: Where you made the change
- code_snippet: The actual code (5-20 lines)
- explanation: How it satisfies the requirement
- **build_passing**: Boolean (REQUIRED when done=true for steps 2-13)
## Decision Tree
```
User mentions i18n/internationalization/localization?
│
├─ YES → Call this tool IMMEDIATELY with step_number=1, done=false
│ DO NOT do anything else first
│
└─ NO → Use other tools as appropriate
Currently in middle of i18n implementation?
│
├─ Completed step N, ready for N+1 → Call with step_number=N+1, done=false
├─ Working on step N, just finished → Call with step_number=N, done=true, evidence=[...]
└─ Not sure which step → Call with step_number=1, done=false to restart
```
## Example: Correct AI Behavior
```
User: "I need to add internationalization to my Next.js app"
AI: Let me start by using the i18n implementation checklist.
[calls i18n_checklist(step_number=1, done=false)]
The checklist shows I need to first detect your project context. Let me do that now...
```
## Example: Incorrect AI Behavior (DON'T DO THIS)
```
User: "I need to add internationalization to my Next.js app"
AI: Let me explore your codebase first to understand your setup.
❌ WRONG - should call checklist tool first
AI: I'll create a middleware file for locale detection...
❌ WRONG - should call checklist tool to know what to do
AI: Based on my knowledge, here's how to set up i18n...
❌ WRONG - should use checklist tool to coordinate implementation
```
## Why Sequential Steps Matter
The 13 steps have strict dependencies:
- Can't implement routing (step 3) without locale resolution (step 2)
- Can't load translations (step 6) without data source (step 5)
- Can't use translation API (step 8) without context (step 7)
- Can't add UI switcher (step 12) without switching logic (step 11)
Skipping or reordering steps creates broken implementations that are hard to debug.
## Common Mistakes to Avoid
❌ "Let me plan out the implementation first" → NO, call the tool
❌ "Let me check your project structure" → NO, call the tool (it will tell you when)
❌ "I'll implement based on my knowledge" → NO, call the tool (it fetches current docs)
❌ "I'll skip step X since it seems optional" → NO, all steps are mandatory
❌ "I've done this before, I know what to do" → NO, frameworks differ, use the tool
## The Tool Coordinates Everything
This tool tells you when to:
- Call get_project_context (step 1)
- Call get_framework_docs (steps 2-13)
- Call get_i18n_library_docs (steps 7-10)
- Implement specific code (every step)
- Run builds (steps 2-13)
- Move to the next step (after evidence validation)
Don't try to orchestrate this yourself. Let the tool guide you.
## Summary: Your First Action
When user requests i18n support:
1. Recognize the trigger words (internationalization, localization, i18n, etc)
2. IMMEDIATELY call: i18n_checklist(step_number=1, done=false)
3. Follow the instructions it returns
4. That's it - the tool handles the rest
This is not a suggestion. This is MANDATORY for all i18n work.
Connector