Skip to content

Commit 1a82d8e

Browse files
authored
Merge pull request #21 from transilienceai/feat/voice-console
feat: voice-driven compliance console (opt-in)
2 parents c645c39 + bae24a1 commit 1a82d8e

1,656 files changed

Lines changed: 769729 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/shasta/voice/web/dist/** linguist-generated=true
2+
src/shasta/voice/web/dist/** -diff

.github/workflows/voice-bundle.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: voice-bundle
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'src/shasta/voice/web/src/**'
7+
- 'src/shasta/voice/web/package.json'
8+
- 'src/shasta/voice/web/package-lock.json'
9+
- 'src/shasta/voice/web/vite.config.ts'
10+
11+
jobs:
12+
rebuild-and-diff:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
cache: 'npm'
20+
cache-dependency-path: 'src/shasta/voice/web/package-lock.json'
21+
- name: Install
22+
working-directory: src/shasta/voice/web
23+
run: npm ci
24+
- name: Build
25+
working-directory: src/shasta/voice/web
26+
run: npm run build
27+
- name: Verify committed bundle is up to date
28+
run: |
29+
if ! git diff --quiet src/shasta/voice/web/dist/; then
30+
echo "::error::The committed React bundle is out of date. Run 'npm run build' in src/shasta/voice/web/ and commit the result."
31+
git status src/shasta/voice/web/dist/
32+
git diff src/shasta/voice/web/dist/ | head -100
33+
exit 1
34+
fi

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,40 @@ All notable changes to Shasta are documented here. Format follows
44
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
55
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.9.0] — 2026-05-05 — Voice console (opt-in)
8+
9+
### Added
10+
- **Voice-driven compliance console** — opt-in module at `src/shasta/voice/`
11+
delivering a hands-free, conversational interface to your scan data.
12+
Run `python -m shasta.voice` after a scan to open a browser-based
13+
voice console at `localhost:8090` and talk to your compliance posture
14+
across SOC 2, ISO 27001, HIPAA, ISO 42001, and EU AI Act.
15+
- Browser-direct WebRTC to OpenAI Realtime API; FastAPI backend mints
16+
ephemeral tokens and serves 14 tool endpoints. Backend never handles
17+
audio.
18+
- Voice-driven dashboard: dashboard cards (FindingsList, FindingDetail,
19+
ComplianceScore, MultiFrameworkScore, ControlSummary, RiskList,
20+
RiskDetail, ActionToast) mount in response to assistant tool calls.
21+
- Read-only over `ShastaDB` for findings/scores/controls/scans, plus
22+
light writes for risk-register operations (`add_risk_item`,
23+
`update_risk`). Heavy ops (scans, reports, Terraform generation,
24+
policy generation) remain in the Claude Code skills — voice
25+
redirects to them.
26+
- Pre-built React bundle ships in the wheel, so users do not need
27+
Node.js installed at runtime.
28+
- Install with `pip install shasta[voice]`. Requires `OPENAI_API_KEY`.
29+
- 74 voice-specific tests (~85% coverage on `src/shasta/voice/`).
30+
- CI workflow (`.github/workflows/voice-bundle.yml`) verifies the
31+
committed React bundle stays in sync with `web/src/`.
32+
- Spec: `docs/superpowers/specs/2026-05-05-shastavoice-design.md`.
33+
- Plan: `docs/superpowers/plans/2026-05-05-shastavoice.md`.
34+
35+
### Changed
36+
- `ShastaDB._conn` now opens its SQLite connection with
37+
`check_same_thread=False` so the voice console's FastAPI app can share
38+
the connection across the request worker pool. Behavior is unchanged
39+
for the existing single-threaded dashboard. (`src/shasta/db/schema.py`)
40+
741
## [1.6.1] — 2026-04-11 — Prod-scan bug sweep
842

943
Five bugs surfaced during a live SOC 2 / ISO 27001 / HIPAA / Whitney scan

CLAUDE.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Shasta — Multi-Cloud Compliance Automation
22

33
## What is this?
4-
Shasta is a Claude Code-native SOC 2 and ISO 27001 compliance platform. It scans AWS and Azure environments, maps findings to compliance controls, generates remediation guidance (with Terraform), and produces compliance policies and reports.
4+
Shasta is a Claude Code-native multi-cloud compliance platform. It scans AWS and Azure environments, maps findings to compliance controls (SOC 2, ISO 27001, HIPAA, ISO 42001, EU AI Act), generates remediation guidance (with Terraform), produces compliance policies and reports, and ships an optional voice-driven dashboard (`python -m shasta.voice`) for hands-free posture queries.
55

66
## Tech stack
77
- Python 3.11+, boto3, azure-identity, azure-mgmt-*, msgraph-sdk, rich, pydantic, jinja2, weasyprint
@@ -15,15 +15,19 @@ Shasta is a Claude Code-native SOC 2 and ISO 27001 compliance platform. It scans
1515
- `src/shasta/compliance/ai/` — AI governance frameworks (ISO 42001, EU AI Act, NIST AI RMF)
1616
- `src/shasta/aws/ai_checks.py` — AWS AI service checks (Bedrock, SageMaker)
1717
- `src/shasta/azure/ai_checks.py` — Azure AI service checks (Azure OpenAI, Azure ML)
18+
- `src/shasta/dashboard/` — read-only HTML compliance dashboard (FastAPI + Jinja, port 8080)
19+
- `src/shasta/voice/` — opt-in voice console (FastAPI + React + OpenAI Realtime, port 8090); install with `pip install -e ".[voice]"`
1820
- `.claude/skills/` — Claude Code skill definitions
19-
- `tests/` — pytest test suite (uses moto for AWS mocking, unittest.mock for Azure)
21+
- `tests/` — pytest test suite (uses moto for AWS mocking, unittest.mock for Azure); voice-specific tests live under `tests/voice/`
2022
- `data/` — runtime data (gitignored)
2123

2224
## Commands
23-
- Install: `pip install -e ".[dev]"` (core) or `pip install -e ".[dev,azure]"` (with Azure)
24-
- Test: `pytest`
25+
- Install: `pip install -e ".[dev]"` (core), `pip install -e ".[dev,azure]"` (with Azure), or `pip install -e ".[dev,azure,voice]"` (with voice console)
26+
- Test: `pytest` (or `pytest tests/voice/` for voice-only)
2527
- Lint: `ruff check src/ tests/`
2628
- Format: `ruff format src/ tests/`
29+
- Run dashboard: `python -m shasta.dashboard` (HTML, port 8080)
30+
- Run voice console: `python -m shasta.voice` (requires `OPENAI_API_KEY` and a populated `data/shasta.db`; port 8090)
2731

2832
## Conventions
2933
- Use pydantic models for all data structures

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,20 @@ See [docs/DEPLOYMENT.md](./docs/DEPLOYMENT.md) for the complete setup guide incl
296296

297297
> **You don't need to memorize slash commands.** Shasta and Whitney are AI-native — just describe what you need in plain English inside Claude Code. Say *"Connect to my AWS and run a full SOC 2 gap analysis with remediation Terraform"* and Claude orchestrates everything. See **[docs/CONVERSATIONS.md](./docs/CONVERSATIONS.md)** for 15 real conversation examples.
298298
299+
### Voice Console (optional)
300+
301+
Talk to your compliance posture instead of clicking through dashboards.
302+
303+
```bash
304+
pip install shasta[voice] # adds FastAPI + uvicorn + httpx
305+
export OPENAI_API_KEY=sk-... # required for OpenAI Realtime API
306+
python -m shasta.voice # opens browser at http://localhost:8090
307+
```
308+
309+
Requires a recent scan in `data/shasta.db` (run `/scan` in Claude Code first). The voice assistant has read access to all your findings, compliance scores (SOC 2, ISO 27001, HIPAA, ISO 42001, EU AI Act), and risk register, plus light writes for adding/updating risk-register items. Heavy operations (scans, reports, Terraform generation) remain in the Claude Code skills — voice will redirect you to them.
310+
311+
📹 **Demo:** [`docs/media/shasta-voice-demo.mp4`](./docs/media/shasta-voice-demo.mp4) — 60-second walkthrough showing posture queries, finding drilldowns, and risk-register writes against a real scan.
312+
299313
---
300314

301315
## Skills Reference

TRUST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Shasta and Whitney together ship the following, all integrity-tested:
2323

2424
- **221 check functions** (221 cloud compliance + 0 AI governance — Whitney now ships as a separate repo at [github.com/transilienceai/whitney](https://github.com/transilienceai/whitney); install with `pip install whitney` for source-code scanning)
2525
- **112 Terraform remediation templates** (81 AWS + 31 Azure)
26-
- **632 tests** that all pass on every commit
26+
- **706 tests** that all pass on every commit
2727

2828
None of the claims in this README are written by hand and hoped-for —
2929
every numeric claim is AST-counted from source by an integrity test

docs/media/shasta-voice-demo.mp4

5.71 MB
Binary file not shown.

0 commit comments

Comments
 (0)