# Issue tracker: ourforge

Issues and specs for this repo live on ourforge, a self-hosted hgforge instance: <https://ourforge.nullachtvierzehn.de/timo/mitch/issues/>. The forge's conventions for agents are at <https://ourforge.nullachtvierzehn.de/llms.txt>; read it when something here is unclear.

## Access

- **CLI**: `forge` (`tools/forge` in the hgforge sources), a client for issues and labels like `gh` or `glab`. It finds the repository from the `origin` remote of jj or git and reads the token from `HGFORGE_TOKEN` or from `forge auth login`. `forge --help` and `forge issue <command> --help` list the options; `--json` prints machine-readable output.
- **HTTP**: every page has a JSON or Markdown variant (suffix `.json` or `.md`), and writes are `POST`s with `Authorization: Bearer <token>`. Use this when `forge` is not installed or lacks an operation. Paths below are relative to `https://ourforge.nullachtvierzehn.de/timo/mitch`.
- **Token**: create one at <https://ourforge.nullachtvierzehn.de/settings/tokens/>, or with `forge auth login` over SSH. Agents have their own accounts (Settings → Agents).

## Conventions

- **Create an issue**: `forge issue create` (HTTP: `POST /issues/new` with `title` and `description`).
- **Read an issue**: `forge issue view <number>` (HTTP: `/issues/<n>.json`, comments included with `?include=comments`).
- **List issues**: `forge issue list` (HTTP: `/issues/.json` with `state=open|closed|all`, `label=<name>` (repeatable), `assignee=<user>|@me|none`, `child_of=<n>`, `blocked=yes|no`, `order=asc|desc`).
- **Comment on an issue**: `forge issue comment <number>` (HTTP: `POST /issues/<n>/comment` with `body`; reply in a thread with `in_reply_to=<entry id>`).
- **Apply / remove labels**: `forge issue edit` (HTTP: `POST /issues/<n>/action` with `action=label` or `action=unlabel` and `label`, repeatable; `action=relabel` with `remove` and `add` swaps labels in one step). Unknown label names refuse the whole request; maintainers create labels with `forge label create`.
- **Close / reopen**: `forge issue close <number>` / `forge issue reopen <number>`. Post the explanation as a comment first.
- **Links between issues**: `forge issue link` / `forge issue unlink` (HTTP: `POST /issues/<n>/action` with `action=link`, `kind=blocked_by|child_of|related|closed_by` and `target=#m` or `target=!m`).

Issues and merge requests share one number space: `#n` is an issue, `!n` a merge request.

Issues #1 and #2 were transferred from the former GitLab tracker with their numbers, so `Refs #n` in older commit messages still points to the right issue.

## Merge requests

This repo is developed with Jujutsu (`jj`); see `AGENTS.md`. Only maintainers push `main`. Every other bookmark pushed with `jj git push --bookmark <name>` is a draft stack under review. A merge request for a pushed topic is opened at `/mr/new?topic=<topic>` with `title` and `description`; `Closes #n` in the description links the issue. The `forge` CLI has no merge-request commands; use the web UI or the HTTP endpoints described in `llms.txt`.

## Merge requests as a triage surface

**MRs as a request surface: no.** _(Set to `yes` if this repo treats external merge requests as feature requests; `/triage` reads this flag.)_

When set to `yes`, MRs run through the same labels and states as issues: read them at `/mr/<n>/` (whole stack at `/mr/<n>/diff/`), list them at `/mr/`, and keep only MRs whose author is not a maintainer.

## When a skill says "publish to the issue tracker"

Create an ourforge issue.

## When a skill says "fetch the relevant ticket"

Run `forge issue view <number>`, or fetch `/issues/<n>.json?include=comments`.

## Wayfinding operations

Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.

- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body.
- **Child ticket**: an issue linked to the map with `kind=child_of`, `target=#<map>`, and labelled `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
- **Blocking**: a `kind=blocked_by` link to the blocking issue or merge request. A ticket is unblocked when every blocker is closed.
- **Frontier query**: `/issues/.json?state=open&child_of=<map>&blocked=no&assignee=none&order=asc`; the first result wins.
- **Claim**: `forge issue assign <n>` to yourself (HTTP: `action=assign`), the session's first write.
- **Resolve**: comment with the answer, close the issue, then append a context pointer (gist + link) to the map's Decisions-so-far.
