Loading...
Loading...
Unified workflow orchestration for substantial tasks. Auto-detects complexity, defers to matching skills, or provides phase-based execution. Solves workflow conflicts between skills, loop mode, and CLAUDE.md.
npx skill4agent add alekspetrov/navigator nav-task-modeUser Request
↓
TASK MODE (this skill)
├─ Simple task? → Direct execution (no overhead)
├─ Skill matches? → Let skill run (it has workflow)
└─ Substantial, no skill? → Task Mode phases.agent/.nav-config.json{
"task_mode": {
"enabled": true,
"auto_detect": true,
"defer_to_skills": true,
"complexity_threshold": 0.5,
"show_phase_indicator": true
}
}enabledauto_detectdefer_to_skillscomplexity_thresholdshow_phase_indicatorpython3 functions/complexity_detector.py \
--request "{USER_REQUEST}" \
--context "{RECENT_CONTEXT}"IF complexity_score < threshold:
→ Direct execution (exit Task Mode)python3 functions/skill_detector.py \
--request "{USER_REQUEST}" \
--available-skills "{SKILLS_LIST}"IF matching_skill AND defer_to_skills:
→ Show: "Detected: {SKILL_NAME} skill will handle this"
→ Exit Task Mode (skill has workflow)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TASK MODE ACTIVATED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Task: {TASK_SUMMARY}
Complexity: {SCORE} (threshold: {THRESHOLD})
Skills matched: None (Task Mode will orchestrate)
Phases:
○ RESEARCH - Understand requirements
○ PLAN - Create implementation strategy
○ IMPL - Execute changes
○ VERIFY - Test and validate
○ COMPLETE - Commit and document
Starting RESEARCH phase...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━python3 functions/phase_indicator.py \
--phase "RESEARCH" \
--status "complete" \
--next "PLAN"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PHASE: RESEARCH → PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Research completed:
✓ Found {N} related files
✓ Identified patterns in {LOCATION}
✓ Dependencies mapped
Moving to PLAN phase...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TASK MODE COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Task: {TASK_SUMMARY}
Phases:
✓ RESEARCH - {DURATION}
✓ PLAN - {DURATION}
✓ IMPL - {DURATION}
✓ VERIFY - {DURATION}
✓ COMPLETE
Summary:
- {FILES_CHANGED} files changed
- {TESTS_ADDED} tests added
- Committed: {COMMIT_SHA}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━python3 functions/complexity_detector.py \
--request "Refactor the auth system to use JWT" \
--context "Working on user management"{
"complexity_score": 0.7,
"signals": {
"multi_file": true,
"planning_language": true,
"cross_system": false
},
"recommendation": "task_mode",
"reason": "Refactoring task with multi-file scope"
}python3 functions/skill_detector.py \
--request "Add a login component" \
--available-skills '["frontend-component", "backend-endpoint", "database-migration"]'{
"matching_skill": "frontend-component",
"confidence": 0.95,
"triggers": ["create component", "add component"],
"defer": true,
"reason": "Request matches frontend-component skill triggers"
}python3 functions/phase_indicator.py \
--phase "IMPL" \
--status "in_progress" \
--progress 60 \
--details '{"files_changed": 3, "tests_written": 2}'defer_to_skills: false| Aspect | Direct Execution | Task Mode | Loop Mode |
|---|---|---|---|
| Complexity | Low | Medium-High | High |
| Phase tracking | None | Visual phases | Strict phases |
| Iteration control | None | None | EXIT_SIGNAL |
| Skill coordination | None | Defers | Independent |
| Best for | Quick fixes | Features | Autonomous work |
User: "Fix the typo in README"
→ Complexity: 0.1 (below threshold)
→ Direct execution (no Task Mode overhead)User: "Create a UserProfile component"
→ Complexity: 0.6
→ Skill match: frontend-component (0.95 confidence)
→ Task Mode defers: "frontend-component skill will handle this"
→ Skill executes its own Step 1-7 workflowUser: "Refactor auth to use JWT instead of sessions"
→ Complexity: 0.8
→ Skill match: None
→ Task Mode activates
→ RESEARCH: Explore current auth implementation
→ PLAN: Document JWT migration steps
→ IMPL: Execute changes across files
→ VERIFY: Run tests, simplify code
→ COMPLETE: Commit, documentUser: "Run until done: implement user roles"
→ Loop Mode activated (explicit trigger)
→ Task Mode phases guide each iteration:
Iteration 1: RESEARCH phase
Iteration 2: PLAN + IMPL phases
Iteration 3: IMPL + VERIFY phases
Iteration 4: COMPLETE + EXIT_SIGNALTask Mode config not found in .nav-config.json.
Using defaults: auto_detect=true, threshold=0.5