---
name: Init - Detect and Gather Context
description: Detect documentation type and gather context from request
next_step: step-01-scan.md
---

## STEP 00: Init — Detect Documentation Type and Gather Context

### Purpose

Analyze the user request to identify documentation type, target name, and gather execution context before proceeding to scanning.

### Execution Sequence

#### 1. Type Detection

Analyze the request to identify:

| Clue | → Type |
|------|--------|
| Functional module (SLA, Tickets, Users) | `user` |
| Dev tool (Docker, Postman, VS Code) | `developer` |
| Tables, schema, database | `database` |
| Tests (security, load, E2E) | `testing` |

#### 2. Target Extraction

Identify the specific name:
- **Module:** `sla`, `tickets`, `users`, `permissions`
- **Tool:** `docker`, `postman`, `playwright`, `maildev`
- **Schema:** `support`, `auth`, `nav`, `usr`
- **Test:** `security`, `load`, `e2e`

#### 3. Documentation Mode Detection

Determine if this is:
- **NEW documentation** (type = user|developer|database|testing) → Generate from scratch
- **UPDATE documentation** (explicit "update" flag or drift detected) → Refresh existing content

#### 4. Available Developer Tools Reference

| Category | Tools |
|----------|-------|
| Local Environment | Docker Compose, MailDev, VS Code, Environment variables |
| API Testing | Postman, REST Client, Swagger/OpenAPI |
| E2E Testing | Microsoft Playwright, Inspector, Trace Viewer |
| Load Testing | NBomber (.NET), k6, Azure Load Testing |
| Security Testing | OWASP ZAP, Security Code Scan, Snyk, OWASP ASVS |

### Output

At end of this step, you should have:

| Variable | Value | Example |
|----------|-------|---------|
| `type` | user \| developer \| database \| testing \| update | `user` |
| `target` | Module/Tool/Schema name | `users` |
| `application` | Parent app (for user type) | `administration` |
| `mode` | new \| update | `new` |

### Success Metrics

- [x] Type correctly identified from request
- [x] Target name extracted and validated
- [x] Application assigned (if type = user)
- [x] Mode determined (new vs update)

### Next Step

→ **step-01-scan.md** — Scan source code and existing documentation based on detected type.
