brainfile
An open protocol for agent-to-agent task coordination.
Human-in-the-loop compatible. File-system native. MIT licensed.
id: task-12
title: Add rate limiting to API gateway
column: in-progress
assignee: codex
priority: high
relatedFiles:
- src/api/gateway.ts
- src/middleware/auth.ts
contract:
status: in_progress
deliverables:
- path: src/middleware/rateLimiter.ts
- path: src/__tests__/rateLimiter.test.ts
validation:
commands:
- npm test -- rateLimiter
- npm run build
constraints:
- Token bucket algorithm
- Non-blocking async implementation01define
Write a contract as a markdown file in your repo.
02delegate
An agent picks it up, implements, and delivers.
03validate
Automated commands verify the deliverables. Done.
Why files?
Tasks live in your repo. Git history is your audit trail. No database, no API, no vendor lock-in.
Why contracts?
Informal "please do X" breaks down at scale. Structured deliverables and validation commands make agent output verifiable.
Why a protocol?
Tools change. Claude, Cursor, Copilot, the next thing. A protocol survives all of them.
Integrations are optional adapters. The protocol comes first.