const MAP: &[(&str, &str)] = &[
("cargo", "rust"),
("rust-", "rust"),
("npm-", "npm"),
("python-", "python"),
("helm-", "helm"),
("caixa-", "caixa"),
("gem-", "ruby"),
("ansible-", "ansible"),
("go-", "language"),
("gradle-", "language"),
("maven-", "language"),
("dotnet-", "language"),
("swift-", "language"),
("xcodebuild", "language"),
("mix-", "language"),
("hex-", "language"),
("zig-", "language"),
("golangci-", "language"),
("goreleaser", "language"),
("wasm-", "language"),
("aws-", "cloud"),
("gcp-", "cloud"),
("cloudflare-", "cloud"),
("azure-", "cloud"),
("vercel-", "cloud"),
("netlify-", "cloud"),
("render-", "cloud"),
("railway-", "cloud"),
("heroku-", "cloud"),
("doctl-", "cloud"),
("fly-", "cloud"),
("datadog-", "observability"),
("grafana-", "observability"),
("honeycomb-", "observability"),
("prometheus-", "observability"),
("sentry-", "observability"),
("otel-", "observability"),
("loki-", "observability"),
("pyroscope-", "observability"),
("security-", "security"),
("sbom-", "security"),
("license-header", "security"),
("license-finder", "security"),
("provenance-", "security"),
("image-scan", "security"),
("cosign-", "security"),
("tfsec", "security"),
("checkov", "security"),
("bandit", "security"),
("gosec", "security"),
("conftest", "security"),
("kics-", "security"),
("snyk-", "security"),
("vault-", "security"),
("gh-secrets-", "security"),
("slsa-", "security"),
("cyclonedx-", "security"),
("secrets-scan", "security"),
("docker-", "container"),
("ko-", "container"),
("oci-", "container"),
("podman-", "container"),
("buildah-", "container"),
("skopeo-", "container"),
("crane-", "container"),
("buildkit-", "container"),
("kubectl-", "k8s"),
("flux-", "k8s"),
("argocd-", "k8s"),
("kustomize-", "k8s"),
("k8s-", "k8s"),
("velero-", "k8s"),
("helmfile-", "k8s"),
("tanka-", "k8s"),
("helm-deploy", "k8s"),
("helm-oci-publish", "helm"),
("terraform-", "iac"),
("pulumi-", "iac"),
("iac-", "iac"),
("db-", "db"),
("atlas-", "db"),
("prisma-", "db"),
("flyway-", "db"),
("sqitch-", "db"),
("playwright-", "frontend"),
("cypress-", "frontend"),
("storybook-", "frontend"),
("percy-", "frontend"),
("lighthouse-", "frontend"),
("fastlane-", "mobile"),
("app-store-", "mobile"),
("eas-", "mobile"),
("flutter-", "mobile"),
("slack-", "comms"),
("discord-", "comms"),
("email-", "comms"),
("pagerduty-", "comms"),
("matrix-", "comms"),
("teams-", "comms"),
("telegram-", "comms"),
("twilio-", "comms"),
("mattermost-", "comms"),
("nats-", "messaging"),
("kafka-", "messaging"),
("mkdocs-", "docs"),
("docusaurus-", "docs"),
("mdbook-", "docs"),
("hugo-", "docs"),
("vitepress-", "docs"),
("zola-", "docs"),
("changelog-", "docs"),
("docs-", "docs"),
("api-spec-", "docs"),
("toc-", "docs"),
("mutation-", "quality"),
("benchmark-", "quality"),
("sonarqube-", "quality"),
("pa11y-", "quality"),
("dependency-", "sdlc"),
("nix-flake-update", "sdlc"),
("pr-comment", "sdlc"),
("issue-create", "sdlc"),
("status-badge", "sdlc"),
("dependabot-", "sdlc"),
("changesets", "release-mgmt"),
("semantic-", "release-mgmt"),
("release-please", "release-mgmt"),
("release-promote", "release-mgmt"),
("yank-version", "release-mgmt"),
("onboard-", "sdlc"),
("akeyless-", "akeyless"),
("wireguard-", "networking"),
("tailscale-", "networking"),
("artifact-fetch", "storage"),
("s3-mirror", "storage"),
("gcs-sync", "storage"),
("restic-", "backup"),
("temporal-", "workflow"),
("airflow-", "workflow"),
("devcontainer-", "devx"),
("pre-commit-", "devx"),
("json-schema-", "data"),
("yaml-lint", "data"),
("nix-", "nix"),
("nix-flake-check", "validation"),
("branch-protect-", "hygiene"),
("codeowners-", "hygiene"),
("stale-", "hygiene"),
("gh-team-", "hygiene"),
("tlisp-lint", "validation"),
("action-shell-lint", "meta"),
("adoption-audit", "meta"),
("defaction-render", "meta"),
("tatara-script", "runtime"),
("git-", "git"),
("gh-", "gh"),
("derive-version-", "gh"),
("detect-repo-type", "dispatch"),
("spec-watch", "spec"),
("caixa-detect", "dispatch"),
("rust-gate", "validation"),
("npm-gate", "validation"),
("python-gate", "validation"),
("typecheck-", "validation"),
("rust-cross-", "build"),
("rust-workspace-publish", "publish"),
("rust-workspace-bump", "bump"),
("substrate-bump", "bump"),
];
pub fn categorize(name: &str) -> &'static str {
let mut best_match: Option<(usize, &'static str)> = None;
for (prefix, cat) in MAP {
if name == *prefix || name.starts_with(prefix) {
if best_match.map_or(true, |(len, _)| prefix.len() > len) {
best_match = Some((prefix.len(), cat));
}
}
}
best_match.map_or("uncategorized", |(_, c)| c)
}
pub fn intro(category: &str) -> &'static str {
match category {
"rust" => "π¦ Rust ecosystem",
"npm" => "π¦ npm ecosystem",
"python" => "π Python ecosystem",
"helm" => "β΅ Helm β chart packaging + deployment",
"caixa" => "π¦ caixa β canonical SDLC primitive",
"language" => "π Multi-language (Go/Java/.NET/Swift/Elixir/Zig/WASM)",
"cloud" => "βοΈ Cloud providers",
"k8s" => "βΈοΈ Kubernetes β apply / deploy / reconcile / wait",
"iac" => "ποΈ IaC β Terraform / Pulumi",
"db" => "ποΈ Database β migrations + backups",
"frontend" => "π₯οΈ Frontend testing + deployment",
"mobile" => "π± Mobile β Fastlane / App Store / EAS / Flutter",
"observability" => "π Observability β markers / metrics / logs / profiles",
"security" => "π Security β vuln scans / SBOM / signing / secrets",
"comms" => "π¬ Notifications across N channels",
"messaging" => "π‘ Message brokers β NATS / Kafka",
"docs" => "π Documentation generation + publishing",
"quality" => "β
Code quality β mutation / benchmark / SonarQube / accessibility",
"sdlc" => "π SDLC automation",
"release-mgmt" => "π¦ Release management β Changesets / semantic-release",
"akeyless" => "π Akeyless secret management",
"networking" => "π Networking β WireGuard / Tailscale",
"storage" => "πΎ Storage β S3 / GCS / cross-workflow",
"backup" => "π‘οΈ Backup β restic",
"workflow" => "βοΈ Workflow orchestration β Temporal / Airflow",
"devx" => "π οΈ Developer experience",
"data" => "π Data validation",
"nix" => "βοΈ Nix β build / cache push",
"hygiene" => "π§Ή Repo hygiene",
"validation" => "π¦ Validation β per-language gates + universal lints",
"meta" => "πͺ Meta β directive enforcement + audit + renderer",
"runtime" => "βοΈ Runtime β tatara-script",
"git" => "π Git operations",
"gh" => "π GitHub API",
"dispatch" => "π Repo-type dispatch",
"spec" => "π Spec watching",
"container" => "π Container build (Docker / ko / buildah / podman)",
"build" => "π¨ Build β cross-compile / OCI / Ansible",
"bump" => "β¬οΈ Version bumping",
"publish" => "π€ Registry publishing",
"ruby" => "π Ruby gem",
"ansible" => "π
°οΈ Ansible Collection",
_ => "π§ Uncategorized β needs a home",
}
}