feat(brain): @mosaic/brain structured data service (#11)
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #11.
This commit is contained in:
40
docs/scratchpads/brain-service.md
Normal file
40
docs/scratchpads/brain-service.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Scratchpad: @mosaic/brain Structured Data Service
|
||||
|
||||
**Issue:** #10
|
||||
**Branch:** feat/brain-service
|
||||
**PRD:** jarvis-brain/docs/planning/MOSAIC-BRAIN-MEMORY-PRD.md
|
||||
|
||||
## Objective
|
||||
|
||||
Implement @mosaic/brain as a Fastify service exposing structured data (tasks, projects, events, missions, etc.) via MCP + REST with JSON file backend.
|
||||
|
||||
## Plan
|
||||
|
||||
1. [x] Add brain data types to @mosaic/types
|
||||
2. [ ] Scaffold packages/brain/ with Fastify + MCP SDK
|
||||
3. [ ] Implement JSON file storage adapter with locking
|
||||
4. [ ] Implement collections: tasks, projects, events, agents, tickets, appreciations, missions, mission_tasks
|
||||
5. [ ] Implement MCP tools (query + mutation + mission)
|
||||
6. [ ] Implement REST API (mirrors MCP)
|
||||
7. [ ] Bearer token auth middleware
|
||||
8. [ ] brain_today computed endpoint
|
||||
9. [ ] brain_stale, brain_stats, brain_audit, brain_search, brain_graph
|
||||
10. [ ] Dockerfile + docker-compose
|
||||
11. [ ] Tests
|
||||
12. [ ] Code review
|
||||
13. [ ] Commit, push, PR, merge
|
||||
|
||||
## Progress
|
||||
|
||||
- 2026-03-10: Issue #10 created, branch created, starting implementation
|
||||
|
||||
## Risks
|
||||
|
||||
- Types package already has `Task`/`TaskStatus`/`TaskPriority` for queue — need namespacing
|
||||
- Large implementation surface — focus on core CRUD first, computed endpoints second
|
||||
|
||||
## Decisions
|
||||
|
||||
- Brain types exported from `@mosaic/types` under `Brain` prefix to avoid queue type conflicts
|
||||
- JSON storage uses one file per collection
|
||||
- In-memory index rebuilt on startup
|
||||
Reference in New Issue
Block a user