@every-env/compound-plugin 2.37.1 → 2.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  Release numbering now follows the repository `v*` tag line. Starting at `v2.34.0`, the root CLI package and this changelog stay on that shared version stream. Older entries below retain the previous `0.x` CLI numbering.
9
9
 
10
+ # [2.39.0](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.38.0...v2.39.0) (2026-03-16)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * drop 'CLI' suffix from Codex and Gemini platform names ([ec8d685](https://github.com/EveryInc/compound-engineering-plugin/commit/ec8d68580f3da65852e72c127cccc6e66326369b))
16
+ * make brainstorm handoff auto-chain and cross-platform ([637653d](https://github.com/EveryInc/compound-engineering-plugin/commit/637653d2edf89c022b9e312ea02c0ac1a305d741))
17
+ * restore 'wait for the user's reply' fallback language ([fca3a40](https://github.com/EveryInc/compound-engineering-plugin/commit/fca3a4019c55c76b9f1ad326cc3d284f5007b8f4))
18
+
19
+
20
+ ### Features
21
+
22
+ * add leverage check to brainstorm skill ([0100245](https://github.com/EveryInc/compound-engineering-plugin/commit/01002450cd077b800a917625c5eb6d12da061d0b))
23
+ * instruct brainstorm skill to use platform blocking question tools ([d2c4cee](https://github.com/EveryInc/compound-engineering-plugin/commit/d2c4cee6f9774a5fb2c8ca325c389dadb4a72b1c))
24
+ * refactor brainstorm skill into requirements-first workflow ([4d80a59](https://github.com/EveryInc/compound-engineering-plugin/commit/4d80a59e51b4b2e99ff8c2443e2a1b039d7475c9))
25
+
26
+ # [2.38.0](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.37.1...v2.38.0) (2026-03-16)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * **skill:** align compound-refresh question tool guidance ([c2582fa](https://github.com/EveryInc/compound-engineering-plugin/commit/c2582fab675fe1571f32730634e66411aadc1820))
32
+ * **skills:** allow direct commit on main as non-default option ([0c333b0](https://github.com/EveryInc/compound-engineering-plugin/commit/0c333b08c9369d359613d030aba0fe16e929a665))
33
+ * **skills:** autonomous mode adapts to available permissions ([684814d](https://github.com/EveryInc/compound-engineering-plugin/commit/684814d9514a72c59da4d8f309f73ff0f7661d58))
34
+ * **skills:** enforce branch creation when committing on main ([6969014](https://github.com/EveryInc/compound-engineering-plugin/commit/696901453212aa43cff2400a75cfc6629e79939e))
35
+ * **skills:** enforce full report output in autonomous mode ([2ae6fc4](https://github.com/EveryInc/compound-engineering-plugin/commit/2ae6fc44580093ff6162fcb48145901a54138e9f))
36
+ * **skills:** improve ce:compound-refresh interaction and auto-archive behavior ([0dff943](https://github.com/EveryInc/compound-engineering-plugin/commit/0dff9431ceec8a24e576712c48198e8241c24752))
37
+ * **skills:** include tool constraint in subagent task prompts ([db8c84a](https://github.com/EveryInc/compound-engineering-plugin/commit/db8c84acb4f72c4ce3e1612365ff912fdfe3cea1))
38
+ * **skills:** prevent auto-archive when problem domain is still active ([4201361](https://github.com/EveryInc/compound-engineering-plugin/commit/42013612bde6e13152ade806ba7f861ce5d38e03))
39
+ * **skills:** remove prescriptive branch naming in compound-refresh ([e3e7748](https://github.com/EveryInc/compound-engineering-plugin/commit/e3e7748c564a24e74d86fdf847dd499284404cc8))
40
+ * **skills:** require specific branch names based on what was refreshed ([b7e4391](https://github.com/EveryInc/compound-engineering-plugin/commit/b7e43910fb1a2173e857c4c6b7fa6af9f9ca1be7))
41
+ * **skills:** specify markdown format for autonomous report output ([c271bd4](https://github.com/EveryInc/compound-engineering-plugin/commit/c271bd4729793de8f3ec2e47dd5fe3e8de65c305))
42
+ * **skills:** steer compound-refresh subagents toward file tools over shell commands ([187571c](https://github.com/EveryInc/compound-engineering-plugin/commit/187571ce97ca8c840734b4677cceb0a4c37c84bb))
43
+ * **skills:** strengthen autonomous mode to prevent blocking on user input ([d3aff58](https://github.com/EveryInc/compound-engineering-plugin/commit/d3aff58d9e48c44266f09cf765d85b41bf95a110))
44
+ * **skills:** use actual branch name in commit options instead of 'this branch' ([a47f7d6](https://github.com/EveryInc/compound-engineering-plugin/commit/a47f7d67a25ff23ce8c2bb85e92fdce85bed3982))
45
+
46
+
47
+ ### Features
48
+
49
+ * **skills:** add autonomous mode to ce:compound-refresh ([699f484](https://github.com/EveryInc/compound-engineering-plugin/commit/699f484033f3c895c35fea49e147dd1742bc3d43))
50
+ * **skills:** add ce:compound-refresh skill for learning and pattern maintenance ([bd3088a](https://github.com/EveryInc/compound-engineering-plugin/commit/bd3088a851a3dec999d13f2f78951dfed5d9ac8c))
51
+ * **skills:** add Phase 5 commit workflow to ce:compound-refresh ([d4c12c3](https://github.com/EveryInc/compound-engineering-plugin/commit/d4c12c39fd04526c05cf484a512f9f73e91f5c3d))
52
+ * **skills:** add smart triage, drift classification, and replacement subagents to ce:compound-refresh ([95ad09d](https://github.com/EveryInc/compound-engineering-plugin/commit/95ad09d3e7d96367324c6ec7a10767e51d5788e8))
53
+
10
54
  ## [2.37.1](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.37.0...v2.37.1) (2026-03-16)
11
55
 
12
56
 
package/README.md CHANGED
@@ -194,7 +194,7 @@ Brainstorm → Plan → Work → Review → Compound → Repeat
194
194
  | `/ce:review` | Multi-agent code review before merging |
195
195
  | `/ce:compound` | Document learnings to make future work easier |
196
196
 
197
- The `brainstorming` skill supports `/ce:brainstorm` with collaborative dialogue to clarify requirements and compare approaches before committing to a plan.
197
+ The `/ce:brainstorm` skill supports collaborative dialogue to clarify requirements and compare approaches before committing to a plan.
198
198
 
199
199
  Each cycle compounds: brainstorms sharpen plans, plans inform future plans, reviews catch more issues, patterns get documented.
200
200
 
@@ -0,0 +1,141 @@
1
+ ---
2
+ title: "ce:compound-refresh skill redesign for autonomous maintenance without live user context"
3
+ category: skill-design
4
+ date: 2026-03-13
5
+ module: plugins/compound-engineering/skills/ce-compound-refresh
6
+ component: SKILL.md
7
+ tags:
8
+ - skill-design
9
+ - compound-refresh
10
+ - maintenance-workflow
11
+ - drift-classification
12
+ - subagent-architecture
13
+ - platform-agnostic
14
+ severity: medium
15
+ description: "Redesign ce:compound-refresh to handle autonomous drift triage, in-skill replacement via subagents, and smart scoping without relying on live problem-solving context that ce:compound expects."
16
+ related:
17
+ - docs/solutions/plugin-versioning-requirements.md
18
+ - https://github.com/EveryInc/compound-engineering-plugin/pull/260
19
+ - https://github.com/EveryInc/compound-engineering-plugin/issues/204
20
+ - https://github.com/EveryInc/compound-engineering-plugin/issues/221
21
+ ---
22
+
23
+ ## Problem
24
+
25
+ The initial `ce:compound-refresh` skill had several design issues discovered during real-world testing:
26
+
27
+ 1. Interactive questions never triggered the proper tool (AskUserQuestion) because the instruction used a weak "when available" qualifier
28
+ 2. Auto-archive criteria contradicted a "always ask before archiving" rule in a later phase
29
+ 3. Broad scope (9+ docs) asked the user to choose an area blindly without providing analysis
30
+ 4. The Replace flow tried to hand off to `ce:compound`, which expects fresh problem-solving context the user doesn't have months later
31
+ 5. Subagents used shell commands for file existence checks, triggering permission prompts
32
+ 6. No way to run the skill unattended (e.g., on a schedule) — every run required user interaction
33
+
34
+ ## Root Cause
35
+
36
+ Five independent design issues, each with a distinct root cause:
37
+
38
+ 1. **Hardcoded tool name with escape hatch.** Saying "Use AskUserQuestion when available" gave the model permission to skip the tool and just output text. Also non-portable to Codex and other platforms.
39
+ 2. **Contradictory rules across phases.** Phase 2 defined auto-archive criteria. Phase 3 said "always ask before archiving" with no exception. The model followed Phase 3.
40
+ 3. **Question before evidence.** The skill prompted scope selection before gathering any information about which areas were most stale or interconnected.
41
+ 4. **Unsatisfied precondition in cross-skill handoff.** `ce:compound` expects a recently solved problem with fresh context. A maintenance refresh has investigation evidence instead — equivalent data, different shape.
42
+ 5. **No tool preference guidance for subagents.** Without explicit instruction, subagents defaulted to bash for file operations.
43
+ 6. **Interactive-only design.** Every phase assumed a user was present. No way to run autonomously for scheduled maintenance or hands-off sweeps.
44
+
45
+ ## Solution
46
+
47
+ ### 1. Platform-agnostic interactive questions
48
+
49
+ Reference "the platform's interactive question tool" as the concept, with concrete examples:
50
+
51
+ ```markdown
52
+ Ask questions **one at a time** — use the platform's interactive question tool
53
+ (e.g. `AskUserQuestion` in Claude Code, `request_user_input` in Codex) and
54
+ **stop to wait for the answer** before continuing.
55
+ ```
56
+
57
+ The "stop to wait" language removes the escape hatch. The examples help each platform's model select the right tool.
58
+
59
+ ### 2. Auto-archive exemption for unambiguous cases
60
+
61
+ Phase 3 now defers to Phase 2's auto-archive criteria:
62
+
63
+ ```markdown
64
+ You are about to Archive a document **and** the evidence is not unambiguous
65
+ (see auto-archive criteria in Phase 2). When auto-archive criteria are met,
66
+ proceed without asking.
67
+ ```
68
+
69
+ ### 3. Smart triage for broad scope
70
+
71
+ When 9+ candidate docs are found, triage before asking:
72
+
73
+ 1. **Inventory** — read frontmatter, group by module/component/category
74
+ 2. **Impact clustering** — dense clusters of interconnected learnings + pattern docs are higher-impact than isolated docs
75
+ 3. **Spot-check drift** — check whether primary referenced files still exist
76
+ 4. **Recommend** — present the highest-impact cluster with rationale
77
+
78
+ Key insight: "code changed recently" is NOT a reliable staleness signal. Missing references in a high-impact cluster is the strongest signal.
79
+
80
+ ### 4. Replacement subagents instead of ce:compound handoff
81
+
82
+ By the time a Replace is identified, Phase 1 investigation has already gathered the evidence that `ce:compound` would research:
83
+ - The old learning's claims
84
+ - What the current code actually does
85
+ - Where and why the drift occurred
86
+
87
+ A replacement subagent writes the successor directly using `ce:compound`'s document format (frontmatter, problem, root cause, solution, prevention). Run sequentially — one at a time — because each may read significant code.
88
+
89
+ When evidence is insufficient (e.g., entire subsystem replaced, new architecture too complex to understand from investigation alone), mark as stale and recommend `ce:compound` after the user's next encounter with that area.
90
+
91
+ ### 5. Dedicated file tools over shell commands
92
+
93
+ Added to subagent strategy:
94
+
95
+ ```markdown
96
+ Subagents should use dedicated file search and read tools for investigation —
97
+ not shell commands. This avoids unnecessary permission prompts and is more
98
+ reliable across platforms.
99
+ ```
100
+
101
+ ### 6. Autonomous mode for scheduled/unattended runs
102
+
103
+ Added `mode:autonomous` argument support so the skill can run without user interaction (e.g., on a schedule, in CI, or when the user just wants a hands-off sweep).
104
+
105
+ Key design decisions:
106
+ - **Explicit opt-in only.** `mode:autonomous` must be in the arguments. Auto-detection based on tool availability was rejected because a user in an interactive agent without a question tool (e.g., Cursor, Windsurf) is still interactive — they just use plain-text replies.
107
+ - **Conservative confidence.** Borderline cases that would get a user question in interactive mode get marked stale in autonomous mode. Err toward stale-marking over incorrect action.
108
+ - **Detailed report as deliverable.** Since no user was present, the output report includes full rationale for each action so a human can review after the fact.
109
+ - **Process everything.** No scope narrowing questions — if no scope hint provided, process all docs. For broad scope, process clusters in impact order without asking.
110
+
111
+ ## Prevention
112
+
113
+ ### Skill review checklist additions
114
+
115
+ These five patterns should be checked during any skill review:
116
+
117
+ 1. **No hardcoded tool names** — All tool references use capability-first language with platform examples and a plain-text fallback
118
+ 2. **No contradictory rules across phases** — Trace each action type through all phases; verify absolute language ("always," "never") is not contradicted elsewhere
119
+ 3. **No blind user questions** — Every question presented to the user is informed by evidence the agent gathered first
120
+ 4. **No unsatisfied cross-skill preconditions** — Every skill handoff verifies the target skill's preconditions are met by the calling context
121
+ 5. **No shell commands for file operations in subagents** — Subagent instructions explicitly prefer dedicated tools over shell commands
122
+ 6. **Autonomous mode for long-running skills** — Any skill that could run unattended should support an explicit opt-in mode with conservative confidence and detailed reporting
123
+
124
+ ### Key anti-patterns
125
+
126
+ | Anti-pattern | Better pattern |
127
+ |---|---|
128
+ | "Use the AskUserQuestion tool when available" | "Use the platform's interactive question tool (e.g. AskUserQuestion in Claude Code, request_user_input in Codex)" |
129
+ | Defining auto-archive conditions, then "always ask before archiving" | Single-source-of-truth: define the rule once, reference it elsewhere |
130
+ | "Which area should we review?" before any investigation | Triage first, recommend with evidence, let user confirm or redirect |
131
+ | "Create a successor learning through ce:compound" during a refresh | Replacement subagent writes directly using gathered evidence |
132
+ | No tool guidance for subagents | "Use dedicated file search and read tools, not shell commands" |
133
+ | Auto-detecting "no question tool = headless" | Explicit `mode:autonomous` argument — interactive agents without question tools are still interactive |
134
+
135
+ ## Cross-References
136
+
137
+ - **PR #260**: The PR containing all these improvements
138
+ - **Issue #204**: Platform-agnostic tool references (AskUserQuestion dependency)
139
+ - **Issue #221**: Motivating issue for maintenance at scale
140
+ - **PR #242**: ce:audit (detection counterpart, closed)
141
+ - **PR #150**: Established subagent context-isolation pattern
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@every-env/compound-plugin",
3
- "version": "2.37.1",
3
+ "version": "2.39.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "bin": {
@@ -76,10 +76,10 @@ When adding or modifying skills, verify compliance with skill-creator spec:
76
76
  - [ ] Use imperative/infinitive form (verb-first instructions)
77
77
  - [ ] Avoid second person ("you should") - use objective language ("To accomplish X, do Y")
78
78
 
79
- ### AskUserQuestion Usage
79
+ ### Cross-Platform User Interaction
80
80
 
81
- - [ ] If the skill uses `AskUserQuestion`, it must include an "Interaction Method" preamble explaining the numbered-list fallback for non-Claude environments
82
- - [ ] Prefer avoiding `AskUserQuestion` entirely (see `brainstorming/SKILL.md` pattern) for skills intended to run cross-platform
81
+ - [ ] When a skill needs to ask the user a question, instruct use of the platform's blocking question tool and name the known equivalents (`AskUserQuestion` in Claude Code, `request_user_input` in Codex, `ask_user` in Gemini)
82
+ - [ ] Include a fallback for environments without a question tool (e.g., present numbered options and wait for the user's reply before proceeding)
83
83
 
84
84
  ### Quick Validation Command
85
85
 
@@ -7,7 +7,7 @@ AI-powered development tools that get smarter with every use. Make each unit of
7
7
  | Component | Count |
8
8
  |-----------|-------|
9
9
  | Agents | 28 |
10
- | Commands | 22 |
10
+ | Commands | 23 |
11
11
  | Skills | 20 |
12
12
  | MCP Servers | 1 |
13
13
 
@@ -81,6 +81,7 @@ Core workflow commands use `ce:` prefix to unambiguously identify them as compou
81
81
  | `/ce:review` | Run comprehensive code reviews |
82
82
  | `/ce:work` | Execute work items systematically |
83
83
  | `/ce:compound` | Document solved problems to compound team knowledge |
84
+ | `/ce:compound-refresh` | Refresh stale or drifting learnings and decide whether to keep, update, replace, or archive them |
84
85
 
85
86
  > **Deprecated aliases:** `/workflows:plan`, `/workflows:work`, `/workflows:review`, `/workflows:brainstorm`, `/workflows:compound` still work but show a deprecation warning. Use `ce:*` equivalents.
86
87
 
@@ -130,7 +131,6 @@ Core workflow commands use `ce:` prefix to unambiguously identify them as compou
130
131
 
131
132
  | Skill | Description |
132
133
  |-------|-------------|
133
- | `brainstorming` | Explore requirements and approaches through collaborative dialogue |
134
134
  | `document-review` | Improve documents through structured self-review |
135
135
  | `every-style-editor` | Review copy for Every's style guide compliance |
136
136
  | `file-todos` | File-based todo tracking system |
@@ -1,16 +1,38 @@
1
1
  ---
2
2
  name: ce:brainstorm
3
- description: Explore requirements and approaches through collaborative dialogue before planning implementation
3
+ description: '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.'
4
4
  argument-hint: "[feature idea or problem to explore]"
5
5
  ---
6
6
 
7
7
  # Brainstorm a Feature or Improvement
8
8
 
9
- **Note: The current year is 2026.** Use this when dating brainstorm documents.
9
+ **Note: The current year is 2026.** Use this when dating requirements documents.
10
10
 
11
11
  Brainstorming helps answer **WHAT** to build through collaborative dialogue. It precedes `/ce:plan`, which answers **HOW** to build it.
12
12
 
13
- **Process knowledge:** Load the `brainstorming` skill for detailed question techniques, approach exploration patterns, and YAGNI principles.
13
+ 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.
14
+
15
+ This skill does not implement code. It explores, clarifies, and documents decisions for later planning or execution.
16
+
17
+ ## Core Principles
18
+
19
+ 1. **Assess scope first** - Match the amount of ceremony to the size and ambiguity of the work.
20
+ 2. **Be a thinking partner** - Suggest alternatives, challenge assumptions, and explore what-ifs instead of only extracting requirements.
21
+ 3. **Resolve product decisions here** - User-facing behavior, scope boundaries, and success criteria belong in this workflow. Detailed implementation belongs in planning.
22
+ 4. **Keep implementation out of the requirements doc by default** - Do not include libraries, schemas, endpoints, file layouts, or code-level design unless the brainstorm itself is inherently about a technical or architectural change.
23
+ 5. **Right-size the artifact** - Simple work gets a compact requirements document or brief alignment. Larger work gets a fuller document. Do not add ceremony that does not help planning.
24
+ 6. **Apply YAGNI to carrying cost, not coding effort** - Prefer the simplest approach that delivers meaningful value. Avoid speculative complexity and hypothetical future-proofing, but low-cost polish or delight is worth including when its ongoing cost is small and easy to maintain.
25
+
26
+ ## Interaction Rules
27
+
28
+ 1. **Ask one question at a time** - Do not batch several unrelated questions into one message.
29
+ 2. **Prefer single-select multiple choice** - Use single-select when choosing one direction, one priority, or one next step.
30
+ 3. **Use multi-select rarely and intentionally** - Use it only for compatible sets such as goals, constraints, non-goals, or success criteria that can all coexist. If prioritization matters, follow up by asking which selected item is primary.
31
+ 4. **Use the platform's question tool when available** - When asking the user a question, prefer the platform's blocking question tool if one exists (`AskUserQuestion` in Claude Code, `request_user_input` in Codex, `ask_user` in Gemini). Otherwise, present numbered options in chat and wait for the user's reply before proceeding.
32
+
33
+ ## Output Guidance
34
+
35
+ - **Keep outputs concise** - Prefer short sections, brief bullets, and only enough detail to support the next decision.
14
36
 
15
37
  ## Feature Description
16
38
 
@@ -22,9 +44,16 @@ Do not proceed until you have a feature description from the user.
22
44
 
23
45
  ## Execution Flow
24
46
 
25
- ### Phase 0: Assess Requirements Clarity
47
+ ### Phase 0: Resume, Assess, and Route
48
+
49
+ #### 0.1 Resume Existing Work When Appropriate
26
50
 
27
- Evaluate whether brainstorming is needed based on the feature description.
51
+ If the user references an existing brainstorm topic or document, or there is an obvious recent matching `*-requirements.md` file in `docs/brainstorms/`:
52
+ - Read the document
53
+ - Confirm with the user before resuming: "Found an existing requirements doc for [topic]. Should I continue from this, or start fresh?"
54
+ - If resuming, summarize the current state briefly, continue from its existing decisions and outstanding questions, and update the existing document instead of creating a duplicate
55
+
56
+ #### 0.2 Assess Whether Brainstorming Is Needed
28
57
 
29
58
  **Clear requirements indicators:**
30
59
  - Specific acceptance criteria provided
@@ -33,71 +62,228 @@ Evaluate whether brainstorming is needed based on the feature description.
33
62
  - Constrained, well-defined scope
34
63
 
35
64
  **If requirements are already clear:**
36
- Use **AskUserQuestion tool** to suggest: "Your requirements seem detailed enough to proceed directly to planning. Should I run `/ce:plan` instead, or would you like to explore the idea further?"
65
+ 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.
66
+
67
+ #### 0.3 Assess Scope
68
+
69
+ Use the feature description plus a light repo scan to classify the work:
70
+ - **Lightweight** - small, well-bounded, low ambiguity
71
+ - **Standard** - normal feature or bounded refactor with some decisions to make
72
+ - **Deep** - cross-cutting, strategic, or highly ambiguous
73
+
74
+ If the scope is unclear, ask one targeted question to disambiguate and then proceed.
37
75
 
38
76
  ### Phase 1: Understand the Idea
39
77
 
40
- #### 1.1 Repository Research (Lightweight)
78
+ #### 1.1 Existing Context Scan
79
+
80
+ Scan the repo before substantive brainstorming. Match depth to scope:
81
+
82
+ **Lightweight** — Search for the topic, check if something similar already exists, and move on.
83
+
84
+ **Standard and Deep** — Two passes:
41
85
 
42
- Run a quick repo scan to understand existing patterns:
86
+ *Constraint Check* Check project instruction files (`AGENTS.md`, `CLAUDE.md`) for workflow, product, or scope constraints that affect the brainstorm. If these add nothing, move on.
43
87
 
44
- - Task compound-engineering:research:repo-research-analyst("Understand existing patterns related to: <feature_description>")
88
+ *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.
45
89
 
46
- Focus on: similar features, established patterns, CLAUDE.md guidance.
90
+ If nothing obvious appears after a short scan, say so and continue. Do not drift into technical planning — avoid inspecting tests, migrations, deployment, or low-level architecture unless the brainstorm is itself about a technical decision.
47
91
 
48
- #### 1.2 Collaborative Dialogue
92
+ #### 1.2 Product Pressure Test
49
93
 
50
- Use the **AskUserQuestion tool** to ask questions **one at a time**.
94
+ Before generating approaches, challenge the request to catch misframing. Match depth to scope:
51
95
 
52
- **Guidelines (see `brainstorming` skill for detailed techniques):**
96
+ **Lightweight:**
97
+ - Is this solving the real user problem?
98
+ - Are we duplicating something that already covers this?
99
+ - Is there a clearly better framing with near-zero extra cost?
100
+
101
+ **Standard:**
102
+ - Is this the right problem, or a proxy for a more important one?
103
+ - What user or business outcome actually matters here?
104
+ - What happens if we do nothing?
105
+ - Is there a nearby framing that creates more user value without more carrying cost? If so, what complexity does it add?
106
+ - Given the current project state, user goal, and constraints, what is the single highest-leverage move right now: the request as framed, a reframing, one adjacent addition, a simplification, or doing nothing?
107
+ - Favor moves that compound value, reduce future carrying cost, or make the product meaningfully more useful or compelling
108
+ - Use the result to sharpen the conversation, not to bulldoze the user's intent
109
+
110
+ **Deep** — Standard questions plus:
111
+ - What durable capability should this create in 6-12 months?
112
+ - Does this move the product toward that, or is it only a local patch?
113
+
114
+ #### 1.3 Collaborative Dialogue
115
+
116
+ Use the platform's blocking question tool when available (see Interaction Rules). Otherwise, present numbered options in chat and wait for the user's reply before proceeding.
117
+
118
+ **Guidelines:**
119
+ - Ask questions **one at a time**
53
120
  - Prefer multiple choice when natural options exist
54
- - Start broad (purpose, users) then narrow (constraints, edge cases)
55
- - Validate assumptions explicitly
56
- - Ask about success criteria
121
+ - Prefer **single-select** when choosing one direction, one priority, or one next step
122
+ - Use **multi-select** only for compatible sets that can all coexist; if prioritization matters, ask which selected item is primary
123
+ - Start broad (problem, users, value) then narrow (constraints, exclusions, edge cases)
124
+ - Clarify the problem frame, validate assumptions, and ask about success criteria
125
+ - Make requirements concrete enough that planning will not need to invent behavior
126
+ - Surface dependencies or prerequisites only when they materially affect scope
127
+ - Resolve product decisions here; leave technical implementation choices for planning
128
+ - Bring ideas, alternatives, and challenges instead of only interviewing
57
129
 
58
- **Exit condition:** Continue until the idea is clear OR user says "proceed"
130
+ **Exit condition:** Continue until the idea is clear OR the user explicitly wants to proceed.
59
131
 
60
132
  ### Phase 2: Explore Approaches
61
133
 
62
- Propose **2-3 concrete approaches** based on research and conversation.
134
+ If multiple plausible directions remain, propose **2-3 concrete approaches** based on research and conversation. Otherwise state the recommended direction directly.
135
+
136
+ When useful, include one deliberately higher-upside alternative:
137
+ - Identify what adjacent addition or reframing would most increase usefulness, compounding value, or durability without disproportionate carrying cost. Present it as a challenger option alongside the baseline, not as the default. Omit it when the work is already obviously over-scoped or the baseline request is clearly the right move.
63
138
 
64
139
  For each approach, provide:
65
140
  - Brief description (2-3 sentences)
66
141
  - Pros and cons
142
+ - Key risks or unknowns
67
143
  - When it's best suited
68
144
 
69
- Lead with your recommendation and explain why. Apply YAGNI—prefer simpler solutions.
145
+ Lead with 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.
146
+
147
+ If one approach is clearly best and alternatives are not meaningful, skip the menu and state the recommendation directly.
148
+
149
+ If relevant, call out whether the choice is:
150
+ - Reuse an existing pattern
151
+ - Extend an existing capability
152
+ - Build something net new
153
+
154
+ ### Phase 3: Capture the Requirements
155
+
156
+ Write or update a requirements document only when the conversation produced durable decisions worth preserving.
157
+
158
+ This document should behave like a lightweight PRD without PRD ceremony. Include what planning needs to execute well, and skip sections that add no value for the scope.
159
+
160
+ The requirements document is for product definition and scope control. Do **not** include implementation details such as libraries, schemas, endpoints, file layouts, or code structure unless the brainstorm is inherently technical and those details are themselves the subject of the decision.
161
+
162
+ **Required content for non-trivial work:**
163
+ - Problem frame
164
+ - Concrete requirements or intended behavior with stable IDs
165
+ - Scope boundaries
166
+ - Success criteria
167
+
168
+ **Include when materially useful:**
169
+ - Key decisions and rationale
170
+ - Dependencies or assumptions
171
+ - Outstanding questions
172
+ - Alternatives considered
173
+ - High-level technical direction only when the work is inherently technical and the direction is part of the product/architecture decision
174
+
175
+ **Document structure:** Use this template and omit clearly inapplicable optional sections:
70
176
 
71
- Use **AskUserQuestion tool** to ask which approach the user prefers.
177
+ ```markdown
178
+ ---
179
+ date: YYYY-MM-DD
180
+ topic: <kebab-case-topic>
181
+ ---
182
+
183
+ # <Topic Title>
184
+
185
+ ## Problem Frame
186
+ [Who is affected, what is changing, and why it matters]
187
+
188
+ ## Requirements
189
+ - R1. [Concrete user-facing behavior or requirement]
190
+ - R2. [Concrete user-facing behavior or requirement]
191
+
192
+ ## Success Criteria
193
+ - [How we will know this solved the right problem]
194
+
195
+ ## Scope Boundaries
196
+ - [Deliberate non-goal or exclusion]
197
+
198
+ ## Key Decisions
199
+ - [Decision]: [Rationale]
200
+
201
+ ## Dependencies / Assumptions
202
+ - [Only include if material]
203
+
204
+ ## Outstanding Questions
205
+
206
+ ### Resolve Before Planning
207
+ - [Affects R1][User decision] [Question that must be answered before planning can proceed]
208
+
209
+ ### Deferred to Planning
210
+ - [Affects R2][Technical] [Question that should be answered during planning or codebase exploration]
211
+ - [Affects R2][Needs research] [Question that likely requires research during planning]
212
+
213
+ ## Next Steps
214
+ [If `Resolve Before Planning` is empty: `→ /ce:plan` for structured implementation planning]
215
+ [If `Resolve Before Planning` is not empty: `→ Resume /ce:brainstorm` to resolve blocking questions before planning]
216
+ ```
217
+
218
+ For **Standard** and **Deep** brainstorms, a requirements document is usually warranted.
72
219
 
73
- ### Phase 3: Capture the Design
220
+ 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.
74
221
 
75
- Write a brainstorm document to `docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md`.
222
+ For very small requirements docs with only 1-3 simple requirements, plain bullet requirements are acceptable. For **Standard** and **Deep** requirements docs, use stable IDs like `R1`, `R2`, `R3` so planning and later review can refer to them unambiguously.
76
223
 
77
- **Document structure:** See the `brainstorming` skill for the template format. Key sections: What We're Building, Why This Approach, Key Decisions, Open Questions.
224
+ When the work is simple, combine sections rather than padding them. A short requirements document is better than a bloated one.
225
+
226
+ Before finalizing, check:
227
+ - What would `ce:plan` still have to invent if this brainstorm ended now?
228
+ - Do any requirements depend on something claimed to be out of scope?
229
+ - Are any unresolved items actually product decisions rather than planning questions?
230
+ - Did implementation details leak in when they shouldn't have?
231
+ - Is there a low-cost change that would make this materially more useful?
232
+
233
+ If planning would need to invent product behavior, scope boundaries, or success criteria, the brainstorm is not complete yet.
78
234
 
79
235
  Ensure `docs/brainstorms/` directory exists before writing.
80
236
 
81
- **IMPORTANT:** Before proceeding to Phase 4, check if there are any Open Questions listed in the brainstorm document. If there are open questions, YOU MUST ask the user about each one using AskUserQuestion before offering to proceed to planning. Move resolved questions to a "Resolved Questions" section.
237
+ If a document contains outstanding questions:
238
+ - Use `Resolve Before Planning` only for questions that truly block planning
239
+ - If `Resolve Before Planning` is non-empty, keep working those questions during the brainstorm by default
240
+ - If the user explicitly wants to proceed anyway, convert each remaining item into an explicit decision, assumption, or `Deferred to Planning` question before proceeding
241
+ - Do not force resolution of technical questions during brainstorming just to remove uncertainty
242
+ - Put technical questions, or questions that require validation or research, under `Deferred to Planning` when they are better answered there
243
+ - Use tags like `[Needs research]` when the planner should likely investigate the question rather than answer it from repo context alone
244
+ - Carry deferred questions forward explicitly rather than treating them as a failure to finish the requirements doc
82
245
 
83
246
  ### Phase 4: Handoff
84
247
 
85
- Use **AskUserQuestion tool** to present next steps:
248
+ #### 4.1 Present Next-Step Options
249
+
250
+ Present next steps using the platform's blocking question tool when available (see Interaction Rules). Otherwise present numbered options in chat and end the turn.
251
+
252
+ If `Resolve Before Planning` contains any items:
253
+ - Ask the blocking questions now, one at a time, by default
254
+ - If the user explicitly wants to proceed anyway, first convert each remaining item into an explicit decision, assumption, or `Deferred to Planning` question
255
+ - If the user chooses to pause instead, present the handoff as paused or blocked rather than complete
256
+ - Do not offer `Proceed to planning` or `Proceed directly to work` while `Resolve Before Planning` remains non-empty
257
+
258
+ **Question when no blocking questions remain:** "Brainstorm complete. What would you like to do next?"
259
+
260
+ **Question when blocking questions remain and user wants to pause:** "Brainstorm paused. Planning is blocked until the remaining questions are resolved. What would you like to do next?"
261
+
262
+ Present only the options that apply:
263
+ - **Proceed to planning (Recommended)** - Run `/ce:plan` for structured implementation planning
264
+ - **Proceed directly to work** - Only offer this when scope is lightweight, success criteria are clear, scope boundaries are clear, and no meaningful technical or research questions remain
265
+ - **Review and refine** - Offer this only when a requirements document exists and can be improved through structured review
266
+ - **Ask more questions** - Continue clarifying scope, preferences, or edge cases
267
+ - **Share to Proof** - Offer this only when a requirements document exists
268
+ - **Done for now** - Return later
269
+
270
+ If the direct-to-work gate is not satisfied, omit that option entirely.
86
271
 
87
- **Question:** "Brainstorm captured. What would you like to do next?"
272
+ #### 4.2 Handle the Selected Option
88
273
 
89
- **Options:**
90
- 1. **Review and refine** - Improve the document through structured self-review
91
- 2. **Proceed to planning** - Run `/ce:plan` (will auto-detect this brainstorm)
92
- 3. **Share to Proof** - Upload to Proof for collaborative review and sharing
93
- 4. **Ask more questions** - I have more questions to clarify before moving on
94
- 5. **Done for now** - Return later
274
+ **If user selects "Proceed to planning (Recommended)":**
275
+
276
+ Immediately run `/ce:plan` in the current session. Pass the requirements document path when one exists; otherwise pass a concise summary of the finalized brainstorm decisions. Do not print the closing summary first.
277
+
278
+ **If user selects "Proceed directly to work":**
279
+
280
+ Immediately run `/ce:work` in the current session using the finalized brainstorm output as context. If a compact requirements document exists, pass its path. Do not print the closing summary first.
95
281
 
96
282
  **If user selects "Share to Proof":**
97
283
 
98
284
  ```bash
99
- CONTENT=$(cat docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md)
100
- TITLE="Brainstorm: <topic title>"
285
+ CONTENT=$(cat docs/brainstorms/YYYY-MM-DD-<topic>-requirements.md)
286
+ TITLE="Requirements: <topic title>"
101
287
  RESPONSE=$(curl -s -X POST https://www.proofeditor.ai/share/markdown \
102
288
  -H "Content-Type: application/json" \
103
289
  -d "$(jq -n --arg title "$TITLE" --arg markdown "$CONTENT" --arg by "ai:compound" '{title: $title, markdown: $markdown, by: $by}')")
@@ -108,38 +294,42 @@ Display the URL prominently: `View & collaborate in Proof: <PROOF_URL>`
108
294
 
109
295
  If the curl fails, skip silently. Then return to the Phase 4 options.
110
296
 
111
- **If user selects "Ask more questions":** YOU (Claude) return to Phase 1.2 (Collaborative Dialogue) and continue asking the USER questions one at a time to further refine the design. The user wants YOU to probe deeper - ask about edge cases, constraints, preferences, or areas not yet explored. Continue until the user is satisfied, then return to Phase 4.
297
+ **If user selects "Ask more questions":** Return to Phase 1.3 (Collaborative Dialogue) and continue asking the user questions one at a time to further refine the design. Probe deeper into edge cases, constraints, preferences, or areas not yet explored. Continue until the user is satisfied, then return to Phase 4. Do not show the closing summary yet.
112
298
 
113
299
  **If user selects "Review and refine":**
114
300
 
115
- Load the `document-review` skill and apply it to the brainstorm document.
301
+ Load the `document-review` skill and apply it to the requirements document.
116
302
 
117
- When document-review returns "Review complete", present next steps:
303
+ When document-review returns "Review complete", return to the normal Phase 4 options and present only the options that still apply. Do not show the closing summary yet.
118
304
 
119
- 1. **Move to planning** - Continue to `/ce:plan` with this document
120
- 2. **Done for now** - Brainstorming complete. To start planning later: `/ce:plan [document-path]`
305
+ #### 4.3 Closing Summary
121
306
 
122
- ## Output Summary
307
+ Use the closing summary only when this run of the workflow is ending or handing off, not when returning to the Phase 4 options.
123
308
 
124
- When complete, display:
309
+ When complete and ready for planning, display:
125
310
 
126
- ```
311
+ ```text
127
312
  Brainstorm complete!
128
313
 
129
- Document: docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md
314
+ Requirements doc: docs/brainstorms/YYYY-MM-DD-<topic>-requirements.md # if one was created
130
315
 
131
316
  Key decisions:
132
317
  - [Decision 1]
133
318
  - [Decision 2]
134
319
 
135
- Next: Run `/ce:plan` when ready to implement.
320
+ Recommended next step: `/ce:plan`
136
321
  ```
137
322
 
138
- ## Important Guidelines
323
+ If the user pauses with `Resolve Before Planning` still populated, display:
139
324
 
140
- - **Stay focused on WHAT, not HOW** - Implementation details belong in the plan
141
- - **Ask one question at a time** - Don't overwhelm
142
- - **Apply YAGNI** - Prefer simpler approaches
143
- - **Keep outputs concise** - 200-300 words per section max
325
+ ```text
326
+ Brainstorm paused.
144
327
 
145
- NEVER CODE! Just explore and document decisions.
328
+ Requirements doc: docs/brainstorms/YYYY-MM-DD-<topic>-requirements.md # if one was created
329
+
330
+ Planning is blocked by:
331
+ - [Blocking question 1]
332
+ - [Blocking question 2]
333
+
334
+ Resume with `/ce:brainstorm` when ready to resolve these before planning.
335
+ ```