--- name: report-issue description: > Files an issue on the Nerviz repository from inside a generated project, from a free description or from a lessons-learned file under `docs/lessons-learned/`. Picks the repository's own issue form, refuses a report with no evidence a maintainer can verify, warns when the project is behind the latest release, searches open duplicates, strips everything that identifies this project, and publishes only after an explicit confirmation. Explicit invocation only. argument-hint: "[description of the problem, or path to a docs/lessons-learned/*.md file]" disable-model-invocation: true allowed-tools: Read, Write, Glob, Grep, AskUserQuestion, Bash(curl:*), Bash(git ls-remote:*), Bash(java:*), Bash(gh auth status:*), Bash(gh issue list:*), Bash(gh issue create:*) model: opus effort: high --- # Report Issue The single door from a generated project to the Nerviz repository. A defect in a template, a norm or a hook shows up here first, but its fix belongs upstream: fixing it in this project fixes one project, fixing the owner fixes every project generated afterwards. This skill writes the report so that the owner can act on it — and so that the maintainer, who verifies every claim before accepting it, can find each one. **Entry rule: only the user files.** Nothing chains this skill. `/sonar-lessons` ends by printing the command that runs it; the user types it or doesn't. **Evidence rule: a report nobody can verify is not filed.** The meta-repository triages every issue skeptically — each claim is checked against its own code before anything changes. A claim with no file, no output and no way to reproduce it can only be closed as *needs evidence*, so this skill asks for what's missing before it writes anything. **Privacy rule: the issue carries the trace, never the project.** The Nerviz repository is public and this project may not be. The body names Sonar rule keys, counts, paths **inside `.claude/`**, commands and hook output only — never a path under `src/`, a package, a class name of this project, a code excerpt, the project key, a server URL, a hostname, or a credential. This skill is the only owner of that rule; every issue form's field descriptions repeat it per field. ## Why this is a skill (Form 2) and not an agent Form 2 because publishing on a public repository is a side effect the model must not trigger on its own — axis 2 of the design interview: the user types `/report-issue`, nothing chains it. The closest rejected form was keeping `sonar-lessons`' own publish step and writing a second one here; two publishers would hold two copies of the privacy rule and the duplicate search, and the first to change would leave the other filing the old way (invariant 2). Record: `@.claude/decisions/0103-issue-filing-and-skeptical-triage.md`. Runs on `opus`: deciding which form a free description fits, what evidence it lacks, and what in it identifies the project is the judgment this skill exists for. ## Procedure ### 1 · Read the input - **A path** under `docs/lessons-learned/` → read the whole file. A `sonar-NNN.md` written by `/sonar-lessons` goes to the `sonar-lessons` form at step 3; any other file is classified there like a description. - **Free text** → that is the description. - **Nothing** → ask for one of the two, once, and stop without an answer. ### 2 · Target and version 1. **Target** — the slug from `source.git_url` in `.claude/schemas/extensions.json` (`https://github.com//.git` → `/`). 2. **Version** — `.claude/.arch-provenance.json` gives `ref`, `commit` and `blueprint`. No stamp → stop: this is not a project generated or adopted from Nerviz, and the issue would have no version to be verified against. 3. **Behind?** — `git ls-remote --tags --sort=-v:refname ` and take the first tag. When `ref` is a tag and an older one, say so: the newer release may already carry the fix, and `/arch-adopt` pulls it. When `ref` is not a tag, compare `commit` with `git ls-remote HEAD`. Behind is a warning carried into the question of step 6, not a stop — the defect may still be open upstream. ### 3 · Pick the form Fetch the form the repository owns: `curl -sS https://raw.githubusercontent.com///HEAD/.github/ISSUE_TEMPLATE/
.yml`. | Input | Form | |---|---| | A `sonar-NNN.md` from `/sonar-lessons` | `sonar-lessons.yml` | | Something in `.claude/` behaves differently from what its own file says | `bug_report.yml` | | Something is missing, repetitive or silently wrong, and no file promises otherwise | `feature_request.yml` | Ambiguous between bug and feature → ask, naming what tips each way. The form is the single owner of the title prefix (`title:`), labels (`labels:`), the sections and what each may carry — read all four from it, never from this file. No answer from the fetch → stop: no issue is written from memory of a form. ### 4 · Evidence — ask once for what's missing, then stop What a maintainer needs to verify the report, by form: | Form | Required before writing | |---|---| | `bug_report.yml` | The entry point (command, skill, agent or hook mode) · the file in `.claude/` that promises the expected behavior, quoted · the actual output, literal · steps to reproduce | | `feature_request.yml` | One concrete occurrence of the problem — a run, an output, a file — not only the wish · what in `.claude/` was expected to cover it, or "nothing does" | | `sonar-lessons.yml` | Already in the file — `/sonar-lessons` wrote it. Skip this step | Read each item from the input first; for a bug, `java .claude/hooks/ArchHook.java doctor` fills the form's doctor field and often names the file at fault. Ask for every missing item in one `AskUserQuestion`. Still missing after the answer → stop, write nothing, and say which item would let the issue be verified. A guess written in the user's place is the claim the maintainer refutes first. ### 5 · Write the body `docs/lessons-learned/.issue.md`, where `` is the input file's base name (`sonar-NNN` → `sonar-NNN.issue.md`), or `issue-NNN` for a description — `NNN` the highest existing `issue-*.issue.md` plus one, `001` when there is none. One `###