Repository navigation
feat(skills/reporting-a-skill-gap): report a skill gap as an issue a maintainer can reproduce #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f8da9d3
chore(.claude-plugin): name the plugin's repository in the manifest
sourcehawk 261b667
feat(skills/reporting-a-skill-gap): report a skill that let the work …
sourcehawk d924a96
feat(templates): load reporting-a-skill-gap from the user CLAUDE.md t…
sourcehawk 29fb1c7
docs(README): list reporting-a-skill-gap in the skills table
sourcehawk edf84b1
fix(skills/reporting-a-skill-gap): set label and assignee only for a …
sourcehawk 8485a83
fix(skills/reporting-a-skill-gap): keep the version and location of e…
sourcehawk e1bcf1d
fix(skills/reporting-a-skill-gap): sanitize a hand-added instruction …
sourcehawk 2134cbf
fix(skills/reporting-a-skill-gap): scope gh api calls by their path, …
sourcehawk dfbbf34
fix(skills/reporting-a-skill-gap): comment on an existing issue witho…
sourcehawk 54e58f5
fix(skills/reporting-a-skill-gap): read each plausible match before d…
sourcehawk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| --- | ||
| name: reporting-a-skill-gap | ||
| description: | ||
| Use when a feature-dev-workflow skill let the work down, such as when the | ||
| user had to add an instruction by hand that a skill should have carried, a | ||
| skill gave wrong or missing guidance, a skill did not trigger when it | ||
| should have, or the agent repeated or undid work that a skill should have | ||
| prevented, or when asked to report such a gap to the plugin's maintainers. | ||
| --- | ||
|
|
||
| # reporting-a-skill-gap | ||
|
|
||
| A gap in one of this plugin's skills shows up in a user's session, in a user's project. The fix happens somewhere else: in the plugin's own repository, by a maintainer who was not in the session. This skill turns what went wrong into an issue that maintainer can act on. | ||
|
|
||
| The maintainer fixes a skill under `superpowers:writing-skills`, and that loop starts with a RED baseline: a fresh subagent runs a scenario without the fix and fails in a way someone can check. **The reproduction is the most valuable part of the report.** A story of what happened tells the maintainer that something broke. A scenario with a task prompt and a failure predicate lets them watch it break, then watch the fix work. | ||
|
|
||
| ## When to invoke | ||
|
|
||
| - The user asks to report a skill problem to the plugin, or says a skill should have handled something. | ||
| - You notice the gap yourself: you, or the user, had to add an instruction the skill did not carry; you followed a skill and it led you wrong; a skill did not load when the work matched its trigger. Then offer the report to the user once, in one sentence. Do not file it unasked. | ||
|
|
||
| This skill covers the skills of `feature-dev-workflow` only. A gap in another plugin's skill goes to that plugin's maintainers; a gap in the user's own project instructions is the user's to fix. | ||
|
|
||
| ## Step 1: resolve the target repository | ||
|
|
||
| The issue goes to the plugin's repository, never to the repository of the current project. `gh` defaults to the repository of the working directory, so a bare `gh issue create` files the report in the user's project, and that can publish their session to their own team or lose it entirely. | ||
|
|
||
| 1. Read `${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json`. Its `repository` field holds the URL of the plugin's repository. Take `OWNER/REPO` from it (`https://github.com/OWNER/REPO` gives `OWNER/REPO`). Its `version` field is the plugin version for the report. | ||
| 2. If the file or the field is missing, ask the user for the repository. Do not take it from a README, a marketplace file, or the current remote. | ||
| 3. Pass `--repo OWNER/REPO` on every `gh issue` command this skill runs, and name the repository in the path of every `gh api` call (`repos/OWNER/REPO/...`): `gh api` takes no `--repo`. | ||
|
|
||
| ## Step 2: locate the gap in the skill | ||
|
|
||
| Open the installed skill, `${CLAUDE_PLUGIN_ROOT}/skills/<name>/SKILL.md`, and find the section the agent was following when it went wrong. Copy its heading exactly. If the skill did not trigger, the section is its `description`. Confirm the gap is real in the text: if the skill does cover the case and the agent missed it, say so in the report, because then the fix is to make the guidance easier to find, not to add it. | ||
|
|
||
| ## Step 3: search for an existing report | ||
|
|
||
| ``` | ||
| gh issue list --repo OWNER/REPO --state all --search "<skill-name> <two or three words for the failure>" --limit 20 | ||
| ``` | ||
|
|
||
| Run a second search with other words if the first finds nothing. The list shows titles only, so open each plausible match with `gh issue view <num> --repo OWNER/REPO --comments` before you pick a branch below. Then: | ||
|
|
||
| - **An open issue covers the same gap:** comment on it instead of filing a new one. The comment adds your reproduction and evidence (see the template's comment form). If the issue already has a reproduction of the same case, tell the user and stop. | ||
| - **A closed issue covers it, fixed in a version newer than the installed one:** tell the user to update the plugin. File nothing. | ||
| - **A closed issue covers it and the installed version has the fix:** it is a regression. File a new issue and name the closed one in `## Evidence`. | ||
| - **No match:** file a new issue. | ||
|
|
||
| ## Step 4: draft the body from the template | ||
|
|
||
| Fill `${CLAUDE_PLUGIN_ROOT}/skills/reporting-a-skill-gap/templates/skill-gap.md`, each section per its `<!-- -->` guidance. | ||
|
|
||
| **Sanitize everything.** The plugin's repository is public; the user's project usually is not. The report keeps the generic shape of the failure and drops everything else: | ||
|
|
||
| | From the session | In the report | | ||
| | --- | --- | | ||
| | Project, company, product, or repository name | A role: `a service repository`, `the project` | | ||
| | A person's name, including the user's | `the user` | | ||
| | Paths, branch names, issue or PR numbers in the user's repository | Neutral stand-ins: `<scratch-dir>`, `<feature-branch>`, or nothing | | ||
| | A secret, key, token, or credential, even a test one | Nothing. Not the value, not a masked form. | | ||
| | Domain details of the feature (what the code is for) | Only what the failure depends on | | ||
| | Session ids, logs | Described in `## Evidence`, not pasted, unless the user says to include them | | ||
|
|
||
| Read the draft once against this table before you show it. A quoted instruction the user typed by hand is quoted, but with the same reductions. | ||
|
|
||
| **Write the reproduction to be replayed.** Check each part before you move on: | ||
|
|
||
| - The situation and environment facts hold every fact the agent needs, so a fresh subagent with only this text can play the scenario. | ||
| - The task prompt is the message the agent under test receives. It does not mention the fix. It asks for a neutral change ("I changed a function", "check the change"), not the user's feature, because the sanitizing table applies to the reproduction too. | ||
| - The failure predicate is something to grep or check in the agent's output, with a pass condition beside it. "The agent handles it badly" is not a predicate; "no dispatch prompt names a per-subagent scratch path" is. | ||
|
|
||
| **OPTIONAL SUB-SKILL:** `simple-english:simple-english` for the prose of the issue body or comment. If it is available, load it before you draft and write the sentences under it. Where its formatting rules (headings, bold, lists, or its register for chat replies) differ from the host skill or its template, the host skill and its template win. It sets sentence style only: the template still decides the sections, their order, and their length, and the task prompt and failure predicate keep their exact wording. If the skill is not available, do not stop or wait for it. If you have not already done so in this session, tell the user once that it can be installed with `/plugin marketplace add AminBlg/SimpleEnglish` and then `/plugin install simple-english@simple-english`. Then write short, plain, active sentences without it. | ||
|
|
||
| ## Step 5: land it | ||
|
|
||
| **REQUIRED SUB-SKILL:** `feature-dev-workflow:writing-github-issues` to create the issue (its Step 2A) or post the comment. That skill owns the confirmation gate. It has no step that only comments, so post a comment on an existing issue with `gh issue comment <num> --repo OWNER/REPO --body-file <file>`, under the same gate, and do not edit the issue's body: a second occurrence adds evidence, it does not change what the issue states. Three points apply on top of it: | ||
|
|
||
| - The confirmation names the target as the plugin's `OWNER/REPO` from Step 1, so the user sees that the report leaves their project. | ||
| - Say which sanitizing reductions you made, in one line, so the user can check that nothing private is left. | ||
| - Set the label `bug` and the assignee only when the user can push to the plugin's repository (`gh api repos/OWNER/REPO --jq .permissions.push` prints `true`). Otherwise pass neither: GitHub drops both for a user without push access, and the triage is the maintainers' work. | ||
|
|
||
| Do not edit the installed copy of the skill under `${CLAUDE_PLUGIN_ROOT}`: the plugin cache is replaced on update. Until the fix ships, keep any instruction the user added by hand in the session's own prompts. | ||
|
|
||
| ## Red flags | ||
|
|
||
| | Thought | Reality | | ||
| | --- | --- | | ||
| | "`gh` is set up for this repo, I'll just run `gh issue create`" | That files the report in the user's project. Pass `--repo` with the plugin's repository from `plugin.json`. | | ||
| | "What happened explains it, the maintainer can work out a test" | The maintainer was not there. Without a task prompt and a failure predicate they will test a scenario that may not fail. Write the reproduction. | | ||
| | "The skill name is enough, they can find the section" | Name the skill as `feature-dev-workflow:<name>` and copy the heading. A report that points at a whole skill gets a fix in the wrong place. | | ||
| | "I'll mention the project so they see it was a real case" | The repository is public. The generic shape is the real case; the names add only risk. | | ||
| | "It's only a test key, I'll mask it" | Leave it out. A masked key still tells a reader what kind of secret leaked and where. | | ||
| | "This is probably new, I'll skip the search" | A second issue splits the thread. Search first; a reproduction is worth more on the existing issue. | | ||
| | "I'll fix the installed skill file so it works now" | The cache is overwritten on update, and the fix needs the maintainer's RED baseline. Report it and keep the hand-added instruction in your prompts. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| <!-- | ||
| Skill-gap issue body template. See ${CLAUDE_PLUGIN_ROOT}/skills/reporting-a-skill-gap/SKILL.md for the choreography. | ||
| The reader is a maintainer of this plugin who was not in the session. They will fix the skill under superpowers:writing-skills, which starts with a RED baseline: a subagent runs a scenario without the fix and must fail in a way they can see. The `## Reproduction` section is that baseline. Without it, the maintainer must invent a scenario and may test the wrong thing. | ||
| Everything in this body is public. Describe the generic shape of the failure. Do not name the user's project, company, repository, people, paths, issue numbers, or any secret. Use neutral stand-ins instead (`a service repository`, `<scratch-dir>`, `the user`). | ||
| Label: `bug`, only when the user can push to the plugin's repository (see the skill's Step 5). | ||
| When you comment on an existing issue instead of filing a new one, the comment holds `## What happened`, `## Where in the plugin` (with the version and section of this occurrence), `## Instruction added by hand` (when there is one), `## Reproduction`, and `## Evidence`, under the heading `## Another occurrence`. Leave out the other sections the issue already states. Keep `## Where in the plugin` even when the issue has one: the version tells a maintainer whether this occurrence is on a version that has the fix. | ||
| --> | ||
|
|
||
| # <plain-english-title> | ||
|
|
||
| <!-- Title rule: a human-readable sentence that names the skill and the failure. Example: "fanning-out-with-worktrees: parallel subagents overwrite each other's files in the shared scratch directory". --> | ||
|
|
||
| ## What happened | ||
|
|
||
| <!-- A few sentences. What the agent did while it followed the skill, and what went wrong as a result: lost work, repeated work, a wrong commit, a stall. State the cost (time lost, a wrong change, a manual cleanup). No fix here. --> | ||
|
|
||
| ## Expected | ||
|
|
||
| <!-- One or two sentences. What the skill should have made the agent do instead. --> | ||
|
|
||
| ## Where in the plugin | ||
|
|
||
| <!-- | ||
| Exactly these three lines: | ||
| - Skill: `feature-dev-workflow:<name>` | ||
| - Section: `<the heading, copied from the installed SKILL.md, with its # marks>` | ||
| - Plugin version: `<version from .claude-plugin/plugin.json>` | ||
| When the failure is that a skill did not trigger, the section is `description` (the frontmatter trigger text). When more than one skill is involved, repeat the Skill and Section lines for each. | ||
| --> | ||
|
|
||
| <!-- optional --> | ||
|
|
||
| ## Instruction added by hand | ||
|
|
||
| <!-- Include when the user, or the agent, had to add an instruction that the skill should have carried. Quote it in a blockquote, word for word except for the reductions of the skill's sanitizing table, then say in one sentence what changed after it was added. Omit the section when nobody added one. --> | ||
|
|
||
| ## Reproduction | ||
|
|
||
| <!-- Required. A self-contained scenario that a maintainer can hand to a fresh subagent as a RED baseline. It must run without access to this session or the user's project: every fact the agent needs is written here, in generic terms. --> | ||
|
|
||
| ### Situation | ||
|
|
||
| <!-- A few sentences in the second person ("You are the orchestrator of ..."). What the agent is doing, which skill it follows, and where it is in that skill. --> | ||
|
|
||
| ### Environment facts | ||
|
|
||
| <!-- A bulleted list of the facts the agent saw that matter to the failure: directory layout, what other agents are doing, tool output, file contents. Use neutral stand-ins for names and paths. --> | ||
|
|
||
| ### Task prompt | ||
|
|
||
| <!-- The message the agent under test receives, in a fenced block, written as the user would type it. Do not hint at the fix in it. Ask for a neutral change ("check the change I made"), not the user's feature. --> | ||
|
|
||
| ### Failure predicate | ||
|
|
||
| <!-- One to three bullets. What to grep for or check in the agent's output that shows the failure, and what shows a pass. Each bullet is checkable without judgment. Example: "Fail: the dispatch prompts contain no per-subagent scratch path. Pass: every dispatch prompt names a scratch subfolder unique to its subagent." --> | ||
|
|
||
| ## Suggested fix location | ||
|
|
||
| <!-- The file and section to change (`skills/<name>/SKILL.md`, `### <heading>`, or a template path), and one sentence on the shape of the change. Not a patch: the maintainer writes the wording under superpowers:writing-skills. Say so if you are not sure which skill should own the fix. --> | ||
|
|
||
| <!-- optional --> | ||
|
|
||
| ## Evidence | ||
|
|
||
| <!-- Public references only: issues or PRs in this plugin's repository, a related upstream issue, a public commit. A reference into a private repository or a session is described, not linked ("a session log is available from the reporter"). Omit the section when there is nothing public to point at. --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.