Intermediate

Creating Tasks for Jules

The quality of Jules' output depends heavily on how well you describe your task. Learn to write clear, actionable task descriptions that lead to high-quality pull requests.

Anatomy of a Good Task

A well-written task description gives Jules everything it needs to produce the right solution. Include these elements:

  1. Clear Objective

    State exactly what you want done. Be specific about the expected outcome, not just the problem.

  2. Context

    Explain why this change is needed, what the current behavior is, and what the desired behavior should be.

  3. Scope

    Define which files or components should be changed, and which should not be touched.

  4. Acceptance Criteria

    List specific conditions that must be true for the task to be considered complete.

Good vs Bad Task Examples

Bad Task:

"Fix the login bug."

This is too vague. Which login bug? What is the current behavior? What should happen instead? Which files are involved?

Good Task:

"Fix the login form validation bug where users can submit the form with an empty email field. The email input in src/components/LoginForm.tsx should show a validation error message when the field is empty and the user clicks Submit. Add a unit test in tests/LoginForm.test.tsx to verify this behavior."

Task Templates

Use these templates as starting points for common task types:

Bug Fix Template
## Bug Description
[What is broken and when does it occur?]

## Current Behavior
[What happens now?]

## Expected Behavior
[What should happen instead?]

## Steps to Reproduce
1. [Step 1]
2. [Step 2]
3. [Step 3]

## Files Involved
- src/components/MyComponent.tsx
- src/utils/helpers.ts

## Acceptance Criteria
- [ ] Bug is fixed
- [ ] Existing tests still pass
- [ ] New test added for the fix
Feature Request Template
## Feature Description
[What new functionality should be added?]

## Requirements
- [Requirement 1]
- [Requirement 2]
- [Requirement 3]

## Implementation Notes
[Any specific patterns, libraries, or approaches to use]

## Files to Create/Modify
- Create: src/features/newFeature.ts
- Modify: src/index.ts (add export)

## Acceptance Criteria
- [ ] Feature works as described
- [ ] Unit tests written and passing
- [ ] Follows existing code patterns

Providing Context

Jules reads your codebase, but additional context helps it make better decisions:

  • Link related issues: Reference other GitHub issues that provide background
  • Mention coding patterns: "Follow the same pattern used in UserService.ts"
  • Specify libraries: "Use the date-fns library for date formatting, not moment"
  • Note constraints: "Must be backward-compatible with the existing API"
  • Include error messages: Copy exact error text from logs or stack traces

Monitoring Progress

Once you assign a task, Jules provides real-time updates on its progress:

Status Meaning
Queued Task is waiting to be picked up by Jules
Analyzing Jules is reading the codebase and planning the approach
Implementing Jules is writing code changes
Testing Jules is running tests to validate the changes
PR Created A pull request is ready for your review
Failed Jules encountered an issue and could not complete the task

Reviewing Pull Requests

When Jules creates a pull request, treat it like any other PR from a team member:

  • Read the PR description: Jules explains what it changed and why
  • Review the diff: Check the code changes for correctness and style
  • Run the tests: Ensure all tests pass in your CI pipeline
  • Test manually: Verify the changes work as expected in your environment
  • Request changes: If something needs adjustment, comment on the PR and Jules may be able to iterate
Pro tip: Always review AI-generated code carefully before merging. Jules produces high-quality code, but human review ensures it meets your project's specific standards, handles edge cases, and integrates cleanly with the rest of the codebase.

💡 Try It: Write a Task Description

Pick a real bug or feature request from one of your projects. Write a task description using the templates above. Include a clear objective, context, scope, and acceptance criteria. Then assign it to Jules and observe the results.

Ready to Go Deeper?

Live instructor-led courses from our partners. Affiliate disclosure.