Skip to content

Conversation

@sisyphus-dev-ai
Copy link
Collaborator

@sisyphus-dev-ai sisyphus-dev-ai commented Jan 9, 2026

Summary

Converts the DeepTutor-inspired structural improvements from PR #504 into a builtin skill called deep-tutor. This allows users to opt-in to these disciplined workflow patterns when needed, rather than changing Sisyphus's default behavior.

Original Inspiration: DeepTutor Repository

Repository: https://github.com/HKUDS/DeepTutor

DeepTutor is an AI-powered personalized learning assistant with sophisticated multi-agent architecture that coordinates specialized agents (RephraseAgent, DecomposeAgent, ManagerAgent, ResearchAgent, NoteAgent, ReportingAgent) across three phases: Planning → Researching → Reporting.

The Five Patterns Adapted from DeepTutor

1. Phase-Based Tool Selection Strategy

DeepTutor Source: research_agent.py#L113-L189

DeepTutor's _generate_tool_phase_guidance() creates explicit phase-based tool selection:

  • Phase 1: Basic Exploration (rag_hybrid, rag_naive)
  • Phase 2: Deep Mining (paper_search, web_search)
  • Phase 3: Completion (run_code)

Our Adaptation: Tool Selection Strategy by Phase

Early (Problem understanding) → grep, glob, read
Middle (Pattern discovery) → lsp_*, ast_grep
Late (Gap filling) → websearch, context7

With tool cost awareness: FREE → CHEAP → EXPENSIVE

2. Sufficiency Check Gate

DeepTutor Source: research_agent.py#L318-L371

DeepTutor's check_sufficiency() evaluates knowledge sufficiency before proceeding to next phase.

Our Adaptation: 5-checkpoint validation before implementation:

  • Context (3+ sources?)
  • Patterns (understand existing code?)
  • Dependencies (all imports identified?)
  • Edge Cases (considered?)
  • Scope (clearly defined?)

Requires 80% pass rate to proceed.

3. Iteration Limits (Per-Task Guardrails)

DeepTutor Source: research_agent.py#L38-L42

DeepTutor implements max_iterations with early termination when sufficient knowledge is gathered.

Our Adaptation: Hard limits to prevent infinite loops:

  • Max 3 fix attempts per task
  • Max 5 same-file edits
  • Max 2 consecutive failures
  • ~15 min time cap per task
  • Escalate to Oracle after limit exceeded

4. Request Type Classification

DeepTutor Source: Multi-agent architecture with specialized roles

DeepTutor assigns different agent types based on task requirements.

Our Adaptation: Request classification matrix with Min Parallel Calls:

  • Conceptual: 3+ parallel calls
  • Implementation: 4+ parallel calls
  • Debugging: 4+ parallel calls
  • Refactoring: 5+ parallel calls

NOT optional - under-exploration is a failure mode.

5. Dynamic Task Queue with State Management

DeepTutor Source: manager_agent.py

ManagerAgent manages DynamicTopicQueue with state transitions (pending → researching → completed).

Our Adaptation: Parallel execution strategy where explore/librarian agents fire simultaneously via background tasks, not sequentially.

What This Skill Provides

Users can invoke deep-tutor skill when they need structured, disciplined execution:

# Via skill tool
skill("deep-tutor")

# Via slash command
/deep-tutor

The skill enforces:

  • ✅ Request classification with minimum parallel calls
  • ✅ Cost-effective tool selection (FREE → CHEAP → EXPENSIVE)
  • ✅ 5-checkpoint sufficiency validation (80% threshold)
  • ✅ Iteration limits (max 3 attempts per task)

Design Decision

Instead of modifying Sisyphus's default behavior (which worried @code-yeongyu in PR #504), this implements these patterns as an opt-in builtin skill:

  • ✅ Sisyphus remains flexible by default
  • ✅ Users get DeepTutor discipline when they need it
  • ✅ No breaking changes to existing workflows
  • ✅ Best of both worlds

Files Changed

  • src/features/builtin-skills/deep-tutor/SKILL.md - Full skill template with all patterns and references
  • src/features/builtin-skills/skills.ts - Registered deep-tutor in builtin skills array

Testing

  • ✅ Typecheck passes
  • ✅ Build succeeds
  • ✅ No breaking changes to existing behavior
  • ✅ Proper DeepTutor citations and source code links

Related

Addresses #504 (by converting to builtin skill as requested by @code-yeongyu)


Co-authored-by: @gtg7784 (Taegeon Go)

Inspired by: DeepTutor - AI-powered personalized learning assistant

sisyphus-dev-ai and others added 2 commits January 9, 2026 07:04
Add deep-tutor skill that provides disciplined task execution with:
- Request classification matrix (min parallel calls)
- Tool selection strategy by phase (FREE → CHEAP → EXPENSIVE)
- Sufficiency check gate (5 checkpoints before implementation)
- Iteration limits (max 3 attempts per task)

These patterns prevent premature implementation and infinite loops
through systematic validation and cost-aware tool selection.

Inspired by PR #504 structural improvements.

Co-authored-by: Taegeon Go (Alan) <tae.gun7784@gmail.com>
Add deepTutorSkill to createBuiltinSkills() export array.

The skill is now available via skill tool and can be invoked
when users need structured, disciplined task execution.

Co-authored-by: Taegeon Go (Alan) <tae.gun7784@gmail.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Add comprehensive references section to deep-tutor skill with:
- Link to original DeepTutor repository (https://github.com/HKUDS/DeepTutor)
- Direct links to source code for each adapted pattern
- Clear attribution of the 5 key patterns from DeepTutor

This provides proper academic citation and allows users to explore
the original research that inspired these workflow patterns.

Co-authored-by: Taegeon Go (Alan) <tae.gun7784@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants