# Webdev Agent OS v2 — Project Generator

The Project Generator converts a completed project intake into an opinionated starter repository. It does not pretend a starter is a finished production product. Its purpose is to eliminate avoidable setup work while preserving explicit implementation, security, content, privacy, and release responsibilities.

## Generation sequence

1. Complete the project intake.
2. Select an architecture preset.
3. Select the theme, data-store intention, and authentication intention.
4. Review the generated file tree and important files.
5. Export the manifest or download the full ZIP.
6. Implement the backlog as complete vertical slices.
7. Audit the result and clear every release blocker.

## Architecture presets

### Static marketing site

Use for focused landing pages, demonstrations, offer pages, and lead-generation sites that do not require server-side secrets or durable application state.

Generated foundation:

- Accessible responsive HTML
- Design tokens and responsive CSS
- Validated client-side form demonstration
- Privacy and 404 placeholders
- Test starter
- Deployment documentation

### Express service

Use for operational websites and services that need server-side integration boundaries, health checks, validated submissions, or secret credentials.

Generated foundation:

- Node and Express application
- Helmet security headers
- Structured request logging
- Health and readiness routes
- Validated contact API
- Static frontend
- Environment variable contract
- IIS reverse-proxy kit

### React client portal

Use for stateful workflows, authenticated products, multi-step applications, or component-heavy interfaces.

Generated foundation:

- React client through Vite
- Express API service
- Development proxy
- API-backed project contract
- Production build output
- Environment, test, deployment, and release assets

### Operations dashboard

Use for internal queues, records, metrics, administration, and operational workflows.

Generated foundation:

- Dashboard interface
- Operational metric and queue patterns
- Express API and health routes
- Refresh and connectivity behavior
- IIS and Windows service deployment assets

## Required generated assets

Every project includes:

- `webdev.manifest.json`
- `README.md`
- Architecture decision record
- Implementation backlog
- Release checklist
- Source structure for the selected architecture
- `.gitignore`

Optional assets include tests, privacy placeholders, and IIS deployment files.

## Generator boundaries

The generator never claims to complete these responsibilities automatically:

- Real authorization and tenant isolation
- Legal policy approval
- Production data design and migration
- Third-party integration credentials
- Rate limiting and abuse controls specific to the use case
- Production content approval
- Complete accessibility verification
- Monitoring and incident response ownership
- Backup and restore verification
- Final release approval

These remain visible in the backlog and release process rather than being hidden behind a “generated successfully” message.

## Browser generator

Open the Webdev Agent Control Center, complete Project Intake, and choose **Project Generator**. The dashboard can preview the repository, inspect individual generated files, export the manifest, and generate a ZIP entirely in the browser.

## Command-line generator

```bash
node scripts/generate-project.js config/project-generator.example.json generated-projects/example
```

Or generate the built-in example:

```bash
npm run generate:example
```

The command rejects non-empty output directories to reduce accidental overwrites.
