# VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow — Complete AI & LLM Reference Corpus (`llms-full.txt`) - Repository: https://github.com/mohan-n-swamy/voc-control-tower-public - Web Discovery URL: https://mohan-n-swamy.github.io/repos/voc-control-tower-public/ - License: MIT - Keywords: voice-of-customer, voc, control-tower, quality-management, customer-experience, sla-monitoring, operations-management, prometheus, python, open-source --- ## File: `AI-README.md` — AI-README.md --- 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. 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. 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 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. 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/`. - 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` --- ## File: `.env.example` — Environment Contract (.env.example) ```ini # voc-control-tower-public — Voice-of-Customer, Staff-360 & Golden Flow Control Tower DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/voc_tower REDIS_URL=redis://localhost:6379/0 VOC_TAXONOMY_YAML=./rules/voc_taxonomy.yaml LLM_PROVIDER=anthropic ANTHROPIC_API_KEY=replace_with_llm_api_key GROQ_API_KEY=replace_with_stt_api_key PROMETHEUS_METRICS_PORT=9090 ``` --- ## File: `AGENTS.md` — AGENTS.md # AGENTS.md — VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow Read this file first before modifying `voc-control-tower-public`. ## Purpose 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. ## Commands ```bash 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 ``` ## Module Map - `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 ## Invariants 1. Keep all organization names, credentials, domains, and thresholds in `.env` or external config files. Never hardcode company names, host IPs, or secrets in source files. 2. Deterministic business logic belongs in code and lookup tables, not inside LLM prompts. 3. Update `docs/HLD.md`, `docs/LLD.md`, and `.env.example` in the same commit whenever an interface or environment variable changes. 4. Run the repository smoke check and secret scan before opening a pull request. --- ## File: `docs/PRD.md` — Product Requirements Document (docs/PRD.md) # Product Requirements Document — VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow 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. ## 1. Problem 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. ## 2. Users and Jobs-to-be-Done | Persona | Job-to-be-Done | |---|---| | VP Operations / Quality Lead | Spot fatal service-stage defects in real time, track Golden Flow % across cities, and trigger CAPAs on recurring root causes. | | Customer Experience (CX) Ops | Work from one prioritized workbench combining NPS detractors, call transcripts, and escalated support journeys. | | Team Lead / Coach | Review Staff-360 defect and praise trends to run targeted skill coaching instead of blanket retraining. | ## 3. Core 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. ## 4. Configurable Inputs Adopters configure the system for their own organization without editing core application logic: | Variable | Default / Example | Purpose | |---|---|---| | `DATABASE_URL` | `postgresql+asyncpg://postgres:postgres@localhost:5432/voc_tower` | Async PostgreSQL connection string | | `REDIS_URL` | `redis://localhost:6379/0` | Redis queue and worker state URL | | `VOC_TAXONOMY_YAML` | `./rules/voc_taxonomy.yaml` | Path to your organization's dual-axis defect taxonomy YAML | | `ANTHROPIC_API_KEY` | `sk-ant-...` | LLM key for structured transcript-to-taxonomy extraction | | `GROQ_API_KEY` | `gsk_...` | Optional Whisper STT key for telephony call audio transcription | ## 5. Phasing and Stability Exit Criteria 1. **Phase 1 (Local Synthetic Run):** Clone the repository, copy `.env.example` to `.env`, and run the quickstart commands against synthetic seed data. Exit criterion: smoke checks pass with zero external credentials. 2. **Phase 2 (Read-Only Shadow Wiring):** Connect read-only credentials or webhook listeners in shadow/dry-run mode. Exit criterion: 100 consecutive events or queries reconcile cleanly against source records. 3. **Phase 3 (Production Cutover):** Enable live writes, alerts, or routing behind bounded retry and idempotency guards. ## 6. Non-Goals - Shipping organization-specific business rules hardcoded in application source. - Storing credentials, personal customer records, or tenant URLs inside version control. - Replacing deterministic validation or arithmetic with unconstrained model prompts. --- ## File: `docs/PR-FAQ.md` — Working-Backwards PR-FAQ (docs/PR-FAQ.md) # Working-Backwards PR-FAQ — VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow **Release Summary:** `voc-control-tower-public` gives engineering and operations teams a self-hosted, open-source implementation of VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow that configures via `.env` and runs on standard infrastructure in minutes. ## Press Release Operations and engineering teams often rebuild the same internal workflows behind closed doors or pay per-seat SaaS markups for rigid tools that cannot match their field reality. `voc-control-tower-public` open-sources a battle-tested implementation of VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow, stripped of all single-company assumptions and packaged with clear adapter boundaries, synthetic demo data, and machine-readable agent documentation. Any team can fork `voc-control-tower-public`, supply their own `.env` inputs and taxonomy config, and deploy locally or in production with Docker, Python, or Node. AI coding assistants such as Claude Code, Codex, and Cursor can read `AI-README.md` and `llms.txt` to wire custom ERP, CRM, or warehouse adapters in a single session. ## External Adopter FAQ **Q1: How long does it take to run locally after cloning?** Under five minutes. Copy `.env.example` to `.env` and run the quickstart commands in `README.md`. Synthetic fixtures let you inspect the workflow before connecting live credentials. **Q2: Do I need to rewrite source files to use my own company name, channels, or rules?** No. Organization names, endpoints, thresholds, and credentials sit in `.env` and declarative config files. External system specifics live behind narrow adapter modules documented in `docs/LLD.md`. **Q3: What license governs this repository?** MIT License. You can fork, modify, self-host, and use it commercially without restriction. ## Internal Engineering & Security FAQ **Q4: How do we prevent tenant or employer data from ever entering a public fork?** The repository starts from a clean git history, excludes raw exports and binary dumps, validates every commit through `gitleaks`, and ships only synthetic fixtures. **Q5: What happens when an upstream API or model provider is slow or unavailable?** Inbound webhooks persist raw payloads before processing, outbound writes carry idempotency keys with bounded exponential backoff, and model-backed paths fail open to deterministic rules or explicit human queues. --- ## File: `docs/HLD.md` — High-Level Design (docs/HLD.md) # High-Level Design (HLD) — VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow 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. ## 1. System Topology ```mermaid flowchart LR Sources["NPS · Call Audio · Support Chats"] --> Scrub["Pre-LLM PII Scrubber"] Scrub --> Extract["Structured LLM Extractor"] YAML["rules/voc_taxonomy.yaml"] --> Extract Extract --> Ledger["PostgreSQL VoC & Staff-360 Ledger"] Ledger --> GF["golden_flow/ Zero-Deviation Metric"] Ledger -->|"fatal / systemic"| CAPA["CAPA Bridge (capa-wizard-public)"] ``` ## 2. Architectural Decisions and Rejected Alternatives | Decision | Why It Holds | Rejected Alternative | |---|---|---| | Single YAML source of truth (`rules/voc_taxonomy.yaml`) | Keeps Python enums, LLM prompt schemas, fatal-defect gates, and UI dropdowns locked in sync without code edits. | Hardcoding complaint categories separately in prompts, SQL, and React | | Golden Flow denominator = all started orders | Prevents cancelled or abandoned orders from artificially inflating SLA completion percentages. | Measuring SLA only on completed orders | | Pre-LLM deterministic PII redaction | Ensures customer phone numbers, emails, and street addresses never leave your VPC in model prompts. | Asking the LLM to ignore PII | ## 3. Data Flow and Failure Boundaries 1. **Configuration Boundary:** Startup validates `.env` variables and declarative config schemas before accepting traffic or running scheduled jobs. 2. **Adapter Boundary:** External services (databases, chat channels, HRMS, warehouses, or LLM providers) sit behind explicit adapter modules so failures stay isolated and testable with local mocks. 3. **Observability and Audit:** State transitions and job executions emit structured logs and deterministic status records rather than mutating state silently. ## 4. Scaling Notes - **1x to 10x load:** Single-node Docker Compose or process supervisor handles standard team workloads with indexed database queries and bounded worker concurrency. - **First bottleneck at 10x+:** High-frequency webhook or batch ingestion queues; mitigate by separating the stateless HTTP receiver from background worker processes sharing Redis or PostgreSQL locks. --- ## File: `docs/LLD.md` — Low-Level Design & Runbook (docs/LLD.md) # Low-Level Design (LLD) & Operations Runbook — VoC Control Tower — Voice-of-Customer, Staff-360 & Golden Flow This document defines the module responsibilities, environment contract, and operational procedures for `voc-control-tower-public`. ## 1. Module and File Inventory | Path | Responsibility | |---|---| | `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 | ## 2. Environment Variable Contract | Variable | Default / Example | Required | Description | |---|---|---|---| | `DATABASE_URL` | `postgresql+asyncpg://postgres:postgres@localhost:5432/voc_tower` | Yes | Async PostgreSQL connection string | | `REDIS_URL` | `redis://localhost:6379/0` | Yes | Redis queue and worker state URL | | `VOC_TAXONOMY_YAML` | `./rules/voc_taxonomy.yaml` | Yes | Path to your organization's dual-axis defect taxonomy YAML | | `ANTHROPIC_API_KEY` | `sk-ant-...` | Yes | LLM key for structured transcript-to-taxonomy extraction | | `GROQ_API_KEY` | `gsk_...` | Yes | Optional Whisper STT key for telephony call audio transcription | ## 3. Extension Recipe 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/`. ## 4. Operations Runbook ### 1. Validate taxonomy YAML and Golden Flow math ```bash pytest -q tests_public/ ``` ### 2. Run local synthetic demo ```bash python3 bin/voc-demo.py ``` ### 3. Apply database migrations ```bash psql "$DATABASE_URL" -f db/migrations/001_extensions_and_ledger.sql ``` --- ## File: `docs/RESEARCH-2026.md` — 2026 Research & Landscape Notes (docs/RESEARCH-2026.md) # 2026 Open-Source Voice-of-Customer (VoC) & Fulfillment Control Tower Research Most open-source feedback analytics pipelines stop at generic sentiment classification (`positive` / `neutral` / `negative`) or unsupervised topic clustering (`BERTopic`), which leaves operations leaders unable to assign clear owners or trigger deterministic SLAs. `voc-control-tower-public` implements three production patterns rarely available together in open source: 1. **Dual-Axis YAML Failure Taxonomy (`rules/voc_taxonomy.yaml`):** Every NPS comment, call transcript, and chat log is classified against both the *customer symptom* and the *internal operational stage*, with explicit `fatal: true/false` flags. 2. **Golden Flow Critical-Path Accounting (`golden_flow/`):** Measures the percentage of *entered* orders that finish end-to-end with zero reschedules, zero SLA breaches, zero rework, and zero support escalations. 3. **Staff-360 & CAPA Loop Closure:** Connects individual defect patterns to coaching registries and systemic 5-Whys CAPAs (`capa-wizard-public`).