# Issues and use cases

> Issues with labels and milestones, linked to the use cases on your map.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://git.docs.sypnia.com/repos/issues-and-cases/

For agents: Issues: title, description, labels, assignees, milestones, comments; templates. Each issue can link one or more Cases use cases (field 'cases'); the Cases case shows its open issues. Commits link via trailer `Case: <id>`; pull requests aggregate. Kinds: bug in a case (the case exists), new case (becomes a Cases proposal), outside the plan (contract proposal). Without a Cases project, the field is free text.

Issues work as you know them: a title, a description, labels, assignees, milestones and comments. What Sypnia adds is the **use case**.

## Linking to the map

An issue says which use case it is about. The case in Cases then shows its open issues, next to its code, data and traces.

| The issue is…                           | What happens                                              |
| --------------------------------------- | --------------------------------------------------------- |
| a bug in a case that exists             | linked to that case                                       |
| a new thing people should be able to do | «Propose a case» opens a proposal in Cases                |
| outside the plan                        | it is marked so, and a change to the plan can be proposed |

## Commits and pull requests

A commit names its case with a trailer:

```text
Let customers cancel until 10 am

Case: cancel-order
```

Pull requests collect the cases of their commits. Without a Cases project, the trailer is still kept and readable by any tool.

## The history of a case

Because every commit names its case, you can read a repository's history by case: «Place an order changed three times this week», with who changed it, in which pull requests, and which of those changes are already in production.

- **In the browser**, a case's page in the repository lists its commits, pull requests and open issues, newest first.
- **From the terminal**, `npx @sypnia/git log --case place-order --since 7d` lists the same commits.
- **From the API**, [`GET /v1/repos/{owner}/{repo}/commits?case=place-order`](https://git.docs.sypnia.com/api#history-of-a-case).
- **In Cases**, the case shows the same history next to its data and its traces ([Cases and Git](https://cases.docs.sypnia.com/links/git)).
