# VERITAS — Canonical Reference Example

Created: 2026-06-21 for Ahmed "Zeyd" Aytac (Boss/Chef)
Context: Idea #7 from a list of 10 AI Defense/Security startup ideas

## What Was Produced

Three files demonstrating the full `technical-product-spec` workflow:

1. **`/DATA/veritas-product-spec.md`** (30 KB, 460 lines)
   - Full product specification in Stripe/Cloudflare documentation style
   - All 18 sections: Executive Summary through Why Now
   - Key wedge: Cross-Cultural Context Model for Turkish/Islamosphere disinformation

2. **`/DATA/veritas-architecture.html`** (21 KB, 351 lines)
   - Dark-themed SVG architecture diagram
   - 7 tiers: Sources → Collection → Kafka Bus → AI Pipeline → Knowledge Store → Production → Delivery
   - Semantic color coding, security boundary, legend, info cards

3. **`/DATA/veritas-website.html`** (61 KB, 1041 lines)
   - Single-file documentation website combining spec + diagram
   - Sticky top nav, all 18 sections, embedded SVG, highlighted wedge section
   - Dark theme (#020617), JetBrains Mono, Stripe/Cloudflare aesthetic

## Key Design Decisions

- **Cross-Cultural Context Model as primary wedge** — visually highlighted with rose-tinted card + "PRIMARY WEDGE" badge
- **Kafka over RabbitMQ** — log-centric system needs replay, partition ordering, high fan-out
- **Neo4j over PostgreSQL for campaign graph** — multi-hop path queries, community detection, native graph storage
- **Mixtral 8x22B / LLaMA-3 70B fine-tunes** for multi-language narrative extraction
- **STIX 2.1 / MISP** for machine-readable intelligence product export

## Workflow Notes

- Spec and diagram were delegated to Kimi K2.7 Code in a single `delegate_task` call
- Website build required a second delegation (first attempt timed out at 600s — file too large for single write)
- Website was built in chunks via `cat >>` terminal append commands to avoid timeout
- All files written to `/DATA/` required `sudo` due to root ownership
- Tunnel: cloudflared quick tunnel (temporary URL) over python3 http.server on port 8766

## Pitfalls Encountered

- **Large HTML file timeout:** Single `write_file` for 60KB+ HTML can cause sub-agent timeout. Solution: build in chunks via terminal append.
- **`/DATA/` permissions:** Root-owned directory requires `sudo` for writes. Always check with `ls -la` first.
- **Cloudflared log extraction:** `process log` needs a few seconds delay before the tunnel URL appears. Don't use `process wait` — it times out.
