> ## Documentation Index
> Fetch the complete documentation index at: https://docs.augmentcode.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ticket → PR

> Turn a delegated ticket into a draft PR with Ticket Manager and PR Author.

## How it works

Start by delegating a ticket to Cosmos through the connected Linear agent, or by adding the configured delegation label in Jira or GitHub Issues.

Ticket Manager checks the problem, desired outcome, scope, and target repositories. If a specification is needed, it drafts one and waits for your explicit approval. Clear, bounded work can proceed without a specification.

Once the ticket is ready, PR Author implements the change, runs checks, and opens a **draft** linked to the ticket.

```mermaid theme={null}
flowchart TD
    ticket["👤 Human: delegate a ticket"] --> manager["🤖 Ticket Manager: check readiness"]
    manager -->|Specification needed| spec["🤖 Ticket Manager: draft a specification"]
    spec --> approval["👤 Human: review and approve specification"]
    approval --> manager
    manager -->|Ready| author["🤖 PR Author: implement, test, and open a draft"]
    author --> review["👤 Human: review draft and mark ready for review"]
    review -->|PR → Merge| next["Merged PR"]
    classDef human fill:#fff7ed,stroke:#c2410c,color:#7c2d12;
    class ticket,approval,review human;
```

You can also start PR Author directly with a task; if it needs a specification, your explicit approval is still required before implementation.

## Where you participate

* **Provide scope.** Describe expected behavior, acceptance criteria, constraints, and relevant evidence.
* **Approve a required specification.** Resolve open product questions and confirm what should be built.
* **Review the draft and mark it ready for review.** Inspect the change, test results, and limitations; successful CI does not publish the draft or mark it ready.

## Template Experts

* [Ticket Manager](/cosmos/experts-ticket-manager) checks readiness, delegates implementation, and keeps the ticket updated.
* [PR Author](/cosmos/experts-pr-author) implements, tests, opens a draft, and handles review feedback, failing checks, and merge conflicts.
* [Project Builder](/cosmos/experts-project-builder) helps when a larger requirement needs design or a ticket breakdown first.

## Set it up

1. **Connect your code host and tracker.** Follow the [Ticket Manager setup guide](/cosmos/experts-ticket-manager) for connector and tracker-specific delegation instructions.
2. **Complete setup with [Cosmos Advisor](/cosmos/advisor/overview).** Approve activation when prompted and confirm the automation is enabled.
3. **Delegate a ready ticket.** Use the configured delegation label or connected Linear agent. Follow the ticket's updates to the draft and review the result.

Example Advisor prompt:

> Set up Ticket Manager for \[ticket tracker] with code in \[code host]. Show me how to delegate tickets.

## Next step

Continue with [PR → Merge](/cosmos/software-factory/pr-to-merge) for review and follow-up.

## Further reading

* [How we built Augment's software factory](https://www.augmentcode.com/blog/beyond-ai-coding-agents-how-we-built-augments-software-factory)
* [Why bug fixing is the least important part of a bug-fixing software factory](https://igoro.com/archive/bug-fixing-software-factory/)
