From process
Brainstorm requirements, propose approaches, and write a spec into a GitHub issue. Triggers on: 'brainstorm issue N', 'spec out issue N', 'specify issue N', 'brainstorm <topic>'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/process:brainstormThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Core principle:** The GitHub Issue body is the spec. No local files.
Core principle: The GitHub Issue body is the spec. No local files.
Before doing any work, run these checks in order:
detect_repo to set repo context. If the tool is not available, stop with: "The gh plugin is required. Install it from the backalley marketplace."Then determine which flow to follow:
issue_pull with the .issues/ directory path to sync all issues locally..issues/issue-{N}.md) and check its labels.needs-spec label is NOT present, stop with: "Issue #{N} doesn't have the needs-spec label. [If has-spec: Run plan instead. If in-progress: Run execute instead.]".issues/issue-new.md with a placeholder title, the needs-spec label, and an empty body. Do NOT push yet — the title and body will be filled in during the brainstorm process.Do not proceed past the entry gate unless all checks pass.
Read the issue body for any existing context, requirements, or discussion. Use this as input — don't re-ask things already answered.
Ask clarifying questions one at a time using the AskUserQuestion tool. Prefer multiple choice when possible. Put the recommended answer first and mark it with "(Recommended)" in its label. Wait for an answer before asking the next question. Focus on:
Only one question per message. Don't bundle.
Once you understand the problem, propose 2-3 approaches with trade-offs. Lead with your recommended approach and explain why it's the best fit. Be concrete — name the approach, describe how it works, and call out the key trade-off.
After the user picks an approach, break the design into sections. Present one section at a time, get explicit approval before moving to the next. Scale each section to its complexity — a few sentences if simple, more detail if the design is nuanced or has non-obvious consequences.
If the user mentions this issue is part of a larger initiative or umbrella issue, include a Parent: #N line at the top of the spec body when writing it.
Once all sections are approved, assemble the full spec and write it into the local issue file. Do NOT push yet.
Run the internal review loop before presenting the spec to the user (see below).
Create follow-up issues for deferred decisions (see Follow-Up Issues below).
Push once: Call issue_push with the .issues/ directory to sync the spec (and any follow-up issues) to GitHub. This is the only push in the entire flow.
Call issue_update to remove the needs-spec label and add has-spec.
Tell the user: "Spec written to issue #N. Run plan to create the implementation checklist."
After writing the spec to the issue body (step 7) but before transitioning labels (step 9), run this loop (max 5 iterations):
a. Checklist gate (fast): Verify the spec contains all 5 required sections. If any is missing or empty, add it to the local file.
b. Subagent review (deep): Dispatch a review subagent with these instructions: "Review the following spec for completeness, internal consistency, and clarity. Flag: vague acceptance criteria, contradictions between sections, unstated assumptions, missing error handling, scope creep beyond the stated problem. Return a list of specific issues found, or 'PASS' if the spec is ready." Pass the full spec text to the subagent.
c. If the subagent returns issues: Fix each issue in the local spec file, increment the iteration counter, and go back to step (a).
d. If the subagent returns PASS or iteration count reaches 5: Proceed to step 9 (follow-up issues). If stopped at 5 iterations, tell the user: "Internal review found issues I couldn't fully resolve after 5 attempts. Presenting the spec as-is — please pay extra attention to the flagged areas."
During the Q&A phase, the user often picks an approach but signals they may revisit the decision later. Watch for language like:
These are deferred decisions — the user chose a path but explicitly left the door open for an alternative.
After the spec is written and reviewed (step 8), but before pushing (step 10):
Review the Q&A history for deferred decisions. Collect each one: what was chosen, what was deferred, and the trigger condition for revisiting (e.g., "if performance is too slow", "if the simpler approach isn't enough").
If any deferred decisions were found, present them to the user:
I noticed N deferred decisions during brainstorming. Want me to create
follow-up issues so they don't get lost?
1. "Evaluate dropping Lezer if WASM highlighting is fast enough"
Trigger: after initial implementation, benchmark WASM load time
2. "Switch to typed wasm-bindgen structs if JsValue becomes a bottleneck"
Trigger: if serialization overhead is noticeable on keystroke
Use the AskUserQuestion tool to let the user pick which follow-ups to create. Put "Create all" as the first (recommended) option.
For each approved follow-up, create an issue file at .issues/issue-new-{slug}.md with:
needs-specParent: #N)The follow-up issue files will be pushed together with the spec in step 10.
If no deferred decisions were found, skip this section silently.
When the user says "check for feedback", "there's feedback on GitHub", or similar:
pulled_at frontmatter field — this is the cutoff. (Use pulled_at because the work product is the issue body itself, so the last sync time is the right boundary.)issue_comments_list with issue_number and since set to that timestamp.issue_push with the .issues/ directory to sync all issues to GitHub.Problem: Writing the spec to a local file.
Fix: Always write to the issue body via issue_push. The issue is the single source of truth.
Problem: Asking multiple questions at once. Fix: One question per message. Wait for the answer. Then ask the next.
Problem: Skipping the approach comparison. Fix: Always propose 2-3 approaches before committing. This surfaces assumptions and gives the user a real choice.
Problem: Forgetting the label transition.
Fix: Always call issue_update to swap needs-spec → has-spec after writing the spec.
Problem: Presenting the spec to the user without running internal review. Fix: Always run the checklist gate + subagent review before transitioning labels. This catches obvious gaps before the user has to.
Never:
needs-spec label being presentAlways:
issue_pushneeds-spec → has-spec)plan)Requires: gh plugin (detect_repo, issue_pull, issue_push, issue_update, issue_comments_list)
Next skill: plan (creates implementation checklist from the spec)
Label transition: removes needs-spec, adds has-spec
npx claudepluginhub n0k0/claude-plugins-backalley --plugin processGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.