Loading...
Loading...
Initialize IDD structure in a project. Checks existing state, creates directory structure, and generates templates. Use /intent-init to set up Intent-driven development in current project.
npx skill4agent add arcblock/idd intent-init/intent-init
↓
┌───────────────────────────────────┐
│ Phase 1: Check Current State │
│ - Look for intent/, specs/, docs/│
│ - Identify README, DESIGN, etc. │
│ - Detect project type (monorepo/single-module) │
└─────────────┬─────────────────────┘
↓
┌───────────────────────────────────┐
│ Phase 2: Display Findings │
│ - List of existing documents │
│ - Project structure analysis │
│ - Recommended IDD structure │
└─────────────┬─────────────────────┘
↓
┌───────────────────────────────────┐
│ Phase 3: Confirm and Create │
│ - Ask user to confirm structure via AskUserQuestion │
│ - Create directories and template files │
│ - Optional: Migrate existing documents │
└───────────────────────────────────┘project/
├── intent/
│ └── INTENT.md # Project Intent (entry point)
├── src/
└── ...project/
├── intent/
│ ├── INTENT.md # Project Overview (entry point)
│ └── architecture/
│ ├── DEPENDENCIES.md # Module dependency graph
│ └── BOUNDARIES.md # Boundary rules
│
├── src/
│ ├── module-a/
│ │ └── intent/
│ │ └── INTENT.md # Module Intent
│ └── module-b/
│ └── intent/
│ └── INTENT.md
└── ...# [Project Name] Intent
> One-sentence description of project goals
Status: draft
Last Updated: YYYY-MM-DD
## Vision
[Problems and goals the project aims to solve]
## Architecture Overview
[ASCII architecture diagram]
## Module Index
| Module | Responsibility | Intent |
|------|------|--------|
| xxx | ... | [link] |
## Non-Goals
- [Clearly state what will not be done]
## Constraints
- [Technical constraints]
- [Business constraints]# [Module] Intent
> One-sentence description of module responsibility
Status: draft
Last Updated: YYYY-MM-DD
## Responsibilities
[What the module does]
## Non-Goals
[What the module does not do]
## Data Structures
[Core data structure definitions]
## API
[External interface definitions]
## Examples
[Input → Output examples]// 检查路径
const intentPaths = [
'intent/INTENT.md',
'INTENT.md',
'docs/INTENT.md',
'specs/',
'design/',
];
// 检查内容特征
const intentMarkers = [
'## 职责',
'## 非目标',
'::: locked',
'::: reviewed',
];// Monorepo 特征
const monorepoMarkers = [
'packages/',
'apps/',
'src/modules/',
'lerna.json',
'pnpm-workspace.yaml',
];/intent-init # Interactive initialization
/intent-init --dry-run # Show plan only, no execution
/intent-init --minimal # Minimal structure
/intent-init --migrate # Attempt to migrate existing documents/intent-init # Initialize structure
↓
/intent-interview # Populate Intent content
↓
/intent-review # Approve key sections
↓
[Development]
↓
/intent-check # Check consistency