Skip to main content

Sugar ๐Ÿฐ - A dev team that never stops. Delegate full tasks to AI in the background.

Project description

Sugar ๐Ÿฐ

A dev team that never stops.

Delegate full tasks to AI in the background. Sugar builds features, fixes bugs, and ships code while you focus on what matters.

What It Does

Think of Sugar as Claude Code with persistence. Instead of one-off interactions:

  • Continuous execution - Runs 24/7, working through your task queue
  • Delegate from Claude - Hand off tasks during interactive sessions
  • Builds features - Takes specs, implements, tests, commits working code
  • Fixes bugs - Reads error logs, investigates, implements fixes
  • GitHub integration - Creates PRs, updates issues, tracks progress
  • Smart discovery - Finds work from errors, issues, and code analysis

You plan the work. Sugar executes it.

Install

pip install sugarai

Or use uv (much faster):

uv pip install sugarai

Quick Start

# Initialize in your project
cd your-project
sugar init

# Add tasks to the queue
sugar add "Fix authentication timeout" --type bug_fix --urgent
sugar add "Add user profile settings" --type feature

# Start the loop
sugar run

Sugar will:

  1. Pick up tasks from the queue
  2. Execute them using Claude Code
  3. Run tests and verify changes
  4. Commit working code
  5. Move to the next task

It keeps going until the queue is empty (or you stop it).

Or delegate from Claude Code:

/sugar-task "Fix login timeout" --type bug_fix --urgent

Sugar picks it up and works on it while you keep coding.

Real Example

Simple tasks:

# Quick task creation
sugar add "Fix authentication timeout" --type bug_fix --urgent
sugar add "Add user profile settings" --type feature --priority 4

Complex tasks with rich context (recommended for best results):

sugar add "User Dashboard Redesign" --json --description '{
  "priority": 5,
  "type": "feature",
  "context": "Complete overhaul of user dashboard with modern UI/UX patterns",
  "business_context": "User feedback shows dashboard is confusing. Goal: reduce support tickets by 40%",
  "technical_requirements": [
    "React 18 with TypeScript",
    "Responsive design (mobile-first)",
    "Real-time data updates via WebSocket",
    "Accessibility compliance (WCAG 2.1 AA)"
  ],
  "agent_assignments": {
    "ux_design_specialist": "Design system and user flows",
    "frontend_developer": "Implementation and optimization",
    "qa_test_engineer": "Testing and validation"
  },
  "success_criteria": [
    "Dashboard loads in < 2 seconds",
    "Mobile responsive on all breakpoints",
    "Passes accessibility audit",
    "User testing shows 90%+ satisfaction"
  ],
  "requirements": [
    "Dark mode support",
    "Customizable widget layout",
    "Export dashboard data to PDF"
  ]
}'

Why JSON format? Rich context gives Claude Code everything it needs to build production-quality features autonomously. The more detail you provide, the better the results.

# Start autonomous mode
sugar run

# Check progress anytime
sugar status
sugar list --status completed

# Sugar handles:
# - Writing the code
# - Running tests
# - Making commits
# - Creating PRs (if configured)
# - Updating GitHub issues

Features

Task Management

  • Rich task context with priorities and metadata
  • Custom task types for your workflow
  • Queue management and filtering

Autonomous Execution

  • Specialized Claude agents (UX, backend, QA)
  • Automatic retries on failures
  • Quality checks and testing

GitHub Integration

  • Reads issues, creates PRs
  • Updates issue status automatically
  • Commits with proper messages

Smart Discovery

  • Monitors error logs
  • Analyzes code quality
  • Identifies missing tests
  • Auto-creates tasks from findings

How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    The Sugar Loop                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  You                    Priority Queue               Sugar
   โ”‚                          โ”‚                         โ”‚
   โ”‚  sugar add "task"        โ”‚                         โ”‚
   โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚                         โ”‚
   โ”‚                          โ”‚                         โ”‚
   โ”‚                          โ”‚  Picks highest priority โ”‚
   โ”‚                          โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
   โ”‚                          โ”‚                         โ”‚
   โ”‚                          โ”‚                         โ”‚
   โ”‚                     Claude Code                    โ”‚
   โ”‚                          โ”‚                         โ”‚
   โ”‚                          โ”‚  Executes in background โ”‚
   โ”‚                          โ”‚  (uses agents, tests)   โ”‚
   โ”‚                          โ”‚                         โ”‚
   โ”‚                          โ–ผ                         โ”‚
   โ”‚                     Completes Work                 โ”‚
   โ”‚                          โ”‚                         โ”‚
   โ”‚                          โ”‚  Commits, updates       โ”‚
   โ”‚                          โ”‚                         โ”‚
   โ”‚                          โ”‚  Back to queue โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚
   โ”‚                          โ”‚                         โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ†ป Repeat

The continuous execution loop:

  1. You assign - Add tasks with priorities and context
  2. Sugar picks up - Grabs highest priority work from the queue
  3. Claude Code executes - Runs in background, uses specialized agents as needed
  4. Completes work - Tests, commits, moves to next task
  5. Repeat - Continuous execution until queue is empty

Configuration

.sugar/config.yaml is auto-generated on sugar init. Key settings:

sugar:
  dry_run: false              # Set to true for testing
  loop_interval: 300          # 5 minutes between cycles
  max_concurrent_work: 3      # Parallel task execution

claude:
  enable_agents: true         # Use specialized Claude agents

discovery:
  github:
    enabled: true
    repo: "user/repository"
  error_logs:
    enabled: true
    paths: ["logs/errors/"]
  code_quality:
    enabled: true

Use Sugar from Claude Code

Sugar has native Claude Code integration! Delegate work to Sugar directly from your Claude sessions.

Install the Plugin

/plugin install cdnsteve/sugar

Note: If you see "Plugin not found in any marketplace", make sure you're using cdnsteve/sugar (the GitHub repository path).

Delegate Work from Claude

Inside a Claude Code session:

You: "I'm working on authentication but need to fix these test failures.
Can you handle the test fixes while I finish the auth flow?"

Claude: "I'll create a Sugar task for the test fixes so you can keep coding."

/sugar-task "Fix authentication test failures" --type test --urgent

Why this is powerful: Claude Code handles your interactive work while Sugar autonomously fixes the tests in the background. No context switching.

Example Workflow

You: "Found a memory leak in the cache module. Add it to the queue."

Claude:
/sugar-task "Fix memory leak in cache module" --json --description '{
  "priority": 5,
  "type": "bug_fix",
  "context": "Memory usage grows unbounded in production",
  "technical_requirements": ["Profile memory usage", "Add cleanup cycle"],
  "agent_assignments": {
    "tech_lead": "Investigate root cause and fix"
  }
}'

Task created! You can check progress with /sugar-status

Available Slash Commands

  • /sugar-task - Create tasks with rich context
  • /sugar-status - Check queue and progress
  • /sugar-run - Start autonomous mode
  • /sugar-review - Review pending tasks
  • /sugar-analyze - Analyze code for potential work

MCP Server Integration

Sugar provides an MCP server for integration with Goose, Claude Desktop, and other MCP clients.

Using with Goose:

# Via Goose CLI
goose configure
# Select "Add Extension" โ†’ "Command-line Extension"
# Name: sugar
# Command: npx -y sugarai-mcp

Using with Claude Desktop:

{
  "mcpServers": {
    "sugar": {
      "command": "npx",
      "args": ["-y", "sugarai-mcp"],
      "env": {
        "SUGAR_PROJECT_ROOT": "/path/to/your/project"
      }
    }
  }
}

Available MCP Tools:

  • createTask - Create development tasks
  • listTasks - List/filter tasks
  • viewTask / updateTask / removeTask - Manage tasks
  • getStatus - Get system metrics
  • runOnce - Execute one autonomous cycle

Requirements

Documentation

Advanced Usage

Custom Task Types

sugar task-type add deployment --name "Deployment" --emoji "๐Ÿš€"
sugar add "Deploy to staging" --type deployment

Complex Tasks with Context

sugar add "User Dashboard" --json --description '{
  "priority": 5,
  "context": "Complete dashboard redesign",
  "agent_assignments": {
    "ux_design_specialist": "UI/UX design",
    "frontend_developer": "Implementation",
    "qa_test_engineer": "Testing"
  }
}'

Multiple Projects

# Run Sugar on multiple projects simultaneously
cd /path/to/project-a && sugar run &
cd /path/to/project-b && sugar run &
cd /path/to/project-c && sugar run &

Troubleshooting

Sugar not finding Claude CLI?

# Specify Claude path in .sugar/config.yaml
claude:
  command: "/full/path/to/claude"

Tasks not executing?

# Check dry_run is disabled
cat .sugar/config.yaml | grep dry_run

# Monitor logs
tail -f .sugar/sugar.log

# Test single cycle
sugar run --once

Need help?

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

# Development setup
git clone https://github.com/cdnsteve/sugar.git
cd sugar

# Install with uv (recommended)
uv pip install -e ".[dev,test,github]"

# Or with pip
pip install -e ".[dev,test,github]"

# Run tests
pytest tests/ -v

# Format code
black .

License

MIT - see LICENSE and TERMS.md


Sugar v2.0.1 - Autonomous development for any project

โš ๏ธ Sugar is provided "AS IS" without warranty. Review all AI-generated code before use. See TERMS.md for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sugarai-2.2.0.tar.gz (125.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sugarai-2.2.0-py3-none-any.whl (121.9 kB view details)

Uploaded Python 3

File details

Details for the file sugarai-2.2.0.tar.gz.

File metadata

  • Download URL: sugarai-2.2.0.tar.gz
  • Upload date:
  • Size: 125.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sugarai-2.2.0.tar.gz
Algorithm Hash digest
SHA256 9595a74060ce5abf2468c98398e87a1358cfe6152fcf4e49272afb21d1fd7f2a
MD5 74321b2f1edcd88780437829b445ef6a
BLAKE2b-256 5e8ecf9a09066fdad45a77f19a9f45ae32d9da79e50073cb2db24351ba378fee

See more details on using hashes here.

Provenance

The following attestation bundles were made for sugarai-2.2.0.tar.gz:

Publisher: release.yml on cdnsteve/sugar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sugarai-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: sugarai-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 121.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sugarai-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45f8a6ba6fc487a818cc48d9cc6cea9f9aac3ba698e6bcd66396673b85eb33ca
MD5 005ff195e76da18594a261a1af64cb91
BLAKE2b-256 c85e0f4dae9f9c75658cc4190d4353096f6e8f3f17ea57d92ffaa2d0fa49861a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sugarai-2.2.0-py3-none-any.whl:

Publisher: release.yml on cdnsteve/sugar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page