docs: archify

This commit is contained in:
2026-08-24 19:34:16 -03:00
parent 23de7d8fe7
commit d2d1aad001
180 changed files with 216559 additions and 5766 deletions
+259
View File
@@ -0,0 +1,259 @@
{
"schema_version": 1,
"diagram_type": "architecture",
"meta": {
"title": "TextNLPClassifierApp Runtime Architecture",
"output": "runtime-architecture.html",
"quality_profile": "showcase",
"views": [
{
"id": "primary-pipeline",
"label": "Primary Processing Pipeline",
"focus": ["google-news", "foxcape-engine", "triple-extractor", "f1-selector", "markdown-sanitizer", "state-machine", "inherence-classifier", "storage-layer"],
"note": "Trace an article from Google News RSS ingestion through extraction, consensus, NLP inherence, and atomic SQLite persistence."
},
{
"id": "nlp-decision",
"label": "NLP & AI Decision Tiers",
"focus": ["ecp-profile", "inherence-classifier", "ai-fallback", "state-machine"],
"note": "Tier 1 deterministic rule-based NLP classification with optional Tier 2 embeddings and Tier 3 LLM fallback for borderline ambiguity."
},
{
"id": "governance-storage",
"label": "State Governance & Quality",
"focus": ["state-machine", "storage-layer", "observability"],
"note": "State transition lifecycle gating, SHA-256 fingerprinting, transactional SQLite ledger, and telemetry."
}
]
},
"components": [
{
"id": "google-news",
"type": "external",
"label": "Google News RSS",
"sublabel": "Public News Feeds",
"pos": [40, 60],
"size": [140, 56]
},
{
"id": "foxcape-engine",
"type": "backend",
"label": "Foxcape Engine",
"sublabel": "Camoufox Headless",
"pos": [290, 60],
"size": [140, 56]
},
{
"id": "triple-extractor",
"type": "backend",
"label": "Multi-Engine Harvester",
"sublabel": "Trafilatura / N4k / Readability",
"pos": [540, 60],
"size": [160, 56]
},
{
"id": "f1-selector",
"type": "backend",
"label": "F1 Consensus Selector",
"sublabel": "5-Token Shingles",
"pos": [800, 60],
"size": [150, 56]
},
{
"id": "markdown-sanitizer",
"type": "backend",
"label": "Markdown Sanitizer",
"sublabel": "Editorial Normalizer",
"pos": [800, 180],
"size": [150, 56]
},
{
"id": "state-machine",
"type": "backend",
"label": "State Machine",
"sublabel": "Lifecycle Transition Gate",
"pos": [540, 180],
"size": [160, 56]
},
{
"id": "ecp-profile",
"type": "database",
"label": "ECP Snapshot",
"sublabel": "Anchors & Graph",
"pos": [290, 300],
"size": [140, 56]
},
{
"id": "inherence-classifier",
"type": "backend",
"label": "Inherence Classifier",
"sublabel": "Tier 1 Multilingual NLP",
"pos": [290, 180],
"size": [140, 56]
},
{
"id": "ai-fallback",
"type": "cloud",
"label": "AI Fallback",
"sublabel": "Tier 2/3 Vector & LLM",
"pos": [40, 180],
"size": [140, 56],
"tag": "Optional"
},
{
"id": "storage-layer",
"type": "database",
"label": "Storage Ledger",
"sublabel": "SQLite Store & FileStore",
"pos": [540, 300],
"size": [160, 56]
},
{
"id": "observability",
"type": "backend",
"label": "Observability",
"sublabel": "Telemetry & Quality Gate",
"pos": [800, 300],
"size": [150, 56]
}
],
"boundaries": [
{
"kind": "security-group",
"label": "Untrusted Public Web",
"wraps": ["google-news"]
},
{
"kind": "security-group",
"label": "Ingestion & Anti-Bot Sandbox",
"wraps": ["foxcape-engine", "triple-extractor"]
},
{
"kind": "region",
"label": "Trusted Core Processing Domain",
"wraps": ["f1-selector", "markdown-sanitizer", "state-machine", "ecp-profile", "inherence-classifier", "storage-layer", "observability"]
},
{
"kind": "security-group",
"label": "External AI Provider Gateway",
"wraps": ["ai-fallback"]
}
],
"connections": [
{
"id": "rss-to-foxcape",
"from": "google-news",
"to": "foxcape-engine",
"label": "RSS links",
"variant": "emphasis"
},
{
"id": "foxcape-to-extractor",
"from": "foxcape-engine",
"to": "triple-extractor",
"label": "stealth DOM",
"variant": "emphasis"
},
{
"id": "extractor-to-selector",
"from": "triple-extractor",
"to": "f1-selector",
"label": "triplet JSON",
"variant": "emphasis"
},
{
"id": "selector-to-sanitizer",
"from": "f1-selector",
"to": "markdown-sanitizer",
"label": "winner JSON",
"variant": "emphasis",
"fromSide": "bottom",
"toSide": "top",
"labelDy": 32
},
{
"id": "sanitizer-to-statemachine",
"from": "markdown-sanitizer",
"to": "state-machine",
"label": "clean MD",
"variant": "emphasis"
},
{
"id": "statemachine-to-classifier",
"from": "state-machine",
"to": "inherence-classifier",
"label": "eval inherence",
"variant": "emphasis"
},
{
"id": "ecp-to-classifier",
"from": "ecp-profile",
"to": "inherence-classifier",
"label": "anchors & aliases",
"variant": "dashed",
"fromSide": "top",
"toSide": "bottom",
"labelDy": -32
},
{
"id": "classifier-to-fallback",
"from": "inherence-classifier",
"to": "ai-fallback",
"label": "LLM fallback",
"variant": "dashed",
"fromSide": "left",
"toSide": "right"
},
{
"id": "statemachine-to-storage",
"from": "state-machine",
"to": "storage-layer",
"label": "atomic commit",
"variant": "emphasis",
"fromSide": "bottom",
"toSide": "top",
"labelDy": 32
},
{
"id": "statemachine-to-observability",
"from": "state-machine",
"to": "observability",
"label": "audit telemetry",
"variant": "dashed"
}
],
"cards": [
{
"dot": "cyan",
"title": "Ingestion & Anti-Bot",
"items": [
"Camoufox stealth headless browser with automated anti-bot evasion",
"Tri-engine simultaneous extraction via Trafilatura, N4k & Readability"
]
},
{
"dot": "emerald",
"title": "Consensus & NLP",
"items": [
"Zero-dependency 5-token shingle consensus with F1 score selection",
"Multilingual NLP classifier (6 languages) weighted by ECP anchors"
]
},
{
"dot": "violet",
"title": "AI & Fallback Resilience",
"items": [
"Tier 2 vector embeddings and Tier 3 LLM fallback for ambiguity (<0.60)",
"Graceful degradation to deterministic Tier 1 heuristics on API failure"
]
},
{
"dot": "amber",
"title": "State & Persistence",
"items": [
"Finite state machine enforcing strict validated lifecycle transitions",
"SHA-256 fingerprint deduplication with atomic SQLite & file persistence"
]
}
]
}