{"id":51277065,"url":"https://github.com/kzndotsh/gang.guide","last_synced_at":"2026-06-29T21:32:26.853Z","repository":{"id":367439741,"uuid":"1280823402","full_name":"kzndotsh/gang.guide","owner":"kzndotsh","description":"Evidence backed mapping of criminal organizations across the US — alliances, rivalries, history, and culture.","archived":false,"fork":false,"pushed_at":"2026-06-26T03:06:49.000Z","size":1303,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-26T03:10:08.374Z","etag":null,"topics":["ai","crime","data-analysis","data-science","data-visualization","dataset","gangs","konva","konvajs","llm","organized-crime","python","svelte","tailwind","typescript"],"latest_commit_sha":null,"homepage":"https://gang.guide","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kzndotsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-26T01:15:45.000Z","updated_at":"2026-06-26T03:08:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kzndotsh/gang.guide","commit_stats":null,"previous_names":["kzndotsh/gang.guide"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kzndotsh/gang.guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzndotsh%2Fgang.guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzndotsh%2Fgang.guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzndotsh%2Fgang.guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzndotsh%2Fgang.guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kzndotsh","download_url":"https://codeload.github.com/kzndotsh/gang.guide/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzndotsh%2Fgang.guide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34944147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","crime","data-analysis","data-science","data-visualization","dataset","gangs","konva","konvajs","llm","organized-crime","python","svelte","tailwind","typescript"],"created_at":"2026-06-29T21:32:26.110Z","updated_at":"2026-06-29T21:32:26.847Z","avatar_url":"https://github.com/kzndotsh.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cp\u003e\n        \u003ca href=\"https://github.com/kzndotsh/gang.guide/actions/workflows/ci.yml\"\u003e\n            \u003cimg alt=\"CI\" src=\"https://github.com/kzndotsh/gang.guide/actions/workflows/ci.yml/badge.svg\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://codecov.io/gh/kzndotsh/gang.guide\"\u003e\n            \u003cimg alt=\"Coverage\" src=\"https://codecov.io/gh/kzndotsh/gang.guide/graph/badge.svg\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://github.com/kzndotsh/gang.guide/releases\"\u003e\n            \u003cimg alt=\"Release\" src=\"https://img.shields.io/github/v/release/kzndotsh/gang.guide?logo=github\u0026logoColor=white\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://svelte.dev\"\u003e\n            \u003cimg alt=\"SvelteKit\" src=\"https://img.shields.io/badge/SvelteKit-5-ff3e00?logo=svelte\u0026logoColor=white\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://workers.cloudflare.com\"\u003e\n            \u003cimg alt=\"Cloudflare Workers\" src=\"https://img.shields.io/badge/Cloudflare_Workers-f38020?logo=cloudflare\u0026logoColor=white\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://konvajs.org\"\u003e\n            \u003cimg alt=\"Konva.js\" src=\"https://img.shields.io/badge/Konva.js-Canvas-0d83cd\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://python.org\"\u003e\n            \u003cimg alt=\"Python\" src=\"https://img.shields.io/badge/Python-3.12+-3776ab?logo=python\u0026logoColor=white\"\u003e\u003c/a\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cimg src=\".github/assets/readme-header.png\" alt=\"gang.guide\" width=\"100%\"\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003egang.guide\u003c/h1\u003e\n    \u003cp\u003e\u003cstrong\u003eEvidence backed mapping of criminal organizations across the US — alliances, rivalries, history, and culture.\u003c/strong\u003e\u003c/p\u003e\n    \u003cp\u003e\n        \u003ca href=\"https://gang.guide\"\u003e🌐 Live Site\u003c/a\u003e •\n        \u003ca href=\"#quick-start\"\u003e🚀 Quick Start\u003c/a\u003e •\n        \u003ca href=\"docs/ARCHITECTURE.md\"\u003e🏗️ Architecture\u003c/a\u003e •\n        \u003ca href=\"docs/PIPELINE.md\"\u003e⚙️ Pipeline\u003c/a\u003e •\n        \u003ca href=\"docs/STANDARDS.md\"\u003e✅ Standards\u003c/a\u003e •\n        \u003ca href=\"TODO.md\"\u003e🗺️ Roadmap\u003c/a\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Quick Start\n\n```bash\n# Clone and setup\ngit clone https://github.com/kzndotsh/gang.guide.git\ncd gang.guide\njust setup\n\n# Or manually:\nnpm install\ncd apps/web \u0026\u0026 npm install\npython3 build.py\n\n# Run the dev server\njust dev\n```\n\n## How It Works\n\n```\nScrape → Clean → Extract (sonnet 4.5 × 3 temps) → Adjudicate (opus 4.6) → Merge → Apply → Build → Serve\n```\n\n1. **Scrape** raw HTML from sources into `data/raw/`\n2. **Extract** structured JSON via sonnet 4.5 at 3 temperatures — edges require verbatim evidence quotes\n3. **Adjudicate** with opus 4.6 — validates evidence, rejects co-mentions, resolves conflicts\n4. **Merge** via algorithmic consensus (2/3 agreement) or adjudicated result\n5. **Apply** conservative upgrade to `data/orgs/*.json` + `data/edges.json` — lint gates the result\n6. **Build** compiles flat files into `graph.json` + `details.json`\n7. **Serve** on Cloudflare Workers via SvelteKit + Konva.js canvas\n\n## Data\n\nStats are computed at build time by `build.py` and embedded in `graph.json`. All relationships are evidence-backed with verbatim quotes from source material. Data quality is enforced by [lint rules](docs/STANDARDS.md) that run in CI and gate every pipeline application.\n\n**Sources:**\n\n| | | |\n|---|---|---|\n| [Wikipedia](https://en.wikipedia.org) | [StreetGangs.com](https://www.streetgangs.com) | [UnitedGangs.com](https://unitedgangs.com) |\n| [Chicago Gang History](https://chicagoganghistory.com) | [DetroitStreetGangs](https://detroitstreetgangs.com) | [NGCRC](https://www.ngcrc.com) |\n| [NewYorkCityGangs](https://newyorkcitygangs.com) | [StoneGreasers](https://www.stonegreasers.com) | [DOJ / FBI](https://www.justice.gov) |\n| [BlackPast.org](https://www.blackpast.org) | [CourtListener](https://www.courtlistener.com) | |\n\n\u003c!-- STATS:START - Auto-generated by scripts/update-readme-stats.py --\u003e\n\u003cimg src=\".github/assets/stats.svg\" alt=\"Data Stats\" width=\"100%\"\u003e\n\u003c!-- STATS:END --\u003e\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| **Data** | Flat JSON files, Python build script |\n| **Frontend** | SvelteKit 5, Konva.js, Tailwind CSS, shadcn-svelte |\n| **Rendering** | Raw Konva Canvas API (persistent nodes, edge-index, directional arrows) |\n| **Deployment** | Cloudflare Workers via Alchemy IaC |\n| **Pipeline** | Python, sonnet 4.5 + opus 4.6 (LLM extraction) |\n| **Linting** | Ruff (Python), svelte-check (frontend) |\n| **Testing** | pytest + vitest, codecov coverage |\n| **CI/CD** | GitHub Actions, conventional commits, lefthook |\n\n## Project Structure\n\n```\n├── build.py                    # Builds graph.json + details.json from flat data\n├── data/\n│   ├── orgs/                   # One JSON per org (source of truth)\n│   ├── edges.json              # Edge list (alliances, rivalries, affiliations)\n│   └── lanes.json              # Lane taxonomy + org anchors\n├── apps/\n│   ├── web/                    # SvelteKit + Konva.js Canvas map viewer\n│   │   ├── src/routes/         # +page.svelte (main map), sitemap.xml\n│   │   ├── src/lib/map/        # KonvaMap.svelte, visibility.ts, scale.ts\n│   │   ├── src/lib/inspector/  # Inspector panel components\n│   │   └── alchemy.run.ts      # Deployment config (Cloudflare Workers)\n│   └── pipeline/               # Python LLM extraction pipeline\n│       ├── extract.py          # Multi-temp extraction (sonnet 4.5)\n│       ├── adjudicate.py       # Conflict resolution (opus 4.6)\n│       ├── merge.py            # Consensus filtering\n│       ├── apply.py            # Conservative data upgrade\n│       ├── lint.py             # Data validation (runs in CI)\n│       └── tests/              # Unit tests + e2e + fixtures\n├── .ruler/                     # AI agent instructions (source of truth)\n├── .github/workflows/          # CI + release + PR title validation\n├── justfile                    # Task runner (just dev, just ci, just pipeline)\n├── pytest.ini                  # Test config (strict markers, coverage)\n├── lefthook.yml                # Git hooks (ruff pre-commit, svelte-check pre-push)\n├── flake.nix                   # Nix dev shell\n├── TODO.md                     # Roadmap\n└── docs/                       # Documentation\n    ├── ARCHITECTURE.md         # System design\n    ├── PIPELINE.md             # LLM extraction pipeline\n    ├── SCHEMA.md               # Data schema reference\n    ├── STANDARDS.md            # Data quality rules \u0026 lint checks\n    ├── TERMINOLOGY.md          # Glossary\n    ├── USER.md                 # User guide\n    └── CONTRIBUTING.md         # Contributor guide\n```\n\n## Commands\n\n```bash\njust              # list all tasks\njust setup        # bootstrap after cloning\njust dev          # start dev server\njust build-data   # rebuild graph.json from org files\njust lint         # lint data integrity\njust check        # type-check frontend\njust deploy       # deploy to production\njust ruler        # regenerate AI agent configs\n```\n\n## Adding a New Org\n\n1. Create `data/orgs/my-new-org.json`:\n```json\n{\n  \"id\": \"org:my-new-org\",\n  \"name\": \"My New Org\",\n  \"aliases\": [],\n  \"type\": \"street_gang\",\n  \"lane\": \"california-latino-other\",\n  \"metro\": \"Los Angeles\",\n  \"founded_year\": 1985,\n  \"founded_year_precision\": \"circa\",\n  \"description\": \"Factual 1-3 sentence description with founding context.\",\n  \"colors\": [\"blue\"],\n  \"nation_affiliation\": null,\n  \"status\": \"active\",\n  \"sources\": [{\"url\": \"https://...\", \"title\": \"Source Name\"}]\n}\n```\n2. Add relationships to `data/edges.json` if needed\n3. Run `just build-data`\n\n## Deployment\n\nDeployed to Cloudflare Workers via [Alchemy](https://github.com/alchemy-run/alchemy).\n\n```bash\njust deploy           # production\njust deploy-preview   # personal stage\n```\n\nRequires `apps/web/.env` with `ALCHEMY_PASSWORD`, `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`.\n\n## AI Agent Setup\n\nInstructions managed via [Ruler](https://github.com/intellectronica/ruler). After cloning:\n\n```bash\njust ruler\n```\n\nThis generates config files for Claude, Copilot, Cursor, and Kiro from `.ruler/AGENTS.md`.\n\n## License\n\nTBD\n\n## Contributors\n\n![Contributors](https://contrib.rocks/image?repo=kzndotsh/gang.guide)\n\nCreated by [@kzndotsh](https://github.com/kzndotsh)\n\n## Project Stats\n\n![Project Stats](https://repobeats.axiom.co/api/embed/9da041285ec9bd9c7a612bc4443dba787c3d595b.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkzndotsh%2Fgang.guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkzndotsh%2Fgang.guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkzndotsh%2Fgang.guide/lists"}