SuperAPI AI Directory

intent-changes

Design & creation

View repository

Updated 10-15 17:17

About this skill

Intent Changes

Structured change proposal and collaborative review tool for design documents.

Core Concepts

Change Proposal

Each change is an independent proposal:

Field Description
ID Unique identifier (C001, C002...)
Type ADD / MODIFY / REPLACE / DELETE
Status PENDING / ACCEPTED / REJECTED
Target Change location
Before/After Change content
Decision Decision record (reviewer, timestamp, comment)

State Flow

PENDING ──accept──> ACCEPTED ──finalize──> Applied
    │
    └──reject──> REJECTED

Commands

Command Description
/intent-changes start <file> Start or resume review
/intent-changes propose Propose a change suggestion
/intent-changes accept <id> Accept change
/intent-changes reject <id> Reject change
/intent-changes status View current status
/intent-changes finalize Interactive apply

Workflow

/intent-changes start <file>
        ↓
┌───────────────────┐
│  检查 .reviews/   │
│  有则恢复         │
│  无则创建         │
└─────────┬─────────┘
          ↓
/intent-changes propose
        ↓
┌───────────────────────────────────────┐
│  读取源文档                            │
│  与用户讨论变更内容                     │
│  生成 Change Proposal (C001, C002...)  │
│  写入 .reviews/{name}.review.md        │
└─────────┬─────────────────────────────┘
          ↓
/intent-changes accept/reject
        ↓
┌───────────────────┐
│  更新 status      │
│  记录 reviewer    │
│  记录 timestamp   │
└─────────┬─────────┘
          ↓
/intent-changes finalize
        ↓
┌───────────────────────────────────────┐
│  逐个显示 ACCEPTED 变更               │
│  交互确认: Apply? [Y/n/view]          │
│  Apply 到源文档                        │
│  生成变更摘要                          │
└───────────────────────────────────────┘

Execution Steps

Command: start

Input: file path

Steps:

  1. Verify the source file exists
  2. Determine review file path: .reviews/{basename}.review.md
  3. If the review file exists:
    • Read and parse
    • Display current status overview
  4. If it does not exist:
    • Create .reviews/ directory (if it does not exist)
    • Create the review file and write the frontmatter
  5. Set the current session's source and review paths

Output:

Review session started.

Source: intent/specs/kind-system-spec.md
Review: .reviews/kind-system-spec.review.md

Status: 3 PENDING, 2 ACCEPTED, 1 REJECTED

Commands:
  /intent-changes propose  - 提出新变更
  /intent-changes status   - 查看详情
  /intent-changes finalize - 应用变更

Command: propose

Preconditions: start has been executed

Steps:

  1. Read the source document content
  2. Read the current review file to get existing proposals
  3. Calculate the next ID (e.g., if C001-C005 already exist, the next is C006)
  4. Discuss with the user:
    • Show the source document structure
    • Use AskUserQuestion to ask for the change type and location
    • Collect the change content
  5. Generate a Change Proposal block
  6. Append to the review file

Interaction Flow:

使用 AskUserQuestion:
- question: "你想对哪个部分提出变更?"
- header: "变更位置"
- options:
  - "## Kind 定义" - 第一个 section
  - "## Actions" - 第二个 section
  - "## 示例" - 第三个 section
  - "其他位置" - 手动指定
使用 AskUserQuestion:
- question: "变更类型是什么?"
- header: "变更类型"
- options:
  - "ADD" - 新增内容
  - "MODIFY" - 修改现有内容
  - "REPLACE" - 替换整个 section
  - "DELETE" - 删除内容

Then collect the specific content and generate the proposal.

Command: accept / reject

Input: proposal ID, optional comment/reason

Syntax:

/intent-changes accept C001
/intent-changes accept C001 --comment "LGTM"
/intent-changes reject C002 --reason "不同意这个改法"

Steps:

  1. Read the review file
  2. Find the proposal with the corresponding ID
  3. Verify the current status is PENDING
  4. Update the status to ACCEPTED or REJECTED
  5. Add a Decision record:
    • reviewer: obtained from git config user.name or $USER
    • timestamp: current date
    • comment: the comment provided by the user
  6. Write back to the review file

Decision Format:

**Decision:**
- ✓ @robmao (2026-01-21): "LGTM"

Or when rejecting:

**Decision:**
- ✗ @robmao (2026-01-21): "不同意这个改法"

Command: status

Output Details:

Review: kind-system-spec.md
Source: intent/specs/kind-system-spec.md
Reviewers: @robmao, @claude

─────────────────────────────────

PENDING (2):
  C002 [MODIFY] 修改 Kind 定义的措辞
  C004 [ADD] 新增性能章节

ACCEPTED (3):
  C001 [ADD] 新增 Action 分类说明
       ✓ @robmao (2026-01-21)
  C003 [MODIFY] 调整示例代码
       ✓ @claude (2026-01-21)
  C005 [DELETE] 删除过时章节
       ✓ @robmao (2026-01-21)

REJECTED (1):
  C006 [REPLACE] 重写整个文档
       ✗ @robmao (2026-01-21): "改动太大"

─────────────────────────────────

Next: /intent-changes finalize (3 changes ready)

Command: finalize

Preconditions: at least one ACCEPTED proposal

Steps:

  1. Read the review file and filter ACCEPTED proposals
  2. Sort by Target location (from the end of the document backward, to avoid position shifts)
  3. Interactively confirm each proposal:
[1/3] C001 [ADD]: 新增 Action 分类说明

Target: After "## Actions"

Content to add:
┌────────────────────────────────────────┐
│ Actions 分为三类:                      │
│ - Inline: 同步执行,决定 commit 成功与否 │
│ - Deferred: 异步执行,失败不影响 commit  │
│ - Observational: 只读,可以慢           │
└────────────────────────────────────────┘

Apply this change? [Y/n/view/quit]

User options:

  • Y (default): Apply and continue
  • n: Skip this change (keep ACCEPTED status but do not apply)
  • view: Show the complete before/after diff
  • quit: Abort finalize
  1. Apply changes to the source document
  2. Update review file:
    • Mark applied ones as [APPLIED]
    • Update frontmatter status to finalized(if all are processed)
  3. Output summary

Apply summary:

Finalize complete.

Applied: 2
  C001 - 新增 Action 分类说明
  C003 - 调整示例代码

Skipped: 1
  C005 - 删除过时章节 (user chose to skip)

Source updated: intent/specs/kind-system-spec.md
Review archived: .reviews/kind-system-spec.review.md

Review file format

Frontmatter

---
source: intent/specs/kind-system-spec.md
created: 2026-01-21
reviewers:
  - robmao
  - claude
status: active
---

status values:

  • active: In progress
  • finalized: Apply completed
  • abandoned: Abandoned

Change Proposal block

---

## C001 [ADD] [PENDING]

> 简短描述

**Target:** After "## Actions"

**After:**
```markdown
新增的内容...

C002 [MODIFY] [ACCEPTED]

Brief description

Target: Section "## Kind definition"

Before:

原内容...

After:

新内容...

Reason: Reason for change

Decision:

  • ✓ @robmao (2026-01-21): "LGTM"

## 获取 Reviewer 名称

按优先级:
1. 命令参数 `--reviewer`
2. `git config user.name`
3. 环境变量 `$USER`

```bash
# 获取方式
git config user.name || echo $USER

Boundaries

What to do

  • ✓ Manage change proposals in a structured way
  • ✓ Track the decision process
  • ✓ Support multiple reviewer signatures
  • ✓ Interactive apply

What not to do

  • ✗ Format validation → intent-validate
  • ✗ Section approval → intent-review
  • ✗ Design quality judgment → intent-critique
  • ✗ Implementation consistency → intent-sync

Working with other tools

intent-interview → 创建 Intent
        ↓
intent-critique → 质疑设计
        ↓
/intent-changes → 管理变更提案  ← 本 Skill
        ↓
intent-review → 锁定 sections
        ↓
intent-plan → 开始实现

Examples

Independent Review

# 开始
/intent-changes start intent/specs/tools-spec.md

# 提出建议
/intent-changes propose

# 决策
/intent-changes accept C001
/intent-changes reject C002 --reason "不需要"

# 应用
/intent-changes finalize

Collaborative Review

# A 启动并提建议
/intent-changes start spec.md
/intent-changes propose  # C001-C003

# B 来 review
/intent-changes accept C001 --comment "Good"
/intent-changes reject C002 --reason "换个方式"

# A 提新方案
/intent-changes propose  # C004 替代 C002

# B 接受
/intent-changes accept C004

# 最终 apply
/intent-changes finalize