plot-idea
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlot: Create Idea
Plot:创建Idea计划
Create a plan for review: idea branch, plan file, and draft PR.
Input: in the format
$ARGUMENTS<slug>: <title description>Example:
<!-- keep in sync with plot/SKILL.md Setup -->/plot-idea sse-backpressure: Handle SSE client disconnects gracefully创建用于评审的计划:包括idea分支、计划文件和草稿PR。
输入: 格式为的
<slug>: <title description>$ARGUMENTS示例:
<!-- 与plot/SKILL.md中的设置保持同步 -->/plot-idea sse-backpressure: Handle SSE client disconnects gracefullySetup
设置
Add a section to the adopting project's :
## Plot ConfigCLAUDE.md## Plot Config
- **Project board:** <your-project-name> (#<number>) <!-- optional, for `gh pr edit --add-project` -->
- **Branch prefixes:** idea/, feature/, bug/, docs/, infra/
- **Plan directory:** docs/plans/
- **Active index:** docs/plans/active/
- **Delivered index:** docs/plans/delivered/在待接入项目的中添加章节:
CLAUDE.md## Plot Config## Plot Config
- **项目看板:** <your-project-name> (#<number>) <!-- 可选,用于`gh pr edit --add-project`命令 -->
- **分支前缀:** idea/, feature/, bug/, docs/, infra/
- **计划目录:** docs/plans/
- **活跃索引:** docs/plans/active/
- **已交付索引:** docs/plans/delivered/Model Guidance
模型指导
| Steps | Min. Tier | Notes |
|---|---|---|
| 1. Parse Input | Small | String parsing |
| 2. Pre-flight Checks | Small (hard gate), Mid (soft warning) | Slug collision is mechanical; title similarity needs mid-tier |
| 3-8. Create Branch through Summary | Small | Git/gh commands, templates, file ops |
The entire skill is small-model capable except the soft duplicate warning (title similarity in step 2).
| 步骤 | 最低模型层级 | 说明 |
|---|---|---|
| 1. 解析输入 | Small | 字符串解析 |
| 2. 前置检查 | Small(硬性限制)、Mid(软性警告) | Slug冲突为机械检查;标题相似度检查需要Mid层级模型 |
| 3-8. 创建分支至总结 | Small | Git/gh命令、模板、文件操作 |
除了标题相似度检查(步骤2中的软性警告)外,整个技能可由小型模型完成。
1. Parse Input
1. 解析输入
If is empty or missing:
$ARGUMENTS- Look at the conversation context for clues about what the user wants to plan
- If obvious, propose: "It looks like you want to plan . Shall I proceed?"
<slug>: <title> - Otherwise ask: "What's the idea? Usage: "
/plot-idea <slug>: <title>
Extract and from :
slugtitle$ARGUMENTS- Everything before the first is the slug (trimmed)
: - Everything after is the title (trimmed)
- If no found, treat the entire input as the slug and ask for a title
: - Slug must match (lowercase letters, digits, hyphens only). If it doesn't, ask the user to fix it rather than silently normalizing
[a-z0-9-]+
如果为空或缺失:
$ARGUMENTS- 查看对话上下文以获取用户想要创建的计划相关线索
- 如果线索明确,提议:“看起来你想要创建计划。是否继续?”
<slug>: <title> - 否则询问:“请提供你的创意?使用方式:”
/plot-idea <slug>: <title>
从中提取和:
$ARGUMENTSslugtitle- 第一个之前的所有内容为slug(去除首尾空格)
: - 第一个之后的所有内容为title(去除首尾空格)
: - 如果未找到,将整个输入视为slug并询问用户提供title
: - Slug必须符合格式(仅包含小写字母、数字和连字符)。如果不符合,要求用户修正,而非自动标准化。
[a-z0-9-]+
2. Pre-flight Checks
2. 前置检查
- Warn if working tree has uncommitted changes (offer to stash)
- Verify has project scope
gh auth status - Check that branch does not already exist (if it does, ask whether to check it out or pick a new name)
idea/<slug> - Duplicate detection:
- +
ls docs/plans/active/ 2>/dev/nullto find existing plans and idea branchesgh pr list --json headRefName --jq '.[].headRefName' | grep '^idea/' - Hard gate: if a plan with the identical slug already exists (file or branch), stop and ask the user to pick a different name
- Soft warning: if any existing plan title shares 3+ significant words with the proposed title, warn the user and ask to confirm this is intentionally separate work (only check Draft/Approved plans, not Delivered ones)
Smaller models: Skip the title similarity check. Enforce the hard gate (identical slug) only. Ask the user: "Could not check for similar plan titles. Please verify manually that this doesn't overlap with existing plans."
- 如果工作区存在未提交的更改,发出警告(提供暂存选项)
- 验证是否具有项目权限范围
gh auth status - 检查分支是否已存在(如果存在,询问用户是要检出该分支还是选择新名称)
idea/<slug> - 重复检测:
- 通过+
ls docs/plans/active/ 2>/dev/null查找现有计划和idea分支gh pr list --json headRefName --jq '.[].headRefName' | grep '^idea/' - 硬性限制: 如果存在完全相同slug的计划(文件或分支),停止操作并要求用户选择不同名称
- 软性警告: 如果任何现有计划的标题与提议标题有3个以上重要词汇重合,向用户发出警告并确认这是否为独立的工作(仅检查草稿/已批准的计划,不包括已交付的计划)
- 通过
小型模型说明: 跳过标题相似度检查,仅执行硬性限制(相同slug)。询问用户:“无法检查相似计划标题,请手动确认该计划与现有计划无重叠。”
3. Create Branch
3. 创建分支
bash
git fetch origin main
git checkout -b idea/<slug> origin/mainbash
git fetch origin main
git checkout -b idea/<slug> origin/main4. Create Plan File
4. 创建计划文件
bash
CREATE_DATE=$(date -u +%Y-%m-%d)Write with this template:
docs/plans/${CREATE_DATE}-<slug>.mdmarkdown
undefinedbash
CREATE_DATE=$(date -u +%Y-%m-%d)使用以下模板创建文件:
docs/plans/${CREATE_DATE}-<slug>.mdmarkdown
undefined<title>
<title>
<title as one-line summary>
<title的单行摘要>
Status
状态
- Phase: Draft
- Type: feature | bug | docs | infra
- Sprint: <!-- optional, filled when plan is added to a sprint -->
- 阶段: 草稿
- 类型: feature | bug | docs | infra
- 迭代周期: <!-- 可选,当计划加入迭代时填写 -->
Changelog
变更日志
<!-- Release note entry. Written during planning, refined during implementation. -->
- <user-facing change description>
<!-- 发布说明条目。在规划阶段编写,在实现阶段完善。 -->
- <面向用户的变更描述>
Motivation
动机
<!-- Why does this matter? What problem does it solve? -->
<!-- 该计划的重要性是什么?解决了什么问题? -->
Design
设计
Approach
实现方案
<!-- How will this be implemented? Key architectural decisions. -->
<!-- 如何实现?关键架构决策是什么? -->
Open Questions
待解决问题
- ...
- ...
Branches
分支规划
<!-- Branches to create when approved: -->
<!-- - `type/name` — description -->
- — <description>
feature/<slug>
<!-- 计划批准后要创建的分支: -->
<!-- - `type/name` — 描述 -->
- — <描述>
feature/<slug>
Notes
备注
<!-- Session log, decisions, links -->
Ask the user what **Type** to use, presenting this reference:
| Type | Use when | Examples |
|------|----------|----------|
| `feature` | New user-facing functionality | API endpoint, UI component, CLI command |
| `bug` | Fixing a defect | Crash fix, data corruption, incorrect output |
| `docs` | Documentation-only | README updates, API docs, guides |
| `infra` | CI, build, tooling, release automation | GitHub Actions, Dockerfile, linter config, deps |
Always ask — don't infer from the title.<!-- 会话日志、决策记录、相关链接 -->
询问用户要使用的**类型**,并提供以下参考:
| 类型 | 使用场景 | 示例 |
|------|----------|----------|
| `feature` | 新增面向用户的功能 | API端点、UI组件、CLI命令 |
| `bug` | 修复缺陷 | 崩溃修复、数据损坏修复、输出错误修复 |
| `docs` | 仅更新文档 | README更新、API文档、使用指南 |
| `infra` | CI、构建、工具链、发布自动化 | GitHub Actions、Dockerfile、代码检查器配置、依赖管理 |
必须询问用户,不要从标题推断类型。5. Create Active Symlink and Commit
5. 创建活跃索引软链接并提交
bash
mkdir -p docs/plans/active docs/plans/delivered
ln -s ../${CREATE_DATE}-<slug>.md docs/plans/active/<slug>.md
git add docs/plans/${CREATE_DATE}-<slug>.md docs/plans/active/<slug>.md
git commit -m "plot: <title>"
git push -u origin idea/<slug>bash
mkdir -p docs/plans/active docs/plans/delivered
ln -s ../${CREATE_DATE}-<slug>.md docs/plans/active/<slug>.md
git add docs/plans/${CREATE_DATE}-<slug>.md docs/plans/active/<slug>.md
git commit -m "plot: <title>"
git push -u origin idea/<slug>6. Create PR
6. 创建PR
Create a draft PR (plan is still being written/refined):
bash
gh pr create \
--draft \
--title "Plan: <title>" \
--body "$(cat <<'EOF'创建草稿PR(计划仍在编写/完善中):
bash
gh pr create \
--draft \
--title "Plan: <title>" \
--body "$(cat <<'EOF'Plan
计划详情
See on this branch.
docs/plans/${CREATE_DATE}-<slug>.mdRefine the plan, then mark ready for review with . Once reviewed, run to merge and start implementation.
gh pr ready/plot-approve <slug>Created with
EOF
)"
/plot-ideaundefined查看本分支上的文件。
docs/plans/${CREATE_DATE}-<slug>.md完善计划后,使用命令标记为可评审状态。评审通过后,运行命令合并并开始实现。
gh pr ready/plot-approve <slug>通过命令创建
EOF
)"
/plot-ideaundefined7. Add to Project Board
7. 添加至项目看板
Read the section from for the project board name. If configured:
## Plot ConfigCLAUDE.mdbash
gh pr edit <number> --add-project "<project board name>"If no project board is configured, skip this step.
从的章节中读取项目看板名称。如果已配置:
CLAUDE.md## Plot Configbash
gh pr edit <number> --add-project "<project board name>"如果未配置项目看板,则跳过此步骤。
8. Summary
8. 总结
Print:
- Branch:
idea/<slug> - Plan file:
docs/plans/<CREATE_DATE>-<slug>.md - Active index: (symlink)
docs/plans/active/<slug>.md - PR URL (draft)
- Next steps:
- Refine the plan (especially the Branches section)
- When ready for review:
gh pr ready <number> - After review:
/plot-approve <slug>
输出以下内容:
- 分支:
idea/<slug> - 计划文件:
docs/plans/<CREATE_DATE>-<slug>.md - 活跃索引:(软链接)
docs/plans/active/<slug>.md - PR链接(草稿状态)
- 后续步骤:
- 完善计划(尤其是分支规划章节)
- 准备好评审时:
gh pr ready <number> - 评审通过后:
/plot-approve <slug>