Writing Issues
Plans in this repository live as Markdown files on disk. gitea-planner reads that tree and mirrors it into Gitea: reserve claims milestone IDs and issue numbers, sync pushes titles, states, labels, assignees, dates, bodies, and dependency edges.
Use this document when turning planning notes, roadmap text, or milestone outlines into that tree. Two things make a plan file good. It has to be structurally valid, or the planner will not sync it. And it has to be readable, because the body is what someone actually works from.
The tree#
<root>/
|-- milestones/
| `-- <milestone-folder>/
| |-- _milestone.md
| `-- <issue>.issue.md
`-- tasks/
`-- <issue>.issue.md
Each milestone folder holds exactly one _milestone.md plus the issues belonging to that milestone. tasks/ holds issues with no milestone. Nothing else: no alternative folder names, no other extensions. A reusable template set uses this exact same layout as a live synced tree.
Names come from titles#
Slugify by lowercasing the title, replacing every non-alphanumeric character with -, collapsing repeats, and trimming the ends. An empty result becomes item.
| Title | Slug |
|---|---|
Repository Health Baseline |
repository-health-baseline |
CI/CD workflow validation |
ci-cd-workflow-validation |
R&D / AI: phase 1 |
r-d-ai-phase-1 |
Draft content uses the slug alone. Synced content prefixes it with the zero-padded 4-digit ID or number.
| Draft | Synced | |
|---|---|---|
| Milestone folder | repository-health-baseline/ |
0001-repository-health-baseline/ |
| Issue file | ci-cd-workflow-validation.issue.md |
0042-ci-cd-workflow-validation.issue.md |
Keep milestone titles unique within the repository, and issue titles distinct enough that their slugs stay stable and meaningful.
Milestone files#
Always _milestone.md, with YAML front matter delimited by ---:
---
title: Repository Health Baseline
state: open
---
title and state (open or closed) are what you write. id belongs only to milestones already reserved or pulled, so never invent one. due_on is optional, and extra keys such as template_id are fine as local metadata.
---
id: 1
title: Repository Health Baseline
state: open
due_on: 2026-05-14T23:59:59Z
template_id: baseline.milestone
---
Issue files#
Named <slug>.issue.md. The minimum is the same two fields:
---
title: CI/CD workflow validation
state: open
---
Everything the planner understands:
---
number: 42
title: CI/CD workflow validation
state: open
issue_key: ci-cd-validation
depends_on:
- repo-bootstrap
- 41
labels:
- baseline
- prio/p1
assignees:
- aeydr
milestone: Repository Health Baseline
milestone_id: 1
due_date: 2026-05-14T23:59:59Z
template_id: baseline.cicd
---
numberis only for issues already reserved or pulled. Never invent it, never renumber.issue_keyis local-only shorthand used by dependencies. Keep it kebab-case and unique repo-wide.labelsandassigneesare optional string lists.- Dates are ISO 8601 UTC:
2026-05-14T23:59:59Z. - Extra keys are allowed, but they do nothing remotely.
Where an issue lives decides its milestone#
This is the rule that breaks trees most often.
An issue that belongs to a milestone goes inside that milestone’s folder, where the sibling _milestone.md supplies the milestone. Omit milestone: there; it is redundant, and only worth adding when a human specifically wants to see it in the file.
An issue with no milestone goes under tasks/. Add milestone: with the exact milestone title only when a tasks/ issue has to attach to a milestone that already exists. milestone_id: is an override for when you already know the remote ID.
Dependencies#
depends_on is the only dependency field, and it syncs through Gitea’s native issue dependency API. Entries are local issue_key values, issue numbers, or both.
---
title: End-to-end validation
state: open
issue_key: e2e-validation
depends_on:
- publish-plan
- route-target-outputs
---
Multiple dependencies must be YAML list items or a real inline list such as [publish-plan, route-target-outputs]. Both depends_on: a, b and a single - a, b item parse as one nonsense dependency name. Do not invent alternate fields like blocks or after; the planner ignores them.
Priority#
Use at most one of prio/p0, prio/p1, prio/p2, prio/p3. An issue with no priority label is read as prio/p2. Every other label is passthrough metadata, since prio/* is the only scope the planner interprets.
The body#
The Markdown under the front matter is the description itself, with no wrapper or envelope around it. Write it so the meaning of the original plan survives without the plan sitting next to it. Sections that usually earn their place:
- Summary — what and why, in a sentence or two
- Scope — what this issue covers
- Acceptance criteria — how a reviewer confirms it is done
- Definition of done — checks, docs, artifacts
- Out of scope — what this deliberately does not touch
- Evidence — links, commands, references
Headings can vary, because compatibility depends on front matter and structure rather than prose. Where the source plan is thin, state the assumption in the body instead of inventing IDs, numbers, or other remote-only values.
House conventions: lowercase YAML keys, block lists over inline arrays, and an explicit state: open unless there is a real reason to start closed.
Draft mode and synced mode#
Draft and template content omits id and number and uses slug-only names. Synced content preserves the id and number it was given and carries the 4-digit prefix. Do not mix the two modes casually.
What actually reaches Gitea#
- Milestones:
id,title,state,due_on, and the body. - Issues:
number,title,state,labels,assignees,milestoneormilestone_id,due_date, the body, and dependency edges fromdepends_on.
issue_key never leaves disk, and extra front matter stays local without creating remote behaviour. pull writes numeric depends_on values back from remote dependency edges, and preserves an existing issue_key only when that issue number is already on disk. Other local-only metadata can be lost when files are later replaced from remote state.
Before syncing#
- Every milestone is a folder under
milestones/containing_milestone.md. - Every issue filename ends in
.issue.md. - No draft item invents an
idornumber, and any provided one appears as a 4-digit prefix on its folder or file. - Issues inside milestone folders omit
milestone:, and standalone issues live undertasks/. - Every
issue_keyis kebab-case and unique repo-wide. - Every
depends_onentry is a real local key or issue number, written as list items. - Front matter opens and closes with
---, keys are lowercase, and any dates are ISO 8601 UTC. - The body is plain Markdown with no custom wrapper.
Example#
milestones/
`-- repository-health-baseline/
|-- _milestone.md
|-- documentation-setup-and-cleanup.issue.md
|-- makefile-and-build-process-validation.issue.md
`-- ci-cd-workflow-validation.issue.md