diff --git a/src/v2_optimizer.py b/src/v2_optimizer.py index a1748214..7bfe4807 100644 --- a/src/v2_optimizer.py +++ b/src/v2_optimizer.py @@ -14,14 +14,14 @@ V2_DIR = "v2-docs" class V2VisionEngine: def __init__(self): - # Comprehensive 2026 Taxonomy mapping EVERY relevant area from V1 + # 100% Comprehensive 2026 Taxonomy - Audited for Full V1 Coverage self.dimensions = { "Intelligent Control Plane": [ "ai", "ai-agents-mcp", "chatgpt", "mlops" ], "Architectural Foundations": [ "introduction", "faq", "kubernetes", "linux", "git", "cloud-arch-diagrams", - "introduction", "matrix-table", "other-awesome-lists" + "matrix-table", "other-awesome-lists", "about" ], "Platform & Site Reliability": [ "sre", "devops", "developerportals", "scaffolding", "finops", "chaos-engineering", @@ -30,7 +30,8 @@ class V2VisionEngine: ], "Hardened Infrastructure": [ "iac", "terraform", "pulumi", "crossplane", "ansible", "securityascode", - "kubernetes-security", "aws-security", "oauth", "devsecops", "kustomize", "liquibase" + "kubernetes-security", "aws-security", "oauth", "devsecops", "kustomize", + "liquibase", "chef" ], "Cloud Providers (Hyperscalers)": [ "aws", "azure", "GoogleCloudPlatform", "ibm_cloud", "oraclecloud", "digitalocean", @@ -38,10 +39,12 @@ class V2VisionEngine: "private-cloud-solutions", "edge-computing", "aws-architecture", "aws-security", "aws-networking", "aws-databases", "aws-storage", "aws-monitoring", "aws-iac", "aws-tools-scripts", "aws-messaging", "aws-data", "aws-devops", "aws-serverless", - "aws-containers", "aws-backup", "aws-training", "aws-newfeatures" + "aws-containers", "aws-backup", "aws-training", "aws-newfeatures", "aws-miscellaneous", + "aws-pricing", "aws-spain" ], "Networking & Service Mesh": [ - "networking", "kubernetes-networking", "servicemesh", "istio", "caching", "web-servers" + "networking", "kubernetes-networking", "servicemesh", "istio", "caching", + "web-servers", "cloudflare" ], "The Container Stack": [ "docker", "container-managers", "serverless", "kubernetes-autoscaling", @@ -49,10 +52,10 @@ class V2VisionEngine: "kubernetes-troubleshooting", "kubernetes-backup-migrations", "kubernetes-on-premise", "kubernetes-bigdata", "kubernetes-client-libraries", "kubernetes-releases", "kubernetes-based-devel", "kubernetes-alternatives", "kubectl-commands", "rancher", - "openshift", "ocp3", "ocp4" + "openshift", "ocp3", "ocp4", "noops" ], "Data & Advanced Analytics": [ - "databases", "nosql", "newsql", "message-queue", "crunchydata", "yaml" + "databases", "nosql", "newsql", "message-queue", "crunchydata", "yaml", "bigdata" ], "Engineering Pipeline": [ "cicd", "gitops", "argo", "flux", "tekton", "jenkins", "jenkins-alternatives", @@ -63,49 +66,50 @@ class V2VisionEngine: "visual-studio", "javascript", "golang", "python", "java_frameworks", "java_app_servers", "java-and-java-performance-optimization", "dotnet", "angular", "react", "web3", "api", "swagger-code-generator-for-rest-apis", "postman", "lowcode-nocode", - "devel-sites", "dom", "linux-dev-env", "ChromeDevTools" + "devel-sites", "dom", "linux-dev-env", "ChromeDevTools", "xamarin", "jvm-parameters-matrix-table", + "maven-gradle", "embedded-servlet-containers" ], "Career & Industry": [ - "recruitment", "hr", "freelancing", "remote-tech-jobs", "workfromhome", "interview-questions", "elearning", "about" + "recruitment", "hr", "freelancing", "remote-tech-jobs", "workfromhome", + "interview-questions", "elearning", "digital-money", "appointment-scheduling", "newsfeeds" ] } self.elite_criteria = ( "You are a Senior Principal Architect in May 2026. " - "Your task is to transform a raw technical list into an ENTERPRISE-GRADE technical portal.\n\n" - "PHASE 1: TECHNICAL EVALUATION\n" - "- Hold a VERY HIGH bar for quality and production relevance.\n" - "- KEEP: Foundational Awesome lists, masterclasses, production-ready tools, and 2024-2026 innovations.\n" - "- DISCARD: Introductory noise, redundant tools, personal anecdotes, and pre-2022 outdated content.\n\n" - "PHASE 2: SEMANTIC SYNTHESIS\n" - "- For the selected links, categorize them into: [FOUNDATIONAL], [PRODUCTION-READY], or [CUTTING-EDGE].\n" - "- Write a 1-sentence technical executive summary for the whole section.\n" + "Transform this list into an ENTERPRISE-GRADE portal.\n\n" + "PHASE 1: EXCELLENCE SELECTION\n" + "- Filter for production quality, authority, and innovation.\n" + "- ALWAYS keep 'Awesome' repositories.\n\n" + "PHASE 2: ELITE SYNTHESIS\n" + "- From the kept links, identify the TOP 5 'Architect's Choice' resources.\n" + "- Categorize resources into: [FOUNDATIONAL], [PRODUCTION-READY], or [CUTTING-EDGE].\n" ) async def analyze_and_cluster(self): - log_event("STARTING V2 ARCHITECT'S CUT TRANSFORMATION (FULL COVERAGE)", section_break=True) + log_event("STARTING V2 ARCHITECT'S CUT: THE FINAL POLISH", section_break=True) all_v1_links = await self._gather_all_v1_content() - log_event(f"[*] Discovery: Found {len(all_v1_links)} nodes in V1.") + log_event(f"[*] Discovery: Found {len(all_v1_links)} resources in V1 archive.") - # 1. Excellence Filtering - log_event("[*] Phase 1: Excellence Filtering & Quality Pass...") + # 1. Excellence Filtering & Elite Pass + log_event("[*] Phase 1: Semantic Excellence Filtering...") elite_inventory = await self._evaluate_quality(all_v1_links) - log_event(f"[*] Inventory Refined: {len(elite_inventory)} high-signal resources selected.") + log_event(f"[*] Refinement Complete: {len(elite_inventory)} high-impact nodes selected.") # 2. Structural Reconstruction - log_event("[*] Phase 2: Dimensional Clustering & Semantic Enrichment...") + log_event("[*] Phase 2: Multi-dimensional Clustering & Synthesis...") v2_data = await self._rebuild_structure(elite_inventory) # 3. File Generation - log_event("[*] Phase 3: Generating Premium Portal Content...") + log_event("[*] Phase 3: Generating Premium Portal Pages...") os.makedirs(V2_DIR, exist_ok=True) await self._write_premium_files(v2_data) # 4. Navigation Sync await self._sync_enterprise_navigation(v2_data) - log_event("V2 TRANSFORMATION COMPLETED SUCCESSFULLY.", section_break=True) + log_event("V2 ARCHITECT'S CUT COMPLETED.", section_break=True) async def _gather_all_v1_content(self) -> List[Dict]: all_links = [] @@ -124,18 +128,16 @@ class V2VisionEngine: async def _evaluate_quality(self, links: List[Dict]) -> List[Dict]: refined = [] - # Increase batch size slightly but keep it manageable BATCH_SIZE = 60 for i in range(0, len(links), BATCH_SIZE): batch = links[i:i+BATCH_SIZE] batch_num = i//BATCH_SIZE + 1 - log_event(f" [>] Processing Excellence Batch {batch_num}...") + log_event(f" [>] Evaluating Excellence Batch {batch_num}...") prompt = ( f"{self.elite_criteria}\n" - "Mission: Identify technically superior nodes.\n" - "Respond ONLY with a JSON object: {\"keep_indices\": [int, ...], \"tags\": {\"index\": \"TAG\"}}\n" - "TAGS available: [FOUNDATIONAL], [PRODUCTION-READY], [CUTTING-EDGE].\n\n" + "Respond ONLY with a JSON object: {\"keep_indices\": [int, ...], \"tags\": {\"index\": \"TAG\"}, \"top_choices\": [int, ...]}\n" + "TAGS: [FOUNDATIONAL], [PRODUCTION-READY], [CUTTING-EDGE].\n\n" "LINKS:\n" + "\n".join([f"{idx}. {l['title']} ({l['url']})" for idx, l in enumerate(batch)]) ) @@ -143,6 +145,7 @@ class V2VisionEngine: data = await call_gemini_with_retry(prompt) indices = data.get("keep_indices", []) tags_map = data.get("tags", {}) + top_choices = set(data.get("top_choices", [])) for idx in indices: try: @@ -150,12 +153,12 @@ class V2VisionEngine: if idx_int < len(batch): item = batch[idx_int].copy() item["tag"] = tags_map.get(str(idx), "[PRODUCTION-READY]") + item["is_elite"] = idx_int in top_choices refined.append(item) except: continue - log_event(f" [Batch {batch_num}] Quality: Kept {len(indices)}/{len(batch)}") + log_event(f" [Batch {batch_num}] Quality Filter: Kept {len(indices)}/{len(batch)}") except: - # Conservative fallback for critical nodes refined.extend([l for l in batch if "awesome" in l['title'].lower()]) await asyncio.sleep(0.5) @@ -171,38 +174,40 @@ class V2VisionEngine: for item in inventory: dim = file_to_dim.get(item["original_file"], "Architectural Foundations") cat_name = item["original_file"].replace(".md", "").capitalize() - if cat_name not in v2_structure[dim]["categories"]: v2_structure[dim]["categories"][cat_name] = [] - v2_structure[dim]["categories"][cat_name].append(item) - # Generate summaries for each dimension for dim in v2_structure.keys(): if not v2_structure[dim]["categories"]: continue log_event(f" [*] Synthesizing executive summary for {dim}...") - prompt = f"Write a 1-sentence professional executive summary for a technical portal section titled '{dim}'. Use sophisticated 2026 architectural tone. Respond ONLY with the sentence." + prompt = f"Write a 1-sentence executive summary for a technical portal section titled '{dim}'. Tone: Professional, Visionary, 2026. Respond ONLY with the sentence." try: v2_structure[dim]["summary"] = await call_gemini_with_retry(prompt, response_format="text") except: - v2_structure[dim]["summary"] = f"Curated selection of high-impact resources for {dim}." + v2_structure[dim]["summary"] = f"Curated high-impact resources for {dim} ecosystem." return v2_structure async def _write_premium_files(self, data: Dict[str, Dict]): - # Home + # index.md with Mermaid + mermaid_code = "graph TD\n" + for dim in data.keys(): + if data[dim]["categories"]: + mermaid_code += f" V2[Nubenetes V2] --> {dim.replace(' ', '_')}[{dim}]\n" + index_md = ( "# Nubenetes V2 | The Architect's Cut (2026)\n\n" - "![Nubenetes Banner](https://raw.githubusercontent.com/nubenetes/awesome-kubernetes/master/docs/images/logo.png)\n\n" "!!! quote \"Engineering the Future\"\n" - " This portal represents the state-of-the-art in Cloud Native engineering. It is a derived intelligence layer " - " filtered through the lens of production stability and technical innovation.\n\n" - "## Exploration Dimensions\n" - "Our repository is organized into professional dimensions for the modern engineer:\n\n" + " This portal represents the state-of-the-art in Cloud Native engineering. It is an AI-distilled intelligence layer " + " filtered for production stability, technical depth, and architectural innovation.\n\n" + "## System Architecture View\n\n" + "```mermaid\n" + mermaid_code + "```\n\n" + "## Strategic Dimensions\n\n" ) for dim, content in data.items(): if not content["categories"]: continue - slug = dim.lower().replace(" ", "-").replace("&", "and") + slug = dim.lower().replace(" ", "-").replace("&", "and").replace("(", "").replace(")", "").replace(" ", "-") index_md += f"- **[{dim}](./{slug}.md)**: {content['summary']}\n" with open(os.path.join(V2_DIR, "index.md"), "w") as f: f.write(index_md) @@ -210,14 +215,26 @@ class V2VisionEngine: # Dimension pages for dim, content in data.items(): if not content["categories"]: continue - slug = dim.lower().replace(" ", "-").replace("&", "and") + slug = dim.lower().replace(" ", "-").replace("&", "and").replace("(", "").replace(")", "").replace(" ", "-") md = f"# {dim}\n\n" - md += f"!!! summary \"Executive Overview\"\n {content['summary']}\n\n" + md += f"!!! info \"Executive Overview\"\n {content['summary']}\n\n" + # Sub-grouping for cat, links in content["categories"].items(): md += f"## {cat}\n" - for l in links: + + # Highlight Elite choices first + elite_links = [l for l in links if l.get("is_elite")] + normal_links = [l for l in links if not l.get("is_elite")] + + if elite_links: + md += "!!! star \"Architect's Choice\"\n" + for l in elite_links: + md += f" - [{l['title']}]({l['url']}) - {l['description']}\n" + md += "\n" + + for l in normal_links: tag_color = "success" if "FOUNDATIONAL" in l["tag"] else "info" if "PRODUCTION" in l["tag"] else "warning" md += f" - [{l['title']}]({l['url']}) {l['description']} {l['tag']}\n" md += "\n" @@ -227,20 +244,17 @@ class V2VisionEngine: async def _sync_enterprise_navigation(self, data: Dict[str, Dict]): try: with open("v2-mkdocs.yml", "r") as f: content = f.read() - nav_items = ["nav:", " - \"The 2026 Vision\": index.md"] for dim in data.keys(): if not data[dim]["categories"]: continue - slug = dim.lower().replace(" ", "-").replace("&", "and") + slug = dim.lower().replace(" ", "-").replace("&", "and").replace("(", "").replace(")", "").replace(" ", "-") nav_items.append(f" - \"{dim}\": {slug}.md") - new_nav = "\n".join(nav_items) updated_content = re.sub(r'nav:.*', new_nav, content, flags=re.DOTALL) - with open("v2-mkdocs.yml", "w") as f: f.write(updated_content) - log_event(" [OK] v2-mkdocs.yml navigation updated for Full Enterprise View.") + log_event(" [OK] Enterprise Navigation fully synchronized.") except Exception as e: - log_event(f" [!] Error syncing navigation: {e}") + log_event(f" [!] Navigation Sync Error: {e}") if __name__ == "__main__": engine = V2VisionEngine() diff --git a/v2-mkdocs.yml b/v2-mkdocs.yml index 585f4f3c..7b5c2bdf 100644 --- a/v2-mkdocs.yml +++ b/v2-mkdocs.yml @@ -1,6 +1,6 @@ site_name: "Nubenetes V2 | The Architect's Cut" site_url: "https://nubenetes.com/v2/" -site_description: "Enterprise-grade curated portal for the 2026 Cloud Native ecosystem." +site_description: "Enterprise-grade curated portal for the 2026 Cloud Native ecosystem. High-density, AI-driven selection of top-tier resources." site_author: "Inaki Fernandez" copyright: "Copyright © 2026 Nubenetes Agentic Intelligence" @@ -11,6 +11,7 @@ edit_uri: "edit/master/v2-docs/" theme: name: material language: en + favicon: images/favicon-car.png palette: - media: "(prefers-color-scheme: light)" scheme: default @@ -36,12 +37,26 @@ theme: - navigation.indexes - search.suggest - search.highlight + - search.share - content.code.copy - content.action.view - content.action.edit + - toc.integrate + +extra: + social: + - icon: fontawesome/brands/github + link: https://github.com/nubenetes/awesome-kubernetes + - icon: fontawesome/brands/twitter + link: https://twitter.com/nubenetes + - icon: fontawesome/brands/linkedin + link: https://www.linkedin.com/groups/1937212/ + version: + provider: mike # Ready for version switching extra_css: - - https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap + - https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap + - static/extra.css markdown_extensions: - admonition @@ -52,12 +67,14 @@ markdown_extensions: class: mermaid format: !!python/name:pymdownx.superfences.mermaid_format - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg + emoji_index: "material.extensions.emoji.twemoji" + emoji_generator: "material.extensions.emoji.to_svg" - attr_list - md_in_html - toc: permalink: true + - pymdownx.tabbed: + alternate_style: true nav: - "The 2026 Vision": index.md