Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
f8cd37ac8c
1823 changed files with 145167 additions and 0 deletions
35
scripts/gap_tracker.py
Normal file
35
scripts/gap_tracker.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"""
|
||||
gap_tracker.py — Log capability gaps: things people ask for that Performance West
|
||||
doesn't yet offer. Monitors call log_gap() when they SKIP a post because we can't
|
||||
fulfill the request. The gaps log is reviewed for service expansion decisions.
|
||||
"""
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from datetime import datetime, timezone
|
||||
|
||||
LOG_DIR = Path.home() / "logs"
|
||||
GAPS_FILE = LOG_DIR / "capability-gaps.log"
|
||||
|
||||
def log_gap(platform: str, source_url: str, title: str, body: str, reason: str = ""):
|
||||
"""
|
||||
Log a capability gap.
|
||||
|
||||
Args:
|
||||
platform: Monitor name (Reddit, Stack Exchange, dev.to)
|
||||
source_url: URL of the post/question we're skipping
|
||||
title: Title of the post
|
||||
body: First 300 chars of post body
|
||||
reason: Why we're skipping — what they need that we don't have
|
||||
"""
|
||||
LOG_DIR.mkdir(exist_ok=True)
|
||||
entry = {
|
||||
"ts": datetime.now(timezone.utc).isoformat(),
|
||||
"platform": platform,
|
||||
"url": source_url,
|
||||
"title": title,
|
||||
"body": body[:300],
|
||||
"reason": reason,
|
||||
}
|
||||
with open(GAPS_FILE, "a") as f:
|
||||
f.write(json.dumps(entry) + "\n")
|
||||
Loading…
Add table
Add a link
Reference in a new issue