intent-sync
55
总安装量
55
周安装量
#3925
全站排名
安装命令
npx skills add https://github.com/arcblock/idd --skill intent-sync
Agent 安装分布
claude-code
51
opencode
41
codex
40
gemini-cli
38
cursor
31
Skill 文档
Intent Sync
Synchronize implementation details back to Intent after development is complete. This makes Intent the true single source of truth.
When to Use
Use /intent-sync when:
- Implementation is complete
- All tests pass
- User has confirmed the implementation works
- You want to capture the finalized design in Intent
What Gets Synced Back
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 |
Workflow
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
Sync Process
Step 1: Gather Implementation Facts
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
Step 2: Compare with Intent
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 |
Step 3: Present for Approval
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)
Step 4: Update Intent
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 |
Output Format
The sync adds or updates these Intent sections:
New Section: ## Finalized Implementation Details
Contains:
- Sync timestamp
- Source reference (commit/version)
- Concrete interfaces
- Concrete data structures
- Final module structure
- Confirmed decisions
Updated Existing Sections
- Architecture diagrams updated to reflect reality
- Data contracts updated with actual schemas
- API specifications updated with real endpoints
Sync Markers
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 | – |
Integration with Other Skills
/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
Best Practices
- Sync after stability: Don’t sync during active development; wait for confirmation
- Preserve original intent: Keep original design rationale, add implementation details
- Be specific: Include actual types, actual endpoints, actual names
- Version reference: Always note which code version was synced
- Incremental sync: Can sync multiple times as features stabilize
Example Session
User: Implementation is done, tests pass. Please sync back to Intent.