REASONTRACE — See Why a Decision Happened
Inspiration
Businesses are increasingly using automated and AI-assisted systems to make decisions, but when something goes wrong, people often see only the final result:
Approved.
Denied.
Escalated.
The difficult question is:
"Why did the system make this decision?"
We wanted to build something that makes the decision itself inspectable.
That led to REASONTRACE, a decision debugger that reconstructs the facts, rules, conditions, evidence, and reasoning behind a business decision — and then lets users change one fact and replay the decision to see exactly what changes.
What REASONTRACE Does
REASONTRACE turns a business decision into an interactive decision trace:
Facts → Rules → Conditions → Evidence → Decision
Users can:
- Inspect the facts used by a decision
- See which rules were triggered
- Follow the decision step-by-step
- Understand why a decision was approved or denied
- Change a single fact
- Replay the same decision deterministically
- Compare the original and simulated outcomes
- See exactly which condition caused the decision to change
- Export a structured decision report
The key interaction is our Counterfactual Replay:
Change one fact → Replay the decision → See exactly what changed.
Our Demo
Our built-in demo uses a fictional company, Acme Services, and a refund request.
A customer purchased a product 43 days ago.
The company's refund policy allows refunds within 30 days.
REASONTRACE evaluates the decision:
43 days → Refund Denied
The user can then open the Counterfactual Simulator and change:
Purchase age: 43 days → 12 days
Without changing anything else, REASONTRACE replays the same decision engine:
12 days → Refund Approved
The application then shows the decision diff:
CHANGED
Purchase age
43 → 12
UNCHANGED
Purchase amount
$1,200 → $1,200
Customer tier
Premium → Premium
Refund policy
30 days → 30 days
DECISION
DENIED → APPROVED
CAUSE
Refund-window condition
How We Built It
We built REASONTRACE as a full-stack TypeScript application.
Frontend
React
Vite
TypeScript
Tailwind CSS
Backend
Node.js
Express
TypeScript
Data & Validation
SQLite
Zod
Testing
Vitest
The architecture is organized around a deterministic decision engine:
User Input
↓
Structured Decision
↓
Facts + Rules
↓
Condition Evaluation
↓
Evidence Graph
↓
Decision Trace
↓
Final Decision
↓
Counterfactual Replay
↓
Decision Diff
The Technical Idea
The most important design decision we made was to keep the decision engine deterministic.
AI can optionally help with tasks such as:
extracting structured facts from natural language
identifying candidate rules
improving explanations
But AI does not control the final decision.
The final decision, rule evaluation, counterfactual replay, and decision diff are handled by our deterministic engine.
This means the same input produces the same result and the core product can run without an AI API key.
Why Counterfactual Replay Matters
A normal explanation tells you:
"The refund was denied because the purchase was outside the refund window."
REASONTRACE goes one step further.
It lets you ask:
"What if the purchase had been made 12 days ago?"
Then it actually re-evaluates the decision and identifies the condition responsible for the change.
This makes REASONTRACE feel less like a chatbot and more like a debugger for business decisions.
Challenges
One of our biggest challenges was designing the system so that explanations could be traced back to actual decision logic rather than generated text.
We also had to make sure that changing one fact did not accidentally change unrelated facts.
For counterfactual replay, we therefore designed the system to:
Preserve the original decision.
Modify only the selected fact.
Re-run the same decision engine.
Compare both execution traces.
Identify the changed rule/condition.
Present the result as a human-readable diff.
Another challenge was making a technically complex process understandable through a simple interface.
We solved this by making the primary workflow:
Analyze → Why? → Change One Fact → Replay → Compare
What We Learned
Building REASONTRACE taught us that explainability is not only about generating a better explanation.
A useful explanation should be connected to the actual process that produced the decision.
We learned how to:
design deterministic rule engines
model decisions as structured data
create evidence relationships between facts and rules
implement counterfactual simulations
compare execution traces
build full-stack TypeScript applications
design technical concepts around a simple user experience
separate optional AI capabilities from the application's source of truth
Business Model
REASONTRACE is designed for organizations that rely on automated or rule-based decisions and need to understand those decisions quickly.
Potential customers include:
Small businesses
Operations teams
Customer support teams
Finance teams
Companies building automated workflows
Proposed pricing
Free
25 decisions/month
Pro — $19/month
Unlimited decision traces
Counterfactual simulations
Decision exports
Business — $79/month
Team workspace
Decision history
API access
Advanced reporting
API
Usage-based pricing for companies integrating decision tracing into their own systems.
These are proposed business-model assumptions for the MVP, not existing revenue claims.
Security & Responsible AI
REASONTRACE treats user-provided information as untrusted input.
The application uses:
Input validation
Size limits
Sanitized output
Safe server-side configuration
No arbitrary code execution
No eval()
No client-side API secrets
AI is optional.
The core decision engine remains deterministic, so an AI model cannot silently override the final decision or counterfactual result.
Built for This Hackathon
We wanted to build something that demonstrates more than an AI-generated interface.
REASONTRACE combines:
A real technical engine
with
an intuitive user experience
and
a practical business model.
The result is a product where a judge can understand the concept in seconds:
A debugger for business decisions.
Change one fact. Replay the decision. See exactly what changed.
Future Vision
The MVP focuses on deterministic business decisions.
Future versions could connect to:
CRM systems
Support platforms
Finance systems
Internal business workflows
AI agents
Automated approval systems
The long-term goal is to make important automated decisions understandable, replayable, and easier to investigate.
## Built with
For Devpost's **Built with** field, use these tags:
**React, TypeScript, Vite, Tailwind CSS, Node.js, Express, SQLite, Zod, Vitest, REST API, AI, Machine Learning, Decision Engine, Data Visualization, SaaS**
I would **not add 25 random tags just to fill the limit**. Relevant tags look more credible.
### One important thing
Don't write **“100% unique,” “first-ever,” or “guaranteed winner”** in the submission. Judges can punish exaggerated claims. Instead, our strongest positioning is:
> **“REASONTRACE is a decision debugger: it doesn't just explain a decision — it lets you change one fact, replay the decision, and see exactly why the outcome changed.”**
That is the sentence I would make the **centerpiece of the entire Devpost submission and 5-minute video**.
Built With
- application
- artificial-intelligence
- data-visualization
- decision-engine
- express.js
- node.js
- react
- rest-api
- saas
- sqlite
- tailwind-css
- typescript
- vite
- vitest
- web
- zod

Log in or sign up for Devpost to join the conversation.