Transaction Review Service#33
Open
NicoleWiktor wants to merge 15 commits intoautomationExamples:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transaction Review Service: Spec-Driven Backend
Summary
This PR implements a backend service that evaluates transactions and decides whether to approve, review, or reject them based on a set of predefined criteria.
The focus of this implementation was to build a system that is clear, testable, and structured around a spec-driven development workflow.
Approach
I began by using ChatGPT to structure the system design and define the overall architecture, including:
From there, I created a
SPECS/directory and wrote out each feature before implementation.Once the specs were defined, I used GPT-5.3 Codex within the Cursor IDE to assist with implementing features, including:
This allowed me to stay focused on system design and correctness while using AI as a tool to accelerate development. I also focused on keeping the system easy to reason about by separating validation from decision logic and using deterministic rules, which made testing and debugging straightforward.
The decision engine is implemented as a deterministic, rule-based system that produces both a decision and structured reasoning, making the behavior testable and easy to extend.
What's Included
POST /transactions- submit and evaluate a transaction against predefined decision criteriaapproved,review, orrejectedoutcomes with structured reasoningAdditional endpoints:
GET /transactions- list all transactionsGET /transactions?decision=...- filter by decisionGET /transactions/{transaction_id}- retrieve a specific transactionGET /transactions/summary- aggregate decision countsGET /- health checkTesting
The test suite covers:
Notes