# First Project

> Create and bind your first LocalWP-backed Oh My IDEtch project.

# First Project

Start a LocalWP-backed project from the devkit root. The easiest path is to let your agent run the built-in onboarding workflow.

## Recommended Agent Flow

Open the devkit root in your agent and send:

```text
/new-project
```

The agent should ask for only the missing setup details:

| Input | How it is used |
| --- | --- |
| Local site name | The agent matches it against LocalWP sites. |
| Build brief | The agent records what the site should become. |
| Project slug | Usually inferred from the Local site name. The agent asks only if the inferred slug is invalid, already exists, ambiguous, or you want a custom one. |
| Browser automation choice | Optional. Used for page previews and screenshots after sync when not already installed. |

If the Local site does not exist, create it in Local first. The devkit does not create Local sites, ship premium plugins, provide licenses, or generate Local Blueprints for you.

## What `/new-project` Does

The workflow creates and binds a project, then checks the initial runtime surface before the first sync:

```sh
bun run localwp:list
bun run project:create -- <slug>
bun run localwp:bind -- --project <slug> --site "<Local site name>"
bun run project:check -- --project <slug>
bun run localwp:sync -- --project <slug>
bun run localwp:doctor -- --project <slug>
bun run localwp:capabilities -- --project <slug>
```

It may also try to activate the synced plugin:

```sh
bun run localwp:wp -- --project <slug> -- plugin activate oh-my-idetch
```

If WP-CLI is unavailable because Local has not generated a Site Shell entry, open Local, choose the site, select **Open Site Shell**, and rerun the command or activate the plugin in WordPress admin.

## Manual Setup

Use the manual commands when you do not want the agent onboarding flow:

```sh
bun run localwp:list
```

Create the project:

```sh
bun run project:create -- my-site
```

Bind it to a Local site:

```sh
bun run localwp:bind -- --project my-site --site "My Site"
```

Run the first check and sync:

```sh
bun run project:check -- --project my-site
bun run localwp:sync -- --project my-site
```

Inspect readiness and installed capabilities:

```sh
bun run localwp:doctor -- --project my-site
bun run localwp:capabilities -- --project my-site
```

## Project Files

After setup, use the project directory as the site source:

```text
projects/my-site/
  project.json
  AGENTS.project.md
  oh-my-idetch.php
  src/
  cms/
  tests/
  tools/
  var/
```

Keep project-specific brief notes, constraints, runtime expectations, and Local binding notes in `projects/my-site/AGENTS.project.md` so future agent sessions start with the right context.
