---
id: 8c4f1a72-6e3b-4d91-9f2a-3b7d1c6e5a88
name: Analyze kitchen performance
kind: OperationalAnalytics
cron: 0 0 8 * * *
analysis_window: 90d
comparison_periods: [7d, 28d]
---

Analyze **kitchen performance** to improve operational efficiency, reduce ticket times, and identify bottlenecks, error-prone stations, and service inefficiencies.

The process should evaluate kitchen workflow across stations, employees, and service conditions using historical operational data from the last **90 days only**.

The output must contain **kitchen performance insights only**, without explanations or descriptions of methodology.

## Known Tables & Columns

### `GNDSALE`
- check (integer) - order identifier  
- dob (date) - transaction date  
- amount (decimal) - total check value  
- timing signals - used for rush vs non-rush classification  

### `GCHKINFO`
- check (integer) - order identifier  
- ticket time - preparation duration per order  
- station - kitchen station responsible for preparation  
- employee - staff member responsible for order  
- error flags - preparation errors and issues  

### `GNDITEM`
- item (integer) - menu item identifier  
- bohname (varchar) - item name  
- category - menu category for aggregation  

### `ITM`
- id (integer) - menu item identifier  
- longname (varchar) - item name  
- station mapping - kitchen station assignment  

## Analysis Approach

### Stage 1 — Ticket Time Analysis by Menu Category
Extract ticket time data from the last **90 days** using `GCHKINFO`.

Aggregate:
- average ticket time per menu category
- ticket time variability
- slowest categories contributing to delays.

### Stage 2 — Bottleneck Station Detection
Analyze station workload using `GCHKINFO` and `ITM`.

Identify:
- stations with highest average ticket times
- stations causing queue buildup
- structural bottlenecks in workflow between stations.

### Stage 3 — Error Rate Analysis
Compute error rates using `GCHKINFO` error flags.

Aggregate by:
- station
- employee

Identify:
- highest error rate stations
- repeat-error employees
- correlation between workload and errors.

### Stage 4 — Rush vs Non-Rush Performance
Use `GNDSALE` timing signals to classify periods into:
- rush
- non-rush

Compare:
- ticket times
- error rates
- station throughput

Identify degradation during rush periods.

## Kitchen Optimization Insights

Kitchen Performance Dashboard:
- Average ticket time: 18 min (target: 15 min)
- On-time completion: 87%
- Error rate: 3.2%

## Output Constraints

- Use historical data from the **last 90 days** only.
- Prefer aggregated summaries.
- Avoid more than **3 database queries** unless necessary.
- Return **kitchen performance insights only**.
- **Do not include explanations, reasoning, or methodology**.

## Output Format

Return structured kitchen performance results.

Example structure:

Kitchen Performance:
- Ticket Time:
  - Category: Burgers → 12.4 min avg
  - Category: Salads → 6.1 min avg

- Bottlenecks:
  - Grill Station → highest delay contribution
  - Fry Station → peak congestion periods

- Error Rates:
  - Grill Station → 3.2%
  - Employee A → 5.1%

- Rush vs Non-Rush:
  - Rush: +35% ticket time increase
  - Non-Rush: stable performance
