Skip to content

Commit f147ee0

Browse files
committed
feat(gtm): finalize sales intelligence, comprehensive documentation audit, and future-proof hardening
1 parent b9a7ed1 commit f147ee0

19 files changed

Lines changed: 293 additions & 216 deletions

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ cython_debug/
156156
*.sqlite
157157
.ruff_cache/
158158
brain/
159-
docs/reference/prospecting_log.md
160-
docs/reference/demo_script.md
159+
seed_log.txt
161160
# Ignore reports content but keep the folder
162161
reports/*
163162
!reports/.gitkeep

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
> **"One Engine. Two Worlds. Total Accountability."**
1515
16-
[**Full Documentation 📚**](https://daretechie.github.io/CommitVigil/) | [**Live Site 🌐**](https://daretechie.github.io/CommitVigil/) | [**Safety Validation Report 🛡️**](https://daretechie.github.io/CommitVigil/validation/safety_validation_report/) | [**Manager Feedback Guide 🎮**](docs/guides/feedback_loop.md)
16+
[**Full Documentation 📚**](https://daretechie.github.io/CommitVigil/) | [**Live Site 🌐**](https://daretechie.github.io/CommitVigil/) | [**Safety Validation Report 🛡️**](https://daretechie.github.io/CommitVigil/validation/safety_validation_report/) | [**Manager Feedback Guide 🎮**](docs/guides/feedback_loop.md) | [**Integration Guide 🔌**](docs/guides/integrations.md)
1717

1818
---
1919

@@ -52,6 +52,12 @@ Every commitment—whether from Slack or a Git Commit—passes through a determi
5252
3. **Language & Culture Router**: Identifies the primary language and selects the appropriate cultural persona.
5353
4. **Safety Supervisor (`Overwatch`)**: Audits final communications for HR/Legal ethics and **Industry-Specific Semantic Compliance**.
5454

55+
### 💼 Phase 6: Enterprise Sales Intelligence (New)
56+
Transform your security audit into a revenue engine.
57+
- **Automated Prospecting**: The `ProspectingScout` agent generates realistic "Drift Scenarios" for demos based on industry (e.g., Finance, Energy).
58+
- **Multi-Currency ROI**: Interactive calculator for predicting savings in USD, EUR, and GBP.
59+
- **Executive Briefs**: Generates premium HTML one-pagers for C-Level meetings.
60+
5561
---
5662

5763
## 🛠️ Core Tech Stack
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ADR-002: Sales Intelligence & Prospecting Layer
2+
3+
**Date**: 2026-01-30
4+
**Status**: Accepted
5+
**Context**:
6+
As CommitVigil evolves into an enterprise GTM tool, there is a need for a layer that simulates findinds for demos and calculates ROI without contaminating the core, forensic accountability engine.
7+
8+
**Decision**:
9+
We will implement a dedicated `Sales Intelligence` layer consisting of the `ProspectingScout` agent and a specialized `sales` API router.
10+
11+
**Rationale**:
12+
1. **Separation of Concerns**: Core agents (`brain.py`, `safety.py`) focus on real-world transaction analysis. The `ProspectingScout` focuses on simulation and synthetic scenario generation.
13+
2. **Performance**: Sales-specific endpoints are treated as "high-intensity" but lower frequency, allowing for independent rate-limiting and scaling tiers.
14+
3. **Multi-Currency Support**: By normalizing ROI math to USD in the core `reporting.py` but and converting at the edge in `sales.py`, we maintain architectural simplicity while serving global markets.
15+
16+
**Consequences**:
17+
- All Sales-related logic must reside in `src.api.v1.sales` or `src.agents.prospector`.
18+
- Core reporting utilities in `reporting.py` are extended to support sales outputs (e.g., Executive Briefs) but remain usable by the standard audit flow.
19+
- Increased token usage for sales demos is managed via a dedicated 10 req/min rate limit.

docs/guides/feedback_loop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CommitGuard AI's "Safety Supervisor" monitors all communications. Sometimes, the
99
3. The manager submits feedback (Accept, Reject, or Modify).
1010

1111
## API Integration
12-
To submit feedback via the API, use the `POST /api/v1/feedback/safety` endpoint.
12+
To submit feedback via the API, use the `POST /api/v1/safety/feedback` endpoint.
1313

1414
### Example Request
1515
```json

docs/guides/integrations.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Integration & Pluggability Guide 🔌
2+
3+
CommitVigil is designed with a **"Source-Agnostic"** core. While Slack and Git are the primary supported platforms, the system can be easily extended to any tool that supports Webhooks or REST APIs.
4+
5+
---
6+
7+
## 1. Inbound Ingestion (Incoming Data)
8+
The system can ingest commitments from any source via the `/api/v1/ingest/raw` endpoint.
9+
10+
### Examples:
11+
* **Jira**: Set up a Jira Webhook that triggers on "Issue Commented" and send the comment body to CommitVigil.
12+
* **Linear**: Sync Linear comments to track engineering promises made in task descriptions.
13+
* **Calendly**: Map calendar bookings to commitments (e.g., "I will have the demo ready by the meeting time").
14+
15+
### How to Implement:
16+
Simply call the endpoint with the raw text and a `user_id`:
17+
```bash
18+
curl -X POST "$API_URL/api/v1/ingest/raw?user_id=john_dev&raw_text=I promise to fix the DB by Friday"
19+
```
20+
21+
---
22+
23+
## 2. Outbound Notifications (Interventions)
24+
Currently, CommitVigil uses the `SlackConnector` for follow-ups. However, the architecture is modular.
25+
26+
### Adding a New Tool (e.g., MS Teams or Discord):
27+
1. **Create a Connector**: Add a new file in `src/core/` (e.g., `teams.py`) following the `SlackConnector` pattern.
28+
2. **Update the Worker**: In `src/worker.py`, update the `send_follow_up` function to route messages to your new connector:
29+
30+
```python
31+
# src/worker.py
32+
async def send_follow_up(user_id: str, message: str, slack_id: str | None = None, teams_webhook: str | None = None):
33+
if teams_webhook:
34+
await TeamsConnector.send(message, teams_webhook)
35+
else:
36+
await SlackConnector.send_notification(message, slack_id)
37+
```
38+
39+
---
40+
41+
## 3. The "Tool-Agnostic" Brain
42+
The core reasoning engine (`CommitVigilBrain`) never interacts with Slack or Git directly. It processes **semantic commitments** and returns **behavioral decisions**. This means you can swap the entire communication layer without touching the AI logic.
43+
44+
### Supported Data Formats:
45+
* **JSON API**: For direct application integration.
46+
* **Markdown**: For documentation and PR reviews.
47+
* **HTML**: For executive reporting.
48+
49+
---
50+
51+
## 🚀 Future Golden Paths
52+
* **Jira Adapter**: Automatically close Jira tickets when the "Fulfillment Analysis" confirms the task is done in Git.
53+
* **Email Gateway**: Send "Professional Nudges" via SendGrid for high-context executive summaries.

docs/guides/managers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,9 @@ Managers can now generate high-value, professional audit reports for their team
5151

5252
> [!TIP]
5353
> Use the **Markdown** format for embedding audit summaries directly into GitHub Pull Request comments for collective accountability.
54+
55+
## 6. Sales Enablement & ROI 💰
56+
For leaders justifying the budget for CommitVigil, use the **ROI Calculator**:
57+
58+
* **Projected Savings**: Calculates recovered developer hours based on a 40% reduction in "Engagement Slippage".
59+
* **Executive Briefs**: Generate a one-page HTML summary for your CFO using the `/sales/executive-brief` endpoint.

docs/guides/production.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For large-scale teams, we separate the **Ingestion Layer** (API) from the **Proc
1414

1515
## ☸️ Kubernetes Orchestration
1616

17-
We provide production-ready K8s manifests in [`infra/k8s/`](file:///home/daretechie/DevProject/GitHub/CommitVigil-AI/infra/k8s/).
17+
We provide production-ready K8s manifests in [`infra/k8s/`](file:///home/daretechie/DevProject/GitHub/CommitGuard-AI/infra/k8s/).
1818

1919
### Key Scaling Features:
2020
- **Replica Sets**: Run multiple API instances to handle high traffic.

docs/guides/quickstart.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ docker compose up --build
3131

3232
---
3333

34+
## 🎮 Interactive Demos
35+
See the system in action with these pre-configured scenarios:
36+
37+
### 1. High-Stakes Accountability
38+
Simulates a manager-developer interaction with tone adaptation and safety checks.
39+
```bash
40+
./scripts/demo.sh
41+
```
42+
43+
### 2. Sales Intelligence & ROI
44+
Simulates a prospecting flow with automated scenario generation and multi-currency ROI.
45+
```bash
46+
./scripts/demo_sales.sh
47+
```
48+
49+
---
50+
3451
## 🧪 Quality and Stability
3552
CommitVigil enforces military-grade engineering standards:
3653
- **Mock Mode**: Set `LLM_PROVIDER="mock"` in `.env` to run the entire system with zero token cost.

docs/guides/sales.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Sales Enablement Guide 🚀
2+
3+
CommitVigil isn't just a tool; it's a platform with built-in sales intelligence to help you close enterprise deals.
4+
5+
---
6+
7+
## 1. The "Drift Scenario" Generator
8+
Prospects often don't realize how much "Engagement Slippage" costs them. Use the **Prospecting Agent** to generate industry-specific examples of failed commitments.
9+
10+
### Usage
11+
```bash
12+
curl -X POST "$API_URL/sales/prospect?company_name=AcmeCorp&industry=healthcare"
13+
```
14+
15+
### Output Value
16+
* **Realistic Scenarios**: The AI will generate examples like *"Lead Researcher promised safety data by Friday but no commit was found."*
17+
* **Targeted Role**: It automatically targets the persona (e.g., CTO, VP Eng) relevant to that industry.
18+
19+
---
20+
21+
## 2. Multi-Currency ROI Calculator
22+
Close deals faster by showing the math. The calculator supports `USD`, `EUR`, and `GBP`.
23+
24+
### Usage
25+
```bash
26+
curl -X GET "$API_URL/sales/roi-calculator?team_size=50&avg_salary=120000&currency=EUR"
27+
```
28+
29+
### Key Metrics
30+
* **Annual Savings**: The raw cash value of recovered time.
31+
* **Payback Period**: Usually < 1 month for teams > 10.
32+
* **Efficiency Gain**: The % improvement in delivery velocity.
33+
34+
---
35+
36+
## 3. The Executive Brief (The "Closer")
37+
Generate a premium, glassmorphic HTML one-pager to send as a follow-up after your demo.
38+
39+
### Steps
40+
1. Run the generation command:
41+
```bash
42+
curl -X POST "$API_URL/sales/executive-brief?company_name=BigBank..." > brief.html
43+
```
44+
2. Print to PDF.
45+
3. Email to the Champion/Decision Maker.
46+
47+
---
48+
49+
## 🔒 Internal Use Only
50+
* **Demo Mode**: Ensure `DEMO_MODE=false` in production to use real reasoning.
51+
* **Rate Limits**: The sales endpoints are rate-limited to 10 requests/minute.

docs/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,14 @@ CommitVigil is built on a **Decoupled Event-Driven Architecture**:
2525
- **Redis & ARQ**: Distributed background processing for high-volume orchestration.
2626
- **The Brain**: Multi-agent LLM reasoning loop.
2727
- **PostgreSQL**: Industrial-grade persistence with atomic row-locking for score integrity.
28+
- **Pluggable Connectors**: Source-agnostic design ready for Jira, MS Teams, Linear, and custom CRM integrations.
29+
30+
---
31+
32+
## 💰 Sales Intelligence (ROI)
33+
Calculate the projected savings for a prospective client.
34+
```bash
35+
curl -X 'GET' \
36+
-H 'X-API-Key: YOUR_API_KEY' \
37+
'http://localhost:8000/api/v1/sales/roi-calculator?team_size=50&currency=USD'
38+
```

0 commit comments

Comments
 (0)