agentleFS
airweave-aiairweave-ai/airweave/.cursor/rules/arf.mdc

airweave / rules

Cursor rule6.6k starsChanged 8 months agoMITArchived repositoryView on GitHub

Raw entity capture for replay, debugging, and evals. ArfService is injected into ArfHandler via EntityDispatcherBuilder. Capture happens during action dispatch (INSERT/UPDATE entities stored, DELETE entities removed). The ArfHandler lives in platform/sync/handlers/arf.py.

The file

Files
arf.mdc
---
alwaysApply: false
---
# Airweave Raw Format (ARF)

Raw entity capture for replay, debugging, and evals.

## Structure

```
raw/{sync_id}/
├── manifest.json          # Sync metadata
├── entities/{id}.json     # One file per entity
└── files/{id}_{name}      # Binary files (optional)
```

## Key Files

- **StoragePaths**: `domains/storage/paths.py` (path constants: `arf_sync_path`, `arf_entity_path`, `safe_filename`)
- **ArfService**: `domains/arf/service.py` (write operations during sync, implements `ArfServiceProtocol`)
- **ArfReader**: `domains/arf/reader.py` (entity reconstruction for replay, implements `ArfReaderProtocol`)
- **ArfReplaySource**: `domains/arf/replay_source.py` (internal source for ARF replay)
- **Protocols**: `domains/arf/protocols.py` (`ArfServiceProtocol`, `ArfReaderProtocol`)
- **Fakes**: `domains/arf/fakes/` (in-memory test doubles: `FakeArfService`, `FakeArfReader`)
- **StorageBackend protocol**: `domains/storage/protocols.py` (injected into ArfService/ArfReader)
- **Storage adapters** (FYI): `adapters/storage/` (Filesystem, Azure Blob, AWS S3, GCP GCS)
- **Config**: `STORAGE_BACKEND` (filesystem, azure, aws, gcp)

## Usage

`ArfService` is injected into `ArfHandler` via `EntityDispatcherBuilder`. Capture happens during action dispatch (INSERT/UPDATE entities stored, DELETE entities removed). The `ArfHandler` lives in `platform/sync/handlers/arf.py`.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.