npx skills add https://github.com/rjs/shaping-skills --skill shaping一种结构化方法,用于协作定义问题并探索解决方案选项。
塑形过程会产生不同抽象级别的文档。所有层级的真相必须保持一致。
每个层级都总结或提供了对下一层级的视图。较低层级包含更多细节;较高层级是经过设计的视图,有助于快速获取上下文。
更改会双向传递:
每当进行更改时:
只有当各层级彼此一致时,系统才能正常工作。
启动新的塑形会话时,为用户提供两个切入点:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
没有固定的顺序。塑形是迭代的 — R 和 S 在整个过程中相互影响。
当塑形文档已有一个选定的形状时:
这使用户能够立即了解塑形的当前状态以及需要注意的地方。
定义问题空间的一组编号集合。
字母代表互斥的解决方案方法。
为形状提供一个简短的描述性标题,以概括其方法。在显示形状时显示标题:
## E: 就地修改 CUR 以遵循 S-CUR
| 部件 | 机制 |
|------|-----------|
| E1 | ... |
好的标题用几个词抓住了方法的精髓:
| 层级 | 符号 | 含义 | 关系 |
|---|---|---|---|
| 需求 | R0, R1, R2... | 问题约束 | 集合 R 的成员 |
| 形状 | A, B, C... | 解决方案选项 | 从 S 中选一个 |
| 组件 | C1, C2, C3... | 形状的部件 | 在形状内组合 |
| 替代方案 | C3-A, C3-B... | 组件的方法 | 每个组件选一个 |
在整个过程中保持符号作为审计跟踪。在最终确定时,通过引用先前的组件来组合新选项(例如,"形状 E = C1 + C2 + C3-A")。
塑形过程经历两个阶段:
塑形 → 切片
| 阶段 | 目的 | 输出 |
|---|---|---|
| 塑形 | 探索问题和解决方案空间,选择和细化一个形状 | 包含 R、形状、适配性检查、面包板的塑形文档 |
| 切片 | 为实施进行分解 | 具有可演示 UI 的垂直切片 |
塑形 → 切片 发生在以下情况:
没有面包板化的形状就无法切片。
适配性检查是唯一一个将所有形状与所有需求进行比较的表格。需求是行,形状是列。这是我们决定追求哪个形状的方式。
## 适配性检查
| 需求 | 需求描述 | 状态 | A | B | C |
|-----|-------------|--------|---|---|---|
| R0 | 使项目可从索引页搜索 | 核心目标 | ✅ | ✅ | ✅ |
| R1 | 状态在页面刷新后保留 | 必须拥有 | ✅ | ❌ | ✅ |
| R2 | 后退按钮恢复状态 | 必须拥有 | ❌ | ✅ | ✅ |
**备注:**
- A 未满足 R2: [简要解释]
- B 未满足 R1: [简要解释]
当比较特定组件的替代方案时(例如,C3-A 与 C3-B),使用相同的格式,但范围限定在该组件:
## C3: 组件名称
| 需求 | 需求描述 | 状态 | C3-A | C3-B |
|-----|-------------|--------|------|------|
| R1 | 状态在页面刷新后保留 | 必须拥有 | ✅ | ❌ |
| R2 | 后退按钮恢复状态 | Must-have | ✅ | ✅ |
如果一个形状通过了所有检查但仍然感觉不对,那就是缺少了一个需求。将隐含的约束表述为一个新的 R,然后重新运行适配性检查。
这是与标准适配性检查分开的工具,用于在高层级处理分块需求和早期形状(大多数机制仍为 ⚠️)时使用。仅在明确请求时使用。
宏观适配性检查每个形状有两列,而不是一列:
格式:
## 宏观适配性检查: R × A
| 需求 | 需求描述 | 已处理? | 已解答? |
|-----|-------------|:----------:|:---------:|
| R0 | 核心目标描述 | ✅ | ❌ |
| R1 | 引导式工作流 | ✅ | ❌ |
| R2 | 代理边界 | ⚠️ | ❌ |
约定:
这些可以按任何顺序发生:
当显示 R(需求)或任何 S(形状)时,始终显示每一行 — 绝不总结或缩写。完整的表格是工件;部分视图会丢失信息并破坏协作过程。
塑形是协作协商。用户需要看到完整的画面才能:
总结会隐藏细节,并将控制权从用户手中转移走。
在做出更改后重新渲染需求表或形状表时,用 🟡 标记每个已更改或新增的行,以便用户可以立即发现不同之处。将 🟡 放在已更改单元格内容的开头。这使得迭代细化易于跟踪 — 用户绝不应该在脑海中比较表格的差异。
探针是一项调查任务,旨在了解现有系统如何工作以及实施组件需要哪些具体步骤。当对机制或可行性存在不确定性时使用探针。
始终在单独的文件中创建探针(例如,spike.md 或 spike-[主题].md)。探针是独立的调查文档,可以与塑形文档分开共享或处理。
## [组件] 探针: [标题]
### 背景
为什么我们需要这项调查。我们正在解决什么问题。
### 目标
我们试图了解或识别什么。
### 问题
| # | 问题 |
|---|----------|
| **X1-Q1** | 关于机制的具体问题 |
| **X1-Q2** | 另一个具体问题 |
### 验收标准
当所有问题都得到解答并且我们可以描述[我们将拥有的理解]时,探针即完成。
验收标准描述我们将拥有的信息/理解,而不是结论或决定:
探针收集信息;决定是基于这些信息之后做出的。
好的探针问题询问机制:
避免:
使用 /breadboarding 技能来映射现有系统或将形状细化为具体的可供性。面包板制作产生:
在以下情况下调用面包板制作:
可供性表(UI 和非 UI)定义了面包板。Mermaid 图渲染它们。
当收到关于面包板的反馈时:
绝不要将图表视为主要工件。更改从表格 → 图表流动,而不是相反。
使用 CURRENT 来描述现有系统。这为理解提议的更改如何适应提供了一个基线。
可以在高层级描述一个机制,而无需具体理解它。标记列跟踪这一点:
| 部件 | 机制 | 标记 |
|---|---|---|
| F1 | 创建小部件(组件、定义、注册) | |
| F2 | 魔法身份验证处理器 | ⚠️ |
为什么标记的未知项在适配性检查中失败:
适配性检查始终是二元的 — 只有 ✅ 或 ❌。没有第三种状态。标记的未知项在解决之前是失败的。
这区分了"我们有一个草图"和"我们实际上知道如何做这个"。早期形状(A, B, C)通常有许多标记的部件 — 这对于探索来说没问题。但选定的形状应该没有标记(所有 ❌ 已解决),或者有明确的探针来解决它们。
形状部件描述我们构建或更改的内容 — 而不是意图或约束:
childType === 'letter' 路由到 typesenseService.rawSearch()"(机制)R 说明需求/约束(结果是什么)。S 描述机制(如何实现它)。如果它们说的是同一件事,那么形状部件就没有增加信息。
需求描述所需的能力。形状部件描述提供该能力的具体机制。如果你发现自己将文本从 R 复制到 S,请停止 — 形状部件应该增加关于"如何"的具体性。
避免像"数据模型"这样的水平层,它将所有表分组在一起。相反,将数据模型与其支持的功能放在一起:
每个部分都应该是一个垂直切片,包含机制及其所需的数据。
当相同的逻辑出现在多个部件中时,将其提取为一个独立的部件,供其他部件引用:
❌ 在 B1 和 B2 中重复"签署处理器:创建 WaiverSignature + 设置布尔值"
✅ 提取为 B1: 签署处理器,然后 B2 和 B3 说"→ 调用 B1"
| B1 | 签署处理器 | | B1.1 | WaiverSignatures 表: memberId, waiverId, signedAt | | B1.2 | 处理器: 创建 WaiverSignature + 设置 member.waiverUpToDate = true | | B2 | 自助签署 | | B2 | 自助购买: 点击内联签署 → 调用 B1 | | B3 | 通过电子邮件进行 POS 签署 | | B3.1 | POS 购买: 发送弃权电子邮件 | | B3.2 | 无密码链接进行签署 → 调用 B1 |
从扁平符号开始(E1, E2, E3...)。仅在以下情况下引入层次结构(E1.1, E1.2...):
| 符号 | 含义 |
|---|---|
| E1 | 形状 E 的顶级组件 |
| E1.1, E1.2 | E1 的子部件(如果需要,稍后添加) |
分层分组示例(在形状成熟时使用):
| 部件 | 机制 |
|---|---|
| E1 | 交换数据源 |
| E1.1 | 修改后端索引器 |
| E1.2 | 将信件路由到新服务 |
| E1.3 | 将帖子路由到新服务 |
| E2 | 添加搜索输入 |
| E2.1 | 添加带防抖的输入 |
当一个形状被选定时,你可以将其扩展为具体的可供性。这称为细化。
使用"细化 X"(而不是新字母)来表示这是形状 X 的分解,而不是一个替代方案:
## A: 第一种方法
(形状表)
## B: 第二种方法
(形状表)
## 细化 B: 具体的可供性
(可供性表 + 连接)
使用 /breadboarding 技能产生:
形状字母(A, B, C...)是互斥的替代方案 — 你选择一个。细化不是替代方案;它是选定形状的更深层次分解。使用新字母会错误地暗示它是一个同级选项。
A, B, C = 替代方案(选一个)
细化 B = B 的扩展(不是选择)
塑形过程最多产生四个文档。每个都有不同的角色:
| 文档 | 包含内容 | 目的 |
|---|---|---|
| 框架 | 来源、问题、成果 | "为什么" — 简洁的、利益相关者层面的 |
| 塑形文档 | 需求、形状(CURRENT/A/B/...)、可供性、面包板、适配性检查 | 工作文档 — 探索和迭代发生在这里 |
| 切片文档 | 切片详情、每个切片的可供性表、连接图 | 实施计划 — 如何增量构建 |
| 切片计划 | V1-plan.md, V2-plan.md 等 | 每个切片的单独实施计划 |
框架(问题/成果)
↓
塑形(探索、细化、制作面包板)
↓
切片(规划实施)
框架可以先写 — 它在任何解决方案工作开始之前捕捉"为什么"。它包含:
当用户在框架过程中提供来源材料时(用户请求、引述、电子邮件、Slack 消息等),始终逐字记录在框架文档顶部的"来源"部分。
## 来源
> 我想再次征求您对用户场景的看法...
>
> 小提醒:目前,如果我想保留我在俄罗斯和克里米亚的国家管理员权限,同时将欧洲中心作为我的归属中心...
> [在收到时添加的其他来源材料]
---
## 问题
...
为什么这很重要:
何时捕捉:
塑形文档是活跃工作发生的地方。所有的探索、需求收集、形状比较、面包板制作和适配性检查都发生在这里。这是工作文档,也是 R、形状、部件和适配性检查的基准真相。
切片文档在选定的形状被面包板化并准备好构建时创建。它包含切片分解、每个切片的可供性表和详细的连接。
每个塑形文档(塑形文档、框架、切片文档)必须在 YAML 前言中包含 shaping: true。这启用了工具钩子(例如,一致性检查提醒),有助于跨文档保持一致性。
---
shaping: true
---
# [功能名称] — 塑形
...
请参阅本文档顶部的多层级一致性。任何层级的更改都必须传递到受影响的上下层级。
在形状被面包板化之后,将其切片为垂直的实施增量。使用 /breadboarding 技能进行切片过程 — 它定义了什么是垂直切片、创建切片的程序以及可视化格式。
流程:
/breadboarding)/breadboarding 的切片部分)关键原则: 每个切片都必须以可演示的 UI 结束。没有可见输出的切片是水平层,而不是垂直切片。
文档输出:
用户正在塑形一个搜索功能:
---
shaping: true
---
## 需求 (R)
| ID | 需求描述 | 状态 |
|----|-------------|--------|
| R0 | 使项目可从索引页搜索 | 核心目标 |
| R1 | 状态在页面刷新后保留 | 未定 |
| R2 | 后退按钮恢复状态 | 未定 |
---
## C2: 状态持久化
| 需求 | 需求描述 | 状态 | C2-A | C2-B | C2-C |
|-----|-------------|--------|------|------|------|
| R0 | 使项目可从索引页搜索 | 核心目标 | — | — | — |
| R1 | 状态在页面刷新后保留 | 未定 | ✅ | ✅ | ❌ |
| R2 | 后退按钮恢复状态 | 未定 | ✅ | ✅ | ✅ |
**备注:**
- C2-C 未满足 R1: 刷新时内存状态丢失
- C2-B 满足 R2 但需要自定义 popstate 处理器
每周安装数
156
仓库
GitHub 星标数
909
首次出现
2026 年 2 月 8 日
安全审计
安装于
github-copilot143
opencode143
gemini-cli142
codex142
kimi-cli134
amp134
A structured approach for collaboratively defining problems and exploring solution options.
Shaping produces documents at different levels of abstraction. Truth must stay consistent across all levels.
Each level summarizes or provides a view into the level(s) below it. Lower levels contain more detail; higher levels are designed views that help acquire context quickly.
Changes ripple in both directions:
Whenever making a change:
The system only works if the levels are consistent with each other.
When kicking off a new shaping session, offer the user both entry points:
There is no required order. Shaping is iterative — R and S inform each other throughout.
When the shaping doc already has a selected shape:
This gives the user immediate context on where the shaping stands and what needs attention.
A numbered set defining the problem space.
Letters represent mutually exclusive solution approaches.
Give shapes a short descriptive title that characterizes the approach. Display the title when showing the shape:
## E: Modify CUR in place to follow S-CUR
| Part | Mechanism |
|------|-----------|
| E1 | ... |
Good titles capture the essence of the approach in a few words:
| Level | Notation | Meaning | Relationship |
|---|---|---|---|
| Requirements | R0, R1, R2... | Problem constraints | Members of set R |
| Shapes | A, B, C... | Solution options | Pick one from S |
| Components | C1, C2, C3... | Parts of a shape | Combine within shape |
| Alternatives | C3-A, C3-B... | Approaches to a component | Pick one per component |
Keep notation throughout as an audit trail. When finalizing, compose new options by referencing prior components (e.g., "Shape E = C1 + C2 + C3-A").
Shaping moves through two phases:
Shaping → Slicing
| Phase | Purpose | Output |
|---|---|---|
| Shaping | Explore the problem and solution space, select and detail a shape | Shaping doc with R, shapes, fit checks, breadboard |
| Slicing | Break down for implementation | Vertical slices with demo-able UI |
Shaping → Slicing happens when:
You can't slice without a breadboarded shape.
THE fit check is the single table comparing all shapes against all requirements. Requirements are rows, shapes are columns. This is how we decide which shape to pursue.
## Fit Check
| Req | Requirement | Status | A | B | C |
|-----|-------------|--------|---|---|---|
| R0 | Make items searchable from index page | Core goal | ✅ | ✅ | ✅ |
| R1 | State survives page refresh | Must-have | ✅ | ❌ | ✅ |
| R2 | Back button restores state | Must-have | ❌ | ✅ | ✅ |
**Notes:**
- A fails R2: [brief explanation]
- B fails R1: [brief explanation]
When comparing alternatives for a specific component (e.g., C3-A vs C3-B), use the same format but scoped to that component:
## C3: Component Name
| Req | Requirement | Status | C3-A | C3-B |
|-----|-------------|--------|------|------|
| R1 | State survives page refresh | Must-have | ✅ | ❌ |
| R2 | Back button restores state | Must-have | ✅ | ✅ |
If a shape passes all checks but still feels wrong, there's a missing requirement. Articulate the implicit constraint as a new R, then re-run the fit check.
A separate tool from the standard fit check, used when working at a high level with chunked requirements and early-stage shapes where most mechanisms are still ⚠️. Use when explicitly requested.
The macro fit check has two columns per shape instead of one:
Format:
## Macro Fit Check: R × A
| Req | Requirement | Addressed? | Answered? |
|-----|-------------|:----------:|:---------:|
| R0 | Core goal description | ✅ | ❌ |
| R1 | Guided workflow | ✅ | ❌ |
| R2 | Agent boundary | ⚠️ | ❌ |
Conventions:
These can happen in any order:
When displaying R (requirements) or any S (shapes), always show every row — never summarize or abbreviate. The full table is the artifact; partial views lose information and break the collaborative process.
Shaping is collaborative negotiation. The user needs to see the complete picture to:
Summaries hide detail and shift control away from the user.
When re-rendering a requirements table or shape table after making changes, mark every changed or added line with a 🟡 so the user can instantly spot what's different. Place the 🟡 at the start of the changed cell content. This makes iterative refinement easy to follow — the user should never have to diff the table mentally.
A spike is an investigation task to learn how the existing system works and what concrete steps are needed to implement a component. Use spikes when there's uncertainty about mechanics or feasibility.
Always create spikes in their own file (e.g., spike.md or spike-[topic].md). Spikes are standalone investigation documents that may be shared or worked on independently from the shaping doc.
## [Component] Spike: [Title]
### Context
Why we need this investigation. What problem we're solving.
### Goal
What we're trying to learn or identify.
### Questions
| # | Question |
|---|----------|
| **X1-Q1** | Specific question about mechanics |
| **X1-Q2** | Another specific question |
### Acceptance
Spike is complete when all questions are answered and we can describe [the understanding we'll have].
Acceptance describes the information/understanding we'll have, not a conclusion or decision:
The spike gathers information; decisions are made afterward based on that information.
Good spike questions ask about mechanics:
Avoid:
Use the /breadboarding skill to map existing systems or detail a shape into concrete affordances. Breadboarding produces:
Invoke breadboarding when you need to:
The affordance tables (UI and Non-UI) define the breadboard. The Mermaid diagram renders them.
When receiving feedback on a breadboard:
Never treat the diagram as the primary artifact. Changes flow from tables → diagram, not the reverse.
Use CURRENT to describe the existing system. This provides a baseline for understanding where proposed changes fit.
A mechanism can be described at a high level without being concretely understood. The Flag column tracks this:
| Part | Mechanism | Flag |
|---|---|---|
| F1 | Create widget (component, def, register) | |
| F2 | Magic authentication handler | ⚠️ |
Why flagged unknowns fail the fit check:
Fit check is always binary — ✅ or ❌ only. There is no third state. A flagged unknown is a failure until resolved.
This distinguishes "we have a sketch" from "we actually know how to do this." Early shapes (A, B, C) often have many flagged parts — that's fine for exploration. But a selected shape should have no flags (all ❌ resolved), or explicit spikes to resolve them.
Shape parts describe what we BUILD or CHANGE — not intentions or constraints:
childType === 'letter' to typesenseService.rawSearch()" (mechanism)R states the need/constraint (what outcome). S describes the mechanism (how to achieve it). If they say the same thing, the shape part isn't adding information.
The requirement describes the capability needed. The shape part describes the concrete mechanism that provides it. If you find yourself copying text from R into S, stop — the shape part should add specificity about how.
Avoid horizontal layers like "Data model" that group all tables together. Instead, co-locate data models with the features they support:
Each part should be a vertical slice containing the mechanism AND the data it needs.
When the same logic appears in multiple parts, extract it as a standalone part that others reference:
❌ Duplicating "Signing handler: create WaiverSignature + set boolean" in B1 and B2
✅ Extract as B1: Signing handler , then B2 and B3 say "→ calls B1"
| B1 | Signing handler | | B1.1 | WaiverSignatures table: memberId, waiverId, signedAt | | B1.2 | Handler: create WaiverSignature + set member.waiverUpToDate = true | | B2 | Self-serve signing | | B2 | Self-serve purchase: click to sign inline → calls B1 | | B3 | POS signing via email | | B3.1 | POS purchase: send waiver email | | B3.2 | Passwordless link to sign → calls B1 |
Start with flat notation (E1, E2, E3...). Only introduce hierarchy (E1.1, E1.2...) when:
| Notation | Meaning |
|---|---|
| E1 | Top-level component of shape E |
| E1.1, E1.2 | Sub-parts of E1 (add later if needed) |
Example of hierarchical grouping (used when shape is mature):
| Part | Mechanism |
|---|---|
| E1 | Swap data source |
| E1.1 | Modify backend indexer |
| E1.2 | Route letters to new service |
| E1.3 | Route posts to new service |
| E2 | Add search input |
| E2.1 | Add input with debounce |
When a shape is selected, you can expand it into concrete affordances. This is called detailing.
Use "Detail X" (not a new letter) to show this is a breakdown of Shape X, not an alternative:
## A: First approach
(shape table)
## B: Second approach
(shape table)
## Detail B: Concrete affordances
(affordance tables + wiring)
Use the /breadboarding skill to produce:
Shape letters (A, B, C...) are mutually exclusive alternatives — you pick one. Detailing is not an alternative; it's a deeper breakdown of the selected shape. Using a new letter would incorrectly suggest it's a sibling option.
A, B, C = alternatives (pick one)
Detail B = expansion of B (not a choice)
Shaping produces up to four documents. Each has a distinct role:
| Document | Contains | Purpose |
|---|---|---|
| Frame | Source, Problem, Outcome | The "why" — concise, stakeholder-level |
| Shaping doc | Requirements, Shapes (CURRENT/A/B/...), Affordances, Breadboard, Fit Check | The working document — exploration and iteration happen here |
| Slices doc | Slice details, affordance tables per slice, wiring diagrams | The implementation plan — how to build incrementally |
| Slice plans | V1-plan.md, V2-plan.md, etc. | Individual implementation plans for each slice |
Frame (problem/outcome)
↓
Shaping (explore, detail, breadboard)
↓
Slices (plan implementation)
Frame can be written first — it captures the "why" before any solution work begins. It contains:
When the user provides source material during framing (user requests, quotes, emails, slack messages, etc.), always capture it verbatim in a Source section at the top of the frame document.
## Source
> I'd like to ask again for your thoughts on a user scenario...
>
> Small reminder: at the moment, if I want to keep my country admin rights
> for Russia and Crimea while having Europe Center as my home center...
> [Additional source material added as received]
---
## Problem
...
Why this matters:
When to capture:
Shaping doc is where active work happens. All exploration, requirements gathering, shape comparison, breadboarding, and fit checking happens here. This is the working document and ground truth for R, shapes, parts, and fit checks.
Slices doc is created when the selected shape is breadboarded and ready to build. It contains the slice breakdown, affordance tables per slice, and detailed wiring.
Every shaping document (shaping doc, frame, slices doc) must include shaping: true in its YAML frontmatter. This enables tooling hooks (e.g., ripple-check reminders) that help maintain consistency across documents.
---
shaping: true
---
# [Feature Name] — Shaping
...
See Multi-Level Consistency at the top of this document. Changes at any level must ripple to affected levels above and below.
After a shape is breadboarded, slice it into vertical implementation increments. Use the /breadboarding skill for the slicing process — it defines what vertical slices are, the procedure for creating them, and visualization formats.
The flow:
/breadboarding)/breadboarding slicing section)Key principle: Every slice must end in demo-able UI. A slice without visible output is a horizontal layer, not a vertical slice.
Document outputs:
User is shaping a search feature:
---
shaping: true
---
## Requirements (R)
| ID | Requirement | Status |
|----|-------------|--------|
| R0 | Make items searchable from index page | Core goal |
| R1 | State survives page refresh | Undecided |
| R2 | Back button restores state | Undecided |
---
## C2: State Persistence
| Req | Requirement | Status | C2-A | C2-B | C2-C |
|-----|-------------|--------|------|------|------|
| R0 | Make items searchable from index page | Core goal | — | — | — |
| R1 | State survives page refresh | Undecided | ✅ | ✅ | ❌ |
| R2 | Back button restores state | Undecided | ✅ | ✅ | ✅ |
**Notes:**
- C2-C fails R1: in-memory state lost on refresh
- C2-B satisfies R2 but requires custom popstate handler
Weekly Installs
156
Repository
GitHub Stars
909
First Seen
Feb 8, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
github-copilot143
opencode143
gemini-cli142
codex142
kimi-cli134
amp134
飞书日程待办摘要工作流:AI自动生成每日/每周开工报告,提升个人生产力
27,700 周安装
债券相对价值分析工具 - 固定收益利差分解与情景分析 | 金融科技AI插件
154 周安装
Web设计规范检查工具 - 自动验证代码符合界面指南 | Cal.com开源
154 周安装
SwiftUI 导航 API 参考:从 NavigationStack 到 iOS 26 液态玻璃设计完整指南
154 周安装
FDA咨询专家服务:医疗器械法规、质量体系、HIPAA合规与网络安全咨询
154 周安装
红队战术指南:基于MITRE ATT&CK框架的对手模拟与渗透测试技术
154 周安装
Tauri v2 JavaScript前端集成指南:React/Vue/Svelte/Next.js桌面应用开发
154 周安装