Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Computer architecture

Computer adopts the official Eve software-factory pattern while keeping Wazoo-specific identity, credentials, and memory boundaries.
Computer is Wazoo's general assistant for the whole team, and it adopts the official Eve software-factory pattern for engineering work while keeping Wazoo-specific identity, credentials, and memory boundaries. The factory described below covers Computer's engineering path, not the whole of its job.

## Runtime

Expand All @@ -27,6 +27,21 @@ The result is a draft pull request. Merge and ready-for-review actions are inten
- `agent/lib/github/session-attachment.ts` attaches a verified repository to sessions that no GitHub event started, through the `x-computer-repository` header or the deployment default.
- `agent/lib/github/approver-login.ts` resolves a chat session's approval to a verified GitHub login from the approver-team roster, and `preflight` proves the roster is readable.

## Agent File projection

`agents/@wazootech/computer/computer.af` is the generated, importable declaration of this agent layer. It is a projection, not a source of truth: `scripts/export-agent-file.ts` reads the compiled manifest (`.eve/agent-summary.json`), the declaration (`agent/agent-file-declaration.json`), and the authored tool bindings, and writes the file. Nothing generated is ever read back into `agent/`.

The same exporter projects **Data's** file in *source mode*, where there is no eve build to read: `agents/data/agent/instructions.md` is the prompt, and `agents/data/agent/agent-file-declaration.json` names the GitHub tools Data may call — the read half only. Names are declared; descriptions and the read/write class still come from the SDK, so the two agents cannot disagree about what a tool is. Data's file is committed here and published to `wazootech/data/agents/@wazootech/data/data.af`: this repository's CI is the drift guard for both copies.

- **The system prompt is exported verbatim** from the compiled instructions. A reworded or truncated prompt fails the export rather than shipping a file that describes an agent nobody runs.
- **Memory blocks are allowlisted, block by block.** `persona` and `scope` publish; `factory_brain`, `user_preferences`, `run_history`, and `intake_state` export schema-only and each states why it stays private. An undeclared block, or a private block carrying a value, fails the export. Messages and credentials are always empty.
- **The tool surface is derived, not declared.** `agent/tools/github__*.ts` bind the `@github-tools/sdk` factories through `defineDynamic`, so they never appear in the compiled manifest; the projection enumerates those binding files and resolves each one's description and read/write class from the installed SDK's type declarations. A bound tool with no resolvable description stops the export, so the surface cannot silently shrink. Parameter schemas are not projected — TypeScript tool code does not run on another framework — so each tool carries `schema_fidelity: declared` plus `source_path` and `source_repository` pointers.
- **Channels, subagents, schedules, sandboxes, approval tiers, and hooks have no `.af` counterpart** and stay eve-only. Approval policy is tiered and risk-scaled, so it is carried as the per-tool `write` flag rather than flattened into `default_requires_approval`.
- **The model is declared, then checked.** `llm_config` is declared in the same file as the blocks, and the export cross-checks the declared handle against the model the compiled manifest actually runs, so a model change cannot leave the published declaration behind.
- **Skills export whole.** Each `agent/skills/*/SKILL.md` ships with its content and a source URL; the other eve surfaces have no counterpart.

`pnpm run export:agent-file` and `pnpm run export:data-agent-file` regenerate the two files; `pnpm run check:agent-file` and `pnpm run check:data-agent-file` fail when a committed file is out of date, which is the guard against hand edits. CI builds the manifest, then runs both checks. Export behavior is covered by `lib/agent-file.test.ts` (schema validity, byte stability, privacy, and integrity) and `lib/github-tool-catalog.test.ts` (surface completeness, description extraction, and the write/approval split).

## Memory boundary

Computer-specific curated memory and redacted run records use Vercel Blob for the first factory implementation. Reserved namespaces prevent generic file tools from reading or overwriting factory brain and run records. A follow-up issue tracks optional synchronization to the private `wazootech/computer-memory` repository; that integration is not part of this factory adoption.
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,23 @@ jobs:
run: pnpm test

# The build compiles the authored app into eve's manifest (channel routes,
# tool registry). Typecheck and unit tests cannot see that layer, and it
# takes seconds. `agent/channels/eve.ts` refuses to resolve without a
# trusted host, so the build runs with development values.
# tool registry) and the committed .af files are projected from that
# manifest, so one build feeds both. Typecheck and unit tests cannot see
# that layer, and it takes seconds. `agent/channels/eve.ts` refuses to
# resolve without a trusted host, so the build runs with development
# values.
- name: Build eve app
run: pnpm run build:eve
env:
NODE_ENV: development
BETTER_AUTH_SECRET: ci-only
VERCEL_APP_CLIENT_ID: ci-only
VERCEL_APP_CLIENT_SECRET: ci-only

# The .af files are generated artifacts: regenerate them from source and
# fail on any diff, so a committed projection cannot drift from what the
# agent actually does.
- name: Agent files are regenerated from source
run: |
pnpm run check:agent-file
pnpm run check:data-agent-file
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ eve deploy --non-interactive --yes [--project <name-or-id>]

A setup may report `eve link` as a prerequisite; run it, then retry the continuation. When a completed setup event has `deploymentRequired: true`, run the `next` command it reports.

## Regenerate the agent file after agent changes

`agents/@wazootech/computer/computer.af` is generated from this agent's source. After changing instructions, tools, skills, or `agent/agent-file-declaration.json`, run `pnpm build:eve` then `pnpm export:agent-file`, and commit the result. Never hand-edit the `.af`; `pnpm check:agent-file` fails when it drifts.

## Validate the change

Run the validation the task requests. When it does not establish the behavior you changed, run the narrowest relevant check.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<em>Wazoo's operating computer for turning direction into shipped work.</em>
</p>

Computer is Wazoo's operational AI partner, modeled after the Enterprise computer from *Star Trek: The Next Generation*. It runs on [eve](https://eve.dev), speaks through an authenticated web chat, and routes software work through a supervised factory pipeline.
Computer is Wazoo's operational AI partner: the general assistant the whole team shares, modeled after the Enterprise computer from *Star Trek: The Next Generation*. It runs on [eve](https://eve.dev) and speaks through an authenticated web chat. Engineering is the one domain it runs as a supervised factory pipeline.

## Factory pipeline

Expand Down Expand Up @@ -166,4 +166,18 @@ pnpm build
pnpm build:eve
```

## Agent File

`agents/@wazootech/computer/computer.af` is the generated [Agent File](https://github.com/letta-ai/agent-file) declaration of Computer's agent layer, and `agents/@wazootech/data/data.af` is Data's, projected from its source under `agents/data/agent/` ([#72](https://github.com/wazootech/computer/issues/72), [#73](https://github.com/wazootech/computer/issues/73)). Both are produced from source and never hand-edited:

```bash
pnpm build:eve # Computer's projection reads the compiled manifest
pnpm export:agent-file # regenerate computer.af
pnpm check:agent-file # fail if the committed file is out of date
pnpm export:data-agent-file # regenerate data.af (source mode: no eve build yet)
pnpm check:data-agent-file
```

The files carry the system prompt verbatim, the allowlisted memory blocks, and the bound tool surface; see [`.github/ARCHITECTURE.md`](.github/ARCHITECTURE.md) for what is deliberately left out. Data's published copy lives in `wazootech/data` under the same gallery path, and this repository's CI is what keeps the two from drifting: regenerate here, then copy the file across.

The factory evals are under `evals/`. Full-pipeline evals can create branches and consume model tokens, so run them only against a disposable target repository.
Loading
Loading