--- name: write-issue description: Use when creating or drafting a GitHub issue, turning a bug, idea, request or audit finding into an issue, or checking whether an existing issue is ready to plan or build from. --- # Write an issue ## What this skill is for An issue is a **specification**. Someone who never saw your conversation must be able to plan and build from it without guessing. That means: - the problem is concrete, with real file names and real numbers; - every decision says who made it and when; - what is in scope and what is not is written down; - "done" can be measured. You will: collect facts, sort the open points, ask the owner, write the draft from a fixed template, show it, and only then file it on GitHub. To **check an existing issue** instead of writing one, do Step 1, then go straight to "Before you send" and answer every question about that issue. Report each "no" with what to add. ## How to follow this file 1. Do the steps in order, from Step 1 to Step 9. Do not skip a step. Do not change the order. 2. Each step has three parts: - **Do** — what to do. Commands are shown in code blocks. Replace every `` with the real value and remove the brackets. - **Check** — what must be true before you go on. - **If not** — what to do when the check fails. 3. When this file says **STOP**, stop working, send the message it gives, and wait for the answer. Do not go on until the person answers. 4. Never invent a fact. Every file name, line number, number, name and date you write must come from the person, the code, or a command you ran during this task. 5. When you cannot check a fact — no access to the repository, a command fails, the file does not exist — you may still write it if the person told you, but put `*(unverified: )*` right after it. Never write a number or a file path you made up. 6. The project's own rules win. If a file you read in Step 1 says something different from this file, do what the project says, and tell the person: `The project's rule "" replaced this skill's rule "".` 7. **Never** create the issue on GitHub until the person has seen the full draft and said yes (Step 8). 8. The examples in this file (numbers, copy, file names) only show the shape. Never reuse them as values for a real issue. ## Words used in this file | Word | Meaning | |---|---| | **owner** | The person who decides what is built. Step 1 shows how to find them. | | **owner's handle** | The owner's GitHub username, for example `reyxdz`. | | **bug** | Something that worked, or was meant to work, and does not. | | **feature** | Something new that people will be able to do. | | **technical issue** | A change users do not ask for directly: speed, size, cost, security, cleanup. A complaint like "the list is slow" is a technical issue. | | **owner question** | A question whose answer changes what users get, what it costs, or the risk. Step 4 lists them. | | **technical call** | A choice about how to build it, which you make yourself and write down. Step 4 lists them. | | **decision record (ADR)** | A short document, usually in `docs/decisions/` or `docs/adr/`, recording a choice that is expensive to undo. | | **expensive to undo** | Undoing it later would need a data migration, break users or other apps, cost money, or change a public URL or API. | | **sets a precedent** | It is the first of its kind in the project, and later work will copy it (the first paged list, the first file upload, the first background job). | | **copy** | Any text users will read: buttons, messages, errors, empty pages. | | **scratch folder** | A folder outside the repository for temporary files. Use the one your tool gives you (often called a scratchpad or temp folder). If it gives none: `/tmp/going-dark` on macOS and Linux, `%TEMP%\going-dark` on Windows. Create it if it is missing. | | **today** | Today's date as `YYYY-MM-DD`, from your environment. If you do not know it, ask. | ## Step 1 — Read the project **Do:** 1. List the project's rule files and read every one that exists: ``` git ls-files AGENTS.md CLAUDE.md GEMINI.md CONTRIBUTING.md .github/copilot-instructions.md "docs/explanation/*" "docs/guides/*" ``` 2. Read the issue templates, if any: ``` git ls-files ".github/ISSUE_TEMPLATE/*" ``` 3. Read the three most recent issues, to copy their style: ``` gh issue list --state all --limit 3 --json number,title,labels,body ``` 4. List the labels that exist: ``` gh label list ``` 5. List the decision records: ``` git ls-files "docs/decisions/*" "docs/adr/*" ``` 6. **Find the owner.** In the rule files, look for "owner", "maintainer", "only … merges". Also read `.github/CODEOWNERS` if it exists. If you find a GitHub handle, that is the owner's handle. If not, the owner is the person asking you; you will ask for their handle in Step 5. **Check:** you know the owner (or will ask), the labels, and the style of recent issues. **If not:** for each thing you could not read, note it. Anything you later write that depends on it gets `*(unverified: …)*`. ## Step 2 — Decide what kind of issue it is **Do:** pick exactly one, using the words table: **bug**, **feature** or **technical issue**. **Check:** you picked one, using the first rule that matches: 1. It was meant to work and does not ("broken", "never arrives", "error", "stopped working") → **bug**. 2. It works, but too slowly, too big, too costly, or needs cleaning up → **technical issue**. 3. People will be able to do something they cannot do now → **feature**. ## Step 3 — Collect the facts **Do:** 1. **Where in the code.** Find the exact file and line: ``` git grep -n "" ``` Write `file:line` from the output, for example `backend/src/routes/offers.ts:42`. If you cannot search the code, use what the person said, exactly as they said it ("near line 40", not ":40"), and add `*(unverified: code not read)*`. 2. **Numbers.** Write down every number the person gave (sizes, times, counts) **with its unit and where it was measured**, for example "2.4 MB for 50 offers, measured on staging". Do not round, change or add numbers. 3. **Decisions already made.** Note which decision records (from Step 1) are about this area. Note them by number and title. 4. **The real limits.** In the rule files, find what the project says about its users' devices, data, hosting, money and law. Note every limit that touches this issue. **Check:** every fact has a source: the person, a file and line, or a command output. ## Step 4 — Sort every open point into two lists **Do:** write down everything not yet decided. Put each point in **one** list using this table. | Owner questions — ask the owner | Technical calls — decide yourself | |---|---| | What is in scope and what is not | Library, framework or tool to use — first check whether the project already uses one (in the package file) | | A new or changed public URL, or what other apps send and receive | Function, file and variable names | | Any limit users notice: page size, file size, time limit, how many | Internal details other apps never see | | Any number in the Verify section (target size, target time) | Internal data formats and algorithms | | Every piece of copy (text users read) | How the code is organised | | What users see when something fails or is empty | How to test it | | Anything that costs money or uses users' data | Database indexes, query shape | | Anything that changes security or privacy | Defaults that users never see, and how the system behaves when it is set up wrong (for example refusing to start) | | Anything that breaks other apps or old clients | | | Anything expensive to undo | | For each **technical call**, write your choice and a one-line reason. For each **owner question**, prepare two to four options. Put the one you recommend first. For each option, write what it means and its cost or risk. For copy, write the exact text you propose as an option. **Check:** no owner question was moved to the technical list because it was easier. If you are not sure which list a point belongs in, it is an owner question. ## Step 5 — Ask the owner **Do:** 1. If your tool has a built-in way to ask questions with clickable options (in Claude Code, the AskUserQuestion tool), use it. Otherwise, send the questions as a message in exactly this format: ``` I need your decision on things before I write the issue. Q1. A.