Documentation

Tenant OwnerReviewerOperator

Product knowledge base, playbooks, and embedded guidance for every persona.

🌟 Task Lifecycle

This page explains how work flows through CoffeeBreakAI—from the moment a task is created to the moment your pull request is complete and ready to merge.

CoffeeBreak automates the entire process, so you stay focused on building—not babysitting workflows.


1️⃣ Task Creation — Where Everything Begins

A task can be created in many ways:

  • ✨ Creating a new task directly in the CoffeeBreak UI
  • 📝 Assigning work to CoffeeBreakAI from a GitHub issue
  • 💬 Mentioning CoffeeBreakAI in a Jira comment
  • 🔁 Triggering refinement on a pull request
  • 📡 Receiving work from an integration such as Slack or Microsoft Teams
  • 🔄 Responding to reviewer feedback (CoffeeBreak automatically generates a follow-up task)
  • 🧑‍💻 Submitting work through the API or CLI
  • 💬 Starting a conversation with CoffeeBreakAI through the chat-based experience

Every task begins in a Pending state with metadata such as workspace, priority, trigger source, and contextual information.

Tasks can represent anything—feature development, analysis, testing, documentation, refactoring, or multi-step epic decomposition.


2️⃣ Smart Routing — Choosing the Right Agent

CoffeeBreak inspects each task and decides:

  • What kind of work it is
  • What context is needed
  • Which agent (or agents) are best suited
  • Whether priority or dependencies affect execution
  • Which workspace rules apply
  • What confidence threshold is required

Then CoffeeBreak automatically sends the task to the correct agent.

➡️ Learn more: Task Routing


3️⃣ Agent Execution — Work Happens Here 🤖

Once routed, an agent gets to work:

  • Reads the codebase
  • Pulls in documentation
  • Understands context and capability hints
  • Performs the requested work
  • Generates updates (code, tests, docs, analysis, PR changes)
  • Produces a confidence score
  • Creates or updates the pull request when appropriate

The task then moves to:

  • Completed,
  • Awaiting Review,
  • Failed, or
  • Retry Scheduled (for recoverable errors)

4️⃣ Confidence & Review Decision — Quality Gate ✔️

CoffeeBreak evaluates:

  • The agent’s confidence score
  • Workspace-defined confidence thresholds
  • Task type review rules (e.g., risky or critical tasks always get human review)
  • Whether CI/tests passed
  • Whether the error can be retried

Based on this, CoffeeBreak may:

  • ✅ Accept the result automatically
  • 🛑 Pause the task for human review
  • 🔁 Retry the task if the error is recoverable

This ensures quality stays high without slowing you down.


5️⃣ Review — AI + Human Collaboration

🤖 AI Reviewer (Automatic)

CoffeeBreak first runs an automated review pass:

  • Highlights risky code
  • Spots missing tests
  • Identifies logical issues
  • Suggests improvements
  • Reviews naming/style consistency

This reduces back-and-forth during human review.

🧑‍💼 Human Review (As Needed)

A reviewer can:

  • ✅ Approve the changes (task completes)
  • ✏️ Request updates
  • ❌ Reject with feedback (starting the refinement loop)

All your team’s rules—branch protections, required reviewers, CI checks—are respected by default.

➡️ More: Human Review


6️⃣ Refinement Loop — Polishing Until It’s Right 🔄

If feedback is left (from AI or a human), CoffeeBreak enters a refinement loop:

  1. Understands the requested changes
  2. Creates a follow-up task using TriggerSource.ReviewComment
  3. Routes to the appropriate agent
  4. Applies updates
  5. Refreshes the pull request
  6. Re-runs automated review
  7. Repeats as needed until approval

This loop continues automatically until the PR meets all requirements.

➡️ Deep dive: Refinement Loop


7️⃣ Completion — Done & Ready to Merge 🎉

A task is officially complete when:

  • All required reviewers approve
  • CI/tests pass
  • Merge requirements are satisfied
  • The PR is merged (or left ready-to-merge, depending on your settings)

Nothing ships until your rules say it's safe.

Terminal outcomes include:

  • Completed
  • Failed (after retries)
  • Cancelled

8️⃣ Full Task History — Everything Logged 🗂️

CoffeeBreak keeps a complete audit trail:

  • Agent outputs
  • Review comments (AI + human)
  • Refinements and retries
  • Confidence and decision logs
  • Metadata and timestamps
  • Final changes and PR links

You can inspect any task at any time—complete visibility, no black boxes.


📚 Related Topics