Metadata-Version: 2.4
Name: askyara
Version: 0.1.0
Summary: Salesforce-native AI engineering companion and multi-agent toolkit
Author: AskYARA Engineering Team
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.11
Requires-Dist: jsonschema>=4.20.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Description-Content-Type: text/markdown

# AskYARA Salesforce Engineering

> **Salesforce-native AI engineering companion and multi-agent toolkit.**  
> Understands Apex, LWC, Flows, Salesforce metadata, governor limits, security, and project architecture.

AskYARA brings Salesforce engineering intelligence directly into your favorite coding agent—whether you use **Cursor**, **Claude Code**, **GitHub Copilot**, **Windsurf**, **Cline**, **Kiro**, or **Codex**.

---

## Key Capabilities

- **Platform-Aware Review (`/askyara-review`):** Inspects changed files, surrounding callers, governor limits (SOQL/DML in loops), CRUD/FLS access, and asynchronous boundaries.
- **Repository Audit (`/askyara-audit`):** Scans the whole Salesforce DX project for anti-patterns, missing tests, and architectural technical debt.
- **Evidence-Backed Findings:** Every reported issue includes the file path, exact line numbers, severity, rationale, and recommended fix.
- **Deterministic Local Tools:** Interfaces with Git, Salesforce CLI (`sf`), and Salesforce Code Analyzer / PMD when installed.
- **Zero Cloud Requirement:** Local-first, privacy-preserving, and read-only by default.

---

## Quickstart

### 1. Install into Your Coding Agent

See [INSTALL.md](INSTALL.md) for agent-specific instructions.

For **Claude Code**:
```bash
# In Claude Code CLI or Desktop
/plugin install askyara
```

For **GitHub Copilot**:
```bash
# Workspace instruction file
cp .github/copilot-instructions.md your-project/.github/copilot-instructions.md
```

For **Cursor / Windsurf / Cline / Kiro**:
Copy the matching rule into your workspace:
```bash
# Cursor
cp .cursor/rules/askyara.mdc your-project/.cursor/rules/

# Windsurf
cp .windsurf/rules/askyara.md your-project/.windsurf/rules/

# Cline
cp .clinerules/askyara.md your-project/.clinerules/

# Kiro
cp .kiro/steering/askyara.md your-project/.kiro/steering/
```

### 2. Run AskYARA CLI Directly

```bash
# Verify installation and discover local Salesforce tools
askyara doctor

# Review local changes in an SFDX project
askyara review
```

---

## Commands

| Command | What it does |
| :--- | :--- |
| `/askyara [query]` | Ask questions about the current Salesforce project: architecture, Apex classes, LWC components, Flows, and metadata structure. |
| `/askyara-review` | Review the current diff like a Salesforce Technical Architect: governor limits (SOQL/DML in loops), CRUD/FLS security, sharing context, bulkification, and test quality. Name a target to narrow or widen: `uncommitted`, `staged`, `branch`, or a PR link. |
| `/askyara-audit` | Comprehensive quality, security, and architecture audit of the whole Salesforce DX repository, ranked by what to fix first. |
| `/askyara-security` | Focused security audit: sharing models (`with sharing`), CRUD/FLS enforcement, dynamic SOQL injection, and secret/credential exposure. |
| `/askyara-test` | Identify missing test coverage, test quality flaws (missing assertions), and generate bulk test scenarios. |
| `/askyara-help` | Quick reference for available commands, installed skills, and diagnostic status. |

Commands need a skill-capable host (Claude Code, Codex, Devin CLI, Github Copilot, Kiro, Cline, Windsurf). In Claude Code and hosts with slash-command support, invoke them directly as `/askyara-review`. In namespaced plugin environments, they are available as `/askyara:askyara-review`. The instruction-only adapters (Cursor's rule file, Windsurf, Cline, Copilot and Kiro `AGENTS.md`) apply the always-on Salesforce engineering rules across all prompts without requiring slash commands.

---


## Salesforce Industries Support

AskYARA includes modular **Industry Capability Packs** that bring domain-aware architecture and review rules to specialized Salesforce clouds:

- **OmniStudio (`omnistudio`):** DataRaptor Turbo Extract enforcement, unindexed filter warnings, and Integration Procedure Loop Block limits.
- **Financial Services Cloud (`financial-services-cloud`):** Synchronous RBL rollup limits, Compliant Information Barriers (CIB), Person Account handling.
- **Health Cloud (`health-cloud`):** HIPAA/PHI debug log masking, FHIR CodeSet standard mappings, and Care Team data boundaries.
- **Manufacturing Cloud (`manufacturing-cloud`):** Data Processing Engine (DPE) forecast delegation, Sales Agreement row-locking prevention.
- **Consumer Goods / CPG (`consumer-goods-cloud`):** Mobile in-store sync conflict resolution, Trade Promotion Management (TPM) budget calculation boundaries.
- **Automotive Cloud (`automotive-cloud`):** Telematics anti-patterns (Data Cloud vs sObjects), warranty claim idempotency.
- **Energy & Utilities (`energy-utilities-cloud`):** Tariff rating callouts in loops, Premise-to-ServicePoint hierarchy checks.
- **Public Sector Solutions (`public-sector-solutions`):** Citizen data isolation, Guest User security, BRE Decision Matrix coverage.

### Examples: Using AskYARA with Industry Clouds

AskYARA **auto-detects** industry metadata (e.g. `FinServ__`, `HealthCloudGA__`, `omniDataTransforms/`, `SalesAgreement`). You can also specify packs explicitly:

```bash
# Verify detected industry clouds and active rule packs
askyara doctor

# Review local changes with a specific industry pack
askyara review --pack omnistudio

# Audit repository against Financial Services Cloud rules
askyara audit --pack financial-services-cloud
```

**In your Coding Agent (Cursor, Claude Code, Copilot, Antigravity):**
- *OmniStudio:* `/askyara "Review the newly added ClaimSubmission Integration Procedure and DataRaptors for scalability"`
- *Financial Services:* `/askyara-review` (evaluates Rollup By Lookup limits and CIB ethical walls)
- *Health Cloud:* `/askyara-security` (verifies zero PHI leakage and FHIR CodeSet compliance)
- *Manufacturing:* `/askyara-review` (verifies forecast updates are dispatched to Data Processing Engine jobs)

See the full [Salesforce Industries Guide](docs/product/industries-guide.md) for detailed checklists and finding examples.

---

## License

Licensed under the [Apache License, Version 2.0](LICENSE).
