Преглед изворни кода

diagnosing-superpowers: build the scrubbed bundle only on request

Never build or push a bundle unprompted. When intake names a bug report as
the goal, say once that a bundle is available on request, then wait. On
handover, state what the bundle contains, point at the scrub log, and say
scrubbing can miss things so every file needs review before sharing.
Raise the SKILL.md word budget to 1000 to fit the added rule.
Jesse Vincent пре 2 дана
родитељ
комит
aa03a11d20

+ 2 - 2
docs/superpowers/plans/2026-08-27-diagnosing-superpowers.md

@@ -15,7 +15,7 @@
 - Pure prose skill: no scripts shipped under `skills/diagnosing-superpowers/`.
 - No invented harness formats. Field-level claims appear only in `references/claude-code-sessions.md` (verified against Claude Code 2.1.247 transcripts) and `references/codex-sessions.md` (verified against Codex CLI 0.147.0 / 0.149.0 rollouts). Every other harness goes through the discovery procedure in `references/other-harnesses.md`.
 - Skill files say "your human partner", never "the user".
-- `SKILL.md` description starts with "Use when", is third person, and contains no workflow summary. `SKILL.md` body is under 900 words (the structure test enforces this).
+- `SKILL.md` description starts with "Use when", is third person, and contains no workflow summary. `SKILL.md` body is under 1,000 words (the structure test enforces this).
 - Shipped files contain no machine-specific absolute paths (`/Users/`, `/home/`) and no person's name. Session ids (UUIDs) are fine.
 - Workspace is `~/.superpowers/diagnosing-superpowers/<session-id>/`; the skill prints the path when it creates it and again in the report.
 - Session files are never modified, moved, or deleted.
@@ -189,7 +189,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
 REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
 SKILL_DIR="$REPO_ROOT/skills/diagnosing-superpowers"
 SKILL_MD="$SKILL_DIR/SKILL.md"
-WORD_BUDGET=900
+WORD_BUDGET=1000
 
 PASSES=0
 FAILURES=0

+ 11 - 5
docs/superpowers/specs/2026-08-27-diagnosing-superpowers-design.md

@@ -92,7 +92,7 @@ description: Use when a superpowers session went wrong and the user wants
 ```
 
 Triggering conditions only; no workflow summary (see `writing-skills`,
-Skill Discovery Optimization). SKILL.md stays under 900 words (the structure test enforces it; the repo's process skills run 350–4,800 words, and this one has a seven-step workflow):
+Skill Discovery Optimization). SKILL.md stays under 1,000 words (the structure test enforces it; the repo's process skills run 350–4,800 words, and this one has a seven-step workflow):
 workflow, hard rules, Red Flags, and pointers. Everything else lives in
 the prompt, reference, and template files.
 
@@ -110,8 +110,8 @@ intake turns each into a statement that names the session, the turn range
 if known, and the observable the user cares about (wall-clock, tokens,
 repeated actions, a specific unexpected action). Write the agreed
 statement to the case file (below). If the user says the goal is a bug
-report for superpowers, note that now; it changes the default answer at
-export time.
+report for superpowers, note that now; at export time the skill mentions
+once that a bundle is available on request.
 
 ### 2. Locate
 
@@ -262,8 +262,14 @@ user asks.
 
 ### 5. Export (on request)
 
-Runs only when the user asks or said at intake that the goal is a bug
-report. The bundle is written to
+Runs only when the user asks. The skill never builds a bundle unprompted:
+a bundle is the user's own session data, packaged for others, and being
+handed one they did not ask for feels intrusive. If the user said at
+intake that the goal is a bug report, the skill says once that a scrubbed
+bundle is available on request, then waits. When the archive is delivered,
+the skill states what it contains, what the scrub replaced, that automated
+scrubbing can miss things, and that the user should review every file
+before sharing it. The bundle is written to
 `~/.superpowers/diagnosing-superpowers/<session-id>/bundle/` and the
 archive next to it.
 

+ 14 - 9
skills/diagnosing-superpowers/SKILL.md

@@ -51,15 +51,19 @@ Create a todo per step. Steps 5–7 run only on their stated condition.
    else hand over a search URL). Show matches and suggest adding the
    report to the closest. If none match, draft `templates/issue.md`, show
    the exact text, and create it only after approval. `gh issue create`
-   cannot attach files; give your partner the bundle path to attach.
-6. **Export** — when asked, or the intake goal was a bug report. Ask the
-   redaction level: skeleton, evidence, or full. Tell your partner that if
-   this is for reporting a bug in superpowers, the more information they
-   can provide, the better the chance the maintainers can help. Build the
-   bundle per `templates/bundle-README.md`, dispatch `prompts/scrub.md`, then
+   cannot attach files; if a bundle exists, give your partner its path to
+   attach.
+6. **Export** — only when your partner asks for a bundle; never build one
+   unprompted. If the intake goal was a bug report, say once that a
+   scrubbed bundle is available on request, then wait. Ask the redaction
+   level: skeleton, evidence, or full; more information gives the
+   maintainers a better chance to help. Build the bundle per
+   `templates/bundle-README.md`, dispatch `prompts/scrub.md`, then
    `prompts/scrub-audit.md`, repeating both until the audit returns CLEAN.
    Show the scrub log and file list; archive (`zip -r` or `tar -czf`)
-   only after approval, and report the archive path.
+   only after approval. With the archive path, state what it contains,
+   point at the scrub log for what was replaced, and say scrubbing can
+   miss things: they must review every file before sharing it.
 7. **Similar sessions** — when asked. Turn confirmed findings into a
    signature, list candidates by mtime and size, find marker line numbers,
    dispatch `prompts/similar-session.md` per candidate in parallel, and
@@ -89,8 +93,8 @@ Create a todo per step. Steps 5–7 run only on their stated condition.
   parent agent.
 - **No superpowers diagnosis.** Report §7 states involvement and stops.
   Never name a defect in a skill or propose a change. Pushing does not
-  waive this; point at the issue step and offer the bundle. No advice to
-  your partner either.
+  waive this; point at the issue step and mention that a bundle is
+  available on request. No advice to your partner either.
 - **Approval gates.** No archive before your partner has seen the scrub
   log and file list. No issue or comment before they approve the exact
   text.
@@ -108,5 +112,6 @@ Create a todo per step. Steps 5–7 run only on their stated condition.
 | "The problem is obvious, skip intake" | The problem statement scopes everything. Ask. |
 | "They're away, so I'll reconstruct the statement" | You cannot reconstruct what they wanted. Write the questions and stop. |
 | "I'll sweep everything now and ask at the end" | An unscoped sweep spends their budget on the wrong question. Ask first. |
+| "They want a bug report, so I'll build the bundle now" | The bundle is their session data, packaged. Build it only when they ask for it. |
 | "Small, targeted edit, no restructuring needed" | Not your call, however small. Report the evidence; the triager decides. |
 | "The price per token is well known" | Numbers you did not compute from the transcript are invented. Cite or drop. |

+ 1 - 1
tests/diagnosing-superpowers/test-skill-structure.sh

@@ -9,7 +9,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
 REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
 SKILL_DIR="$REPO_ROOT/skills/diagnosing-superpowers"
 SKILL_MD="$SKILL_DIR/SKILL.md"
-WORD_BUDGET=900
+WORD_BUDGET=1000
 
 PASSES=0
 FAILURES=0