Inspiration

AI agents become more useful when they understand a company's work. But giving every agent the entire company knowledge base creates a problem: an intern should not see executive strategy, and one client team should not receive another client's confidential brief.

I built Clearance to explore a practical question: How can a software factory share company knowledge while giving each agent only the information it is authorized to use?

What it does

Clearance demonstrates one fictional consulting firm, one shared company brain, and five workers with different permissions. Together, they produce two working proposal calculators for separate clients.

The demo makes four behaviors visible:

  • Different access to shared knowledge. The same executive document is denied to an intern profile and allowed to a chief-of-staff profile. Higher clearance still does not grant access to an unrelated client's brief.
  • Precise human approvals. A pricing worker can request one read of a particular restricted document version. Approval expires, is consumed once, and leaves the worker's baseline clearance unchanged.
  • Traceable contributions. A visual graph connects documents, workers, and generated outputs, showing which sources actually entered each worker's context.
  • Restrictions on delivery. Generated artifacts inherit their sources' restrictions. Clearance permits delivery to the authorized internal partner audience and refuses public delivery through its delivery gate.

The outputs are interactive software. Changing a proposal's discount recalculates its fees and margin, and flags proposals that need review.

How I built it

I used Next.js, React, and TypeScript for the application, labeled Markdown documents for the synthetic company brain, and SQLite to record workers, approvals, source admissions, and artifacts.

HydraDB retrieves relevant source IDs. The application checks each result against authoritative local scope and clearance labels before admitting document content into a worker's model context. Search relevance alone never grants permission.

Five separate model conversations handle design, two client engagements, pricing, and commercial-policy review. They generate structured contributions, which a trusted compiler validates and assembles into the proposal calculators. This keeps generation bounded and the resulting calculations testable.

The interface is hosted on Vercel, connected through an authenticated tunnel to the persistent orchestrator. I also used ElevenLabs to generate narration for the walkthrough.

Challenges I faced

The hardest part was preserving information boundaries throughout the workflow: retrieval, model context, contribution assembly, and delivery.

Clearance and client scope had to remain independent. An approval needed to unlock a specific task without becoming a general promotion. Combining contributions also required carrying source restrictions forward into the final artifact.

Making those decisions understandable was another challenge. I added the source graph, permission comparisons, explicit approval details, and a visible delivery refusal so viewers could see why work continued or stopped.

What I learned

  • Useful autonomy depends on precise access. Workers can collaborate without all receiving the same context.
  • Permission to read and permission to distribute are separate decisions. An authorized input can still produce an output that must remain restricted.
  • Expiring access does not erase knowledge. Once a document enters a worker's context, removing future access does not make that worker forget it.
  • A working output makes the boundary meaningful. The calculators demonstrate useful work completed under constraints, alongside the denied actions.

What I am proud of

The prototype combines real retrieval, live model calls, scoped approval, working calculators, and visible policy decisions in one demonstration. I verified policy behavior, grant consumption and expiry, calculator boundaries, and delivery restrictions through automated checks and real application runs.

What's next

I want to explore broader software-generation tasks, stronger worker isolation, and recovery for long-running approval workflows.

Today, this is a prototype using fictional data and separate worker histories within one application process. It does not provide VM isolation or control a downloaded artifact after it leaves Clearance. Boat and Temporal were explored separately; neither is part of the demonstrated application.

Share the brain. Isolate the context.

Built With

  • claude-code
  • codex
  • eleven-labs
  • hydrodb
  • vercel
Share this project:

Updates

Submission history