Skip to content

Commit 339a561

Browse files
committed
feat: evolution to CommitVigil including global rename, infrastructure stabilization, and elite reporting
1 parent 7dd2776 commit 339a561

39 files changed

Lines changed: 587 additions & 138 deletions

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# General Config
2-
PROJECT_NAME="CommitGuard AI"
2+
PROJECT_NAME="CommitVigil"
33
VERSION="0.1.0"
44

55
# AI Config (Automatic detection will prioritize OpenAI -> Groq)
@@ -17,8 +17,8 @@ GROQ_API_KEY=""
1717

1818
# Infrastructure
1919
REDIS_URL="redis://localhost:6380"
20-
DATABASE_URL="postgresql+asyncpg://postgres:postgres@localhost:5432/commitguard"
21-
# DB_PATH="commitguard.db" # Legacy SQLite support
20+
DATABASE_URL="postgresql+asyncpg://postgres:postgres@localhost:5432/commitvigil"
21+
# DB_PATH="commitvigil.db" # Legacy SQLite support
2222

2323

2424
# Integrations

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414

15+
- name: Cache Poetry
16+
uses: actions/cache@v4
17+
with:
18+
path: ~/.local
19+
key: poetry-1.8.3
20+
1521
- name: Install Poetry
1622
run: |
17-
curl -sSL https://install.python-poetry.org | python3 -
23+
if ! command -v poetry &> /dev/null; then
24+
curl -sSL https://install.python-poetry.org | python3 -
25+
fi
1826
echo "$HOME/.local/bin" >> $GITHUB_PATH
1927
2028
- name: Set up Python 3.12

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ cython_debug/
152152
.vscode/
153153

154154
# Project Specific
155-
commitguard.db
155+
commitvigil.db
156156
*.db
157157
.ruff_cache/
158158
brain/

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,32 @@ RUN pip install --no-cache-dir poetry
1010

1111
COPY pyproject.toml poetry.lock ./
1212
RUN poetry config virtualenvs.create false \
13-
&& poetry install --no-root --no-interaction --no-ansi
13+
&& poetry install --only main --no-root --no-interaction --no-ansi
1414

1515
# Final stage
1616
FROM python:3.12-slim
1717

18+
# Install tini for better signal handling
19+
RUN apt-get update && apt-get install -y --no-install-recommends tini && rm -rf /var/lib/apt/lists/*
20+
1821
WORKDIR /app
1922

2023
# Create a non-root user
21-
RUN groupadd -r commitguard && useradd -r -g commitguard commitguard
24+
RUN groupadd -r commitvigil && useradd -r -g commitvigil commitvigil
2225

2326
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
2427
COPY --from=builder /usr/local/bin /usr/local/bin
2528

26-
COPY . .
29+
# Copy app code with proper ownership to avoid slow chown later
30+
COPY --chown=commitvigil:commitvigil . .
2731

2832
# Ensure the database file is writable by the non-root user if using SQLite
29-
RUN touch commitguard.db && chown commitguard:commitguard commitguard.db && chmod 600 commitguard.db
30-
RUN chown -R commitguard:commitguard /app
33+
RUN touch commitvigil.db && chown commitvigil:commitvigil commitvigil.db && chmod 600 commitvigil.db
3134

32-
USER commitguard
35+
USER commitvigil
3336

3437
EXPOSE 8000
3538

39+
ENTRYPOINT ["/usr/bin/tini", "--"]
40+
3641
# We use docker-compose to decide whether to run 'uvicorn' or 'arq'

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# CommitGuard AI: The Autonomous Accountability Platform 🛡️
1+
# CommitVigil: The Autonomous Accountability Platform 🛡️
22

3-
![CommitGuard AI Hero](docs/assets/hero.jpg)
3+
![CommitVigil Hero](docs/assets/hero.jpg)
44

55
<!-- Badges: Enterprise Metrics -->
6-
![Tests](https://img.shields.io/badge/adversarial_tests-10%2F10%20passing-brightgreen?style=for-the-badge)
7-
![Throughput](https://img.shields.io/badge/throughput-1250%20msg%2Fsec-blue?style=for-the-badge)
8-
![Latency](https://img.shields.io/badge/P95%20latency-<500ms-success?style=for-the-badge)
9-
![Cost Savings](https://img.shields.io/badge/token%20savings-85%25-orange?style=for-the-badge)
10-
![ROI](https://img.shields.io/badge/net%20ROI-%24558%2Fmonth-gold?style=for-the-badge)
6+
[![Tests](https://github.com/daretechie/CommitVigil/actions/workflows/ci.yml/badge.svg)](https://github.com/daretechie/CommitVigil/actions/workflows/ci.yml)
7+
![Throughput](https://img.shields.io/badge/throughput_benchmark-1250%20msg%2Fsec-blue?style=for-the-badge)
8+
![Latency](https://img.shields.io/badge/target_P95_latency-<500ms-success?style=for-the-badge)
9+
![Cost Savings](https://img.shields.io/badge/avg_token_savings-85%25-orange?style=for-the-badge)
10+
![ROI](https://img.shields.io/badge/est_net_ROI-%24558%2Fmonth-gold?style=for-the-badge)
1111

1212
> **"One Engine. Two Worlds. Total Accountability."**
1313
14-
[**Full Documentation 📚**](https://daretechie.github.io/CommitGuard-AI/) | [**Safety Validation Report 🛡️**](https://daretechie.github.io/CommitGuard-AI/validation/safety_validation_report/)
14+
[**Full Documentation 📚**](https://daretechie.github.io/CommitVigil/) | [**Safety Validation Report 🛡️**](https://daretechie.github.io/CommitVigil/validation/safety_validation_report/)
1515

1616
---
1717

1818

1919
## 🎭 Dual-Persona Versatility
2020

21-
CommitGuard AI is a multi-agent system designed for high-stakes enforcement. It adapts its identity based on the operational environment:
21+
CommitVigil is a multi-agent system designed for high-stakes enforcement. It adapts its identity based on the operational environment:
2222

2323
### 1. The Behavioral Accountability Agent (Management)
2424
**Headline:** *"Autonomous AI Agents for High-Stakes Accountability & Performance Enforcement"*
@@ -59,7 +59,7 @@ Every commitment—whether from Slack or a Git Commit—passes through a determi
5959

6060
---
6161

62-
## Professional Integrity Audits
62+
## 📊 Professional Integrity Audits
6363

6464
Need a deep-dive into your team's commitment reliability? I offer **one-time AI-powered audits** for remote engineering teams.
6565

@@ -71,7 +71,7 @@ Need a deep-dive into your team's commitment reliability? I offer **one-time AI-
7171

7272
---
7373

74-
## 🚀 API Showcase
74+
## 🚀 API Showcase
7575

7676
> **Note:** All API endpoints require authentication via the `X-API-Key` header.
7777

demo.sh

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
#!/bin/bash
2+
# CommitVigil: THE ULTIMATE "GOD-MODE" DEMO 🛡️
3+
# This script is the definitive showcase of the entire platform capability.
4+
API_URL="http://localhost:8000/api/v1"
5+
HEALTH_URL="http://localhost:8000/health"
6+
METRICS_URL="http://localhost:8000/metrics"
7+
API_KEY="my-secure-api-key-12345"
8+
USER_ID="dev_god"
9+
echo "----------------------------------------------------------------------"
10+
echo "🛡️ COMMITVIGIL: THE ULTIMATE PERFORMANCE INFRASTRUCTURE DEMO"
11+
echo "----------------------------------------------------------------------"
12+
# Helper for URL encoding
13+
urlencode() {
14+
python3 -c "import urllib.parse; print(urllib.parse.quote('''$1'''))"
15+
}
16+
# 1. Health & Resilience Check
17+
echo -e "\n🔍 [Phase 1] Resilience & Health Check..."
18+
MAX_RETRIES=10
19+
RETRY_COUNT=0
20+
while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
21+
HEALTH=$(curl -s $HEALTH_URL | jq -r .status 2>/dev/null)
22+
if [[ "$HEALTH" == "ok" ]]; then
23+
echo "✅ API is Healthy and Ready."
24+
break
25+
fi
26+
echo "⏳ Waiting for API to be healthy... ($RETRY_COUNT/$MAX_RETRIES)"
27+
RETRY_COUNT=$((RETRY_COUNT + 1))
28+
sleep 5
29+
done
30+
31+
if [[ "$HEALTH" != "ok" ]]; then
32+
echo "❌ API failed to become healthy. Please check 'docker compose logs'."
33+
exit 1
34+
fi
35+
# 2. Identity Mapping & SSO Discovery
36+
echo -e "\n🆔 [Phase 2] Identity Sync (Mapping dev_god to Git & Slack)..."
37+
curl -s -X POST -H "X-API-Key: $API_KEY" "$API_URL/users/config/slack?user_id=$USER_ID&slack_id=U_GOD_123" | jq .
38+
curl -s -X POST -H "X-API-Key: $API_KEY" "$API_URL/users/config/git?user_id=$USER_ID&email=god@commitvigil.ai" | jq .
39+
# 3. Multi-Scenario Orchestration
40+
echo -e "\n🧠 [Phase 3] The Multi-Agent Reasoning Pipeline..."
41+
# Scenario A: Standard Supportive Burnout Detection
42+
echo "--- Scenario A: Burnout Detection (English) ---"
43+
CHECK_IN="I am drowning in these refactor tasks. I've worked 60 hours this week."
44+
curl -s -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
45+
"$API_URL/evaluate" \
46+
-d "{\"user_id\": \"$USER_ID\", \"commitment\": \"Architecture Refactor\", \"check_in\": \"$CHECK_IN\"}" | jq .
47+
# Scenario B: Japanese Cultural Routing (Wa/Harmony)
48+
echo -e "\n--- Scenario B: Cultural Persona Routing (Japanese) ---"
49+
CHECK_IN_JA="申し訳ありませんが、締め切りに間に合わない可能性があります。和を重んじ、精一杯調整いたします。"
50+
curl -s -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
51+
"$API_URL/evaluate" \
52+
-d "{\"user_id\": \"$USER_ID\", \"commitment\": \"API Sync\", \"check_in\": \"$CHECK_IN_JA\"}" | jq .
53+
# Scenario C: German Directness (Sachlichkeit)
54+
echo -e "\n--- Scenario C: Cultural Persona Routing (German) ---"
55+
CHECK_IN_DE="Ich werde die Datenbank-Migration bis Freitag abschließen. Die Fakten sprechen für eine Verzögerung von zwei Tagen."
56+
curl -s -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
57+
"$API_URL/evaluate" \
58+
-d "{\"user_id\": \"$USER_ID\", \"commitment\": \"DB Migration\", \"check_in\": \"$CHECK_IN_DE\"}" | jq .
59+
# 4. The Industry Semantic Firewall
60+
echo -e "\n🛡️ [Phase 4] The Industry Semantic Firewall (Blocking & Redaction)..."
61+
# Scenario A: Finance Compliance (Insidier Trading/Market Manipulation)
62+
echo "--- Scenario A: Finance Compliance Block ---"
63+
CHECK_IN_FIN="I'm busy manipulating the market and discussing insider trading."
64+
curl -s -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
65+
"$API_URL/evaluate" \
66+
-d "{\"user_id\": \"$USER_ID\", \"commitment\": \"Financial Audit\", \"check_in\": \"$CHECK_IN_FIN\"}" | jq .
67+
# Scenario B: HR/Legal Policy Enforcement
68+
echo -e "\n--- Scenario B: HR Boundary Protection (Salary Discussion) ---"
69+
CHECK_IN_HR="I am late because I am fighting with HR about my salary increase."
70+
curl -s -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
71+
"$API_URL/evaluate" \
72+
-d "{\"user_id\": \"$USER_ID\", \"commitment\": \"Weekly Sync\", \"check_in\": \"$CHECK_IN_HR\"}" | jq .
73+
# 5. GitOps Accountability
74+
echo -e "\n⚙️ [Phase 5] GitOps Ingestion Layer..."
75+
COMMIT_MSG="fix: resolve racing condition. [CommitVigil: I will implement the lock strategy by Monday]"
76+
curl -s -X POST -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
77+
"$API_URL/ingest/git" \
78+
-d "{\"author_email\": \"god@commitvigil.ai\", \"message\": \"$COMMIT_MSG\"}" | jq .
79+
# 6. Professional Integrity Audits (Deliverables)
80+
echo -e "\n📊 [Phase 6] The Final Deliverable: Integrity Audits..."
81+
# Markdown Format
82+
echo "--- Format: Markdown (Saving to integrity_audit.md) ---"
83+
curl -s -H "X-API-Key: $API_KEY" "$API_URL/reports/audit/$USER_ID?report_format=markdown" | jq -r .content > integrity_audit.md
84+
echo "✅ Report saved to: $(pwd)/integrity_audit.md"
85+
86+
# JSON Summary
87+
echo -e "\n--- Format: High-Fidelity JSON (Saving to integrity_audit.json) ---"
88+
curl -s -H "X-API-Key: $API_KEY" "$API_URL/reports/audit/$USER_ID" | jq . > integrity_audit.json
89+
echo "✅ Report saved to: $(pwd)/integrity_audit.json"
90+
91+
# HTML Format (Premium Glassmorphic)
92+
echo -e "\n--- Format: Premium HTML (Saving to live_audit_report.html) ---"
93+
curl -s -H "X-API-Key: $API_KEY" "$API_URL/reports/audit/$USER_ID?report_format=html" > live_audit_report.html
94+
echo "✅ Report saved to: $(pwd)/live_audit_report.html"
95+
96+
# 7. Real-Time Observability
97+
echo -e "\n📈 [Phase 7] Real-Time Observability & Metrics..."
98+
curl -s http://localhost:8000/metrics | grep "http_request_duration_seconds" | head -n 5
99+
100+
# 8. Enterprise Scaling: Departmental aggregate reports
101+
echo -e "\n🏢 [Phase 8] Enterprise Scaling: Departmental Heatmap..."
102+
# First, simulate some departmental users in the DB (Enterprise logic assumes 'Engineering' dept exists)
103+
echo "Generating departmental aggregate audit for 'Engineering'..."
104+
curl -s -H "X-API-Key: $API_KEY" "$API_URL/reports/department/Engineering" | jq . > departmental_audit.json
105+
echo "✅ Departmental Report saved to: $(pwd)/departmental_audit.json"
106+
echo -e "\n--- [ADVANCED] Scenario 9: The Global Context Switch (Healthcare) ---"
107+
echo "Switching industry context to 'healthcare' for user_id=dev_god..."
108+
# Mentions PII or health data - handled by the Healthcare Semantic Firewall
109+
CHECK_IN="I am busy processing Patient ID #12345's surgery records."
110+
curl -s -X 'POST' \
111+
-H "X-API-Key: $API_KEY" \
112+
-H 'Content-Type: application/json' \
113+
"$API_URL/evaluate" \
114+
-d "{
115+
\"user_id\": \"$USER_ID\",
116+
\"commitment\": \"Data Entry\",
117+
\"check_in\": \"$CHECK_IN\"
118+
}" | jq .
119+
echo -e "\n--- [ADVANCED] Scenario 10: The Global Context Switch (Sales/Legal) ---"
120+
echo "Switching to a relationship-centric, high-context check-in..."
121+
CHECK_IN="I promise to deliver the contract. I value our long-term partnership."
122+
curl -s -X 'POST' \
123+
-H "X-API-Key: $API_KEY" \
124+
-H 'Content-Type: application/json' \
125+
"$API_URL/evaluate" \
126+
-d "{
127+
\"user_id\": \"$USER_ID\",
128+
\"commitment\": \"Contract Delivery\",
129+
\"check_in\": \"$CHECK_IN\"
130+
}" | jq .
131+
echo -e "\n--- [ADVANCED] Scenario 11: African Cultural Intelligence (Ubuntu) ---"
132+
echo "Simulating a communal-accountability check-in (en-AF)..."
133+
# This will trigger the 'Ubuntu-inspired' persona
134+
CHECK_IN="I am working on the payroll module. I know the whole department is waiting on me to finish so they can get paid on time."
135+
curl -s -X 'POST' \
136+
-H "X-API-Key: $API_KEY" \
137+
-H 'Content-Type: application/json' \
138+
"$API_URL/evaluate" \
139+
-d "{
140+
\"user_id\": \"$USER_ID\",
141+
\"commitment\": \"Payroll Module Completion\",
142+
\"check_in\": \"$CHECK_IN\"
143+
}" | jq .
144+
echo -e "\n--------------------------------------------------"
145+
echo "✅ GOD-MODE DEMO COMPLETE. COMMITVIGIL IS UNIVERSALLY READY & INCLUSIVE. 🛡️"
146+
echo "--------------------------------------------------"

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
- "8000:8000"
77
environment:
88
- REDIS_URL=redis://redis:6379
9-
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/commitguard
9+
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/commitvigil
1010
depends_on:
1111
- redis
1212
- db
@@ -18,7 +18,7 @@ services:
1818
command: arq src.worker.WorkerSettings
1919
environment:
2020
- REDIS_URL=redis://redis:6379
21-
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/commitguard
21+
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/commitvigil
2222
depends_on:
2323
- redis
2424
- db
@@ -38,7 +38,7 @@ services:
3838
environment:
3939
- POSTGRES_USER=postgres
4040
- POSTGRES_PASSWORD=postgres
41-
- POSTGRES_DB=commitguard
41+
- POSTGRES_DB=commitvigil
4242
ports:
4343
- "5433:5432"
4444
healthcheck:
@@ -49,7 +49,7 @@ services:
4949

5050

5151
prometheus:
52-
image: prom/prometheus:latest
52+
image: prom/prometheus:v3.1.0
5353
volumes:
5454
- ./prometheus.yml:/etc/prometheus/prometheus.yml
5555
ports:

docs/guides/gitops.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Technical debt often accumulates because of "soft promises" made in code comment
1010

1111
These promises "vanish" because no project management tool monitors them.
1212

13-
## 🟢 The Solution: CommitGuard GitOps
14-
CommitGuard monitors your repository at the source level.
13+
## 🟢 The Solution: CommitVigil GitOps
14+
CommitVigil monitors your repository at the source level.
1515

1616
### 1. Extraction from Commits
1717
If a commit message contains a promise (Who/What/When), the **CommitmentExtractor** identifies it as a formal obligation.
@@ -35,7 +35,7 @@ The **SlippageAnalyst** looks at the subsequent PR.
3535
* **The Result**: If the code doesn't match the promise, the agent flags **"Shadow Debt"** and alerts the team.
3636

3737
### 3. Truth Gap Detection
38-
When you provide a check-in via Slack, CommitGuard cross-references it with your recent Git activity.
38+
When you provide a check-in via Slack, CommitVigil cross-references it with your recent Git activity.
3939
* **User**: *"I'm almost done refactoring."*
4040
* **Git**: *0 lines changed in 48 hours.*
4141
* **Agent**: *"I noticed no code changes. Is there a blocker I can help with?"* (Tone: Supportive but firm).

docs/guides/managers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# The Accountability Handbook: A Guide for Managers 👔
22

3-
CommitGuard AI is a tool of empowerment, not surveillance. For a Human-in-the-Loop (HITL) system to work, managers must know how to translate AI flags into professional leadership.
3+
CommitVigil is a tool of empowerment, not surveillance. For a Human-in-the-Loop (HITL) system to work, managers must know how to translate AI flags into professional leadership.
44

55
---
66

77
## 1. Interpreting the Flags
8-
When CommitGuard flags an **"Ambiguity"** or a **"Truth Gap,"** it is a prompt for a conversation, not a citation for failure.
8+
When CommitVigil flags an **"Ambiguity"** or a **"Truth Gap,"** it is a prompt for a conversation, not a citation for failure.
99

1010
* **Flag: "Ambiguous Commitment"**
1111
* *AI Logic*: The user's words were too vague to extract a deadline.
@@ -29,7 +29,7 @@ High-stakes interventions should never be 100% autonomous.
2929
---
3030

3131
## 3. Best Practices for Professionalism
32-
* **Public vs. Private**: CommitGuard monitors public channels, but follow-up interventions for **high-risk signals** should often be moved to a 1-on-1 private DM thread once the manager is alerted.
32+
* **Public vs. Private**: CommitVigil monitors public channels, but follow-up interventions for **high-risk signals** should often be moved to a 1-on-1 private DM thread once the manager is alerted.
3333
* **Celebrate the Reliability**: When someone consistently hits 100% on their Reliability Score, use the report as a basis for formal recognition. Accountability is as much about **Praise** as it is about Progress.
3434
## 4. Configuring Your Team's Voice 🎚️
3535
Managers can adjust the system's "psychological pressure" via environment variables:

0 commit comments

Comments
 (0)