skills/discuss-before-plan/SKILL.md
Enforces 'decide then plan' discipline - the pre-planning decision gate. Use when the user asks for a plan or starts a change while key decisions are unresolved: architecture tradeoffs, data flow, public interfaces, unclear requirements, multi-module scope, or roughly 5+ files affected. Also triggers when the user explicitly wants to discuss, compare options, or review architecture before committing. Core job: reduce incorrect-execution cost by confirming decisions before producing executable plans.
npx skillsauth add adonis0123/adonis-skills discuss-before-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The most common reason plans fail is not poor execution — it's starting to write steps before decisions are aligned. This skill enforces three stages: clarify first (Deliberation), lock decisions down (Commitment), then write the executable plan (Planning). No plan until facts are verified, options compared, and decisions confirmed.
<HARD-GATE> - All blocking decisions must be confirmed by the user before entering Plan Mode, outputting execution steps, or starting implementation. - If a new decision point surfaces while writing a Plan, stop immediately and return to Deliberation. - Before transitioning to Plan, output a Decision Summary and explicitly ask whether to persist it as a document. </HARD-GATE>These terms have precise meanings in this skill. Use them consistently — do not interchange.
| Term | Definition | When it appears | |------|-----------|-----------------| | Decision Summary | Structured table of confirmed decisions produced during conversation. Lives in chat, not on disk. | End of Deliberation (Phase 3) | | Spec / Decision Record | Persisted document capturing what was decided and why. Survives across sessions. | Commitment stage (Phase 4) | | Implementation Plan | Task-by-task execution steps that reference confirmed decisions. Contains only how/when, never new what/why. | Planning stage (Phase 5) |
满足任一强信号,或同时满足两个以上弱信号时使用。
强信号(任一即触发):
| 信号 | 示例 | |------|------| | 存在 2+ 可行方案 | "缓存用 Redis、内存还是 CDN?" | | 涉及架构/数据流/接口/发布决策 | "把轮询改成实时推送" | | 影响多模块或 ~5+ 文件 | 路由、服务、类型、测试、前端联动 | | 用户明确要求先讨论/对比/评审 | "先把方案聊清楚再做" |
弱信号(2+ 同时出现即触发):
| 信号 | 示例 | |------|------| | 需求有歧义 | "让它更快一点" | | 用户要 plan 但问题未收敛 | "给我一个实现计划" | | 选择显著影响成本/风险/可维护性 | 单体 vs 拆服务、同步 vs 异步 |
应跳过:
| 信号 | 示例 | |------|------| | 纯执行 | 跑测试、格式化、改文案 | | 需求明确无歧义 | 指定文件、指定行为 | | 低风险单文件改动 | 改 typo、改常量 | | 用户说直接做且无阻塞决策 | "按这个接口实现" |
开始前先判断走哪个模式:
从「不清楚」到「已确认」。三个 Phase 逐步收敛。
读代码、配置、文档,输出你的理解。严格区分三类信息:
列出所有需要拍板的决策点,然后只问一个——当前最影响后续方案选择的那个。没有用户确认前,不进入方案推荐。
"这是我对现状的理解:[摘要]。如果有偏差先纠正我。现在最需要先定的是:[单个问题]。"
围绕单个决策点,先亮推荐再展开替代。每轮结构:
如果某方案有致命缺陷,直接指出。不为"中立"隐藏判断。
"这个方案最大的风险不是复杂度,而是 [具体失败场景]。"
把讨论结果压缩为结构化记录。这是讨论阶段中第一次输出正式表格——之前都用自然对话。
决策记录格式:
| # | 决策问题 | 确认选择 | 理由 | 放弃的替代方案 | |---|---------|---------|------|----------------| | 1 | [问题] | [选择] | [理由] | [替代方案] |
非目标: 当前明确不做的事项。
待定事项: 未确认的内容——不要混进已确认列。用户没有明确 confirm 的项不计入决策记录。
逐条和用户确认。
"下面是已确认项;如果有哪条还没拍板,直接指出。"
在进入 Plan 前,把决策固化下来。本阶段必须完成后,才进入阶段三。
references/doc-conventions.md),按 resolved profile 写入。"要不要我把这份决策保存成文档?要的话我建议放到 [resolved path];不要就直接拆 plan。"
只有落盘问题解决后才进入。
references/doc-conventions.md)后写入。以下信号表明讨论可以转入 Commitment:
不需要全部满足。但若仍有关键风险,转入前先简短提醒。
| 原则 | 背后的原因 | |------|-----------| | 事实、假设、确认分开写 | 把推测当事实,Plan 就建在沙子上 | | 每轮只推进一个决策点 | 多个问题 → 用户只答最简单的,关键问题被跳过 | | 先推荐,再列替代 | 中立信息堆砌把决策负担全推给用户 | | YAGNI 优先 | 用户提的不一定都要做;主动问"这个现在真的需要吗?" | | 风险要具体 | "可能有问题"没用;"当 X 发生时 Y 会挂"有用 | | 用户拍板,AI 建议 | 提供分析和推荐,但不替用户确认决策 | | 文档分层 | spec 记录 what/why,plan 记录 how/when — 不要混 |
| 反模式 | 为什么有害 | 正确做法 | |--------|----------|---------| | 跳过讨论直接 Plan | 步骤做到一半方向错,返工成本高 | 走完讨论再 Plan | | 一轮多个问题 | 用户答最简单的,关键问题悬而未决 | 每轮一个决策点 | | 讨论阶段过度形式化 | 每轮输出表格,对话变笨重 | 自然对话,Phase 3 才出表格 | | 摘要夹带未确认内容 | 建议被当成决定,执行基于假共识 | 只放用户明确 confirm 的 | | 跳过落盘询问 | 决策没记录 = 下次对话重来 | 轻量模式也要问一句 | | Plan 里新增决策 | 半讨论半计划,两头都不好 | 停 Plan,回讨论 |
| 你可能想 | 实际情况 | |---------|---------| | "需求很清楚,不用讨论" | 你认为清楚 ≠ 用户认为清楚。摸底 2 分钟,返工 2 小时。 | | "用户要 plan,给他 plan" | 未收敛的 plan 做到一半方向不对更浪费。 | | "先做一版再迭代" | 关键决策没对齐的实现是赌博,不是迭代。 | | "讨论差不多了,落盘跳过吧" | 不落盘的决策 = 没有决策。 |
tools
Use when the user's pain is "adding/removing one more X means editing N files" and X is a recurring variant kind: popup, banner, modal, ad slot, payment method, AI model/tool, form field type, connector, sub-site, command, menu item, agent, extension point, or data source. Use when they want to design, refactor, review, name, or explain a pluggable mechanism using registry, interface/trait contract, runtime core, and convention folders; mention pluginize, pluggable, plugin architecture, extension point, registry pattern, or extensibility. Use when explaining the first-principles rationale, DDD/SOLID/OCP mapping, or industry analogies behind that structure. Use for cross-stack mapping to VSCode contributes, Webpack/Vite plugins, Rust/Tauri connectors, Python entry_points, or cargo features. Skip one variant's internals/styles/hooks/copy/bugs, and skip register/registry meaning DI container, user signup, or package registry.
development
Use BEFORE heavier workflow skills when route choice matters. Route creative work without a design doc/spec to Brainstorm; destructive or hard-to-reverse work to Discuss; unresolved decisions, Plan/Full fan-out, ship checks, unclear bugs, and fresh-eyes fix-then-re-review need this gate. Skip single-line read-only lookups, pure typo/formatting edits, trivial safe one-line fixes, and clearly safe named-skill requests. Outputs Route, Runtime skill, Fallback alias, and Execution path.
development
Cross-agent code review handoff and review-fix-re-review loop with persistent packet artifacts. Requires a git repo because packet addressing uses git rev-parse --show-toplevel. Use when the user asks for an independent, read-only second pair of eyes on a diff/branch/PR another agent or teammate implemented; asks to verify reviewer feedback before fixing; says a fix is done and wants scoped re-review; asks to continue the latest review packet; or asks for first-principles, DDD, high-cohesion/low-coupling review. Persists each loop under $repo_root/.review-handoff/active/ so agents can resume without copy-paste. Do NOT use for ordinary implementation, generic staged-change review, review-comment copy editing, non-git folders/zips/tarballs/temp dirs, or when the user names a different review skill.
development
Scaffold class-based Zustand stores with flattenActions: web (component-level store + Context + Provider) and core (slice-based store with immer). Class-based actions provide Go-to-Definition DX, #private field encapsulation, and prototype-safe slice composition.