# README #


Readme version latest genie

## Local Secrets Configuration
Otto supports a local, non-committed secrets file for outbound integrations
(e.g. Slack webhooks) when server-level environment variables are not available.

A commit-safe example file is provided:

    otto/config/secrets.example.php

To configure secrets locally:

1. Copy the example file:
       otto/config/secrets.example.php -> otto/config/secrets.php
2. Fill in the required values (e.g. Slack webhook URL)
3. Do NOT commit `secrets.php`

The real secrets file is intentionally git-ignored and read only by
adapter-level code (never by handlers or dispatchers).

## Otto Setup
1. Visit `/otto/setup` in the browser.
2. Click "Install Otto" to generate `/otto/config/runtime.php`.
3. You will be redirected to `/otto/dashboard`.

Setup only runs when Otto is not installed.

## Otto Dashboard
The dashboard lives at `/otto/dashboard` and is accessible only after setup.
It provides:
- Health status (core, chat, fitment, slack, otto_gpt, support_nlp)
- Feature toggles (disabled by default)
- Slack configuration
- Support NLP and escalation tools

## Slack Enablement
1. Add your webhook URL in `/otto/config/secrets.php`.
2. Enable Slack in `/otto/dashboard`.
3. Slack errors are reported only when enabled and configured.

## Otto GPT Enablement
1. Add `openai_api_key` (and optional `openai_model`) to `/otto/config/secrets.php`.
2. Enable Otto GPT in `/otto/dashboard`.
3. When disabled, chat remains workflow-only and GPT is never called.

## Phase 3 Hooks
Phase 3 validation is enforced in CI and can be enabled locally via shared hooks.

Setup once per clone:
- PowerShell: `./scripts/setup-hooks.ps1`
- Bash: `./scripts/setup-hooks.sh`

The hook runs: `php fitment/runtime/phase3_validate.php`

## Fitment & Ingestion Test Plan
Cursor-safe, browser-only testing plan:
`fitment/test_plan_fitment_ingestion.md`

## Support Escalation
1. Enable Support NLP and Support escalation in `/otto/dashboard`.
2. Run Support NLP for admin assistance if needed.
3. Use the escalation form to send a structured email to `otto-support@paradigmpros.com`.
4. Email failures are reported in the dashboard and do not break runtime.