{"id":32786800,"url":"https://github.com/spinbased/winston","last_synced_at":"2026-05-05T13:32:35.121Z","repository":{"id":322021874,"uuid":"1087960496","full_name":"spinbased/Winston","owner":"spinbased","description":"AI Legal Defense System with 805,000+ legal documents covering the entire US legal system. Features 31 specialized Slack commands, voice support, session memory, and smart caching. Built with Agent OS + Claude-Flow + Claude Code.","archived":false,"fork":false,"pushed_at":"2025-11-02T03:23:22.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-02T04:15:08.565Z","etag":null,"topics":["agent-os","ai","automation","claude","claude-flow","constitutional-law","law-enforcement","legal-assistant","legal-tech","n8n","openai","rag","slack-bot","tax-law","typescript","vector-database","vercel"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/spinbased.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":"2025-11-02T02:06:12.000Z","updated_at":"2025-11-02T03:23:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/spinbased/Winston","commit_stats":null,"previous_names":["spinbased/winston"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/spinbased/Winston","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbased%2FWinston","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbased%2FWinston/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbased%2FWinston/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbased%2FWinston/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spinbased","download_url":"https://codeload.github.com/spinbased/Winston/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbased%2FWinston/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282762578,"owners_count":26723111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-05T02:00:05.946Z","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":["agent-os","ai","automation","claude","claude-flow","constitutional-law","law-enforcement","legal-assistant","legal-tech","n8n","openai","rag","slack-bot","tax-law","typescript","vector-database","vercel"],"created_at":"2025-11-05T05:01:38.370Z","updated_at":"2025-11-05T05:03:14.067Z","avatar_url":"https://github.com/spinbased.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Winston - AI Legal Defense System 🤖⚖️\n\nThe most comprehensive AI legal assistant ever created, powered by 805,000+ legal documents spanning the entire US legal system.\n\n[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)]()\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)]()\n[![License](https://img.shields.io/badge/license-MIT-green)]()\n\n## 🌟 Features\n\n- **31 Specialized Slash Commands** - Law enforcement, tax law, contracts, and more\n- **805,000+ Legal Documents** - Complete US legal system coverage\n- **Voice Message Support** - Whisper AI transcription\n- **Session Memory** - 24-hour conversation history\n- **Smart Caching** - 98% semantic similarity matching\n- **Production Ready** - Health checks, metrics, logging, rate limiting\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 20+\n- Redis\n- API Keys: Slack, Anthropic (Claude), OpenAI, Pinecone\n\n### Installation\n\n```bash\n# Install dependencies\nnpm install\n\n# Configure environment\ncp .env.template .env\n# Edit .env with your API keys\n\n# Build\nnpm run build\n\n# Start Redis\nredis-server \u0026\n\n# Run\nnpm start\n```\n\n### Deploy to Vercel\n\n```bash\n# Install Vercel CLI\nnpm i -g vercel\n\n# Deploy\nvercel\n\n# Set environment variables in Vercel dashboard\n```\n\n## 📚 Data Processing\n\n### Process Base Legal Data (~15 min)\n\n```bash\nnpm run data:process-all\n```\n\n### Process ALL Law Data (~3-5 hours)\n\n```bash\n# Federal + State + Tax law\nnpm run data:all-law\n\n# Or individually\nnpm run data:federal  # 1.2 GB, 55k docs\nnpm run data:state    # 2.6 GB, 510k docs\nnpm run data:tax      # 1.3 GB, 225k docs\n```\n\n## 💬 Available Commands\n\n### General Legal (5 commands)\n- `/legal-help` - General legal assistance\n- `/constitutional` - Constitutional analysis\n- `/define` - Legal term definitions\n- `/defend-rights` - Legal defense guidance\n- `/sovereign-rights` - Sovereign citizenship framework\n\n### Law Enforcement (10 commands)\n- `/traffic-stop` - Real-time traffic stop defense\n- `/warrant-check` - Warrant validity verification\n- `/miranda-rights` - Miranda rights explanation\n- `/search-seizure` - 4th Amendment rights\n- `/remain-silent` - 5th Amendment guidance\n- `/right-to-counsel` - 6th Amendment attorney rights\n- `/police-misconduct` - File complaint guidance\n- `/arrest-rights` - What to do when arrested\n- `/evidence-suppression` - Motion to suppress evidence\n- `/qualified-immunity` - Challenge qualified immunity\n\n### Tax Law (10 commands)\n- `/tax-strategy` - Aggressive tax minimization\n- `/irs-audit` - IRS audit defense\n- `/tax-deductions` - Maximize deductions\n- `/tax-credits` - All available credits\n- `/offshore-tax` - International tax strategies\n- `/tax-court` - Tax Court litigation\n- `/innocent-spouse` - Innocent spouse relief\n- `/tax-liens` - Handle IRS liens/levies\n- `/estimated-tax` - Quarterly payment strategy\n- `/constitutional-tax` - Constitutional tax challenges\n\n### General Legal Services (5 commands)\n- `/contract-review` - Contract analysis\n- `/legal-research` - Case law research\n- `/file-lawsuit` - Civil lawsuit guidance\n- `/appeal-case` - Appellate procedure\n- `/pro-se` - Self-representation guide\n\n### Utility (1 command)\n- `/new-session` - Reset conversation history\n\n## 🔧 Production Endpoints\n\n- `GET /health` - Service health check\n- `GET /metrics` - System metrics\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────┐\n│         Slack Interface             │\n│  31 Commands + Voice + Sessions     │\n└──────────────┬──────────────────────┘\n               │\n┌──────────────┴──────────────────────┐\n│     Enhanced Legal Slack Bot        │\n│  Session │ Cache │ Voice │ Legal    │\n└──────────────┬──────────────────────┘\n               │\n    ┌──────────┼──────────┐\n    │          │          │\n┌───▼───┐ ┌───▼────┐ ┌───▼─────┐\n│ Redis │ │Pinecone│ │ Claude  │\n│       │ │ Vector │ │ Haiku   │\n│       │ │   DB   │ │  4.5    │\n└───────┘ └────────┘ └─────────┘\n```\n\n## 📊 Knowledge Base\n\n| Source | Documents | Size |\n|--------|-----------|------|\n| Base Legal | 15,000 | 128 MB |\n| Federal Law | 55,000 | 1.2 GB |\n| State Law | 510,000 | 2.6 GB |\n| Tax Law | 225,000 | 1.3 GB |\n| **TOTAL** | **805,000** | **5.2 GB** |\n\n## 🔐 Environment Variables\n\nSee `.env.template` for all required variables:\n\n- `SLACK_BOT_TOKEN` - Your Slack bot token\n- `SLACK_SIGNING_SECRET` - Slack signing secret\n- `ANTHROPIC_API_KEY` - Claude API key\n- `OPENAI_API_KEY` - OpenAI API key (embeddings + Whisper)\n- `PINECONE_API_KEY` - Pinecone vector DB key\n- `REDIS_URL` - Redis connection URL\n\n## 💰 Costs\n\n- **One-Time**: ~$300 (embeddings)\n- **Monthly**: ~$250-340 (Pinecone + APIs + hosting)\n- **Per-Query**: ~$0.0001\n\n## 🛠️ Development\n\n```bash\n# Development mode with auto-reload\nnpm run dev\n\n# Build\nnpm run build\n\n# Lint\nnpm run lint\n\n# Format\nnpm run format\n\n# Type check\nnpm run typecheck\n```\n\n## 📝 NPM Scripts\n\n### Data Processing\n- `data:extract-pdf` - Extract text from PDFs\n- `data:parse-definitions` - Parse Black's Law Dictionary\n- `data:parse-constitutional` - Parse Constitution\n- `data:parse-founding` - Parse Founding Documents\n- `data:chunk` - Chunk all documents\n- `data:embed` - Generate embeddings\n- `data:load` - Load to Pinecone\n- `data:process-all` - Run full base pipeline\n- `data:federal` - Process federal law\n- `data:state` - Process state law\n- `data:tax` - Process tax law\n- `data:all-law` - Process ALL law data\n\n## 🧪 Testing\n\n```bash\n# Run tests\nnpm test\n\n# Test coverage\nnpm run test:coverage\n```\n\n## 🤝 N8N Integration\n\nWinston can integrate with n8n for workflow automation. See `n8n-workflows/` directory for templates.\n\nExample workflows:\n- Automated legal research triggers\n- Document processing pipelines\n- Multi-agent legal analysis\n- Scheduled report generation\n\n## 📖 Documentation\n\n- [FINAL-COMPLETION-REPORT.md](FINAL-COMPLETION-REPORT.md) - Complete feature documentation\n- [PROGRESS-REPORT-SESSION-2.md](PROGRESS-REPORT-SESSION-2.md) - Development progress\n- [Agent OS Specs](agent-os/specs/) - Technical specifications\n\n## 🏆 Built With\n\n- **Agent OS** - Spec-driven development\n- **Claude-Flow** - Multi-agent orchestration\n- **Claude Code** - Implementation\n- **TypeScript** - Type-safe code\n- **Slack Bolt** - Slack integration\n- **Anthropic Claude** - AI reasoning\n- **OpenAI** - Embeddings \u0026 Whisper\n- **Pinecone** - Vector database\n- **Redis** - Caching \u0026 sessions\n\n## ⚖️ Legal Disclaimer\n\nThis is an educational AI assistant. It provides legal information, NOT legal advice. Always consult a licensed attorney for your specific legal situation.\n\n## 📄 License\n\nMIT\n\n## 🙏 Acknowledgments\n\nBuilt using the Ultimate Coding Agent System:\n- Agent OS by Builder Methods\n- Claude-Flow by rUv\n- Claude Code by Anthropic\n\n---\n\n**Winston** - Your AI Legal Defense Companion ⚖️🤖\n\nMade with ❤️ using Agent OS + Claude-Flow + Claude Code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinbased%2Fwinston","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspinbased%2Fwinston","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinbased%2Fwinston/lists"}