Project Config & Activity — Per-Repository Settings and Collaboration Awareness
2026-03-24
Project Config & Activity
What We Built
Two new sub-resource endpoints on the existing /v1/projects/:id resource:
POST /v1/projects/:id/config— Per-project configuration: default model, daily budget, routing strategy, guardrails, conventions, protected paths, team members, and cost centerGET /v1/projects/:id/activity— Collaboration awareness: active sessions on a project within a time window, showing who is working, what they're doing, and cost so far
Additionally:
GET /v1/projects/:id/config— Retrieve saved configPOST /v1/projects/:id/activity— Report session activity to a project
Why It Matters
When multiple brainstorm instances work on the same project, they need:
- Consistent configuration — team-wide model selection, budget limits, and guardrails synced through BR
- Collaboration awareness — see what other instances are doing to avoid conflicts and coordinate
This is the foundation for team-level brainstorm orchestration.
Lockstep Traceability
| Surface | Status | Files |
|---|---|---|
| API | Implemented | src/api/routes/projects.ts |
| SDK-TS | Implemented | packages/sdk-ts/src/resources/projects.ts, packages/sdk-ts/src/index.ts |
| SDK-PY | Implemented | packages/sdk-py/src/brainstormrouter/resources/projects.py |
| MCP | Implemented | src/mcp/server.ts, src/mcp/tool-manifest.ts |
| Tests | Implemented | src/api/routes/projects-config.test.ts |
| CLI | N/A | No CLI commands needed |
| GTM | N/A | Internal API |
| Dashboard | N/A | Future feature |
Key Design Decisions
- In-memory stores (MVP pattern consistent with phases 041-044) — config and activity stored in Maps keyed by
{tenantId}:{projectId} - Config is upsert-only — POST replaces entire config, no partial merge (simple, predictable)
- Activity has time window filtering —
?since=1hor?since=30mformat, default 1 hour - Activity includes reporting endpoint —
POST /v1/projects/:id/activityso sessions can push their status - Tenant-scoped — both stores keyed by tenantId to prevent cross-tenant data leaks