---
name: business-init
description: Use when the user wants to initialize a machine-business project workspace by slug. Creates docs/inputs/<project-slug>/, docs/business/<project-slug>/, and an input index without modifying existing files. Triggers on "/machine-business:business-init <project-slug>", "/business-init <project-slug>", and requests to set up the machine-business workspace.
---

# Business Init

Create the standard folder structure for one machine-business project.

## Folder contract

```text
docs/inputs/<project-slug>/
  raw/
  transcriptions/
  index.json

docs/business/<project-slug>/
```

- `docs/inputs/<project-slug>/raw/` stores raw user-provided files for this project: audio, notes, transcripts, source documents, and other material to process.
- `docs/inputs/<project-slug>/transcriptions/` stores one Markdown resource record per processed input. There is no consolidated batch record in this layout.
- `docs/inputs/<project-slug>/index.json` stores the project input registry. It references resource records by path and MUST NOT store full transcript text.
- `docs/business/<project-slug>/` stores final business deliverables produced by `business-proposal` and `render-docx`: `proposal.md` and `proposal.docx`.

## Index contract

If `docs/inputs/<project-slug>/index.json` does not exist, create it with this structure:

```json
{
  "project": "<project-slug>",
  "inputs": []
}
```

## Operating protocol

1. Resolve the workspace root as the current working directory.
2. Read the project slug from `$ARGUMENTS`.
   - If missing, stop with `⚠️ NEEDS INPUT: indica el project slug, por ejemplo /machine-business:business-init acme-demo`.
   - The slug MUST be kebab-case ASCII: lowercase letters, numbers, and single hyphens. If invalid, ask for a corrected slug.
3. Run the scaffolding script. Prefer `$CLAUDE_PLUGIN_ROOT` when installed:

   ```bash
   bash "$CLAUDE_PLUGIN_ROOT/scripts/business-init.sh" "<project-slug>"
   ```

   In a local checkout, call:

   ```bash
   bash plugins/machine-business/scripts/business-init.sh "<project-slug>"
   ```

   The script creates the directories and the input index only when missing, and self-verifies before exiting.
4. If the script exits non-zero, report its output verbatim and stop. Do not hand-create folders or the index as a workaround.
5. Report the initialized structure in the current user interaction language and print exactly ONE next-step command:

   ```text
   /machine-business:process-input <project-slug>
   ```

## Hard rules

- **Scaffolding is script-owned.** Folders and `index.json` MUST be created by `scripts/business-init.sh`, never hand-created step by step.
- **Project slug required.** Never initialize global `docs/inputs/raw/` or `docs/inputs/transcriptions/` folders.
- **No destructive actions.** Never remove, migrate, or overwrite existing files.
- **Index creation only when missing.** Existing `index.json` files MUST be left untouched.
- **No processing.** This skill does not transcribe audio, create resource records, draft proposals, or render DOCX files.
- **No auto-chaining.** Suggest `/machine-business:process-input <project-slug>`, but do not run it.
