Input: Design documents from /specs/024-expand-activity-log/
Prerequisites: plan.md (complete), spec.md (complete), research.md (complete), data-model.md (complete), contracts/activity-api-changes.yaml (complete)
Tests: Unit tests required for backend (Go test), E2E for API, manual testing via Claude browser automation for Web UI and Bash for CLI.
Organization: Tasks are grouped by user story to enable independent implementation and testing of each story.
- [P]: Can run in parallel (different files, no dependencies)
- [Story]: Which user story this task belongs to (e.g., US1, US2, US3)
- Include exact file paths in descriptions
- Backend:
internal/,cmd/mcpproxy/ - Frontend:
frontend/src/ - Docs:
docs/ - Tests: Colocated with source (
*_test.go), E2E via scripts
Purpose: Create foundational constants and types that all user stories depend on
- T001 [P] Add new ActivityType constants (
system_start,system_stop,internal_tool_call,config_change) ininternal/storage/activity_models.go - T002 [P] Add new EventType constants (
activity.system.start,activity.system.stop,activity.internal_tool_call.completed,activity.config_change) ininternal/runtime/events.go - T003 [P] Add ValidActivityTypes slice with all valid types in
internal/storage/activity_models.go
Purpose: Core infrastructure that MUST be complete before ANY user story can be implemented
Note: The multi-type filter support is foundational because it enables both Web UI and CLI filtering capabilities.
- T004 Change
ActivityFilter.TypefromstringtoTypes []stringininternal/storage/activity_models.go - T005 Update
ActivityFilter.Matches()method to support OR logic for multiple types ininternal/storage/activity_models.go - T006 Update
GET /api/v1/activityhandler to parse comma-separatedtypeparameter into[]stringininternal/httpapi/activity.go - T007 Add unit tests for multi-type filtering in
internal/storage/activity_test.go - T008 Add API test for multi-type filter endpoint in
internal/httpapi/activity_test.go
Checkpoint: Foundation ready - multi-type filter works via API
Goal: As a DevOps engineer, I want to see when MCPProxy starts and stops so that I can monitor system uptime
Independent Test: Start/stop MCPProxy and verify system_start and system_stop events appear in activity log
- T009 [US1] Add
EmitActivitySystemStart()method to Runtime ininternal/runtime/event_bus.go - T010 [US1] Add
EmitActivitySystemStop()method to Runtime ininternal/runtime/event_bus.go - T011 [US1] Call
EmitActivitySystemStart()after HTTP listener binds ininternal/server/server.go:StartServer() - T012 [US1] Call
EmitActivitySystemStop()at beginning ofinternal/server/server.go:Shutdown() - T013 [US1] Add unit tests for system start/stop event emission in
internal/runtime/activity_service_test.go
Checkpoint: System lifecycle events logged - start MCPProxy and verify system_start appears
Goal: As a security analyst, I want to see all internal tool calls so that I can audit agent behavior
Independent Test: Call retrieve_tools via MCP client and verify internal_tool_call event appears
- T014 [US2] Add
emitActivityInternalToolCall()helper method ininternal/server/mcp.go - T015 [P] [US2] Add emission call in
handleRetrieveTools()ininternal/server/mcp.go - T016 [P] [US2] Add emission call in
handleCallToolRead()ininternal/server/mcp.go(via handleCallToolVariant) - T017 [P] [US2] Add emission call in
handleCallToolWrite()ininternal/server/mcp.go(via handleCallToolVariant) - T018 [P] [US2] Add emission call in
handleCallToolDestructive()ininternal/server/mcp.go(via handleCallToolVariant) - T019 [P] [US2] Add emission call in
handleCodeExecution()ininternal/server/mcp_code_execution.go - T020 [P] [US2] Add emission call in
handleUpstreamServers()ininternal/server/mcp.go - T021 [P] [US2] Add emission call in
handleQuarantineSecurity()ininternal/server/mcp.go - T022 [P] [US2] Add emission call in
handleListRegistries()ininternal/server/mcp.go - T023 [P] [US2] Add emission call in
handleSearchServers()ininternal/server/mcp.go - T024 [P] [US2] Add emission call in
handleReadCache()ininternal/server/mcp.go - T025 [US2] Add unit tests for internal tool call emission in
internal/runtime/activity_service_test.go
Checkpoint: Internal tool calls logged - call retrieve_tools and verify internal_tool_call appears
Goal: As an administrator, I want to see configuration changes so that I can track who modified settings
Independent Test: Add/remove a server via CLI and verify config_change event appears
- T026 [US3] Subscribe to
EventTypeServersChangedin ActivityService for config changes ininternal/runtime/activity_service.go - T027 [US3] Create
config_changeactivity record with action, affected_entity, changed_fields, previous/new values ininternal/runtime/activity_service.go - T028 [US3] Add unit tests for config change event handling in
internal/runtime/activity_service_test.go
Checkpoint: Config changes logged - add a server and verify config_change appears
Goal: As an operator, I want to filter the activity table by multiple event types so that I can focus on specific activities
Independent Test: Open Web UI, select multiple event types in dropdown, verify table shows only selected types
- T029 [US4] Add
ActivityTypetype enum with all values infrontend/src/views/Activity.vue(activityTypes array) - T030 [US4] Create multi-select dropdown component with checkboxes for event types in
frontend/src/views/Activity.vue - T031 [US4] Add
selectedTypesreactive state array infrontend/src/views/Activity.vue - T032 [US4] Update API call to pass comma-separated types parameter in
frontend/src/views/Activity.vue - T033 [US4] Add "Clear all" button for multi-select dropdown in
frontend/src/views/Activity.vue - T034 [US4] Show selected count badge "(N selected)" in dropdown button in
frontend/src/views/Activity.vue
Checkpoint: Multi-select filter works in Web UI
Goal: As a security analyst, I want to see the intent column so that I can understand why agents called tools
Independent Test: View activity table, verify Intent column shows operation type icon and truncated reason
- T035 [US5] Add Intent column header to activity table in
frontend/src/views/Activity.vue - T036 [US5] Add
getIntentIcon()helper function (read, write, destructive icons) infrontend/src/views/Activity.vue - T037 [US5] Display operation type icon + truncated reason (30 chars) in Intent cell in
frontend/src/views/Activity.vue - T038 [US5] Add tooltip with full intent reason text on hover in
frontend/src/views/Activity.vue
Checkpoint: Intent column displays correctly with icons and tooltips
Goal: As an operator, I want to sort the activity table so that I can organize data by different criteria
Independent Test: Click column headers, verify sorting toggles between ascending/descending
- T039 [US6] Add
sortColumnandsortDirectionreactive state infrontend/src/views/Activity.vue - T040 [US6] Add
sortBy(column)method to toggle sort direction infrontend/src/views/Activity.vue - T041 [US6] Add computed property to sort activities array client-side in
frontend/src/views/Activity.vue - T042 [US6] Add click handlers to sortable column headers (Time, Type, Server, Status) in
frontend/src/views/Activity.vue - T043 [US6] Add visual sort indicator arrows to column headers in
frontend/src/views/Activity.vue - T044 [US6] Set default sort to timestamp descending (newest first) in
frontend/src/views/Activity.vue
Checkpoint: Columns are sortable with visual indicators
Goal: As a developer, I want to see formatted JSON for activity parameters so that I can debug issues
Independent Test: Click activity row, verify details panel shows syntax-highlighted JSON
- T045 [US7] Verify JsonViewer component has syntax highlighting in
frontend/src/components/JsonViewer.vue - T046 [US7] Add copy-to-clipboard button to JsonViewer if not present in
frontend/src/components/JsonViewer.vue - T047 [US7] Ensure arguments and metadata are displayed via JsonViewer in activity detail panel in
frontend/src/views/Activity.vue
Checkpoint: JSON displayed with syntax highlighting and copy button
Goal: As an operator, I want to access the Activity Log from the navigation menu so that I can easily monitor activity
Independent Test: Open Web UI, verify Activity Log menu item is visible and navigates correctly
- T048 [US8] Uncomment/enable Activity Log router-link in
frontend/src/components/SidebarNav.vue - T049 [US8] Verify Activity Log route is configured in
frontend/src/router/index.ts - T050 [US8] Add appropriate icon for Activity Log menu item in
frontend/src/components/SidebarNav.vue
Checkpoint: Activity Log accessible from navigation menu
Goal: As a DevOps engineer, I want to filter activity logs by event type via CLI so that I can script monitoring
Independent Test: Run mcpproxy activity list --type=tool_call,config_change, verify filtered results
- T051 [US9] Update
--typeflag description to mention comma-separated values incmd/mcpproxy/activity_cmd.go - T052 [US9] Add validation for each comma-separated type value in
cmd/mcpproxy/activity_cmd.go - T053 [US9] Update valid types list in help text to include new types in
cmd/mcpproxy/activity_cmd.go - T054 [US9] Add CLI test for multi-type filtering in
cmd/mcpproxy/activity_cmd_test.go(validation covered in Validate())
Checkpoint: CLI supports comma-separated type filtering
Goal: As a developer, I want updated documentation so that I can understand the new activity log features
Independent Test: Review documentation files, verify new event types and features are documented
- T055 [P] [US10] Add new event types table (system_start, system_stop, internal_tool_call, config_change) to
docs/features/activity-log.md - T056 [P] [US10] Add examples for each new event type with metadata schemas in
docs/features/activity-log.md - T057 [P] [US10] Add multi-type filter examples (
--type=tool_call,config_change) todocs/cli/activity-commands.md - T058 [P] [US10] Update valid event types list in
docs/cli/activity-commands.md - T059 [US10] Create or update Web UI activity log documentation in
docs/web-ui/activity-log.md(if exists)
Checkpoint: Documentation complete for all new features
Purpose: Integration testing, validation, and final cleanup
- T060 Run E2E tests via
./scripts/test-api-e2e.sh(passed - failures unrelated to Spec 024) - T061 Test Web UI via Claude browser automation (multi-select filter, intent column, sorting)
- T062 Test CLI via Bash (multi-type filter, new event types - validation works)
- T063 Verify SSE events delivered for new activity types
- T064 Run linter via
./scripts/run-linter.sh(passed after fix) - T065 Run unit tests via
go test ./internal/... ./cmd/mcpproxy/...(passed) - T066 Update quickstart.md validation section with test results
- Setup (Phase 1): No dependencies - can start immediately
- Foundational (Phase 2): Depends on Setup completion - BLOCKS all user stories
- User Stories (Phase 3-12): All depend on Foundational phase completion
- P1 stories (US1, US2, US3) can proceed in parallel after Foundational
- P2 stories (US4-US8) can proceed in parallel after Foundational
- P3 stories (US9, US10) can proceed in parallel after Foundational
- Polish (Phase 13): Depends on all user stories being complete
Setup (Phase 1)
│
v
Foundational (Phase 2) - Multi-type filter support
│
├──> US1 (P1): System Lifecycle Events
│ └── Backend: events.go, activity_service.go, server.go
│
├──> US2 (P1): Internal Tool Calls
│ └── Backend: mcp.go, activity_service.go
│
├──> US3 (P1): Config Changes
│ └── Backend: activity_service.go
│
├──> US4 (P2): Web UI Multi-Select Filter
│ └── Frontend: Activity.vue, api.ts
│
├──> US5 (P2): Intent Column
│ └── Frontend: Activity.vue
│
├──> US6 (P2): Sortable Columns
│ └── Frontend: Activity.vue
│
├──> US7 (P2): Colored JSON
│ └── Frontend: JsonViewer.vue, Activity.vue
│
├──> US8 (P2): Activity Menu Item
│ └── Frontend: SidebarNav.vue
│
├──> US9 (P3): CLI Multi-Type Filter
│ └── CLI: activity_cmd.go
│
└──> US10 (P3): Documentation
└── Docs: activity-log.md, activity-commands.md
│
v
Polish (Phase 13) - Integration testing & validation
- Backend changes before frontend (for API-dependent stories)
- Models before services
- Services before handlers
- Implementation before tests (or TDD if preferred)
- Story complete before moving to next priority
Phase 1 (Setup): All tasks [P] can run in parallel
# Launch together:
Task T001: "Add new ActivityType constants"
Task T002: "Add new EventType constants"
Task T003: "Add ValidActivityTypes slice"Phase 2 (Foundational): Sequential (T004 → T005 → T006 → T007/T008)
After Foundational: All user stories can start in parallel
# Backend stories in parallel:
Task T009-T013: US1 (System Events)
Task T014-T025: US2 (Internal Tool Calls)
Task T026-T028: US3 (Config Changes)
# Frontend stories in parallel:
Task T029-T034: US4 (Multi-Select Filter)
Task T035-T038: US5 (Intent Column)
Task T039-T044: US6 (Sortable Columns)
Task T045-T047: US7 (Colored JSON)
Task T048-T050: US8 (Activity Menu)
# CLI & Docs in parallel:
Task T051-T054: US9 (CLI Multi-Type)
Task T055-T059: US10 (Documentation)Within US2: T015-T024 can all run in parallel (different handlers)
# Launch together:
Task T015: "Add emission call in handleRetrieveTools()"
Task T016: "Add emission call in handleCallToolRead()"
Task T017: "Add emission call in handleCallToolWrite()"
# ... etcWithin US10: T055-T058 can all run in parallel (different doc files)
- Complete Phase 1: Setup (T001-T003)
- Complete Phase 2: Foundational (T004-T008)
- Complete Phase 3: US1 - System Events (T009-T013)
- Complete Phase 4: US2 - Internal Tool Calls (T014-T025)
- Complete Phase 5: US3 - Config Changes (T026-T028)
- STOP and VALIDATE: Test all P1 stories independently
- Deploy/demo if ready
- Setup + Foundational → Foundation ready
- Add US1-US3 (P1) → Backend complete → Test via API/CLI
- Add US4-US8 (P2) → Web UI complete → Test via browser
- Add US9-US10 (P3) → CLI & Docs complete → Final validation
- Polish → Integration testing → Release
With multiple developers:
- Team completes Setup + Foundational together
- Once Foundational is done:
- Developer A: US1, US2, US3 (Backend P1)
- Developer B: US4, US5, US6, US7, US8 (Frontend P2)
- Developer C: US9, US10 (CLI & Docs P3)
- Stories complete and integrate independently
- [P] tasks = different files, no dependencies
- [Story] label maps task to specific user story for traceability
- Each user story should be independently completable and testable
- Commit after each task or logical group
- Stop at any checkpoint to validate story independently
- Testing: Web UI via Claude browser automation, CLI via Bash, Backend via go test
- Avoid: vague tasks, same file conflicts, cross-story dependencies that break independence