+
Skip to content

Conversation

Angelmmiguel
Copy link
Contributor

@Angelmmiguel Angelmmiguel commented Oct 14, 2025

Refactor the task execution system to use the rover-agent package as the workflow runner. This change replaces the previous bash-based setup scripts with a structured YAML workflow system that provides better maintainability, error handling, and status tracking.

In the future, users will be able to edit and create their own workflows.

Closes #217

Changes

  • Added rover-agent package installation to Docker image build process with multi-stage build
  • Created unified entrypoint.sh script that handles agent installation, MCP server configuration, and workflow execution
  • Implemented YAML-based workflow system (swe.yml) with structured steps for research, planning, implementation, and review
  • Added template variable support using pupa library for dynamic workflow configuration
  • Enhanced runner.ts with output directory support for moving workflow artifacts
  • Improved error handling and authentication detection in agent execution
  • Updated Docker build workflow to use monorepo root as build context

Notes

I built the rover-agent CLI directly during the container image build. It means we are not effectively versioning this CLI tool for now and relay on the container version. We will revisit this.

Example output

rover logs -f 62
Task 62 Logs
├── Title: Update AGENTS.md to reflect current project architecture
└── Iteration: #1

Execution Log

Following logs... (Press Ctrl+C to exit)

=======================================
🚀 Rover Task Execution Setup
=======================================
Task Title: Update AGENTS.md to reflect current project architecture
Task ID: 62
Task Iteration: 1
=======================================

📦 Installing Agent CLI and setting up credentials
Agent Installation
├── Agent: claude
└── Version: latest

Validating Credentials
✓ All required credential files found

Installing Claude CLI
├── Version: latest
└── Command: npm install -g @anthropic-ai/claude-code@latest

added 12 packages in 3s

11 packages are looking for funding
  run `npm fund` for details
✓ Claude CLI installed successfully

Copying Claude credentials
├── Target directory: /home/node/.claude
├── Processing .claude.json
├── Copied: .claude.json (projects cleared)
└── Copied: .credentials.json
✓ Claude credentials copied successfully

✓ Installation completed successfully
✅ claude was installed successfully.

📦 Done installing agent

📦 Installing MCP servers
MCP Server to install
├── Agent: claude
├── MCP Name: package-manager
├── MCP Command or URL: http://127.0.0.1:8090/mcp
└── MCP Transport: http

- Checking agent
✔ Installation completed successfully

📦 Done installing MCP servers

👤 Removing privileges after completing the setup!

=======================================
🚀 Running Workflow
=======================================
Agent Workflow
├── Name: swe
└── Description: Complete software engineering workflow with adaptive complexity handling

User inputs
├── title='Update AGENTS.md to reflect current project architecture'
└── description='Review the packages/ directory to identify all current packages and update AGENTS.md (referenced as CLAUDE.md in the codebase) to include missing packages that were added as the project evolved. Ensure the repository structure, package-specific commands, architecture descriptions, and file patterns sections accurately reflect all packages present in the monorepo. This will help AI agents understand the complete project structure when working with the codebase.'

Steps
├── 0. Context Analysis
├── 1. Planning
├── 2. Implementation
├── 3. Code Review
├── 4. Apply Review Fixes
└── 5. Summary

🤖 Running Context Analysis > claude
✓ Step 'Context Analysis' completed successfully

📊 Step Results: Context Analysis
├── ID: context
├── Status: ✓ Success
├── Duration: 28.58s
└── Outputs:
    ├── complexity: simple
    ├── context_file: /output/context.md
    └── context_file_content: # Context...

🤖 Running Planning > claude
✓ Step 'Planning' completed successfully

📊 Step Results: Planning
├── ID: plan
├── Status: ✓ Success
├── Duration: 34.46s
└── Outputs:
    ├── plan_file: /output/plan.md
    └── plan_file_content: # Implementation Plan...

🤖 Running Implementation > claude
✓ Step 'Implementation' completed successfully

📊 Step Results: Implementation
├── ID: implement
├── Status: ✓ Success
├── Duration: 108.46s
└── Outputs:
    ├── changes_file: /output/changes.md
    └── changes_file_content: # Implementation Changes...

🤖 Running Code Review > claude
⚠️  Expected file 'review.md' was not created
✓ Step 'Code Review' completed successfully

📊 Step Results: Code Review
├── ID: review
├── Status: ✓ Success
├── Duration: 6.93s
└── Outputs:
    ├── skipped: true
    ├── issues_found: false
    └── review_file: [File not created]

Prompt Template Warnings:
└── File '[File not created]' does not exist

🤖 Running Apply Review Fixes > claude
⚠️  Expected file 'review_fixes.md' was not created
✓ Step 'Apply Review Fixes' completed successfully

📊 Step Results: Apply Review Fixes
├── ID: apply_review
├── Status: ✓ Success
├── Duration: 18.17s
└── Outputs:
    ├── fixes_applied: false
    └── review_fixes_file: [File not created]

Prompt Template Warnings:
└── Step 'implementation' has not been executed yet

🤖 Running Summary > claude
✓ Step 'Summary' completed successfully

📊 Step Results: Summary
├── ID: summary
├── Status: ✓ Success
├── Duration: 14.44s
└── Outputs:
    ├── summary_file: /output/summary.md
    └── summary_file_content: # Implementation Summary...

🎉 Workflow Execution Summary
├── Duration: 211.04s
├── Total Steps: 6
├── Successful Steps: 6
├── Failed Steps: 0
├── Skipped Steps: 0
└── Status: ✓ Workflow Completed Successfully

=======================================
🔧 Recovering permissions...
=======================================
✅ Permissions recovered

✓ Log following completed

@Angelmmiguel Angelmmiguel self-assigned this Oct 14, 2025
@Angelmmiguel Angelmmiguel added this to the v1.2 milestone Oct 14, 2025
Copy link
Contributor

@ereslibre ereslibre left a comment

Choose a reason for hiding this comment

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

Much more clean! Thanks :) LGTM, although I didn't try it out, I can run some smoke tests tomorrow to double check.

Comment on lines +464 to +465
// Avoid using fs.rename or fs.renameSync here as it will fail when they are
// in different partitions (common for docker mounted folders).
Copy link
Contributor

Choose a reason for hiding this comment

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

🤯

@Angelmmiguel
Copy link
Contributor Author

@ereslibre I merged the main changes (6f3d7c2) into the branch.

@Angelmmiguel Angelmmiguel merged commit a27c125 into main Oct 16, 2025
4 checks passed
@Angelmmiguel Angelmmiguel deleted the 217/integrate-agent branch October 17, 2025 12:32
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.

Integrate @endorhq/agent package into Rover CLI

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载