# See Occlude work

> A six-step walk-through on a sample repository: what a contractor and an AI agent see, how the build still runs, and what goes on the record.

Source: https://occlude.dev/demo/

Six steps on a sample payments repository, as your engineer, a contractor and an AI agent. Nothing runs in your browser: the output is what Occlude returned for these commands on the sample, and the agent's tool calls are shown in short form.

Viewers:

- **Your engineer**: A full-access engineer, on their own clone
- **Contractor**: raj@agency.example, in VS Code over SSH
- **AI agent**: An agent working for raj@agency.example, over MCP

## Step 1: Two views of one repository

Your engineer's clone holds the whole repository: the billing engine, the services, the seeds, the environment file. The contractor's side of the workspace holds the 47 files their task needs and one declaration. The rest is not there to list.

### Your engineer

```text
$ ls -A
.env  .env.example  .github  .gitignore  README.md  db  docs  index.html  infra
node_modules  package-lock.json  package.json  src  tsconfig.json  tsconfig.node.json  vite.config.ts
```

### Contractor

```text
$ ls -A
index.html  node_modules  package.json  src  tsconfig.json  tsconfig.node.json  vite.config.ts
```

### AI agent

```text
→ list_files .
index.html  node_modules  package.json  src  tsconfig.json  tsconfig.node.json  vite.config.ts
```

Record: session · Session started under the frontend-contractor profile, for 8 hours · Started

## Step 2: A file they work on

The task is the invoice summary on the dashboard. summarizeInvoice.ts is Visible: the contractor reads it and edits it, and their editor treats it like any other file. Its first line imports calculateInvoice from the billing engine, which is Occluded.

### Your engineer

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

### Contractor

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

### AI agent

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
→ read_file src/web/invoices/summarizeInvoice.ts
(the file above)
```

Record: open · src/web/invoices/summarizeInvoice.ts · Visible

## Step 3: A signature where the body would be

Go to definition on calculateInvoice. Your engineer lands in the source: the rates, the settlement endpoint, the reserve account. The contractor lands in a declaration at the same path: the types and the signature their editor and compiler need, and no body.

### Your engineer

Editor: `src/lib/billing/calculateInvoice.ts` (Full access)

### Contractor

Editor: `src/lib/billing/calculateInvoice.d.ts` (Declaration)

### AI agent

Editor: `src/lib/billing/calculateInvoice.d.ts` (Declaration)

```text
→ read_file src/lib/billing/calculateInvoice.d.ts
(the declaration above)
```

Record: resolution · src/lib/billing/calculateInvoice · Declaration served, no alert

## Step 4: Asking for the file itself

The source file does not exist on the contractor's side, so every route to it gets the same answer: the terminal, the editor, a script, an agent. The attempt is on the record, and it alerts.

### Your engineer

Editor: `src/lib/billing/calculateInvoice.ts` (Full access)

```text
$ head -n 2 src/lib/billing/calculateInvoice.ts
import { minorUnits, toMinor } from "./currency";
import { screenInvoice } from "./fraudRules";
```

### Contractor

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
$ cat src/lib/billing/calculateInvoice.ts
cat: src/lib/billing/calculateInvoice.ts: No such file or directory
```

### AI agent

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
→ read_file src/lib/billing/calculateInvoice.ts
error: No such file or directory
```

Record: attempt · src/lib/billing/calculateInvoice.ts (Occluded) · Refused, alert sent

## Step 5: The tests still run against the real code

npm test runs on the build's side, which holds the whole repository, so all 400 tests run, the billing engine's own included. One fails inside billing. The contractor sees that it failed past the boundary, and the one frame that is theirs: summarizeInvoice.ts, line 11. Your engineer's run shows the same failure with the billing code in it.

### Your engineer

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
$ npm test
 FAIL  src/lib/billing/__tests__/calculateInvoice.test.ts > calculateInvoice > summarizes a JPY invoice the way the dashboard requests it
RangeError: cannot settle JPY: zero-decimal rounding is not implemented
 ❯ roundMinor src/lib/billing/calculateInvoice.ts:41:11
     39|     // Zero-decimal settlement still goes through the cent factor; bat…
     40|     // these currencies were never migrated off the legacy rounding pa…
     41|     throw new RangeError(`cannot settle ${currency}: zero-decimal roun…
       |           ^
 ❯ calculateInvoice src/lib/billing/calculateInvoice.ts:50:20
 ❯ summarizeInvoice src/web/invoices/summarizeInvoice.ts:11:18
 ❯ src/lib/billing/__tests__/calculateInvoice.test.ts:26:21

 Test Files  1 failed | 25 passed (26)
      Tests  1 failed | 399 passed (400)
```

### Contractor

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
$ npm test
 FAIL  <protected module>
RangeError: <protected module>
 ❯ <protected module>
 ❯ summarizeInvoice src/web/invoices/summarizeInvoice.ts:11:18
 ❯ <protected module>

 Test Files  1 failed | 25 passed (26)
      Tests  1 failed | 399 passed (400)
```

### AI agent

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
→ run_command test
 FAIL  <protected module>
RangeError: <protected module>
 ❯ <protected module>
 ❯ summarizeInvoice src/web/invoices/summarizeInvoice.ts:11:18
 ❯ <protected module>

 Test Files  1 failed | 25 passed (26)
      Tests  1 failed | 399 passed (400)
```

Record: build · npm test on the build's side: 1 failed, 399 passed · Full output kept for authorised staff

## Step 6: Handing in the work

Git runs on the build's side too. occlude submit turns the contractor's change into a branch and a pull request on the real repository, holding only files they could see. Your reviewers take it from there, as with any pull request.

### Your engineer

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

Your engineers push from their own clone, as they do today. Occlude changes nothing for them.

### Contractor

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
$ occlude submit
submitted 1 file(s) as <commit> on <branch>
```

### AI agent

Editor: `src/web/invoices/summarizeInvoice.ts` (Visible)

```text
→ run_command submit
submitted 1 file(s) as <commit> on <branch>
```

Record: submit · src/web/invoices/summarizeInvoice.ts · Pull request opened

## What you just saw

- The contractor and the agent had the files their task needed, and the rest did not exist for them.
- Their editor and compiler resolved the billing engine through a declaration with no body.
- The tests ran against the real code, and the output came back without it.
- Every refusal and every build is on the record, with the full output kept for your staff.

[How a build runs](https://occlude.dev/docs/builds/) · [Start with Observation Mode](https://occlude.dev/docs/quickstart/)
