Inspiration
Decision making in organizations is often messy: notes in emails, slack threads, teams, outlook and documents with no clear audit trail. When AI is involved, its hard to see what it influenced and what humans overrode. I built Decision Trace to turn that chaos into structured, auditable records - so teams can show how decisions were made, what evidence supported them, and who was accountable.
I was inspired by a simple but critical gap: teams can easily state what they decided, but struggle to explain why, especially weeks or months later. This lack of traceability creates risk, weakens accountability, and makes it hard to learn from past decisions.
What it does
Decision Trace turns unstructured decision content into Decision Ledgers - audit ready reports that capture:
- Decision - Outcome, confidence, trace score (0-100), rationale.
- Flow - Steps with actor (AI/Human/System), AI Influence, overrides, rules.
- Evidence - What was used, weight, and impact on confidence.
- Risks - Identified, accepted, severity, mitigation
- Assumptions - Explicit, Validated, Owner, Invalidation Impact.
- Accountability - RACI (Responsible, Accountable, Consulted, Informed).
You upload PDF/DOCX/TXT, click Run Gemini 3 Analysis, and get a 6 tab report. Demo mode works without an API key so anyone can try it.
How I built it
- Frontend: Next.js 14 (App router), React 18, Tailwind CSS
- AI: Google Gemini 3 with structured JSON output and schema enforcement.
- Backend: Next.js API routes, Prisma (PostgreSQL/SQLite), Supabase for report storage.
- Flow: Upload the document -> Run Gemini 3 Analysis -> Report
- Gemini: Single call Decision Ledger generation with responseMimeType: application/json and system instructions for audit semantics
- Testing: Vitest (unit/integration), Playwright (E2E), GitHub Actions CI
Challenges I ran into
- Structured Output: Getting Gemini to return valid JSON for a complex schema. I fixed this with responseMimeType: application/json, a JSON schema, and strict system instructions.
- Demo Mode: Making the app usable without an API key. I added mock responses and a deterministic demo case so judges can try it immediately.
- E2E Stability: Flaky tests around navigation and readiness. I added clear status markers (qs-upload-ok) and deterministic readiness checks.
Accomplishments that I am proud of
- Schema enforced AI output: Decision Ledger is validated against a JSON schema before use.
- Audit semantics: Actor (AI/Human/System), AI influence, and overrides are tracked per step.
- Zero cost demo: Works fully without an API key on free tiers (Vercel, Neon, Supbase, Gemini).
- Test Coverage: Unit, Integration, and E2E tests with mocked Gemini and CI.
What I learned
- Structured Output: Using responseMimeType and JSON schema with Gemini makes responses reliable and parseable.
- System Instructions: Clear, specific instructions (ex: actor enums, required fields) improve consistency.
- Demo first design: Designing for demo mode first makes the app easier to try and judge.
- Deterministic E2E: Readiness and status markers reduce flakiness in automated tests.
What's next for Decision Trace
- Real-time collaboration: Multiple users editing and annotating the same decision ledger.
- Export formats: PDF and word reports for compliance and sharing.
- Integrations: Slack, Microsoft teams, and document storage (ex: one drive, google drive) for input and output.
- Historical Comparison: Compare decisions over time and track how similar cases were handled.
- Custom Schemas: Let organizations define their own Decision Ledger fields and workflows.
- Enterprise Style UI: Report layout and styling suitable for compliance and governance.
Built With
- css3
- gemini
- googleai
- javascript
- json
- mammoth
- neon
- node.js
- playwright
- postgresql
- prisma
- react
- sql
- sqlite
- supabase
- tailwind
- typescript
- vercel
- vitest
- zod
Log in or sign up for Devpost to join the conversation.