mentor-workflow
Mentor - Coaching Workflow Orchestrator
The mentor NEVER writes or modifies code files. It reads, analyzes, questions, and guides.
Input
Arguments passed from command: $ARGUMENTS
Step 1: Parse Arguments
CRITICAL: This workflow does NOT support --auto, --pr, --draft, --skip-simplify, --skip-review.
Mentoring is interactive by nature. The dev manages their own commits and PRs.
Step 2: Determine Mode
<mode_detection>
| Flag | Mode | Starting Step |
|---|---|---|
--free "..." |
FREE | 03-exploration (with description as context) |
--init |
INIT | 00-initialization (config only) |
--continue |
CONTINUE | 06-coach |
--refine-plan |
REFINE | 05-plan-validation |
--plan-only |
PLAN-ONLY | 00-initialization → ... → 05-plan-validation → STOP |
| (default) | INTERACTIVE | 00-initialization |
| </mode_detection> |
Step 3: Handle Free Mode Setup
<free_mode>
If --free flag is present:
1. Create Feature Directory
Generate a slug from the description (e.g., "ajouter un endpoint API" → free-endpoint-api):
mkdir -p .claude_resolve/{slug}
2. Initialize Status
Create .claude_resolve/{slug}/status.json:
{
"ticket_id": "{slug}",
"mode": "INTERACTIVE",
"workflow_type": "mentor",
"free_mode": true,
"free_description": "{user's description}",
"state": "initialized",
"started_at": "{ISO timestamp}",
"phases": {
"initialization": "completed",
"fetch": "skipped",
"analysis": "skipped"
},
"options": {
"base_branch": "{auto-detected or ask user}"
}
}
3. Create Ticket Equivalent
Save .claude_resolve/{slug}/ticket.md:
# Free Mode: {description}
## Description
{user's full description}
## Source
Free mode - no ticket
4. Detect Base Branch
Same logic as step 00-initialization (detect from git or ask user).
5. Skip to Step 03 (Exploration)
Jump directly to exploration with the free description as context. </free_mode>
Step 4: Load Current Step
<critical_paths>
IMPORTANT - Feature directory structure:
All workflow files are stored in .claude_resolve/{ticket-id}/:
status.json- Workflow state (MUST includeworkflow_type: "mentor")ticket.md- Ticket content (or free mode description)plan.md- Implementation planfinal-review.md- Pedagogical reviewretrospective.md- Learning summary
NEVER use docs/ for workflow files. Always use .claude_resolve/{ticket-id}/.
</critical_paths>
<read_only_rule> ABSOLUTE RULE - READ-ONLY:
The mentor workflow MUST NOT create or modify any code files. Allowed file operations:
- READ: Any file (code, config, tests, etc.)
- WRITE: Only files inside
.claude_resolve/{ticket-id}/(status, plan, review, retro) - BASH: Only for git diff, git status, running tests/lint (read operations)
FORBIDDEN: Write, Edit tools on any file outside .claude_resolve/
</read_only_rule>
<base_branch_rule> CRITICAL - Base Branch Usage:
All git diff operations MUST use the base branch from status.json.
See resolve-workflow SKILL.md for full base_branch_rule documentation.
</base_branch_rule>
Step Execution Flow
<step_flow>
Ticket Mode (INTERACTIVE)
00-initialization → 01-fetch-ticket → 02-analyze-complexity → 03-exploration
→ 04-create-plan → 05-plan-validation → STOP or /compact → 06-coach
→ 07-final-review → 08-retrospective
| ^
+-- /mentor --continue +
Free Mode
(free setup) → 03-exploration → 04-create-plan → 05-plan-validation
→ STOP or /compact → 06-coach → 07-final-review → 08-retrospective
CONTINUE Flow
(verify status, load context) → 06-coach → 07-final-review → 08-retrospective
REFINE Flow
(load context) → 05-plan-validation → STOP or /compact → 06-coach → ...
INIT Flow
00-initialization → STOP
PLAN-ONLY Flow
00-initialization → ... → 05-plan-validation → STOP
</step_flow>
Status Extension
When initializing or updating status.json, add mentor-specific fields:
{
"workflow_type": "mentor",
"coaching": {
"objective": null,
"current_phase": 0,
"current_task": 0,
"hint_levels": {},
"completed_tasks": [],
"skipped_tasks": []
}
}
Step Files
| Step | Location | Description |
|---|---|---|
| 00 | resolve-workflow/steps/ | Setup, config, feature directory |
| 01 | resolve-workflow/steps/ | Retrieve ticket, Figma URLs |
| 02 | resolve-workflow/steps/ | Score complexity |
| 03 | resolve-workflow/steps/ | Explore codebase |
| 04 | resolve-workflow/steps/ | Generate implementation plan |
| 05 | mentor-workflow/steps/ | Ask objective + validate/refine plan |
| 06 | mentor-workflow/steps/ | Coaching loop (CORE) |
| 07 | mentor-workflow/steps/ | Final pedagogical review |
| 08 | mentor-workflow/steps/ | Retrospective and learning summary |
Mentor Agent
Load the mentor persona from ~/.claude/agents/mentor-agent.md before step 06.
This defines the coaching tone, principles, and adaptation rules.
Error Handling
Language
All user communication in French. Technical output (git, code, files) in English.
NOW
Begin workflow for: $ARGUMENTS
More from nicolas-codemate/claudecodeconfig
architect
Software architecture skill for designing high-quality implementation plans. Provides universal patterns, quality checklists, and architectural guidelines. Use during planning phase to ensure plans are well-structured, atomic, and follow best practices.
25pr-info
>-
1aep
Analyse-Explore-Plan methodology for thorough analysis and planning before development. Use when starting a new feature, investigating a problem, or needing to understand a codebase before making changes. Provides structured workflow with parallel exploration agents and clarification questions. Integrates with Architect skill for high-quality implementation plans.
1create-pr
>-
1analyze-ticket
Skill for analyzing ticket complexity and determining required workflow phases. Uses scoring system to classify tickets as SIMPLE, MEDIUM, or COMPLEX, which determines exploration depth and planning approach.
1mcp-tool-creator
>-
1