Inspiration
I am an international student. For me, as for almost anyone else in my position, it was really hard to adapt to the decentralized American web portals while filling out university or immigration documents.
Information is scattered across dozens of domains. Requirements are often buried in lengthy documents. One form leads to another, and sometimes a seemingly simple decision depends on rules published somewhere completely different.
That experience was drastically different from the unified government portals in my home country, Kazakhstan.
It made me wonder: how could we actually unify such portals without sacrificing the transparency and careful consideration that the American system places so much emphasis on?
I decided not to mess with the portals themselves, but to go one level higher: build a layer above them.
During my research, I stumbled upon projects like the Claude browser extension, which are great and pretty universal. But handling liability and sensitive workflows was never their primary purpose.
There are several reasons why I saw this as a problem. First, using a cloud-based AI assistant can require processing sensitive information through external servers. Second, Claude is a probabilistic model, while handling bureaucracy often requires a deterministic approach.
So I decided to use an LLM as a semantic layer for data extraction, feeding structured information into my own deterministic decision-making engine.
What It Does
Bureaucracy Slayer is a decision-support layer for complex web portals.
Instead of asking an AI agent to navigate a website and decide what to do next, Bureaucracy Slayer takes a different approach: it extracts the rules governing a process, evaluates them through a deterministic engine, and builds a personalized action plan.
For example, a banking portal might contain different account requirements, eligibility criteria, restrictions, and exceptions scattered across its interface.
A conventional AI assistant might summarize those requirements and recommend an account. Bureaucracy Slayer attempts to go further: it translates the relevant rules into structured conditions and evaluates them against the user's circumstances.
The result is not just an AI-generated answer. It is an explainable decision supported by source evidence.
The system can:
- Extract structured policies from web pages, including eligibility requirements, prohibitions, exceptions, and dependencies.
- Evaluate conditions deterministically instead of relying on an LLM to make the final decision.
- Distinguish between true, false, and unknown, preventing missing information from automatically becoming permission.
- Generate dependency-aware action plans, accounting for prerequisites and the order in which steps need to be completed.
- Preserve evidence and provenance, allowing users to trace conclusions back to the original source.
- Personalize decisions based on user-provided facts without asking an LLM to improvise the underlying logic.
The goal is not to replace government, university, banking, or immigration websites.
It is to make their existing rules easier to understand, navigate, and apply.
How We Built It
The core architectural decision was to separate semantic interpretation from decision-making.
Large language models are exceptionally useful for understanding unstructured information, but their outputs are probabilistic. Bureaucracy Slayer uses Claude for structured extraction while keeping policy evaluation and planning inside a separate deterministic TypeScript engine.
The architecture follows a multi-stage pipeline.
1. Browser-Based Collection
The system uses Playwright to collect information from web pages within a bounded browsing workflow.
Rather than letting an autonomous agent freely interact with a website, the collector captures page content and relevant action references for subsequent analysis.
This creates a controlled boundary between observing a website and deciding what actions should be taken.
2. Structured Semantic Extraction
Collected information is passed to Claude, which extracts a structured representation of the underlying procedure.
The extraction process identifies elements such as:
- Requirements and eligibility conditions
- Prohibited actions and exceptions
- Dependencies between steps
- Evidence supporting individual rules
- Information that still needs to be provided by the user
- Rules requiring additional review
One of the most difficult engineering problems was designing the output contract.
A deeply nested representation of logical conditions proved inconvenient for reliable structured model output. I introduced a flatter intermediate representation and a deterministic converter that reconstructs the actual condition tree.
This allows the model-facing schema to remain relatively simple while preserving the richer internal structure needed by the decision engine.
3. Validation and Provenance
A syntactically valid LLM response is not necessarily a trustworthy interpretation.
To address this, the system validates extracted data against strict contracts before allowing it into the decision engine.
The validation pipeline checks structural consistency, references to the collected source material, supported condition types, and the integrity of the reconstructed policy model.
Malformed structures, unsupported references, and other validation failures are rejected rather than silently accepted.
However, provenance validation alone cannot establish that an LLM correctly understood the meaning of a source. A model can cite the correct passage while interpreting it incorrectly.
That distinction became one of the most important lessons of the project.
4. Deterministic Policy Evaluation
Once the structured policy passes validation, Claude is no longer responsible for deciding what the user is allowed or required to do.
The policy evaluator is implemented in TypeScript and supports logical conditions such as all, any, not, and individual fact checks.
Unlike ordinary Boolean evaluation, it uses three-valued logic:
- True: the available facts establish that a condition is satisfied.
- False: the available facts establish that it is not satisfied.
- Unknown: there is insufficient information to determine the result.
This distinction is essential for sensitive workflows.
If a banking requirement depends on information the user has not provided, the system should not simply assume that the requirement is satisfied.
It should identify the uncertainty and explain what information is missing.
5. Dependency-Aware Planning
Understanding eligibility is only part of navigating bureaucracy.
A procedure may contain multiple steps that depend on one another. Completing one action may require finishing several prerequisites first.
Bureaucracy Slayer represents these relationships through a dependency graph and uses a deterministic planner to determine the relevant sequence of steps.
The planner considers evaluated conditions, prerequisites, and unresolved requirements when generating guidance.
This transforms extracted rules into a practical plan rather than an isolated summary.
6. Interactive Interface
I built a minimal React and Vite interface to demonstrate the complete workflow.
The application connects page collection, structured extraction, validation, deterministic evaluation, and personalized guidance into a single experience.
For the hackathon demonstration, I used a simulated banking portal to test how the system handles financial rules and user-specific decisions.
The MVP deliberately remains guidance-only. It does not automatically submit sensitive forms, initiate financial transactions, or perform irreversible actions.
This is a deliberate architectural boundary, not simply a missing feature.
Technical Challenges and Solutions
Beyond the personal challenges of building the project, several engineering problems shaped the final architecture.
Structured output reliability. Complex recursive condition schemas created difficulties at the model boundary. I addressed this by introducing a flat intermediate data structure and a deterministic reconstruction process, separating model-output constraints from the internal policy representation.
Evidence versus interpretation. I discovered that correctly formatted JSON and genuine citations do not guarantee semantically correct rules. This led to stricter extraction contracts, stronger validation, and explicit treatment of uncertain or unsupported interpretations.
Safe handling of missing information. Binary logic was not sufficient for eligibility decisions involving incomplete user information. Three-valued evaluation allows the system to preserve uncertainty rather than converting it into an unjustified positive result.
Separating responsibilities. Instead of building one large agent responsible for everything, I divided the system into components with explicit contracts: collection, extraction, validation, evaluation, planning, and presentation.
This separation made the architecture easier to reason about, test independently, and extend without allowing the LLM to silently take over the responsibilities of the deterministic engine.
Challenges I Ran Into
My biggest challenge, however, wasn't technical.
I found three guys through the HackHarvard portal, and everything seemed great. I tried to explain my idea beforehand, and everyone agreed. Or so I thought.
Without giving it a second thought, we proceeded to the live event.
As it turned out, our priorities didn't match. I wanted to compete in the main track with an ambitious project, while my teammates wanted to increase their chances of winning something by pursuing sponsor tracks.
I tried not to think too much of it because I was open to any option that seemed technically interesting.
However, the conversation quickly went in the wrong direction.
In the blink of an eye, it was already 6 PM. We had reached no consensus and hadn't even started working on the project.
What's worse, I had to leave for my linear algebra midterm.
From the very beginning, my plan had been to determine the architecture and pipelines before the exam so that everyone could work in parallel while I was away.
When I finished my exam, I found out that they still hadn't decided on an idea.
So I faced a tough decision: trust my team to figure things out, or take matters into my own hands and bring them up to speed afterward.
I decided to go with the second option.
Working through the night, using two Cursor agents and Codex simultaneously, I built an end-to-end demo, only to arrive at the Treehouse and find out that my team had fallen apart.
That was honestly something I never expected.
But then again, I had already built an end-to-end scenario all by myself.
So why couldn't I just keep going, refuse to give up, and submit the project on my own?
What's Next
The hackathon MVP demonstrates the foundation, but the broader idea is much larger.
My next priorities are improving semantic validation, expanding compatibility with real-world portals, and developing more reliable ways to detect when website changes invalidate previously extracted rules.
I also want to explore a browser-extension interface that could make the system available directly on the websites people already use.
Longer term, the architecture could support university admissions, immigration procedures, government services, banking, insurance, and other workflows where misunderstanding a requirement can have real consequences.
The ultimate vision is a universal interface for navigating fragmented institutions without replacing the institutions themselves.
Bureaucracy Slayer is not about making AI more confident in its answers. It is about making the reasoning behind those answers inspectable, structured, and constrained by evidence.
Built With
- anthropic-api
- claude
- node.js
- playwright
- react
- typescript
- vite