# /docs:init - Initialize Documentation Structure

**Agent:** `product-manager`

Initialize the documentation structure for the Movement dApp project.

**IMPORTANT**: Delegate to `product-manager` agent.

## Workflow

### Step 1: Create Documentation Directories
```bash
mkdir -p docs/api docs/contracts docs/guides docs/architecture
```

### Step 2: Generate Documentation Templates

#### docs/README.md
```markdown
# {Project Name} Documentation

## Overview
{Brief project description}

## Quick Links
- [API Reference](./api/README.md)
- [Contract Documentation](./contracts/README.md)
- [Architecture Guide](./architecture/README.md)
- [Development Guide](./guides/development.md)

## Getting Started
1. Clone the repository
2. Install dependencies
3. Configure environment
4. Run development server

## Project Structure
{Link to architecture docs}
```

#### docs/api/README.md
```markdown
# API Reference

## Endpoints

### GET /api/{module}/value/:address
Get the current value for an address.

**Parameters:**
- `address` (string): The account address

**Response:**
\`\`\`json
{
  "success": true,
  "data": [value]
}
\`\`\`
```

#### docs/contracts/README.md
```markdown
# Smart Contract Documentation

## Modules

### {module_name}
{Module description}

#### Resources
- `ResourceName`: {Description}

#### Entry Functions
- `function_name(param1: Type)`: {Description}

#### View Functions
- `get_value(addr: address): u64`: {Description}

#### Events
- `EventName`: Emitted when {condition}

#### Error Codes
| Code | Name | Description |
|------|------|-------------|
| 1 | E_NOT_AUTHORIZED | Caller is not authorized |
```

#### docs/guides/development.md
```markdown
# Development Guide

## Prerequisites
- Node.js 18+
- Movement CLI
- Rust (for Move development)

## Setup
1. Install dependencies
2. Configure environment variables
3. Start development servers

## Testing
- Run Move tests: `cd contracts && movement move test`
- Run frontend tests: `cd frontend && npm test`

## Deployment
See [Deployment Guide](./deployment.md)
```

### Step 3: Create .env.example Files

#### frontend/.env.example
```
VITE_NETWORK=testnet
VITE_MODULE_ADDRESS=0x1
VITE_NODE_URL=https://full.testnet.movementinfra.xyz/v1
```

## Output Summary
```markdown
# 📚 Documentation Initialized

## Created Files
- docs/README.md
- docs/api/README.md
- docs/contracts/README.md
- docs/guides/development.md
- docs/architecture/README.md
- frontend/.env.example

## Next Steps
- Run `/docs:generate` to auto-generate API docs from code
- Update documentation as you develop
```

