North Texas Commercial Cleaning Experts | Call (214)-586-0257
Print to PDF
Document IDHWB-QMS-9.2
Version4.0.0
Statusâ—Ź APPROVED
Clause8.1 (Operational Planning & Control)
Document Control Institutional Specification
Document TitleAI Agents & Specialized Automation Scripts SOP
Document IDHWB-QMS-9.2
Version4.0.0
StatusAPPROVED
AuthorGeorge (Systems Architect)
Approved ByHumberto Dominguez, CEO
Effective Date10/01/2026
DepartmentIT / Artificial Intelligence Department
ISO StandardISO 9001:2015 Clause 8.1 & Clause 7.1.3 (Infrastructure)

Standard Operating Procedure: AI Agents & Specialized Automation Scripts

1.0 Purpose

This standard operating procedure defines the execution standards, process supervision rules, and operational boundaries for all autonomous AI agents and specialized background scripts operating within the SigmaFidelity™ infrastructure. The goal is to eliminate manual administration, enforce zero-defect data processing, and maintain continuous platform availability.

2.0 Scope

This procedure applies to all background processes, supervisor daemons, cron tasks, and CLI automation utilities executed inside the hwb_agent_worker container, the web application container, and the Linux host environment.

3.0 Master Script Inventory & Daemon Architecture

Script / Utility Runtime Context Cadence / Trigger Operational Responsibility
worker_launcher.py Container (hwb_agent_worker) Continuous Supervisor Main container supervisor. Launches and monitors all core background agents; automatically restarts any dying process within 10 seconds.
sigma_orchestrator.py Container (hwb_agent_worker) 6-Hour Loop Calculates Lean Six Sigma telemetry (Cpk, DPMO, RTY); runs daily sync; triggers procurement miners and CAD lead scrapers.
watchdog.py Container (hwb_agent_worker) Continuous Tail Monitors application logs for template syntax errors and database locks; performs 60-second HTTP health checks with auto-healing restart.
telegram_listener.py Container (hwb_agent_worker) Continuous Polling (16 Threads) Mobile executive command node; enforces 5-tier user permissions; handles single-use magic-link auth; gates /cmd Linux shell and Google Search.
tessa_regression_suite.py Container (hwb_agent_worker) Continuous 1-Hour Loop Tessa Test QA daemon (--daemon --interval 3600); executes 11-module platform regression testing; certifies zero-defect operation to audit log.
yamamoto_bid_test_suite.py Container & Host CLI Pre-Deployment Quality Gate Yamamoto Moto's estimating inspection battery; validates square footage takeoffs, federal SCA living wage floors, and multi-tier bid calculations across 8 modules.
bot_defense_test_suite.py Host & Container CLI Pre-Deployment Quality Gate Verifies Enterprise Bot Defense Battery (6 modules) testing honeypot trap rejection, sub-second rapid drops, direct curl drops, and financial spam blocking.
site_security_audit.py Host & Container CLI Pre-Deployment Quality Gate Audits Site Security Rack #9 (11 modules), verifying WORM immutability on SecurityAuditLogs, SSL/TLS ciphers, and RBAC endpoint protection.
solicitation_scope_parser.py Container (hwb_agent_worker) Orchestrator Trigger PyMuPDF document parser; extracts multi-building scopes, pre-bid meeting links, and proposal requirements from public PDF specifications.
hunter_portal_crawler.py Container (hwb_agent_worker) Orchestrator Trigger Playwright headless browser crawler scouting 35 Texas municipal and ISD procurement hubs across Bonfire and IonWave networks.
migrate_033_live_lead_deduplication.py Web App & Worker On Demand / Migration Gate High-performance bulk SQL deduplication engine; normalized 28,000+ phone records and reconciled 14,704 duplicates on live Azure PostgreSQL.
migrate_036_client_breadcrumbs.py Web App & Worker On Demand / Migration Gate Provisions ClientBreadcrumbs table and deploys purge_expired_client_breadcrumbs(30) automated data lifecycle procedure for ISO 27001 data minimization.
peter_sentinel.py Linux Host (PID 872) Hourly Daemon Loop Peter's host backup sentinel; executes automated binary PostgreSQL dumps, archives .env states, and enforces the 500MB log surge limit.
sigma_sync.py Web App & Worker Session Close & Pulse Synchronizes QMS documentation, problem tracking records, and conversation transcripts into PostgreSQL vector embeddings.

4.0 Daemon Supervision & The 4-Tier Zero-Defect Mandate

  1. Worker Supervision: All background agent daemons running inside hwb_agent_worker must be registered in the AGENTS array of worker_launcher.py.
  2. Idempotency: Every script must be completely idempotent. A restart or redundant execution cycle must never duplicate database records, corrupt ongoing transactions, or clobber reconciled financial data.
  3. Strict Output Staging: Automated outreach scripts are strictly prohibited from dispatching live communications directly to prospective clients. All outbound proposals must be staged into PendingOutbox using the HWB-COM-001 official letterhead for CEO review and approval.
  4. Error Logging: If any background script encounters an unhandled exception or operational failure, the event must be immediately recorded to docs/PROBLEMS-TO-SOLVE.md per our institutional error logging mandate.
  5. 4-Tier Automated Quality Gate: Prior to any production deployment, the codebase must pass all 4 testing tiers with a 100% score:
    • Tier 1: Tessa Platform Regression Suite (11 modules) — python3 scripts/tessa_regression_suite.py
    • Tier 2: Yamamoto Moto AI Estimator Suite (8 modules) — python3 scripts/yamamoto_bid_test_suite.py
    • Tier 3: Site Security Rack #9 Suite (11 modules) — python3 scripts/site_security_audit.py
    • Tier 4: Enterprise Bot Defense Battery (6 modules) — python3 scripts/bot_defense_test_suite.py

5.0 Verification (Zero-Defect Check)

  • Run docker top hwb_agent_worker to verify all supervisor processes are actively executing.
  • Inspect HWB-IT-SYSTEM-LOGS/tessa_regression_audit.log to confirm the latest regression audit passed with Grade A+ certification.
  • Verify that Peter's host sentinel is running on the host via ps aux | grep peter_sentinel.
  • Execute the 4-tier regression battery and verify 100% pass rates across all modules.

6.0 Revision History

Version Date Author Change Description
4.0.0 10/01/2026 George (Systems Architect) Comprehensive upgrade: Expanded script inventory to include Yamamoto Moto's 8-module bidding test suite, Tessa's 11-module expanded platform suite, Bot Defense Battery, Rack #9 Site Security audit, Migration 033 deduplication, and Migration 036 ClientBreadcrumbs. Codified mandatory 4-Tier Automated Quality Gate. Approved by Humberto Dominguez, CEO.
3.0.0 09/25/2026 George (Systems Architect) Complete overhaul detailing the 10 core specialized automation scripts, worker_launcher daemon supervision, Tessa Test continuous regression runner, and zero-crash idempotency rules. Approved by Humberto Dominguez, CEO.
2.0.0 09/21/2026 George (Systems Architect) Modernized to HTML format and aligned with Everyday Words standard.
1.0.0 04/27/2026 George (Systems Architect) Initial Architecture Baseline.
Document Structure