[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M759W6ZRXE9BMY46DM7N24PF":3,"skill-same:01M759W6ZRXE9BMY46DM7N24PF":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M759W6ZRXE9BMY46DM7N24PF","report-a-bug",null,"File a sanitized, intake-grade bug issue from a live Amicode session — auto-collected diagnostics, at least one question (accepts user follow-ups), confirm gate, silent dedup, pin-aware upstream check for the vendored engine. Use when the user hits a bug in Amicode (the extension, the run gate, the Run Inspector, vetted templates, the engine, or a toolchain package) and wants to report it.","harmoniqs\u002Famicode","harmoniqs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199011497?v=4","01M759PQCJ9Y093EC5HC3344DW","Harmoniqs","01M759PQD5S85W68FZKV3XD1X0",7,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Fskills\u002Freport-a-bug\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: report-a-bug\ndescription: File a sanitized, intake-grade bug issue from a live Amicode session — auto-collected diagnostics, at least one question (accepts user follow-ups), confirm gate, silent dedup, pin-aware upstream check for the vendored engine. Use when the user hits a bug in Amicode (the extension, the run gate, the Run Inspector, vetted templates, the engine, or a toolchain package) and wants to report it.\nagents: []\nsurface: public\n---\n\n# Report a Bug\n\n**Announce at start:** \"I'm using the report-a-bug skill to file this.\"\n\nFile an **intake-grade** bug issue from a live session. Capture stays cheap — auto-collected, sanitized diagnostics plus at least one user question — and readiness is earned later at review, per the **maturity contract** below. This skill is capture-only: it files intake issues and publishes the contract a reviewer matures them by. Feature ideas, designs, and specs are out of scope — a bug filer has a symptom, not a resolved design.\n\n**A skill-vs-reality conflict gets a second record.** If the bug is a skill instruction contradicting observed reality (a skill's API, path, or constant wrong), ALSO file or append a findings-ledger note (`amicode\u002Fskills-integrity\u002Ffindings\u002F`, personal vault): the GitHub issue and the finding are different records with different lifecycles — the issue tracks the fix, the finding tracks the drift.\n\n**The flow:** read the context envelope (when the session carries one) → classify the surface → capture (at least one question) → sanitize → dedup → upstream check (fork surfaces) → compose → confirm gate → file → print the filed sentinel. **Nothing posts before the confirm gate; the sentinel prints after any successful GitHub action (issue created OR comment posted).**\n\n## 0. Read the context envelope (when the session carries one)\n\nA bug session may carry a **context envelope** in its session metadata: a `bug_report` key with fields `project` (string, optional), `run_pointer` (string, optional), and `origin_session_id` (string, optional), written by the extension that spawned the session. **Read it first, silently — it precedes every context question and is never a user prompt.**\n\n- **Envelope present** → collect from the envelope *in place of* the live session: `project` seeds the step-1 surface classification; `run_pointer` (when present) is the run-id pointer for the step-2 diagnostics — platform\u002Ftier and the bounded log tail resolve locally through it. Never ask the user for run context the envelope already carries; the one content question (step 2) is still asked, unchanged. `origin_session_id` is local provenance for the session the bug came from — it is never posted.\n- **Envelope absent** → collect from the live session exactly as the steps below describe; behavior is unchanged.\n- **Pointer-only, always** — envelope run context travels as a pointer only: never expand `run_pointer` (or anything resolved through it) into absolute paths in any artifact, including the confirm-gate draft. Envelope content is already scrub-safe by construction; the step-3 sanitize pass applies to it unchanged.\n\n## 1. Classify the owning surface (silent — never a user prompt)\n\nDecide where the bug lives, from the session context:\n\n- **Product surfaces** — the extension, the run gate, the Run Inspector, the vetted templates → the public product repo (`harmoniqs\u002Famicode`).\n- **The vendored engine** (a fork-vendored component) → the fork repo (`harmoniqs\u002Fopencode`), and step 4's upstream check applies.\n- **A toolchain package** → its owning repo. Repo inference for toolchain packages runs on the **internal path only** (step 7); on the public path the filing lands in the product repo and triage re-routes.\n\n## 2. Capture — at least one content question, plus user-initiated follow-ups\n\nAsk the user directly, as plain text output: **\"What happened, and what did you expect?\"** Do not use the `question` tool — the bug dock handles the dialogue natively. Output the question as your message text and wait for the user's reply. Everything else is auto-collected or deferred to maturation review. Never ask follow-up questions yourself — gaps are the reviewer's job.\n\n**After this question, the user may send unsolicited follow-up messages** through the always-available textbox — additional context, clarifications, or corrections. Accept them silently (never ask another question) and fold them into the draft as extra detail. The user drives any follow-up; the agent never escalates.\n\n(The dedup-hit and upstream-hit offers and the confirm gate are gates, not content questions.)\n\n**Auto-collect, locally, held unposted until scrubbed:**\n\n- Extension version (`code --list-extensions --show-versions`, or the installed `harmoniqs.amicode-*` extension directory name) and OS (`uname -srm`).\n- The engine pin: `opencode.lock.json` under the installed extension directory — its `version`, `tag` (e.g. `v1.18.10-amicode.1`), and `repo`.\n- **When a run is active** (a solve this session, or the bug is about a run): platform and tier from the problem workspace (`~\u002F.amico\u002Fproblems\u002F\u003Cslug>\u002F` — `solvespec.json` \u002F `events.jsonl`), the **run-id pointer** (`runs\u002F\u003Clab>\u002F\u003CrunId>`, relative to `~\u002F.amico\u002F` — a pointer, never an absolute path), and a **bounded log tail** (last ~40 lines of that run's `run.log`). When the session carries the `bug_report` envelope (step 0), this run context comes from the envelope's `run_pointer` instead of live-session discovery — same pointer form, same bounded tail.\n- **Never collected:** absolute paths, binaries or screenshots, vault contents, and lab secrets (device frequencies, calibration values) — lab context travels as run-id pointers only.\n\n## 3. Sanitize — classify → scrub → compose\n\nSanitization is **architectural, not procedural**: the draft is built only from scrubbed material, so sensitive content is absent by construction rather than caught by review.\n\n1. **Classify the taint** of the collected material: does the failure context touch proprietary code (private paid packages, private exemplars) or lab secrets? **Doubt tilts proprietary.**\n2. **Scrub before any drafting.** Drop proprietary stack frames, symbols, source excerpts, and package names; lab secrets become run-id pointers. The scrub covers the auto-collected diagnostics **and the user's free-text answer**, and binds on every later search query (dedup, upstream) — a proprietary-flavored symptom never becomes a query string on a public tracker.\n3. **Compose** the draft only from scrubbed material.\n\nScrubbing is keyed to **content taint, not destination repo** — even a misrouted filing is a scrubbed filing. Proprietary diagnostics travel by pointer (the run id), never payload; the entitled reviewer follows the pointer locally. Marker wording differs by path (step 5 footer): public filings carry the bland `diagnostics: pointer-only`; internal filings may carry the explicit `sensitivity: proprietary-scrubbed`.\n\n## 4. Dedup + upstream check — silent unless they hit\n\nBoth are read-only searches with **scrubbed terms only**, run before drafting so their results feed the footer. Silent on no match. If `gh` is unavailable or unauthenticated, skip both checks silently — the browser fallback in step 7 still files, and the footer records no upstream claim.\n\n- **Dedup.** Search the target repo's open issues (`gh search issues --repo \u003Ctarget> --state open`). On a likely-match open issue, offer **comment-on-existing vs file-anyway** — the only conditional prompt besides the gates.\n- **Upstream check (fork-vendored surfaces only — today, the vendored engine).** The pin makes \"does the fix already exist upstream?\" mechanically decidable: parse the release tag's upstream base (`v\u003Cbase>-amicode.\u003Cn>` → `v\u003Cbase>` of `anomalyco\u002Fopencode`), then search upstream issues **and** PRs with scrubbed terms:\n  - **A matching merged fix** (merged PR \u002F closed-as-fixed issue) at a release newer than the vendored base → offer an **upstream-bump chore issue instead of the `BUG:` filing** (merge the newer upstream; never re-implement what upstream already fixed).\n  - **A matching open upstream issue** → file the intake bug normally, footer `upstream: anomalyco\u002Fopencode#N (open)` — maturation watches rather than implements.\n  - **No trace** → footer `upstream: none found`.\n\n## 5. Compose the intake issue\n\n**Title:** `BUG: \u003Cone-line symptom>`\n\n**Body:**\n\n```\n## Summary                      — one paragraph, from the scrubbed answer\n## Context                      — extension version, OS, engine base; what was happening\n## Expected vs actual           — the scrubbed expected\u002Factual pair\n\u003Cdetails>\u003Csummary>Diagnostics\u003C\u002Fsummary>\n\n- platform \u002F tier, run-id pointer (runs\u002F\u003Clab>\u002F\u003CrunId>) when a run is active\n- bounded, scrubbed log tail\n- no absolute paths, no binary uploads\n\n\u003C\u002Fdetails>\n\n---\nintake: not-ready — mature per the maturity contract before picking up\nsuggested_path: A | B\ndiagnostics: inline | pointer-only        (public path)\nsensitivity: proprietary-scrubbed          (internal path, when scrubbed)\nupstream: n\u002Fa | none found | sst\u002Fopencode#N (open)\n```\n\nThe `intake: not-ready` footer (plus the intake label\u002Fcolumn on the internal path) is what makes the issue **visibly not-ready**. `suggested_path` is the agent's maturity-path suggestion: `A` only when all four Path-A criteria below are clearly met from the filed diagnostics; **any uncertainty → `B`**; the human can veto it at the confirm gate.\n\n## 6. Confirm gate — nothing posts before it\n\nShow the user **the exact final body, the target repo, and the `suggested_path`** — the draft is already scrubbed, so nothing proprietary is displayed either. Tell the user, as plain text output: **\"The draft above is ready. Reply `file it` to submit as a new issue, `edit: \u003Cchanges>` to modify before filing, `comment: \u003Crepo>#\u003Cissue> \u003Ctext>` to add a clarifying comment to an existing issue, or `veto` to cancel.\"** Do not use the `question` tool. Wait for the user's reply. Never ask follow-ups — the confirm gate is a single prompt.\n\nOn answer: starts with \"file it\" → file exactly as drafted (step 7). Starts with \"edit:\" → incorporate the text after \"edit:\" and file (step 7). Starts with \"comment:\" → parse `\u003Crepo>#\u003Cissue> \u003Ctext>` (e.g. `comment: harmoniqs\u002Famicode#123 Thanks — confirmed on my end`), post the comment via `gh issue comment \u003Cissue> --repo \u003Crepo> --body \u003Ctext>`, then **print the sentinel on its own line exactly as**: `AMICODE_BUG_FILED https:\u002F\u002Fgithub.com\u002F\u003Crepo>\u002Fissues\u002F\u003Cnumber>` (the full URL of the issue you commented on — construct it from the repo and issue number), and end. Starts with \"veto\" → file nothing, no sentinel. **The sentinel prints after EVERY successful action — new issue OR comment. The only path that skips the sentinel is \"veto.\"** No issue, comment, or unscrubbed query leaves the machine before this gate.\n\n## 7. File — the runtime org-tail fork\n\nOne skill for every filer. The **org tail** (private-repo routing, board placement, intake labels) runs only when **both** hold at filing time; otherwise the public path runs:\n\n- **Checkout presence** — internal-surface skills are staged in the session's skill index (e.g. `write-an-issue` is resolvable). Checkout presence is the eligibility proof: internal skill content exists only in a private plugin checkout.\n- **Org access** — `gh auth status` succeeds and the org board is readable.\n\n**Public path (default).** File to the public product repo (`harmoniqs\u002Famicode`) with a `bug` label (resolve the label live; file without it if absent) and **no board placement**. Public filings always land there — even when the symptom points at a public toolchain package; triage re-routes. **No `gh` auth?** Fall back to opening a pre-filled new-issue URL in the browser (`https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fissues\u002Fnew?title=…&body=…`); URLs have a practical length limit, so truncate the diagnostics block and keep the run-id pointer. State plainly that standard (verified) filing requires `gh` — the browser fallback is a handoff, not a filing: it succeeds only if the browser opens AND the user submits the issue themselves.\n\n**Browser fallback failure (amicode#311).** If the browser open fails (the `open`\u002F`xdg-open` command exits non-zero, or no browser window appears), **do NOT print the sentinel** — no GitHub action succeeded, and the sentinel would archive the session over a report that never landed. Instead: say plainly that the browser fallback failed and **no issue was created**; keep the session open and interactive (the Amicode extension persists the bug session's transcript to disk and shows the user where, so nothing is lost — offer to retry once `gh` is available, or to file from the preserved copy); and wait for the user's direction. Never fabricate or guess an issue URL — an unverifiable link (`issues\u002Fcreated_by\u002F…`, a search URL, a constructed number) is worse than no link.\n\n**Internal path (org tail).** Route to the owning repo per step 1 (product surfaces → `harmoniqs\u002Famicode`; engine → `harmoniqs\u002Fopencode`; toolchain packages → their owning repos, including private ones — private-repo routing is the point of this path). File **unassigned**, with labels resolved live (`bug` plus an intake-flavored marker such as `intake`\u002F`triage` if it exists — never create labels; fall back to board-column-only marking). Then place the issue on the org SCRUM board (GitHub Projects, org `harmoniqs`, number `4`) in an **intake-flavored column**: read the live Status options (never hardcode), pick the option whose name matches intake\u002Ftriage, fall back to **Backlog**:\n\n```bash\n# a. live Status options → project id, field id, option ids\ngh api graphql -f query='query($org:String!, $num:Int!){ organization(login:$org){\n  projectV2(number:$num){ id field(name:\"Status\"){ ... on ProjectV2SingleSelectField {\n    id options { id name } } } } } }' -f org=harmoniqs -F num=4\n# b. add the issue → item id\ngh api graphql -f query='mutation($project:ID!, $content:ID!){ addProjectV2ItemById(\n  input:{projectId:$project, contentId:$content}){ item { id } } }' \\\n  -f project=\u003CPROJECT_ID> -f content=\u003CISSUE_NODE_ID>\n# c. set the Status column on the new item\ngh api graphql -f query='mutation($project:ID!, $item:ID!, $field:ID!, $opt:String!){\n  updateProjectV2ItemFieldValue(input:{ projectId:$project, itemId:$item,\n  fieldId:$field, value:{ singleSelectOptionId:$opt } }){ projectV2Item { id } } }' \\\n  -f project=\u003CPROJECT_ID> -f item=\u003CITEM_ID> -f field=\u003CSTATUS_FIELD_ID> -f opt=\u003COPTION_ID>\n```\n\n`\u003CISSUE_NODE_ID>` = `gh issue view \u003Cn> --repo \u003Ctarget> --json id --jq .id`. No status or assignee prompts — the intake defaults are fixed (intake column, unassigned).\n\n**The filed sentinel — the terminal contract.** This is a **lifecycle signal**, not a semantic judgment. Print it after ANY successful GitHub action in this session — new issue created, comment posted, chore filed — regardless of whether the content is a \"bug.\" The sentinel tells the dock \"you're done; show the end-state.\" Without it the dock stays open forever.\n\n- **After creating an issue via `gh`**: print `AMICODE_BUG_FILED \u003Curl>` with the new issue's URL, e.g.\n  `AMICODE_BUG_FILED https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fissues\u002F123`.\n- **After posting a comment via `gh issue comment`**: print `AMICODE_BUG_FILED https:\u002F\u002Fgithub.com\u002F\u003Crepo>\u002Fissues\u002F\u003Cnumber>` with the issue's URL.\n- **After the browser fallback**: print the sentinel carrying `filed-via-browser` — or the pre-filled new-issue URL as the token when one was opened. **Only after the browser actually opened** — a failed open is not a GitHub action (see the failure clause above): no sentinel, no invented token.\n\nThis line is a machine contract, not prose. The sentinel is **its own line** in your text output, the marker and its single token separated by a space, and nothing else on the line (no markdown, no backticks, no punctuation glued to the token). **Never print it before a successful GitHub action** — a veto means nothing was posted and no sentinel ever appears. The sentinel is the lifecycle trigger that archives the bug session; printing it without an action would archive a session whose report never reached GitHub.\n\n## The maturity contract (the reviewer-facing interface)\n\nIntake issues **mature in place** to ready-for-agent, through one of two paths delineated by bug shape:\n\n- **Path A (reviewer agent \u002F light review)** requires **all four** criteria: **(1)** deterministic repro from the filed diagnostics; **(2)** single owning surface; **(3)** no contract at stake; **(4)** the fix needs no design choice.\n- **Path B** is everything else: escalate to HITL through the design pipeline (brainstorming + a grilling skill). **Any uncertainty resolves to HITL** — the cost of misrouting is asymmetric.\n\n**Designation flow:** the agent suggests `suggested_path` at filing → the call is **re-checked against the four criteria at review** → the human holds a **veto at the confirm gate**. The whole flow tilts toward the human.\n\n**Exit format:** maturation rewrites the issue in place to the **bug-variant decision surface** — the canonical two-reader layout (`> [!IMPORTANT]` decision surface over execution detail), `BUG:` title prefix preserved. `write-an-issue` is the format authority for the exit state; it ships `surface: internal`, so only team reviewers execute maturation — never invoke it from this skill.\n\n**Footer fields** the reviewer consumes: `suggested_path`, the diagnostics marker (`diagnostics: pointer-only` \u002F `sensitivity: proprietary-scrubbed`), and the `upstream` status.\n\n**Two reviewer clauses:**\n\n- **Fork-surface upstream re-check.** For bugs on a fork-vendored surface, the reviewer re-checks upstream at review time. A fix landed since filing → close the bug as **fixed-by-upstream** and spawn the bump chore.\n- **Entitled review of scrubbed filings.** A proprietary-scrubbed filing cannot satisfy Path A's \"repro from the filed diagnostics\" without following the run-id pointer to full diagnostics — which correctly forces an entitled human to hold the review.\n\nUntil a reviewer-agent skill exists to execute maturation, humans mature intake issues.\n\n## Invariants\n\n- **At least one content question** at capture — the agent asks exactly one opening question and accepts unsolicited user follow-ups as additional context; never asks a second question itself. Everything else is auto-collected, a gate, or a conditional offer.\n- **Nothing posts before the confirm gate** — and the gate's draft is already scrubbed.\n- The **filed sentinel prints after any successful GitHub action** (issue created, comment posted, chore filed) — never before the confirm gate; a veto means no sentinel, ever. The sentinel is a lifecycle signal, not a semantic judgment about whether the content is a \"bug.\" **A failed browser fallback is not a GitHub action** — it never prints the sentinel and never ends the bug session (amicode#311).\n- **Envelope context is pointer-only** — `run_pointer` is never expanded into absolute paths in any artifact, including the confirm-gate draft; envelope absent → live-session collection, unchanged.\n- Intake issues are **visibly marked not-ready** (footer; label + column on the internal path).\n- **No proprietary implementation details or package names** in any artifact that leaves the machine — including the draft shown to the user.\n- **No lab secrets in payloads** — run-id pointers only.\n- The **org tail never runs** without both checkout presence and org access.\n- **Public searches carry scrubbed terms only** (dedup and upstream alike).\n\n## Composition\n\n- `write-an-issue` — the format authority for the maturity exit state (internal; not staged on public installs, and not invoked by this skill).\n- The design pipeline (`brainstorming` + a grilling skill) — the Path-B destination.\n- The idea hopper explicitly excludes bugs — this skill is why.\n","# Report a Bug\n\n**Announce at start:** \"I'm using the report-a-bug skill to file this.\"\n\nFile an **intake-grade** bug issue from a live session. Capture stays cheap — auto-collected, sanitized diagnostics plus at least one user question — and readiness is earned later at review, per the **maturity contract** below. This skill is capture-only: it files intake issues and publishes the contract a reviewer matures them by. Feature ideas, designs, and specs are out of scope — a bug filer has a symptom, not a resolved design.\n\n**A skill-vs-reality conflict gets a second record.** If the bug is a skill instruction contradicting observed reality (a skill's API, path, or constant wrong), ALSO file or append a findings-ledger note (`amicode\u002Fskills-integrity\u002Ffindings\u002F`, personal vault): the GitHub issue and the finding are different records with different lifecycles — the issue tracks the fix, the finding tracks the drift.\n\n**The flow:** read the context envelope (when the session carries one) → classify the surface → capture (at least one question) → sanitize → dedup → upstream check (fork surfaces) → compose → confirm gate → file → print the filed sentinel. **Nothing posts before the confirm gate; the sentinel prints after any successful GitHub action (issue created OR comment posted).**\n\n## 0. Read the context envelope (when the session carries one)\n\nA bug session may carry a **context envelope** in its session metadata: a `bug_report` key with fields `project` (string, optional), `run_pointer` (string, optional), and `origin_session_id` (string, optional), written by the extension that spawned the session. **Read it first, silently — it precedes every context question and is never a user prompt.**\n\n- **Envelope present** → collect from the envelope *in place of* the live session: `project` seeds the step-1 surface classification; `run_pointer` (when present) is the run-id pointer for the step-2 diagnostics — platform\u002Ftier and the bounded log tail resolve locally through it. Never ask the user for run context the envelope already carries; the one content question (step 2) is still asked, unchanged. `origin_session_id` is local provenance for the session the bug came from — it is never posted.\n- **Envelope absent** → collect from the live session exactly as the steps below describe; behavior is unchanged.\n- **Pointer-only, always** — envelope run context travels as a pointer only: never expand `run_pointer` (or anything resolved through it) into absolute paths in any artifact, including the confirm-gate draft. Envelope content is already scrub-safe by construction; the step-3 sanitize pass applies to it unchanged.\n\n## 1. Classify the owning surface (silent — never a user prompt)\n\nDecide where the bug lives, from the session context:\n\n- **Product surfaces** — the extension, the run gate, the Run Inspector, the vetted templates → the public product repo (`harmoniqs\u002Famicode`).\n- **The vendored engine** (a fork-vendored component) → the fork repo (`harmoniqs\u002Fopencode`), and step 4's upstream check applies.\n- **A toolchain package** → its owning repo. Repo inference for toolchain packages runs on the **internal path only** (step 7); on the public path the filing lands in the product repo and triage re-routes.\n\n## 2. Capture — at least one content question, plus user-initiated follow-ups\n\nAsk the user directly, as plain text output: **\"What happened, and what did you expect?\"** Do not use the `question` tool — the bug dock handles the dialogue natively. Output the question as your message text and wait for the user's reply. Everything else is auto-collected or deferred to maturation review. Never ask follow-up questions yourself — gaps are the reviewer's job.\n\n**After this question, the user may send unsolicited follow-up messages** through the always-available textbox — additional context, clarifications, or corrections. Accept them silently (never ask another question) and fold them into the draft as extra detail. The user drives any follow-up; the agent never escalates.\n\n(The dedup-hit and upstream-hit offers and the confirm gate are gates, not content questions.)\n\n**Auto-collect, locally, held unposted until scrubbed:**\n\n- Extension version (`code --list-extensions --show-versions`, or the installed `harmoniqs.amicode-*` extension directory name) and OS (`uname -srm`).\n- The engine pin: `opencode.lock.json` under the installed extension directory — its `version`, `tag` (e.g. `v1.18.10-amicode.1`), and `repo`.\n- **When a run is active** (a solve this session, or the bug is about a run): platform and tier from the problem workspace (`~\u002F.amico\u002Fproblems\u002F\u003Cslug>\u002F` — `solvespec.json` \u002F `events.jsonl`), the **run-id pointer** (`runs\u002F\u003Clab>\u002F\u003CrunId>`, relative to `~\u002F.amico\u002F` — a pointer, never an absolute path), and a **bounded log tail** (last ~40 lines of that run's `run.log`). When the session carries the `bug_report` envelope (step 0), this run context comes from the envelope's `run_pointer` instead of live-session discovery — same pointer form, same bounded tail.\n- **Never collected:** absolute paths, binaries or screenshots, vault contents, and lab secrets (device frequencies, calibration values) — lab context travels as run-id pointers only.\n\n## 3. Sanitize — classify → scrub → compose\n\nSanitization is **architectural, not procedural**: the draft is built only from scrubbed material, so sensitive content is absent by construction rather than caught by review.\n\n1. **Classify the taint** of the collected material: does the failure context touch proprietary code (private paid packages, private exemplars) or lab secrets? **Doubt tilts proprietary.**\n2. **Scrub before any drafting.** Drop proprietary stack frames, symbols, source excerpts, and package names; lab secrets become run-id pointers. The scrub covers the auto-collected diagnostics **and the user's free-text answer**, and binds on every later search query (dedup, upstream) — a proprietary-flavored symptom never becomes a query string on a public tracker.\n3. **Compose** the draft only from scrubbed material.\n\nScrubbing is keyed to **content taint, not destination repo** — even a misrouted filing is a scrubbed filing. Proprietary diagnostics travel by pointer (the run id), never payload; the entitled reviewer follows the pointer locally. Marker wording differs by path (step 5 footer): public filings carry the bland `diagnostics: pointer-only`; internal filings may carry the explicit `sensitivity: proprietary-scrubbed`.\n\n## 4. Dedup + upstream check — silent unless they hit\n\nBoth are read-only searches with **scrubbed terms only**, run before drafting so their results feed the footer. Silent on no match. If `gh` is unavailable or unauthenticated, skip both checks silently — the browser fallback in step 7 still files, and the footer records no upstream claim.\n\n- **Dedup.** Search the target repo's open issues (`gh search issues --repo \u003Ctarget> --state open`). On a likely-match open issue, offer **comment-on-existing vs file-anyway** — the only conditional prompt besides the gates.\n- **Upstream check (fork-vendored surfaces only — today, the vendored engine).** The pin makes \"does the fix already exist upstream?\" mechanically decidable: parse the release tag's upstream base (`v\u003Cbase>-amicode.\u003Cn>` → `v\u003Cbase>` of `anomalyco\u002Fopencode`), then search upstream issues **and** PRs with scrubbed terms:\n  - **A matching merged fix** (merged PR \u002F closed-as-fixed issue) at a release newer than the vendored base → offer an **upstream-bump chore issue instead of the `BUG:` filing** (merge the newer upstream; never re-implement what upstream already fixed).\n  - **A matching open upstream issue** → file the intake bug normally, footer `upstream: anomalyco\u002Fopencode#N (open)` — maturation watches rather than implements.\n  - **No trace** → footer `upstream: none found`.\n\n## 5. Compose the intake issue\n\n**Title:** `BUG: \u003Cone-line symptom>`\n\n**Body:**\n\n```\n## Summary                      — one paragraph, from the scrubbed answer\n## Context                      — extension version, OS, engine base; what was happening\n## Expected vs actual           — the scrubbed expected\u002Factual pair\n\u003Cdetails>\u003Csummary>Diagnostics\u003C\u002Fsummary>\n\n- platform \u002F tier, run-id pointer (runs\u002F\u003Clab>\u002F\u003CrunId>) when a run is active\n- bounded, scrubbed log tail\n- no absolute paths, no binary uploads\n\n\u003C\u002Fdetails>\n\n---\nintake: not-ready — mature per the maturity contract before picking up\nsuggested_path: A | B\ndiagnostics: inline | pointer-only        (public path)\nsensitivity: proprietary-scrubbed          (internal path, when scrubbed)\nupstream: n\u002Fa | none found | sst\u002Fopencode#N (open)\n```\n\nThe `intake: not-ready` footer (plus the intake label\u002Fcolumn on the internal path) is what makes the issue **visibly not-ready**. `suggested_path` is the agent's maturity-path suggestion: `A` only when all four Path-A criteria below are clearly met from the filed diagnostics; **any uncertainty → `B`**; the human can veto it at the confirm gate.\n\n## 6. Confirm gate — nothing posts before it\n\nShow the user **the exact final body, the target repo, and the `suggested_path`** — the draft is already scrubbed, so nothing proprietary is displayed either. Tell the user, as plain text output: **\"The draft above is ready. Reply `file it` to submit as a new issue, `edit: \u003Cchanges>` to modify before filing, `comment: \u003Crepo>#\u003Cissue> \u003Ctext>` to add a clarifying comment to an existing issue, or `veto` to cancel.\"** Do not use the `question` tool. Wait for the user's reply. Never ask follow-ups — the confirm gate is a single prompt.\n\nOn answer: starts with \"file it\" → file exactly as drafted (step 7). Starts with \"edit:\" → incorporate the text after \"edit:\" and file (step 7). Starts with \"comment:\" → parse `\u003Crepo>#\u003Cissue> \u003Ctext>` (e.g. `comment: harmoniqs\u002Famicode#123 Thanks — confirmed on my end`), post the comment via `gh issue comment \u003Cissue> --repo \u003Crepo> --body \u003Ctext>`, then **print the sentinel on its own line exactly as**: `AMICODE_BUG_FILED https:\u002F\u002Fgithub.com\u002F\u003Crepo>\u002Fissues\u002F\u003Cnumber>` (the full URL of the issue you commented on — construct it from the repo and issue number), and end. Starts with \"veto\" → file nothing, no sentinel. **The sentinel prints after EVERY successful action — new issue OR comment. The only path that skips the sentinel is \"veto.\"** No issue, comment, or unscrubbed query leaves the machine before this gate.\n\n## 7. File — the runtime org-tail fork\n\nOne skill for every filer. The **org tail** (private-repo routing, board placement, intake labels) runs only when **both** hold at filing time; otherwise the public path runs:\n\n- **Checkout presence** — internal-surface skills are staged in the session's skill index (e.g. `write-an-issue` is resolvable). Checkout presence is the eligibility proof: internal skill content exists only in a private plugin checkout.\n- **Org access** — `gh auth status` succeeds and the org board is readable.\n\n**Public path (default).** File to the public product repo (`harmoniqs\u002Famicode`) with a `bug` label (resolve the label live; file without it if absent) and **no board placement**. Public filings always land there — even when the symptom points at a public toolchain package; triage re-routes. **No `gh` auth?** Fall back to opening a pre-filled new-issue URL in the browser (`https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fissues\u002Fnew?title=…&body=…`); URLs have a practical length limit, so truncate the diagnostics block and keep the run-id pointer. State plainly that standard (verified) filing requires `gh` — the browser fallback is a handoff, not a filing: it succeeds only if the browser opens AND the user submits the issue themselves.\n\n**Browser fallback failure (amicode#311).** If the browser open fails (the `open`\u002F`xdg-open` command exits non-zero, or no browser window appears), **do NOT print the sentinel** — no GitHub action succeeded, and the sentinel would archive the session over a report that never landed. Instead: say plainly that the browser fallback failed and **no issue was created**; keep the session open and interactive (the Amicode extension persists the bug session's transcript to disk and shows the user where, so nothing is lost — offer to retry once `gh` is available, or to file from the preserved copy); and wait for the user's direction. Never fabricate or guess an issue URL — an unverifiable link (`issues\u002Fcreated_by\u002F…`, a search URL, a constructed number) is worse than no link.\n\n**Internal path (org tail).** Route to the owning repo per step 1 (product surfaces → `harmoniqs\u002Famicode`; engine → `harmoniqs\u002Fopencode`; toolchain packages → their owning repos, including private ones — private-repo routing is the point of this path). File **unassigned**, with labels resolved live (`bug` plus an intake-flavored marker such as `intake`\u002F`triage` if it exists — never create labels; fall back to board-column-only marking). Then place the issue on the org SCRUM board (GitHub Projects, org `harmoniqs`, number `4`) in an **intake-flavored column**: read the live Status options (never hardcode), pick the option whose name matches intake\u002Ftriage, fall back to **Backlog**:\n\n```bash\n# a. live Status options → project id, field id, option ids\ngh api graphql -f query='query($org:String!, $num:Int!){ organization(login:$org){\n  projectV2(number:$num){ id field(name:\"Status\"){ ... on ProjectV2SingleSelectField {\n    id options { id name } } } } } }' -f org=harmoniqs -F num=4\n# b. add the issue → item id\ngh api graphql -f query='mutation($project:ID!, $content:ID!){ addProjectV2ItemById(\n  input:{projectId:$project, contentId:$content}){ item { id } } }' \\\n  -f project=\u003CPROJECT_ID> -f content=\u003CISSUE_NODE_ID>\n# c. set the Status column on the new item\ngh api graphql -f query='mutation($project:ID!, $item:ID!, $field:ID!, $opt:String!){\n  updateProjectV2ItemFieldValue(input:{ projectId:$project, itemId:$item,\n  fieldId:$field, value:{ singleSelectOptionId:$opt } }){ projectV2Item { id } } }' \\\n  -f project=\u003CPROJECT_ID> -f item=\u003CITEM_ID> -f field=\u003CSTATUS_FIELD_ID> -f opt=\u003COPTION_ID>\n```\n\n`\u003CISSUE_NODE_ID>` = `gh issue view \u003Cn> --repo \u003Ctarget> --json id --jq .id`. No status or assignee prompts — the intake defaults are fixed (intake column, unassigned).\n\n**The filed sentinel — the terminal contract.** This is a **lifecycle signal**, not a semantic judgment. Print it after ANY successful GitHub action in this session — new issue created, comment posted, chore filed — regardless of whether the content is a \"bug.\" The sentinel tells the dock \"you're done; show the end-state.\" Without it the dock stays open forever.\n\n- **After creating an issue via `gh`**: print `AMICODE_BUG_FILED \u003Curl>` with the new issue's URL, e.g.\n  `AMICODE_BUG_FILED https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fissues\u002F123`.\n- **After posting a comment via `gh issue comment`**: print `AMICODE_BUG_FILED https:\u002F\u002Fgithub.com\u002F\u003Crepo>\u002Fissues\u002F\u003Cnumber>` with the issue's URL.\n- **After the browser fallback**: print the sentinel carrying `filed-via-browser` — or the pre-filled new-issue URL as the token when one was opened. **Only after the browser actually opened** — a failed open is not a GitHub action (see the failure clause above): no sentinel, no invented token.\n\nThis line is a machine contract, not prose. The sentinel is **its own line** in your text output, the marker and its single token separated by a space, and nothing else on the line (no markdown, no backticks, no punctuation glued to the token). **Never print it before a successful GitHub action** — a veto means nothing was posted and no sentinel ever appears. The sentinel is the lifecycle trigger that archives the bug session; printing it without an action would archive a session whose report never reached GitHub.\n\n## The maturity contract (the reviewer-facing interface)\n\nIntake issues **mature in place** to ready-for-agent, through one of two paths delineated by bug shape:\n\n- **Path A (reviewer agent \u002F light review)** requires **all four** criteria: **(1)** deterministic repro from the filed diagnostics; **(2)** single owning surface; **(3)** no contract at stake; **(4)** the fix needs no design choice.\n- **Path B** is everything else: escalate to HITL through the design pipeline (brainstorming + a grilling skill). **Any uncertainty resolves to HITL** — the cost of misrouting is asymmetric.\n\n**Designation flow:** the agent suggests `suggested_path` at filing → the call is **re-checked against the four criteria at review** → the human holds a **veto at the confirm gate**. The whole flow tilts toward the human.\n\n**Exit format:** maturation rewrites the issue in place to the **bug-variant decision surface** — the canonical two-reader layout (`> [!IMPORTANT]` decision surface over execution detail), `BUG:` title prefix preserved. `write-an-issue` is the format authority for the exit state; it ships `surface: internal`, so only team reviewers execute maturation — never invoke it from this skill.\n\n**Footer fields** the reviewer consumes: `suggested_path`, the diagnostics marker (`diagnostics: pointer-only` \u002F `sensitivity: proprietary-scrubbed`), and the `upstream` status.\n\n**Two reviewer clauses:**\n\n- **Fork-surface upstream re-check.** For bugs on a fork-vendored surface, the reviewer re-checks upstream at review time. A fix landed since filing → close the bug as **fixed-by-upstream** and spawn the bump chore.\n- **Entitled review of scrubbed filings.** A proprietary-scrubbed filing cannot satisfy Path A's \"repro from the filed diagnostics\" without following the run-id pointer to full diagnostics — which correctly forces an entitled human to hold the review.\n\nUntil a reviewer-agent skill exists to execute maturation, humans mature intake issues.\n\n## Invariants\n\n- **At least one content question** at capture — the agent asks exactly one opening question and accepts unsolicited user follow-ups as additional context; never asks a second question itself. Everything else is auto-collected, a gate, or a conditional offer.\n- **Nothing posts before the confirm gate** — and the gate's draft is already scrubbed.\n- The **filed sentinel prints after any successful GitHub action** (issue created, comment posted, chore filed) — never before the confirm gate; a veto means no sentinel, ever. The sentinel is a lifecycle signal, not a semantic judgment about whether the content is a \"bug.\" **A failed browser fallback is not a GitHub action** — it never prints the sentinel and never ends the bug session (amicode#311).\n- **Envelope context is pointer-only** — `run_pointer` is never expanded into absolute paths in any artifact, including the confirm-gate draft; envelope absent → live-session collection, unchanged.\n- Intake issues are **visibly marked not-ready** (footer; label + column on the internal path).\n- **No proprietary implementation details or package names** in any artifact that leaves the machine — including the draft shown to the user.\n- **No lab secrets in payloads** — run-id pointers only.\n- The **org tail never runs** without both checkout presence and org access.\n- **Public searches carry scrubbed terms only** (dedup and upstream alike).\n\n## Composition\n\n- `write-an-issue` — the format authority for the maturity exit state (internal; not staged on public installs, and not invoked by this skill).\n- The design pipeline (`brainstorming` + a grilling skill) — the Path-B destination.\n- The idea hopper explicitly excludes bugs — this skill is why.\n",{"name":5,"agents":24,"surface":25,"description":7},[],"public","main","bf84fdd4c1494800695bd5881702b3118dbf98be","packages\u002Fextension\u002Fskills\u002Freport-a-bug",2,"https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode","https:\u002F\u002Fgithub.com\u002Fharmoniqs","harmoniqs.ai","research tools, for researchers, by reseachers","2026-11-12 14:46:24",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add harmoniqs\u002Famicode --skill report-a-bug",{"tool":41,"command":42},"bunx","bunx skills add harmoniqs\u002Famicode --skill report-a-bug",{"tool":44,"command":45},"pnpm","pnpm dlx skills add harmoniqs\u002Famicode --skill report-a-bug","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Fskills\u002Freport-a-bug\u002FSKILL.md",true,[],[50,57,64,70,77,84],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M759XGHEQRJ1GWZTPRFF9Z1W","malformed","Frontmatter that parses as YAML but is missing the required name field.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fmalformed\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M759XDVQ1PYPMT876X8J21TQ","duplicated","Second skill carrying the duplicated frontmatter name.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fdup-two\u002FSKILL.md",[],[],{"skillNo":65,"name":59,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M759XBZYBHF38JDWSRHAC6E1","First skill carrying the duplicated frontmatter name.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fdup-one\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M759XAQBSP29BKTTXR1WF2D7","drifted","A skill whose API claims have drifted from the fixture packages.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fdrifted\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M759X8CNBPVK98C6M45D0QMB","clean","A clean skill whose every extracted claim resolves against the fixture packages.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fclean\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M759X73H6N2G0VDH8CJ5TF11","broken-paths","A skill with a broken relative link and a broken cited package path.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fbroken-paths\u002FSKILL.md",[],[]]