intent-init

Original🇨🇳 Chinese
Translated

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.

4installs
Added on

NPX Install

npx skill4agent add arcblock/idd intent-init

SKILL.md Content (Chinese)

View Translation Comparison →

Intent Init

Initialize the IDD (Intent Driven Development) structure for a project.

Features

  1. Check Current State - Scan the project to identify existing intent files or similar structures
  2. Create Directories - Establish the standard IDD directory structure
  3. Generate Templates - Create the entry INTENT.md and module-level templates
  4. Configuration Recommendations - Provide configuration suggestions based on project type

Workflow

/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 │
└───────────────────────────────────┘

Standard IDD Directory Structure

Single-module Project

project/
├── intent/
│   └── INTENT.md           # Project Intent (entry point)
├── src/
└── ...

Monorepo / Multi-module Project

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
└── ...

Template Content

Project-level INTENT.md

markdown
# [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-level INTENT.md

markdown
# [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]

Detection Logic

Identify Existing Intent Structures

javascript
// 检查路径
const intentPaths = [
  'intent/INTENT.md',
  'INTENT.md',
  'docs/INTENT.md',
  'specs/',
  'design/',
];

// 检查内容特征
const intentMarkers = [
  '## 职责',
  '## 非目标',
  '::: locked',
  '::: reviewed',
];

Project Type Identification

javascript
// Monorepo 特征
const monorepoMarkers = [
  'packages/',
  'apps/',
  'src/modules/',
  'lerna.json',
  'pnpm-workspace.yaml',
];

Options

/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

Integration with Other Commands

/intent-init              # Initialize structure
/intent-interview         # Populate Intent content
/intent-review            # Approve key sections
[Development]
/intent-check             # Check consistency