Harbor
A legal-risk check for the moment a manager hears something they were never trained to hear.
- Status
- Demo stage. Open source under the MIT license.
- Stack
- TypeScript, Next.js, pnpm monorepo, Vitest
- Tests
- 190 passing across 5 packages
- Links
- Live demo · Source code
The problem
An employee tells their manager, “I have anxiety and I need flexible hours.” Under the Americans with Disabilities Act, that can be a request for a reasonable accommodation, even though the employee never used those words. Most frontline managers don't know that.
What the manager says next (“we can't do that, it wouldn't be fair to the team”) can become evidence in an EEOC charge. A general-purpose chatbot doesn't help. Ask it, and it will happily draft a reply that creates more exposure.
What I built
Trigger detection first
189 trigger phrases flag ADA, FMLA, FLSA, Title VII, and retaliation triggers in the manager's own description, plus two safety patterns (self-harm and violence) that escalate right away. They run before anything else, on the manager's own words.
The same four steps, every time
Name the trigger. List the phrases not to say and the law behind each one. Give a compliant first response. Route the case to HR. The shape never changes, so managers learn it.
A privacy layer that fails closed
Names, birth dates, Social Security numbers, contact details, and medical details become tokens right after trigger detection, so retrieval and generation only see tokens. If a name or other identifier from the manager's text shows up in a response, the gate blocks it and the case goes to HR.
An output scanner that can't be tricked easily
Every generated response is checked for legal-advice framing and advisory phrases before it appears. The scanner first normalizes look-alike Cyrillic letters, zero-width characters, and HTML entities, so those tricks can't sneak a phrase through.
Deterministic from end to end
No language model and no API key. Retrieval is keyed to the detected trigger, and the answer is assembled from 7 company policy sections and 8 federal sources, so the same question always gets the same answer. A seven-node Corrective RAG graph runs it on a custom 81-line executor (no LangGraph), with at most three re-retrievals, two regenerations, and 12 calls.
Every failure hands off
Too many loops, no usable citations, a blown budget, a failed dependency, or a failed compliance gate: each one routes the case to a person instead of guessing.
How it fits together
Shaded steps are the guardrails. Every step is deterministic code with no language model, and any step can send the case to HR instead of continuing.
Screenshot

Results so far
- 190
automated tests passing, including bypass attempts with look-alike characters and hidden characters.
- MIT
license. Anyone can read exactly how the guardrails work.
- 8
trigger patterns: six legal, two safety. Each one sets an HR notification flag.
Not built yet
- Name detection uses a list of common first names plus nearby cue words (“my employee”), so an unusual name with no cue word nearby can slip past the tokenizer.
- Training mode (role-play practice with scoring) is designed, not built.
- HR notification is flagged in every triggered response; sending the notification is not wired up yet.
- The tamper-proof audit trail and the encrypted vault are designed, not built.
- Citation grading passes by construction, since every citation is copied from its source. A grader for free-written text is not built.