Help us improve
Share bugs, ideas, or general feedback.
From rkstack
Explore ideas before implementation. Turn vague requests into fully formed designs and specs through collaborative dialogue. Use before any creative work — creating features, building components, adding functionality, or modifying behavior. Proactively suggest when the user jumps straight to code without a design.
npx claudepluginhub mrkhachaturov/ccode-personal-plugins --plugin rkstackHow this skill is triggered — by the user, by Claude, or both
Slash command
/rkstack:brainstormingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
Guides technical evaluation of code review feedback: read fully, restate for understanding, verify against codebase, respond with reasoning or pushback before implementing.
Share bugs, ideas, or general feedback.
# === RKstack Preamble (brainstorming) ===
# Read detection cache (written by session-start via rkstack detect)
if [ -f .rkstack/settings.json ]; then
cat .rkstack/settings.json
else
echo "WARNING: .rkstack/settings.json not found — detection cache missing"
fi
# Session-volatile checks (can change mid-session)
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
_HAS_CLAUDE_MD=$([ -f CLAUDE.md ] && echo "yes" || echo "no")
echo "BRANCH: $_BRANCH"
echo "CLAUDE_MD: $_HAS_CLAUDE_MD"
Use the detection cache and preamble output to adapt your behavior:
detection.flowType (web or default). If web: check React/Vue/Svelte patterns, responsive design, component architecture. If default: CLI tools, MCP servers, backend scripts.just commands instead of raw shell.detection.stack for what's in the project and detection.stats for scale (files, code, complexity).detection.repoMode for solo vs collaborative.detection.services for Supabase and other service integrations.ALWAYS follow this structure for every AskUserQuestion call:
_BRANCH value from preamble — NOT any branch from conversation history or gitStatus), and the current plan/task. (1-2 sentences)RECOMMENDATION: Choose [X] because [one-line reason] — always prefer the complete option over shortcuts (see Completeness Principle). Include Completeness: X/10 for each option. Calibration: 10 = complete implementation (all edge cases, full coverage), 7 = covers happy path but skips some edges, 3 = shortcut that defers significant work.A) ... B) ... C) ... — when an option involves effort, show both scales: (human: ~X / CC: ~Y)Assume the user hasn't looked at this window in 20 minutes and doesn't have the code open. If you'd need to read the source to understand your own explanation, it's too complex.
AI makes completeness near-free. Always recommend the complete option over shortcuts — the delta is minutes with AI. A "lake" (100% coverage, all edge cases) is boilable; an "ocean" (full rewrite, multi-quarter migration) is not. Boil lakes, flag oceans.
Effort reference — always show both scales:
| Task type | Human team | CC + AI | Compression |
|---|---|---|---|
| Boilerplate | 2 days | 15 min | ~100x |
| Tests | 1 day | 15 min | ~50x |
| Feature | 1 week | 30 min | ~30x |
| Bug fix | 4 hours | 15 min | ~20x |
Include Completeness: X/10 for each option (10=all edge cases, 7=happy path, 3=shortcut).
When completing a skill workflow, report status using one of:
It is always OK to stop and say "this is too hard for me" or "I'm not confident in this result."
Bad work is worse than no work. You will not be penalized for escalating.
Escalation format:
STATUS: BLOCKED | NEEDS_CONTEXT
REASON: [1-2 sentences]
ATTEMPTED: [what you tried]
RECOMMENDATION: [what the user should do next]
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
You MUST create a task for each of these items and complete them in order:
docs/rkstack/specs/YYYY-MM-DD-<topic>-design.md and commitdigraph brainstorming {
"Explore project context" [shape=box];
"Visual questions ahead?" [shape=diamond];
"Offer Visual Companion\n(own message, no other content)" [shape=box];
"Ask clarifying questions" [shape=box];
"Propose 2-3 approaches" [shape=box];
"Present design sections" [shape=box];
"User approves design?" [shape=diamond];
"Write design doc" [shape=box];
"Spec self-review\n(fix inline)" [shape=box];
"User reviews spec?" [shape=diamond];
"Invoke writing-plans skill" [shape=doublecircle];
"Explore project context" -> "Visual questions ahead?";
"Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
"Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
"Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
"Ask clarifying questions" -> "Propose 2-3 approaches";
"Propose 2-3 approaches" -> "Present design sections";
"Present design sections" -> "User approves design?";
"User approves design?" -> "Present design sections" [label="no, revise"];
"User approves design?" -> "Write design doc" [label="yes"];
"Write design doc" -> "Spec self-review\n(fix inline)";
"Spec self-review\n(fix inline)" -> "User reviews spec?";
"User reviews spec?" -> "Write design doc" [label="changes requested"];
"User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
}
The terminal state is invoking writing-plans. Do NOT invoke any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
Use the preamble output to understand the tech stack. Adapt your questions to the detected languages and frameworks. If CLAUDE.md exists, read it for project conventions.
Completeness: X/10 for each option (10 = all edges, 7 = happy path, 3 = shortcut)(human: ~X days / CC: ~Y min). Recommend the most complete option.Ask Codex option in every AskUserQuestion call that decides a substantive design question (architecture, tradeoff, approach). See the Ask Codex section below for the full flow. Skip it on trivial choices (naming, formatting preferences).When you call AskUserQuestion for a substantive design choice, include Ask Codex as an extra option alongside your own A/B/C. If the user picks it, Codex weighs in — endorsing some of your options, rejecting others, proposing new ones you missed, with a single top recommendation. You then re-present AskUserQuestion with the enriched set so the user decides from the merged list.
When the user picks Ask Codex:
Build an XML-block prompt with these sections (pass verbatim as heredoc stdin, no escaping needed):
<role> — Codex is a senior design consultant. Claude is brainstorming with the user and the user picked "Ask Codex".<task> — Codex reads the question, your original options with rationale, and surrounding context, then endorses/rejects each and proposes new ones if warranted. One top recommendation.<question> — your question verbatim.<claude_options> — each original option with its label and your one-line rationale.<context> — the spec-in-progress so far, relevant CLAUDE.md lines, referenced files, repo mode (solo/team from preamble), any constraints that matter. Terse but concrete — this is Codex's only context.<grounding_rules> — "Do not invent constraints. If a claim depends on an inference, say so."<structured_output_contract> — "Return only valid JSON matching the provided schema. Terse decision-quality rationales — this gets shown to the user inline in the follow-up AskUserQuestion."CONSULT=$(node "${CLAUDE_PLUGIN_ROOT}/scripts/codex/consult.mjs" \
--cwd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" \
--effort medium \
<<'CODEX_PROMPT'
<the assembled prompt from step 1>
CODEX_PROMPT
) ; EXIT=$?
Use timeout: 300000 (5 min). Exit codes: 0 ok, 1 Codex/parse failure, 2 usage error, 3 Codex CLI missing (tell the user to run !codex login).
Schema at scripts/codex/consult-schema.json. Shape:
{
"analysis": "one-paragraph reading of the decision",
"endorsed_existing": [{"label": "<exact label you used>", "rationale": "..."}],
"rejected_existing": [{"label": "<exact label you used>", "reason": "..."}],
"new_options": [{"label": "...", "description": "...", "rationale": "..."}],
"recommendation": {"label": "<endorsed or new option>", "reason": "..."},
"open_questions": ["..."]
}
AskUserQuestion with Codex's input merged inanalysis.Codex: <endorsement rationale> when endorsed, Codex ✗ <reason> when rejected.(Codex) and show its description.recommendation.label with (Recommended by Codex).open_questions is non-empty, list them below the options as a brief "Codex wants to know:" footer.Do NOT offer Ask Codex again on this same question — the user has already heard from Codex. If they still want to push further, that's a new question.
Design for isolation and clarity:
Working in existing codebases:
If flowType is web (from detection cache):
Design system check. If the project has no DESIGN.md, mention it as a recommendation: "This project has no documented design system. Consider running /design-consultation to establish one before implementing UI features." Do not force this — just mention it once.
Visual design review. If the feature involves UI changes, invoke the /plan-design-review skill after the user approves the design but before writing the spec. This rates visual design dimensions (layout, typography, spacing, responsiveness) and suggests improvements to the design.
If flowType is not web, skip this section entirely.
docs/rkstack/specs/YYYY-MM-DD-<topic>-design.md
mkdir -p docs/rkstack/specsAfter writing the spec document, look at it with fresh eyes:
Fix any issues inline. No need to re-review — just fix and move on.
After self-review, invoke the dual-review skill on the spec file. This runs a Codex review loop: Codex reviews in read-only mode, you evaluate each finding against the document and source code, fix valid ones, and loop until Codex returns clean or max 3 rounds are reached. This step is automatic — do not skip it or ask the user whether to run it.
Ask the user to review the written spec before proceeding:
"Spec written and committed to
<path>. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
Wait for the user's response. If they request changes, make them and re-run the spec self-review. Only proceed once the user approves.
A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
Offering the companion: When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
"Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"
This offer MUST be its own message. Do not combine it with clarifying questions, context summaries, or any other content. The message should contain ONLY the offer above and nothing else. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
Per-question decision: Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: would the user understand this better by seeing it than reading it?
If they agree to the companion, read the detailed guide before proceeding:
skills/brainstorming/visual-companion.md