From galeharness-cli
Explore requirements and approaches through collaborative dialogue before writing a right-sized requirements document and planning implementation. Use for feature ideas, problem framing, when the user says 'let's brainstorm', or when they want to think through options before deciding what to build. Also use when a user describes a vague or ambitious feature request, asks 'what should we build', 'help me think through X', presents a problem with multiple valid solutions, or seems unsure about scope or direction — even if they don't explicitly ask to brainstorm.
npx claudepluginhub wangrenzhu-ola/galeharnesscodingcli --plugin galeharness-cliThis skill uses the workspace's default tool permissions.
**Note: The current year is 2026.** Use this when dating requirements documents.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Note: The current year is 2026. Use this when dating requirements documents.
Brainstorming helps answer WHAT to build through collaborative dialogue. It precedes /gh:plan, which answers HOW to build it.
The durable output of this workflow is a requirements document. In other workflows this might be called a lightweight PRD or feature brief. In compound engineering, keep the workflow name brainstorm, but make the written artifact strong enough that planning does not need to invent product behavior, scope boundaries, or success criteria.
This skill does not implement code. It explores, clarifies, and documents decisions for later planning or execution.
IMPORTANT: All file references in generated documents must use repo-relative paths (e.g., src/models/user.rb), never absolute paths. Absolute paths break portability across machines, worktrees, and teammates.
AskUserQuestion in Claude Code, request_user_input in Codex, ask_user in Gemini, ask_user in Pi (requires the pi-ask-user extension)). If the tool is unavailable, do not proceed silently — present numbered options directly in chat and wait for the user's reply before proceeding, and state that the tool is unavailable.src/models/user.rb), never absolute paths. Absolute paths make documents non-portable across machines and teammates.<feature_description> #$ARGUMENTS </feature_description>
If the feature description above is empty, ask the user: "What would you like to explore? Please describe the feature, problem, or improvement you're thinking about."
Do not proceed until you have a feature description from the user.
Config:
At the start of execution, use your native file-read tool to read .compound-engineering/config.local.yaml from the repository root. If the file is missing in the current worktree, check the main repository root (the parent of .git/worktrees). If the file is missing or unreadable, do not block the workflow — proceed silently with default settings.
If the config file contains language: en, write documents in English.
If the file is missing, contains language: zh-CN, or has no language key, write documents in Chinese (default).
Before any other action, log the skill start event so this execution appears on the task board:
gale-task log skill_started --skill gh:brainstorm --title "<brainstorm-topic>" to register this execution on the task board.gale-task is not on PATH or the command fails, skip and continue — this must never block the skill.If the user references an existing brainstorm topic or document, or there is an obvious recent matching *-requirements.md file in docs/brainstorms/:
Before proceeding to Phase 0.2, classify whether this is a software task. The key question is: does the task involve building, modifying, or architecting software? -- not whether the task mentions software topics.
Software (continue to Phase 0.2) -- the task references code, repositories, APIs, databases, or asks to build/modify/debug/deploy software.
Non-software brainstorming (route to universal brainstorming) -- BOTH conditions must be true:
Neither (respond directly, skip all brainstorming phases) -- the input is a quick-help request, error message, factual question, or single-step task that doesn't need a brainstorm.
If non-software brainstorming is detected: Read references/universal-brainstorming.md and use those facilitation principles to brainstorm with the user naturally. Do not follow the software brainstorming phases below.
Clear requirements indicators:
If requirements are already clear: Keep the interaction brief. Confirm understanding and present concise next-step options rather than forcing a long brainstorm. Only write a short requirements document when a durable handoff to planning or later review would be valuable. Skip Phase 1.1 and 1.2 entirely — go straight to Phase 1.3 or Phase 3.
Use the feature description plus a light repo scan to classify the work:
If the scope is unclear, ask one targeted question to disambiguate and then proceed.
Before Phase 1, query the vector memory database for related brainstorms and requirements:
Extract a 1-2 sentence search query from the feature description, including:
Run (requires env vars HKT_MEMORY_API_KEY, HKT_MEMORY_BASE_URL, HKT_MEMORY_MODEL):
hkt-memory retrieve \
--query "<extracted query>" \
--layer all --limit 10 --min-similarity 0.35 \
--vector-weight 0.7 --bm25-weight 0.3
If results returned, prepare a context block and use it to inform Phase 1.1 (Existing Context Scan):
## Related historical brainstorms from HKTMemory
Source: vector database. Treat as additional context, not primary evidence.
[results here, each tagged with (similarity: X.XX)]
If no results or command error, proceed silently without blocking Phase 1.
Integration with Phase 1.1: When HKTMemory returns relevant results, cross-reference them during the "Topic Scan" step. Look for:
Before starting substantive brainstorming work, set up an isolated working environment. Brainstorm produces documents (requirements docs in docs/brainstorms/), not code, but keeping the default branch clean is still good practice.
Check the current branch:
current_branch=$(git branch --show-current)
default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
if [ -z "$default_branch" ]; then
default_branch=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "main" || echo "master")
fi
If already on a feature branch (not the default branch):
If on the default branch, offer options using the platform's blocking question tool:
1. Create a feature branch (quick — stays in current checkout)
2. Use a worktree (isolated — recommended for parallel work)
3. Stay on [default_branch] (only if you're sure)
Option 1: Create a feature branch
git pull origin [default_branch]
git checkout -b brainstorm/<descriptive-name>
Derive the branch name from the brainstorm topic (e.g., brainstorm/global-knowledge-repo).
Option 2: Use a worktree (recommended for parallel development)
skill: git-worktree
# The skill will create a new branch from the default branch in an isolated worktree
Use a branch name like brainstorm/<descriptive-name>.
Option 3: Stay on default branch
Recommendation: Use worktree if:
Deep sub-mode: feature vs product. For Deep scope, also classify whether the brainstorm must establish product shape or inherit it:
Product-tier triggers additional Phase 1.2 questions and additional sections in the requirements document. Feature-tier uses the current Deep behavior unchanged.
Scan the repo before substantive brainstorming. Match depth to scope:
Lightweight — Search for the topic, check if something similar already exists, and move on.
Standard and Deep — Two passes:
Constraint Check — Check project instruction files (AGENTS.md, and CLAUDE.md only if retained as compatibility context) for workflow, product, or scope constraints that affect the brainstorm. If these add nothing, move on.
Topic Scan — Search for relevant terms. Read the most relevant existing artifact if one exists (brainstorm, plan, spec, skill, feature doc). Skim adjacent examples covering similar behavior.
If nothing obvious appears after a short scan, say so and continue. Two rules govern technical depth during the scan:
Verify before claiming — When the brainstorm touches checkable infrastructure (database tables, routes, config files, dependencies, model definitions), read the relevant source files to confirm what actually exists. Any claim that something is absent — a missing table, an endpoint that doesn't exist, a dependency not in the Gemfile, a config option with no current support — must be verified against the codebase first; if not verified, label it as an unverified assumption. This applies to every brainstorm regardless of topic.
Defer design decisions to planning — Implementation details like schemas, migration strategies, endpoint structure, or deployment topology belong in planning, not here — unless the brainstorm is itself about a technical or architectural decision, in which case those details are the subject of the brainstorm and should be explored.
Slack context (opt-in, Standard and Deep only) — never auto-dispatch. Route by condition:
galeharness-cli:slack-researcher with a brief summary of the brainstorm topic alongside Phase 1.1 work. Incorporate findings into constraint and context awareness.Before generating approaches, challenge the request to catch misframing. Match depth to scope:
Lightweight:
Standard:
Deep — Standard questions plus:
Deep — product — Deep questions plus:
These questions force an explicit product thesis and feed the Scope Boundaries subsections ("Deferred for later" and "Outside this product's identity") and Dependencies / Assumptions in the requirements document.
Follow the Interaction Rules above. Use the platform's blocking question tool when available.
Guidelines:
Exit condition: Continue until the idea is clear OR the user explicitly wants to proceed.
If multiple plausible directions remain, propose 2-3 concrete approaches based on research and conversation. Otherwise state the recommended direction directly.
Use at least one non-obvious angle — inversion (what if we did the opposite?), constraint removal (what if X weren't a limitation?), or analogy from how another domain solves this. The first approaches that come to mind are usually variations on the same axis.
Present approaches first, then evaluate. Let the user see all options before hearing which one is recommended — leading with a recommendation before the user has seen alternatives anchors the conversation prematurely.
When useful, include one deliberately higher-upside alternative:
At product tier, alternatives should differ on what is built (product shape, actor set, positioning), not how it is built. Implementation-variant alternatives belong at feature tier.
For each approach, provide:
After presenting all approaches, state your recommendation and explain why. Prefer simpler solutions when added complexity creates real carrying cost, but do not reject low-cost, high-value polish just because it is not strictly necessary.
If one approach is clearly best and alternatives are not meaningful, skip the menu and state the recommendation directly.
If relevant, call out whether the choice is:
Before writing the output document, resolve the target directory:
gale-knowledge resolve-path --type brainstorms to get the target directory path (the command outputs a plain path string). If the command fails or gale-knowledge is not available, fall back to docs/brainstorms.<resolved-path>/<filename>.md.Write or update a requirements document only when the conversation produced durable decisions worth preserving. Read references/requirements-capture.md for the document template, formatting rules, visual aid guidance, and completeness checks.
Document Language: When language: zh-CN (or default), write all prose content in Chinese. Keep section headers (## Problem Frame, ## Requirements, etc.) and YAML frontmatter keys in English. Translate paragraphs, list items, and table content. Do NOT translate code blocks, inline code, file paths, or URLs.
For Lightweight brainstorms, keep the document compact. Skip document creation when the user only needs brief alignment and no durable decisions need to be preserved.
After successfully writing or updating the requirements document:
title and category values from its YAML frontmatter (if present)hkt-memory store \
--content "<summary + repo-relative file path>" \
--title "<frontmatter title or filename>" \
--topic "<frontmatter category or 'brainstorm'>" \
--layer all
Stored to HKTMemory: [title]Rationale: The vector database's job is discovery — helping future sessions find related past work. The full document already lives in a git-managed file; storing it again in the vector DB is redundant, expensive, and may exceed content limits. Store the summary and path so retrieval can surface it; the agent reads the actual file when details are needed.
Note: This enables future brainstorms to discover and build upon this work through Phase 0.4's retrieve step.
After the document is written:
gale-knowledge extract-project to get the project name. If the command fails or is not available, use the current directory basename as the project name instead.gale-knowledge commit --project "<project-name>" --type brainstorm --title "<document-title>" to commit the knowledge document. If this command fails, log the error but continue — the document has already been written to disk.gale-knowledge is not on PATH, skip both steps and continue — this must never block the skill.Present next-step options and execute the user's selection. Read references/handoff.md for the option logic, dispatch instructions, and closing summary format.
After presenting handoff options and completing this skill, log the completion event:
gale-task log skill_completed to record the completion event.gale-task is not on PATH or the command fails, skip and continue — this must never block the skill.