# Customer Install Flow

Goal: make RepoKey usable in a customer project with one setup command,
two required inputs, and a project-local AI entry file.

## Install

Run the customer setup script from the RepoKey package:

```powershell
RepoKey-Setup.cmd
```

During setup, the customer only needs to fill in:

1. The Vivado installation path.
2. The Vivado project path.

All other prompts should be accepted by pressing any key.

After setup:

1. Fully close every AI client.
2. Reopen the AI client so RepoKey reloads.
3. Open the project-local `AI_AGENT_START_HERE.local.md`.
4. Give that file to the AI Agent.

The AI should start from:

```text
<project_root>/AI_AGENT_START_HERE.local.md
```

## Smoke Test

Run:

```powershell
RepoKey-Self-Test.cmd
```

Expected:

- RepoKey setup completes.
- The Vivado path is recorded.
- The project path is recorded.
- `AI_AGENT_START_HERE.local.md` is generated for the customer project.

Do not require project-local `tools/vitis` or `vitis_debug_status` for a
pass. Missing optional helpers are not a failed smoke.

## Recommended Customer Workflow

1. AI reads `AI_AGENT_START_HERE.local.md`.
2. AI follows `REPOKEY_OPERATING_CHARTER.md`: shortest available evidence
   path; tools provide evidence; humans authorize design-intent changes.
3. On-board debug uses RepoKey `debug` (`program` / `ps-run` /
   `live-capture` / `ila-csv-summary`). Project-local helpers are optional
   reference, never a required path.
4. Human authorizes design-intent changes.

## Packaging Note

Do not add extra setup steps that the customer must complete manually. The
desired customer experience is one setup script, two prompts, a full AI client
restart, and then the local AI entry file.

## Diagnostics and Privacy

Run the packaged diagnostic command from the package directory:

```text
repokey-client.cmd diagnose
```

The default support bundle excludes the customer's License, redacts local
machine paths and sensitive fields, and keeps flow audit output under the
project-local `.vivado_ai_mcp\audit\flow_calls.jsonl` path. Check the generated
bundle before sharing it. Never paste the full License or unredacted logs into
an ordinary chat or support request.
