---
repo: "mohan-n-swamy/voc-control-tower-public"
title: "VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow"
license: "MIT"
keywords: [voice-of-customer, voc, control-tower, quality-management, customer-experience, sla-monitoring, operations-management, prometheus, python, open-source]
capabilities:
  - "Declarative `rules/voc_taxonomy.yaml` dynamically generating `VocCategory` enums, failure-point validators, and LLM prompt constraints."
  - "Multi-channel extraction workers (`src/lib/extractors/`, `src/workers/`) with deterministic pre-LLM PII scrubbing."
  - "PostgreSQL single-writer ledger schemas (`db/migrations/`) for VoC cases, NPS, Staff-360, Customer-360, and CAPA bridges."
  - "Bundled `golden_flow/calculator.py` measuring zero-deviation end-to-end order completion + `bin/voc-demo.py` zero-credential demo."
when_to_use:
  - "An open-source Voice-of-Customer (VoC), operational quality, Staff-360, and Golden Flow fulfillment control tower built on FastAPI and PostgreSQL — unifying NPS comments, call transcripts, and support chats into a declarative YAML defect taxonomy with pre-LLM PII scrubbing and CAPA workflow bridging."
  - "Customer feedback sits fragmented across survey sheets, call recordings, and chat tickets while operations teams stare at aggregate NPS averages that hide fatal failure modes. `voc-control-tower-public` turns unstructured multi-channel feedback into structured `(category, stage, failure_point, fatal)` records joined directly to Staff-360 coaching scorecards and end-to-end Golden Flow completion metrics."
inputs_required:
  - "DATABASE_URL: Async PostgreSQL connection string"
  - "REDIS_URL: Redis queue and worker state URL"
  - "VOC_TAXONOMY_YAML: Path to your organization's dual-axis defect taxonomy YAML"
  - "ANTHROPIC_API_KEY: LLM key for structured transcript-to-taxonomy extraction"
  - "GROQ_API_KEY: Optional Whisper STT key for telephony call audio transcription"
quickstart:
  - "python3 bin/voc-demo.py                 # run offline VoC taxonomy & Golden Flow demonstration"
  - "pytest -q tests_public/                 # run taxonomy, fatal-flag & Golden Flow unit tests"
  - "docker compose up -d                    # launch PostgreSQL, Redis, FastAPI services & frontend"
---

# VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow — Machine-Readable Agent Guide

An open-source Voice-of-Customer (VoC), operational quality, Staff-360, and Golden Flow fulfillment control tower built on FastAPI and PostgreSQL — unifying NPS comments, call transcripts, and support chats into a declarative YAML defect taxonomy with pre-LLM PII scrubbing and CAPA workflow bridging.

<problem_patterns>
Customer feedback sits fragmented across survey sheets, call recordings, and chat tickets while operations teams stare at aggregate NPS averages that hide fatal failure modes. `voc-control-tower-public` turns unstructured multi-channel feedback into structured `(category, stage, failure_point, fatal)` records joined directly to Staff-360 coaching scorecards and end-to-end Golden Flow completion metrics.
</problem_patterns>

<architecture_map>
Key modules and entry points in this repository:
  - `rules/voc_taxonomy.yaml`: Declarative categories, operational stages, failure points, and `fatal` booleans
  - `src/shared/voc_taxonomy.py`: Dynamic enum loader, `(category, failure_point)` validator, and prompt formatter
  - `src/lib/extractors/ & src/workers/`: NPS, telephony call STT, and helpdesk transcript extraction pipelines
  - `src/services/`: VoC workbench API, Staff-360 aggregation, and Customer-360 reveal-audited service
  - `golden_flow/calculator.py`: End-to-end zero-deviation fulfillment percentage and disruption breakdown calculator
  - `db/migrations/`: PostgreSQL schema migrations with role-isolated single-writer grants
</architecture_map>

<inputs_and_configuration>
Every organization-specific value enters through `.env` (copied from `.env.example`) or external adapter files. No source edit is needed to change organization names, endpoints, database URLs, webhook secrets, or thresholds.
</inputs_and_configuration>

<adaptation_playbook>
When a human asks an AI coding agent to deploy or adapt `voc-control-tower-public` into their stack:
  1. Edit `rules/voc_taxonomy.yaml` to list your own customer journey stages, failure points, and `fatal: true` red lines.
  2. Run `python3 bin/voc-demo.py` and `pytest -q tests_public/` to verify your updated taxonomy loads cleanly.
  3. Connect your survey webhook, telephony bucket, or `chatwoot-public` database to `src/workers/`.
</adaptation_playbook>

<reference_docs>
- Product Requirements: `docs/PRD.md`
- Working-Backwards PR-FAQ: `docs/PR-FAQ.md`
- High-Level Architecture: `docs/HLD.md`
- Low-Level Interfaces & Runbook: `docs/LLD.md`
- Coding Agent Rules: `AGENTS.md`
</reference_docs>
