@fro.bot/systematic 2.25.0 → 2.27.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.
Files changed (50) hide show
  1. package/agents/design/design-implementation-reviewer.md +1 -0
  2. package/agents/design/design-iterator.md +1 -0
  3. package/agents/design/figma-design-sync.md +1 -0
  4. package/agents/docs/ankane-readme-writer.md +1 -0
  5. package/agents/document-review/adversarial-document-reviewer.md +1 -0
  6. package/agents/document-review/coherence-reviewer.md +1 -0
  7. package/agents/document-review/design-lens-reviewer.md +1 -0
  8. package/agents/document-review/feasibility-reviewer.md +1 -0
  9. package/agents/document-review/product-lens-reviewer.md +1 -0
  10. package/agents/document-review/scope-guardian-reviewer.md +1 -0
  11. package/agents/document-review/security-lens-reviewer.md +1 -0
  12. package/agents/research/best-practices-researcher.md +1 -0
  13. package/agents/research/framework-docs-researcher.md +1 -0
  14. package/agents/research/git-history-analyzer.md +1 -0
  15. package/agents/research/issue-intelligence-analyst.md +1 -0
  16. package/agents/research/learnings-researcher.md +1 -0
  17. package/agents/research/repo-research-analyst.md +1 -0
  18. package/agents/research/slack-researcher.md +1 -0
  19. package/agents/review/adversarial-reviewer.md +1 -0
  20. package/agents/review/agent-native-reviewer.md +1 -0
  21. package/agents/review/architecture-strategist.md +1 -0
  22. package/agents/review/cli-agent-readiness-reviewer.md +1 -0
  23. package/agents/review/cli-readiness-reviewer.md +1 -0
  24. package/agents/review/code-simplicity-reviewer.md +1 -0
  25. package/agents/review/data-integrity-guardian.md +1 -0
  26. package/agents/review/data-migration-expert.md +1 -0
  27. package/agents/review/deployment-verification-agent.md +1 -0
  28. package/agents/review/pattern-recognition-specialist.md +1 -0
  29. package/agents/review/performance-oracle.md +1 -0
  30. package/agents/review/previous-comments-reviewer.md +1 -0
  31. package/agents/review/project-standards-reviewer.md +1 -0
  32. package/agents/review/schema-drift-detector.md +1 -0
  33. package/agents/review/security-sentinel.md +1 -0
  34. package/agents/review/testing-reviewer.md +1 -0
  35. package/agents/workflow/pr-comment-resolver.md +1 -0
  36. package/agents/workflow/spec-flow-analyzer.md +1 -0
  37. package/package.json +1 -1
  38. package/skills/ce-brainstorm/SKILL.md +18 -1
  39. package/skills/ce-brainstorm/references/brainstorm-sections.md +50 -0
  40. package/skills/ce-brainstorm/references/markdown-rendering.md +202 -0
  41. package/skills/ce-brainstorm/references/requirements-capture.md +20 -0
  42. package/skills/ce-brainstorm/references/synthesis-summary.md +273 -0
  43. package/skills/ce-brainstorm/references/universal-brainstorming.md +1 -1
  44. package/skills/ce-brainstorm/references/visual-communication.md +29 -0
  45. package/skills/ce-plan/SKILL.md +120 -0
  46. package/skills/ce-plan/references/markdown-rendering.md +203 -0
  47. package/skills/ce-plan/references/plan-handoff.md +5 -5
  48. package/skills/ce-plan/references/plan-sections.md +117 -0
  49. package/skills/ce-plan/references/synthesis-summary.md +395 -0
  50. package/skills/ce-plan/references/universal-planning.md +3 -3
@@ -0,0 +1,395 @@
1
+ # Scoping Synthesis
2
+
3
+ **Scoping synthesis ≠ plan doc.** The scoping synthesis is the scope/decisions checkpoint that plan-write (Phase 5.2) consumes as input. It surfaces decisions the agent CAN make at synthesis time: scope-level (does this plan cover the full brainstorm or narrow to a subset?), posture (extend existing pattern vs. introduce new abstraction), test approach. It does NOT surface decisions plan-write produces: PR count, commit/branch sequencing, effort or time estimates, Implementation Unit lists, exact file paths, test command recipes. If the synthesis claims any of those, it has leaked plan-write thinking and must be re-cut to scope-decisions only. Even when the agent has formed plan-write opinions earlier in the session, the synthesis stays at scope altitude — the user is being asked to affirm scope, not to rubber-stamp implementation.
4
+
5
+ **Two-stage shape: internal draft, then chat-time synthesis.** The synthesis is composed in two stages. Stage 1 is an internal three-bucket draft (Stated / Inferred / Out of scope) the agent uses to think comprehensively about scope. Stage 2 is the compressed chat-time output: a tier-shaped summary plus "Call outs" (zero or more, capped by plan depth — see the cap table under "How many call-outs are right?") — the specific forks where the user might redirect. The user only sees stage 2. The internal draft still informs the plan body via the doc-shape routing below; it just doesn't reach the user verbatim. This split exists because the comprehensive audit shape produced too much detail for the user to weigh in on, even when the granularity rules were followed.
6
+
7
+ **Three-bucket structure is the internal draft, not the user-facing artifact.** It does its scope-thinking job during stage 1 and dissolves when Phase 5.2 writes the plan: Stated content informs Requirements, Inferred content informs Key Technical Decisions / Implementation Units (interactive mode) or `## Assumptions` (non-interactive mode), Out-of-scope content informs Scope Boundaries. The plan has no parallel `## Synthesis` section — only the stage-2 summary embeds, as `## Overview`. See "Doc shape after confirmation" below for the routing.
8
+
9
+ This content is loaded when a synthesis-summary phase fires in ce:plan. There are two variants — they share structure but differ in timing and content focus:
10
+
11
+ - **Solo variant** (Phase 0.7): fires after Phase 0.4 bootstrap and Phase 0.6 depth classification, before Phase 1 research begins. Catches scope misinterpretation before sub-agent dispatch is spent. Full breadth — problem frame, intended behavior, success criteria, in/out scope.
12
+ - **Brainstorm-sourced variant** (Phase 5.1.5): fires after Phase 1 research, before Phase 5.2 plan-write. Focuses on plan-time decisions (which files/modules to touch, which patterns extended vs. introduced new, test scope, refactor scope). Brainstorm-validated WHAT is assumed and not re-stated.
13
+
14
+ Both variants share the two-stage shape, the keep test for call-outs, soft-cut behavior, and the doc-shape routing. In non-interactive (headless) mode, both compose the internal draft and skip stage 2 — the user-facing compression is moot when there is no synchronous user. The internal draft dissolves into the plan body the same way, with Inferred bets routing to a `## Assumptions` section. See "Headless mode (shared)" below for the full routing.
15
+
16
+ ---
17
+
18
+ ## Stage 1: internal three-bucket draft (shared)
19
+
20
+ The internal draft is structured in three labeled buckets. Items may appear in two buckets when meaningfully both — flag the inclusion-then-exclusion as Inferred so the reasoning is captured.
21
+
22
+ - **Stated** — what the user said directly (in the original prompt, prior conversation, dialogue answers, or the upstream brainstorm doc when present). Items here have explicit user-language anchors.
23
+ - **Inferred** — what the agent assumed to fill gaps. Scope boundaries the user never explicitly named, success criteria extrapolated from intent, technical assumptions made because the brief interview didn't probe them. The Inferred list is the most actionable bucket — items here are the agent's bets that the user can correct.
24
+ - **Out of scope** — deliberately excluded items. Adjacent work the agent considered but decided not to include, refactors, nice-to-haves, future-work items.
25
+
26
+ This draft is internal. Do not paste it verbatim into chat. Compose it as a thinking step, then derive stage 2 from it.
27
+
28
+ ---
29
+
30
+ ## Stage 2: chat-time scoping synthesis
31
+
32
+ Stage 2 is what the user actually sees. The shape differs between variants because they serve different purposes — brainstorm-sourced plans inherit a validated WHAT and surface plan-specific HOW; solo plans have no upstream and the synthesis is the WHAT.
33
+
34
+ ### Brainstorm-sourced shape (Phase 5.1.5)
35
+
36
+ Two content sections plus call-outs:
37
+
38
+ 1. **Brainstorm-scope restatement** (1-2 sentences, prose). Restates the brainstorm's scope as orientation. The user wrote this content, but the synthesis may be read days later or in parallel with other plans — the restatement is the topic anchor that says "this is the artifact we're planning against." Stay in the brainstorm's own vocabulary. Do NOT enumerate Implementation Units, restate constraints back at the user, or list acceptance examples.
39
+
40
+ 2. **Plan-specific scoping decisions** (prose, or bullets when multi-faceted). Scope-level commitments the agent made that the brainstorm did not: does this plan cover the full brainstorm scope or narrow to a subset; are adjacent refactors pulled in or held out; what test scope at scenario level (which sites, which acceptance examples). Each item must pass the **affirmability test** — the user can affirm or redirect it without reading code. This section is scope claims at affirm-or-redirect level, NOT a description of where the implementation reaches, NOT PR count or commit sequencing, NOT Implementation Unit lists, NOT exact file paths or test commands — those are all plan-write outputs the synthesis cannot honestly claim. If the plan covers the full brainstorm scope with no narrowing, expansions, or adjacent work, this section stays short ("This plan covers the full brainstorm scope; test scope is X").
41
+
42
+ 3. **Call outs** (zero or more, capped by plan depth — see "How many call-outs are right?" below). Each a real fork where the user's input materially changes the plan. Omit the "Call outs:" header entirely when zero forks survived the keep test.
43
+
44
+ ### Solo shape (Phase 0.7)
45
+
46
+ No upstream document; the synthesis itself is the scope claim:
47
+
48
+ 1. **Scope claim** (prose, or bullets when multi-faceted). What the agent is planning to build, at affirm-or-redirect level — names what's in and what's out. NOT an enumeration of Implementation Units the plan will contain.
49
+
50
+ 2. **Call outs** (zero or more, capped by plan depth). Same as brainstorm-sourced.
51
+
52
+ ### Shape budgets
53
+
54
+ Tier-aware budgets are **ceilings, not targets**. Less is correct when there isn't more to say — filling the budget produces noise.
55
+
56
+ | Plan depth | Restatement (brainstorm-sourced) | Plan-specific scoping (brainstorm-sourced) / Scope claim (solo) |
57
+ |---|---|---|
58
+ | Lightweight | 1 sentence | 1-3 lines prose |
59
+ | Standard | 1-2 sentences | up to 3-5 lines or 2-4 bullets |
60
+ | Deep | 1-2 sentences | up to 4-6 lines or 3-6 bullets |
61
+
62
+ Form within each section (prose, bullets, mix) follows whatever communicates best.
63
+
64
+ ### Shared rules
65
+
66
+ - **No "Stated" bucket in chat** (the orientation or scope-claim covers it).
67
+ - **No "Out of scope" bucket as a separate list** — fold a non-obvious exclusion into a call-out when it survives the keep test, otherwise drop it.
68
+ - **Source-document vocabulary.** When a brainstorm exists, use its terms. Don't invent agent-coded shorthand. When referencing acceptance examples, requirements, or flows, name them in plain terms — never use bare IDs.
69
+
70
+ - **Pre-emit mechanical checks.** Before emitting the synthesis, scan the output:
71
+ - **Bare ID references** (`AE\d+`, `R\d+`, `F\d+`, `A\d+`, `U\d+`) → replace with plain names. Mixed forms (case named AND ID cited) still violate the rule because the ID adds noise without information.
72
+ - **File paths** (`path/like.md`, `path/like.py`, `internal/cli/...`, `skills/.../...`, etc.) → cut unless the path IS the topic of an explicit fork in the call-outs. Allowed: "cleanup hook in the existing archive step vs. a new dedicated phase" (where the path is implicit in the decision). Forbidden: paths listed to demonstrate completeness, preview Implementation Units, or describe where the implementation reaches. The synthesis names *what* the plan targets, not *where* the code lives.
73
+
74
+ ### The keep test for each call-out
75
+
76
+ Before keeping a candidate call-out from the internal draft, run the **affirmability test**: would the user need to look at code to evaluate this? If yes, it is plan-body content — cut. If no, apply the keep test — one of the following must be true:
77
+
78
+ - **Real fork**: another reasonable agent might choose differently on this dimension (extend pattern X vs. introduce abstraction Y; scan source A vs. source B; etc.)
79
+ - **Non-obvious behavioral choice**: a default the agent picked that the user would not see by reading the summary alone, but that materially affects what the plan does
80
+ - **Non-obvious exclusion**: an item was deliberately excluded that the user might want to add back in
81
+ - **Cheap-now-expensive-later correction**: a bet the user is well-placed to redirect now that would be expensive to undo after research or plan-write
82
+
83
+ Cut anything else, including:
84
+
85
+ - Mechanical items where there is no real alternative
86
+ - Implementation choices that will be settled during the work
87
+ - Items already implied by the summary
88
+
89
+ ### The detail test (per call-out and per summary bullet)
90
+
91
+ After the keep test, every surviving item runs the **detail test**: 1-2 lines max, conversational not documentary. A call-out or summary bullet that runs to 4+ lines of dense prose is naming an implementation consequence rather than a decision — re-cut at higher abstraction.
92
+
93
+ The keep test addresses *which* items survive. The detail test addresses *how much* each surviving item says.
94
+
95
+ ### How many call-outs are right?
96
+
97
+ The cap is heuristic, not law. The real discipline is the keep test on each candidate. Typical bounds by plan depth:
98
+
99
+ | Plan depth | Typical | Cap |
100
+ |---|---|---|
101
+ | Lightweight | 0-2 | 3 |
102
+ | Standard | 1-3 | 4 |
103
+ | Deep | 2-5 | 6 |
104
+
105
+ **If the stage-2 pass exceeds the tier cap, OR any call-out or summary bullet runs to 4+ lines of dense prose, the synthesis is misshapen — do not raise the cap or accept the bloat, re-cut at a higher level of abstraction.** Almost always, 2-3 of those call-outs are sub-decisions of one larger fork. Collapse related call-outs into a single decision named at the level the user actually weighs in on.
106
+
107
+ A useful test: read the call-outs aloud. If two or more sound like "and also" extensions of the same idea, they belong as one.
108
+
109
+ ### Anti-patterns in call-outs
110
+
111
+ Each anti-pattern below produces a call-out that fails the affirmability test. If a candidate call-out matches one of these, it is plan-body content — cut, do not rephrase.
112
+
113
+ - Names a file path or module name
114
+ - Names a flag, env var, or exact env value
115
+ - Specifies a JSON shape, response format, or exact data structure
116
+ - Names HTTP status codes, event names, or exact error wording
117
+ - Describes implementation flow ("first X, then Y, then Z")
118
+ - Names exact method signatures, call graphs, or SQL syntax
119
+ - States a mechanical choice with no real alternative
120
+
121
+ ---
122
+
123
+ ## When to skip the blocking confirmation
124
+
125
+ The auto-proceed path (announce without waiting for user confirmation) fires only when **plan depth is Lightweight AND zero call-outs survive the keep test**. For Standard or Deep plans, always fire the confirmation gate even when zero call-outs survive — substance earns the checkpoint, not interaction history.
126
+
127
+ When auto-proceed applies (Lightweight + zero call-outs), emit a one-line announcement and continue:
128
+
129
+ ```
130
+ Planning: [1-3 line summary]
131
+
132
+ No open decisions to weigh in on — proceeding to [research / plan-write]. Interrupt if I have the scope wrong.
133
+ ```
134
+
135
+ The announcement is mandatory when skipping — silent proceeding is not allowed.
136
+
137
+ ---
138
+
139
+ ## Synthesis structural discipline (shared)
140
+
141
+ Both variants share these structural rules. They address failure modes where the synthesis becomes a Phase 5.2 (plan-write) preview instead of a scope checkpoint.
142
+
143
+ **Summary leads, call-outs follow** — not the reverse, and no separate framing block above.
144
+
145
+ **Anti-pattern: synthesis as plan-pitch.** Plan-body content — file paths, code shapes, sentinel strings, exact error messages, "Recommendation" / "Behavior when X" / "Why this shape" rationale — does not belong in chat output regardless of where it appears. The synthesis is a scope/decisions checkpoint: a tier-budgeted summary plus call-outs bounded by the tiered cap.
146
+
147
+ **Anti-pattern: numerical attestation.** "All nine requirements covered," "all three flows in scope," counts of files or test scenarios. These are the agent showing its work, not naming scope decisions. Cut the numbers; keep the scope claim.
148
+
149
+ **A revision is not a confirmation.** After any user revision (even a trivially-understood swap), integrate the change, re-present the revised stage 2 with the change reflected, and wait for explicit confirmation before writing the plan. The loop is:
150
+
151
+ 1. Present stage 2 → user responds
152
+ 2. User confirms → write the plan
153
+ 3. User revises → integrate, re-present revised stage 2, return to step 1
154
+
155
+ Plan-write (Phase 5.2) fires only on explicit confirm or after the soft-cut blocking question's "proceed" option.
156
+
157
+ ---
158
+
159
+ ## Granularity: name the decision; don't expand it (shared)
160
+
161
+ Each call-out should be affirmable or rejectable by the user **without reading code**. Name the decision at the granularity that lets the user say "yes" or "I want X instead." Anything more specific is plan-body content — Phase 5.2's job, not synthesis's.
162
+
163
+ **Allowed** (when these ARE the decisions being made):
164
+ - File / module names — when "where to put it" is the choice
165
+ - Pattern names — when "extend vs. introduce" is the choice
166
+ - Column / table names — when "which source" is the choice
167
+ - Approach posture — when "which strategy" is the choice
168
+
169
+ **Not allowed** (always plan-body, regardless of variant):
170
+ - Line numbers
171
+ - Exact method signatures, call graphs, or implementation flow
172
+ - Exact JSON / response shapes
173
+ - HTTP status codes, event names, or exact error wording
174
+ - Exact wording of error messages or UI labels
175
+ - SQL syntax or query bodies
176
+
177
+ The line is drawn slightly differently per variant. **Solo (Phase 0.7)** stays at the higher level — brainstorm's WHAT hasn't been validated yet, so file/module names are usually too specific; talk in terms of "the rule entity," not "syncRules table." **Brainstorm-sourced (Phase 5.1.5)** allows the file / module / pattern / column level when those ARE plan-time decisions, but not implementation flow specifics.
178
+
179
+ ### Bad-vs-good examples
180
+
181
+ | Plan-body in call-out (wrong) | Decision-level (right) |
182
+ |---|---|
183
+ | Timezone source: `users.timezone` (IANA), fallback to destination calendar TZ if null. Research found `useTimezoneSync` and `ProtectionStatsCalculator` establish the pattern. | Timezone source: user-TZ (reverses brainstorm's tentative lean — research found established infra and pattern precedent) |
184
+ | Skip filter goes in `RuleMatcher.eventMatchesRule` at the top, before include/exclude evaluation, using the existing `filteredReason` mechanism. | Skip filter extends the existing event-skip pattern in the matcher (vs. introducing a new mechanism) |
185
+ | Reactivation guard: explicit safety in the PATCH route — when `isActive: false → true`, the existing handler clears `status/pausedAt/pausedReason`. | Reactivation guard: pause window state preserved through the isActive toggle's existing system-pause-clearing path |
186
+ | Partial cleanup failure response: `{pause, cleanup: {eventsDeleted, eventsFailed, errors}}`; pause window persists regardless of cleanup outcome. | Partial cleanup failure: pause window persists; partial-failure response mirrors the existing rule-edit precedent |
187
+
188
+ The test: a scanner reading a call-out should affirm or reject it without needing to read code.
189
+
190
+ ### Worked example: compression from internal draft to call-outs
191
+
192
+ For a PII redaction gate proposal where the internal draft had 4 Stated items, 7 Inferred items, and 3 Out-of-scope items, the compressed stage 2 looks like:
193
+
194
+ ```
195
+ Planning a mechanical PII redaction gate before promote (the unguarded leak path from the amazon-orders retro) and alongside the existing vendor-prefix scanner at publish. Phase-1 detectors are shape-only — card last-4, postal address, JSON person names. Default halts; per-finding ack via flag.
196
+
197
+ **Call outs:**
198
+ - Person-name filter works by JSON key (allowlist of attribution keys: printer, printer_name, owner_name, author), not by name value.
199
+ - Promote scans the working-dir snapshot before the copy step, not the staged copy.
200
+ - Publish combines PII + vendor-prefix findings into one report, not fail-fast on first.
201
+
202
+ Confirm and I'll proceed to research, drawing on this scope.
203
+ ```
204
+
205
+ What got cut from the internal draft and why:
206
+
207
+ - Module name — plan-body content (file path), fails affirmability test
208
+ - Flag name — plan-body content (exact flag string), fails affirmability test
209
+ - "No new dependencies — stdlib regexp + filepath.WalkDir only" — mechanical, no real alternative
210
+ - "Detector regex precision tuned during implementation" — deferred-impl, not a plan-time fork
211
+ - All three Out-of-scope items — either restated in prose or implicitly excluded by scope
212
+
213
+ What survived: three real forks where another reasonable agent might choose differently and the user can correct cheaply now.
214
+
215
+ ---
216
+
217
+ ## Solo variant (Phase 0.7)
218
+
219
+ Fires only when:
220
+ - Phase 0.2 found no upstream brainstorm doc
221
+ - AND Phase 0.4 stayed in ce:plan (did not route to ce:debug, ce:work, or universal-planning)
222
+ - AND Phase 0.5 cleared (no unresolved blockers)
223
+ - AND not on Phase 0.1 fast paths (resume normal, deepen-intent)
224
+
225
+ Each guard is an explicit conditional in SKILL.md, not implicit. Phase 0.7 does NOT fire on resume/deepen, route-out, or brainstorm-sourced paths.
226
+
227
+ **Content focus**: full-breadth internal draft. Phase 0.4 bootstrap is brief by design ("ask one or two clarifying questions"), so the agent has made substantial inferences before Phase 0.7 fires. The Inferred bucket in the internal draft is especially load-bearing here — the agent's bets are widest. Stage 2 compression still applies: most of those inferences will not survive the keep test, and that is correct — the user should only see the forks they can meaningfully redirect.
228
+
229
+ **Counter-warning for rich-context invocations.** When the inference source is *not* just Phase 0.4 bootstrap — e.g., a prior in-conversation validation agent, completed sibling work units earlier in the same session, or a planning artifact already in the conversation — the temptation is to dump that material into call-outs verbatim. The granularity rules tighten in this case, not loosen: the agent has more material to compress, not more material to expose. A bet that's already been validated upstream is **Stated** (internal), not Inferred (internal); a bet whose specifics belong in plan-body is named at decision-level in the call-out regardless of how much detail upstream context provided.
230
+
231
+ **Why pre-research, not pre-write**: research effort would be wasted if scope is wrong. Catching scope errors before sub-agent dispatch (Phase 1.1's systematic:research:repo-research-analyst, systematic:research:learnings-researcher, etc.) saves token and time cost.
232
+
233
+ ### Stage 2 template (solo)
234
+
235
+ **Summary discipline (required):** describe **what scope the plan will target**, forward-looking (what *will* be planned), not retrospective. The summary's job is to help the user pattern-match against intent before reading call-outs — solo invocation has minimal pre-write dialogue, so the summary is especially load-bearing here. Form (prose, bullets, mix) and length follow the tier budget above; detail test applies per bullet.
236
+
237
+ **Anti-fluff guidance:** lead with the actual thing being planned in plain words. No qualifiers ("comprehensive," "thoughtful," "substantive"). No re-stating the user's prompt. If the scope cannot be said within the tier budget without filler, the synthesis isn't ready yet.
238
+
239
+ **Confirmation template (fires for Standard/Deep regardless of call-out count, or for any tier with one or more call-outs surviving):**
240
+
241
+ ```
242
+ Based on your request and our brief discussion, here's the scope I'm proposing to plan against:
243
+
244
+ [scope claim — what the plan will target, what it will not; affirm-or-redirect level; NOT an enumeration of Implementation Units]
245
+
246
+ **Call outs:** (omit this header when zero forks survived the keep test)
247
+ - [decision-level fork in 1-2 lines: name the choice and optional one-clause trade-off in parens. NO multi-sentence rationale, NO "my default is X" pitch — those belong in Key Technical Decisions in the plan body, not the synthesis]
248
+
249
+ Confirm and I'll proceed to research, drawing on this scope. (You can also redirect to ce:brainstorm if this is bigger than you initially thought — I'll stop here and load it for you.)
250
+ ```
251
+
252
+ Wait for user confirmation before continuing to Phase 1.
253
+
254
+ **Auto-proceed template (Lightweight with zero call-outs only):**
255
+
256
+ ```
257
+ Planning: [1-3 line scope claim]
258
+
259
+ No open decisions to weigh in on — proceeding to research. Interrupt if I have the scope wrong.
260
+ ```
261
+
262
+ Then continue to Phase 1 without a blocking question.
263
+
264
+ ---
265
+
266
+ ## Brainstorm-sourced variant (Phase 5.1.5)
267
+
268
+ Fires only when:
269
+ - Phase 0.2 found upstream brainstorm doc (brainstorm-sourced invocation)
270
+ - AND not on Phase 0.1 fast paths
271
+
272
+ **Content focus**: plan-time decisions only. The brainstorm + Phase 0.7 synthesis already validated WHAT to build; the internal draft and stage 2 surface HOW the plan will execute that work — decisions the brainstorm did not make.
273
+
274
+ Items to surface in the internal draft:
275
+ - **Files/modules to touch (and not touch)** — what the implementation reaches into
276
+ - **Patterns extended vs. introduced new** — architectural decisions the agent made within confirmed scope
277
+ - **Test scope** — which existing-but-untested code is in/out of test scope for this work
278
+ - **Refactor scope** — adjacent cleanup, if any, going to deferred items vs. active diff
279
+ - **Cross-cutting impact** — auth, migrations, shared types when they're touched
280
+
281
+ Most of these will not survive the keep test as separate call-outs. Surface only the forks where another reasonable agent might choose differently and the user can correct cheaply now.
282
+
283
+ **Reads from doc body, not a synthesis section**: brainstorm docs do not have a `## Synthesis` section (the synthesis is a chat-time artifact in ce:brainstorm; only the prose summary embeds, as `## Summary`). Phase 5.1.5 derives plan-time decisions from the brainstorm doc's body sections — Summary, Problem Frame, Requirements, Key Decisions, Scope Boundaries — plus Phase 1 research.
284
+
285
+ **Why pre-write, not pre-research**: brainstorm doc + research already validated WHAT, so research is well-targeted. Plan-time decisions emerge during research and structuring (Phases 1-4), so pre-write catches them at the latest cheap moment — before Phase 5.2 commits the plan to disk.
286
+
287
+ ### Stage 2 template (brainstorm-sourced)
288
+
289
+ **Summary discipline (required):** describe **how the implementation approaches the work** at a high level — files/modules touched, patterns extended vs. introduced, scope boundaries the plan honors. Forward-looking (what *will* be in the plan), not retrospective. Brainstorm-validated WHAT is assumed; the summary covers HOW. Form (prose, bullets, mix) and length follow the tier budget above; detail test applies per bullet.
290
+
291
+ **Anti-fluff guidance:** lead with the actual implementation shape in plain words. No qualifiers, no re-stating the brainstorm's WHAT. If the summary just restates the brainstorm's Problem Frame, rewrite it to focus on plan-time decisions.
292
+
293
+ **Confirmation template (fires for Standard/Deep regardless of call-out count, or for any tier with one or more call-outs surviving):**
294
+
295
+ ```
296
+ The brainstorm scopes [1-2 sentence restatement of the brainstorm's scope as orientation; in the brainstorm's own vocabulary; NOT an enumeration of Implementation Units, constraints, or acceptance examples].
297
+
298
+ This plan [plan-specific scoping: what's covered vs. deferred vs. expanded relative to the brainstorm; test scope; any adjacent refactors pulled in or held out. Prose or bullets per substance].
299
+
300
+ **Call outs:** (omit this header when zero forks survived the keep test)
301
+ - [plan-time fork in 1-2 lines: name the choice and optional one-clause trade-off in parens. NO multi-sentence rationale, NO "my default is X" pitch — those belong in Key Technical Decisions in the plan body, not the synthesis]
302
+
303
+ Confirm and I'll write the plan next, drawing on the brainstorm, research, and this synthesis.
304
+ ```
305
+
306
+ Wait for user confirmation before continuing to Phase 5.2.
307
+
308
+ **Auto-proceed template (Lightweight with zero call-outs only):**
309
+
310
+ ```
311
+ Planning [brief brainstorm-scope restatement] — [plan-specific shape in one clause].
312
+
313
+ No open decisions to weigh in on — proceeding to plan-write. Interrupt if I have the scope wrong.
314
+ ```
315
+
316
+ Then continue to Phase 5.2 without a blocking question.
317
+
318
+ ---
319
+
320
+ ## Soft-cut on circularity (shared)
321
+
322
+ Track which call-outs the user touched per round. The soft-cut blocking question fires **only when the same call-out is revised twice** (or a third-round revision targets a call-out already revised in round two). New-call-out revisions across rounds proceed without limit.
323
+
324
+ **Identity across rounds is by decision dimension, not surface wording.** A revision may cause stage 2 to re-derive — the same underlying fork can come back rephrased, merged with another call-out, or split into two. "Same call-out" means the same decision being made. When a re-cut collapses multiple prior call-outs into one, the new combined call-out inherits the "touched" status of any of its constituents.
325
+
326
+ When the soft-cut fires, use the platform's blocking question tool with two options:
327
+
328
+ - `Proceed and continue to [research / plan-write]`
329
+ - `Hold off — keep discussing before continuing`
330
+
331
+ Fall back to numbered list in chat only when no blocking tool exists or the call errors. Never silently skip.
332
+
333
+ ---
334
+
335
+ ## Headless mode (shared)
336
+
337
+ When the skill is invoked from an automated workflow such as LFG or any `disable-model-invocation` context, the skill runs in non-interactive mode (no synchronous user). The artifact is read by downstream skills (document-review, ce:work) and human reviewers (PR review).
338
+
339
+ **Stage 2 is moot in headless mode.** Compose the internal draft (stage 1) as usual, but skip the chat-time compression — there is no synchronous user to confirm to, no call-outs to derive, no auto-proceed announcement. Route the internal draft directly into the plan body via the doc-shape table below.
340
+
341
+ **Per-variant behavior** (the timing matters for which phases follow):
342
+
343
+ - **Solo variant (Phase 0.7)**: fires *before* research. Compose the internal draft and continue to Phase 1 research as normal. Inferred content is held until plan-write (Phase 5.2), where it routes to `## Assumptions`.
344
+ - **Brainstorm-sourced variant (Phase 5.1.5)**: fires *after* research, before plan-write. Compose the internal draft and proceed to Phase 5.2 plan-write. Inferred content routes to `## Assumptions`.
345
+
346
+ **Shared behavior across both variants:**
347
+
348
+ - **No user prompt; no stage 2; no auto-proceed announcement.** All three are moot.
349
+ - **Route internal-draft content with mode-aware shape:**
350
+ - **Stated** content → Requirements (user-stated constraints, traced to origin's R-IDs when present)
351
+ - **Out-of-scope** content → Scope Boundaries
352
+ - **Inferred** content → `## Assumptions` section in the plan — explicitly labeled as un-validated agent bets. Do NOT route Inferred items into Key Technical Decisions or Implementation Units; that would make un-validated bets indistinguishable from user-confirmed decisions.
353
+
354
+ The `## Assumptions` section appears in non-interactive plans only. Interactive plans don't need it (Inferred bets either get user-corrected via call-outs and become Key Technical Decisions, are revised away, or were judged not-fork material by the keep test and dissolved into Implementation Units silently).
355
+
356
+ This restores the audit visibility the original design intended (un-validated bets must not propagate as authoritative content), but surfaces them under their own label rather than hiding them. Downstream review (document-review, ce:work, human PR review) can scrutinize Assumptions specifically.
357
+
358
+ ---
359
+
360
+ ## Self-redirect (shared)
361
+
362
+ If the user response indicates they're in the wrong skill or want a different workflow:
363
+
364
+ - **Solo variant**: common redirects include "this is bigger than I thought — let me brainstorm first" (suggest `ce:brainstorm`), "this is just a fix, no plan needed" (suggest `ce:work`), or "I need to investigate first" (suggest `ce:debug`).
365
+ - **Brainstorm-sourced variant**: less common, but possible — "actually this scope is wrong, take it back to brainstorm" (suggest `ce:brainstorm` to revise the upstream doc).
366
+
367
+ In either case: stop ce:plan, suggest the alternative skill, offer to load it in-session. Don't push back or argue — the user's redirect signal is the deliberate choice.
368
+
369
+ ---
370
+
371
+ ## Doc shape after confirmation
372
+
373
+ After user confirmation (or after the soft-cut decision proceeds), Phase 5.2 writes the plan doc. The internal draft does NOT carry into the plan as a `## Synthesis` section. Only the stage-2 summary embeds, as `## Overview` (the plan template's first section). Internal-draft content dissolves into the plan's body sections:
374
+
375
+ | Internal-draft element | Where it goes in the plan |
376
+ |---|---|
377
+ | Summary (stage 2) | `## Overview` (1-3 lines prose, forward-looking) — rewrite to plan convention if the chat-time summary used bullets. Solo variant: scope being targeted. Brainstorm-sourced: implementation approach |
378
+ | Stated bullets | `## Requirements` (R-IDs) and where relevant `## Problem Frame` for narrative context |
379
+ | Inferred bullets | `## Key Technical Decisions` (with rationale) and Implementation Units when the bet drives a structural choice. In non-interactive mode, route to `## Assumptions` instead — see Headless mode above. |
380
+ | Out-of-scope bullets | `## Scope Boundaries` — including the `### Deferred to Separate Tasks` subsection when relevant |
381
+
382
+ No italic capture-context note (e.g., "Captured at Phase 0.7..."). It would leak engineering process into an artifact whose readers do not need that signal.
383
+
384
+ The plan's `## Overview` and `## Problem Frame` must serve distinct purposes: Overview answers "what is this plan proposing?" (forward-looking, 1-3 lines); Problem Frame answers "why does this proposal exist?" (backward-looking, paragraphs). Don't restate the proposal in Problem Frame; don't pad Overview with situational context.
385
+
386
+ ---
387
+
388
+ ## What does NOT belong in the synthesis
389
+
390
+ - Implementation code (no imports, exact method signatures, framework-specific syntax, JSON shapes, exact error message wording) — in chat output OR in the internal draft
391
+ - Re-statement of the entire brainstorm doc — the synthesis is plan-perspective, not a copy
392
+ - Defensive what-ifs and hedges — if a concern is real, state it as Inferred (internal); if speculation, drop it
393
+ - The internal three-bucket draft pasted into chat as a verbatim user-facing artifact — that was the old shape and the volume problem it produced is why stage 2 exists. Compose internally, derive call-outs, present compressed
394
+ - Open questions surfaced outside the buckets/call-outs — by synthesis time, every scope-shaping question must be in **Stated** (internal — asked and answered earlier), **Inferred** (internal — agent's bet for correction, surfaces as a call-out if it survives the keep test), or **Out** (internal — deliberately excluded). There is no fourth status
395
+ - Floating questions adjacent to stage 2 — if a question genuinely cannot be defaulted, pause synthesis and resolve it before presenting. Integrate the answer, then present stage 2. Never present stage 2 with adjacent floating questions — that gives the user no clear resolution path
@@ -8,7 +8,7 @@ The detection stub in SKILL.md routes here for anything that isn't clearly softw
8
8
 
9
9
  - **Is this actually a software task?** The key distinction is task-type, not topic-domain. A study guide about Rust is non-software (producing educational content). A Rust library refactor is software (modifying code). If this is actually software, return to Phase 0.2 in the main SKILL.md.
10
10
  - **Is this a quick-help request, not a planning task?** Error messages, factual questions, and single-step tasks don't need a plan. Respond directly and exit. Examples: "zsh: command not found: brew", "what's the capital of France."
11
- - **Pipeline mode?** If invoked from LFG or any `disable-model-invocation` context: output "This is a non-software task. The LFG pipeline requires ce-work, which only supports software tasks. Use `/ce-plan` directly for non-software planning." and stop.
11
+ - **Pipeline mode?** If invoked from LFG or any `disable-model-invocation` context: output "This is a non-software task. The LFG pipeline requires ce-work, which only supports software tasks. Use `ce:plan` directly for non-software planning." and stop.
12
12
 
13
13
  Once past these checks, commit to producing a plan. Do not exit because the task looks like a "lookup" or "research question" — the user invoked `ce-plan` because they want a structured output.
14
14
 
@@ -30,7 +30,7 @@ Evaluate two things before planning:
30
30
  | **None** | Generic, timeless, or conceptual plan (study curriculum methodology, project management approach, personal goal breakdown) | Skip research. Model knowledge is sufficient. After structuring the plan, offer: "I based this on general knowledge. Want me to search for [specific thing research would improve]?" — e.g., sourced recipes, current product recommendations, expert frameworks. Only if the user accepts. |
31
31
  | **Recommended** | Plan references specific locations, venues, dates, prices, schedules, seasonal availability, or current events — anything where stale information would break the plan (closed restaurants, changed prices, cancelled events, wrong seasonal dates). | Research before planning. Decompose into 2-5 focused research questions and dispatch parallel web searches. In OpenCode, use the Agent tool with `model: "haiku"` for each search to reduce cost. Collate findings before structuring the plan. |
32
32
 
33
- When research is recommended, do it — don't just offer. Stale recommendations (closed restaurants, rethemed attractions, outdated prices) are worse than no recommendations. The user invoked `/ce-plan` because they want a good plan, not a disclaimer about training data.
33
+ When research is recommended, do it — don't just offer. Stale recommendations (closed restaurants, rethemed attractions, outdated prices) are worse than no recommendations. The user invoked `ce:plan` because they want a good plan, not a disclaimer about training data.
34
34
 
35
35
  **Research decomposition pattern:**
36
36
  1. Identify 2-5 independent research questions based on the task. Good questions target facts the model is least confident about: current prices, hours, availability, recent changes, seasonal specifics.
@@ -111,4 +111,4 @@ After structuring the plan, ask the user how they want to receive it using the p
111
111
 
112
112
  3. **Save to disk AND open in Proof** — Do both: write the markdown file to disk and open the doc in Proof for review.
113
113
 
114
- Do not offer `/ce-work` (software-only) or issue creation (not applicable to non-software plans).
114
+ Do not offer `ce:work` (software-only) or issue creation (not applicable to non-software plans).