# Workflow Examples

These examples show how to use Da Vinci in each supported workflow mode.

## 1. `greenfield-spec`

Use when a new project already has a stable requirement set.

Example request:

```text
$da-vinci use greenfield-spec to break down a new desktop software project for annotated design delivery
```

Expected flow:

1. create `design-brief.md`
2. create `proposal.md`
3. create `specs/<capability>/spec.md`
4. create `page-map.md`
5. register `.pen` sources in `design-registry.md`
6. create Pencil pages and record them in `pencil-design.md`
7. bind implementation pages in `pencil-bindings.md`
8. generate `tasks.md`
9. build and verify

## 2. `greenfield-brainstorm`

Use when the project starts from multiple rounds of rough ideas.

Example request:

```text
$da-vinci use greenfield-brainstorm to turn product brainstorming into a page map, Pencil design plan, and implementation tasks
```

Expected flow:

1. synthesize ideas into `brainstorm.md`
2. capture product form factor and preferences in `design-brief.md`
3. stabilize scope in `proposal.md`
4. write behavior in `specs/<capability>/spec.md`
5. define pages in `page-map.md`
6. register and generate Pencil sources
7. bind implementation pages to Pencil pages
8. generate tasks
9. build and verify

## 3. `redesign-from-code`

Use when the current product already exists and the UI needs broad redesign.

Example request:

```text
$da-vinci use redesign-from-code to inventory the current app, identify current pages, and generate a new Pencil-backed redesign plan
```

Expected flow:

1. scan the existing product into `project-inventory.md`
2. register any current `.pen` sources in `design-registry.md`
3. define redesign scope in `proposal.md`
4. write redesign constraints in `specs/<capability>/spec.md`
5. rebuild or refine `page-map.md`
6. create new or updated Pencil pages
7. bind routes and pages to Pencil screens
8. generate tasks
9. build and verify

## 4. `feature-change`

Use when an existing product needs a scoped requirement or page change.

Example request:

```text
$da-vinci use feature-change to add a billing page, generate the Pencil design delta, and create implementation tasks
```

Expected flow:

1. define the change in `proposal.md`
2. write affected behavior in `specs/<capability>/spec.md`
3. update the affected subset of `page-map.md`
4. reuse or update the active design source in `design-registry.md`
5. create the Pencil delta in `pencil-design.md`
6. update `pencil-bindings.md`
7. generate tasks
8. build and verify

## Cross-mode rule

In every mode:

- requirements decide behavior
- Pencil decides presentation
- code follows both

And in every mode:

- `design-registry.md` tracks the available `.pen` sources
- `pencil-bindings.md` tracks implementation page to Pencil page mapping
- the workflow runs as `autonomous-by-default` unless a real blocker exists
