Skip to content

Commit 4c3e5e4

Browse files
sourcehawkclaude
andauthored
feat(skills/reporting-a-skill-gap): report a skill gap as an issue a maintainer can reproduce (#79)
* chore(.claude-plugin): name the plugin's repository in the manifest A skill that files an issue against this plugin needs to know where the plugin lives. The installed copy has no git remote, and the working directory's remote is the user's project. The manifest's standard `repository` field gives the skill one place to read it from, so no skill body hardcodes the slug. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills/reporting-a-skill-gap): report a skill that let the work down as an issue on the plugin's repository When a skill gave wrong or missing guidance, did not trigger, or made the user paste an instruction by hand, the gap stayed in the session. Agents asked to report it wrote a story a maintainer cannot test: in 15 baseline runs, none gave a task prompt or a failure predicate a RED baseline could replay, and none gave the skill and section as a fixed reference. With no `repository` field in the manifest, all 5 runs went looking in the README or marketplace files, where the marketplace lists more than one repository. The skill resolves the target from the manifest's `repository` field and asks the user when it is missing. It searches for an existing issue and comments there instead of duplicating. It sanitizes the body to the generic shape of the failure, and fills a template whose required `## Reproduction` section is a scenario a maintainer can replay under superpowers:writing-skills. The GitHub write goes through writing-github-issues and its confirmation gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(templates): load reporting-a-skill-gap from the user CLAUDE.md template The new skill triggers on a moment that can come in any project, not on a step in the feature flow, so the user-scope table is where agents find it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(README): list reporting-a-skill-gap in the skills table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(skills/reporting-a-skill-gap): set label and assignee only for a user who can push to the plugin's repository Most users of the plugin cannot push to its repository, and GitHub drops the label and the assignee of an issue that such a user creates. The report then claimed metadata that never landed. The skill now checks the push permission first and passes neither field without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(skills/reporting-a-skill-gap): keep the version and location of each occurrence in a comment on an existing issue The comment form left out `## Where in the plugin`, so a second occurrence on an existing issue lost its plugin version, and a maintainer could not tell an old version from a regression. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(skills/reporting-a-skill-gap): sanitize a hand-added instruction before it is quoted The template said to quote the instruction word for word, which conflicts with the sanitizing table and can publish a project name or path. The quote now keeps the words except for the reductions of that table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(skills/reporting-a-skill-gap): scope gh api calls by their path, since gh api takes no --repo Step 1 said to pass --repo on every gh command, which makes the push-permission probe of Step 5 fail. gh issue commands keep --repo; gh api calls name the repository in their path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(skills/reporting-a-skill-gap): comment on an existing issue without rewriting its body writing-github-issues comments only in its Step 2D, which also reconciles the issue body, so a second occurrence had no defined way to land. Step 5 now gives the comment command, keeps the confirmation gate, and leaves the body as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(skills/reporting-a-skill-gap): read each plausible match before deciding it is the same gap The search list shows titles only, but the branches of Step 3 depend on the issue's body, its reproduction, and the version of its fix. Each plausible match is now opened with its comments first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4d6b8f5 commit 4c3e5e4

5 files changed

Lines changed: 168 additions & 0 deletions

File tree

‎.claude-plugin/plugin.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"name": "Ægir Máni Hauksson",
77
"email": "agir96@gmail.com"
88
},
9+
"repository": "https://github.com/sourcehawk/feature-dev-workflow",
910
"license": "MIT",
1011
"keywords": [
1112
"workflow",

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ It is also the faster path. Breaking the feature into independent PRs lets the m
4242
| `maintaining-architectural-coherence` | Work split across PRs/agents/waves must read as one author. Invoked when agreeing conventions before parallel work, and when reviewing the merged union for structural, interface, naming, and vocabulary drift. |
4343
| `product-epic` | Standalone, upstream of the flow. A product manager has a rough epic — an idea, a few bullets, a draft — that must be scoped and clarified before an engineer can design against it. Surfaces the gaps with a fresh-reader test, refines them with the PM (challenging scope and feasibility), and files the result. |
4444
| `drafting-a-release` | Standalone (not part of the feature flow). About to cut a release: drafts curated release notes that explain the why, proposes the version, and gates `gh release create` on the user. |
45+
| `reporting-a-skill-gap` | Standalone (not part of the feature flow). A skill in this plugin let the work down: the user had to add an instruction by hand, a skill gave wrong or missing guidance, or it did not trigger. Files the gap as an issue on this plugin's repository, with a reproduction a maintainer can replay as a test, and with the user's project details removed. |
4546

4647
## How it works
4748

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
name: reporting-a-skill-gap
3+
description:
4+
Use when a feature-dev-workflow skill let the work down, such as when the
5+
user had to add an instruction by hand that a skill should have carried, a
6+
skill gave wrong or missing guidance, a skill did not trigger when it
7+
should have, or the agent repeated or undid work that a skill should have
8+
prevented, or when asked to report such a gap to the plugin's maintainers.
9+
---
10+
11+
# reporting-a-skill-gap
12+
13+
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.
14+
15+
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.
16+
17+
## When to invoke
18+
19+
- The user asks to report a skill problem to the plugin, or says a skill should have handled something.
20+
- 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.
21+
22+
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.
23+
24+
## Step 1: resolve the target repository
25+
26+
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.
27+
28+
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.
29+
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.
30+
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`.
31+
32+
## Step 2: locate the gap in the skill
33+
34+
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.
35+
36+
## Step 3: search for an existing report
37+
38+
```
39+
gh issue list --repo OWNER/REPO --state all --search "<skill-name> <two or three words for the failure>" --limit 20
40+
```
41+
42+
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:
43+
44+
- **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.
45+
- **A closed issue covers it, fixed in a version newer than the installed one:** tell the user to update the plugin. File nothing.
46+
- **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`.
47+
- **No match:** file a new issue.
48+
49+
## Step 4: draft the body from the template
50+
51+
Fill `${CLAUDE_PLUGIN_ROOT}/skills/reporting-a-skill-gap/templates/skill-gap.md`, each section per its `<!-- -->` guidance.
52+
53+
**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:
54+
55+
| From the session | In the report |
56+
| --- | --- |
57+
| Project, company, product, or repository name | A role: `a service repository`, `the project` |
58+
| A person's name, including the user's | `the user` |
59+
| Paths, branch names, issue or PR numbers in the user's repository | Neutral stand-ins: `<scratch-dir>`, `<feature-branch>`, or nothing |
60+
| A secret, key, token, or credential, even a test one | Nothing. Not the value, not a masked form. |
61+
| Domain details of the feature (what the code is for) | Only what the failure depends on |
62+
| Session ids, logs | Described in `## Evidence`, not pasted, unless the user says to include them |
63+
64+
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.
65+
66+
**Write the reproduction to be replayed.** Check each part before you move on:
67+
68+
- The situation and environment facts hold every fact the agent needs, so a fresh subagent with only this text can play the scenario.
69+
- 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.
70+
- 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.
71+
72+
**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.
73+
74+
## Step 5: land it
75+
76+
**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:
77+
78+
- The confirmation names the target as the plugin's `OWNER/REPO` from Step 1, so the user sees that the report leaves their project.
79+
- Say which sanitizing reductions you made, in one line, so the user can check that nothing private is left.
80+
- 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.
81+
82+
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.
83+
84+
## Red flags
85+
86+
| Thought | Reality |
87+
| --- | --- |
88+
| "`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`. |
89+
| "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. |
90+
| "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. |
91+
| "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. |
92+
| "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. |
93+
| "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. |
94+
| "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. |
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!--
2+
Skill-gap issue body template. See ${CLAUDE_PLUGIN_ROOT}/skills/reporting-a-skill-gap/SKILL.md for the choreography.
3+
4+
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.
5+
6+
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`).
7+
8+
Label: `bug`, only when the user can push to the plugin's repository (see the skill's Step 5).
9+
10+
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.
11+
-->
12+
13+
# <plain-english-title>
14+
15+
<!-- 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". -->
16+
17+
## What happened
18+
19+
<!-- 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. -->
20+
21+
## Expected
22+
23+
<!-- One or two sentences. What the skill should have made the agent do instead. -->
24+
25+
## Where in the plugin
26+
27+
<!--
28+
Exactly these three lines:
29+
30+
- Skill: `feature-dev-workflow:<name>`
31+
- Section: `<the heading, copied from the installed SKILL.md, with its # marks>`
32+
- Plugin version: `<version from .claude-plugin/plugin.json>`
33+
34+
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.
35+
-->
36+
37+
<!-- optional -->
38+
39+
## Instruction added by hand
40+
41+
<!-- 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. -->
42+
43+
## Reproduction
44+
45+
<!-- 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. -->
46+
47+
### Situation
48+
49+
<!-- 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. -->
50+
51+
### Environment facts
52+
53+
<!-- 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. -->
54+
55+
### Task prompt
56+
57+
<!-- 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. -->
58+
59+
### Failure predicate
60+
61+
<!-- 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." -->
62+
63+
## Suggested fix location
64+
65+
<!-- 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. -->
66+
67+
<!-- optional -->
68+
69+
## Evidence
70+
71+
<!-- 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. -->

‎templates/user-CLAUDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ This file applies to every project. A project's own `CLAUDE.md` comes first wher
2828
| Act on review feedback (Copilot, a person, or a local review), and again before every push of a review fix | `feature-dev-workflow:addressing-review-feedback` |
2929
| Run a review loop on a PR until it is clean | `feature-dev-workflow:copilot-review-loop` |
3030
| Cut, draft, tag, or publish a release | `feature-dev-workflow:drafting-a-release` |
31+
| Report a feature-dev-workflow skill that let the work down: an instruction you had to add by hand, wrong or missing guidance, or a skill that did not trigger | `feature-dev-workflow:reporting-a-skill-gap` |
3132
| Write prose that people read: PR and issue bodies, review replies, docs, release notes, commit bodies | `simple-english:simple-english` |
3233
| Say that work is complete, fixed, or passing | `superpowers:verification-before-completion` |

0 commit comments

Comments
 (0)