npx skills add https://github.com/arcblock/idd --skill intent-sync在开发完成后,将实现细节同步回意图。这使得意图成为真正的单一事实来源。
在以下情况使用 /intent-sync:
在实现过程中,许多细节被最终确定,而这些细节并未在原始意图中指定:
| 类别 | 示例 |
|---|---|
| 接口 | API 端点、函数签名、协议定义 |
| 数据结构 | 模式定义、类型定义、模型结构 |
| 命名 | 最终的类名、函数名、变量约定 |
| 架构 | 模块边界、依赖方向、层级结构 |
| 配置 | 环境变量、配置文件格式、默认值 |
| 错误处理 | 错误代码、错误消息格式、恢复策略 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
用户确认实现完成
↓
读取原始意图文件
↓
扫描已实现代码以获取:
- 公共接口
- 数据结构
- 关键命名约定
- 架构模式
↓
与意图进行比较
↓
识别差距/差异
↓
呈现待批准的更改
↓
使用已确认的细节更新意图
↓
用时间戳标记已同步的部分
扫描代码库以获取最终确定的细节:
代码分析:
├── 公共 API
│ ├── 端点 (REST/GraphQL/RPC)
│ ├── 函数签名
│ └── 事件定义
├── 数据模型
│ ├── 数据库模式
│ ├── 类型定义
│ └── 配置结构
├── 架构
│ ├── 模块结构
│ ├── 依赖图
│ └── 层级边界
└── 约定
├── 命名模式
├── 错误格式
└── 日志记录标准
识别新增或不同的内容:
| 状态 | 含义 | 操作 |
|---|---|---|
| 新增 | 原始意图中没有 | 添加到意图 |
| 已更改 | 与意图不同 | 更新意图 |
| 已确认 | 与意图匹配 | 标记为已实现 |
| 已移除 | 在意图中但未实现 | 移除或标记为延期 |
使用 AskUserQuestion 来确认更改:
"以下细节在实现过程中已最终确定。
我是否应该将它们同步回意图?"
接口:
- [x] POST /api/users - 创建用户 (新增)
- [x] UserSchema: 添加了 'createdAt' 字段 (已更改)
数据结构:
- [x] 配置现在使用 YAML 而非 JSON (已更改)
命名:
- [x] 服务类重命名为 UserService (已更改)
添加新部分或更新现有部分:
## 最终确定的实现细节
> 同步于:YYYY-MM-DD
> 来源:[提交哈希或版本]
### API 接口
| 端点 | 方法 | 请求 | 响应 |
|----------|--------|---------|----------|
| /api/users | POST | `{name, email}` | `{id, name, email, createdAt}` |
| /api/users/:id | GET | - | `{id, name, email, createdAt}` |
### 数据结构
```typescript
interface User {
id: string;
name: string;
email: string;
createdAt: Date;
}
src/
├── api/
│ └── users.ts # 用户端点
├── services/
│ └── UserService.ts # 业务逻辑
├── models/
│ └── User.ts # 数据模型
└── config/
└── config.yaml # 配置
| 决策 | 最终选择 | 理由 |
|---|---|---|
| 配置格式 | YAML | 对于嵌套配置具有更好的可读性 |
| ID 生成 | UUID v4 | 标准,无需协调 |
## 输出格式
同步会添加或更新以下意图部分:
### 新部分:`## 最终确定的实现细节`
包含:
* 同步时间戳
* 来源引用(提交/版本)
* 具体接口
* 具体数据结构
* 最终模块结构
* 已确认的决策
### 更新的现有部分
* 架构图更新以反映实际情况
* 数据契约更新为实际模式
* API 规范更新为真实端点
## 同步标记
使用标记来指示同步状态:
[!SYNCED] 最后同步:2024-01-15 来自提交 abc123
...
或在表格中:
组件 | 状态 | 最后同步
---|---|---
User API | 已同步 | 2024-01-15
Auth API | 草稿 | -
## 与其他技能的集成
/intent-interview # 创建意图(初始) ↓ /intent-review # 批准意图 ↓ /intent-plan # 生成执行计划 ↓ [执行:TDD 周期] ↓ /intent-sync # 写回已确认的细节(本技能) ↓ /intent-check # 验证一致性
## 最佳实践
1. **稳定后同步**:不要在活跃开发期间同步;等待确认
2. **保留原始意图**:保留原始设计原理,添加实现细节
3. **具体明确**:包含实际类型、实际端点、实际名称
4. **版本引用**:始终注明同步的代码版本
5. **增量同步**:可以在功能稳定时多次同步
## 示例会话
用户:实现已完成,测试通过。请同步回意图。
每周安装次数
67
仓库
[arcblock/idd](https://github.com/arcblock/idd "arcblock/idd")
GitHub 星标数
9
首次出现
2026年1月21日
安全审计
[Gen Agent Trust HubPass](/arcblock/idd/intent-sync/security/agent-trust-hub)[SocketPass](/arcblock/idd/intent-sync/security/socket)[SnykPass](/arcblock/idd/intent-sync/security/snyk)
安装于
claude-code58
opencode53
codex52
gemini-cli50
cursor43
antigravity41
Synchronize implementation details back to Intent after development is complete. This makes Intent the true single source of truth.
Use /intent-sync when:
During implementation, many details get finalized that weren't specified in the original Intent:
| Category | Examples |
|---|---|
| Interfaces | API endpoints, function signatures, protocol definitions |
| Data Structures | Schema definitions, type definitions, model structures |
| Naming | Final class names, function names, variable conventions |
| Architecture | Module boundaries, dependency directions, layer structure |
| Configuration | Environment variables, config file formats, defaults |
| Error Handling | Error codes, error message formats, recovery strategies |
User confirms implementation is done
↓
Read original Intent file
↓
Scan implemented code for:
- Public interfaces
- Data structures
- Key naming conventions
- Architecture patterns
↓
Compare with Intent
↓
Identify gaps/differences
↓
Present changes for approval
↓
Update Intent with confirmed details
↓
Mark synced sections with timestamp
Scan the codebase for finalized details:
Code Analysis:
├── Public APIs
│ ├── Endpoints (REST/GraphQL/RPC)
│ ├── Function signatures
│ └── Event definitions
├── Data Models
│ ├── Database schemas
│ ├── Type definitions
│ └── Config structures
├── Architecture
│ ├── Module structure
│ ├── Dependency graph
│ └── Layer boundaries
└── Conventions
├── Naming patterns
├── Error formats
└── Logging standards
Identify what's new or different:
| Status | Meaning | Action |
|---|---|---|
| New | Not in original Intent | Add to Intent |
| Changed | Different from Intent | Update Intent |
| Confirmed | Matches Intent | Mark as implemented |
| Removed | In Intent but not implemented | Remove or mark deferred |
Use AskUserQuestion to confirm changes:
"The following details were finalized during implementation.
Should I sync them back to Intent?"
Interfaces:
- [x] POST /api/users - Create user (new)
- [x] UserSchema: added 'createdAt' field (changed)
Data Structures:
- [x] Config now uses YAML instead of JSON (changed)
Naming:
- [x] Service class renamed to UserService (changed)
Add a new section or update existing sections:
## Finalized Implementation Details
> Synced on: YYYY-MM-DD
> From: [commit hash or version]
### API Interfaces
| Endpoint | Method | Request | Response |
|----------|--------|---------|----------|
| /api/users | POST | `{name, email}` | `{id, name, email, createdAt}` |
| /api/users/:id | GET | - | `{id, name, email, createdAt}` |
### Data Structures
\`\`\`typescript
interface User {
id: string;
name: string;
email: string;
createdAt: Date;
}
\`\`\`
### Module Structure
\`\`\`
src/
├── api/
│ └── users.ts # User endpoints
├── services/
│ └── UserService.ts # Business logic
├── models/
│ └── User.ts # Data model
└── config/
└── config.yaml # Configuration
\`\`\`
### Key Decisions Confirmed
| Decision | Final Choice | Rationale |
|----------|--------------|-----------|
| Config format | YAML | Better readability for nested config |
| ID generation | UUID v4 | Standard, no coordination needed |
The sync adds or updates these Intent sections:
## Finalized Implementation DetailsContains:
Use markers to indicate sync status:
## API Design
> [!SYNCED] Last synced: 2024-01-15 from commit abc123
### Endpoints
...
Or in tables:
| Component | Status | Last Synced |
|---|---|---|
| User API | SYNCED | 2024-01-15 |
| Auth API | DRAFT | - |
/intent-interview # Create Intent (initial)
↓
/intent-review # Approve Intent
↓
/intent-plan # Generate execution plan
↓
[Execute: TDD cycles]
↓
/intent-sync # Write back confirmed details (THIS SKILL)
↓
/intent-check # Verify consistency
User: Implementation is done, tests pass. Please sync back to Intent.
Weekly Installs
67
Repository
GitHub Stars
9
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code58
opencode53
codex52
gemini-cli50
cursor43
antigravity41
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
163,300 周安装