Loading...
Loading...
Compare original and translation side by side
/intent-init
↓
┌───────────────────────────────────┐
│ Phase 1: 扫描现状 │
│ - 查找 intent/, specs/, docs/ │
│ - 识别 README, DESIGN 等文档 │
│ - 检测项目类型 (monorepo/单模块) │
└─────────────┬─────────────────────┘
↓
┌───────────────────────────────────┐
│ Phase 2: 展示发现 │
│ - 已有文档列表 │
│ - 项目结构分析 │
│ - 推荐的 IDD 结构 │
└─────────────┬─────────────────────┘
↓
┌───────────────────────────────────┐
│ Phase 3: 确认并创建 │
│ - AskUserQuestion 确认结构 │
│ - 创建目录和模板文件 │
│ - 可选:迁移现有文档 │
└───────────────────────────────────┘/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 # 项目 Intent(入口)
├── src/
└── ...project/
├── intent/
│ └── INTENT.md # Project Intent (entry point)
├── src/
└── ...project/
├── intent/
│ ├── INTENT.md # 项目概述(入口)
│ └── architecture/
│ ├── DEPENDENCIES.md # 模块依赖图
│ └── BOUNDARIES.md # 边界规则
│
├── src/
│ ├── module-a/
│ │ └── intent/
│ │ └── INTENT.md # 模块 Intent
│ └── module-b/
│ └── intent/
│ └── INTENT.md
└── ...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
└── ...undefinedundefined一句话描述项目目标
One-sentence description of project goals
| 模块 | 职责 | Intent |
|---|---|---|
| xxx | ... | [link] |
| Module | Responsibility | Intent |
|---|---|---|
| xxx | ... | [link] |
undefinedundefinedundefinedundefined模块职责一句话
One-sentence description of module responsibility
undefinedundefined// 检查路径
const intentPaths = [
'intent/INTENT.md',
'INTENT.md',
'docs/INTENT.md',
'specs/',
'design/',
];
// 检查内容特征
const intentMarkers = [
'## 职责',
'## 非目标',
'::: locked',
'::: reviewed',
];// 检查路径
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',
];// Monorepo 特征
const monorepoMarkers = [
'packages/',
'apps/',
'src/modules/',
'lerna.json',
'pnpm-workspace.yaml',
];/intent-init # 交互式初始化
/intent-init --dry-run # 只展示计划,不执行
/intent-init --minimal # 最小化结构
/intent-init --migrate # 尝试迁移现有文档/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 # 初始化结构
↓
/intent-interview # 填充 Intent 内容
↓
/intent-review # 审批关键 sections
↓
[开发]
↓
/intent-check # 检查一致性/intent-init # Initialize structure
↓
/intent-interview # Populate Intent content
↓
/intent-review # Approve key sections
↓
[Development]
↓
/intent-check # Check consistency