{"_id":"@attafii/clarityaicli","name":"@attafii/clarityaicli","dist-tags":{"latest":"1.5.0"},"versions":{"1.5.0":{"name":"@attafii/clarityaicli","displayName":"ClarityAI - Prompt Improver for Copilot","description":"Improves developer prompts by fixing grammar, spelling, and clarity before sending to Copilot","version":"1.5.0","publisher":"AhmedAttafii","author":{"name":"Ahmed Attafi"},"license":"MIT","icon":"img/ClarityAI-logo.png","keywords":["copilot","chat","prompt","clarity","ai","assistant","grammar","spelling","improvement"],"repository":{"type":"git","url":"git+https://github.com/Attafii/ClarityAI-Extension.git"},"engines":{"node":">=16.0.0","vscode":"^1.90.0"},"categories":["AI","Chat"],"activationEvents":["onStartupFinished"],"main":"./out/extension.js","type":"commonjs","publishConfig":{"access":"public"},"bin":{"clarity":"out/cli.js","clarityai":"out/cli.js"},"contributes":{"viewsContainers":{"activitybar":[{"id":"clarity-explorer","title":"ClarityAI","icon":"img/ClarityAI-logo.png"}]},"views":{"clarity-explorer":[{"id":"clarity-dashboard","name":"Dashboard","type":"webview"},{"id":"clarity-onboarding","name":"Onboarding","type":"webview"}]},"chatParticipants":[{"id":"clarity","name":"clarity","description":"Intelligently chooses fast or thinking mode based on prompt complexity","isSticky":false,"commands":[{"name":"architect","description":"Enhance prompt with focus on scalability, design patterns, and architecture"},{"name":"security","description":"Enhance prompt with focus on OWASP, sanitization, and vulnerability prevention"},{"name":"reviewer","description":"Deeply review and critique the logic of your prompt like a Senior Lead"},{"name":"tester","description":"Focus on test coverage, edge cases, and quality assurance strategy"},{"name":"documentation","description":"Focus on JSDoc, READMEs, and technical explanations"},{"name":"performance","description":"Focus on runtime efficiency, memory management, and optimization"},{"name":"frontend","description":"Focus on UI/UX, accessibility (A11y), and responsive design"},{"name":"skills","description":"Generate a reusable skills.md workflow starter with reference files, anti-patterns, and context protocol"},{"name":"vault","description":"List and recall your saved enhanced prompts"},{"name":"help","description":"Show the ClarityAI command guide and feature overview"},{"name":"onboarding","description":"Show the interactive 6-step onboarding guide"}]},{"id":"clarity.fast","name":"clarity-fast","description":"Uses fastest LLM for quick prompt improvements","isSticky":false},{"id":"clarity.thinking","name":"clarity-thinking","description":"Uses ClarityAI's advanced reasoning mode for complex prompts","isSticky":false}],"commands":[{"command":"clarity.forwardToCopilot","title":"Send to Copilot"},{"command":"clarity.saveToVault","title":"Save to Prompt Vault"},{"command":"clarity.openUrl","title":"Open URL"},{"command":"clarity.openVault","title":"Clarity: Open Prompt Vault"},{"command":"clarity.showHelp","title":"Clarity: Show Command Guide"},{"command":"clarity.showSkills","title":"Clarity: Show Skills.md Builder"},{"command":"clarity.setupCloudSync","title":"ClarityAI: Setup Cloud Sync","description":"Configure cloud storage for vault synchronization"},{"command":"clarity.openDashboard","title":"ClarityAI: Open Analytics Dashboard","description":"View vault metrics, team activity, and trends"},{"command":"clarity.showSyncStatus","title":"ClarityAI: Show Cloud Sync Status","description":"Display current synchronization status"},{"command":"clarity.submitToWorkflow","title":"ClarityAI: Submit to Approval Workflow","description":"Submit prompt for multi-reviewer approval"}],"configuration":{"title":"Clarity","properties":{"clarity.autoInjectContext":{"type":"boolean","default":true,"description":"Automatically inject project context (framework, dependencies, current file) into prompts"},"clarity.showDiffView":{"type":"boolean","default":true,"description":"Show detailed comparison between original and enhanced prompts"},"clarity.enableMermaid":{"type":"boolean","default":true,"description":"Automatically generate architectural Mermaid.js diagrams for complex requests"},"clarity.showEducationalInsights":{"type":"boolean","default":true,"description":"Show 'Key Additions (Why They Matter)' section in the comparison view"},"clarity.defaultPersona":{"type":"string","enum":["none","architect","security","reviewer","tester","documentation","performance","frontend"],"default":"none","description":"Sets a default expert persona to use for all prompt enhancements when no subcommand is used","enumDescriptions":["No default persona (General mode)","System Architect (Scalability & Design Patterns)","Security Expert (Vulnerability Scanner focus)","Senior Lead Reviewer (Critical logic oversight)","QA Engineer (Testing & Edge cases)","Technical Writer (Documentation & Explanation)","Performance Specialist (Optimization & Efficiency)","Frontend Expert (UI/UX & Accessibility)"]},"clarity.enableAnalytics":{"type":"boolean","default":false,"description":"Enable anonymous analytics to help improve ClarityAI"},"clarity.cloudSync.enabled":{"type":"boolean","default":false,"description":"Enable cloud synchronization of vault across devices"},"clarity.cloudSync.provider":{"type":"string","enum":["azure","aws","firebase","none"],"default":"none","description":"Cloud storage provider for vault synchronization"},"clarity.cloudSync.interval":{"type":"number","default":300000,"description":"Sync interval in milliseconds (default: 5 minutes)"},"clarity.dashboard.autoRefresh":{"type":"boolean","default":true,"description":"Auto-refresh dashboard every 30 seconds"},"clarity.workflows.requiredApprovals":{"type":"number","default":1,"minimum":1,"maximum":10,"description":"Number of reviewers required for approval"}}}},"scripts":{"vscode:prepublish":"npm run compile","prepublishOnly":"npm run compile","compile":"tsc -p ./","watch":"tsc -watch -p ./","cli":"node ./out/cli.js","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","package":"vsce package"},"devDependencies":{"@jest/globals":"^29.7.0","@types/jest":"^29.5.11","@types/node":"20.x","@types/vscode":"^1.118.0","@vscode/vsce":"^3.6.0","jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.4.5"},"dependencies":{"@types/node-fetch":"^2.6.11","boxen":"^5.1.2","chalk":"^4.1.2","node-fetch":"^2.7.0","ora":"^5.4.1"},"gitHead":"1caa8d873499061628b00a708798300a03cf5ee2","_id":"@attafii/clarityaicli@1.5.0","bugs":{"url":"https://github.com/Attafii/ClarityAI-Extension/issues"},"homepage":"https://github.com/Attafii/ClarityAI-Extension#readme","_nodeVersion":"22.17.1","_npmVersion":"11.7.0","dist":{"integrity":"sha512-ZLSPnjCR4Eq8ygF75ODNFjfNjEoNwSRGRqOYULb/gLgZy1jx5O5/P62OUpSznP8seWEyz6eV4wOk7/SFVxKDbg==","shasum":"2ab78c92c696952f9b45ec722febd4caebeb7192","tarball":"https://registry.npmjs.org/@attafii/clarityaicli/-/clarityaicli-1.5.0.tgz","fileCount":88,"unpackedSize":897145,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD0SAhWS3MUKonVVJTXA8w0fjBcrczuueol3Xqsq17bywIgLwcivkZmgl1pz0uQ9mI2kUnZXxyw0b3MKfnhTCDEIms="}]},"_npmUser":{"name":"attafii","email":"attafiahmed.dev@gmail.com"},"directories":{},"maintainers":[{"name":"attafii","email":"attafiahmed.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clarityaicli_1.5.0_1778325821518_0.368682494252182"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-09T11:23:41.451Z","1.5.0":"2026-05-09T11:23:41.770Z","modified":"2026-05-09T11:23:42.019Z"},"maintainers":[{"name":"attafii","email":"attafiahmed.dev@gmail.com"}],"description":"Improves developer prompts by fixing grammar, spelling, and clarity before sending to Copilot","homepage":"https://github.com/Attafii/ClarityAI-Extension#readme","keywords":["copilot","chat","prompt","clarity","ai","assistant","grammar","spelling","improvement"],"repository":{"type":"git","url":"git+https://github.com/Attafii/ClarityAI-Extension.git"},"author":{"name":"Ahmed Attafi"},"bugs":{"url":"https://github.com/Attafii/ClarityAI-Extension/issues"},"license":"MIT","readme":"# ClarityAI — The Smart Prompt Layer for VS Code Copilot\r\n\r\n[![Website](https://img.shields.io/badge/website-clarity--ai.app-blue?logo=google-chrome)](https://clarity-ai.app) [![VS Code](https://img.shields.io/badge/VS%20Code-1.90%2B-blue?logo=visual-studio-code)](https://code.visualstudio.com/) [![Version](https://img.shields.io/badge/version-1.5.0-green)](https://github.com/Attafii/ClarityAI-Extension) [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\r\n\r\n<img width=\"960\" height=\"440\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5f3606c4-2823-4155-aa0a-8b882a09fee9\" />\r\n\r\nClarityAI transforms simple developer intent into professional, context-aware prompts for Copilot — so you get production-ready code the first time.\r\n\r\n🌐 **Website**: https://clarity-ai.app\r\n\r\n---\r\n\r\n## ✨ What is ClarityAI?\r\n\r\nClarityAI acts as an intelligent translation layer between you and GitHub Copilot. Instead of sending vague or incomplete prompts to Copilot, ClarityAI:\r\n\r\n- 🎯 **Enhances** your prompts with technical precision and best practices\r\n- 🔍 **Analyzes** your project context (tech stack, dependencies, file patterns)\r\n- 🛡️ **Protects** your privacy by detecting and masking secrets before they leave your machine\r\n- 🚀 **Routes** intelligently between fast and deep-thinking AI models based on complexity\r\n- 👥 **Enables** team collaboration through shared prompt vaults and approval workflows\r\n\r\n<img width=\"771\" height=\"440\" alt=\"image\" src=\"https://github.com/user-attachments/assets/61afa11e-aa32-4ba5-84a7-24639490048e\" />\r\n\r\n### Quick Example\r\n\r\nTry this in VS Code Chat:\r\n\r\n```text\r\n@clarity make a login form with validation\r\n```\r\n\r\nClarityAI enhances it to include security best practices, accessibility standards, tech stack compatibility, and more — then you can send it directly to Copilot with one click.\r\n\r\n---\r\n\r\n## 🎯 Key Features (v1.5.0)\r\n\r\n### 🎭 Core Features\r\n\r\n**Expert Personas**\r\n- Use specialized AI personas: `@clarity /architect`, `/security`, `/reviewer`, `/tester`, `/documentation`, `/performance`, `/frontend`\r\n- Each persona focuses enhancement on specific technical aspects (scalability, security, testing, etc.)\r\n\r\n**Smart Routing**\r\n- `@clarity` - Automatically chooses fast or deep-thinking mode based on prompt complexity\r\n- `@clarity-fast` - Quick enhancements for simple requests\r\n- `@clarity-thinking` - Advanced reasoning for complex architectural decisions, with automatic fallback retries for transient upstream timeouts\r\n\r\n**Privacy & Security**\r\n- **Secret Shield**: Automatically detects and masks API keys, tokens, and PII before sending\r\n- **Vulnerability Scanner**: Identifies dangerous patterns in prompts (SQL injection, eval, etc.)\r\n- **Local-First**: All privacy checks happen on your machine\r\n\r\n**Context Intelligence**\r\n- Reads `package.json` to match framework versions and dependencies\r\n- Uses `.clarityrules` file for project-specific constraints\r\n- Analyzes current file and workspace structure\r\n- Prevents incompatible suggestions\r\n\r\n### 🏺 Team Collaboration\r\n\r\n**Prompt Vault**\r\n- Save enhanced prompts for reuse\r\n- Share standardized prompts across your team\r\n- Local vault (private) and Team vault (shared in `.clarity/vault.json`)\r\n\r\n**Approval Workflows**\r\n- Draft → Submit → Review → Approve/Reject workflow\r\n- Role-based access: Admin, Reviewer, Contributor\r\n- Multi-reviewer approvals with comments\r\n- Version history and change tracking\r\n- SLA deadline management with alerts\r\n\r\n**Interactive Onboarding**\r\n- Beautiful 6-step guided setup for new users\r\n- Introduces modes, templates, privacy, and features\r\n- Persistent state (shows once, can be reopened with `@clarity /onboarding`)\r\n\r\n### ☁️ Enterprise Features\r\n\r\n**Cloud Synchronization**\r\n- Sync vault across multiple devices\r\n- Support for Azure Blob Storage, AWS S3, and Firebase\r\n- Automatic conflict resolution with backup creation\r\n- Offline-first with intelligent queueing\r\n- Status bar integration\r\n\r\n**Analytics Dashboard**\r\n- Real-time metrics: vault items, approvals, team activity\r\n- Team leaderboard and most-used prompts\r\n- 7-day trends and growth predictions\r\n- Export to CSV/JSON for reporting\r\n- Dark mode support, fully responsive\r\n\r\n**Advanced Workflows**\r\n- Multi-reviewer approval system\r\n- Comment threads on prompts\r\n- Request changes workflow for iteration\r\n- Side-by-side version comparison\r\n- Full audit trail with timestamps\r\n\r\n### 💡 Smart Features\r\n\r\n**Prompt Suggestions**\r\n- Context-aware AI recommendations\r\n- 8 categories: Testing, Docs, Refactoring, Optimization, Architecture, Security, Debugging, Features\r\n- Confidence scoring (0-100)\r\n- Integrated with current file and language detection\r\n\r\n**Template Library**\r\n- 50+ pre-built professional templates\r\n- Categories: API, UI, DevOps, Database, Testing, Agent Workflows\r\n- Searchable and customizable\r\n- Fill with parameters: `@clarity t:rest-api resource=users method=POST`\r\n- Build agent workflow skills: `@clarity /skills` or `@clarity t:skills-md`\r\n\r\n**Quality Analysis**\r\n- Real-time quality score (1-10) for your prompts\r\n- Educational insights showing key improvements\r\n- Side-by-side before/after comparison\r\n- Learn better prompting practices\r\n\r\n---\r\n\r\n## 📖 Getting Started\r\n\r\n### Installation\r\n\r\n1. **From VS Code**\r\n   - Open VS Code\r\n   - Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)\r\n   - Search for \"ClarityAI\"\r\n   - Click Install\r\n\r\n2. **From Marketplace**\r\n   - Visit the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=AhmedAttafii.clarityai)\r\n   - Click \"Install\"\r\n\r\n3. **Manual Installation**\r\n   - Download the `.vsix` file from [releases](https://github.com/Attafii/ClarityAI-Extension/releases)\r\n   - In VS Code: Extensions → ··· menu → Install from VSIX\r\n\r\n### First Use\r\n\r\n1. **Open VS Code Chat** (Ctrl+Shift+I / Cmd+Shift+I)\r\n2. **Type** `@clarity` to activate ClarityAI\r\n3. **Follow the onboarding** - A beautiful 6-step guide will introduce you to all features\r\n4. **Start enhancing** - Try: `@clarity create a user authentication system`\r\n\r\n### Basic Usage\r\n\r\n```text\r\n# Basic enhancement\r\n@clarity add error handling to this function\r\n\r\n# Use expert personas\r\n@clarity /security review this authentication code\r\n@clarity /architect design a scalable notification system\r\n@clarity /tester write comprehensive tests for this module\r\n\r\n# Use templates\r\n@clarity t:rest-api resource=products method=POST\r\n@clarity /skills                        # Build a reusable skills.md workflow starter\r\n@clarity templates                    # List all templates\r\n\r\n# Work with vault\r\n@clarity /vault                       # View saved prompts\r\n```\r\n\r\n---\r\n\r\n## ⚙️ Configuration\r\n\r\nOpen **Settings** (Ctrl+,) and search for \"Clarity\":\r\n\r\n### General Settings\r\n- **Context Injection** - Auto-inject project metadata (framework, dependencies, current file)\r\n- **Show Diff View** - Display side-by-side comparison with quality score\r\n- **Enable Mermaid** - Auto-generate architectural diagrams for complex requests\r\n- **Educational Insights** - Show \"Why This Matters\" explanations\r\n- **Default Persona** - Set a default expert mode (architect, security, etc.)\r\n\r\n### Privacy & Analytics\r\n- **Enable Analytics** - Opt-in anonymous usage tracking (default: disabled)\r\n- **No PII Collection** - Zero personally-identifiable information collected\r\n- **GDPR Compliant** - Full transparency and user data rights\r\n\r\n### Cloud Sync\r\n- **Enable Cloud Sync** - Sync vault across devices\r\n- **Provider** - Choose Azure, AWS, or Firebase\r\n- **Sync Interval** - How often to sync (default: 5 minutes)\r\n\r\n### Dashboard\r\n- **Auto Refresh** - Update dashboard every 30 seconds (default: enabled)\r\n- **Metrics Display** - Choose which metrics to show\r\n\r\n### Workflows\r\n- **Required Approvals** - Number of reviewers needed (default: 1)\r\n\r\n### Available Commands\r\n\r\nPress **Ctrl+Shift+P** (or **Cmd+Shift+P**) and type:\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `ClarityAI: Setup Cloud Sync` | Configure cloud provider for vault sync |\r\n| `ClarityAI: Open Analytics Dashboard` | View real-time metrics and team activity |\r\n| `ClarityAI: Show Cloud Sync Status` | Check synchronization status |\r\n| `ClarityAI: Submit to Approval Workflow` | Submit prompt for multi-reviewer approval |\r\n| `Clarity: Open Prompt Vault` | Browse and manage saved prompts |\r\n| `Clarity: Show Skills.md Builder` | Open the agent workflow skills.md starter |\r\n| `Clarity: Show Command Guide` | Quick reference of all commands |\r\n\r\n---\r\n\r\n## 🛡️ Privacy & Security\r\n\r\n**Privacy-First Design**\r\n- All privacy checks happen locally on your machine\r\n- Source code never leaves your device\r\n- No code or prompts stored remotely\r\n\r\n**Secret Detection & Masking**\r\n- Automatically detects: AWS keys, GitHub tokens, Stripe keys, JWT tokens, API keys, SSH keys, database URIs, and more\r\n- Masks PII (email addresses, phone numbers) before any outbound request\r\n- All masking happens on-device\r\n\r\n**Analytics Transparency**\r\n- Analytics are **opt-in by default** (disabled until you enable)\r\n- Only anonymous usage data collected (no PII, no code, no prompts)\r\n- GDPR compliant with full user data rights\r\n- Can be disabled anytime in Settings\r\n\r\n**Cloud Security**\r\n- Credentials stored securely using VS Code Secrets API\r\n- Encrypted transmission for cloud sync\r\n- Role-based access control for team features\r\n- Full audit trail for compliance\r\n\r\n**OWASP Compliance**\r\n- Input validation on all user inputs\r\n- XSS prevention verified\r\n- No hardcoded credentials\r\n- Follows security best practices\r\n\r\n---\r\n\r\n## 📊 What's New in v1.5.0\r\n\r\n### Reliability Update ✨\r\n\r\n**Thinking Mode Resilience**\r\n- `@clarity-thinking` now retries transient upstream 524/timeout failures with the fallback model.\r\n- This reduces raw enhancement failures when the primary reasoning model is slow.\r\n\r\n**Docs Refresh**\r\n- README, FEATURES.md, help banner, and changelog updated for the 1.5.0 release.\r\n\r\nSee [CHANGELOG.md](CHANGELOG.md) for complete release notes.\r\n\r\n---\r\n\r\n## 🤝 Contributing\r\n\r\nWe welcome contributions! Here's how to get started:\r\n\r\n### Development Setup\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/Attafii/ClarityAI-Extension.git\r\ncd ClarityAI-Extension\r\n\r\n# Install dependencies\r\nnpm install\r\n\r\n# Open in VS Code\r\ncode .\r\n\r\n# Run in development mode\r\n# Press F5 to launch the Extension Development Host\r\n```\r\n\r\n### Building & Testing\r\n\r\n```bash\r\n# Compile TypeScript\r\nnpm run compile\r\n\r\n# Watch mode (auto-compile on changes)\r\nnpm run watch\r\n\r\n# Run tests\r\nnpm test\r\n\r\n# Build for marketplace\r\nnpm run vscode:prepublish\r\nnpm run package\r\n```\r\n\r\n### Contributing Guidelines\r\n\r\n1. **Fork** the repository\r\n2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. **Make** your changes\r\n4. **Test** thoroughly\r\n5. **Commit** with clear messages (`git commit -m 'Add amazing feature'`)\r\n6. **Push** to your fork (`git push origin feature/amazing-feature`)\r\n7. **Open** a Pull Request\r\n\r\n### What We're Looking For\r\n\r\n- 🐛 Bug fixes\r\n- ✨ New template contributions\r\n- 📝 Documentation improvements\r\n- 🧪 Test coverage expansion\r\n- 🌐 Internationalization (i18n)\r\n- 🎨 UI/UX enhancements\r\n\r\n---\r\n\r\n## 📚 Documentation\r\n\r\n- **[FEATURES.md](FEATURES.md)** - Complete feature reference and usage guide\r\n- **[CHANGELOG.md](CHANGELOG.md)** - Version history and release notes\r\n- **[LICENSE](LICENSE)** - MIT License details\r\n\r\n---\r\n\r\n## 🔗 Links\r\n\r\n- 🌐 **Website**: [clarity-ai.app](https://clarity-ai.app)\r\n- 📦 **VS Code Marketplace**: [ClarityAI Extension](https://marketplace.visualstudio.com/items?itemName=AhmedAttafii.clarityai)\r\n- 💻 **GitHub Repository**: [ClarityAI-Extension](https://github.com/Attafii/ClarityAI-Extension)\r\n- 🐛 **Report Issues**: [GitHub Issues](https://github.com/Attafii/ClarityAI-Extension/issues)\r\n- 💬 **Discussions**: [GitHub Discussions](https://github.com/Attafii/ClarityAI-Extension/discussions)\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n---\r\n\r\n## 🙏 Acknowledgments\r\n\r\nBuilt with ❤️ by developers, for developers.\r\n\r\nSpecial thanks to:\r\n- The VS Code team for the excellent Extension API\r\n- GitHub Copilot for inspiring better AI collaboration\r\n- The open-source community for feedback and contributions\r\n\r\n---\r\n\r\n## 📈 Project Stats\r\n\r\n- **10,500+** lines of production code\r\n- **70%+** test coverage\r\n- **50+** professional templates\r\n- **8** expert personas\r\n- **15** modules\r\n- **0** security vulnerabilities\r\n- **< 200ms** startup time\r\n- **< 100MB** memory usage\r\n\r\n---\r\n\r\n**Ready to write better prompts?** Install ClarityAI today and transform how you interact with GitHub Copilot! 🚀\r\n","readmeFilename":"README.md","_rev":"1-17419e7570e69cdd08e060ea582b327b"}