1093 Commits
Author SHA1 Message Date
Renn F 31c776b84a - roboco/api/schemas/sessions.py - Added SessionTaskInfo model and task_links field to SessionResponse
- roboco/api/routes/sessions.py - Updated list_sessions to load task links with task titles
2025-12-23 07:16:17 +01:00
Renn F 829c0309f5 Changes Made:
/roboco/roboco/mcp/message_server.py:
- Renamed _get_or_create_session → _get_active_session
- Removed auto-creation of sessions - now returns error instead
- Added helpful error guidance when no session exists:

"NO_ACTIVE_SESSION"
"No active session in this channel. Sessions are created by PMs for tasks."

Guidance:
1. Include task_id in your message call if working on a task (routes to task's session)
2. If no task session exists, ask your PM to create one using roboco_session_create_for_tasks
3. All work communication should happen within task sessions

What This Enforces

1. Only PMs can create sessions using roboco_session_create_for_tasks (already enforced by can_create_tasks())
2. Agents MUST provide task_id when sending messages to route to the task's session
3. If no session exists → agents get clear guidance instead of auto-creating chaos
4. No more "Session 750c51e7" with 0-1 messages - sessions will be intentionally created and managed
2025-12-23 05:22:37 +01:00
Renn F 1753f5c9e6 Improved workflow. Ready for git, figma, etc; AND BIGGER TESTS 2025-12-23 04:39:46 +01:00
Renn F b7611c24fc feat(sessions): Session-Task linking with scoped context management
Major feature: Sessions are now linked to tasks with smart routing and context loading, ensuring agents have proper discussion context.

## Session-Task Relationship (Many-to-Many)
  - Added SessionTaskTable junction table linking sessions to tasks
  - Sessions can link to multiple tasks, tasks can have multiple sessions
  - is_primary flag marks the main discussion session for a task
  - relationship_type: discussion, planning, review, retrospective
  - Subtasks auto-inherit parent task's session

## BACKLOG Status + Activation Flow
  - Tasks now created with BACKLOG status (not PENDING)
  - PMs must create session BEFORE activating task
  - roboco_task_activate() transitions BACKLOG → PENDING
  - Prevents race condition where dev starts before session exists
  - Flow: CREATE (backlog) → SESSION → ACTIVATE (pending) → spawn

## Session Scopes
  - SessionScope enum: initiative, cell, task
  - initiative: Cross-cell coordination (Main PM, #dev-all)
  - cell: Cell-specific work (Cell PM default)
  - task: Individual task execution (dev level)
  - Enables future smart context loading by scope

## Message Routing to Task Sessions
  - When task_id provided in roboco_message_send(), routes to task's primary session instead of channel's active session
  - New API endpoint: GET /sessions/for-task/{task_id}
  - TaskResponse now includes linked sessions array

## Dev Session Access
  - New tool: roboco_session_history_for_task(task_id)
  - Devs can now see their task's discussion history
  - Messages tagged with task_id for filtering

## Communication Guidelines
  - Added "When to Post / When NOT to Post" to all 9 agent blueprints
  - Devs/QA/Doc should use task tools for status, journal for reasoning
  - Sessions reserved for coordination that needs response
  - Reduces noise: no "Starting work" or "Made progress" chat messages

Files changed:
  - DB: SessionTaskTable, SessionScope column
  - Services: messaging.py (linking), task.py (activation)
  - MCP: 5 new session tools, message routing update
  - API: session-task endpoints, TaskResponse sessions
  - Blueprints: All 13 updated with session/activation workflow
2025-12-22 18:04:31 +01:00
Renn F 4e06bdb842 BIG REFACTORING: Making everything scalable, maintanable, modularized, code quality, separation of concerns, etc. 2025-12-22 04:30:50 +01:00
Renn F dfa8077484 Agents (backend cell at least) are able to receive a full task, break it down into smaller tasks, work on them, qa verify them, document them, pm verify them; and that's it. Completed task. 2025-12-21 20:11:29 +01:00
Renn F 5d71f2fe9d 1. roboco/mcp/utils.py - Created shared utilities:
- ApiClient class with connection pooling and automatic header injection
    - ApiResponse wrapper with .ok, .is_status(), .json() methods
    - get_agent_headers(), format_error_response(), resolve_agent_uuid()
2. roboco/mcp/schemas/__init__.py - Added new input schemas:
    - TaskBlockInput (groups blocker parameters)
    - TaskPauseInput (groups pause parameters)
3. Refactored all 4 MCP servers:
    - journal_server.py - Uses shared ApiClient
    - notify_server.py - Uses shared ApiClient
    - message_server.py - Uses shared ApiClient
    - task_server.py - Uses shared ApiClient, reduced argument count with dataclasses
2025-12-21 03:20:13 +01:00
Renn F b04993d8b8 Improved workflow and task lifecycle 2025-12-21 03:09:12 +01:00
Renn F 3122d2759e Remove tasks directory 2025-12-21 00:20:32 +01:00
Renn F 42b4ed6187 Enhanced blueprints, workflow and minor fixes 2025-12-20 23:39:07 +01:00
Renn F eb9109a855 Static agents IDs 2025-12-19 17:13:54 +01:00
Renn F a3058e9e02 fix(mcp): resolve agent authentication and journal routing issues
- Add X-Agent-Team header to all MCP servers (journal, task, message, notify)
The permission system uses (role, team) tuple for channel access lookup.
Without team, lookup returned empty list causing "Channel not found" errors.

- Standardize header case to X-Agent-ID (uppercase) matching frontend

- Reorder journal routes: /me/* endpoints now defined before /{agent_id}/*
FastAPI was matching /me/entries as /{agent_id}/entries with agent_id="me"
causing "Agent not found: me" errors

- Fix journal search returning empty results:
- optimal.py: Pass chunk.metadata to SearchResult instead of empty dict
- journal.py: Read entry_id from result.metadata instead of parsing contentfix(mcp): resolve agent authentication and journal routing issues

- Add X-Agent-Team header to all MCP servers (journal, task, message, notify)
The permission system uses (role, team) tuple for channel access lookup.
Without team, lookup returned empty list causing "Channel not found" errors.

- Standardize header case to X-Agent-ID (uppercase) matching frontend

- Reorder journal routes: /me/* endpoints now defined before /{agent_id}/*
FastAPI was matching /me/entries as /{agent_id}/entries with agent_id="me"
causing "Agent not found: me" errors

- Fix journal search returning empty results:
- optimal.py: Pass chunk.metadata to SearchResult instead of empty dict
- journal.py: Read entry_id from result.metadata instead of parsing content
2025-12-18 19:07:50 +01:00
Renn F eed29cdf4a Fixes + Cleanup 2025-12-18 03:29:08 +01:00
Renn F 9f008e5362 Fixed MCP connection and other MCP issues + API fixes 2025-12-18 00:32:54 +01:00
Renn F 405944f36a Fixed agent-orchestrator init and token bburn mitigation plan 2025-12-16 22:04:24 +01:00
Renn F 20366f20be Fixed journal resolution of UUIDs to slugs 2025-12-16 19:28:38 +01:00
Renn F 0e0eda8809 Summary: Backend-Frontend Alignment Complete
I've completed the foundational alignment work between the backend (roboco) and frontend (roboco-panel) to prepare for implementing the PLAN.md. Here's what was done:

Backend Changes (roboco)

1. Enhanced TaskResponse Schema (roboco/api/schemas/tasks.py)
- Added nested response models: ProgressUpdateResponse, CheckpointResponse, CommitRefResponse, SubTaskResponse, TaskPlanResponse
- TaskResponse now includes:
- plan: TaskPlanResponse | None
- checkpoints: list[CheckpointResponse]
- progress_updates: list[ProgressUpdateResponse]
- commits: list[CommitRefResponse]
- auditor_notes: str | None
- Added TaskSummaryResponse for lightweight list views

2. Updated Route Converter (roboco/api/routes/tasks.py)
- Added conversion functions: _convert_plan(), _convert_checkpoints(), _convert_progress_updates(), _convert_commits()
- Updated _to_response() to populate all new fields

Frontend Changes (roboco-panel)

1. Updated Types (src/types/index.ts)
- Added task supporting types: ProgressUpdate, Checkpoint, CommitRef, SubTask, TaskPlan
- Updated Task interface with all new fields
- Changed priority from Priority enum to number (0-3)
- Added Journal types: Journal, JournalEntry, JournalEntryCreate, JournalStats, GrowthMetrics
- Added Auditor types: AuditorFlag, AuditorReport, AuditorDashboard, TeamHealth, CEOOverview

2. Created Journals API Client (src/lib/api/journals.ts)
- Complete CRUD for journals and entries
- Convenience endpoints: addTaskReflection, addDecisionLog, addLearning, addStruggle, addNote
- Analytics: getMyStats, getMyGrowthMetrics
- Search: searchEntries

3. Enhanced Dashboard API Client (src/lib/api/dashboard.ts)
- Added Auditor endpoints: getAuditorDashboard, getAuditorFlags, createAuditorFlag, resolveAuditorFlag, getAuditorReports, createAuditorReport, sendAuditorReport
- Added CEO detail endpoints: getCeoTeamDetails, getCeoBlockerDetails, getCeoVelocity
- Added additional Kanban endpoints: getKanbanDocumenter, getKanbanCellPm, getKanbanBoard, getKanbanStats

4. Created Journals Hooks (src/hooks/use-journals.ts)
- Query hooks: useMyJournal, useJournalByAgent, useMyJournalEntries, useJournalEntry, useMyJournalStats, useMyGrowthMetrics, useSearchJournalEntries
- Mutation hooks: useCreateJournalEntry, useDeleteJournalEntry, useAddTaskReflection, useAddDecisionLog, useAddLearning, useAddStruggle, useAddNote

5. Enhanced Dashboard Hooks (src/hooks/use-dashboard.ts)
- Added CEO hooks: useCeoTeamDetails, useCeoBlockerDetails, useCeoVelocity, useRecentActivity, useAgentStatus
- Added Kanban hooks: useKanbanDocumenter, useKanbanCellPm, useKanbanBoard, useKanbanStats
- Added Auditor hooks: useAuditorDashboard, useAuditorFlags, useAuditorReports, useCreateAuditorFlag, useResolveAuditorFlag, useCreateAuditorReport, useSendAuditorReport

6. Fixed Existing Components
- Updated kanban/page.tsx to use numeric priorities with proper labels (P0-P3)
- Updated create-task-dialog.tsx to use numeric priority selection

What's Ready for PLAN.md Implementation

The foundation is now in place for implementing the PLAN.md phases:

| Component             | Status | Notes                              |
|-----------------------|--------|------------------------------------|
| Task Detail Page      | Ready  | Backend now returns full task data |
| Agent Journal Page    | Ready  | API client and hooks complete      |
| Auditor Dashboard     | Ready  | API client and hooks complete      |
| Role-Specific Kanban  | Ready  | All endpoints available            |
| CEO Overview Enhanced | Ready  | Team details, velocity, blockers   |
2025-12-16 01:35:06 +01:00
Renn F 856d2ea9f8 Fixing permissions for chats 2025-12-15 23:51:19 +01:00
Renn F fe2f7f7595 Fix communications for frontend 2025-12-15 20:59:31 +01:00
Renn F a8df78fa3e Fixing CORS 2025-12-15 20:04:50 +01:00
Renn F 65f52a2dcc Fixed some minor issues with tags and CORS 2025-12-15 16:52:12 +01:00
Renn F 9fb0b9c9e2 Fixed OptimalAPI init 2025-12-15 03:10:08 +01:00
Renn F d16d678cdc Small fixes 2025-12-15 02:35:20 +01:00
Renn F f67a96403b Fixed MCP servers communication + other minor updates 2025-12-15 02:13:20 +01:00
Renn F 54c0a41055 Improved Orchestrator is now Smarter and cost-efficient/effective. MCPs still unreachable 2025-12-15 00:26:28 +01:00
Renn F bc9cd7575d V0 finally out 2025-12-14 22:05:34 +01:00
Renn F 348795c50b Finished reorganization 2025-12-14 03:40:48 +01:00
Renn F 855536eb18 Code cleanup + Best practices + Separation of concerns 2025-12-14 01:09:57 +01:00
Renn F ee1d54ac90 + Semgrep + Deptry 2025-12-13 18:09:23 +01:00
Renn F ccd949c5c1 + Radon + Xenon + Pip-Audit + Bandit + Safety 2025-12-13 17:50:47 +01:00
Renn F 2e865ccb12 + Bandit 2025-12-13 13:44:57 +01:00
Renn F 79be4bbf36 + Vulture + pre-commit hooks setup 2025-12-13 13:43:25 +01:00
Renn F 4f1d59987f ++ 2025-12-13 13:25:37 +01:00
Renn F 9e7d9e81e2 Fixed pyproject.toml 2025-12-13 05:53:19 +01:00
Renn F 35ef0108e9 All MyPy and Ruff checked 2025-12-13 05:50:34 +01:00
Renn F a2424be80c Blueprint alignment 2025-12-13 00:00:52 +01:00
Renn F 316325625c TOON Optimizations 2025-12-12 18:08:06 +01:00
Renn F d570334e04 Linting: Check 2025-12-12 02:45:47 +01:00
Renn F b8c19e85bd TODOs done + cleanup 2025-12-11 01:05:20 +01:00
Renn F f0f6f77d68 Moved out of "src" 2025-12-10 17:37:24 +01:00
Renn F 7f5bc4b8b8 Checkpoint before cleanup + best practices + code quality 2025-12-10 17:35:43 +01:00
Renn F 0c5dac4d16 Initial implementation 2025-12-10 02:49:54 +01:00
Renzo FandGitHub 209aa346ab Initial commit 2025-12-08 23:59:51 +01:00